Pipeline leakage detection method, device, equipment and storage medium

By clustering the flow data to be detected in drainage pipes with historical data without leakage, and using the pipeline flow clustering model trained by the DBSCAN model, the problem of low efficiency in drainage pipe leakage detection is solved, achieving fast and accurate leakage detection, and improving the level of automation and work efficiency.

CN118499707BActive Publication Date: 2026-08-25中铁二十局集团第三工程有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410531512.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2026-08-25
Estimated Expiration
2044-04-29

AI Technical Summary

Technical Problem

Existing technologies for detecting leaks in drainage pipes are inefficient, resulting in the inability to detect leaks in real time and causing greater pollution.

Method used

By clustering the target pipeline's flow data to be detected with historical flow data without leakage, and using the DBSCAN clustering model to train the pipeline flow clustering model, if the data to be detected and some historical data are clustered into one cluster, it is determined that no leakage has occurred in the pipeline.

Benefits of technology

It enables the rapid and accurate elimination of suspected leaks, improves the automation level and efficiency of leakage detection in drainage pipe networks, and reduces the risk of resource waste and infrastructure damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118499707B_ABST
    Figure CN118499707B_ABST
Patent Text Reader

Abstract

The application discloses a pipeline leakage detection method, device, equipment and storage medium. The application relates to the technical field of leakage detection. The application obtains to-be-detected pipeline flow data and historical pipeline flow data of a target pipeline, clusters the to-be-detected pipeline flow data and the historical pipeline flow data, and determines that the target pipeline has not occurred leakage if the to-be-detected pipeline flow data and at least part of the historical pipeline flow data are clustered into one cluster, thereby solving the technical problem of low pipeline leakage detection efficiency by artificial patrol in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of leakage detection technology, and in particular to a pipeline leakage detection method, apparatus, equipment, and storage medium. Background Technology

[0002] In related technologies, drainage pipe maintenance is generally carried out by manual periodic inspections, which is extremely inefficient and makes it impossible to detect whether the drainage pipes are leaking in real time, thus causing greater pollution after the drainage pipes are leaked.

[0003] Therefore, improving the efficiency of pipeline leakage detection is an urgent problem to be solved in the current treatment and maintenance of drainage pipelines. Summary of the Invention

[0004] The main objective of this application is to provide a pipeline leakage detection method, device, and storage medium, aiming to solve the problem of low efficiency in pipeline leakage detection using manual inspection in related technologies.

[0005] To achieve the above objectives, in a first aspect, this application provides a pipeline leakage detection method, the method comprising: Obtain the flow rate data of the target pipeline and the historical flow rate data of the pipeline; the historical flow rate data is the flow rate data when the pipeline is not leaking. Cluster the pipeline flow data to be tested with historical pipeline flow data; If the flow data of the pipeline to be tested and at least some of the historical flow data of the pipeline are clustered into a single cluster, then it is determined that the target pipeline has not experienced leakage.

[0006] In one embodiment, clustering the pipeline flow data to be detected with historical pipeline flow data includes: The pipeline flow data to be detected is input into the pipeline flow clustering model for clustering; the pipeline flow clustering model is obtained by training the DBSCAN clustering model using historical flow data of pipelines without leakage and historical flow data of pipelines with leakage.

[0007] In one embodiment, the method further includes: Based on the collection time of each historical pipeline flow data, multiple historical pipeline flow data are divided into multiple historical pipeline flow datasets; each historical pipeline flow dataset includes a subset of historical flow data from pipelines without leakage and a subset of historical flow data from pipelines with leakage. The historical pipeline flow dataset with the most stable trend of pipeline flow change over time was selected from various historical pipeline flow datasets as the reference dataset; Based on the reference dataset, the DBSCAN clustering model is trained to obtain the trained pipeline flow clustering model.

[0008] In one embodiment, the historical pipeline flow dataset with the most stable trend of pipeline flow change over time is selected as a reference dataset from various historical pipeline flow datasets, including: Linear regression was performed on the subsets of historical flow data from undamaged pipelines in each historical pipeline flow dataset to obtain the linear regression correlation coefficients for each subset of historical flow data from undamaged pipelines. The historical pipeline flow dataset with the highest linear regression correlation coefficient was used as the reference dataset.

[0009] In one embodiment, a pipeline flow clustering model constructed based on the DBSCAN clustering algorithm is trained based on a reference dataset to obtain a trained pipeline flow clustering model, including: The reference dataset is used as the training sample set and input into the pre-built DBSCAN clustering model to obtain the current temporary clusters. Based on the current temporary clusters, adjust the neighborhood radius and / or minimum neighbor number of the DBSCAN clustering model; Return to the execution and adjust the neighborhood radius and / or minimum neighbor number of the DBSCAN clustering model based on the current temporary cluster until each data point in the current temporary cluster is marked as a core point or noisy data. The temporary cluster then becomes a cluster, and the trained pipeline flow clustering model is obtained.

[0010] In one embodiment, after inputting the pipeline flow data to be detected into a pipeline flow clustering model for clustering, the method further includes: If the flow data of the pipeline to be tested is merged into a new cluster with the cluster corresponding to the subset of historical flow data of the pipeline without leakage in the pipeline flow clustering model, then it is determined that the target pipeline has not experienced leakage.

[0011] In one embodiment, after clustering the pipeline flow data to be detected with historical pipeline flow data, the method further includes: If the flow data of the pipeline to be tested and the historical flow data of the pipeline are not merged into a single cluster, then it is determined that the target pipeline has leaked. Generate pipeline leakage alarm information; the pipeline leakage alarm information includes pipeline location information.

[0012] Secondly, to achieve the above objectives, this application further provides a pipeline leakage detection device, which includes: The acquisition module is used to acquire the flow data of the target pipeline to be detected and the historical flow data of the pipeline; the historical flow data includes the historical flow data of pipelines without leakage. The clustering module is used to cluster the pipeline flow data to be tested with historical pipeline flow data; The detection module is used to determine that the target pipeline has not experienced leakage if the flow data of the pipeline to be detected and the historical pipeline flow data are merged into a single cluster.

[0013] Thirdly, to achieve the above objectives, this application further provides a pipeline leakage detection device, including: a processor, a memory, and a pipeline leakage detection program stored in the memory, wherein the pipeline leakage detection program is executed by the processor to implement the steps of the above-described pipeline leakage detection method.

[0014] Fourthly, to achieve the above objectives, this application further provides a computer-readable storage medium storing a pipeline leakage detection program, which, when executed by a processor, implements the above-described pipeline leakage detection method.

[0015] This application obtains the flow data of the target pipeline to be tested and historical pipeline flow data, wherein the historical pipeline flow data is the flow data when the pipeline is not leaking. The application then clusters the flow data of the target pipeline to be tested and the historical pipeline flow data. If the flow data of the target pipeline to be tested and at least part of the historical pipeline flow data are clustered into one cluster, it is determined that the target pipeline has not leaked, thus realizing automatic leakage detection of the target pipeline.

[0016] It is easy to see that this application achieves the identification of the flow data of the pipeline to be tested and the historical flow data of the pipeline without leakage by clustering the flow data of the pipeline to be tested and the historical flow data of the pipeline without leakage. If the flow data of the pipeline to be tested and the historical flow data of the pipeline without leakage can be clustered into a cluster, it indicates that the two have similar data characteristics. At this time, it can be considered that the flow data of the pipeline to be tested has not deviated significantly from the normal pipeline flow distribution, and thus it can be determined that the target pipeline has no leakage. This enables the rapid elimination of leakage suspicions and greatly improves the automation level and work efficiency of leakage detection in drainage pipe networks. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the pipeline leakage detection equipment of this application; Figure 2 This is a flowchart illustrating the first embodiment of the pipeline leakage detection method of this application; Figure 3 This is a detailed flowchart illustrating step S200 of the pipeline leakage detection method of this application; Figure 4 This is a detailed flowchart illustrating the steps of training the pipeline flow clustering model in the pipeline leakage detection method of this application; Figure 5 This is a detailed flowchart of step T200 of the pipeline leakage detection method of this application; Figure 6This is a detailed flowchart of step T300 of the pipeline leakage detection method of this application; Figure 7 This is a detailed flowchart illustrating the process following step S200 in the pipeline leakage detection method of this application. Figure 8 This is a detailed flowchart illustrating the process following step S210 in the pipeline leakage detection method of this application.

[0018] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0019] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0020] Urban drainage networks are like the "blood vessels" of a city, its "lifeline," and the first line of defense for urban environmental protection. They are responsible for the city's drainage work day and night, playing a very important role in urban flood control, public health and safety, and water pollution prevention and control. They are an important part of urban infrastructure and one of the important foundations for achieving healthy, coordinated and sustainable urban economic and social development.

[0021] While urbanization brings convenience and comfort to people, it also brings some negative impacts, including a large number of problems such as insufficient drainage capacity of the original underground pipe network in old urban areas, mixed flow of rainwater and sewage, serious urban flooding, and damage, aging and leakage of existing pipe networks.

[0022] In related technologies, leakage detection of drainage pipes is generally carried out manually on a regular basis, which is extremely inefficient and can lead to greater pollution after leakage occurs.

[0023] Therefore, improving the efficiency of pipeline leakage detection is an urgent problem to be solved in the current treatment and maintenance of drainage pipelines.

[0024] The main solution of this application is to obtain the flow data of the target pipeline to be tested and the historical flow data of the pipeline; the historical flow data is the flow data when the pipeline is not leaking; the flow data of the target pipeline to be tested and the historical flow data are clustered; if the flow data of the target pipeline to be tested and at least part of the historical flow data are clustered into a cluster, it is determined that the target pipeline has not leaked.

[0025] This application clusters the obtained flow data of the pipeline to be tested with the flow data when the pipeline was not leaking. When the data to be tested is clustered with some historical pipeline flow data, it can be determined that the water flow behavior of the target pipeline in the current period is consistent with the pipeline flow state under the historical undamaged condition, and there is no obvious sign of leakage. This enables the rapid and accurate elimination of leakage suspicions and greatly improves the automation level and work efficiency of leakage detection in drainage pipe networks.

[0026] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0027] It should be noted that the executing entity in this embodiment can be a pipeline leakage detection device, or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or other device capable of performing the above functions. This embodiment does not specifically limit it in this way. The following uses a pipeline leakage detection device as the executing entity to describe this embodiment and the following embodiments.

[0028] The following embodiments of this application will describe the pipeline leakage detection method, apparatus, and storage medium used in the technical implementation of this application: Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a pipeline leakage detection device in the hardware operating environment involved in the embodiments of this application.

[0029] like Figure 1 As shown, the pipeline leakage detection device may include: a processor 1001, such as a CPU, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between these components. The user interface 1003 may include a voice pickup module, such as a microphone array; optionally, the user interface 1003 may also be a display screen or an input unit such as a keyboard. The memory 1005 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. The memory 1005 can be used to store the operating system and pipeline leakage detection program running within the pipeline leakage detection device. It also includes a network communication module for storing network interface configuration parameters and a user interface module for storing user interface configuration parameters. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0030] It is understood that the pipeline leakage detection device may also include a network interface 1004, which may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). Optionally, the pipeline leakage detection device may also include RF (Radio Frequency) circuitry, sensors, audio circuitry, a Wi-Fi module, etc.

[0031] Those skilled in the art will understand that Figure 1 The structure of the pipeline leakage detection equipment shown does not constitute a limitation on the pipeline leakage detection equipment. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0032] Based on, but not limited to, the hardware structure of the pipeline leakage detection equipment described above, this application provides a first embodiment of a pipeline leakage detection method. (Refer to...) Figure 2 , Figure 2 A flowchart illustrating the first embodiment of the pipeline leakage detection method of this application is shown.

[0033] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0034] In this embodiment, the pipeline leakage detection method includes: Step S100: Obtain the flow data of the target pipeline to be detected and the historical flow data of the pipeline.

[0035] Among them, the historical pipeline flow data is the flow data when the pipeline is not leaking.

[0036] In this embodiment, the target pipe can be a section of drainage pipe in a drainage network. The flow rate data of the pipe to be detected is the water flow rate data of the target pipe within a certain time period, which can be obtained by an ultrasonic cross-correlation flow meter installed on the drainage pipe. It is understood that, in order to ensure the real-time nature of the detection, the flow rate data of the pipe to be detected can be the pipe flow rate data within the current time period.

[0037] Historical pipeline flow data can be pipeline water flow data related to the target pipeline. For example, it can be pipeline water flow data of the drainage pipeline served by the target pipeline before the current time period. In this embodiment, the historical pipeline flow data is the historical pipeline flow data of the drainage pipeline under the condition of no leakage.

[0038] Step S200: Cluster the pipeline flow data to be detected with historical pipeline flow data.

[0039] Step S300: If the flow data of the pipeline to be detected and at least some of the historical pipeline flow data are clustered into a single cluster, then it is determined that the target pipeline has not experienced leakage.

[0040] If the pipeline flow data to be detected is clustered with historical pipeline flow data into a single cluster, this indicates that the currently detected pipeline flow data is similar to or consistent with the normal pipeline flow data exhibited by the pipeline in the past when there was no leakage. This means that the water flow behavior of the target pipeline in the current time period is consistent with the historical pipeline flow state in the past when there was no leakage, and there is no significant deviation from the normal flow distribution.

[0041] Understandably, since the collected historical pipeline flow data may be pipeline flow data from different time periods in the drainage network, when using relevant clustering algorithms to cluster the historical pipeline flow data and the pipeline flow data to be detected, the temporal correlation between the historical pipeline flow data and the current pipeline flow data to be detected must be considered. That is, the distribution of historical pipeline flow data differs across different time periods; factors such as day and night, weekdays and weekends, and seasonal variations all affect the distribution of historical pipeline flow. In other words, historical pipeline flow data from different time periods may be clustered into different clusters. Since the historical pipeline flow data represents the historical water flow from pipelines without leakage, if the pipeline flow data to be detected clusters with a portion of the historical pipeline flow data into the same cluster, it can be considered that the pipeline flow data to be detected matches the historical water flow data of pipelines without leakage at a certain time period, without significant deviation from the normal flow distribution. In this case, it can be determined that the target pipeline is not leaking.

[0042] Furthermore, refer to Figure 3 In one feasible implementation, step S200 includes: Step S210: Input the target pipeline flow data into the pipeline flow clustering model for clustering.

[0043] The pipeline flow clustering model is obtained by training the DBSCAN clustering model using historical flow data from pipelines without leakage and historical flow data from pipelines with leakage.

[0044] In this embodiment, the historical flow data of the non-leaking pipeline is the pipeline water flow data of the same model as the target pipeline in the drainage network where the target pipeline is located when it is in a non-leaking state, and the historical flow data of the leaking pipeline is the pipeline water flow data of the same model as the target pipeline in the drainage network where the target pipeline is located when it is leaking.

[0045] Understandably, various clustering algorithms can be used to perform clustering analysis on the pipeline flow data to be detected and historical pipeline flow data. Considering the data distribution characteristics of pipeline flow data in different time periods, this implementation method uses the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering model as the basis to construct a pipeline flow clustering model.

[0046] Specifically, the pipeline flow clustering model obtained by training the DBSCAN clustering model can cluster the historical flow data of non-leaking pipelines within the same time period into a cluster, while the historical flow data of leaking pipelines within the same time period will be regarded as noise data. At this time, if the flow data of the pipeline to be detected is clustered with the historical flow data of non-leaking pipelines within a certain time period into a cluster, then it can be determined that the target pipeline has not experienced leakage.

[0047] Understandably, the DBSCAN clustering model is effective in identifying flow rate changes before and after pipeline leakage because it does not require pre-setting the number of clusters and can effectively handle data distributions of arbitrary shapes. The pipeline flow rate clustering model trained using DBSCAN can group historical flow rate data from pipelines without leakage within the same time period, forming clusters representing normal operating conditions. Because the spatial density of pipeline flow rate data under leakage conditions differs from that of normal pipeline flow rate data, it will be identified as noise data by the pipeline flow rate clustering model and thus excluded from the clusters.

[0048] When the flow data of the pipeline to be monitored can successfully form a new cluster with the flow data of some pipelines without leakage in the pipeline flow clustering model, it can be determined that there is no leakage in the target pipeline during the corresponding time period. This implementation provides an automated monitoring method based on pipeline flow data and the DBSCAN clustering model, which helps to improve the efficiency of drainage network management, promptly detect and locate potential pipeline leakage problems, and reduce the risk of water waste and damage to related infrastructure.

[0049] Furthermore, refer to Figure 4 In one feasible implementation, the pipeline flow clustering model is trained through the following steps: Step T100: Based on the collection time of each historical pipeline flow data, divide the multiple historical pipeline flow data into multiple historical pipeline flow datasets.

[0050] Step T200: Select the historical pipeline flow dataset with the most stable trend of pipeline flow change over time from various historical pipeline flow datasets as the reference dataset.

[0051] Step T300: Based on the reference dataset, train the DBSCAN clustering model to obtain the trained pipeline flow clustering model.

[0052] Each pipeline flow dataset includes a subset of historical flow data from pipelines without leakage and a subset of historical flow data from pipelines with leakage.

[0053] In this embodiment, the collection time is the historical pipeline flow data collection point. The collected historical pipeline flow data can be divided into different time periods each day according to the time point. For example, historical pipeline flow data collected during the day can be divided into one historical pipeline flow dataset, and historical pipeline flow data collected at night can be divided into another historical pipeline flow dataset. Each historical pipeline flow dataset contains a subset of historical flow data from pipelines without leakage and a subset of historical flow data from pipelines with leakage. In other words, the historical flow dataset is further divided according to the leakage status of the pipeline to facilitate subsequent model training processing.

[0054] In a specific example, the historical pipeline flow data can be partitioned based on the time series stationarity of the data. This involves determining the mean, variance, and other characteristics of the historical pipeline flow data over a continuous time series. If a significant change occurs in the statistical properties (such as mean and variance) of the historical pipeline flow data at a certain point in time, that point is used as the basis for partitioning the historical pipeline flow dataset. This process continues until all historical pipeline flow data has been partitioned. Subsequently, the historical pipeline flow dataset is divided into subsets of historical flow data from pipelines with no leakage and subsets of historical flow data from pipelines with leakage, based on the leakage status of the pipelines.

[0055] Subsequently, the historical pipeline flow datasets were further filtered based on the stability of their flow rate trends over time, and the dataset with the most stable flow rate trends was selected as the reference dataset. The flow rate trend over time reflects the magnitude of fluctuations in flow rate within a defined time period; the smallest fluctuation indicates the most stable flow rate.

[0056] Understandably, selecting the historical pipeline flow dataset with the most stable time variation trend as the reference dataset for training the DBSCAN clustering model can provide a stable reference data source for the DBSCAN clustering model, so that the trained pipeline flow clustering model has a high accuracy in detecting pipeline leakage status.

[0057] Reference Figure 5 As a feasible implementation method, the historical pipeline flow data set with the most stable trend of pipeline flow change over time in step T200 can be selected as the reference dataset in the following way: Step T210: Perform linear regression processing on the subsets of historical flow data of undamaged pipelines in each historical pipeline flow dataset to obtain the linear regression correlation coefficients of each subset of historical flow data of undamaged pipelines.

[0058] Step T220: Use the historical pipeline flow dataset with the highest linear regression correlation coefficient as the reference dataset.

[0059] In this embodiment, a time-flow scatter plot can be drawn for the subset of historical flow data from undamaged pipelines in each historical pipeline flow dataset. This flow rate represents the cumulative flow data of historical flow data over time within the current time period. A scatter plot of historical flow data with time as the horizontal axis and cumulative flow data as the vertical axis is drawn based on each subset of historical flow data from undamaged pipelines. Linear regression processing is then performed on each scatter plot, and the correlation coefficient corresponding to each scatter plot after linear regression processing is calculated.

[0060] Understandably, the correlation coefficient reflects the linear correlation between historical flow data of undamaged pipelines and time. The larger the correlation coefficient, the stronger the linear correlation, indicating that the pipeline flow rate changes most stably over time.

[0061] Furthermore, as a possible implementation method, refer to Figure 6 Step T300 includes: Step T310: Input the reference dataset as the training sample set into the pre-built DBSCAN clustering model to obtain the current temporary cluster.

[0062] Step T320: Based on the current temporary cluster, adjust the neighborhood radius and / or minimum neighbor number of the DBSCAN clustering model.

[0063] Step T330: Return to the execution and adjust the neighborhood radius and / or minimum neighbor number of the DBSCAN clustering model based on the current temporary cluster until each data point in the current temporary cluster is marked as a core point or noisy data. The temporary cluster then becomes a cluster, and the trained pipeline flow clustering model is obtained.

[0064] In this embodiment, the temporary clusters can be one or more clusters obtained by the DBSCAN clustering model when the reference dataset is first input into the model, and the model clusters the reference dataset based on the initial neighborhood radius and the initial minimum neighbor number. It can be understood that the neighborhood radius Eps and the initial minimum neighbor number MinPts are model parameters in the DBSCAN model. The DBSCAN model processes the input data as follows: Set initial Eps and initial MinPts. Iterate through each data point p in the reference dataset. Calculate the number of points in the neighborhood of data point p. If there are at least MinPts points in the neighborhood (including point p itself), then point p is considered a core object. Starting with the core object, expand its neighborhood to include other core objects and their neighbors, connecting more points through density reachability. This means adding points that satisfy the core object condition within the neighborhood to an existing cluster or creating a new cluster. For points already assigned to a core object in a cluster, if they are also core objects, continue searching their neighborhoods until no new core objects are found. Continue iterating through the remaining points in the dataset that have not been assigned to any cluster, repeating the above cluster expansion process until all points have been examined. The clustering process ends when all points have been classified as part of a cluster or labeled as noise points.

[0065] Using the above clustering method, after obtaining the temporary clusters initially output by the DBSCAN clustering model, it is determined whether the current temporary clusters are clusters formed by the historical flow data of the undamaged pipelines in the reference dataset. If not, the model parameters Eps and / or MinPts are adjusted until each data point in the temporary clusters output by the model is marked as a core point or noise data. That is, all the historical flow data of the undamaged pipelines in the reference dataset form a cluster, and the historical flow data of the leaked pipelines form noise data. At this time, the DBSCAN clustering model is trained as a pipeline flow clustering model.

[0066] Furthermore, refer to Figure 7 In one possible implementation, after step S200, the method further includes: In step S400, if the flow data of the pipeline to be detected and the historical flow data of the pipeline are not merged into a single cluster, then it is determined that the target pipeline has leaked.

[0067] Step S500: Generate pipeline leakage alarm information.

[0068] The pipeline leakage alarm information includes pipeline location information.

[0069] Understandably, if the pipeline flow data to be detected and the historical pipeline flow data are not merged into the same cluster, or if the pipeline flow data to be detected forms a separate cluster or only a portion of the data forms a cluster with the pipeline flow data to be detected, then the pipeline flow data to be detected can be considered abnormal. In this case, it is determined that the target pipeline has leaked. If a leak is detected in the target pipeline, a pipeline leak alarm message containing the location information of the target pipeline is generated to prompt relevant personnel to further confirm and handle the situation.

[0070] Furthermore, as a specific implementation method, refer to Figure 8 After step S210, the following steps are also included: Step S600: If the flow data of the pipeline to be detected is merged into a new cluster with the cluster corresponding to the subset of historical flow data of the pipeline without leakage in the pipeline flow clustering model, then it is determined that the target pipeline has not experienced leakage.

[0071] Since the historical flow data of all non-leaking pipelines in the trained pipeline flow clustering model form a cluster, when the pipeline flow data to be detected is input into the pipeline flow clustering model for clustering processing, if the pipeline flow clustering model clusters the pipeline flow data to be detected and the historical flow data of non-leaking pipelines together, that is, forms a new cluster, then it can be considered that the pipeline flow of the target pipeline has similar characteristics to the pipeline flow of non-leaking pipelines, and the target pipeline has not experienced leakage.

[0072] It is worth mentioning that the pipeline flow data to be detected can be the pipeline flow data collected on the same day and corresponding to the reference dataset during the same time period. Understandably, the pipeline flow data at this time shows the most stable trend over time, resulting in the best detection effect. At the same time, selecting a certain time period for leak detection of the target pipeline can also reduce the amount of data processing in the pipeline data clustering model and reduce detection costs.

[0073] This embodiment compares and analyzes real-time acquired pipeline flow data to be detected with historical pipeline flow data under leak-free conditions, and uses a clustering algorithm to correlate and cluster the two. By selecting historical pipeline flow data, it ensures that factors affecting flow changes, such as environmental conditions and water usage habits, are fully considered during the analysis, enabling effective clustering and comparison between the pipeline flow data to be detected and historical pipeline flow data. When the data to be detected clusters with a portion of historical pipeline flow data, it can be determined that the water flow behavior of the target pipeline in the current time period is consistent with the pipeline flow state under historical leak-free conditions, with no obvious signs of leakage. This allows for the rapid elimination of suspected leakage, greatly improving the automation level and work efficiency of drainage network leakage detection, effectively saving resources and ensuring the safe and stable operation of the water supply system.

[0074] Based on the same inventive concept, this application also provides a pipeline leakage detection device, which includes: The acquisition module is used to acquire the flow data of the target pipeline to be detected and the historical flow data of the pipeline; the historical flow data includes the historical flow data of pipelines without leakage. The clustering module is used to cluster the pipeline flow data to be tested with historical pipeline flow data; The detection module is used to determine that the target pipeline has not experienced leakage if the flow data of the pipeline to be detected and the historical pipeline flow data are merged into a single cluster.

[0075] It should be noted that the various embodiments of the pipeline leakage detection device in this example, and the technical effects they achieve, can be referred to the various implementation methods of the pipeline leakage detection method in the foregoing examples, and will not be repeated here.

[0076] Furthermore, embodiments of this application also propose a computer storage medium storing a pipeline leakage detection program. When executed by a processor, the pipeline leakage detection program implements the steps of the pipeline leakage detection method described above. Therefore, it will not be repeated here. Additionally, the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments of this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed to execute on a single computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0077] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0078] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided in this application, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0079] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0080] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for detecting pipeline leakage, characterized in that, The method includes: Obtain the flow rate data of the target pipeline and the historical flow rate data of the pipeline; the historical flow rate data is the flow rate data when the pipeline is not leaking. Clustering the pipeline flow data to be detected with the historical pipeline flow data; including: The pipeline flow data to be detected is input into the pipeline flow clustering model for clustering; the pipeline flow clustering model is obtained by training the DBSCAN clustering model using historical flow data of pipelines without leakage and historical flow data of pipelines with leakage; Based on the collection time of each of the historical pipeline flow data, the multiple historical pipeline flow data are divided into multiple historical pipeline flow datasets; each historical pipeline flow dataset includes a subset of historical flow data from pipelines without leakage and a subset of historical flow data from pipelines with leakage. The historical pipeline flow dataset with the most stable trend of pipeline flow change over time is selected from the aforementioned historical pipeline flow datasets as the reference dataset; Based on the reference dataset, the DBSCAN clustering model is trained to obtain a trained pipeline flow clustering model; including: The reference dataset is used as a training sample set and input into the pre-built DBSCAN clustering model to obtain the current temporary clusters. Based on the current temporary cluster, adjust the neighborhood radius and / or the minimum neighbor number of the DBSCAN clustering model; Return to the previous step and adjust the neighborhood radius and / or minimum neighbor number of the DBSCAN clustering model based on the current temporary cluster until each data point of the current temporary cluster is marked as a core point or noise data. The temporary cluster then becomes a cluster, and the trained pipeline flow clustering model is obtained. If the pipeline flow data to be detected and at least a portion of the historical pipeline flow data are clustered into a single cluster, then it is determined that the target pipeline has not experienced leakage.

2. The pipeline leakage detection method according to claim 1, characterized in that, The step of selecting the historical pipeline flow dataset with the most stable trend of pipeline flow change over time from each of the aforementioned historical pipeline flow datasets as a reference dataset includes: Linear regression processing is performed on the subsets of historical flow data of non-leaking pipelines in each of the historical pipeline flow datasets to obtain the linear regression correlation coefficients of each subset of historical flow data of non-leaking pipelines. The historical pipeline flow dataset with the highest linear regression correlation coefficient is used as the reference dataset.

3. The pipeline leakage detection method according to claim 1, characterized in that, After inputting the pipeline flow data to be detected into the pipeline flow clustering model for clustering, the method further includes: If the clusters corresponding to the subset of historical flow data of the pipeline without leakage are merged into a new cluster in the pipeline flow clustering model, then it is determined that the target pipeline has not experienced leakage.

4. The pipeline leakage detection method according to claim 1, characterized in that, After clustering the pipeline flow data to be detected with the historical pipeline flow data, the method further includes: If the flow data of the pipeline to be detected and the historical flow data of the pipeline are not merged into a single cluster, then it is determined that the target pipeline has experienced leakage. Generate pipeline leakage alarm information; the pipeline leakage alarm information includes pipeline location information.

5. A pipeline leakage detection device, characterized in that, The pipeline leakage detection device, employing the pipeline leakage detection method as described in any one of claims 1 to 4, comprises: The acquisition module is used to acquire the flow data of the target pipeline to be detected and the historical flow data of the pipeline; the historical flow data includes the historical flow data of pipelines without leakage. A clustering module is used to cluster the pipeline flow data to be detected and the historical pipeline flow data; including: inputting the pipeline flow data to be detected into a pipeline flow clustering model for clustering; the pipeline flow clustering model is obtained by training a DBSCAN clustering model using historical flow data of pipelines without leakage and historical flow data of pipelines with leakage; The clustering module is further configured to divide the historical pipeline flow data into multiple historical pipeline flow datasets based on the collection time of each historical pipeline flow data; each historical pipeline flow dataset includes a subset of historical flow data from pipelines without leakage and a subset of historical flow data from pipelines with leakage; select the historical pipeline flow dataset with the most stable trend of pipeline flow over time from each historical pipeline flow dataset as a reference dataset; train the DBSCAN clustering model based on the reference dataset to obtain a trained pipeline flow clustering model; including: inputting the reference dataset as a training sample set into the pre-built DBSCAN clustering model to obtain a current temporary cluster; adjusting the neighborhood radius and / or minimum neighbor number of the DBSCAN clustering model based on the current temporary cluster; returning to execute the step of adjusting the neighborhood radius and / or minimum neighbor number of the DBSCAN clustering model based on the current temporary cluster until each data point of the current temporary cluster is marked as a core point or noise data, and the temporary cluster becomes a cluster, thus obtaining the trained pipeline flow clustering model; The detection module is used to determine that the target pipeline has not experienced leakage if the flow data of the pipeline to be detected and the historical flow data of the pipeline are merged into a single cluster.

6. A pipeline leakage detection device, characterized in that, include: A processor, a memory, and a pipeline leakage detection program stored in the memory, the pipeline leakage detection program being executed by the processor to implement the steps of the pipeline leakage detection method as claimed in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a pipeline leakage detection program, which, when executed by a processor, implements the pipeline leakage detection method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Online anomaly monitoring and diagnosis method and system

    CN108596229A

  • Water supply pipeline leakage detection method based on graph neural network

    CN115654381A