Pipe network blockage detection method and device based on ultrasonic water meter, server and medium

By using ultrasonic water meters for pipeline network division and data processing, combined with a bidirectional LSTM model, the problem of low detection accuracy for early blockages in water supply networks has been solved, enabling early detection and efficient assessment of minor blockages.

CN120849922BActive Publication Date: 2025-11-21TIANJIN JINCHAOLIDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511349832.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-22
Publication Date
2025-11-21
Estimated Expiration
2045-09-22

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in detecting early blockages in water supply networks, making it impossible to detect minor blockages in a timely manner. Furthermore, they require the installation of numerous pressure sensors within the network, resulting in high retrofitting costs.

Method used

Ultrasonic water meters are used to divide the pipeline network. The ultrasonic water meter acquisition frequencies are adjusted to be consistent. Instantaneous pressure gradient, oscillation attenuation coefficient and spectral entropy value are calculated to construct a three-dimensional feature tensor. A trained bidirectional LSTM model is used for blockage detection. Hidden features are extracted through an attention layer, and the blockage detection results are output.

Benefits of technology

It improves the accuracy of early blockage detection in water supply networks, reduces the need for modifications to existing networks, and can detect pressure anomalies in the early stages of minor blockages, thus reducing false alarm rates and increasing detection rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849922B_ABST
    Figure CN120849922B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a pipe network blockage detection method and device based on an ultrasonic water meter, a server and a medium, and belongs to the field of blockage detection. The method comprises the following steps: dividing the pipe network into at least two sub-pipe networks according to a preset condition; adjusting the collection frequency to be consistent to obtain instantaneous pressure data; calculating the instantaneous pressure gradient, the oscillation attenuation coefficient and the spectral entropy value within a preset time length according to the data of the preset time length; constructing a three-dimensional feature tensor within the preset time length based on the instantaneous pressure gradient, the oscillation attenuation coefficient and the spectral entropy value of the continuous time length, and generating a feature matrix based on a plurality of continuous preset time lengths; inputting the feature matrix into a trained bidirectional LSTM model, which comprises an attention layer for assigning weight values to each preset time length according to the correlation between the hidden features extracted from the tensor of each preset time length and the blockage prediction result; and receiving the blockage detection result output by the bidirectional LSTM model. Pressure anomalies can be found in the early stage of blockage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline blockage detection technology, and in particular to a pipeline blockage detection method, device, server, and medium based on an ultrasonic water meter. Background Technology

[0002] Urban water supply networks are the lifeline of urban infrastructure, responsible for delivering qualified drinking water from water plants to households, businesses, and public facilities. Over long-term use, these networks are susceptible to blockages due to variations in pipe materials and water quality.

[0003] In existing technologies, the presence of blockages is usually determined by macroscopic operating parameter detection. This method uses a large number of pressure sensors installed on the pipeline network to compare the characteristics of blockage pressure changes with normal operating thresholds to preliminarily identify potential blockages.

[0004] In the process of developing this invention, the inventors discovered the following technical problem: Using the macroscopic operating parameter detection method requires deploying a large number of pressure sensors at key points in the pipeline network. However, existing pipeline networks do not currently meet the conditions for a large-scale installation of pressure sensors. If the number of pressure sensors is small, blockages can only be detected when the pipeline network experiences severe blockages, making early detection impossible. This reduces the accuracy of pipeline blockage detection. Summary of the Invention

[0005] This invention provides a method, device, server, and medium for detecting pipe network blockage based on an ultrasonic water meter, in order to solve the technical problem of low accuracy in early-stage blockage monitoring of water supply networks in the prior art.

[0006] In a first aspect, embodiments of the present invention provide a method for detecting pipe network blockage based on an ultrasonic water meter, comprising:

[0007] The pipeline network is divided into at least two sub-networks according to preset conditions;

[0008] Adjust the acquisition frequency of the ultrasonic water meters in the sub-pipeline to be consistent, and obtain the instantaneous pressure data of each ultrasonic water meter in each sub-pipeline.

[0009] The instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within the preset time period are calculated based on the data of each ultrasonic water meter within the preset time period.

[0010] A three-dimensional feature tensor within a preset time period is constructed based on the instantaneous pressure gradient, oscillation decay coefficient, and spectral entropy value over a continuous time period, and a feature matrix is ​​generated based on multiple consecutive preset time periods.

[0011] The feature matrix is ​​input into the trained bidirectional LSTM model, which includes an attention layer. The attention layer is used to assign weight values ​​for each preset duration based on the correlation between the hidden features extracted from the tensor of each preset duration and the blockage prediction result.

[0012] Receive the blockage detection results output by the bidirectional LSTM model;

[0013] The process of dividing the pipeline network into at least two sub-networks according to preset conditions includes:

[0014] Identify all fully closable valves, check valves, and pump station outlets in the pipeline network;

[0015] Select the section of the pipeline network that can still supply water independently downstream after a set of valves are closed, has only one main pipe at the inlet, and has a minimum nighttime flow rate that is less than the minimum preset inlet flow rate ratio as the sub-pipeline network.

[0016] Secondly, embodiments of the present invention also provide a pipe network blockage detection device based on an ultrasonic water meter, comprising:

[0017] The partitioning module is used to divide the pipeline network into at least two sub-pipelines according to preset conditions;

[0018] The acquisition module is used to adjust the acquisition frequency of the ultrasonic water meters in the sub-pipeline to be consistent and acquire the instantaneous pressure data of each ultrasonic water meter in each sub-pipeline.

[0019] The calculation module is used to calculate the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within the preset time period based on the data of each ultrasonic water meter.

[0020] The generation module is used to construct a three-dimensional feature tensor within a preset time period based on the instantaneous pressure gradient, oscillation decay coefficient and spectral entropy value of continuous duration, and to generate a feature matrix based on multiple consecutive preset time periods.

[0021] The input module is used to input the feature matrix into the trained bidirectional LSTM model. The bidirectional LSTM model includes an attention layer, which is used to assign weight values ​​for each preset duration based on the correlation between the hidden features extracted from the tensor of each preset duration and the blockage prediction result.

[0022] The receiving module is used to receive the blockage detection results output by the bidirectional LSTM model;

[0023] The partitioning module includes:

[0024] The determination unit is used to determine all fully closable valves, check valves, and pump station outlets in the pipeline network;

[0025] The selection unit is used to select a section of the pipeline network that, after a set of valves are closed, can still supply water independently downstream, has only one main pipe at the inlet, and has a minimum nighttime flow rate that is less than the minimum preset inlet flow rate ratio, as a sub-pipeline network.

[0026] Thirdly, embodiments of the present invention also provide a server, comprising:

[0027] One or more processors;

[0028] Storage device for storing one or more programs;

[0029] When the one or more programs are executed by the one or more processors, the one or more processors implement the pipe network blockage detection method based on ultrasonic water meters as provided in the above embodiments.

[0030] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the pipeline blockage detection method based on an ultrasonic water meter as provided in the above embodiments.

[0031] The present invention provides a method, device, server, and medium for detecting pipe network blockage based on ultrasonic water meters. The method involves dividing a pipe network into at least two sub-pipe networks according to preset conditions; adjusting the acquisition frequencies of the ultrasonic water meters in each sub-pipe network to be consistent to obtain instantaneous pressure data from each ultrasonic water meter in each sub-pipe network; calculating the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within a preset time period based on the data from each ultrasonic water meter for a preset duration; constructing a three-dimensional feature tensor within the preset time period based on the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for consecutive durations; generating a feature matrix based on multiple consecutive preset time periods; inputting the feature matrix into a trained bidirectional LSTM model, which includes an attention layer. This attention layer assigns weight values ​​to each preset time period based on the correlation between the hidden features extracted from the tensor of each preset time period and the blockage prediction result; and receiving the blockage detection result output by the bidirectional LSTM model. By dividing the pipe network into sub-pipe networks, the presence of minor blockages can be more accurately determined using pressure fluctuations. Furthermore, by utilizing ultrasonic water meters in the existing pipeline network to collect pressure data, there is no need to make extensive modifications to the original pipeline network. Moreover, based on the collected pressure data, in-depth processing can be performed to obtain various characterization values ​​related to blockage. This facilitates the use of bidirectional LSTM models to extract features from the characterization values, enabling the detection of pressure anomalies in the early stages of blockage and improving the accuracy of early blockage detection. Attached Figure Description

[0032] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0033] Figure 1 A flowchart of a pipeline blockage detection method based on an ultrasonic water meter provided in Embodiment 1 of the present invention;

[0034] Figure 2 The flowchart shows the pipeline blockage detection method based on an ultrasonic water meter provided in Embodiment 2 of the present invention.

[0035] Figure 3 This is a structural diagram of the pipeline blockage detection device based on an ultrasonic water meter provided in Embodiment 3 of the present invention;

[0036] Figure 4 This is a structural diagram of the server provided in Embodiment 4 of the present invention. Detailed Implementation

[0037] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0038] Example 1

[0039] Figure 1 The flowchart below shows a pipeline blockage detection method based on an ultrasonic water meter according to Embodiment 1 of the present invention. This embodiment is applicable to situations where an ultrasonic water meter is used to check for early blockages in a water supply network. The method can be executed based on a pipeline blockage detection device using an ultrasonic water meter, and specifically includes the following steps:

[0040] Step 110: Divide the pipeline network into at least two sub-networks according to preset conditions.

[0041] Due to the vast and complex nature of water supply networks, various factors can cause pressure fluctuations at different points within the network. These fluctuations include pressure fluctuations caused by water usage, bends in the network, and blockages. Within the overall network, these pressure fluctuations may be very subtle, making it difficult to detect pressure fluctuations caused by minor blockages. Therefore, in this embodiment, the network can be pre-divided into at least two sub-networks. For example, all fully closable valves, check valves, and pump station outlets in the network are identified. The sub-network is selected where, after closing a set of valves, the downstream section can still supply water independently, the inlet is only one main pipe, and the minimum nighttime flow rate is less than a preset minimum inlet flow rate. Using this method, the main network can be accurately divided into multiple relatively independent sub-networks that do not affect each other. The reason for considering a minimum nighttime flow rate less than a preset minimum inlet flow rate is that water usage is relatively low at night, resulting in smaller pressure fluctuations. In this case, it is easier to detect the impact of minor blockages on network pressure fluctuations, further improving the accuracy of minor blockage detection.

[0042] Step 120: Adjust the acquisition frequency of the ultrasonic water meters in the sub-pipeline to be consistent, and obtain the instantaneous pressure data of each ultrasonic water meter in each sub-pipeline.

[0043] An ultrasonic water meter is a new type of water meter that detects the time difference caused by the change in speed of an ultrasonic beam as it propagates upstream and downstream in water. This analysis determines the water flow velocity and allows for further calculation of the water flow rate. Typically, to ensure accurate flow measurement, ultrasonic water meters also incorporate a piezoresistive / piezoelectric chip, using the meter's MCU to read the corresponding pressure value. This is to avoid the influence of air or other contaminants on the flow measurement. In this embodiment, because the functions of each ultrasonic water meter are different, their acquisition frequencies may vary, which may hinder subsequent data processing. Therefore, it is necessary to adjust the acquisition frequencies of the ultrasonic water meters in the sub-network to be consistent, and to use each ultrasonic water meter to collect instantaneous pressure data.

[0044] Step 130: Calculate the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within the preset time period based on the data of each ultrasonic water meter for the preset time period.

[0045] The instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within a preset time period are calculated using the pressure values ​​collected by each ultrasonic water meter in the sub-pipeline. For example, the collected pressure values ​​can be arranged according to a time window, and the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within that time window can be calculated.

[0046] Using the three indicators mentioned above can enhance the characteristics of pressure changes, making it easier to extract hidden features compared to existing technologies that directly use pressure. Furthermore, these three features can characterize changes in various aspects of pressure variations.

[0047] For example, this could include: using instantaneous pressure sequences collected over each preset time period, calculating the instantaneous pressure difference between adjacent instantaneous pressures in the sequence to form an instantaneous pressure difference sequence, and selecting the maximum value from the instantaneous pressure difference sequence as the instantaneous pressure gradient. Instantaneous pressure difference measures the rate at which pressure drops or rises instantaneously, effectively reflecting the influence of water usage on pressure. Existing technologies typically use average values, but this method reduces the specific variation characteristics of the pressure difference.

[0048] The oscillation attenuation coefficient describes whether the pressure wave subsides rapidly or oscillates continuously in the pipe section. Rapid subsidence may indicate pressure changes due to water usage. Optionally, it can be calculated using the following method:

[0049] Bandpass filtering is applied to the data for each preset duration. The instantaneous amplitude is then calculated using Hilbert transform. An exponential fit is performed on the instantaneous amplitude to obtain the oscillation decay coefficient in the exponential fit. Optionally, an exponential fit is performed on the instantaneous amplitude A(t). , where αt is the oscillation damping coefficient. is the proportionality constant, representing the initial amplitude of the decay curve at t=0. e is the natural constant.

[0050] Spectral entropy can be used to quantify the complexity / chaos of a pressure signal's spectrum. It can be calculated as follows: Perform a Fast Fourier Transform on data for each preset duration to obtain multiple spectral lines, each corresponding to a frequency; calculate the energy corresponding to each spectral line and the total energy of all spectral lines; calculate the energy percentage of each spectral line based on the total energy; and calculate the spectral entropy value based on the energy percentage of each spectral line.

[0051] Step 140: Construct a three-dimensional feature tensor within a preset time period based on the instantaneous pressure gradient, oscillation decay coefficient, and spectral entropy value of continuous duration, and generate a feature matrix based on multiple consecutive preset time periods.

[0052] A three-dimensional feature tensor is constructed based on the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value of each ultrasonic water meter, and a feature matrix is ​​generated based on the three-dimensional tensor over a certain time period.

[0053] Step 150: Input the feature matrix into the trained bidirectional LSTM model. The bidirectional LSTM model includes an attention layer, which is used to assign weight values ​​for each preset duration based on the correlation between the hidden features extracted from the tensor of each preset duration and the blockage prediction result, and receive the blockage detection result output by the bidirectional LSTM model.

[0054] Blockage features are characterized by both precursors and aftershocks. They can be viewed as a three-segment feature: "precursor – peak – aftershock". Therefore, in this embodiment, a bidirectional LSTM model is used. The feature matrix is ​​input into the trained bidirectional LSTM model, enabling it to fully extract the features before and after the blockage, thereby improving the detection accuracy.

[0055] Furthermore, the bidirectional LSTM model may also include an attention layer. This attention layer assigns weights to each preset duration based on the correlation between the hidden features extracted from the tensor of each preset duration and the congestion prediction result. By returning the congestion prediction result during training, the model can learn the characteristics of short durations related to congestion, effectively eliminating other irrelevant time periods, especially the influence of noise generated by water use. The attention layer also utilizes the multidimensional features extracted from previous convolutional layers to determine the key time periods. The output of the attention layer is then input into a fully connected layer to obtain the normal and congestion probabilities, thus yielding the congestion detection result.

[0056] To verify the effectiveness of the method provided in this embodiment, a medium-sized sub-network scenario was constructed using the EPANET simulation platform. Fifteen pressure sensors and 198 ultrasonic water meters were installed at the nodes of the sub-network, with a sampling frequency of 0.1Hz. Thirty locations were randomly selected within the sub-network, and early local blockages (water flow area reduced by 30%, local resistance coefficient k=12) were simulated at different time periods as fault samples. The training and test sets were constructed using one pressure time series every 10 seconds for one consecutive day. Evaluation metrics included: Detection Rate (DDR), False Alarm Rate (FAR), and Early Warning Time (EWT). The results were compared with a conventional one-way LSTM model and a traditional pressure thresholding method on the same dataset. The results are shown in the table below.

[0057]

[0058] The results above show that, in early-stage congestion detection scenarios, the detection method provided by the above embodiments can significantly improve the detection rate compared to traditional methods, and also improve the detection rate of unidirectional LSTM to a certain extent. Furthermore, it can reduce the false alarm rate and shorten the time required for early warning.

[0059] This embodiment divides the pipeline network into at least two sub-networks according to preset conditions; adjusts the acquisition frequency of ultrasonic water meters in the sub-networks to be consistent, and obtains the instantaneous pressure data of each ultrasonic water meter in each sub-network; calculates the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within a preset time period based on the data of each ultrasonic water meter for a preset time period; constructs a three-dimensional feature tensor within the preset time period based on the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value of continuous time periods, and generates a feature matrix based on multiple continuous preset time periods; inputs the feature matrix into a trained bidirectional LSTM model, which includes an attention layer, used to assign weight values ​​to each preset time period based on the correlation between the hidden features extracted from the tensor of each preset time period and the blockage prediction result; and receives the blockage detection result output by the bidirectional LSTM model. By dividing the pipeline network into sub-networks, the presence of minor blockages can be more accurately determined using pressure fluctuations. Furthermore, by utilizing ultrasonic water meters in the existing pipeline network to collect pressure data, there is no need to make extensive modifications to the original pipeline network. Moreover, based on the collected pressure data, in-depth processing can be performed to obtain various characterization values ​​related to blockage. This facilitates the use of bidirectional LSTM models to extract features from the characterization values, enabling the detection of pressure anomalies in the early stages of blockage and improving the accuracy of early blockage detection.

[0060] Example 2

[0061] Figure 2 This is a flowchart of a pipeline blockage detection method based on an ultrasonic water meter provided in Embodiment 2 of the present invention. This embodiment is an optimization based on the above embodiment. The feature matrix is ​​input into the trained bidirectional LSTM model. Specifically, the optimization is as follows: randomly select an instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for a preset duration; calculate the spatial approximation of the spatial points of the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for the preset duration; calculate the two-dimensional approximation of the spatial points using a t-distribution; calculate the KL divergence based on the spatial and two-dimensional approximations of the spatial points; iterate the KL divergence and adjust the two-dimensional approximation of the spatial points according to the KL divergence until the rate of change of the KL divergence is less than a preset rate of change threshold; determine whether the dispersion of the spatial points meets the clustering requirements. If it does, input the feature matrix into the trained bidirectional LSTM model.

[0062] See Figure 2 The method for detecting pipe network blockage based on ultrasonic water meters includes:

[0063] Step 210: Divide the pipeline network into at least two sub-networks according to preset conditions, adjust the acquisition frequency of the ultrasonic water meters in the sub-networks to be consistent, and obtain the instantaneous pressure data of each ultrasonic water meter in each sub-network.

[0064] Step 220: Calculate the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within the preset time period based on the data of each ultrasonic water meter for the preset time period. Construct a three-dimensional feature tensor within the preset time period based on the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value of the continuous time period. Generate a feature matrix based on multiple continuous preset time periods.

[0065] Step 230: Randomly select an instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for a preset duration; calculate the spatial approximation of the spatial points of the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for the preset duration.

[0066] Due to limitations in the measurement accuracy of ultrasonic water meters and improper parameter settings during the filtering process of the raw data, the collected data may contain biases. In such cases, the data features may be unclear, making it impossible to train the bidirectional LSTM model and thus impossible to obtain accurate blockage prediction results.

[0067] Therefore, in this embodiment, it is necessary to detect the suitability of the bidirectional LSTM model data. For example, firstly, the spatial approximation of spatial points based on the instantaneous pressure gradient, oscillation decay coefficient, and spectral entropy value for a preset duration is calculated. Since the distance in the three-dimensional features that effectively distinguishes between blockages and normal water use may be a non-linear surface, the three-dimensional Euclidean distance cannot be directly used for classification. For example, the calculated Euclidean distances of each point can first be converted into similarity using a Gaussian kernel, where the similarity can characterize conditional probability.

[0068] Step 240: Calculate the two-dimensional approximation of the spatial point using the t-distribution, and calculate the KL divergence based on the spatial approximation and two-dimensional approximation of the spatial point.

[0069] First, spatial points are randomly placed in a two-dimensional coordinate system, with each point assigned random coordinates. A t-distribution is then used to convert the Euclidean distance between each spatial point in the two-dimensional coordinate system into a two-dimensional approximation; the closer the distance, the larger the value; the farther the distance, the rapidly decreasing value. The KL divergence between these two approximations is then calculated.

[0070] Step 250: Iterate the KL divergence and adjust the two-dimensional approximation of the spatial points according to the KL divergence until the rate of change of the KL divergence is less than the preset rate of change threshold; determine whether the dispersion of the spatial points meets the clustering requirements, and if it does, input the feature matrix into the trained bidirectional LSTM model.

[0071] Based on the KL divergence, the two-dimensional approximation between each pair of spatial points is continuously adjusted. The adjusted KL divergence is continuously calculated until it falls below a preset rate of change threshold. Since the true nonlinear boundaries within high dimensions are still obscured by linear distances, accurate clustering results cannot be obtained. Using the above method, spatial points can be converted into planar points, resulting in clearer boundaries. Unlike traditional clustering methods, the purpose of this scheme is to determine whether the boundaries are clear, therefore outliers are no longer considered.

[0072] For example, determining whether the dispersion of spatial points meets the clustering requirements may include: determining the two-dimensional position of each spatial point based on its two-dimensional approximation to other spatial points; determining whether a cluster exists based on the two-dimensional position of each spatial point; if a cluster exists, determining that the number of clusters is within a preset range; and determining that the dispersion of spatial points meets the clustering requirements when the number of clusters is within the preset range. The number of clusters is considered because there are usually only a few possible states; if there are too many clusters, it indicates that the boundaries are unclear.

[0073] Step 260: Receive the blockage detection results output by the bidirectional LSTM model.

[0074] This embodiment optimizes the input of the feature matrix into the trained bidirectional LSTM model as follows: Randomly select an instantaneous pressure gradient, oscillation decay coefficient, and spectral entropy value for a preset duration; calculate the spatial approximation of the spatial points representing the instantaneous pressure gradient, oscillation decay coefficient, and spectral entropy value for the preset duration; calculate the two-dimensional approximation of the spatial points using a t-distribution; calculate the KL divergence based on the spatial and two-dimensional approximations of the spatial points; iterate the KL divergence and adjust the two-dimensional approximation of the spatial points based on the KL divergence until the rate of change of the KL divergence is less than a preset rate of change threshold; determine whether the dispersion of the spatial points meets the clustering requirements, and if so, input the feature matrix into the trained bidirectional LSTM model. This allows for advance analysis of the input model data to determine its reliability, applicability, and discriminability, avoiding overfitting during training of the bidirectional LSTM model and further improving the accuracy of congestion monitoring.

[0075] Example 3

[0076] Figure 3 This is a structural diagram of the pipeline blockage detection device based on an ultrasonic water meter provided in Embodiment 3 of the present invention, as shown below. Figure 3 As shown, the device includes:

[0077] The dividing module 310 is used to divide the pipeline network into at least two sub-pipelines according to preset conditions;

[0078] The acquisition module 320 is used to adjust the acquisition frequency of the ultrasonic water meters in the sub-pipeline to be consistent and acquire the instantaneous pressure data of each ultrasonic water meter in each sub-pipeline.

[0079] The calculation module 330 is used to calculate the instantaneous pressure gradient, oscillation attenuation coefficient and spectral entropy value within the preset time period based on the data of each ultrasonic water meter within the preset time period.

[0080] The generation module 340 is used to construct a three-dimensional feature tensor within a preset time based on the instantaneous pressure gradient, oscillation decay coefficient and spectral entropy value of continuous duration, and to generate a feature matrix based on multiple consecutive preset time durations.

[0081] The input module 350 is used to input the feature matrix into the trained bidirectional LSTM model. The bidirectional LSTM model includes an attention layer, which is used to assign weight values ​​for each preset duration based on the correlation between the hidden features extracted from the tensor of each preset duration and the blockage prediction result.

[0082] The receiving module 360 ​​is used to receive the blockage detection results output by the bidirectional LSTM model.

[0083] This embodiment provides a pipe network blockage detection device based on ultrasonic water meters. The device divides the pipe network into at least two sub-pipe networks according to preset conditions; adjusts the acquisition frequency of the ultrasonic water meters in each sub-pipe network to be consistent, and acquires the instantaneous pressure data of each ultrasonic water meter in each sub-pipe network; calculates the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within a preset time period based on the data from each ultrasonic water meter for a preset time period; constructs a three-dimensional feature tensor within the preset time period based on the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for consecutive time periods, and generates a feature matrix based on multiple consecutive preset time periods; inputs the feature matrix into a trained bidirectional LSTM model, which includes an attention layer. The attention layer assigns weight values ​​to each preset time period based on the correlation between the hidden features extracted from the tensor of each preset time period and the blockage prediction result; and receives the blockage detection results output by the bidirectional LSTM model. By dividing the pipe network into sub-pipe networks, the presence of minor blockages can be more accurately determined using pressure fluctuations. Furthermore, by utilizing ultrasonic water meters in the existing pipeline network to collect pressure data, there is no need to make extensive modifications to the original pipeline network. Moreover, based on the collected pressure data, in-depth processing can be performed to obtain various characterization values ​​related to blockage. This facilitates the use of bidirectional LSTM models to extract features from the characterization values, enabling the detection of pressure anomalies in the early stages of blockage and improving the accuracy of early blockage detection.

[0084] Based on the above embodiments, the determining module includes:

[0085] The random selection unit is used to randomly select an instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for a preset duration;

[0086] The spatial approximation calculation unit is used to calculate the spatial approximation of spatial points for instantaneous pressure gradient, oscillation attenuation coefficient and spectral entropy value over a preset duration.

[0087] A two-dimensional approximation calculation unit is used to calculate the two-dimensional approximation of the spatial points using a t-distribution.

[0088] The KL divergence calculation unit is used to calculate the KL divergence based on the spatial approximation and two-dimensional approximation of spatial points.

[0089] An iterative unit is used to iterate the KL divergence and adjust the two-dimensional approximation of the spatial points according to the KL divergence until the rate of change of the KL divergence is less than a preset rate of change threshold.

[0090] The determining unit is used to determine whether the dispersion of spatial points meets the clustering requirements. If it does, the feature matrix is ​​input into the trained bidirectional LSTM model.

[0091] Based on the above embodiments, the determining unit is used for:

[0092] The two-dimensional position of a spatial point is determined based on the two-dimensional approximation of each spatial point with other spatial points.

[0093] Based on the two-dimensional position of each spatial point, determine whether a cluster exists. If it exists, determine whether the number of clusters is within a preset range.

[0094] When the number of clusters is within a preset range, the degree of dispersion of spatial points meets the clustering requirements.

[0095] Based on the above embodiments, the computing module includes:

[0096] The first calculation unit is used to calculate the instantaneous pressure difference between adjacent instantaneous pressures in the instantaneous pressure sequence collected in each preset time period, forming an instantaneous pressure difference sequence, and selecting the maximum value from the instantaneous pressure difference sequence as the instantaneous pressure gradient.

[0097] Based on the above embodiments, the computing module includes:

[0098] The second calculation unit is used to perform bandpass filtering on the data for each preset duration, use Hilbert transform to calculate the instantaneous amplitude of the bandpass filtered data, and perform exponential fitting on the instantaneous amplitude to obtain the oscillation decay coefficient in the exponential fitting.

[0099] Based on the above embodiments, the computing module includes:

[0100] The transformation unit is used to perform a fast Fourier transform on the data for each preset duration to obtain multiple spectrum lines, where each spectrum line corresponds to a frequency;

[0101] The energy percentage calculation unit is used to calculate the energy corresponding to each spectral line and the total energy of all spectral lines; and to calculate the energy percentage of each spectral line based on the total energy.

[0102] The spectral entropy calculation unit is used to calculate the spectral entropy value based on the energy percentage of each spectral line.

[0103] Based on the above embodiments, the partitioning module includes:

[0104] The determination unit is used to determine all fully closable valves, check valves, and pump station outlets in the pipeline network;

[0105] The selection unit is used to select a section of the pipeline network that, after a set of valves are closed, can still supply water independently downstream, has only one main pipe at the inlet, and has a minimum nighttime flow rate that is less than the minimum preset inlet flow rate ratio, as a sub-pipeline network.

[0106] The pipeline blockage detection device based on ultrasonic water meters provided in this embodiment of the invention can execute the pipeline blockage detection system based on ultrasonic water meters provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0107] Example 4

[0108] Figure 4 This is a structural diagram of a server provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary server 12 suitable for implementing embodiments of the present invention is shown. Figure 4 The server 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0109] like Figure 4 As shown, server 12 is presented in the form of a general-purpose computing server. The components of server 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0110] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0111] Server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by server 12, including volatile and non-volatile media, removable and non-removable media.

[0112] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. Server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0113] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0114] Server 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing server, display 24, etc.), and with one or more servers that enable users to interact with server 12, and / or with any server (e.g., network card, modem, etc.) that enables server 12 to communicate with one or more other computing servers. This communication can be performed via input / output (I / O) interface 22. Furthermore, server 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of server 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with server 12, including but not limited to: microcode, server drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0115] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the pipeline blockage detection method based on ultrasonic water meters provided in the embodiments of the present invention.

[0116] Example 5

[0117] Embodiment 5 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the pipeline blockage detection method based on an ultrasonic water meter as described in any of the above embodiments.

[0118] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0119] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0120] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0121] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0122] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for detecting pipe network blockage based on an ultrasonic water meter, characterized in that, include: The pipeline network is divided into at least two sub-networks according to preset conditions; Adjust the acquisition frequency of the ultrasonic water meters in the sub-pipeline to be consistent, and obtain the instantaneous pressure data of each ultrasonic water meter in each sub-pipeline. The instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within the preset time period are calculated based on the data of each ultrasonic water meter within the preset time period. A three-dimensional feature tensor within a preset time period is constructed based on the instantaneous pressure gradient, oscillation decay coefficient, and spectral entropy value over a continuous duration, and a feature matrix is ​​generated based on multiple consecutive preset time periods. The feature matrix is ​​input into the trained bidirectional LSTM model, which includes an attention layer. The attention layer is used to assign weight values ​​for each preset duration based on the correlation between the hidden features extracted from the tensor of each preset duration and the blockage prediction result. Receive the blockage detection results output by the bidirectional LSTM model; The process of dividing the pipeline network into at least two sub-networks according to preset conditions includes: Identify all fully closable valves, check valves, and pump station outlets in the pipeline network; Select the section of the pipeline network that can still supply water independently downstream after a set of valves are closed, has only one main pipe at the inlet, and has a minimum nighttime flow rate that is less than the minimum preset inlet flow rate ratio as the sub-pipeline network. The step of inputting the feature matrix into the trained bidirectional LSTM model includes: Randomly select an instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for a preset duration; Calculate the spatial approximation of the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value at a preset duration. The two-dimensional approximation of the spatial points is calculated using the t-distribution; Calculate the KL divergence based on the spatial approximation and two-dimensional approximation of the spatial points; Iterate over the KL divergence and adjust the two-dimensional approximation of the spatial points according to the KL divergence until the rate of change of the KL divergence is less than a preset rate of change threshold. Determine whether the degree of dispersion of spatial points meets the clustering requirements. If it does, input the feature matrix into the trained bidirectional LSTM model.

2. The method according to claim 1, characterized in that, Whether the degree of dispersion of the spatial points meets the clustering requirements includes: The two-dimensional position of a spatial point is determined based on the two-dimensional approximation of each spatial point with other spatial points. Based on the two-dimensional position of each spatial point, determine whether a cluster exists. If it exists, determine whether the number of clusters is within a preset range. When the number of clusters is within a preset range, the degree of dispersion of spatial points meets the clustering requirements.

3. The method according to claim 1, characterized in that, The calculation of the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within the preset time period based on data from each ultrasonic water meter includes: Using the instantaneous pressure sequences collected during each preset time period, the instantaneous pressure difference between adjacent instantaneous pressures in the sequence is calculated to form an instantaneous pressure difference sequence. The maximum value in the instantaneous pressure difference sequence is selected as the instantaneous pressure gradient.

4. The method according to claim 3, characterized in that, The data from each ultrasonic water meter for a preset duration are used to calculate the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within that preset duration, including: Bandpass filtering is applied to the data for each preset duration. The instantaneous amplitude of the bandpass filtered data is obtained using Hilbert transform. The instantaneous amplitude is then subjected to exponential fitting to obtain the oscillation decay coefficient in the exponential fitting.

5. The method according to claim 4, characterized in that, The data from each ultrasonic water meter for a preset duration are used to calculate the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within that preset duration, including: Perform a Fast Fourier Transform on the data for each preset duration to obtain multiple spectrum lines, where each spectrum line corresponds to a frequency; Calculate the energy corresponding to each spectral line, and calculate the total energy of all spectral lines; calculate the energy percentage of each spectral line based on the total energy; The spectral entropy value is calculated based on the energy percentage of each spectral line.

6. A pipe network blockage detection device based on an ultrasonic water meter, characterized in that, include: The partitioning module is used to divide the pipeline network into at least two sub-pipelines according to preset conditions; The acquisition module is used to adjust the acquisition frequency of the ultrasonic water meters in the sub-pipeline to be consistent and acquire the instantaneous pressure data of each ultrasonic water meter in each sub-pipeline. The calculation module is used to calculate the instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value within the preset time period based on the data of each ultrasonic water meter. The generation module is used to construct a three-dimensional feature tensor within a preset time period based on the instantaneous pressure gradient, oscillation decay coefficient and spectral entropy value of continuous duration, and to generate a feature matrix based on multiple consecutive preset time periods. The input module is used to input the feature matrix into the trained bidirectional LSTM model. The bidirectional LSTM model includes an attention layer, which is used to assign weight values ​​for each preset duration based on the correlation between the hidden features extracted from the tensor of each preset duration and the blockage prediction result. The receiving module is used to receive the blockage detection results output by the bidirectional LSTM model; The partitioning module includes: The determination unit is used to determine all fully closable valves, check valves, and pump station outlets in the pipeline network; The selection unit is used to select the section of the pipeline network that, after a set of valves are closed, can still supply water independently downstream, has only one main pipe at the inlet, and has a minimum nighttime flow rate that is less than the minimum preset inlet flow rate ratio as a sub-pipeline. The input module includes: The random selection unit is used to randomly select an instantaneous pressure gradient, oscillation attenuation coefficient, and spectral entropy value for a preset duration; The spatial approximation calculation unit is used to calculate the spatial approximation of spatial points for instantaneous pressure gradient, oscillation attenuation coefficient and spectral entropy value over a preset duration. A two-dimensional approximation calculation unit is used to calculate the two-dimensional approximation of the spatial points using a t-distribution. The KL divergence calculation unit is used to calculate the KL divergence based on the spatial approximation and two-dimensional approximation of spatial points. An iterative unit is used to iterate the KL divergence and adjust the two-dimensional approximation of the spatial points according to the KL divergence until the rate of change of the KL divergence is less than a preset rate of change threshold. The determining unit is used to determine whether the dispersion of spatial points meets the clustering requirements. If it does, the feature matrix is ​​input into the trained bidirectional LSTM model.

7. A server, characterized in that, The server includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the pipeline blockage detection method based on ultrasonic water meters as described in any one of claims 1-5.

8. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the pipeline blockage detection method based on an ultrasonic water meter as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Water supply pipeline operation data anomaly detection method

    CN116842323A

  • New energy power prediction method, apparatus and device, and computer readable storage medium

    CN117060401A