Classified early warning method, device, equipment and medium for community water supply network leakage incidents

Through the DBSCAN-KF coupling state estimation method, the problem of difficult distinction between leakage incidents in the community water supply pipeline network and normal user water use and monitoring errors is solved, and more accurate leakage incident warning and hierarchical judgment is achieved, reducing false alarms and improving pipeline maintenance is improved. Accuracy of decision making.

CN113065721BActive Publication Date: 2024-11-22TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110492568.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-06
Publication Date
2024-11-22
Estimated Expiration
2041-05-06

AI Technical Summary

Technical Problem

The prior art is difficult to effectively distinguish the leakage incidents of the community water supply pipeline network from data changes caused by normal user water use or monitoring errors, resulting in frequent false alarms, especially when the number of community users is small and the water use is high.

Method used

The leakage event hierarchical early warning method of cell water supply network based on abnormal state estimation is adopted. By obtaining inlet traffic data, missing values ​​and outliers are repaired, and leakage events are judged using DBSCAN clustering algorithm and Kalman filter KF coupling state estimation. and output different warning levels.

Benefits of technology

It reduces false alarms caused by random users' water use and monitoring errors, achieves more accurate leakage incident warning, and can make graded judgments on leakage incidents, providing more comprehensive and accurate information to support pipeline maintenance and maintenance decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113065721B_ABST
    Figure CN113065721B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, equipment and medium for hierarchical early warning of leakage events in a community water supply network based on abnormal state estimation, the method comprising: obtaining the flow data of the entrance of the community water supply network, preprocessing the obtained data, repairing missing values ​​and abnormal values; judging whether the data at the time to be detected is an outlier, mapping the detection result to the input state of the Kalman filter KF, judging the possibility of leakage events through adaptive abnormal state estimation; outputting different early warning levels according to the possibility of leakage events. Compared with the prior art, the method, device, equipment and medium for hierarchical early warning of leakage events in a community water supply network based on abnormal state estimation provided by the present disclosure can specifically identify leakage events in a community water supply network according to the flow change law of the leakage events, reduce false alarms caused by factors such as random user water use and monitoring errors, and achieve more accurate early warning of leakage events.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of water supply network safety early warning, and in particular to a method, device, equipment and medium for hierarchical early warning of community water supply network leakage events based on abnormal state estimation. Background Art

[0002] Due to corrosion, uneven stress, internal pressure and other reasons, the water pipes in the community water supply network may become loose, damaged, or broken, resulting in leakage. Pipeline leakage will not only cause a large amount of water waste, but may also cause pollutant invasion, foundation scouring and settlement, etc., threatening the health and life and property safety of residents. Since some pipeline leaks occur at night or in underground pipelines, it is difficult to find them in time through manual inspections, user complaints, etc. Even if pipeline leaks are found through regular inspections, there are still problems such as high labor costs and difficulty in ensuring timeliness.

[0003] With the development of instrument manufacturing technology and data transmission technology in recent years, a large number of communities are currently equipped with inlet flow meters that collect data in real time. By analyzing the changes in the monitoring data of the flow meter, identifying the changes in the monitoring value caused by the leakage event, and issuing early warnings for the leakage event in a timely manner, the safety and economy of the community water supply can be significantly improved. At present, there have been a large number of studies at home and abroad on detecting leakage events by analyzing the changes in the pipe network flow monitoring data. The main methods used can be divided into prediction-classification methods, clustering methods, etc. Among them, the prediction-classification method first obtains the state prediction value at the current moment from the historical data, and then compares the state prediction value with the actual monitoring value at the current moment. If the difference between the monitoring value and the predicted value is greater than a certain threshold, it is considered that an abnormality occurs at the current moment, so as to judge whether a leakage event has occurred; the clustering method compares and analyzes the monitoring data (or data changes) at the current moment with the historical data to judge whether the data at the current moment is an abnormal value compared with the historical data, so as to judge whether a leakage event has occurred.

[0004] However, the shortcoming of the above method is that it cannot effectively distinguish leakage events from data changes caused by normal large-scale water consumption, data monitoring errors, etc. Especially for communities, due to the relatively small number of users, the randomness of their water consumption is more obvious, which is more likely to be confused with the flow changes caused by leakage events and cause false alarms. How to quantitatively judge the possibility of leakage events based on the flow change characteristics caused by leakage events, and specifically eliminate the impact of monitoring errors, large-scale water consumption, etc., is still a problem to be solved in existing research. Summary of the invention

[0005] 1. Technical issues to be resolved

[0006] In response to the current technical problems, the present disclosure proposes a graded early warning method, device, equipment and medium for community water supply network leakage events based on abnormal state estimation.

[0007] (II) Technical solution

[0008] The purpose of this disclosure can be achieved through the following technical solutions:

[0009] The present disclosure provides a graded early warning method for leakage events in a residential water supply network based on abnormal state estimation, comprising: obtaining flow data at an inlet of a residential water supply network, preprocessing the obtained data, and repairing missing values ​​and abnormal values; judging whether the data at a time to be detected is an outlier, mapping the detection result to the input state of a Kalman filter KF, judging the possibility of a leakage event through adaptive abnormal state estimation; and outputting different early warning levels according to the possibility of a leakage event.

[0010] In the embodiment of the present disclosure, the method of obtaining the flow data at the entrance of the community water supply network, preprocessing the obtained data, and repairing missing values ​​and abnormal values ​​includes: using a flow meter to obtain the flow data at the entrance of the community water supply network, rearranging the flow data in chronological order, identifying missing values ​​in the data, and repairing the missing values; defining the data abnormal value detection limit N sigma , calculate the mean value Qmean and standard deviation Q of all monitoring data std ,definition The data are outliers and the outliers are repaired.

[0011] In the disclosed embodiment, the repairing of missing values ​​includes: for missing values, using the mean of the traffic data at the corresponding time of the previous day and the next day to repair them; if the data of the previous day and the next day are still missing, using the non-missing data at the corresponding time of the most adjacent day to repair them.

[0012] In the disclosed embodiment, the repairing of outliers includes: for outliers, replacing them with the mean of the traffic data at the corresponding time of the previous day and the next day; if the data of the previous day and the next day are still outliers, replacing them with the non-outlier data at the corresponding time of the most adjacent day.

[0013] In the disclosed embodiment, after the abnormal value is repaired, it also includes: defining the number of days nd of historical data to be compared, and obtaining the historical flow monitoring data values ​​of the flow meter at the entrance of the community water supply network at the current time and the previous nd days.

[0014] In the disclosed embodiment, the method of determining whether the data at the time to be detected is an outlier, mapping the detection result to the input state of the Kalman filter KF, and determining the possibility of a leakage event by adaptive abnormal state estimation includes: assuming that the current time is the time t on the dth day, extracting the historical data at the same time every day of the previous nd days as the data set D to be detected, expressed as: D = (Q d-nd,t , …, Q d-1,t , Q d,t ), where Q d,t represents the traffic monitoring value of the community entrance at time t on day d; input the data set D to be tested into the DBSCAN clustering algorithm to identify the outliers in the data set; determine the traffic monitoring value Q of the community entrance at the current time d,t Is it an outlier? Set the initial state information i0=0 of the Kalman filter KF, the corresponding variance P0=1, and the state prediction process variance P Q =1; map the DBSCAN outlier detection result to the input state information of the Kalman filter KF; use the Kalman filter KF to calculate the optimal state estimate at the current moment, that is, the possibility of a leakage event at the current moment, based on the state information at the current moment and the state prediction at the previous moment.

[0015] In the embodiment of the present disclosure, the step of inputting the to-be-detected data set D into the DBSCAN clustering algorithm to identify outliers in the data set includes:

[0016] Step 221: Setting the minimum number of clustering instances of the DBSCAN clustering algorithm to γ ​​= 2;

[0017] Step 222: Consider each data in the to-be-detected data set D as a point on the coordinate axis, and calculate the Euclidean distance between each two points, so as to obtain nd(nd-1) / 2 pairs of Euclidean distances in total; arrange all the calculated distances from large to small to obtain the vector

[0018] Step 223: Set the distance threshold ξ of the DBSCAN algorithm to 0.15,

[0019]

[0020] Among them, round is the operation function, which means rounding to the nearest integer; ε is the clustering neighborhood radius of DBSCAN;

[0021] Step 224: randomly select a data point in D as the current point, and set the cluster mark C=1;

[0022] Step 225: All points whose Euclidean distance to the current point is less than ε are defined as neighboring points of the current point; if the number of neighboring points is less than γ, the current point is marked as an outlier and the process goes to step 227; otherwise, the current point is marked as a core point of cluster C;

[0023] Step 226: Repeat step 225 for each neighboring point of the current point in turn until no new neighboring points appear; all discovered neighboring points belong to cluster C;

[0024] Step 227: Select the next unmarked point as the current point, set the cluster mark C=C+1, and repeat steps 225 and 226 until all points are marked.

[0025] In the embodiment of the present disclosure, the mapping of the DBSCAN outlier detection result to the input state information of the Kalman filter KF includes: when the detection result at the current moment is an outlier, setting the input state information i of the Kalman filter KF k =1, input process variance P R_k =1; when the detection result at the current moment is normal, set the input state information i of the Kalman filter KF k =0, input process variance P R_k =10.

[0026] In the embodiment of the present disclosure, the method of using a Kalman filter KF to calculate the optimal state estimate at the current moment according to the state information at the current moment and the state prediction at the previous moment includes:

[0027] Step 261: According to the state p at the previous moment k-1 and its variance P k-1 , estimate the current state prediction value P k|k-1 and its variance P k|k-1 , expressed as:

[0028] P k|k-1 =F k P k-1

[0029] P k|k-1 =F k P k-1 F k T +P Q

[0030] where F k is the state prediction operator, and the superscript T represents the transposition operation;

[0031] Step 262: Calculate the Kalman gain G at the current moment k , expressed as:

[0032] G k =P k|k-1 H k (H k P k|k-1 H k T +P R ) -1

[0033] Among them, H k Enter operators for the states;

[0034] Step 263: Calculate the optimal state estimate p at the current moment k and variance P k , expressed as:

[0035] p k =P k|k-1 +G k (i k -H k P k|k-1 )

[0036] P k =(IG k H k ) k|k-1 (IG k H k ) T +G k P R G k T

[0037] Where I represents the identity matrix;

[0038] Step 264: Estimate the optimal state at the current moment p k Considered as the possibility of a leak event at the current moment.

[0039] In the embodiment of the present disclosure, the output of different warning levels according to the possibility of a leakage event includes: setting the possibility of a leakage event to 0.01-0.4 as a low-level warning, 0.4-0.7 as a medium-level warning, and greater than 0.7 as a high-level warning; judging the possibility of a leakage event at the current moment p k The threshold range to which it belongs outputs the corresponding warning level.

[0040] Another aspect of the present disclosure provides a graded early warning device for leakage events in a community water supply network based on abnormal state estimation, the device comprising:

[0041] The data preprocessing module is used to obtain the flow data of the entrance of the community water supply network, preprocess the obtained data, and repair missing values ​​and abnormal values;

[0042] The DBSCAN-KF coupled state estimation module is used to determine whether the data at the time of detection is an outlier, map the detection result to the input state of the Kalman filter KF, and determine the possibility of a leakage event through adaptive abnormal state estimation;

[0043] The graded warning module is used to output different warning levels according to the possibility of leakage incidents.

[0044] On the other hand, the present disclosure provides an electronic device, including: a processor; a memory, which stores a computer executable program, and when the program is executed by the processor, the processor executes the method for graded early warning of community water supply network leakage events based on abnormal state estimation.

[0045] On the other hand, the present disclosure provides a storage medium including computer executable instructions, characterized in that when the computer executable instructions are executed, the method for graded early warning of community water supply network leakage events based on abnormal state estimation is implemented.

[0046] In yet another aspect, the present disclosure provides a computer program, including: computer executable instructions, which, when executed, are used to implement the method for graded early warning of community water supply network leakage events based on abnormal state estimation.

[0047] (III) Beneficial effects

[0048] The method, device, equipment and medium for hierarchical early warning of community water supply network leakage events based on abnormal state estimation provided by the present disclosure can specifically identify community water supply network leakage events according to the flow change law, reduce false alarms caused by factors such as random user water use and monitoring errors, and achieve more accurate early warning of leakage events. Compared with the prior art, the present disclosure has the following advantages:

[0049] 1. Existing technical methods usually judge leakage events based on outliers of data at a single moment, which is easily caused by false alarms due to factors such as random large-scale water consumption and monitoring errors. The present disclosure innovatively proposes a DBSCAN-KF coupled state estimation method. DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based clustering algorithm. Based on outlier identification, the DBSCAN clustering algorithm further uses a state estimation algorithm to analyze the distribution of outliers over a period of time according to the continuity of leakage events in time, and judge the possibility of leakage. It effectively avoids false alarms caused by large-scale water consumption, monitoring errors, etc., and improves the accuracy of leakage event detection;

[0050] 2. Most methods only include two states of "occurrence" and "non-occurrence" in the judgment of leakage events. In contrast, the present disclosure, with the help of DBSCAN-KF coupled state estimation method, can evaluate the possibility of leakage events in real time, give graded warnings, and effectively distinguish leakage events of different severity. Compared with existing methods, it can provide more comprehensive and accurate information for operators, and provide decision-making basis and guidance for the maintenance and repair of pipeline networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] For a more complete understanding of the present disclosure and its advantages, reference will now be made to the following description taken in conjunction with the accompanying drawings, in which:

[0052] Figure 1 It is a flowchart of a method for graded early warning of community water supply network leakage events based on abnormal state estimation according to an embodiment of the present disclosure.

[0053] Figure 2 It is a block diagram of a graded early warning device for community water supply network leakage events based on abnormal state estimation according to an embodiment of the present disclosure.

[0054] Figure 3 It is the identification result of outliers, leakage event possibilities, and warning levels according to the embodiment of the present disclosure, and the data span is 1 month.

[0055] Figure 4 It is a block diagram of an electronic device for providing graded warning of community water supply network leakage events based on abnormal state estimation according to an embodiment of the present disclosure.

[0056]

Reference Numbers

[0057] S1, S2, S3: Steps

[0058] 200: A hierarchical early warning device for community water supply network leakage events based on abnormal state estimation

[0059] 201: Data preprocessing module

[0060] 202: DBSCAN-KF coupled state estimation module

[0061] 203: Grading warning module

[0062] 400: Electronic equipment

[0063] 410: Processor

[0064] 420: Memory

[0065] 421: Computer Programs DETAILED DESCRIPTION

[0066] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0067] The disclosed embodiments provide a method, device, equipment and medium for grading early warning of community water supply network leakage events based on abnormal state estimation. Figure 1 As shown, Figure 1 Flow chart of a method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to an embodiment of the present disclosure. It should be noted that: Figure 1 The examples shown are merely examples of application scenarios to which the embodiments of the present disclosure can be applied, so as to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other environments or scenarios.

[0068] like Figure 1 As shown, the method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation in an embodiment of the present disclosure includes the following steps:

[0069] Step S1: Obtain the inlet flow data of the community water supply network, pre-process the acquired data, and repair missing values ​​and outliers;

[0070] Step S2: determine whether the data at the time to be detected is an outlier, map the detection result to the input state of the Kalman filter KF, and determine the possibility of a leakage event through adaptive abnormal state estimation;

[0071] Step S3: Output different warning levels according to the possibility of leakage incidents.

[0072] In the monitoring data of the community water supply network, due to instrument failure, transmission signal interference and other reasons, the data often contains missing values, obvious outliers, etc. Therefore, before analyzing the monitoring data and identifying leakage events, the monitoring data should be preprocessed first. In the embodiment of the present disclosure, the acquisition of the inlet flow data of the community water supply network in step S1, the preprocessing of the acquired data, and the repair of missing values ​​and outliers specifically include:

[0073] Step S11: Use a flow meter to obtain the flow data at the entrance of the community water supply network, rearrange the flow data in chronological order, identify missing values ​​in the data, and repair the missing values; wherein, repairing the missing values ​​includes: for missing values, use the average of the flow data at the corresponding time of the previous day and the next day to repair it; if the data of the previous day and the next day are still missing, use the non-missing data at the corresponding time of the most adjacent day to repair it.

[0074] Step S12: Define the data outlier detection limit N sigma , calculate the average value Q of all monitoring data mean , standard deviation Q std ,definition The data is an outlier and the outliers are repaired;

[0075] Among them, the repairing of outliers includes: for outliers, replacing them with the average of the traffic data at the corresponding time of the previous day and the next day; if the data of the previous day and the next day are still outliers, replacing them with the non-outlier data at the corresponding time of the most adjacent day.

[0076] Step S13: define the number of days nd of historical data to be compared, and obtain the historical flow monitoring data values ​​of the flow meter at the entrance of the community water supply network at the current time and nd days ago.

[0077] DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based clustering algorithm. In the engineering field, the DBSCAN clustering algorithm has been proven to be a data clustering and outlier detection method with good performance. However, the outliers in the data cannot completely correspond to the occurrence of a leakage event. Therefore, it is impossible to ultimately determine whether a leakage event has actually occurred simply by using the outlier detection results of DBSCAN. In response to this problem, based on the persistence characteristics of leakage events, the present invention further uses the Kalman filter (KF) state estimation algorithm to couple the outlier detection results of DBSCAN and proposes a DBSCAN-KF coupled state estimation method, i.e., step S2.

[0078] In the embodiment of the present disclosure, the step S2 of determining whether the data at the time to be detected is an outlier, mapping the detection result to the input state of the Kalman filter KF, and determining the possibility of a leakage event by adaptive abnormal state estimation specifically includes:

[0079] Step S21: Assume that the current time is day d and time t, extract the previous n historical d The historical data at the same time every day is the data set D to be tested, expressed as: D = (Qd-nd,t , …, Q d-1,t , Q d,t ), where Q d,t Indicates the traffic monitoring value of the cell entrance at time t on day d;

[0080] Step S22: input the data set D to be detected into the DBSCAN clustering algorithm to identify outliers in the data set;

[0081] Step S23: Determine the current cell entrance traffic monitoring value Q d,t Whether it is an outlier;

[0082] Step S24: Set the initial state information i0 of the Kalman filter KF to 0, the corresponding variance P0 to 1, and the state prediction process variance P Q =1;

[0083] Step S25: Map the DBSCAN outlier detection result to the input state information of the Kalman filter KF;

[0084] Step S26: Based on the state information at the current moment and the state prediction at the previous moment, the Kalman filter KF is used to calculate the optimal state estimate at the current moment, that is, the possibility of a leakage event occurring at the current moment.

[0085] In an embodiment of the present disclosure, the step S22 of inputting the to-be-detected data set D into the DBSCAN clustering algorithm to identify outliers in the data set includes:

[0086] Step 221: Setting the minimum number of clustering instances of the DBSCAN clustering algorithm to γ ​​= 2;

[0087] Step 222: Consider each data in the to-be-detected data set D as a point on the coordinate axis, and calculate the Euclidean distance between each two points, so that a total of n d (n d -1) / 2 for Euclidean distance; arrange all the distances from large to small to get the vector

[0088] Step 223: Set the distance threshold ξ of the DBSCAN algorithm to 0.15,

[0089]

[0090] Among them, round is the operation function, which means rounding to the nearest integer; ε is the clustering neighborhood radius of DBSCAN;

[0091] Step 224: randomly select a data point in D as the current point, and set the cluster mark C=1;

[0092] Step 225: All points whose Euclidean distance to the current point is less than ε are defined as neighboring points of the current point; if the number of neighboring points is less than γ, the current point is marked as an outlier and the process goes to step 227; otherwise, the current point is marked as a core point of cluster C;

[0093] Step 226: Repeat step 225 for each neighboring point of the current point in turn until no new neighboring points appear; all discovered neighboring points belong to cluster C;

[0094] Step 227: Select the next unmarked point as the current point, set the cluster mark C=C+1, and repeat steps 225 and 226 until all points are marked.

[0095] In an embodiment of the present disclosure, the step S25 of mapping the DBSCAN outlier detection result to the input state information of the Kalman filter KF includes:

[0096] Step S251: When the detection result at the current moment is an outlier, set the input state information i of the Kalman filter KF k =1, input process variance P R_k =1;

[0097] Step S252: When the detection result at the current moment is a normal value, set the input state information i of the Kalman filter KF k =0, input process variance P R_k =10.

[0098] In an embodiment of the present disclosure, the step S26 uses a Kalman filter KF to calculate the optimal state estimate at the current moment according to the state information at the current moment and the state prediction at the previous moment, including:

[0099] Step 261: Based on the state at the last moment (leakage event possibility) p k-1 and its variance P k-1 , estimate the current state prediction value p k|k-1 and its variance P k|k-1 , expressed as:

[0100] p k|k-1 =F k p k-1

[0101] P k|k-1 =F k P k-1 F k T +P Q

[0102] Among them, F kis the state prediction operator, and the superscript T represents the transposition operation;

[0103] Step 262: Calculate the Kalman gain G at the current moment k , expressed as:

[0104] G k =P k1k-1 H k (H k P k|k-1 H k T +P R ) -1

[0105] Among them, H k Enter operators for the states;

[0106] Step 263: Calculate the optimal state estimate p at the current moment k and variance P k , expressed as:

[0107] p k =p k|k-1 +G k (i k -H k p k|k-1 )

[0108] P k =(IG k H k ) k|k-1 (IG k H k ) T +G k P R G k T

[0109] Where I represents the identity matrix;

[0110] Step 264: Estimate the optimal state at the current moment p k Considered as the possibility of a leak event at the current moment.

[0111] For the operation and management of the actual pipeline network, the numerical value of the possibility of leakage events cannot play an intuitive guiding role. In step S3 of the present disclosure, the possibility of leakage events is further mapped to different warning levels, including:

[0112] Step S31: setting the possibility of a leakage event to 0.01-0.4 as a low-level warning, 0.4-0.7 as a medium-level warning, and greater than 0.7 as a high-level warning;

[0113] Step S32: Determine the probability of leakage event at the current moment k The threshold range to which it belongs outputs the corresponding warning level.

[0114] based on Figure 1 The flowchart of the method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to an embodiment of the present disclosure is shown. Figure 2 A block diagram of a graded early warning device for leakage events in a residential water supply network based on abnormal state estimation according to an embodiment of the present disclosure is shown.

[0115] like Figure 2 As shown, the graded warning device 200 for leakage events in a community water supply network based on abnormal state estimation provided by the embodiment of the present disclosure includes a data preprocessing module 201, a DBSCAN-KF coupled state estimation module 202 and a graded warning module 203. Among them: the data preprocessing module 201 is used to obtain the inlet flow data of the community water supply network, preprocess the obtained data, and repair missing values ​​and abnormal values; the DBSCAN-KF coupled state estimation module 202 is used to determine whether the data at the time to be detected is an outlier, map the detection result to the input state of the Kalman filter KF, and determine the possibility of a leakage event through adaptive abnormal state estimation. The graded warning module 203 is used to output different warning levels according to the possibility of a leakage event.

[0116] It should be understood that the data preprocessing module 201, the DBSCAN-KF coupling state estimation module 202 and the graded warning module 203 can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.

[0117] According to an embodiment of the present disclosure, at least one of the data preprocessing module 201, the DBSCAN-KF coupling state estimation module 202 and the graded warning module 203 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware in any other reasonable way of integrating or packaging the circuit, or in a proper combination of software, hardware and firmware. Alternatively, at least one of the data preprocessing module 201, the DBSCAN-KF coupling state estimation module 202 and the graded warning module 203 can be at least partially implemented as a computer program module, and when the program is run by a computer, the function of the corresponding module can be executed.

[0118] The embodiment of the present disclosure uses the monitoring data of a flow meter at the entrance of a residential community as an example to further illustrate the implementation process of the graded early warning method for residential water supply network leakage events based on abnormal state estimation provided by the present disclosure.

[0119] (1) Collect monitoring data and preprocess the data.

[0120] In this embodiment, the monitoring data of the flow meter at the entrance of the target community from May 2018 to February 2021 were extracted. The data monitoring time interval was 15 minutes, with a total of 99,600 data, and the flow range was 0.2 to 4 cubic meters / 15 minutes. The data preprocessing analysis found that there were 3 time periods with missing data, each missing for 4 hours; there were 7 time periods with data anomalies, and the anomalies were manifested as significantly larger flow (increasing dozens of times in a short period of time) or significantly smaller flow (0 or negative values). The identified missing values ​​and outliers were replaced with the mean of the monitoring data at the corresponding time of the previous day and the next day, respectively.

[0121] (2) Detecting outliers in data

[0122] For each data point after preprocessing, we first extract the historical data of the same time in the previous 30 days to establish a test data set. The test data set is input into the DBSCAN algorithm to obtain the outlier detection and recognition results, such as Figure 3 As shown in the middle dot mark, Figure 3 It is the identification result of outliers, leakage event possibilities, and warning levels according to the embodiment of the present disclosure, and the data span is 1 month.

[0123] (3) The detection results of DBSCAN at each moment are mapped to the input state information of KF, and KF is used to estimate the optimal state at the current moment in combination with the historical state information. The results are as follows: Figure 3 This is shown in the “leakage probability” curve.

[0124] (4) Input the estimated results of the possibility of leakage events into the graded warning module. Set the possibility of leakage events to 0.01-0.4 as a low-level warning, 0.4-0.7 as a medium-level warning, and greater than 0.7 as a high-level warning. Output the warning results at each moment, such as Figure 3 Shown by the dashed line.

[0125] analyze Figure 3As shown in the results, it can be seen that for the monitoring data fluctuations caused by large-scale user water use, monitoring errors, etc., the possibility of leakage events is judged to be small and the warning level is low, as shown in the results from December 9 to December 13; while for the monitoring data fluctuations caused by leakage events, the possibility of leakage events is judged to be large and the warning level is high, as shown in the results from December 17 to December 19. It can be seen from the results that the DBSCAN-KF coupled state estimation module proposed in the present disclosure effectively identifies pipeline network leakage events and avoids false alarms caused by other situations.

[0126] The disclosed embodiment also provides a device for providing a graded early warning of a community water supply network leakage event based on abnormal state estimation, such as Figure 4 As shown, Figure 4 The electronic device 400 is a block diagram of an electronic device for providing a graded warning of a community water supply network leakage event based on abnormal state estimation according to an embodiment of the present disclosure. The electronic device 400 includes: one or more processors 410; a memory 420 storing a computer executable program, which, when executed by the processor 410, enables the processor 410 to implement Figure 1 The shown method is a hierarchical early warning method for leakage events in a residential water supply network based on abnormal state estimation.

[0127] Specifically, the processor 410 may include, for example, a general-purpose microprocessor, an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 410 may also include an onboard memory for cache purposes. The processor 410 may be a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0128] Memory 420, for example, can be any medium capable of containing, storing, conveying, propagating or transmitting instructions. For example, readable storage media can include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices, devices or propagation media. Specific examples of readable storage media include: magnetic storage devices, such as magnetic tapes or hard disks (HDDs); optical storage devices, such as compact disks (CD-ROMs); memory, such as random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0129] The memory 420 may include a computer program 421 , which may include code / computer executable instructions, which when executed by the processor 410 causes the processor 410 to perform a method according to an embodiment of the present disclosure or any variation thereof.

[0130] The computer program 421 may be configured to have, for example, a computer program code including a computer program module. For example, in an example embodiment, the code in the computer program 421 may include at least one program module, for example, including module 421A, module 421B, ... It should be noted that the division method and number of modules are not fixed, and those skilled in the art may use appropriate program modules or program module combinations according to actual conditions, and when these program module combinations are executed by the processor 410, the processor 410 may execute the method according to the embodiment of the present disclosure or any variation thereof.

[0131] The disclosed embodiment also provides a computer-readable medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed, the graded early warning method for leakage events of community water supply pipe networks based on abnormal state estimation according to the disclosed embodiment is implemented.

[0132] According to an embodiment of the present disclosure, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, optical cable, radio frequency signal, etc., or any suitable combination of the above.

[0133] The present disclosure also provides a computer program, which includes: computer executable instructions, which, when executed, are used to implement a graded early warning method for leakage events in a community water supply network based on abnormal state estimation according to an embodiment of the present disclosure.

[0134] So far, the present disclosure has been described in detail in conjunction with the accompanying drawings. Based on the above description, those skilled in the art should have a clear understanding of the present disclosure.

[0135] It should be noted that the implementation methods not shown or described in the drawings or the text of the specification are all forms known to ordinary technicians in the relevant technical field and are not described in detail. In addition, the above definitions of each element are not limited to the various specific structures, shapes or methods mentioned in the embodiments, and ordinary technicians in the field can simply change or replace them.

[0136] Of course, according to actual needs, the present disclosure may also include other parts, which are irrelevant to the innovation of the present disclosure and will not be described here.

[0137] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various disclosed aspects, in the above description of the exemplary embodiments of the present disclosure, the various features of the present disclosure are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: the claimed disclosure requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, the disclosed aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present disclosure.

[0138] In addition, in the drawings or descriptions, similar or identical parts use the same figure numbers. The technical features in the various embodiments exemplified in the specification can be freely combined to form new solutions without conflict. In addition, each claim can be used as an embodiment alone or the technical features in each claim can be combined as a new embodiment. Furthermore, the elements or implementations not shown or described in the drawings are forms known to ordinary technicians in the relevant technical field. In addition, although demonstrations of parameters containing specific values ​​may be provided herein, it should be understood that the parameters do not need to be exactly equal to the corresponding values, but can be approximated to the corresponding values ​​within an acceptable error tolerance or design constraint.

[0139] Unless there are technical obstacles or contradictions, the above-mentioned various embodiments of the present disclosure can be freely combined to form additional embodiments, and these additional embodiments are all within the protection scope of the present disclosure.

[0140] Although the present disclosure is described in conjunction with the accompanying drawings, the embodiments disclosed in the accompanying drawings are intended to exemplify the preferred embodiments of the present disclosure and should not be construed as limiting the present disclosure. The dimensional ratios in the accompanying drawings are merely illustrative and should not be construed as limiting the present disclosure.

[0141] Although some embodiments of the present general inventive concept have been shown and described, it will be appreciated by those skilled in the art that changes may be made to these embodiments without departing from the principles and spirit of the present general inventive concept, the scope of which is defined by the claims and their equivalents.

[0142] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present disclosure. It should be understood that the above description is only a specific embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. A hierarchical early warning method for community water supply network leakage events based on abnormal state estimation, It is characterized in that include: Obtain the inlet flow data of the community water supply network, pre-process the acquired data, and repair missing values ​​and outliers; Determine whether the data at the time to be detected is an outlier, map the detection result to the input state of the Kalman filter KF, and determine the possibility of a leakage event through adaptive abnormal state estimation; Output different warning levels according to the possibility of leakage incidents; The process of determining whether the data at the time to be detected is an outlier, mapping the detection result to the input state of the Kalman filter KF, and determining the possibility of a leakage event by adaptive abnormal state estimation includes: Assume the current time is t on day d, extract the previous n d The historical data at the same time every day is the data set D to be tested, expressed as: D = (Q d-nd,t ,…,Q d-1,t ,Q d,t ), where Q d,t Indicates the traffic monitoring value of the cell entrance at time t on day d; Input the dataset D to be tested into the DBSCAN clustering algorithm to identify outliers in the dataset; Determine the current cell entrance traffic monitoring value Q d,t Whether it is an outlier; Set the initial state information i of the Kalman filter KF 0 =0, corresponding to variance P 0 =1, state prediction process variance P Q =1; Map the DBSCAN outlier detection results to the input state information of the Kalman filter KF; According to the current state information and the state prediction of the previous moment, the Kalman filter KF is used to calculate the optimal state estimate of the current moment, which is the possibility of a leakage event at the current moment.

2. The method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to claim 1, It is characterized in that The method of obtaining the inlet flow data of the community water supply network, preprocessing the obtained data, and repairing missing values ​​and abnormal values ​​includes: Using a flow meter to obtain the flow data at the entrance of the community water supply network, rearrange the flow data in chronological order, identify missing values ​​in the data, and repair the missing values; Define the data outlier detection limit N sigma , calculate the average value Q of all monitoring data mean , standard deviation Q std ,definition The data are outliers and the outliers are repaired.

3. The method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to claim 2, It is characterized in that The repairing of missing values ​​comprises: For missing values, the mean of the traffic data at the corresponding time of the previous day and the next day is used to fill it; if the data of the previous day and the next day are still missing, the non-missing data at the corresponding time of the most adjacent day is used to fill it.

4. The method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to claim 2, It is characterized in that The repairing of abnormal values ​​comprises: For outliers, the mean of the traffic data at the corresponding time of the previous day and the next day is used to replace it; if the data of the previous day and the next day are still outliers, they are replaced by the non-outlier data at the corresponding time of the most adjacent day.

5. The method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to claim 2, It is characterized in that After the outliers are repaired, the following steps are further included: Define the number of days n of historical data to be compared d , get the current time and previous n times of the flow meter at the entrance of the community water supply network d The historical traffic monitoring data value of the day.

6. The method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to claim 1, It is characterized in that The step of inputting the to-be-detected data set D into the DBSCAN clustering algorithm to identify outliers in the data set includes: Step 221: Setting the minimum number of clustering instances of the DBSCAN clustering algorithm to γ ​​= 2; Step 222: Consider each data in the to-be-detected data set D as a point on the coordinate axis, and calculate the Euclidean distance between each two points, so that a total of n d (n d -1) / 2 for Euclidean distance; arrange all the distances from large to small to get the vector Step 223: Set the distance threshold ξ of the DBSCAN algorithm to 0.15, Among them, round is the operation function, which means rounding to the nearest integer; ε is the clustering neighborhood radius of DBSCAN; Step 224: randomly select a data point in D as the current point, and set the cluster mark C=1; Step 225: All points whose Euclidean distance to the current point is less than ε are defined as neighboring points of the current point; if the number of neighboring points is less than γ, the current point is marked as an outlier and the process goes to step 227; otherwise, the current point is marked as a core point of cluster C; Step 226: Repeat step 225 for each neighboring point of the current point in turn until no new neighboring points appear; all discovered neighboring points belong to cluster C; Step 227: Select the next unmarked point as the current point, set the cluster mark C=C+1, and repeat steps 225 and 226 until all points are marked.

7. The method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to claim 1, It is characterized in that The mapping of the DBSCAN outlier detection result to the input state information of the Kalman filter KF includes: When the detection result at the current moment is an outlier, set the input state information i of the Kalman filter KF k =1, input process variance P R_k =1; When the detection result at the current moment is a normal value, set the input state information i of the Kalman filter KF k =0, input process variance P R_k =10.

8. The method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to claim 1, It is characterized in that The method of using a Kalman filter KF to calculate the optimal state estimate at the current moment based on the state information at the current moment and the state prediction at the previous moment includes: Step 261: According to the state p at the previous moment k-1 and its variance P k-1 , estimate the current state prediction value p k|k-1 and its variance P k|k-1 , expressed as: p k|k-1 =F k p k-1 P k|k-1 =F k P k-1 F k T +P Q where F k is the state prediction operator, and the superscript T represents the transposition operation; Step 262: Calculate the Kalman gain G at the current moment k , expressed as: G k =P k|k-1 H k (H k P k|k-1 H k T +P R ) -1 Among them, H k Enter operators for the states; Step 263: Calculate the optimal state estimate p at the current moment k and variance P k , expressed as: p k =p k|k-1 +G k (i k -H k p k|k-1 ) P k =(I-G k H k )P k|k-1 (I-G k H k ) T +G k P R G k T Where I represents the identity matrix; Step 264: Estimate the optimal state at the current moment p k Considered as the possibility of a leak event at the current moment.

9. The method for hierarchical early warning of community water supply network leakage events based on abnormal state estimation according to claim 1, It is characterized in that The output of different warning levels according to the possibility of leakage incidents includes: When the probability of a leakage event is set to 0.01-0.4, it is a low-level warning; when it is 0.4-0.7, it is a medium-level warning; when it is greater than 0.7, it is a high-level warning; Determine the probability of leakage event at the current moment p k The threshold range to which it belongs outputs the corresponding warning level.

10. A graded early warning device for leakage events in a residential water supply network based on abnormal state estimation. It is characterized in that The device comprises: The data preprocessing module is used to obtain the flow data of the entrance of the community water supply network, preprocess the obtained data, and repair missing values ​​and abnormal values; The DBSCAN-KF coupled state estimation module is used to determine whether the data at the time of detection is an outlier, map the detection result to the input state of the Kalman filter KF, and determine the possibility of a leakage event through adaptive abnormal state estimation; A graded warning module is used to output different warning levels according to the possibility of leakage incidents; The DBSCAN-KF coupled state estimation module determines whether the data at the time to be detected is an outlier, maps the detection result to the input state of the Kalman filter KF, and determines the possibility of a leakage event through adaptive abnormal state estimation, including: Assume the current time is t on day d, extract the previous n d The historical data at the same time every day is the data set D to be tested, expressed as: D = (Q d-nd,t ,…,Q d-1,t ,Q d,t ), where Q d,t Indicates the traffic monitoring value of the cell entrance at time t on day d; Input the dataset D to be tested into the DBSCAN clustering algorithm to identify outliers in the dataset; Determine the current cell entrance traffic monitoring value Q d,t Whether it is an outlier; Set the initial state information i of the Kalman filter KF 0 =0, corresponding to variance P 0 =1, state prediction process variance P Q =1; Map the DBSCAN outlier detection results to the input state information of the Kalman filter KF; According to the current state information and the state prediction of the previous moment, the Kalman filter KF is used to calculate the optimal state estimate of the current moment, which is the possibility of a leakage event at the current moment.

11. An electronic device, include: processor; A memory storing a computer executable program, which, when executed by the processor, enables the processor to execute the graded early warning method for leakage events in a community water supply network based on abnormal state estimation as described in any one of claims 1 to 9.

12. A storage medium containing computer executable instructions, It is characterized in that When the computer executable instructions are executed, the method for graded early warning of community water supply network leakage events based on abnormal state estimation according to any one of claims 1 to 9 is implemented.

13. A computer program product, It is characterized in that include: Computer executable instructions, which, when executed, are used to implement the graded early warning method for community water supply network leakage events based on abnormal state estimation as described in any one of claims 1-9.