A water supply network leakage identification method and system based on time series cutting
By processing the acoustic data of the water supply network through time series cutting and a two-dimensional convolutional neural network model, the problems of noise interference and data fluctuation in water supply network leakage detection are solved, higher detection accuracy and anti-interference performance are achieved, and leakage control efficiency is improved.
Patent Information
- Application Number
- CN202410793556.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-06-19
AI Technical Summary
Existing water supply network leak detection methods are subject to noise interference and data fluctuations in real environments, resulting in insufficient detection accuracy. Traditional leak detection methods are inefficient and individual judgment results are inconsistent.
A time series cutting-based method is used to process the acoustic monitoring data of the water supply network. The data segment features are extracted through long and short time series cutting, a two-dimensional convolutional neural network model is constructed, and incremental data set screening and model optimization are performed to improve the recognition accuracy.
It improves the accuracy and anti-interference ability of water supply network leakage detection, enhances the leakage control level, reduces the misjudgment rate of data identification, and is suitable for real application scenarios.
Smart Images

Figure CN118640418B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water supply pipeline leakage detection and identification, and in particular to a water supply network leakage identification method and system based on time series cutting. Background Art
[0002] With technological advancements, various types of equipment have emerged for leak monitoring in water supply networks. Acoustic monitoring methods detect leaks by collecting and analyzing acoustic vibrations in the water supply network. When a leak occurs in the water supply network, the acoustic vibrations caused by the overflow of water from the water pipe at the leak point will propagate along the pipeline. By capturing the acoustic vibration signals caused by such leaks with sensors, leaks in the water supply network can be detected. However, in real-world environments, data collection is usually performed within the valve wells of the water supply network. The noise sources in the collected data are complex, and interference phenomena such as data fluctuations may occur, resulting in the need to improve the existing detection accuracy. Summary of the Invention
[0003] In response to the above problems, the purpose of the present invention is to provide a water supply network leakage identification method and system based on time series cutting. The time series cutting method is used to process and analyze the acoustic monitoring data of the water supply network, thereby improving the accuracy of leak detection, helping water supply companies to carry out leak detection work, and improving the level of leakage control.
[0004] To achieve the above-mentioned purpose, the present invention adopts the following technical solutions: a water supply network leakage identification method based on time series cutting, which includes: preprocessing the sample data in the sample library composed of collected leakage sample data and normal sample data; performing long time series cutting and short time series cutting on the preprocessed sample data in turn to extract data segment features and reconstruct the feature data; using the reconstructed feature data as the input data of the constructed two-dimensional convolutional neural network model, training the two-dimensional convolutional neural network model to obtain a two-dimensional convolutional neural network model that can accurately identify the sample data; performing incremental data set screening on the output results of the two-dimensional convolutional neural network model, and the screened incremental data set is used to adjust and optimize the parameters of the two-dimensional convolutional neural network model, and after the two-dimensional convolutional neural network model is optimized, the recognition performance of the model is improved.
[0005] Furthermore, the sample data in the sample library composed of the collected leakage sample data and normal sample data is preprocessed, including:
[0006] Collect pure leakage acoustic samples under real pipe network leakage conditions, build a leakage sample noise library, and mark it as leakage;
[0007] After the leak repair is completed, the on-site environmental noise is collected, and acoustic samples of the pipeline under normal conditions are collected to build a normal sample noise library and mark it as normal;
[0008] The sample library is composed of a leakage sample noise library and a normal sample noise library, and the sample data is subjected to trend item removal, high-frequency band filtering of acoustic wave data, and abnormal data point adjustment.
[0009] Furthermore, the preprocessed sample data is sequentially subjected to long time series cutting and short time series cutting, including:
[0010] The sample data is cut into long time series, and the sample data is divided into multiple segments according to the set time series length. Each segment of the cut data is a partial interception of the original sample data, representing a sampling of the original sample data;
[0011] Each segment of data after long time series cutting is cut into short time series, and each segment of data is cut into multiple short time series segments according to the number of data points, and each short time series segment only contains the selected data points.
[0012] Furthermore, the data segment features are extracted and the feature data is reconstructed, including:
[0013] After feature extraction for each short time series segment, the data is reconstructed in reverse according to the time series cutting method to form a feature reconstruction matrix of the original data, which is a three-dimensional matrix.
[0014] Furthermore, the output results of the two-dimensional convolutional neural network model are subjected to incremental data set screening, including: using three scenarios to perform incremental data set screening;
[0015] The proportion of normal samples in terms of data volume is higher than that of leaked samples, which indicates data imbalance.
[0016] The data output by the 2D convolutional neural network model has not been manually verified or excavated on site;
[0017] The data results determined by the output of the 2D convolutional neural network model were manually confirmed and excavated on site.
[0018] Furthermore, the proportion of normal samples in terms of data volume is higher than the proportion of leaked samples. The incremental data set screening includes: optimizing the selection of data whose model output is normal samples;
[0019] Data samples whose probability is lower than the set value are directly eliminated and do not enter the incremental data set;
[0020] The data samples whose probability is determined to be in the first set interval are entered into the incremental data set;
[0021] Supplement data points at the boundary positions to enhance the model classification ability.
[0022] Furthermore, the data results determined by the output of the two-dimensional convolutional neural network model have not been manually confirmed or excavated on site, and the incremental data set screening includes: screening the incremental data set according to the model output results;
[0023] For samples that the model determines are leaks, the original acoustic data X is taken and the data samples whose probability values fall within the second set interval after long-term segmentation [X1 … Xm] are selected as the incremental leakage sample dataset; where Xm is the mth segment of data after long-term segmentation of the original acoustic data X.
[0024] For samples judged as normal by the model, the original acoustic data X is taken out, and the data samples whose probability values are in the third set interval in [X1 … Xm] after long time series cutting are selected as the normal sample incremental data set;
[0025] The data results determined by the output of the 2D convolutional neural network model were manually confirmed and excavated on site. The incremental data set screening included: screening the incremental data set based on the model output results and actual data labels;
[0026] For samples that are judged as leaks by the model and manually confirmed as leaks, the original acoustic data X is taken and the data samples whose probability values are in the second set interval in [X1 … Xm] after long time series segmentation are selected as the incremental leakage sample dataset;
[0027] For samples that are judged as leaks by the model but manually confirmed as normal, we extract the original acoustic data X and select samples with a low 50% probability value in [X1 … Xm] after long time series segmentation as the normal sample incremental dataset;
[0028] For samples that are judged as normal by the model and manually confirmed as normal, the original acoustic data X is taken, and the data samples whose probability values are in the first set interval after long time series segmentation [X1 … Xm] are selected as the normal sample incremental data set;
[0029] For samples judged as normal by the model but manually confirmed as leaks, the original acoustic data X is taken, and samples with a high 50% probability value in [X1 … Xm] after long time series segmentation are selected as the incremental leakage sample dataset.
[0030] A water supply network leakage identification system based on time series cutting comprises: a preprocessing module, which preprocesses sample data in a sample library composed of collected leakage sample data and normal sample data; a feature extraction and reconstruction module, which sequentially performs long time series cutting and short time series cutting on the preprocessed sample data to extract data segment features and reconstruct the feature data; a model construction and training module, which uses the reconstructed feature data as input data of a constructed two-dimensional convolutional neural network model and trains the two-dimensional convolutional neural network model to obtain a two-dimensional convolutional neural network model that can accurately identify sample data; and a recognition module, which performs incremental data set screening on the output results of the two-dimensional convolutional neural network model, and the screened incremental data set is used to adjust and optimize the parameters of the two-dimensional convolutional neural network model. After the two-dimensional convolutional neural network model is optimized, the recognition performance of the model is improved.
[0031] A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions that, when executed by a computing device, cause the computing device to perform any of the above methods.
[0032] A computing device comprises: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.
[0033] The present invention has the following advantages due to the adoption of the above technical solution:
[0034] 1. The present invention adopts a long time series cutting method to convert the original data into multiple samples. It considers the unstable factors caused by external interference from the time domain, and judges the original data through the comprehensive results of multiple fragments of data, which increases the accuracy and anti-interference ability of data recognition and improves the practical application effect of the algorithm.
[0035] 2. The present invention uses a short time series cutting method to extract Mel frequency features from the data, compress high-frequency information, and expand low-frequency information, which corresponds to the low-frequency density and high-frequency sparseness of the leakage sample information, thereby improving the effectiveness of information extraction.
[0036] 3. The present invention adopts a two-dimensional neural network model to analyze data from the time scale and frequency scale, and classifies the data in the time-frequency domain. In the scenario where the leakage signal itself is a non-steady-state signal, it highlights the scientific rationality.
[0037] 4. The present invention adopts an incremental data learning model, which enables the algorithm to be continuously optimized and improved within the ever-expanding data set, and the model tends to have higher accuracy and more diverse scenario applications.
[0038] In summary, this invention addresses the problem of unknown interference noise in real-world sampling environments and improves the accuracy of leak detection. By using a time-series segmentation method, it extracts effective features from the collected data and establishes a leak identification model. This model is continuously improved in practice to ensure its applicability to real-world leak detection scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flow chart of a method for identifying water supply network leakage based on time series cutting in an embodiment of the present invention;
[0040] Figure 2 This is a schematic diagram of data reorganization after time-series cutting in an embodiment of the present invention;
[0041] Figure 3 2 is a schematic diagram of data feature extraction in an embodiment of the present invention;
[0042] Figure 4 2. It is a framework diagram of a two-dimensional convolutional neural network recognition model in an embodiment of the present invention;
[0043] Figure 5 This is a flowchart of incremental learning data sample screening in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present invention.
[0045] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0046] In the field of urban water supply, as the service life of the pipeline network increases, the performance of the pipeline will gradually deteriorate. Damage caused by aging, corrosion and other factors in the pipeline network will lead to a large amount of water loss during the transportation process, reducing the utilization rate of water resources, exacerbating the water shortage problem in cities, and causing huge economic losses. According to statistics from the International Water Association, the amount of water loss in the global water supply network exceeds 320 million tons per year. 8 m³, of which the apparent leakage is about 160×10 8m³, resulting in an annual economic loss of approximately US$14 billion. In recent years, the average production-sales gap rate of China's urban water supply network has reached about 18%, and in some cities it has even exceeded 25%, resulting in an annual water loss of more than 50×10 8 m 3 .
[0047] Pipeline leak detection provides early warning of leaks and assists water supply companies in leak detection and repair. It is one of the most direct and effective ways to conserve urban water resources and reduce pipeline network operating and maintenance costs. This allows water supply companies to reduce the cost of tap water sales and improve economic efficiency. However, traditional leak detection for urban water supply pipelines relies heavily on leak detectors who listen to the pipes. This method has several drawbacks. Not only is the workload enormous for leak detectors, resulting in low pipeline network inspection efficiency, but leak detectors also vary from person to person, leading to volatile results.
[0048] Therefore, in order to deal with the problem of unknown interference noise in a real sampling environment and improve the accuracy of leak identification and detection, the present invention provides a water supply network leakage identification method and system based on time series cutting, including: a method for collecting and preprocessing leakage data and normal data; a method for long-time series cutting and short-time series cutting of data; intercepting data segments for feature extraction and data feature reconstruction; constructing a two-dimensional convolutional neural network structure model; an incremental learning data set screening method; incremental learning and model optimization. Based on the above steps, the data generated by the water supply network leakage is identified, and the data set is continuously expanded using data screening and incremental learning strategies, while reducing the signal interference components in the incremental learning samples, so that the constructed neural network model is iteratively upgraded in the continuously expanding practical data, thereby improving the model accuracy and data richness. Ultimately, the recognition and classification capabilities of the acoustic monitoring data of the water supply network are improved, helping water supply and water use companies to detect leaks and improve the efficiency of leakage control.
[0049] In one embodiment of the present invention, Figure 1 As shown, a method for identifying water supply network leakage based on time series cutting is provided. It is a method for detecting leakage events in urban water supply network, specifically using the time series cutting method to diagnose leakage events in urban water supply network. In this embodiment, the method includes the following steps:
[0050] 1) Preprocessing the sample data in the sample library consisting of the collected leakage sample data and normal sample data;
[0051] 2) The preprocessed sample data is cut into long time series and short time series in sequence to extract data segment features and reconstruct feature data;
[0052] 3) Using the reconstructed feature data as input data for the constructed two-dimensional convolutional neural network model, the two-dimensional convolutional neural network model is trained to obtain a two-dimensional convolutional neural network model that can accurately identify sample data;
[0053] 4) The output results of the two-dimensional convolutional neural network model are screened with incremental data sets. The screened incremental data sets are used to adjust and optimize the parameters of the two-dimensional convolutional neural network model. After the two-dimensional convolutional neural network model is optimized, the recognition performance of the model is improved.
[0054] In the above step 1), the sample data in the sample library composed of the collected leakage sample data and normal sample data is preprocessed, including the following steps:
[0055] 1.1) Collect pure leakage acoustic samples under real pipe network leakage conditions, build a leakage sample noise library, and mark them as leakage;
[0056] 1.2) After the leak repair is completed, collect the on-site environmental noise and acoustic samples of the pipeline under normal conditions, build a normal sample noise library, and mark it as normal;
[0057] 1.3) The sample library is composed of the leakage sample noise library and the normal sample noise library. The sample data is subjected to trend removal, high-frequency band filtering of the acoustic wave data, and abnormal data point adjustment.
[0058] In this embodiment, when collecting data, in order to ensure the purity of the model training data, the data must have the following characteristics: (1) Accurate data labeling. The data source and data type are marked, whether it is leakage audio data or normal audio data, where audio data is acoustic data. (2) Data quality assurance. For leakage audio data, the integrity and purity of the audio must be guaranteed to avoid environmental noise interfering with the data. (3) Wide data coverage. For leakage data, data needs to be collected from a variety of pipe materials, pipe diameters, and pipe ages to avoid repeatedly collecting leakage data from the same leak point, which reduces data richness. (4) Data comes from a real pipe network. Unlike laboratory research, this type of data comes from leakage events in a real water supply network, which conforms to the complex characteristics of the water supply network. For example, the training data samples are 684 leakage data and 976 normal data. After the data set is collected, the data is preprocessed as necessary. The basic preprocessing method for audio data can be referred to.
[0059] Preprocess the data in the sample library, including removing data trend items, designing low-pass filters to filter out high-frequency bands, and adjusting abnormal data points.
[0060] In the above step 2), the pre-processed sample data is sequentially subjected to long time series cutting and short time series cutting, including the following steps:
[0061] 2.1) Perform long time series segmentation on the sample data. Divide the sample data into multiple segments according to the set time series length for representation, which is called L-slicing. Each segment after segmentation is a partial interception of the original sample data, representing a sampling of the original sample data.
[0062] For example, suppose a piece of acoustic data sample is X, which will be cut into multiple data segments such as [X1 ... Xm], and each piece of data Xi (i m) are all partial cuts of the original data, representing a single sampling of the original data. By cutting long time series, we can reduce the bias in leakage judgment caused by abnormal fluctuations or noise interference in the data sample.
[0063] 2.2) After the long time series is cut, each data segment is cut into short time series segments. Each data segment is cut into multiple short time series segments according to the number of data points. Each short time series segment only contains the selected data points, which is recorded as S cut.
[0064] For example, perform a short-term cut on each Xi and divide Xi into [Xi1 … Xin], each Xij is a subset of Xi, j n, n is the total number of points. In a very short time, the acoustic research field regards each segment Xij as a stationary signal and can perform data feature extraction.
[0065] In this embodiment, Figure 2 As shown in the figure, during the segmentation process, long-time segmentation (L segmentation) cuts the audio data into segments of 0.25s, 0.50s, 0.75s, and 1.0s, which are then used as independent samples of the original data. Short-time segmentation is used for feature extraction and can be performed by truncating the number of short-time samples. This number is related to the sampling frequency. For a sampling rate of 10,000 Hz, the number of points selected is 78, 156, 312, and 625. Examples show that L segmentation of 0.25s and S segmentation of 625 points produce the best results.
[0066] In the above step 2), the features of the data segments are extracted and the feature data is reconstructed. Specifically, after the features of each short time series segment are extracted, the data is reconstructed in reverse according to the time series cutting method to form a feature reconstruction matrix of the original data, which is a three-dimensional matrix.
[0067] In this embodiment, data feature extraction can be performed for each data segment Xij. The manner and method of feature extraction can be various and are not limited here. For example, manual feature extraction, frequency domain information extraction, and time domain information extraction can be performed. Taking the extraction of Mel-frequency features as an example, high-frequency information is compressed and low-frequency information is expanded. First, a Mel-frequency filter bank is constructed and Mel-frequency feature extraction is performed on each segment Xij to obtain a one-dimensional matrix data. This matrix represents the feature information representation of the data segment Xij.
[0068] After extracting the feature information of each segment Xij, we reconstruct the information. [Xi1 … Xin] can form a two-dimensional matrix, with the horizontal axis representing the time scale and the vertical axis representing the Mel-frequency scale, denoted as S-reconstruction. [X1 … Xm] form a three-dimensional matrix, with each Xi representing part of the original signal X, denoted as L-reconstruction.
[0069] In this embodiment, the feature extraction uses a designed Mel filter bank for effective feature extraction. The characteristic of the Mel filter is that it compresses high-frequency information and expands low-frequency information, which is related to the fact that the leakage sound wave information has few high-frequency components and many low-frequency components. The Mel filter bank can select the frequency range and the number of filters. In this embodiment, the frequency range used is 0~2000Hz, and the filter bank is 16, such as Figure 3 After extracting the features, reverse data reconstruction is performed according to the time series cutting process to convert the original data into a feature data reconstruction matrix, which is a three-dimensional matrix.
[0070] In step 3) above, the construction of the two-dimensional convolutional neural network model is as follows:
[0071] We built a two-dimensional convolutional neural network model to identify data samples. Neural network parameters, including the number of layers, learning rate, convolution kernel parameters, pooling layer parameters, fully connected layer parameters, and output layer parameters, were iteratively optimized during model training. Model training included a training set, a validation set, and a test set. We evaluated model performance on the test set.
[0072] Model performance evaluation metrics include accuracy, precision, sensitivity, specificity, ROC curve, and AUC value. Specifically, performance metrics are calculated using TP, TN, FP, and FN. TP represents true positive samples, i.e., samples that the model identifies as leaking; TN represents true negative samples, i.e., samples that the model identifies as normal; FP represents false positive samples, i.e., samples that the model mistakenly identifies as leaking; and FN represents false negative samples, i.e., samples that the model mistakenly identifies as leaking. Evaluation metrics are calculated as follows: Accuracy = (TP + TN) / (TP + FP + FN + TN); Precision = TP / (TP + FP); Sensitivity = TP / (TP + FN); Specificity = TN / (FP + TN). The ROC curve is plotted with the true positive rate (TPR) and false positive rate (FPR) as the horizontal and vertical axes. True positive rate (TPR) = TP / (TP + FN), and false positive rate (FPR) = FP / (FP + TN). The AUC value represents the area under the ROC curve. A value closer to 1 indicates better model performance.
[0073] Specifically, such as Figure 4 As shown in the figure, the model was constructed using a CNN neural network framework, performing two-dimensional convolution operations. The training parameters are as follows: a training batch size of 64 and a learning rate of 0.001; two convolutional layers with 32 kernels, each a 3×3 matrix with a stride of 2×2, and a ReLU activation function; a pooling layer using max pooling with a 2×2 matrix; two fully connected layers with 512 neurons in the first layer and 256 neurons in the second layer, each also using a ReLU activation function; a forgetting layer with a forgetting ratio of 0.25; and a sigmoid activation function in the output layer. The trained model achieved excellent recognition and classification performance on the test set, achieving an accuracy of 0.9814, a precision of 1.000, and a specificity of 0.9677.
[0074] In step 4 above, the model outputs sample labels and model outputs when determining the output. The model outputs data as a probability value, ranging from 0 to 1. Samples with a probability greater than 0.5 are generally considered leaks, while samples with a probability less than 0.5 are considered normal. Furthermore, in long-series segmentation mode, the output of a single data sample is determined by multiple segments of data. For example, the output of signal X is determined by [X1 … Xm]. If more than 60% of the Xi outputs indicate leakage, signal X is defined as a leak sample.
[0075] In real-world applications, data is continuously uploaded to the model for recognition, so the model will be optimized and upgraded as the data volume grows. Applications often encounter the following scenarios: 1. Normal samples far outnumber leaked samples; 2. The model output and judgment results have not been manually verified or verified on-site; 3. The model output and judgment results have been manually verified and verified on-site. To address these scenarios, continuously collected data is screened to supplement the incremental dataset for model training, thereby improving the model's recognition capabilities in real-world applications.
[0076] Therefore, in this embodiment, the output results of the two-dimensional convolutional neural network model are subjected to incremental data set screening, and three scenarios are used for incremental data set screening:
[0077] 4.1) The proportion of normal samples in terms of data volume is higher than that of leaked samples, indicating a data imbalance problem;
[0078] 4.2) The data output by the 2D convolutional neural network model has not been manually verified or subjected to on-site excavation;
[0079] 4.3) The data output by the 2D convolutional neural network model was manually confirmed and subjected to on-site excavation.
[0080] In this embodiment, in the scenario of 4.1), the proportion of normal samples in terms of data volume is higher than the proportion of leaked samples. The incremental data set screening includes: optimizing and selecting data whose model output is normal samples;
[0081] 4.1.1) Data samples with a probability lower than the set value are directly eliminated and do not enter the incremental data set;
[0082] Optional, set the value to 0.1.
[0083] 4.1.2) Data samples with a probability of being within the first set interval are added to the incremental data set;
[0084] Optionally, the first setting interval is 0.1-0.5.
[0085] 4.1.3) Supplementing data points at the boundary positions to enhance the model's classification ability while eliminating a large number of normal samples.
[0086] In the scenario of 4.2), the data results determined by the output of the 2D convolutional neural network model have not been manually confirmed or excavated on site. The incremental data set screening includes: screening the incremental data set based on the model output results;
[0087] 4.2.1) For samples identified as leaks by the model, extract the original acoustic data X and select data samples whose probability values fall within the second set interval [X1…Xm] after long-term segmentation as the incremental leakage sample dataset; where Xm is the mth segment of data after long-term segmentation of the original acoustic data X;
[0088] Optionally, the second setting interval is 0.6-0.9.
[0089] 4.2.2) For samples that the model determines are normal, extract the original acoustic data X and select data samples whose probability values fall within the third set interval in the long time series [X1…Xm] after segmentation as the incremental normal sample dataset. This enhances the model's learning effect on borderline data.
[0090] Optionally, the third setting interval is 0.1-0.4.
[0091] In the scenario of 4.3), the data results determined by the output of the 2D convolutional neural network model are manually confirmed and excavated on site. The incremental data set screening includes: screening the incremental data set based on the model output results and actual data labels;
[0092] 4.3.1) For samples that are both model-identified and manually confirmed as leaks, extract the original acoustic data X and select data samples whose probability values fall within the second set interval [X1 … Xm] after long time series segmentation as the incremental leak sample dataset;
[0093] 4.3.2) For samples that the model identifies as leaks but are manually confirmed as normal, extract the original acoustic data X and select samples with a low 50% probability value in [X1 … Xm] after long time series segmentation as the incremental normal sample dataset;
[0094] 4.3.3) For samples judged normal by the model and manually confirmed as normal, extract the original acoustic data X and select data samples whose probability values fall within the first set interval [X1 … Xm] after long time series segmentation as the normal sample incremental dataset;
[0095] 4.3.4) For samples judged normal by the model but manually confirmed as leaks, extract the original acoustic data X and select samples with a high 50% probability value in [X1 … Xm] after long time series segmentation as the incremental leakage sample dataset.
[0096] Specifically, when analyzing the results of the data to be judged and screening the incremental learning data, three performance analyses are performed, and the data to be judged are divided into three batches, marked as A, B, and C. The first time, model 1.0, which has passed the stage training and verification, is used to judge the model of batch A, calculate the various indicators of the model, and screen the incremental learning data set A1; the second time, after model 1.0 has incrementally learned the data set A1, the model parameters are adjusted, the model is optimized to model 1.1, and batch B is judged, and the incremental learning data set B1 is screened; the third time, after model 1.1 has incrementally learned the data set B1, the model parameters are adjusted, the model is optimized to model 1.2, and batch C is judged, and the incremental learning data set C1 is screened. In response to the data brought by the continuous practice process, the data source of the model is becoming more and more extensive, and the judgment accuracy of the model is also getting higher and higher, which is suitable for actual application scenarios. The screening method of the incremental data set is as follows: Figure 5 The application results are as follows: Model 1.0 achieved accuracy of 0.8865, precision of 0.8818, sensitivity of 0.8442, and specificity of 0.9200. Model 1.1 achieved accuracy of 0.9194, precision of 0.8986, sensitivity of 0.8624, and specificity of 0.9644. Model 1.2 achieved accuracy of 0.9460, precision of 0.9302, sensitivity of 0.9072, and specificity of 0.9767. Through continuous iterative optimization, the model's classification and recognition capabilities have been gradually improved.
[0097] In this embodiment, the filtered incremental dataset is used as a data source for model parameter adjustment and optimization, thereby improving the performance of the constructed model. In the application scenario, the incremental dataset will be repeatedly filtered, and the data sample library will continuously receive the data samples generated after the filtering. The recognition model built based on the neural network achieves more stable and accurate recognition results under the continuously expanding database.
[0098] In the above embodiments, the neural network structure of the present invention is constructed using Python language, version Python 3.7, the machine learning library called is TensorFlow, and other Python libraries are called for calculation.
[0099] In one embodiment of the present invention, a water supply network leakage identification system based on time series cutting is provided, which includes:
[0100] A preprocessing module preprocesses the sample data in the sample library consisting of the collected leakage sample data and normal sample data;
[0101] The feature extraction and reconstruction module cuts the preprocessed sample data into long time series and short time series in sequence to extract the data segment features and reconstruct the feature data;
[0102] A model construction and training module uses the reconstructed feature data as input data for a constructed two-dimensional convolutional neural network model, and trains the two-dimensional convolutional neural network model to obtain a two-dimensional convolutional neural network model that can accurately identify sample data;
[0103] The recognition module filters the output results of the two-dimensional convolutional neural network model through incremental data sets. The filtered incremental data sets are used to adjust and optimize the parameters of the two-dimensional convolutional neural network model. After the two-dimensional convolutional neural network model is optimized, the recognition performance of the model is improved.
[0104] In the above embodiment, the sample data in the sample library composed of the collected leakage sample data and normal sample data is preprocessed, including:
[0105] Collect pure leakage acoustic samples under real pipe network leakage conditions, build a leakage sample noise library, and mark it as leakage;
[0106] After the leak repair is completed, the on-site environmental noise is collected, and acoustic samples of the pipeline under normal conditions are collected to build a normal sample noise library and mark it as normal;
[0107] The sample library is composed of a leakage sample noise library and a normal sample noise library, and the sample data is subjected to trend item removal, high-frequency band filtering of acoustic wave data, and abnormal data point adjustment.
[0108] In the above embodiment, the pre-processed sample data is sequentially subjected to long time series segmentation and short time series segmentation, including:
[0109] The sample data is cut into long time series, and the sample data is divided into multiple segments according to the set time series length. Each segment of the cut data is a partial interception of the original sample data, representing a sampling of the original sample data;
[0110] Each segment of data after long time series cutting is cut into short time series, and each segment of data is cut into multiple short time series segments according to the number of data points, and each short time series segment only contains the selected data points.
[0111] In the above embodiment, extracting data segment features and reconstructing feature data includes:
[0112] After feature extraction for each short time series segment, the data is reconstructed in reverse according to the time series cutting method to form a feature reconstruction matrix of the original data, which is a three-dimensional matrix.
[0113] In the above embodiment, the output results of the two-dimensional convolutional neural network model are subjected to incremental data set screening, including: adopting three scenarios to perform incremental data set screening;
[0114] The proportion of normal samples in terms of data volume is higher than that of leaked samples, which indicates an imbalance problem;
[0115] The data output by the 2D convolutional neural network model has not been manually verified or excavated on site;
[0116] The data results determined by the output of the 2D convolutional neural network model were manually confirmed and excavated on site.
[0117] In the above embodiment, the proportion of normal samples in terms of data volume is higher than the proportion of leaked samples, and the incremental data set screening includes: optimizing and selecting data whose model output is a normal sample;
[0118] Data samples whose probability is lower than the set value are directly eliminated and do not enter the incremental data set;
[0119] The data samples whose probability is determined to be in the first set interval are entered into the incremental data set;
[0120] Supplement data points at the boundary positions to enhance the model classification ability.
[0121] In the above embodiment, the data results determined by the output of the two-dimensional convolutional neural network model have not been manually confirmed or excavated on site, and the incremental data set screening includes: screening the incremental data set according to the model output results;
[0122] For samples that the model determines are leaks, the original acoustic data X is taken and the data samples whose probability values fall within the second set interval after long-term segmentation [X1 … Xm] are selected as the incremental leakage sample dataset; where Xm is the mth segment of data after long-term segmentation of the original acoustic data X.
[0123] For samples judged by the model to be normal, the original acoustic data X is taken out, and the data samples whose probability values are in the third set interval in [X1 … Xm] after long time series cutting are screened as the normal sample incremental data set.
[0124] In the above embodiment, the data results determined by the output of the two-dimensional convolutional neural network model are manually confirmed and excavated on site, and the incremental data set screening includes: screening the incremental data set based on the model output results and the actual data labels;
[0125] For samples that are judged as leaks by the model and manually confirmed as leaks, the original acoustic data X is taken and the data samples whose probability values are in the second set interval in [X1 … Xm] after long time series segmentation are selected as the incremental leakage sample dataset;
[0126] For samples that are judged as leaks by the model but manually confirmed as normal, we extract the original acoustic data X and select samples with a low 50% probability value in [X1 … Xm] after long time series segmentation as the normal sample incremental dataset;
[0127] For samples that are judged as normal by the model and manually confirmed as normal, the original acoustic data X is taken, and the data samples whose probability values are in the first set interval after long time series segmentation [X1 … Xm] are selected as the normal sample incremental data set;
[0128] For samples judged as normal by the model but manually confirmed as leaks, the original acoustic data X is taken, and samples with a high 50% probability value in [X1 … Xm] after long time series segmentation are selected as the incremental leakage sample dataset.
[0129] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.
[0130] A schematic diagram of the computing device structure provided in one embodiment of the present invention is provided. The computing device may be a terminal and may include: a processor, a communications interface, memory, a display screen, and an input device. The processor, communications interface, and memory communicate with each other via a communications bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. When executed by the processor, the computer program implements the methods described in the above embodiments. The internal memory provides an environment for the operating system and computer program in the non-volatile storage medium to run. The communications interface is used to communicate with an external terminal via wired or wireless communication. Wireless communication may be achieved via Wi-Fi, a network management provider, NFC (near field communication), or other technologies. The display screen may be a liquid crystal display or an electronic ink display. The input device may be a touchscreen covering the display screen, or may be buttons, a trackball, or a touchpad provided on the computing device housing, or may be an external keyboard, touchpad, or mouse. The processor may invoke logic instructions stored in the memory.
[0131] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0132] In one embodiment of the present invention, a computer program product is provided, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.
[0133] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage medium stores server instructions. The computer instructions enable a computer to execute the methods provided in the above embodiments.
[0134] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effects are similar to those of the above method embodiment, and will not be repeated here.
[0135] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0136] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A water supply network leakage identification method based on time series cutting, characterized in that: include: Preprocessing the sample data in the sample library consisting of the collected leakage sample data and normal sample data; The preprocessed sample data is cut into long time series and short time series in sequence to extract data segment features and reconstruct feature data; The reconstructed feature data is used as input data of the constructed two-dimensional convolutional neural network model, and the two-dimensional convolutional neural network model is trained to obtain a two-dimensional convolutional neural network model that can accurately identify sample data; The output results of the two-dimensional convolutional neural network model are filtered by incremental data sets. The filtered incremental data sets are used to adjust and optimize the parameters of the two-dimensional convolutional neural network model. After the two-dimensional convolutional neural network model is optimized, the recognition performance of the model is improved. Among them, the output results of the two-dimensional convolutional neural network model are used to screen the incremental data set, including the use of the two-dimensional convolutional neural network model output judgment data results after manual confirmation and on-site excavation scenarios to screen the incremental data set; Incremental dataset screening includes: screening incremental datasets based on the output results of the two-dimensional convolutional neural network model and actual data labels; For samples that are judged as leaks by the 2D convolutional neural network model and manually confirmed as leaks, the original acoustic data X is taken and the data samples whose probability values are in the second set interval [X1 … Xm] after long time series segmentation are selected as the incremental leakage sample dataset; For samples that are judged as leaks by the 2D convolutional neural network model but manually confirmed as normal, we extract the original acoustic data X and filter out the data samples with a low 50% probability value in [X1 … Xm] after long time series segmentation as the normal sample incremental dataset; For samples judged as normal by the 2D convolutional neural network model and manually confirmed as normal, the original acoustic data X is taken, and the data samples whose probability values are within the first set interval in [X1 … Xm] after long time series segmentation are selected as the normal sample incremental data set; For samples judged normal by the 2D convolutional neural network model but manually confirmed as leaks, the original acoustic data X is taken, and the data samples with a high 50% probability value in [X1 … Xm] after long time series segmentation are selected as the incremental leakage sample dataset.
2. The water supply network leakage identification method based on time series cutting according to claim 1 is characterized in that: The sample data in the sample library composed of the collected leakage sample data and normal sample data is preprocessed, including: Under the actual pipe network leakage state, pure leakage acoustic samples, i.e. leakage sample data, are collected, a leakage sample noise library is constructed, and the samples are marked as leakage. After the leak repair is completed, the on-site environmental noise is collected, and acoustic samples of the pipeline under normal conditions are collected, that is, normal sample data, and a normal sample noise library is constructed and marked as normal; The sample library is composed of a leakage sample noise library and a normal sample noise library, and the sample data is subjected to trend item removal, high-frequency band filtering of acoustic wave data, and abnormal data point adjustment.
3. The water supply network leakage identification method based on time series cutting according to claim 1 is characterized in that: The preprocessed sample data is cut into long time series and short time series in sequence, including: The preprocessed sample data is cut into long time series, and the preprocessed sample data is divided into multiple segments according to the set time series length. Each segment of the cut data is a partial interception of the preprocessed sample data, representing a sampling of the preprocessed sample data; Each segment of data after long time series cutting is cut into short time series, and each segment of data is cut into multiple short time series segments according to the number of data points, and each short time series segment only contains the selected data points.
4. The water supply network leakage identification method based on time series cutting according to claim 3 is characterized in that: Extract data segment features and reconstruct feature data, including: After feature extraction for each short time series segment, the data is reconstructed in reverse according to the time series cutting method to form a feature reconstruction matrix of the original data, which is a three-dimensional matrix.
5. The water supply network leakage identification method based on time series cutting according to claim 1 is characterized in that: The output results of the two-dimensional convolutional neural network model are subjected to incremental data set screening, and the incremental data set screening is also carried out in the following two scenarios; The proportion of normal samples in terms of data volume is higher than that of leaked samples, which indicates data imbalance. The data results determined by the output of the two-dimensional convolutional neural network model have not been manually confirmed or subjected to on-site excavation.
6. The water supply network leakage identification method based on time series cutting according to claim 5 is characterized in that: The proportion of normal samples in terms of data volume is higher than the proportion of leaked samples. The incremental data set screening includes: optimizing the selection of data whose model output is normal samples; Data samples whose probability is lower than the set value are directly eliminated and do not enter the incremental data set; The data samples whose probability is determined to be in the first set interval are entered into the incremental data set; Supplement data points at the boundary positions to enhance the model classification ability.
7. The water supply network leakage identification method based on time series cutting according to claim 5 is characterized in that: The data results determined by the output of the two-dimensional convolutional neural network model have not been manually confirmed or excavated on site. The incremental data set screening includes: screening the incremental data set according to the output results of the two-dimensional convolutional neural network model; For samples identified as leaks by the 2D convolutional neural network model, the original acoustic data X is taken and the data samples whose probability values fall within the second set interval after long-term segmentation [X1 … Xm] are selected as the incremental leakage sample dataset; where Xm is the mth segment of data after long-term segmentation of the original acoustic data X. For samples judged as normal by the two-dimensional convolutional neural network model, the original acoustic data X is taken out, and the data samples whose probability values are in the third set interval in [X1 … Xm] after long time series cutting are screened as the normal sample incremental data set.
8. A water supply network leakage identification system based on time series cutting, used to implement the water supply network leakage identification method based on time series cutting as claimed in any one of claims 1 to 7, characterized in that: include: A preprocessing module preprocesses the sample data in the sample library consisting of the collected leakage sample data and normal sample data; The feature extraction and reconstruction module cuts the preprocessed sample data into long time series and short time series in sequence to extract the data segment features and reconstruct the feature data; A model construction and training module uses the reconstructed feature data as input data for a constructed two-dimensional convolutional neural network model, and trains the two-dimensional convolutional neural network model to obtain a two-dimensional convolutional neural network model that can accurately identify sample data; The recognition module filters the output results of the two-dimensional convolutional neural network model through incremental data sets. The filtered incremental data sets are used to adjust and optimize the parameters of the two-dimensional convolutional neural network model. After the two-dimensional convolutional neural network model is optimized, the recognition performance of the model is improved.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 7 .
10. A computing device, characterized in that include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods according to claims 1 to 7.
Citation Information
Patent Citations
Abnormal sound detection method based on a plurality of convolutional neural network models
CN110189769A
Pipeline leakage detection method and device, electronic equipment and storage medium
CN117332324A