A method and system for automatically generating pressure and flow monitoring thresholds for a water supply system
Through statistical analysis and optimization processing of the historical data of the water supply system sensors, pressure and flow thresholds adapted to different types of sensors are generated, and the problems of uncertainty and delay in the prior art are solved, and the accuracy of abnormal events in the water supply pipeline network is achieved. Detection and positioning have improved water resource utilization and energy conservation effects.
Patent Information
- Application Number
- CN202210064920.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-20
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-01-20
AI Technical Summary
There is uncertainty and delay in the pressure and flow threshold settings of the existing water supply pipeline network, making it difficult to accurately and timely detect and locate abnormal events, resulting in low water resource utilization and waste of energy.
A method of automatically generating the pressure flow monitoring threshold of the water supply system is adopted. By statistically analyzing and optimizing the sensor historical data, thresholds adapted to different types of sensors are generated, and the weight and fluctuation range are adjusted to ensure the accuracy and real-time thresholds. sex.
It improves the detection and positioning accuracy of abnormal events in the water supply pipeline network, reduces manual operations, improves water resource utilization and energy conservation effects, and ensures the normality of urban water use.
Smart Images

Figure CN114444290B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of water supply network pressure flow threshold setting, and in particular, relates to a method and system for automatically generating a water supply system pressure flow monitoring threshold. Background Art
[0002] At present, water companies usually adopt the following methods to judge the working conditions of water supply networks. First, the administrator sets the corresponding alarm threshold for each measuring point through the monitoring center software according to the surrounding water supply situation. When the pressure or flow exceeds the limit, the monitoring equipment will upload the alarm information to the monitoring center, and the water supply department will handle it in time to ensure the normal water supply pressure and prevent pipe bursts. Second, the customer service center will feedback to the emergency repair center based on the leakage and pipe bursts reported by the masses, and the emergency repair center will check the working conditions nearby and handle the abnormalities. The first method is that the manager sets the threshold based on experience. As the scale of the pipeline network expands, the number of monitoring points is also increasing. Setting the flow and pressure thresholds of the monitoring points one by one will bring a lot of workload to the operator, and it is difficult to ensure the accuracy and timeliness of the data. The second method is to use the leakage and pipe bursts reported by the masses, which has strong uncertainty and delay.
[0003] In order to more accurately and efficiently detect and locate abnormal events in the water supply network, ensure the quality of the water supply network system, and reduce manual operations or experience judgments, it is urgent to establish a suitable data model for the sensor, automatically generate the threshold of the network flow pressure in real time according to the SCADA historical data, monitor the dynamic changes of the network data at any time, timely discover the abnormal working conditions of the water supply network and accurately locate the relevant pipeline address for emergency repair and maintenance, effectively improve the utilization rate of water resources, save energy, and ensure the normal water use of the city. Therefore, this paper proposes a method and system for automatically generating the pressure flow threshold of the water supply network. Summary of the invention
[0004] In view of this, the present invention aims to propose a method and system for automatically generating pressure and flow monitoring thresholds for a water supply system, so as to solve the problem of more accurate and efficient detection and positioning of abnormal events in the water supply network and ensure the quality of the water supply network system.
[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0006] A method for automatically generating a water supply system pressure flow monitoring threshold value, comprising the following steps:
[0007] S1. Select historical data within a certain period before the latest date of each sensor and perform statistical analysis. The sensor includes a pressure sensor or a flow sensor;
[0008] S2. Perform periodicity test on the selected historical data and distinguish strong periodicity, weak periodicity and no periodicity;
[0009] S3, select historical data from sensors with strong periodicity, smooth the data at each moment into data at one moment based on the similarity and continuity of the historical data, aggregate and count the mean and quantity of historical data at each moment, and verify the quantity. After the verification is completed, the data meets the threshold generation condition;
[0010] S4, performing statistical analysis on the historical data at different times in step S3 to generate upper and lower thresholds at different times;
[0011] S5. Use the weekly weight coefficient to adjust the weekly threshold, and optimize the adjusted threshold according to the fluctuation range of different sensors;
[0012] S6. For sensors with no periodicity or weak periodicity, count the intervals in which a certain percentage of data falls according to historical data of a specified time, obtain the upper and lower limits of the intervals, and generate a constant threshold value;
[0013] S7. Update historical data and repeat steps S1 to S6 to optimize the generated threshold.
[0014] Furthermore, the statistical analysis process of historical data in step S1 includes the following steps:
[0015] S11. Filter the selected historical data according to the empirical extreme value, and select the data within the empirical extreme value range;
[0016] The empirical extreme value range is as follows: V min <V<V max , where V min is the empirical minimum value, V max is the maximum value of experience;
[0017] S12. The data filtered by the empirical value is filtered again by the quartile algorithm, and the threshold ranges at different times are generated. The data whose relative error between the threshold range and the normal value exceeds 80% is identified as abnormal data and is eliminated;
[0018] The formula for the quartile algorithm is as follows:
[0019] QUPPER = Q3 + k (Q3 - Q1);
[0020] QLOWER = Q1-k(Q3-Q1);
[0021] Where Q3 represents the upper quartile, Q1 represents the lower quartile, k represents the coefficient, QUPPER represents the upper threshold, and QLOWER represents the lower threshold.
[0022] S13. Remove abnormal values based on historical operating conditions: If pipe burst or other abnormal operating condition records occur within the historical data time period, the data of the abnormal operating condition will be removed.
[0023] Furthermore, in step S2, the periodicity test of the data after removing the outliers is performed using the ADF test method; based on the ADF result, it is determined whether there is a unit root. If there is no unit root, it is strong periodicity; if there is a unit root, it is weak periodicity or no periodicity.
[0024] Further, each moment in step S3 represents 15 minutes;
[0025] The process of verifying the number of historical data is as follows: based on the data acquired within a certain period in step S1, the threshold generation condition that the data at each moment needs to meet is obtained;
[0026] Since the original data may be missing, or after the process of eliminating outliers, the number of data at a certain moment is less than the set minimum value, it is necessary to interpolate the data at that moment: interpolation uses the mean of the data at the previous and next moments or the moment; or expand the range of historical data so that the number of data at that moment meets the threshold generation condition.
[0027] Furthermore, in step S4, the statistical 3σ rule is used to perform statistical analysis on the data at different times to generate upper and lower thresholds at different times. The specific process is as follows:
[0028] Through a large amount of statistics and analysis, the flow and pressure data at each moment basically present a normal distribution. The statistical 3σ rule is used to perform statistical analysis on the data to generate the normal range of changes in the corresponding time period of the measuring point;
[0029] The 3σ rule formula is as follows:
[0030]
[0031]
[0032]
[0033]
[0034] in, is the mean flow rate or pressure of the sensor at time j within n days, σ is the standard deviation of the sensor at time j within n days, UPPER is the upper limit of the threshold at time j calculated by the 3σ rule, and LOWER is the lower limit of the threshold at time j calculated by the 3σ rule.
[0035] Furthermore, the step S5 of optimizing the threshold according to the weight and the fluctuation range includes the following steps:
[0036] S51. Set the importance weight of weekly data and set the upper and lower thresholds according to the weight:
[0037]
[0038]
[0039] Among them, ω i is the weight of the ith week, u i is the upper limit of the ith week, l i is the lower limit of the ith week, is the upper threshold limit after weight optimization, is the lower limit of the threshold after weight optimization;
[0040] S52, optimize and adjust the upper and lower limits of the threshold according to different fluctuation ranges:
[0041]
[0042]
[0043] in, is the upper threshold limit at a certain moment after weekly weight optimization, is the lower limit of the threshold at a certain moment after weekly weight optimization, is the upper threshold value adjusted according to the fluctuation range. is the lower limit of the threshold adjusted according to the fluctuation range, Δu is the upper limit offset, the offset value is a fixed value, or a percentage of the upper limit, and Δl is the lower limit offset, the offset value is a fixed value, or a percentage of the lower limit.
[0044] A system for automatically generating pressure and flow monitoring thresholds for a water supply system, comprising: a data input module, a data preprocessing module, a threshold generation module, a threshold optimization module, and a data output module;
[0045] A data input module is used to obtain the latest specified week's historical data of all sensors as input of the data model;
[0046] Data preprocessing module, used to remove outliers, reduce data dimension, and verify data from input data;
[0047] A threshold generation module is used to generate thresholds at different times for each monitoring point in the data preprocessing module;
[0048] A threshold optimization module, used to tune the threshold in the threshold generation module;
[0049] The data output module outputs the threshold values of all sensors in the threshold optimization module at multiple moments.
[0050] Furthermore, the threshold optimization module tuning methods include weight optimization, volatility adjustment, and daily rolling updates.
[0051] Compared with the prior art, the method and system for automatically generating a water supply system pressure flow monitoring threshold value according to the present invention have the following beneficial effects:
[0052] (1) The method and system for automatically generating pressure and flow monitoring thresholds for a water supply system described in the present invention fully consider the disturbance caused by abnormal data, filter the input data using methods such as the empirical extreme value method, the quartile method, and abnormal operating condition elimination, and smooth the data at each moment. At the same time, in order to ensure the reliability of the input data, the amount of data at each moment is checked and supplemented.
[0053] (2) The method and system for automatically generating pressure and flow monitoring thresholds for a water supply system described in the present invention fully consider the threshold generation methods for different waveforms, and perform different processing on thresholds with strong periodicity, weak periodicity or no periodicity, so that the threshold generation method can adapt to various sensor types.
[0054] (3) The method and system for automatically generating pressure and flow monitoring thresholds for a water supply system described in the present invention consider the impact of the time of data generation on the accuracy of the threshold, use weekly weight settings, and daily rolling update thresholds to further improve the accuracy of the threshold. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0056] Figure 1 It is a structural block diagram of a system data model for automatically generating pressure and flow monitoring thresholds for a water supply system according to an embodiment of the present invention;
[0057] Figure 2 This is a data processing flow chart of a method for automatically generating pressure and flow monitoring thresholds for a water supply system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0059] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0060] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0061] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0062] like Figure 2 As shown, a method for automatically generating a water supply system pressure flow monitoring threshold comprises the following steps:
[0063] S1, selecting the historical data of the selected period (N weeks) set before the latest date of each sensor for statistical analysis, each sensor is a pressure sensor or a flow sensor;
[0064] S2, remove outliers from historical data: filter outliers using the empirical extreme value method, remove discrete values at different times using the quartile method, and delete data within the abnormal operating time period;
[0065] S3, the data processed by S2 is tested for periodicity using the ADF (Augmented Dickey-Fuller test) method. The ADF result is used to determine whether there is a unit root. If there is no unit root, it is a strong periodicity. If there is a unit root, it is a weak periodicity or no periodicity.
[0066] S4, taking the historical data in the sensor with strong periodicity, based on the similarity and continuity of the historical data, smoothing the data at each moment into the data at one moment, aggregating and counting the mean and quantity of the historical data at each moment, and verifying the quantity. After the verification is completed, the data meets the threshold generation condition;
[0067] Each moment is 15 minutes, and the data of every 15 minutes is smoothed into the data of one moment, that is, the data of each sensor every day is 96 (24 hours * 4 moments), and the number of data at each moment is aggregated and counted. Since the original data may have missing data, or after being processed by S2, the number of data at a certain moment is less than the set minimum value, it is necessary to interpolate the data at this moment (interpolation can use the data of the previous and next moments or the mean of this moment) or expand the range of historical data (such as obtaining historical data of N+1, N+2 weeks) to make the number of data at this moment meet the threshold generation condition;
[0068] S5, for the data at different times generated by S4, use the statistical 3σ rule to perform statistical analysis on the weekly data, and generate the upper and lower limits of the thresholds at different times of the week;
[0069] S6, adjusting the threshold according to the weekly weight coefficient for the weekly threshold data generated in S5; optimizing the threshold according to the fluctuation range of different sensors for the adjusted threshold;
[0070] S7, for sensors with no periodicity or weak periodicity, count the intervals in which a certain percentage of data falls according to historical data over a long period of time, obtain the upper and lower limits of the intervals, and generate a constant threshold;
[0071] S8, relearn the latest historical data according to the above steps on a daily basis to generate the latest threshold.
[0072] In step S2, the selected historical data is processed by removing outliers, which specifically includes the following steps:
[0073] S21. Filter all data according to the empirical extreme value and select data within the empirical extreme value range;
[0074] The empirical extreme value range is as follows: V min <V<V max , where V min is the empirical minimum value, V max is the maximum value of experience;
[0075] S22. The data filtered by the empirical value is filtered by the quartile algorithm, and the threshold ranges at different times are generated. The data whose relative error between the threshold range and the normal value exceeds 80% is identified as abnormal data and is eliminated;
[0076] The formula for the quartile algorithm is as follows:
[0077] QUPPER = Q3 + k (Q3 - Q1);
[0078] QLOWER = Q1-k(Q3-Q1);
[0079] Where Q3 represents the upper quartile, Q1 represents the lower quartile, k represents the coefficient, QUPPER represents the upper threshold, and QLOWER represents the lower threshold.
[0080] S23. Remove abnormal values based on historical operating conditions: If pipe burst or other abnormal operating condition records occur within the historical data time period, the data of the abnormal operating condition will be removed.
[0081] In step S3, the ADF test method is used to perform a periodicity test on the data after the outliers are removed; based on the ADF result, it is determined whether there is a unit root. If there is no unit root, it is strong periodicity; if there is a unit root, it is weak periodicity or no periodicity.
[0082] The process of verifying the number of historical data is as follows: according to the set period in step S1, the threshold generation condition that the data at each moment needs to meet is obtained;
[0083] Since the original data may be missing, or after the process of eliminating outliers, the number of data at a certain moment is less than the set minimum value, it is necessary to interpolate the data at that moment: interpolation uses the mean of the data at the previous and next moments or the moment; or expand the range of historical data so that the number of data at that moment meets the threshold generation condition.
[0084] In step S5, the statistical analysis of data at different times is performed using the statistical 3σ rule to generate the upper and lower limits of the thresholds at different times. The specific process is as follows:
[0085] Through a large amount of statistics and analysis, the flow and pressure data at each moment basically present a normal distribution. The statistical 3σ rule is used to perform statistical analysis on the data to generate the normal range of changes in the corresponding time period of the measuring point;
[0086] The 3σ rule formula is as follows:
[0087]
[0088]
[0089]
[0090]
[0091] in, is the mean flow rate or pressure of the sensor at time j within n days, σ is the standard deviation of the sensor at time j within n days, UPPER is the upper limit of the threshold calculated by the 3σ rule, and LOWER is the lower limit of the threshold calculated by the 3σ rule.
[0092] The step S6 of optimizing the threshold according to the weight and the fluctuation range includes the following steps:
[0093] S61. Set the importance weight of weekly data and set the upper and lower thresholds according to the weight:
[0094]
[0095]
[0096] Among them, ω i is the weight of the ith week, u i is the upper limit of the ith week, l i is the lower limit of the ith week, is the upper threshold limit after weight optimization, is the lower limit of the threshold after weight optimization;
[0097] S62. To reduce invalid alarms and improve the credibility of the threshold, the upper and lower limits of the threshold are adjusted according to different fluctuation ranges:
[0098]
[0099]
[0100] in, is the upper threshold limit at a certain moment after weekly weight optimization, is the lower limit of the threshold at a certain moment after weekly weight optimization, is the upper threshold value adjusted according to the fluctuation range. is the lower limit of the threshold after adjustment according to the fluctuation range, Δu is the upper limit offset, the offset value can be a fixed value, or a percentage of the upper limit, Δl is the lower limit offset, the offset value can be a fixed value, or a percentage of the lower limit, different offset values or offset ratios are set according to the sensor fluctuation range. In principle, the larger the fluctuation range, the smaller the offset value or offset ratio, and the smaller the fluctuation range, the larger the offset value or offset ratio.
[0101] like Figure 1 As shown, a system for automatically generating pressure and flow monitoring thresholds for a water supply system comprises: a data input module, a data preprocessing module, a threshold generation module, a threshold optimization module, and a data output module;
[0102] A data input module is used to obtain the latest specified week's historical data of all sensors as input of the data model;
[0103] Data preprocessing module, used to remove outliers, reduce data dimension, and verify data from input data;
[0104] A threshold generation module is used to generate thresholds at different times for each monitoring point in the data preprocessing module;
[0105] A threshold optimization module, used to tune the threshold in the threshold generation module;
[0106] The data output module outputs the threshold values of all sensors in the threshold optimization module at multiple moments.
[0107] Specifically, the data input module obtains the latest N weeks of historical data of all sensors as the input of the data model. The N value can be adjusted, and the minimum should not be less than 1 and the maximum should not exceed 5.
[0108] The data preprocessing module includes three modules: outlier removal, data dimension reduction, and data verification. Outlier removal uses the empirical extreme value method, quartile method, and abnormal condition elimination method to remove abnormal data. Data dimension reduction considers the continuity and similarity of historical data, eliminates the impact of disturbances at some moments, averages the data every 15 minutes, smoothes the data, and reduces the dimension of 60 minutes of data into 4 moments. Data verification is to check whether the number of input data meets the threshold generation conditions, and perform expansion and filling processing.
[0109] The threshold generation module is used to generate thresholds at different times for each monitoring point. More specifically, the waveform is first tested for periodicity to distinguish strong periodicity, weak periodicity or no periodicity. The strong periodicity data model uses the 3σ rule to perform statistical analysis on the data to generate the normal range of changes at different times of the measuring point. The weak periodicity or no periodicity model uses historical data over a long period of time to count the interval into which a certain numerical proportion of data falls, obtains the upper and lower limits of the interval, and generates a constant threshold.
[0110] The threshold optimization module is used to tune the output results of the data model. The tuning methods include: weight optimization, fluctuation adjustment, and daily rolling update. Specifically, weight optimization is to optimize the model output results according to the weights of the importance of weekly data. Fluctuation adjustment is to adjust the threshold to a certain ratio according to the fluctuation range of different sensors. In principle, the larger the fluctuation range, the smaller the fluctuation, and the smaller the fluctuation range, the larger the fluctuation. Daily rolling update is to re-learn the latest historical data according to the above steps on a daily basis to generate the latest threshold.
[0111] The data output module, after the above steps, generates the thresholds of all sensors at 96 moments.
[0112] like Figure 2As shown, the specific embodiments are as follows:
[0113] S1, selecting historical data within a certain period before the latest date of each sensor and performing statistical analysis, the sensor includes a pressure sensor or a flow sensor;
[0114] S2, remove outliers from the data, filter out outliers based on the empirical extreme value method for all data, remove discrete values at a certain moment using the quartile method, and delete data within the abnormal operating time period;
[0115] S3, performs periodicity test on the data processed by S2 to distinguish strong periodicity, weak periodicity or no periodicity;
[0116] S4, select sensors with strong periodicity, and smooth the data every 15 minutes based on the similarity and continuity of historical data. The data before processing is shown in Table 1, and the results after processing are shown in Table 2. Aggregate statistics are performed on the mean and number of historical data at each moment. For sensors with insufficient number, the data needs to be filled or the historical data range needs to be expanded until the threshold generation condition is met;
[0117] As shown in Table 3, 3 weeks of historical data were selected. After aggregation and statistics, the data COUNT value at HHMM = 14:45 is 3, which is much lower than the normal number COUNT = 21. Here, the COUNT number is set to be no less than 80% of the normal number. Therefore, it is necessary to fill in the data at this moment or expand the historical data range.
[0118] Table 1: Data before smoothing
[0119] SN COLLECTTIME VALUE HD72_1016_SS 2021 / 11 / 29 13:16 -12 HD72_1016_SS 2021 / 11 / 29 13:17 -12 HD72_1016_SS 2021 / 11 / 29 13:18 -12 HD72_1016_SS 2021 / 11 / 29 13:19 -12 HD72_1016_SS 2021 / 11 / 29 13:20 -10 HD72_1016_SS 2021 / 11 / 29 13:21 -12 HD72_1016_SS 2021 / 11 / 29 13:22 -12 HD72_1016_SS 2021 / 11 / 29 13:23 -12 HD72_1016_SS 2021 / 11 / 29 13:24 -11 HD72_1016_SS 2021 / 11 / 29 13:25 -10 HD72_1016_SS 2021 / 11 / 29 13:26 -12 HD72_1016_SS 2021 / 11 / 29 13:27 -11 HD72_1016_SS 2021 / 11 / 29 13:28 -10 HD72_1016_SS 2021 / 11 / 29 13:29 -10 HD72_1016_SS 2021 / 11 / 29 13:30 -10
[0120] Table 2: Smoothed data
[0121] SN COLLECTTIME VALUE HD72_1016_SS 2021 / 11 / 29 13:30 -11.2
[0122] Table 3: Aggregate statistics of the data
[0123] SN HHMM HM_NUM COUNT MEAN HD72_1016_SS 13:30 1330 21 -12 HD72_1016_SS 13:45 1345 21 -11.7143 HD72_1016_SS 14:00 1400 21 -11.3333 HD72_1016_SS 14:15 1415 21 -11.2381 HD72_1016_SS 14:30 1430 21 -10.9524 HD72_1016_SS 14:45 1445 3 -10.0619 HD72_1016_SS 15:00 1500 21 -10.8571 HD72_1016_SS 15:15 1515 21 -10.619 HD72_1016_SS 15:30 1530 21 -10.8571 HD72_1016_SS 15:45 1545 21 -11.0952 HD72_1016_SS 16:00 1600 21 -11.1429 HD72_1016_SS 16:15 1615 21 -11.8095 HD72_1016_SS 16:30 1630 21 -12.381
[0124] S5, use the statistical 3σ rule to perform statistical analysis on the data and generate the normal range of variation within the corresponding time period of the measuring point;
[0125] Table 4: 3σ rule generation thresholds
[0126] SN HHMM MEAN STD LOWER UPPER HD72_1016_SS 13:30 -12 1.0488 -15.1464 -8.8536 HD72_1016_SS 13:45 -11.7143 1.0071 -14.7356 -8.693 HD72_1016_SS 14:00 -11.3333 0.9661 -14.2316 -8.435 HD72_1016_SS 14:15 -11.2381 1.0443 -14.371 -8.1052 HD72_1016_SS 14:30 -10.9524 1.0713 -14.1663 -7.7385 HD72_1016_SS 14:45 -10.7619 1.0443 -13.8948 -7.629 HD72_1016_SS 15:00 -10.8571 0.9636 -13.7479 -7.9663 HD72_1016_SS 15:15 -10.619 0.9735 -13.5395 -7.6985 HD72_1016_SS 15:30 -10.8571 1.1952 -14.4427 -7.2715 HD72_1016_SS 15:45 -11.0952 1.2209 -14.7579 -7.4325 HD72_1016_SS 16:00 -11.1429 1.4243 -15.4158 -6.87 HD72_1016_SS 16:15 -11.8095 1.569 -16.5165 -7.1025 HD72_1016_SS 16:30 -12.381 1.322 -16.347 -8.415
[0127] S6, the threshold is optimized according to the weekly weight and the fluctuation range of different sensors. The results are shown in Table 5;
[0128] Table 5: Results of threshold optimization based on weekly weight and volatility range
[0129] SN HHMM MEAN STD LOWER UPPER HD72_1016_SS 13:30 -12 1.0488 -19.0845 0 HD72_1016_SS 13:45 -11.7143 1.0071 -18.5668 0 HD72_1016_SS 14:00 -11.3333 0.9661 -17.9318 0 HD72_1016_SS 14:15 -11.2381 1.0443 -18.1075 0 HD72_1016_SS 14:30 -10.9524 1.0713 -17.8496 0 HD72_1016_SS 14:45 -10.7619 1.0443 -17.5075 0 HD72_1016_SS 15:00 -10.8571 0.9636 -17.3224 0 HD72_1016_SS 15:15 -10.619 0.9735 -17.0598 0 HD72_1016_SS 15:30 -10.8571 1.1952 -18.1978 0 HD72_1016_SS 15:45 -11.0952 1.2209 -18.595 0 HD72_1016_SS 16:00 -11.1429 1.4243 -19.424 0 HD72_1016_SS 16:15 -11.8095 1.569 -20.8108 0 HD72_1016_SS 16:30 -12.381 1.322 -20.5972 0
[0130] S7, for sensors with no periodicity or weak periodicity, count the intervals in which a certain percentage of data falls according to historical data over a long period of time, obtain the upper and lower limits of the intervals, and generate a constant threshold, as shown in Table 6;
[0131] Table 6: Generate constant thresholds for sensors with no or weak periodicity
[0132] SN HHMM MAX MIN LOWER UPPER HD72_3243_SS 3:45 0 0 -5 10.5 HD72_3243_SS 4:00 0 0 -5 10.5 HD72_3243_SS 4:15 0 0 -5 10.5 HD72_3243_SS 4:30 0 0 -5 10.5 HD72_3243_SS 4:45 0 0 -5 10.5 HD72_3243_SS 5:00 0 0 -5 10.5 HD72-3243_SS 5:15 0 0 -5 10.5 HD72_3243_SS 5:30 0 0 -5 10.5 HD72_3243_SS 5:45 0 0 -5 10.5 HD72_3243_SS 6:00 0 0 -5 10.5 HD72_3243_SS 6:15 0 0 -5 10.5 HD72_3243_SS 6:30 0 0 -5 10.5 HD72_3243_SS 6:45 0 0 -5 10.5 HD72_3243_SS 7:00 0 0 -5 10.5 HD72_3243_SS 7:15 0 0 -5 10.5 HD72_3243_SS 7:30 0 0 -5 10.5 HD72_3243_SS 7:45 0 0 -5 10.5
[0133] S8, relearn the latest historical data according to the above steps on a daily basis to generate the latest threshold.
[0134] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for automatically generating pressure and flow monitoring thresholds for a water supply system, characterized in that The following steps are involved: S1. Select historical data within a certain period before the latest date of each sensor and perform statistical analysis. The sensor includes a pressure sensor or a flow sensor; S2. Perform periodicity test on the selected historical data and distinguish strong periodicity, weak periodicity and no periodicity; S3, select historical data from sensors with strong periodicity, smooth the data at each moment into data at one moment based on the similarity and continuity of the historical data, aggregate and count the mean and quantity of historical data at each moment, and verify the quantity. After the verification is completed, the data meets the threshold generation condition; S4, performing statistical analysis on the historical data at different times in step S3 to generate upper and lower thresholds at different times; S5. Use the weekly weight coefficient to adjust the weekly threshold, and optimize the adjusted threshold according to the fluctuation range of different sensors; S6. For sensors with no periodicity or weak periodicity, count the intervals in which a certain percentage of data falls according to historical data of a specified time, obtain the upper and lower limits of the intervals, and generate a constant threshold value; S7. Update historical data and repeat steps S1 to S6 to optimize the generated threshold.
2. A method for automatically generating a water supply system pressure flow monitoring threshold according to claim 1, characterized in that: The statistical analysis process of historical data in step S1 includes the following steps: S11. Filter the selected historical data according to the empirical extreme value, and select the data within the empirical extreme value range; The empirical extreme value range is as follows: V min <V<V max , where V min is the empirical minimum value, V max is the maximum value of experience; S12. The data filtered by the empirical value is filtered again by the quartile algorithm, and the threshold ranges at different times are generated. The data whose relative error between the threshold range and the normal value exceeds 80% is identified as abnormal data and is eliminated; The formula for the quartile algorithm is as follows: QUPPER = Q3 + k (Q3 - Q1); QLOWER = Q1-k(Q3-Q1); Where Q3 represents the upper quartile, Q1 represents the lower quartile, k represents the coefficient, QUPPER represents the upper threshold, and QLOWER represents the lower threshold. S13. Remove abnormal values based on historical operating conditions: If pipe burst or other abnormal operating condition records occur within the historical data time period, the data of the abnormal operating condition will be removed.
3. The method for automatically generating a water supply system pressure flow monitoring threshold according to claim 1, characterized in that: In step S2, the ADF test method is used to perform a periodicity test on the data after the outliers are removed; based on the ADF result, it is determined whether there is a unit root. If there is no unit root, it is strong periodicity; if there is a unit root, it is weak periodicity or no periodicity.
4. The method for automatically generating a water supply system pressure flow monitoring threshold according to claim 1, characterized in that: Each moment in step S3 represents 15 minutes; The process of verifying the number of historical data is as follows: based on the data acquired within a certain period in step S1, the threshold generation condition that the data at each moment needs to meet is obtained; Since the original data may be missing, or after the process of eliminating outliers, the number of data at a certain moment is less than the set minimum value, it is necessary to interpolate the data at that moment: interpolation uses the mean of the data at the previous and next moments or the moment; or expand the range of historical data so that the number of data at that moment meets the threshold generation condition.
5. The method for automatically generating a water supply system pressure flow monitoring threshold according to claim 1, characterized in that: In step S4, the statistical 3σ rule is used to perform statistical analysis on the data at different times to generate upper and lower thresholds at different times. The specific process is as follows: Through a large amount of statistics and analysis, the flow and pressure data at each moment basically present a normal distribution. The statistical 3σ rule is used to perform statistical analysis on the data to generate the normal range of changes in the corresponding time period of the measuring point; The 3σ rule formula is as follows: in, is the mean flow rate or pressure of the sensor at time j within n days, σ is the standard deviation of the sensor at time j within n days, UPPER is the upper limit of the threshold at time j calculated by the 3σ rule, and LOWER is the lower limit of the threshold at time j calculated by the 3σ rule.
6. The method for automatically generating a water supply system pressure flow monitoring threshold according to claim 1, characterized in that: The step S5 of optimizing the threshold according to the weight and the fluctuation range includes the following steps: S51. Set the importance weight of weekly data and set the upper and lower thresholds according to the weight: Among them, ω i is the weight of the ith week, u i is the upper limit of the ith week, l i is the lower limit of the ith week, is the upper threshold limit after weight optimization, is the lower limit of the threshold after weight optimization; S52, optimize and adjust the upper and lower limits of the threshold according to different fluctuation ranges: in, is the upper threshold limit at a certain moment after weekly weight optimization, is the lower limit of the threshold at a certain moment after weekly weight optimization, is the upper threshold value adjusted according to the fluctuation range. is the lower limit of the threshold adjusted according to the fluctuation range, Δu is the upper limit offset, the offset value is a fixed value, or a percentage of the upper limit, and Δl is the lower limit offset, the offset value is a fixed value, or a percentage of the lower limit.
7. A system for automatically generating a water supply system pressure flow monitoring threshold, applicable to a method for automatically generating a water supply system pressure flow monitoring threshold as described in any one of claims 1 to 6, characterized in that include: Data input module, data preprocessing module, threshold generation module, threshold optimization module, data output module; A data input module is used to obtain the latest specified week's historical data of all sensors as input of the data model; Data preprocessing module, used to remove outliers, reduce data dimension, and verify data from input data; A threshold generation module is used to generate thresholds at different times for each monitoring point in the data preprocessing module; A threshold optimization module, used to tune the threshold in the threshold generation module; The data output module outputs the threshold values of all sensors in the threshold optimization module at multiple moments.
8. The system for automatically generating pressure and flow monitoring thresholds for a water supply system according to claim 7, characterized in that: The threshold optimization module tuning methods include weight optimization, volatility adjustment, and daily rolling updates.
Citation Information
Patent Citations
Water supply network pipe explosion identification data driving method
CN112149750A
Big data single-parameter threshold mining and correcting method and system based on statistical distribution
CN112464169A
Reverse osmosis integrated unit flow acquisition method and application thereof
CN112666886A
A water network monitor, monitoring system and method
GB201721435D0
Node flow optimization and distribution method for improving transient hydraulic simulation precision of water supply serial pipeline
WO2021000581A1
