Pipe burst detection method based on bidirectional LSTM auto-encoder

By using a bidirectional LSTM autoencoder model to preprocess and feature extraction of high-frequency pressure data in the explosion tube detection technology, the problem of low sensitivity in the existing technology is solved, and accurate identification and timely early warning of pressure transient events in the water supply pipeline network is achieved, and the sensitivity and accuracy of explosion tube detection is improved.

CN120067565AActive Publication Date: 2025-05-30TONGJI UNIV +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510027090.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-30
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The existing burst detection technology has low sensitivity when processing high-frequency pressure data, making it difficult to capture pressure transients caused by burst events in time, and lacks effective identification and extraction of burst data characteristics.

Method used

The high-frequency pressure data is preprocessed and feature extracted by a bidirectional LSTM autoencoder model, and the high-frequency pressure components are separated by discrete wavelet transformation. The data sequence is reconstructed using a bidirectional LSTM network to calculate the reconstruction error to determine the threshold value. When the reconstruction error exceeds the threshold value, a burst alarm is issued.

Benefits of technology

It realizes accurate identification and timely warning of pressure transient events in the water supply pipeline network, improves the sensitivity and accuracy of explosive pipe detection, and ensures water supply safety and emergency repair efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067565A_ABST
    Figure CN120067565A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a pipe burst detection method based on a bidirectional LSTM auto-encoder, and the method comprises the steps: carrying out the preprocessing of real-time high-frequency pressure data of a monitoring point, and constructing a peak feature sequence data set of the real-time high-frequency pressure data; performing high and low frequency separation on the peak characteristic sequence data set by adopting discrete wavelet transform, and extracting a high-frequency pressure component to obtain a high-frequency pressure component data set; building a bidirectional LSTM auto-encoder model, and dividing the high-frequency pressure component data set into a training set and a test set; training the model by using a training set, reconstructing a data sequence of the training set, calculating a reconstruction error of the training set, and determining a reconstruction error threshold value according to the reconstruction error; and processing the test set by using the trained model, reconstructing a data sequence of the test set, calculating a reconstruction error of the test set, and giving a pipe explosion alarm when the reconstruction error is greater than or equal to a reconstruction error threshold value. In this way, the real-time high-frequency pressure data can be utilized, pipe explosion early warning can be conducted in time, and the pipe explosion detection effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the cross - technical field of the operation status diagnosis of water supply pipe networks and deep learning, and particularly to a pipe burst detection method based on a bidirectional LSTM auto - encoder. Background Art

[0002] During the long - term operation of urban water supply pipe networks, they will be gradually aged due to the cumulative effects of related external environments such as structural fatigue, pipe corrosion, ground settlement movement, and third - party factors (such as surface loads). This will further lead to the problem of pipe bursts in pressurized pipes, which will not only cause a large amount of tap water loss in a short time but also may damage the urban environment and pollute the drinking water quality. In 2022, the Ministry of Housing and Urban - Rural Development and the National Development and Reform Commission jointly issued the "Notice on Strengthening the Leakage Control of Public Water Supply Pipe Networks", clearly proposing to build an accurate, efficient, safe, and long - term water supply pipe network leakage control system, and emphasizing the improvement of informationization and intelligent management levels. Based on this background, conducting research on the rapid detection of pipe burst events in water supply pipe networks can provide important support for timely repairing pipe bursts, reducing tap water loss, and ensuring water supply safety.

[0003] Currently, the Supervisory Control and Data Acquisition (SCADA) system has been widely used in the urban water supply field. The SCADA system can obtain key data such as the flow rate and pressure of the pipe network in real - time, realize the comprehensive monitoring of the operation status of the pipe network, and provide rich data support for the detection of pipe burst events. At present, some relatively effective means for detecting pipe burst events have been developed at home and abroad based on SCADA data, combined with methods such as data mining and hydraulic simulation. However, these methods still have the following limitations: (1) Most of the existing studies use 5 - 15 - minute steady - state pressure data. Although pressure changes caused by slow leakage events, valve operations, etc. can be detected within a few minutes or hours, pipe burst events often cause pressure transients within a few seconds. If steady - state data is used for detection, the detection result of pipe bursts will be lagged and the detection sensitivity will be low. (2) With the popularization and application of high - frequency pressure sensors, some studies have begun to analyze transient monitoring data to detect pipe burst events, such as using multi - scale wavelet analysis, short - time Fourier transform and other methods to detect pipe burst events. However, at present, there is less research experience on high - frequency data of large and complex pipe networks, and there is also a lack of attention to the identification and extraction of the characteristics of pipe burst data itself. In summary, although there have been a large number of studies on pipe burst detection, the existing pipe burst detection technologies are still not effective enough to meet the actual needs. Summary of the Invention

[0004] In a first aspect, an embodiment of the present invention provides a pipe burst detection method based on a bidirectional LSTM auto - encoder, and the method includes:

[0005] Preprocess the real-time high-frequency pressure data of the monitoring points to construct a peak feature sequence dataset of the real-time high-frequency pressure data;

[0006] Use discrete wavelet transform to separate the high and low frequencies of the peak feature sequence dataset, extract the high-frequency pressure component, and obtain the high-frequency pressure component dataset;

[0007] Build a bidirectional LSTM autoencoder model, and divide the high-frequency pressure component dataset into a training set and a test set;

[0008] Use the training set to train the bidirectional LSTM autoencoder model, reconstruct the data sequence of the training set, calculate the reconstruction error of the training set, and determine the reconstruction error threshold based on this;

[0009] Use the trained bidirectional LSTM autoencoder model to process the test set, reconstruct the data sequence of the test set, calculate the reconstruction error of the test set, and issue a pipe burst alarm when it exceeds the reconstruction error threshold.

[0010] In some implementable ways of the first aspect, preprocessing the real-time high-frequency pressure data of the monitoring points to construct a peak feature sequence dataset of the real-time high-frequency pressure data includes:

[0011] Extract the original high-frequency pressure monitoring dataset of 256Hz at the monitoring points during the period to be detected;

[0012] Clean the original high-frequency pressure monitoring dataset and process duplicate, missing, and abnormal data;

[0013] Perform wavelet denoising on the cleaned high-frequency pressure monitoring dataset;

[0014] Resample and extract features from the denoised high-frequency pressure monitoring dataset to construct a one-dimensional time series dataset containing transient features, that is, the peak feature sequence dataset.

[0015] In some implementable ways of the first aspect, cleaning the original high-frequency pressure monitoring dataset and processing duplicate, missing, and abnormal data includes:

[0016] If there are duplicate or disordered timestamps in the monitoring point pressure data in the original high-frequency pressure monitoring dataset, delete the data at the repeated moments during the corresponding period to ensure the correct timestamp;

[0017] If there is a short-term missing value in the monitoring point pressure data in the original high-frequency pressure monitoring dataset, perform linear interpolation on the monitoring point pressure data during the corresponding period to fill in the missing value;

[0018] If there is a long-term absence of pressure data at the monitoring points in the original high-frequency pressure monitoring dataset, the pressure data of the monitoring points at the same time on the previous day is used for replacement;

[0019] Taking the pressure data of the monitoring points under normal working conditions as a reference, high and low thresholds are set to remove the abnormal pressure data of the monitoring points in the original high-frequency pressure monitoring dataset.

[0020] In some implementable ways of the first aspect, wavelet denoising processing is performed on the cleaned high-frequency pressure monitoring dataset, including:

[0021] Performing multi-level discrete wavelet transform on the cleaned high-frequency pressure monitoring dataset, using the db4 wavelet basis function, and performing decomposition with the soft threshold function and the VisuShrink universal threshold:

[0022]

[0023] where T is the VisuShrink universal threshold; N is the length of the original signal; d j,k is the k-th wavelet coefficient at the j-th decomposition scale in the discrete wavelet transform; is the wavelet coefficient processed by the soft threshold function;

[0024] Observing the signals after each level of discrete wavelet decomposition, when the effective signal is smooth and no high-frequency signal is decomposed, determine the corresponding wavelet decomposition level k as the level of wavelet denoising each time;

[0025] Performing k-level reconstruction on the wavelet coefficients to obtain the denoised high-frequency pressure monitoring dataset.

[0026] In some implementable ways of the first aspect, resampling and feature extraction are performed on the denoised high-frequency pressure monitoring dataset to construct a one-dimensional time series dataset containing transient features, including:

[0027] Resampling the 256Hz pressure data in the denoised high-frequency pressure monitoring dataset, and extracting the maximum value p within 1s max and the minimum value p min ;

[0028] Calculating the median value p of each time subsequence with a length of 1s std as the reference value;

[0029] Constructing a new variable p of the pressure peak feature per second based on the following formula value to obtain a one-dimensional time series dataset containing transient features with a frequency of 1s;

[0030]

[0031] where pmax is the maximum pressure per second, p min is the minimum pressure per second, p std is the median pressure per second.

[0032] In some implementations of the first aspect, discrete wavelet transform is used to separate high and low frequencies of the peak feature sequence data set, extract high-frequency pressure components, and obtain a high-frequency pressure component data set, including:

[0033] The original pressure peak feature column vector P in the peak feature sequence data set is subjected to multi-level discrete wavelet transform. The wavelet basis function adopts db4, and the decomposition level k is taken as 1 / 2 of the maximum decomposition level. Through k-level wavelet decomposition, an approximate coefficient f and k detail coefficients w are obtained respectively. i ;

[0034] Keep the approximate coefficient f and set the detail coefficients w at all levels i Set to 0, perform k-level wavelet reconstruction, and obtain the reconstructed low-frequency pressure column vector P';

[0035] The difference between the original pressure peak feature column vector P and the reconstructed low-frequency pressure column vector P' is calculated, and based on this, a high-frequency pressure component data set is obtained.

[0036] In some possible implementations of the first aspect, a bidirectional LSTM autoencoder model is constructed, and a high-frequency pressure component dataset is divided into a training set and a test set, including:

[0037] An autoencoder model was established, in which both the encoder and decoder were BiLSTM networks. The number of units in the LSTM layer of the BILSTM network was 32, the window size was 300, the number of features at each time point was 1, and the activation function was ReLU.

[0038] The high-frequency pressure component data set is divided into a subsequence set with a length of 5 minutes;

[0039] Select 80% of the subsequences as the training set, and the remaining 20% ​​of the subsequences as the test set;

[0040] All 5-min subsequences in the training set were preliminarily screened to remove abnormal subsequences;

[0041] Min-Max normalization is performed on the training set and test set based on the following formula;

[0042]

[0043] Among them, x min is the minimum value in the original data, x max is the maximum value in the original data, x norm is the normalized value.

[0044] In some realizable ways of the first aspect, all 5-minute subsequences in the training set are preliminarily screened to eliminate abnormal subsequences, including:

[0045] Calculate the range of each 5-minute subsequence in the training set;

[0046] Calculate the mean μ of the ranges i and the standard deviation σ i ;

[0047] Screen out the subsequences in the training set with ranges greater than μ i + 3σ i and eliminate them.

[0048] In some realizable ways of the first aspect, use the training set to train the bidirectional LSTM autoencoder model, reconstruct the data sequence of the training set, calculate the reconstruction error of the training set, and determine the reconstruction error threshold based on this, including:

[0049] Input the training set into the bidirectional LSTM autoencoder model to train it, where the Adam optimizer is used, the learning rate is set to 0.0001, the batch size is set to 32, the number of iterations is set to 50, and the loss function is set to the mean squared error MSE;

[0050]

[0051] where n is the number of samples; y i is the reconstructed value; is the true value;

[0052] Take the mean squared error MSE as the reconstruction error RE, and take μ + 2σ of the training set reconstruction error distribution as the reconstruction error threshold.

[0053] In some realizable ways of the first aspect, use the trained bidirectional LSTM autoencoder model to process the test set, reconstruct the data sequence of the test set, calculate the reconstruction error of the test set, and issue a pipe burst alarm when it exceeds the reconstruction error threshold, including:

[0054] Input the test set into the trained bidirectional LSTM autoencoder model, which reconstructs the data sequence of the test set, and calculate the reconstruction error of each subsequence of the test set;

[0055] If the reconstruction error of the subsequence is less than the reconstruction error threshold, it means that the pressure data during the corresponding time period is normal and no pipe burst has occurred; if the reconstruction error of the subsequence is greater than or equal to the reconstruction error threshold, it means that the pressure data has transient during the corresponding time period and a pipe burst has occurred, and then issue a pipe burst alarm.

[0056] Second aspect, an embodiment of the present invention provides a burst pipe detection device based on a bidirectional LSTM autoencoder, the device includes:

[0057] A preprocessing module, configured to preprocess the real-time high-frequency pressure data of the monitoring point, and construct a peak feature sequence data set of the real-time high-frequency pressure data;

[0058] An extraction module, configured to perform high-low frequency separation on the peak feature sequence data set by using discrete wavelet transform, extract the high-frequency pressure component, and obtain a high-frequency pressure component data set;

[0059] A building module, configured to build a bidirectional LSTM autoencoder model, and divide the high-frequency pressure component data set into a training set and a test set;

[0060] A training module, configured to use the training set to train the bidirectional LSTM autoencoder model, reconstruct the data sequence of the training set, calculate the reconstruction error of the training set, and determine the reconstruction error threshold based on this;

[0061] A processing module, configured to use the trained bidirectional LSTM autoencoder model to process the test set, reconstruct the data sequence of the test set, calculate the reconstruction error of the test set, and issue a burst pipe alarm when it exceeds the reconstruction error threshold.

[0062] Third aspect, an embodiment of the present invention provides an electronic device, the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.

[0063] Fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to cause a computer to execute the method as described above.

[0064] In summary, according to the embodiments of the present invention, at least the following technical effects are achieved:

[0065] (1) Since pressure monitoring does not require expensive equipment and relatively stable monitoring data is easily obtained, and with the continuous progress of hardware and storage technologies, the sampling frequency can be further increased. Some regions at home and abroad have begun to use high-frequency monitoring equipment to collect data, greatly expanding the application space for burst pipe detection based on high-frequency pressure data. The present invention samples and analyzes high-frequency pressure data, which can more accurately reflect the instantaneous change of pressure in the water supply network, sensitively capture the pressure transient generated by burst pipe events, ensure the real-time detection, and save time for subsequent emergency repairs.

[0066] (2) The present invention extracts the high-frequency components of the pressure caused by pipe bursts through wavelet transform, which can specifically isolate the pressure characteristics brought about by pipe bursts, avoiding the influence of pressure fluctuations caused by the change of normal residential water demand on the pressure change of pipe bursts, and ensuring the accuracy of the detection results.

[0067] (3) The present invention uses an autoencoder based on bidirectional LSTM and introduces a second layer of reverse LSTM units to expand the traditional unidirectional network, which can make full use of past and future sequence information to complete the reconstruction of most normal sequences; for a very small number of abnormal sequences, it is difficult for the model to mine their patterns and the reconstruction error is relatively large, so they are accurately identified as pressure transient events caused by pipe bursts. This method has strong non-linear modeling ability, can better adapt to complex abnormal patterns, and can detect pressure transient events with little change in amplitude, further improving the sensitivity of detection.

[0068] It should be understood that the content described in the Summary of the Invention section is not intended to limit the key or important features of the embodiments of the present invention, nor to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Brief Description of the Drawings

[0069] Combined with the accompanying drawings and referring to the following detailed description, the above and other features, advantages and aspects of the embodiments of the present invention will become more obvious. The drawings are used to better understand the present invention and do not constitute a limitation to the present invention. In the drawings, the same or similar reference numerals represent the same or similar elements, where:

[0070] Figure 1 is a flowchart of a pipe burst detection method based on a bidirectional LSTM autoencoder provided by an embodiment of the present invention;

[0071] Figure 2 is a schematic diagram of the peak feature sequence data set obtained after data preprocessing at a certain monitoring point provided by an embodiment of the present invention;

[0072] Figure 3 is a schematic diagram of the high-frequency pressure component after discrete wavelet transform at a certain monitoring point provided by an embodiment of the present invention;

[0073] Figure 4 is a schematic diagram of the loss statistics of the pressure data at a certain monitoring point during the model training process provided by an embodiment of the present invention;

[0074] Figure 5 is a schematic diagram of the reconstruction error distribution and reconstruction error threshold of the training set at a certain monitoring point provided by an embodiment of the present invention;

[0075] Figure 6 is a structural diagram of a pipe burst detection device based on a bidirectional LSTM autoencoder provided by an embodiment of the present invention;

[0076] Figure 7 It is a structural diagram of an exemplary electronic device capable of implementing the embodiments of the present invention. Detailed implementation manners

[0077] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0078] In addition, the term "and / or" in the present invention is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present invention generally represents an "or" relationship between the associated objects before and after.

[0079] To solve the technical problems in the background art, the embodiments of the present invention provide a burst pipe detection method, device, equipment and storage medium based on a bidirectional LSTM autoencoder. Specifically, preprocess the real-time high-frequency pressure data at the monitoring point to construct a peak feature sequence data set of the real-time high-frequency pressure data; use discrete wavelet transform to separate the high and low frequencies of the peak feature sequence data set, extract the high-frequency pressure component to obtain a high-frequency pressure component data set; build a bidirectional LSTM autoencoder model, and divide the high-frequency pressure component data set into a training set and a test set; use the training set to train the model, reconstruct the data sequence of the training set, calculate the reconstruction error of the training set, and determine the reconstruction error threshold based on this; use the trained model to process the test set, reconstruct the data sequence of the test set, calculate the reconstruction error of the test set, and issue a burst pipe alarm when it is greater than or equal to the reconstruction error threshold.

[0080] In this way, the real-time high-frequency pressure data can be used to perform burst pipe early warning in a timely manner. In addition, the present invention has strong non-linear modeling ability, can better adapt to complex abnormal patterns, and can also detect pressure transient events with little change in amplitude, making the detection result more accurate.

[0081] The following will combine the accompanying drawings to detail a burst pipe detection method, device, equipment and storage medium based on a bidirectional LSTM autoencoder provided by the embodiments of the present invention through specific embodiments.

[0082] Figure 1The flowchart of a burst pipe detection method based on a bidirectional LSTM autoencoder provided by an embodiment of the present invention is as follows. Figure 1 As shown, the burst pipe detection method 100 may include:

[0083] S110, preprocess the real-time high-frequency pressure data of the monitoring point to construct a peak feature sequence dataset of the real-time high-frequency pressure data.

[0084] Extract the original high-frequency pressure monitoring dataset of 256Hz at the monitoring point within the time period to be detected.

[0085] Clean the original high-frequency pressure monitoring dataset to process duplicate, missing, and abnormal data.

[0086] Specifically:

[0087] If there are duplicate or disordered timestamps in the monitoring point pressure data in the original high-frequency pressure monitoring dataset, delete the data at the repeated moments within the corresponding time period to ensure the correct timestamp; if there is a short-time (<5min) missing in the monitoring point pressure data in the original high-frequency pressure monitoring dataset, perform linear interpolation on the monitoring point pressure data within the corresponding time period to fill in the missing values; if there is a long-time missing in the monitoring point pressure data in the original high-frequency pressure monitoring dataset, replace it with the monitoring point pressure data at the same moment of the previous day; set high and low thresholds with reference to the monitoring point pressure data under normal working conditions to remove abnormal monitoring point pressure data in the original high-frequency pressure monitoring dataset.

[0088] Perform wavelet denoising on the cleaned high-frequency pressure monitoring dataset. Specifically:

[0089] Perform multi-level discrete wavelet transform on the cleaned high-frequency pressure monitoring dataset, use the db4 wavelet basis function, and perform decomposition using the soft threshold function and the VisuShrink universal threshold:

[0090]

[0091] where T is the VisuShrink universal threshold; N is the length of the original signal; d j,k is the k-th wavelet coefficient at the j-th decomposition scale in the discrete wavelet transform; is the wavelet coefficient processed by the soft threshold function.

[0092] Then observe the signals after each level of discrete wavelet decomposition. When the effective signal is smooth and no high-frequency signal is decomposed, determine the corresponding wavelet decomposition level k as the level of wavelet denoising each time. Thereafter, perform k-level reconstruction on the wavelet coefficients to obtain the denoised high-frequency pressure monitoring dataset.

[0093] Resample the denoised high-frequency pressure monitoring dataset and perform feature extraction to construct a one-dimensional time series dataset containing transient features, that is, the peak feature sequence dataset. Specifically:

[0094] Resample the 256Hz pressure data in the denoised high-frequency pressure monitoring dataset, and extract the maximum value p within 1s max and the minimum value p min , then calculate the median value p of each time subsequence with a length of 1s std as the reference value, and construct a new variable p of the pressure peak feature per second based on the following formula value , obtaining a one-dimensional time series dataset containing transient features with a frequency of 1s.

[0095]

[0096] Among them, p max is the maximum pressure per second, p min is the minimum pressure per second, and p std is the median pressure within each second.

[0097] S120. Use discrete wavelet transform to separate the high and low frequencies of the peak feature sequence dataset, and extract the high-frequency pressure component to obtain the high-frequency pressure component dataset.

[0098] Perform multi-level discrete wavelet transform on the original pressure peak feature column vector P in the peak feature sequence dataset. The wavelet basis function is db4, and the decomposition level k takes 1 / 2 of the maximum decomposition level. Through k-level wavelet decomposition, 1 approximation coefficient f and k detail coefficients w are obtained respectively i .

[0099] Retain the approximation coefficient f, and set each level of detail coefficient w i to 0, and perform k-level wavelet reconstruction to obtain the reconstructed low-frequency pressure column vector P'.

[0100] Calculate the difference between the original pressure peak feature column vector P and the reconstructed low-frequency pressure column vector P', and based on this, obtain the high-frequency pressure component dataset.

[0101] S130. Build a bidirectional LSTM autoencoder model, and divide the high-frequency pressure component dataset into a training set and a test set.

[0102] Build an autoencoder model, where both the encoder and the decoder are BiLSTM networks. The number of units in the LSTM layer in the BILSTM network is 32, the window size window_size is 300, the number of features per time point input_dim is 1, and the activation function is ReLU.

[0103] Divide the high-frequency pressure component dataset into a set of subsequences with a length of 5 minutes. Select 80% of the subsequences as the training set and the remaining 20% as the test set.

[0104] Conduct a preliminary screening on all 5-minute subsequences in the training set to eliminate abnormal subsequences. Specifically:

[0105] Calculate the range R of each 5-minute subsequence in the training set i , calculate the mean μ of the ranges i and the standard deviation σ i . Screen out the subsequences in the training set with a range greater than μ i +3σ i and eliminate them.

[0106] Perform Min-Max normalization on the training set and the test set based on the following formula:

[0107]

[0108] where x min is the minimum value in the original data, x max is the maximum value in the original data, and x norm is the normalized value.

[0109] S140. Use the training set to train the bidirectional LSTM autoencoder model, reconstruct the data sequence of the training set, calculate the reconstruction error of the training set, and determine the reconstruction error threshold based on this.

[0110] Input the training set into the bidirectional LSTM autoencoder model to train it. Among them, the Adam optimizer is used, the learning rate learning_rate = 0.0001, the batch size batch_size = 32, the number of iterations epochs = 50, and the loss function is set to the mean squared error MSE.

[0111]

[0112] where n is the number of samples; y i is the reconstructed value; is the true value.

[0113] Take the mean squared error MSE as the reconstruction error RE, and take μ + 2σ (95.4%) of the reconstruction error distribution of the training set as the reconstruction error threshold.

[0114] S150. Use the trained bidirectional LSTM autoencoder model to process the test set, reconstruct the data sequence of the test set, calculate the reconstruction error of the test set, and issue a pipe burst alarm when it exceeds the reconstruction error threshold.

[0115] Input the test set into the trained bidirectional LSTM autoencoder model, and let it reconstruct the data sequence of the test set to calculate the reconstruction error of each subsequence in the test set.

[0116] If the reconstruction error of the subsequence is less than the reconstruction error threshold, it indicates that the pressure data during the corresponding time period is normal and no pipe burst has occurred; if the reconstruction error of the subsequence is greater than or equal to the reconstruction error threshold, it indicates that the pressure data has transient changes during the corresponding time period and a pipe burst has occurred, and then a pipe burst alarm is issued.

[0117] In summary, according to the embodiments of the present invention, at least the following technical effects are achieved:

[0118] (1) Since pressure monitoring does not require expensive equipment and it is easy to obtain relatively stable monitoring data, and with the continuous progress of hardware and storage technologies, the sampling frequency can be further increased. In some regions at home and abroad, high-frequency monitoring equipment has been used to collect data, greatly expanding the application space for pipe burst detection based on high-frequency pressure data. The present invention samples and analyzes high-frequency pressure data, which can more accurately reflect the instantaneous changes in pressure in the water supply network, sensitively capture the pressure transients caused by pipe burst events, ensure the real-time detection, and save time for subsequent emergency repairs.

[0119] (2) The present invention extracts the high-frequency components of the pressure caused by pipe burst through wavelet transform, which can specifically separate the pressure characteristics brought by pipe burst, avoiding the influence of pressure fluctuations caused by the normal water demand changes of residents on the pressure changes during pipe burst, and ensuring the accuracy of the detection results.

[0120] (3) The present invention uses an autoencoder based on bidirectional LSTM, introducing a second layer of reverse LSTM units to expand the traditional unidirectional network, which can make full use of the sequence information of the past and the future to complete the reconstruction of most normal sequences; while for very few abnormal sequences, it is difficult for the model to mine their patterns and the reconstruction error is relatively large, thus accurately identifying them as pressure transient events caused by pipe burst. This method has strong non-linear modeling ability, can better adapt to complex abnormal patterns, and can also detect pressure transient events with little amplitude change, further improving the sensitivity of detection.

[0121] For the sake of easy understanding, the following takes the example of detecting whether a pressure transient event occurred at a monitoring point in the water supply network of City N on December 6, 2023, to further elaborate on the implementation process of the pipe burst detection method 100 based on the bidirectional LSTM autoencoder.

[0122] (1) Preprocess the real-time high-frequency pressure data of a single monitoring point to construct a peak feature sequence dataset of real-time high-frequency pressure data. First, extract the 256Hz original high-frequency pressure monitoring dataset of the monitoring point to be detected (December 2, 2023 to December 6, 2023, a total of 5 days). Clean the original high-frequency pressure monitoring dataset, delete the data of repeated moments in this time period, perform linear interpolation on the monitoring point pressure data with short-term (<5min) missing, replace the monitoring point pressure data with long-term missing with the monitoring point pressure data of the same moment of the previous day, and finally remove the abnormal monitoring point pressure data above 100m and below 1m. Then perform multi-level discrete wavelet transform on the cleaned high-frequency pressure monitoring dataset, use db4 as the wavelet basis function, take 5 as the wavelet decomposition level, use soft threshold function and VisuShrink universal threshold to process the wavelet coefficients, and then perform 5-level reconstruction to obtain the effective high-frequency pressure monitoring dataset after noise reduction. Finally, the 256Hz pressure data in the effective high-frequency pressure monitoring data set is resampled to extract the maximum and minimum values ​​within 1s, and a one-dimensional pressure time series data set containing transient characteristics is constructed based on the difference between the peak value and the baseline median value, that is, the peak feature sequence data set. For example, the peak feature sequence data set can be as follows Figure 2 As shown, it is a pressure data set with a frequency of 1s and transient features.

[0123] (2) Use discrete wavelet transform to separate high and low frequencies of the peak feature sequence data set, extract high-frequency pressure components, and obtain a high-frequency pressure component data set. The maximum level of wavelet decomposition of the original pressure peak feature column vector P in the peak feature sequence data set is 12, so it is subjected to 6-level wavelet decomposition to obtain 1 approximate coefficient and 6 detail coefficients. After setting the detail coefficients to 0, a 6-level wavelet reconstruction is performed. The difference between the original pressure peak feature column vector P and the reconstructed low-frequency pressure column vector P' is the high-frequency pressure component H of the monitoring point. For example, it can be as follows Figure 3 As shown, the high-frequency pressure component data set is obtained.

[0124] (3) Build a bidirectional LSTM autoencoder model and divide the high-frequency pressure component dataset into a training set and a test set. The number of units in the LSTM layer in the BiLSTM network is set to 32, the window size window_size is set to 300, the number of features input_dim at each time point is 1, and the activation function is set to ReLU. The high-frequency pressure component dataset is divided into a set of subsequences with a length of 5 minutes. The 1152 5-minute subsequences of the first 4 days are set as the training set, and the 288 5-minute subsequences of the last day are set as the test set. Then, all subsequences in the training set are preliminarily screened to remove abnormal subsequences, and finally the training set and test set are Min-Max normalized.

[0125] (4) Use the training set to train the bidirectional LSTM autoencoder model, reconstruct the data sequence of the training set, and calculate the reconstruction error and threshold of the training set. The model training uses the Adam optimizer, the learning rate learning_rate is set to 0.0001, the batch size batch_size is set to 32, the number of iterations epochs is set to 50, and the loss function is set to mean squared error MSE. At the same time, take the mean squared error MSE as the reconstruction error RE, and take μ + 2σ (95.4%) of the reconstruction error distribution of the training set as the reconstruction error threshold, and the value here is 0.00759. Exemplarily, Figure 4 shows the loss statistics during the model training process; Figure 5 shows the reconstruction error distribution and reconstruction error threshold of the training set.

[0126] (5) Use the trained bidirectional LSTM autoencoder model to process the test set, reconstruct the data sequence of the test set, calculate the reconstruction error of the test set, and issue a burst pipe alarm when it exceeds the reconstruction error threshold. Input the test set into the trained bidirectional LSTM autoencoder model, and let it reconstruct the data sequence of the test set. Similarly, calculate the reconstruction error of each subsequence according to the mean squared error MSE. The reconstruction error of the 145th subsequence in the test set is 1.47e+41, which is much larger than the set reconstruction error threshold, indicating that a pressure transient event occurred during the period from 12:00 to 12:05 on December 6, 2023, and then a burst pipe alarm is issued.

[0127] To verify the accuracy of the detection result, the present invention uses the detection result to compare with the actual water discharge experiment record to verify the accuracy of the method. According to the experiment record, the water company conducted a water discharge experiment through the valve switch around 12:00 on December 6, 2023, generating a pressure transient event, which is completely consistent with the detection result of the present invention.

[0128] In view of this, the present invention can accurately detect the pressure transient events occurring in the water supply pipe network and issue burst pipe early warnings in a timely manner, which is of great significance for burst pipe repair and ensuring water supply safety.

[0129] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0130] The above is the introduction of method embodiments. The following further illustrates the solution of the present invention through device embodiments.

[0131] Figure 6 FIG. is a structural diagram of a pipe burst detection device based on a bidirectional LSTM autoencoder provided by an embodiment of the present invention. As Figure 6 shown, the pipe burst detection device 600 may include:

[0132] A preprocessing module 610, configured to preprocess the real-time high-frequency pressure data of the monitoring point and construct a peak feature sequence data set of the real-time high-frequency pressure data.

[0133] An extraction module 620, configured to perform high-low frequency separation on the peak feature sequence data set by using discrete wavelet transform, extract the high-frequency pressure component, and obtain a high-frequency pressure component data set.

[0134] A building module 630, configured to build a bidirectional LSTM autoencoder model and divide the high-frequency pressure component data set into a training set and a test set.

[0135] A training module 640, configured to train the bidirectional LSTM autoencoder model by using the training set, reconstruct the data sequence of the training set, calculate the reconstruction error of the training set, and determine the reconstruction error threshold based on this.

[0136] A processing module 650, configured to process the test set by using the trained bidirectional LSTM autoencoder model, reconstruct the data sequence of the test set, calculate the reconstruction error of the test set, and issue a pipe burst alarm when it exceeds the reconstruction error threshold.

[0137] It can be understood that Figure 6 each module / unit in the pipe burst detection device 600 shown has the function of implementing Figure 1 each step in the pipe burst detection method 100 shown, and can achieve its corresponding technical effects. For the sake of brevity, it will not be elaborated here.

[0138] Figure 7 FIG. is a structural diagram of an exemplary electronic device capable of implementing an embodiment of the present invention. The electronic device 700 is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device 700 may also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown in the present invention, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present invention described and / or claimed in the present invention.

[0139] AsFigure 7 As shown, the electronic device 700 may include a computing unit 701, which may perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0140] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disc, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0141] The computing unit 701 may be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 701 executes the various methods and processes described above, such as method 100. For example, in some embodiments, method 100 may be implemented as a computer program product, including a computer program, which is tangibly contained in a computer-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of method 100 described above may be executed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute method 100 in any other appropriate manner (e.g., by means of firmware).

[0142] The various embodiments described above in the present invention can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0143] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.

[0144] In the context of the present invention, a computer-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a computer-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0145] It should be noted that the present invention also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute method 100 and achieve the corresponding technical effects achieved by the method of the embodiments of the present invention. For the sake of concise description, it will not be elaborated herein.

[0146] In addition, the present invention also provides a computer program product, which includes a computer program that implements method 100 when executed by a processor.

[0147] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present invention can be achieved, and the present invention is not limited herein.

[0148] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A burst pipe detection method based on a bidirectional LSTM autoencoder, characterized in that: The method comprises: Preprocess the real-time high-frequency pressure data of the monitoring points to construct a peak feature sequence data set of the real-time high-frequency pressure data; The discrete wavelet transform is used to separate the high and low frequencies of the peak feature sequence data set, extract the high-frequency pressure component, and obtain the high-frequency pressure component data set; Build a bidirectional LSTM autoencoder model and divide the high-frequency pressure component dataset into a training set and a test set; Use the training set to train the bidirectional LSTM autoencoder model, reconstruct the training set data sequence, calculate the reconstruction error of the training set, and use this to determine the reconstruction error threshold; The trained bidirectional LSTM autoencoder model is used to process the test set, reconstruct the test set data sequence, calculate the reconstruction error of the test set, and issue a pipe burst alarm when the error is greater than or equal to the reconstruction error threshold.

2. The method according to claim 1, characterized in that The preprocessing of the real-time high-frequency pressure data of the monitoring points to construct a peak feature sequence data set of the real-time high-frequency pressure data includes: Extract the 256Hz original high-frequency pressure monitoring data set of the monitoring point within the time period to be detected; Clean the original high-frequency pressure monitoring data set and process duplicate, missing, and abnormal data; Perform wavelet denoising on the cleaned high-frequency pressure monitoring data set; The high-frequency pressure monitoring dataset after denoising is resampled and features are extracted to construct a one-dimensional time series dataset containing transient features, namely, a peak feature sequence dataset.

3. The method according to claim 2, characterized in that The original high-frequency pressure monitoring data set is cleaned to process duplicate, missing, and abnormal data, including: If the pressure data of the monitoring points in the original high-frequency pressure monitoring data set have duplicate or disordered timestamps, the data with repeated occurrences in the corresponding time period will be deleted to ensure the correct timestamps; If there is a short-term missing of the pressure data of the monitoring points in the original high-frequency pressure monitoring data set, the pressure data of the monitoring points in the corresponding time period are linearly interpolated to fill the missing values; If the pressure data of the monitoring point in the original high-frequency pressure monitoring data set is missing for a long time, the pressure data of the monitoring point at the same time of the previous day will be used to replace it; Taking the pressure data of the monitoring points under normal working conditions as a reference, high and low thresholds are set to remove abnormal pressure data of the monitoring points in the original high-frequency pressure monitoring data set.

4. The method according to claim 2, characterized in that: The wavelet denoising process is performed on the cleaned high-frequency pressure monitoring data set, including: The high-frequency pressure monitoring data set after cleaning is subjected to multi-level discrete wavelet transform. The wavelet basis function uses db4, and the soft threshold function and VisuShrink universal threshold are used for decomposition: Where T is the VisuShrink universal threshold; N is the original signal length; d j,k is the kth wavelet coefficient at the jth decomposition scale in discrete wavelet transform; is the wavelet coefficient after processing with soft threshold function; Observe the signals after discrete wavelet decomposition at each level. When the effective signal is smooth and no high-frequency signal is decomposed, determine the corresponding wavelet decomposition level k as the level of each wavelet denoising. The wavelet coefficients are reconstructed at level k to obtain the high-frequency pressure monitoring data set after noise reduction.

5. The method according to claim 2, characterized in that: The method of resampling the denoised high-frequency pressure monitoring data set and extracting features to construct a one-dimensional time series data set containing transient features includes: The 256Hz pressure data in the high-frequency pressure monitoring data set after noise reduction is resampled to extract the maximum value p within 1s. max and the minimum value p min ; Calculate the median p of each time subsequence with a length of 1s std As a benchmark value; A new variable p of the peak pressure characteristic per second is constructed based on the following formula value , and obtain a one-dimensional time series data set with a frequency of 1s and transient features; Among them, p max is the maximum pressure per second, p min is the minimum pressure per second, p std is the median pressure per second.

6. The method according to claim 1, characterized in that The method of using discrete wavelet transform to separate high and low frequencies of the peak feature sequence data set, extracting high-frequency pressure components, and obtaining a high-frequency pressure component data set includes: The original pressure peak feature column vector P in the peak feature sequence data set is subjected to multi-level discrete wavelet transform. The wavelet basis function uses db4, and the decomposition level k is taken as 1 / 2 of the maximum decomposition level. Through k-level wavelet decomposition, an approximate coefficient f and k detail coefficients w are obtained respectively. i ; Keep the approximate coefficient f and change the detail coefficients w at all levels i Set to 0, perform k-level wavelet reconstruction, and obtain the reconstructed low-frequency pressure column vector P'; The difference between the original pressure peak feature column vector P and the reconstructed low-frequency pressure column vector P' is calculated, and based on this, a high-frequency pressure component data set is obtained.

7. The method according to claim 1, characterized in that The bidirectional LSTM autoencoder model is constructed, and the high-frequency pressure component data set is divided into a training set and a test set, including: An autoencoder model was established, in which both the encoder and decoder were BiLSTM networks. The number of units in the LSTM layer of the BILSTM network was 32, the window size was 300, the number of features at each time point was 1, and the activation function was ReLU. The high-frequency pressure component data set is divided into a subsequence set with a length of 5 minutes; Select 80% of the subsequences as the training set, and the remaining 20% ​​of the subsequences as the test set; All 5-min subsequences in the training set were preliminarily screened to remove abnormal subsequences; Min-Max normalization is performed on the training set and test set based on the following formula; Among them, x min is the minimum value in the original data, x max is the maximum value in the original data, x norm is the normalized value.

8. The method according to claim 7, characterized in that The preliminary screening of all 5-minute subsequences in the training set to remove abnormal subsequences includes: Calculate the range of each 5-minute subsequence in the training set; Calculate the mean μ of the range i and standard deviation σ i ; Filter out the training set with a range greater than μ i +3σ i and remove it.

9. The method according to claim 1, characterized in that: The method of using the training set to train the bidirectional LSTM autoencoder model, reconstructing the training set data sequence, calculating the reconstruction error of the training set, and determining the reconstruction error threshold accordingly includes: The training set is input into the bidirectional LSTM autoencoder model to train it, using the Adam optimizer, with the learning rate set to 0.0001, the batch size set to 32, the number of iterations set to 50, and the loss function set to mean square error MSE; Where n is the number of samples; y i is the reconstruction value; is the true value; The mean square error MSE is taken as the reconstruction error RE, and μ+2σ of the reconstruction error distribution of the training set is taken as the reconstruction error threshold.

10. The method according to claim 1, characterized in that The method uses the trained bidirectional LSTM autoencoder model to process the test set, reconstruct the test set data sequence, calculate the reconstruction error of the test set, and issue a pipe burst alarm when the reconstruction error is greater than or equal to the reconstruction error threshold, including: The test set is input into the trained bidirectional LSTM autoencoder model, which reconstructs the test set data sequence and calculates the reconstruction error of each subsequence of the test set. If the subsequence reconstruction error is less than the reconstruction error threshold, it means that the pressure data in the corresponding time period is normal and no pipe burst has occurred; if the subsequence reconstruction error is greater than or equal to the reconstruction error threshold, it means that the pressure data in the corresponding time period is transient and a pipe burst has occurred, and a pipe burst alarm is issued.

Citation Information

Patent Citations

  • Power consumer load interval prediction method based on deep learning

    CN110263866A

  • Fault early warning method for transmission system of wind turbine generator

    CN112834211A

  • Vehicle vibration signal denoising method based on wavelet decomposition

    CN116383605A

  • Water supply network pipe burst detection method for extracting pressure high-frequency component based on wavelet decomposition

    CN116702074A

  • Abnormity detection method based on SimAM-LSTM-AE

    CN117668649A