Ultrasonic water meter and method for monitoring water usage based on minimum sustained flow at night
By using a water usage anomaly monitoring method based on the minimum continuous flow rate at night, the influence of interference factors is eliminated, the minimum continuous flow segment is extracted and combined with an individualized baseline reference, and the problems of misjudgment and missed judgment in water usage anomaly monitoring in the prior art are solved, achieving higher identification accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-19
- Publication Date
- 2026-06-16
Smart Images

Figure CN122217419A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of abnormal water use identification technology, and specifically to an ultrasonic water meter and method for monitoring abnormal water use based on the minimum continuous flow rate at night. Background Technology
[0002] With the increasing adoption of smart water meters and intelligent water management systems, monitoring water usage anomalies has become a crucial technological direction for reducing pipeline leakage and improving water management for residents and businesses. Existing water usage anomaly monitoring solutions largely rely on single-time flow exceeding limits, instantaneous threshold alarms, or simple cumulative water volume comparisons for judgment, making it difficult to effectively distinguish between normal, occasional, trace water usage at night and repetitive, continuous nighttime water flow. In practical applications, nighttime flow data is also easily affected by multiple sources of interference, such as instantaneous start / stop, pipeline pressure fluctuations, and metering instability, leading to misjudgments, missed judgments, or insufficient stability in monitoring results. Especially for anomaly scenarios such as hidden leakage and slight prolonged water flow, relying solely on single-cycle data makes it difficult to reflect the continuous patterns of users' nighttime water usage behavior in terms of frequency, flow stability, and temporal distribution. Furthermore, it fails to establish individualized reference standards based on different users' historical water usage habits, resulting in insufficient targeting and accuracy in anomaly identification. Therefore, a water usage anomaly monitoring ultrasonic water meter and method are needed that can extract the minimum continuous flow characteristic from stable, continuous nighttime water flow and combine multi-cycle analysis and individualized baselines for anomaly deviation judgment. Summary of the Invention
[0003] This invention addresses the shortcomings of existing technologies by proposing an ultrasonic water meter and method for monitoring abnormal water usage based on the minimum continuous flow rate at night.
[0004] The technical solution to achieve the purpose of this invention is as follows:
[0005] On the one hand, the method for monitoring abnormal water use based on the minimum continuous flow rate at night includes the following steps:
[0006] Instantaneous flow rate data of water are continuously collected within a preset nighttime monitoring interval and arranged in order of sampling time to obtain the instantaneous flow rate sequence for the night of that day;
[0007] Based on the instantaneous flow sequence, a flow fluctuation filtering algorithm is used to remove short-term spike components and discrete oscillation components to obtain a stable flow sequence.
[0008] Based on stable flow sequences, a minimum sustained flow identification algorithm is used to perform persistence discrimination and minimum value screening on each continuous flow segment, extract the minimum continuous flow segment, and obtain the nighttime minimum sustained flow characteristics.
[0009] Based on the frequency of occurrence, flow stability and offset relationship of minimum continuous flow characteristics at night in continuous monitoring cycles, a continuous analysis is established to form a characterization of abnormal water use.
[0010] Based on the abnormal water usage characteristics, a user-specific nighttime baseline reference is constructed by combining historical nighttime monitoring results. The deviation of the abnormal water usage characteristics in the current monitoring period is calculated to obtain the abnormal deviation results.
[0011] Furthermore, a flow fluctuation filtering algorithm is used to remove short-term spike components and discrete oscillating components, resulting in a stable flow sequence, including:
[0012] The sampling interval and sampling point to be judged are determined based on the instantaneous flow sequence, and fluctuation judgment indicators corresponding to instantaneous start-stop, pipeline pressure fluctuation and metering jitter are established respectively.
[0013] For short-term spike components induced by instantaneous start and stop, a stable flow baseline is determined based on the average flow of adjacent stable sampling points before and after the sampling interval to be determined, and identification is completed by combining the abrupt change amplitude and the flow drop status before and after the interval.
[0014] For the discrete oscillation component induced by pipeline pressure fluctuations, identification is completed based on the coefficient of variation of the continuous sampling interval to be determined and the duration of stable flow within the interval;
[0015] For discrete oscillation components induced by measurement jitter, identification is completed based on the relative deviation of the sampling point to be determined relative to the adjacent valid sampling points before and after it and the continuity of the deviation.
[0016] The identified short-term spike components and discrete oscillating components are removed in a hierarchical, non-destructive manner, while retaining the original sampling timestamp information of the candidate stable component intervals to obtain a stable flow sequence.
[0017] Furthermore, the minimum continuous flow identification algorithm is used to extract the minimum continuous flow segment, including:
[0018] For each continuous flow segment, a persistence determination and a stability determination are performed sequentially. Continuous flow segments that pass both determinations are marked as qualified continuous flow segments.
[0019] The qualified continuous flow segments are sorted in ascending order based on the segment representative flow value. All qualified continuous flow segments whose segment representative flow value is within the range of the preset candidate flow deviation threshold are included in the minimum flow candidate set.
[0020] For each segment within the minimum flow candidate set, a multi-priority review is performed in the following order: longest effective duration of the segment, highest flow stability of the segment, and segment relative time offset closest to the midpoint of the preset nighttime monitoring interval. The segment that passes the review is then selected as the optimal minimum continuous flow segment.
[0021] Furthermore, the user-individualized nighttime baseline reference is constructed in a hierarchical structure, including three levels: the basic baseline layer, the behavior adaptation baseline layer, and the dynamic correction coefficient. The basic baseline layer calculates the individual normal flow baseline, the individual normal duration baseline, the individual normal stability baseline, and the individual normal time offset baseline based on the historical minimum continuous flow characteristics corresponding to all valid events within the baseline construction period window. The behavior adaptation baseline layer constructs differentiated baseline rules to adapt to the water use characteristics of two types of users: those with occasional nighttime micro-water use and those with repetitive nighttime continuous water use. The dynamic correction coefficient is calculated based on the evolution trend of user water use behavior within the baseline construction period window, and performs weighted correction on the basic baseline parameters to generate the user-individualized nighttime baseline reference.
[0022] Furthermore, the deviation calculation includes single-dimensional deviation calculation and comprehensive deviation weighted calculation; single-dimensional deviation includes flow value deviation, duration deviation, flow stability deviation, and time offset deviation. The deviation of each dimension is calculated by the ratio of the difference between the expected judgment feature parameter of the current monitoring week and the corresponding parameter of the user's individualized nighttime baseline reference; the comprehensive deviation is calculated by weighting each dimension based on the deviation of each single dimension and assigning differentiated weights to each dimension according to the water use behavior type label corresponding to the current monitoring period.
[0023] Further, the establishment of sustainable analysis results includes:
[0024] Quantitative calculations were performed on three core dimensions: frequency of occurrence, stability of traffic flow, and offset relationship between adjacent cycles.
[0025] The frequency of occurrence is calculated as the ratio of the number of valid events occurring within multiple consecutive monitoring periods to the total number of monitoring periods.
[0026] The core parameters for the stability of traffic flow are the coefficient of variation of the minimum continuous traffic flow value at night over multiple periods and the average traffic flow stability over multiple periods.
[0027] The dimension of adjacent cycle offset relationship uses the absolute difference of the relative time offset of segments during adjacent monitoring cycles and the offset variation coefficient as the core parameters;
[0028] Based on the three core dimensions of the grading rules, a multi-dimensional comprehensive persistence determination is performed, and the comprehensive persistence level is divided into high persistence, medium persistence, low persistence and no persistence, and a structured persistence analysis result is established.
[0029] Furthermore, the calculation of the stable flow baseline and abrupt change amplitude in the short-time peak component includes:
[0030] Extract the effective instantaneous flow rate values of the number of consecutive preset baseline window sampling points before the start time and after the end time of the sampling interval to be determined, and calculate the arithmetic mean of the forward window flow rate and the arithmetic mean of the backward window flow rate respectively.
[0031] When the relative difference between the arithmetic mean of the forward window flow and the arithmetic mean of the backward window flow does not exceed the preset baseline consistency threshold, the arithmetic mean of the two is taken as the stable flow baseline.
[0032] The mutation amplitude is calculated by the proportion by which the maximum instantaneous flow rate of the interval to be determined exceeds the stable flow rate baseline. If the mutation amplitude exceeds the preset peak amplitude threshold and the flow rates before and after the interval fall back to the allowable range of the stable flow rate baseline, the interval is determined to be a short-term peak component.
[0033] Furthermore, the calculation of the relative deviation in the discrete oscillation component induced by metering jitter and the determination of the lack of continuity of the deviation include:
[0034] Extract the instantaneous flow rate values of the preceding and following adjacent valid sampling points of the single sampling point to be judged, and use the arithmetic mean of the two as the adjacent reference flow rate values;
[0035] The relative deviation is defined as the ratio of the absolute value of the difference between the instantaneous flow rate of the sampling point to be determined and the adjacent reference flow rate to the adjacent reference flow rate.
[0036] The deviation is not continuous, meaning that neither the preceding nor following adjacent sampling point of the sampling point to be judged is determined to be a discrete oscillation component induced by metering jitter; a single sampling point whose relative deviation exceeds the preset jitter deviation threshold and whose deviation is not continuous is determined to be a discrete oscillation component induced by metering jitter.
[0037] Furthermore, persistence and stability discrimination include:
[0038] The continuous discrimination check verifies whether the number of continuous valid sampling points in the continuous flow segment is not less than the preset minimum continuous sampling threshold. Continuous flow segments that are lower than the preset minimum continuous sampling threshold are judged as non-compliant and are completely removed.
[0039] For continuous flow segments that pass the continuous assessment, the stability judgment uses the coefficient of variation of the total instantaneous flow value within the segment as the evaluation index. Continuous flow segments with a coefficient of variation exceeding the preset stable variation threshold are judged as having substandard stability and are completely removed.
[0040] At the same time, continuous flow segments that pass the continuous and stability tests are marked as qualified continuous flow segments and included in the subsequent segment representative flow value calculation and sorting process.
[0041] Secondly, the ultrasonic water meter for monitoring abnormal water usage based on the minimum continuous flow rate at night includes a flow acquisition module, a real-time clock module, a main control processing module, a data storage module, an RS485 communication module, and an anomaly alert module.
[0042] The flow acquisition module collects instantaneous flow data of water through a flow sensor installed in the water flow channel of the water meter body; the real-time clock module is used to lock the preset nighttime monitoring range and trigger the monitoring process at regular intervals;
[0043] The main control processing module is connected to the flow acquisition module, real-time clock module, data storage module, RS485 communication module, and anomaly alert module. It has built-in flow fluctuation filtering algorithm and minimum continuous flow identification algorithm to construct an instantaneous flow sequence from instantaneous flow data in chronological order. The flow fluctuation filtering algorithm removes short-term spike components and discrete oscillation components to obtain a stable flow sequence. Based on the stable flow sequence, the minimum continuous flow identification algorithm extracts the nighttime minimum continuous flow characteristics. Combining the frequency of occurrence of the nighttime minimum continuous flow characteristics, the degree of flow stability, and the offset relationship between adjacent cycles within the continuous monitoring period, an abnormal water use characterization is formed. Based on the user's individualized nighttime baseline reference, the deviation of the abnormal water use characterization is judged to obtain the abnormal deviation result.
[0044] The data storage module is used to store nighttime monitoring data; the RS485 communication module is used to transmit monitoring data and receive parameter configuration commands; the anomaly alert module is used to execute local alerts when abnormal water usage is detected.
[0045] Compared with the prior art, the advantages of this invention are as follows:
[0046] 1. By performing flow fluctuation filtering on the instantaneous flow sequence at night, and classifying, identifying, and removing the fluctuation components corresponding to instantaneous start-stop, pipeline pressure fluctuation and metering jitter, and retaining the stable components, it is possible to extract a stable flow sequence that reflects the true continuous water flow state under complex interference background, and then identify the minimum continuous flow characteristics at night based on this, thereby improving the accuracy and stability of identifying abnormal water use at night from the data source.
[0047] 2. By combining the frequency of occurrence of the minimum continuous flow characteristics at night in multiple consecutive monitoring cycles, the stability of flow, and the offset relationship between adjacent cycles, a continuous analysis result is established. Furthermore, a user-specific nighttime baseline reference is constructed, and deviation calculation and abnormal deviation level judgment are performed on the current monitoring cycle. This can effectively distinguish between occasional nighttime trace water use and repetitive nighttime continuous water use behavior, improve the adaptability of abnormal monitoring results to users' historical water use habits, and enhance the accuracy of identifying hidden abnormal scenarios. Attached Figure Description
[0048] Figure 1 Flowchart of a method for monitoring abnormal water usage based on minimum continuous flow at night;
[0049] Figure 2 This is a flowchart of the process for eliminating short-time spike components and discrete oscillating components in this invention;
[0050] Figure 3 This is a flowchart of the nighttime minimum continuous flow feature extraction process in this invention;
[0051] Figure 4 This is a block diagram of the core hardware structure of the ultrasonic water meter in this invention. Detailed Implementation
[0052] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0053] Example 1
[0054] This invention discloses a method for monitoring abnormal water use based on minimum continuous flow at night, comprising the following steps:
[0055] S1: Continuously collect instantaneous flow data of water within the preset nighttime monitoring interval, arrange them in the order of sampling time, and obtain the instantaneous flow sequence of the night.
[0056] S2: Based on the instantaneous flow sequence, a flow fluctuation filtering algorithm is used to perform fluctuation component identification and stable component retention processing. Short-term peak components and discrete oscillation components caused by instantaneous start-stop, pipeline pressure fluctuation and metering jitter are removed to obtain a stable flow sequence that reflects the true continuous water flow state.
[0057] S3: Based on a stable flow sequence, the minimum continuous flow identification algorithm is used to perform continuity discrimination and minimum value screening on each continuous flow segment, extracting the minimum continuous flow segment whose duration meets the judgment requirements and whose flow level remains stable, thus obtaining the nighttime minimum continuous flow characteristics.
[0058] S4: Based on the minimum continuous flow characteristics at night, and combined with the frequency of occurrence of this characteristic in multiple consecutive monitoring cycles, the stability of flow, and the offset relationship between adjacent cycles, establish a continuous analysis result that characterizes the hidden water use status of users at night; based on the continuous analysis result, distinguish between occasional trace water use at night and repetitive continuous water use behavior at night, and form an abnormal water use characterization quantity.
[0059] S5: Based on the abnormal water use characteristics, and combined with historical nighttime monitoring results, construct a user-specific nighttime baseline reference. Perform deviation calculation on the abnormal water use characteristics of the current monitoring period to obtain the abnormal deviation results of the current period relative to the individual's normal water use characteristics.
[0060] refer to Figure 1 , Figure 1 This is a flowchart of a method for monitoring abnormal water usage based on the minimum continuous flow rate at night.
[0061] In step S1, instantaneous flow rate data of water are continuously collected within a preset nighttime monitoring interval and arranged in chronological order of sampling time to obtain the instantaneous flow rate sequence for the night of that day, including:
[0062] S101: Parameter configuration and interval locking for preset nighttime monitoring intervals.
[0063] Based on the rhythmic characteristics of user water usage behavior, standardized parameter configurations for preset nighttime monitoring intervals are completed. The baseline configuration scheme is as follows: the start time of the preset nighttime monitoring interval is set to 02:00 AM and the end time is set to 05:00 AM, with a fixed total interval duration of 3 hours. At the same time, it supports custom configuration of the start time, end time, and total duration of the preset nighttime monitoring interval for different water users such as residential users, commercial users, and industrial users, based on their different water usage rhythms. After configuration, the preset nighttime monitoring interval is locked as a fixed data collection window period to ensure strict time consistency of the collection intervals for multiple consecutive monitoring cycles, providing a unified time benchmark for subsequent cross-monitoring interval data analysis.
[0064] S102: Sampling parameter configuration and clock synchronization calibration for high-precision flow sensors.
[0065] For high-precision flow sensors installed in the water flow channel of the water meter body, standardized parameter configurations are completed for instantaneous flow acquisition at the inlet of the user's water supply pipeline: a fixed sampling frequency for instantaneous flow data is set, preferably configured as 1 time / minute, corresponding to a sampling interval of 60 seconds; at the same time, it is supported to adjust the sampling frequency within the range of 1 time / 10 seconds to 1 time / 5 minutes according to the metering accuracy requirements and pipeline characteristics, ensuring that the temporal resolution of the acquired data meets the accuracy requirements for subsequent continuity discrimination and minimum continuous flow identification; after the parameter configuration is completed, the local system clock of the ultrasonic water meter and the standard clock of the cloud data management platform are synchronized and calibrated at the minute level to eliminate sampling timestamp errors caused by terminal clock offset, ensuring that the time base of all acquired data is completely consistent.
[0066] S103: Continuous acquisition of instantaneous flow data and archiving of raw data.
[0067] Within the pre-defined nighttime monitoring range for the day, the high-precision flow sensor continuously collects instantaneous flow data of water in the water supply pipeline according to the pre-configured sampling frequency. Each time instantaneous flow data sampling is completed, a unique sampling timestamp is generated, containing complete time dimension information including year, month, day, hour, minute, and second. Each pair of raw data consisting of "sampling timestamp - instantaneous flow value" is synchronously cached in real-time to the local storage unit of the ultrasonic water meter and the corresponding user data partition of the cloud data management platform, completing the collection and archiving of all raw instantaneous flow data within the pre-defined nighttime monitoring range for the day.
[0068] S104: Time-series sorting of raw data and initial screening of invalid data.
[0069] All raw instantaneous flow data collected and archived within the preset nighttime monitoring interval for the day are sorted in ascending order according to the sampling timestamps to generate an initial instantaneous flow sequence. At the same time, a preliminary screening of invalid data is performed on the initial instantaneous flow sequence to remove invalid data pairs that do not contain valid sampling timestamps, data pairs whose instantaneous flow values exceed the rated measurement range of the high-precision flow sensor, and redundant data pairs whose sampling timestamps exceed the boundary of the preset nighttime monitoring interval. After the preliminary screening is completed, an instantaneous flow sequence for the nighttime of the day is obtained that has continuous sampling time, complete timestamps, and flow values within the rated measurement range.
[0070] In step S2, based on the instantaneous flow sequence, a flow fluctuation filtering algorithm is used to perform fluctuation component identification and stable component retention processing. Short-term spike components and discrete oscillation components caused by instantaneous start-stop, pipeline pressure fluctuations, and metering jitter are removed to obtain a stable flow sequence, including:
[0071] S201: Standardization preprocessing and data baseline alignment of instantaneous flow sequences.
[0072] Using the instantaneous flow sequence of the night as the sole processing object, and based on the sampling frequency and sampling interval pre-configured in step S1, the time dimension of the sequence is standardized and aligned: the continuity of the sampling timestamps of each sampling data pair in the sequence is verified. For sampling point missing due to data transmission packet loss or temporary sleep of the ultrasonic water meter terminal, if the number of missing sampling points in a single location does not exceed the preset missing threshold, linear interpolation is used to complete the missing points based on the effective instantaneous flow values adjacent to the missing points. The preset missing threshold is preferentially configured as two consecutive sampling points. If the number of missing sampling points in a single location exceeds the preset missing threshold, the missing interval is marked and isolated in subsequent processing to ensure that the time dimension of the sequence is completely matched with the time reference of the preset nighttime monitoring interval.
[0073] Subsequently, numerical standardization processing is performed on the time-aligned instantaneous flow sequence: based on the rated measurement range of the high-precision flow sensor, range normalization mapping is performed on the instantaneous flow values of the entire sequence, mapping the instantaneous flow values to the standardized numerical range of [0,1], eliminating the influence of measurement range differences on the accuracy of subsequent fluctuation component identification; at the same time, using the lower quartile of the full effective instantaneous flow values of the sequence as the benchmark, the zero-value baseline anchoring of the sequence is completed, eliminating the flow base offset caused by pipeline static pressure, and establishing a unified numerical benchmark for the accurate distinction between subsequent fluctuation components and stable components.
[0074] S202: Feature modeling and classification of wave components corresponding to multi-source interference.
[0075] Based on the standardized preprocessed instantaneous flow sequence, a multi-dimensional fluctuation feature space is constructed using a flow fluctuation filtering algorithm. This space is then used to classify and accurately identify the short-term peak components and discrete oscillation components induced by three types of interference sources: instantaneous start-stop, pipeline pressure fluctuation, and metering jitter. The specific identification rules are as follows:
[0076] For short-term peak components induced by instantaneous start-stop: its core characteristic is defined as the instantaneous change and rapid decline of the flow rate. The core judgment index, the magnitude of the change, and the baseline stable flow rate are calculated according to the following steps:
[0077] Determine the stable flow baseline corresponding to the sampling interval to be judged: For the single sampling point or continuous sampling interval to be judged, extract the number of consecutive preset baseline window sampling points before the start time and after the end time of the interval, such as the effective instantaneous flow values of 5 consecutive sampling points, and calculate the arithmetic mean of the forward window flow and the arithmetic mean of the backward window flow. If the relative difference between the arithmetic mean of the forward window flow and the arithmetic mean of the backward window flow does not exceed the preset baseline consistency threshold, such as 10%, take the arithmetic mean of the two as the stable flow baseline corresponding to the interval to be judged.
[0078] Calculate the abrupt change amplitude of the sampling interval to be determined: Extract the maximum value among all instantaneous flow values within the sampling interval to be determined, and calculate the abrupt change amplitude using the following formula: Abrupt change amplitude = (maximum instantaneous flow value of the interval to be determined - stable flow baseline) / stable flow baseline × 100%;
[0079] Based on the above calculation results, the determination rule is as follows: if the calculated abrupt change amplitude exceeds the preset peak amplitude threshold at a certain sampling point or within a continuous sampling interval not exceeding the preset peak duration threshold, and the arithmetic mean of the backward window flow and the arithmetic mean of the forward window flow both fall back to within ±10% of the stable flow baseline, then the interval is determined to be a short-term peak component; wherein, the preset peak duration threshold is preferably configured as 3 consecutive sampling points, and the preset peak amplitude threshold is preferably configured as 300% of the baseline value;
[0080] For the discrete oscillating component induced by pipeline pressure fluctuations: its core characteristic is defined as continuous low-to-medium frequency fluctuations without a stable trend, and its core criterion, the coefficient of variation, is calculated according to the following steps:
[0081] The first step is to extract all valid instantaneous flow values within the continuous sampling interval to be determined, thus forming the flow dataset to be determined.
[0082] The second step is to calculate the arithmetic mean of the traffic dataset to be judged. The calculation formula is as follows:
[0083] ,
[0084] in, The arithmetic mean of the traffic dataset to be determined. This represents the number of valid sampling points within the continuous sampling interval to be determined. For the interval of the first The instantaneous flow rate value corresponding to each valid sampling point;
[0085] The third step is to calculate the population standard deviation of the traffic dataset to be judged. The calculation formula is as follows:
[0086] ,
[0087] in, The population standard deviation of the traffic dataset to be judged;
[0088] The fourth step is to calculate the coefficient of variation for this interval. The formula is as follows:
[0089] ,
[0090] in, The coefficient of variation is the value of the continuous sampling interval to be determined.
[0091] Based on the above calculation results, the judgment rule is as follows: if the number of continuous sampling points is within the preset swing interval threshold range, the interval variation coefficient calculated by the above method exceeds the preset swing variation threshold, and there is no stable flow interval within the interval whose duration exceeds the preset stable duration threshold, then the interval is judged to be a discrete swing component; wherein, the preset swing interval threshold range is preferably configured to 4-10 continuous sampling points, the preset swing variation threshold is preferably configured to 20%, and the preset stable duration threshold is preferably configured to the duration corresponding to 3 continuous sampling points;
[0092] For the discrete oscillation component induced by metering jitter: its core characteristic is defined as high-frequency, low-amplitude random discrete fluctuation, and its core judgment index, relative deviation, is calculated according to the following steps:
[0093] The first step is to determine the adjacent baseline flow rates of the single sampling point to be judged: extract the instantaneous flow rate value of the previous adjacent valid sampling point of the sampling point to be judged. Instantaneous flow rate value of the next adjacent valid sampling point Calculate the adjacent reference flow values using the following formula:
[0094] ,
[0095] in, The adjacent reference flow rate value corresponding to the sampling point to be determined;
[0096] The second step is to calculate the relative deviation of the sampling points to be judged. The calculation formula is as follows:
[0097] ,
[0098] in, The relative deviation of the sampling points to be determined. The instantaneous flow rate value of the sampling point to be determined;
[0099] Based on the above calculation results, the judgment rule is as follows: if the relative deviation of a single sampling point calculated by the above method exceeds the preset jitter deviation threshold and the deviation has no continuity, the sampling point is judged to be a discrete oscillation component induced by metering jitter; the deviation has no continuity, that is, neither the previous adjacent sampling point nor the next adjacent sampling point of the sampling point is judged to be a discrete oscillation component induced by metering jitter. The preset jitter deviation threshold is preferably configured to 15%.
[0100] After completing the identification of the fluctuation components of the entire sequence, the sampling intervals and sampling points corresponding to all identified short-term peak components and discrete oscillation components are uniquely marked to establish a set of fluctuation component markings. At the same time, the unmarked sampling intervals are marked as candidate stable component intervals.
[0101] S203: Accurate removal of hierarchical fluctuation components based on the tag set.
[0102] Based on the aforementioned set of fluctuation component labels, a flow fluctuation filtering algorithm is used to perform hierarchical, non-destructive fluctuation component removal. The removal process strictly preserves the original instantaneous flow data and sampling timestamp information of the candidate stable component intervals. The specific removal process is as follows:
[0103] Prioritize the removal of discrete oscillation components induced by metering jitter: For single sampling points marked as discrete oscillation components of metering jitter in the fluctuation component marker set, remove invalid instantaneous flow data of the point, and use the average effective instantaneous flow of the two adjacent candidate stable component intervals before and after the point to complete the point, so as to avoid the time break of the sequence caused by the removal of single points;
[0104] Perform the removal of short-term spike components induced by instantaneous start and stop: For the sampling interval marked as a short-term spike component in the fluctuation component mark set, remove all instantaneous flow data in the interval, mark the time boundaries of the candidate stable component intervals before and after the interval, and do not perform interpolation completion processing to avoid the influence of interference data on the subsequent stable component determination;
[0105] Remove discrete oscillating components induced by pipeline pressure fluctuations: For the sampling interval marked as discrete oscillating components of pipeline pressure fluctuations in the fluctuation component mark set, remove all instantaneous flow data in the interval, and simultaneously isolate the time dimension corresponding to the interval to ensure that the remaining data are all original valid instantaneous flow data corresponding to the candidate stable component interval.
[0106] After completing all the layered elimination processes, several candidate stable flow segments were obtained that retained the original sampling timestamps and were not affected by the three types of interference sources.
[0107] S204: Continuity validity determination and ordered splicing of candidate stable flow segments.
[0108] For each candidate stable flow segment obtained after removing fluctuation components, the validity of the actual continuous water flow state is determined. The determination rule is as follows:
[0109] The number of consecutive valid sampling points for a candidate stable flow segment is not less than the preset minimum sampling threshold for a stable segment, and the corresponding duration matches the pre-configured sampling interval, satisfying the minimum duration determination requirement for continuous water flow. The preset minimum sampling threshold for a stable segment is preferably configured as 5 consecutive sampling points.
[0110] The coefficient of variation of the total instantaneous flow value within the candidate stable flow segment does not exceed the preset stable variation threshold, ensuring that the flow level within the segment remains stable and can represent the user's real continuous water flow behavior, rather than residual fluctuation components that have not been completely eliminated. The preset stable variation threshold is preferably configured to 5%.
[0111] Candidate stable flow segments that pass the validity discrimination rules are marked as valid stable flow segments; candidate stable flow segments that fail the validity discrimination rules are classified as residual fluctuation components and completely eliminated.
[0112] Subsequently, all effective stable flow segments are sequentially spliced together in ascending order of their original sampling timestamps. The splicing process strictly preserves the original instantaneous flow data, sampling timestamp information, and time interval relationships of each effective stable flow segment, thereby generating an initial stable flow sequence.
[0113] S205: Compliance verification and final output of stable traffic sequences.
[0114] Perform a full-dimensional compliance check on the generated initial stable traffic sequence. The check items include:
[0115] Time reference compliance: Verify that the sampling timestamps of all sampled data pairs within the initial stable flow sequence are within the boundary range of the preset nighttime monitoring interval, with no redundant data outside the interval, and are completely consistent with the time reference of step S1.
[0116] Data validity and compliance: Verify that there are no marked fluctuation components in the initial stable flow sequence, no data exceeding the rated measurement range of the high-precision flow sensor, and no data pairs corresponding to invalid sampling timestamps;
[0117] State characterization compliance: Verify that each effective stable flow segment within the initial stable flow sequence meets the validity discrimination rules for continuous water flow state, and that the coefficient of variation of the entire sequence flow meets the numerical requirements of the stable components.
[0118] If the initial stable flow sequence passes all compliance checks, it is determined that the sequence is a stable flow sequence that can reflect the user's real continuous water flow status, and the output is completed; if it fails the compliance check, return to step S202 to re-execute the fluctuation component identification and removal process until a stable flow sequence that meets the verification requirements is output.
[0119] refer to Figure 2 , Figure 2 Flowchart for removing short-time spike components and discrete oscillating components.
[0120] In step S3, based on the stable flow sequence, the minimum sustained flow identification algorithm is used to perform persistence discrimination and minimum value screening on each continuous flow segment, extracting the minimum continuous flow segment whose duration meets the judgment requirements and whose flow level remains stable, thus obtaining the nighttime minimum sustained flow characteristics, including:
[0121] S301: Continuous flow segment division and segment basic information extraction of stable flow sequences.
[0122] Using the stable flow sequence that is the final output of step S2 and can reflect the user's real continuous water flow status as the only processing object, the standardization of continuous flow segments is completed based on the continuity of sampling timestamps and the boundary marking of effective stable flow segments: each effective stable flow segment in the stable flow sequence that is continuous for a period of time, without sampling interruption and without fluctuation component removal interval is divided into an independent continuous flow segment, ensuring that the sampling data in each continuous flow segment is a valid instantaneous flow value that is completely continuous in the time dimension.
[0123] After segmenting, basic information is extracted for each continuous flow segment. The extracted information includes: a unique segment ID, the segment start sampling timestamp, the segment end sampling timestamp, the number of consecutive valid sampling points within the segment, the full instantaneous flow value dataset within the segment, and the segment's original time boundary marker. Simultaneously, based on the pre-configured sampling interval, the basic duration of the segment is calculated using the following formula:
[0124] ,
[0125] in, The basic duration corresponding to the continuous flow segment, This represents the number of consecutive valid sampling points within this section. The sampling interval pre-configured for step S102.
[0126] S302: Dual-dimensional prediction of the continuity and stability of continuous flow sections.
[0127] For the full continuous traffic segment after basic information extraction, the minimum continuous traffic identification algorithm is used to perform dual-dimensional pre-judgment of continuity and stability, filtering out invalid segments that do not meet the basic judgment requirements. The specific judgment rules and execution process are as follows:
[0128] The first step is to perform a continuous pre-judgment: verify whether the number of consecutive valid sampling points in the continuous flow section is not less than a preset minimum continuous sampling threshold. The preset minimum continuous sampling threshold is preferentially configured as 10 consecutive sampling points, corresponding to a basic duration of 10 minutes, and matched with a priority sampling frequency of 1 time / minute. At the same time, it supports custom configuration within the range of 5 to 30 consecutive sampling points according to the user's water type, pipeline hydraulic characteristics, and high-precision flow sensor metering accuracy requirements. If the number of consecutive valid sampling points in the continuous flow section is less than the preset minimum continuous sampling threshold, it is determined to be a section that does not meet the continuous standard, and is completely removed from the subsequent processing scope.
[0129] The second step is to perform stability prediction: For continuous flow segments that have passed the persistence prediction, based on the full instantaneous flow value dataset within the segment, the segment's coefficient of variation is calculated using the unified calculation formula in step S202. Calculation; verification of the coefficient of variation of this section. Whether it does not exceed the preset stable variation threshold of the section, the preset stable variation threshold of the section is preferentially configured to 3%, and can be customized according to the metering accuracy requirements; if the section variation coefficient of the continuous flow section exceeds the preset stable variation threshold of the section, it is determined to be a section with substandard stability, and is completely removed and not included in the subsequent processing scope.
[0130] Only continuous flow segments that pass both continuous and stable prediction are marked as qualified continuous flow segments and enter the subsequent feature quantification and screening process.
[0131] S303: Quantitative calculation of core characteristic parameters of qualified continuous flow sections.
[0132] For all objects marked as qualified continuous flow segments, the minimum continuous flow identification algorithm is used to complete the standardized quantification calculation of core feature parameters, providing a unified numerical benchmark for subsequent minimum value screening and optimal segment extraction. The calculation rules for each core feature parameter are as follows:
[0133] Representative flow rate of a section: The arithmetic mean of all instantaneous flow rates within a continuous flow section is used as the unique representative flow rate of that section. The calculation formula is completely consistent with the formula for calculating the arithmetic mean of flow rates in step S202, and the formula is as follows:
[0134] ,
[0135] in, The representative flow value for the corresponding qualified continuous flow range. This represents the number of consecutive valid sampling points within this section. For the first in this section The instantaneous flow rate value corresponding to each valid sampling point;
[0136] Effective duration of the segment: The basic duration calculated using step S301. The effective duration of this segment is fully bound to the pre-configured sampling interval and the number of consecutive effective sampling points to ensure the consistency of duration measurement.
[0137] Section flow stability: based on section coefficient of variation The calculation is as follows:
[0138] ,
[0139] in, The value represents the stability of the flow rate in a section corresponding to a qualified continuous flow range. The larger the value, the higher the stability of the flow rate in that section.
[0140] Segment relative time offset: Taking the start time of the preset nighttime monitoring interval as the time reference zero point, calculate the time offset value of the segment's starting sampling timestamp relative to the reference zero point, which is used as the segment relative time offset of the segment, providing a unified time reference for the analysis of adjacent cycle offset relationships in the subsequent S4 step.
[0141] After completing the full parameter calculation, a unique characteristic parameter file is established for each qualified continuous flow segment. The parameters in the file are bound to the segment's unique number and sampling timestamp information, and cannot be tampered with.
[0142] S304: Construction of minimum flow candidate set based on ascending sorting of segment representative flow values.
[0143] Based on the feature parameter files of all qualified continuous flow segments, and using the representative flow value of the segment as the core ranking index, all qualified continuous flow segments are sorted in ascending order to generate a segment ranking list. Based on the segment ranking list, the minimum continuous flow identification algorithm is used to complete the standardized construction of the minimum flow candidate set. The specific process is as follows:
[0144] The first step is to extract the qualified continuous flow segment that ranks first in the segment sorting list as the initial minimum flow candidate segment, and use the segment representative flow value of this segment as the benchmark minimum flow value.
[0145] The second step is to calculate the segment representative flow value of each of the remaining qualified continuous flow segments in the segment sorting list, and the relative deviation of the flow rate relative to the minimum benchmark flow value. The calculation formula is logically consistent with the formula for calculating the relative deviation in step S202, and the formula is as follows:
[0146] ,
[0147] in, To correspond to the relative deviation of the flow rate in the qualified continuous flow range, The representative flow value for the section to be calculated. The baseline minimum flow rate;
[0148] The third step is to set a preset candidate flow deviation threshold, which is preferably configured as 2%, but can also be customized according to the metering resolution of the high-precision flow sensor. All qualified continuous flow segments with relative flow deviations not exceeding the preset candidate flow deviation threshold are included in the minimum flow candidate set, thus completing the construction of the minimum flow candidate set.
[0149] S305: Continuous verification of the minimum flow candidate set and extraction of the optimal minimum continuous flow segment.
[0150] For the constructed minimum flow candidate set, a minimum continuous flow identification algorithm is used to perform multi-priority continuous verification to extract the unique optimal minimum continuous flow segment from the candidate set. The verification priority and extraction rules are strictly executed in the following order:
[0151] First priority: Longest effective duration of the segment. Sort the effective duration of all segments in the minimum traffic candidate set in descending order, and extract the segment with the longest effective duration as the first-level review segment; if there are multiple segments with the same effective duration and all of them are the maximum value, all of them are included in the second priority review scope;
[0152] Second priority: Segment with the highest flow stability takes precedence. For segments included in the second priority review scope, they are sorted in descending order based on flow stability, and the segment with the highest flow stability is extracted as the segment that passes the second-level review; if there are multiple segments with the same flow stability and all of them are at the maximum value, all of them are included in the third priority review scope.
[0153] Third priority: Reasonableness of time distribution in the segment. For segments included in the third priority review scope, the segment with the relative time offset closest to the midpoint of the preset nighttime monitoring interval is selected as the segment that passes the third-level review, using the relative time offset of the segment as the indicator.
[0154] After completing the full priority review, the only segment that passes the review is marked as the optimal minimum continuous flow segment, and the extraction is completed.
[0155] S306: Quantification and compliance verification of minimum continuous traffic characteristics at night.
[0156] Based on the extracted optimal minimum continuous flow segment, the standardized quantization of the minimum continuous flow feature at night is completed. The minimum continuous flow feature at night is a structured parameter set uniquely bound to the preset nighttime monitoring interval of the day, including the following core parameter items:
[0157] Minimum continuous flow value at night: The representative flow value of the optimal minimum continuous flow segment;
[0158] Minimum flow duration: The effective duration of the segment with the optimal minimum continuous flow.
[0159] Minimum flow segment time anchor: includes the segment start sampling timestamp, segment end sampling timestamp, and segment relative time offset of the optimal minimum continuous flow segment;
[0160] Minimum flow stability parameter: includes the section variation coefficient and section flow stability of the optimal minimum continuous flow segment;
[0161] Unique identifier for monitoring cycle: A uniquely traceable cycle number that is bound to the preset nighttime monitoring interval for that day.
[0162] After feature quantization is completed, a full-dimensional compliance check is performed on the minimum continuous traffic feature at night. The check items include:
[0163] Flow value compliance: The minimum continuous flow value at night is within the rated metering range of the high-precision flow sensor and is not lower than the minimum resolvable flow value of the high-precision flow sensor.
[0164] Continuous compliance: The duration corresponding to the minimum traffic volume is not less than the duration corresponding to the preset minimum continuous sampling threshold;
[0165] Stability compliance: The coefficient of variation of a section in the minimum flow stability parameter does not exceed the preset section stability variation threshold;
[0166] Time reference compliance: The time anchor point of the minimum flow segment is completely within the boundary range of the preset nighttime monitoring interval for the day, with no time offset outside the interval;
[0167] If the minimum continuous nighttime traffic feature passes all compliance checks, it is determined to be a valid feature, and the final output is completed. If it fails the compliance check, return to step S304, extract the next set of qualified segments from the segment sorting list to construct the minimum traffic candidate set, and re-execute the review, feature generation and verification process until the minimum continuous nighttime traffic feature that meets all verification requirements is output.
[0168] refer to Figure 3 , Figure 3 The flowchart shows the process of extracting the minimum continuous flow feature at night.
[0169] In step S4, based on the frequency of occurrence, flow stability, and offset relationship between adjacent periods of the minimum continuous nighttime flow characteristic in multiple consecutive monitoring cycles, a continuous analysis result is established, and occasional nighttime trace water use is distinguished from repetitive nighttime continuous water flow behavior, forming abnormal water use characterization quantities, including:
[0170] S401: Construction and Standardized Preprocessing of Multi-Period Historical Feature Datasets
[0171] Using the minimum continuous nighttime traffic feature, which has passed compliance verification and is the final output of step S3, as the core data unit, the standardized construction and preprocessing of the multi-period historical feature dataset is completed. The specific execution process is as follows:
[0172] The first step is to determine the continuous monitoring period window: Based on the user's water use type and water use rhythm characteristics, the parameters of the continuous monitoring period window are configured. The baseline configuration is as follows: the continuous monitoring period window is set as a preset nighttime monitoring interval corresponding to 7 consecutive natural days, with each natural day corresponding to one independent monitoring period, which corresponds one-to-one with the fixed data collection window period locked in step S101; at the same time, it supports custom configuration of the total number of continuous monitoring period windows for different water use characteristics such as residential users, commercial users, and industrial users. The configuration range is 3 to 30 consecutive monitoring periods. After configuration, the time boundary of the period window is locked to ensure that all monitoring periods included in the analysis have a completely consistent preset nighttime monitoring interval time benchmark, providing a unified time dimension scale for cross-period comparative analysis.
[0173] The second step is to collect multi-period feature data and remove invalid periods: Within the locked continuous monitoring period window, the minimum continuous nighttime flow characteristics corresponding to each monitoring period are fully collected to establish an initial multi-period feature dataset; at the same time, invalid periods are removed from the initial dataset. The removal rule is: if a monitoring period does not output a valid minimum continuous nighttime flow characteristic that passes the compliance verification of step S306, or if there is no valid stable flow sequence output in that period, it is determined to be an invalid monitoring period and is completely removed from the subsequent analysis.
[0174] The third step is dataset standardization and alignment: a two-dimensional standardization and alignment process is performed on the multi-cycle feature dataset after removing invalid cycles. First, time reference alignment is performed to verify that the start and end times of the preset nighttime monitoring intervals of all retained monitoring cycles are completely consistent, ensuring that the relative time offset of each cycle segment has a unified calculation reference. Second, numerical dimension alignment is performed based on the rated measurement range of the high-precision flow sensor. The minimum continuous flow value at night for all cycles is normalized and mapped in the same way as in step S201 to eliminate the impact of measurement range differences on the accuracy of cross-cycle analysis, and finally generate a standardized multi-cycle historical feature dataset.
[0175] S402: Quantitative calculation of core dimension parameters of multi-period features.
[0176] Based on a standardized multi-period historical feature dataset, this paper employs the same computational logic as the preceding steps to perform standardized quantification calculations of the feature parameters for each dimension, focusing on three core dimensions: frequency of occurrence, traffic stability, and adjacent period offset. The specific calculation rules are as follows:
[0177] Frequency of occurrence dimension parameter quantification calculation:
[0178] The first step is to define a valid occurrence event: For the minimum continuous flow characteristics at night in each monitoring period in the dataset, a valid occurrence event is determined if all of the following conditions are met: the minimum continuous flow value at night in this period is greater than the minimum resolvable flow value of the high-precision flow sensor, and the duration corresponding to the minimum flow is not less than the duration corresponding to the preset minimum continuous sampling threshold in step S302.
[0179] The second step is to calculate the effective occurrence frequency and occurrence rate: Calculate the total number of effective occurrence events within the continuous monitoring period window, and record this as the effective occurrence frequency. The total number of cycles based on the continuous monitoring cycle window. Calculate the effective frequency of occurrence The calculation formula is:
[0180] .
[0181] Quantitative calculation of traffic stability parameters:
[0182] The first step is to extract the dataset to be calculated: from the standardized multi-period historical feature dataset, extract the minimum nighttime continuous flow values corresponding to all valid occurrence events to form a multi-period flow dataset. ,in, The total number of valid events. For the first The minimum continuous flow value at night corresponding to each valid occurrence event;
[0183] The second step is to calculate the arithmetic mean of the multi-cycle flow rate. The calculation formula is completely consistent with the formula for calculating the arithmetic mean of the flow rate in step S202. The formula is as follows:
[0184] ,
[0185] in, The arithmetic mean of the minimum continuous flow rate at night over multiple periods;
[0186] The third step is to calculate the overall standard deviation of the multi-cycle flow. The calculation formula is completely consistent with the formula for calculating the overall standard deviation in step S202. The formula is:
[0187] ,
[0188] in, The overall standard deviation of the minimum continuous flow rate at night in multiple cycles;
[0189] The fourth step is to calculate the coefficient of variation of the multi-cycle flow rate. The calculation formula is completely consistent with the formula for calculating the coefficient of variation in step S202, and the formula is as follows:
[0190] ,
[0191] in, The coefficient of variation for multi-cycle flow is denoted as . A smaller value indicates a higher degree of stability in the minimum continuous flow at night over multiple cycles.
[0192] Step 5: Calculate the multi-period average flow stability: Extract the flow stability of the sections corresponding to all valid occurrence events. Calculate its arithmetic mean to obtain the multi-cycle average flow stability. The calculation formula is:
[0193] ,
[0194] in, This represents the stability of the average flow rate over multiple periods. A higher value indicates a greater degree of stability of the minimum flow rate segment within each period.
[0195] Multi-cycle flow variation coefficient Multi-period average flow stability It serves as a core parameter for determining the stability of traffic flow.
[0196] Quantitative calculation of the dimension parameters of the adjacent period offset relationship:
[0197] The first step is to extract the basic data of adjacent period offsets: From the standardized multi-period historical feature dataset, extract the relative time offsets of the segments corresponding to all valid events in chronological order of the monitoring periods to form a time offset dataset. ,in, For the first The relative time offset of the segment corresponding to each valid occurrence event is defined in complete accordance with step S303, with the start time of the preset nighttime monitoring interval of the corresponding monitoring cycle as the zero point of the time reference.
[0198] The second step is to calculate the absolute offset difference between adjacent periods: Following the chronological order, calculate the absolute difference in the relative time offset between two adjacent valid occurrence events to obtain the absolute offset difference between adjacent periods. The calculation formula is:
[0199] ,
[0200] in, For the first The absolute offset difference between adjacent periods in a group. The range of values is ;
[0201] The third step is to calculate the multi-period average offset difference and the offset variation coefficient: calculate the arithmetic mean of the absolute offset differences of all adjacent periods to obtain the multi-period average offset difference. Based on the absolute offset difference of all adjacent periods, the offset variation coefficient is calculated according to the unified calculation formula in step S202. This characterizes the degree of dispersion of time offset between adjacent periods;
[0202] The fourth step is to calculate the cumulative period offset: using the relative time offset of the segment of the first valid event within the continuous monitoring period window as the benchmark, calculate the cumulative offset of the last valid event within the window relative to the benchmark value. It characterizes the overall time offset trend of the minimum flow segment within multiple cycles;
[0203] Multi-period average offset difference , offset coefficient of variation Cumulative period offset It serves as the core parameter for determining the dimension of adjacent period offset relationship.
[0204] S403: Comprehensive construction based on the results of continuous analysis of multi-dimensional parameters.
[0205] Based on the quantitative calculation results of the aforementioned three core dimensions, a structured and continuous analysis result is established that uniquely corresponds to the user's nighttime hidden water usage status. The specific construction process is as follows:
[0206] The first step is to establish a multi-dimensional threshold system. All thresholds can be customized based on the user's water usage type, network hydraulic characteristics, and metering accuracy requirements. The baseline threshold configuration scheme is as follows:
[0207] Frequency determination threshold: The preset high frequency occurrence threshold is 80%, and the preset low frequency occurrence threshold is 30%.
[0208] Flow stability assessment thresholds: The preset high stability threshold is a multi-cycle flow variation coefficient ≤ 5%, and the preset low stability threshold is a multi-cycle flow variation coefficient ≥ 20%; the preset average stability pass threshold is a multi-cycle average flow stability ≥ 95%.
[0209] Time offset judgment threshold: The preset low offset threshold is the average offset difference of multiple periods ≤ 10 minutes, and the preset high offset threshold is the average offset difference of multiple periods ≥ 30 minutes; the preset offset discrete qualified threshold is the offset variation coefficient ≤ 15%.
[0210] The second step is to perform single-dimensional level determination, classifying levels for each of the three core dimensions:
[0211] Frequency-based classification: Effective occurrence frequency ≥ 80% is considered high frequency occurrence, 30% < effective occurrence frequency < 80% is considered mid frequency occurrence, and effective occurrence frequency ≤ 30% is considered low frequency occurrence;
[0212] Traffic stability level classification: High stability is defined as a multi-cycle traffic variation coefficient ≤ 5% and a multi-cycle average traffic stability ≥ 95%; Medium stability is defined as 5% < multi-cycle traffic variation coefficient < 20%; Low stability is defined as a multi-cycle traffic variation coefficient ≥ 20% or a multi-cycle average traffic stability < 95%.
[0213] Time offset dimension classification: a multi-period average offset difference ≤ 10 minutes and offset variation coefficient ≤ 15% is judged as low offset, 10 minutes < multi-period average offset difference < 30 minutes is judged as medium offset, and a multi-period average offset difference ≥ 30 minutes or offset variation coefficient > 15% is judged as high offset.
[0214] The third step is to perform a multi-dimensional comprehensive persistence assessment, and establish persistence levels and comprehensive assessment rules, as follows:
[0215] High persistence: Simultaneously satisfying the three conditions of high frequency occurrence, high stability, and low offset, it indicates that the minimum continuous traffic of users at night has extremely strong periodic repeatability and stability.
[0216] Medium persistence: It meets the conditions of medium frequency occurrence and simultaneously meets the two conditions of medium stability or above and medium offset or below, which indicates that the minimum continuous traffic of users at night has a certain periodic repeatability;
[0217] Low persistence: Meeting the conditions of low frequency occurrence, or low stability and high offset, characterizes the lack of stable periodic repetition of the user's minimum continuous traffic at night;
[0218] Lack of continuity: No valid events occur within the continuous monitoring period window, indicating that the user does not have stable continuous water flow behavior at night.
[0219] The fourth step is to generate standardized sustainability analysis results. These sustainability analysis results are structured datasets uniquely bound to the continuous monitoring period window, including: continuous monitoring period window boundary information, full quantification parameters of the three core dimensions, single-dimensional level determination results, and comprehensive sustainability level determination results, thus completing the final construction.
[0220] S404: Precisely distinguish water use behavior types based on continuous analysis results.
[0221] Based on the aforementioned continuous analysis results, and combined with the physical characteristics of user water usage behavior, precise classification of user nighttime water usage behavior is performed, clearly distinguishing between occasional minor nighttime water usage and repetitive continuous nighttime water usage behavior. The specific judgment rules are as follows:
[0222] Occasional nighttime trace water usage determination rules: Any of the following conditions must be met to be considered occasional nighttime trace water usage. This behavior is defined as irregular, non-continuous, and normal water usage behavior at night, and does not possess the characteristics of abnormal water usage:
[0223] The overall persistence level of the persistence analysis results is no persistence;
[0224] The overall persistence level of the persistence analysis results is low persistence, and the effective occurrence frequency is ≤30%, with no effective occurrence events in 3 or more consecutive monitoring cycles;
[0225] The overall sustainability level of the sustainability analysis results is medium sustainability, but the coefficient of variation of multi-cycle flow is ≥15%, and the offset relationship between adjacent cycles is high, with no stable time distribution pattern.
[0226] Rules for determining repetitive nighttime continuous water usage: A user is deemed to have engaged in repetitive nighttime continuous water usage if any of the following conditions are met. This behavior is defined as a continuous, stable, and recurring water usage behavior that occurs consistently at night and exhibits core characteristics of abnormal water usage, such as pipeline leakage and prolonged water flow:
[0227] The overall persistence level of the persistence analysis results is high persistence;
[0228] The overall persistence level of the persistence analysis results is medium persistence, and there are valid occurrence events for three or more consecutive monitoring cycles, the multi-cycle flow variation coefficient is ≤10%, and the adjacent cycle offset relationship is low offset.
[0229] Within the continuous monitoring period window, the effective occurrence frequency is ≥60%, and the minimum flow corresponding to the duration of all effective occurrence events is not less than 50% of the total duration of the preset nighttime monitoring interval, with no obvious flow mutations or time shifts.
[0230] After the behavior type is determined, a unique water use behavior type label is generated for the corresponding continuous monitoring period window. The labels are divided into two categories: "occasional nighttime trace water use" and "repetitive nighttime continuous water use behavior", and are bound to the continuous analysis results one by one.
[0231] S405: Standardized generation and compliance verification of abnormal water use characterization metrics.
[0232] Based on the aforementioned continuous analysis results and water use behavior type determination results, the standardized quantitative generation of abnormal water use characteristics is completed. The abnormal water use characteristics are a structured parameter set uniquely bound to the user and the continuous monitoring period window, providing core benchmark parameters for the deviation calculation and anomaly determination in the subsequent S5 step. Specifically, it includes the following core parameter items:
[0233] Basic identification parameters include: unique user identifier, time boundary of continuous monitoring period window, total number of monitoring periods, and total number of valid events.
[0234] Core flow characterization parameters include: arithmetic mean of minimum continuous flow at night over multiple periods, coefficient of variation of flow over multiple periods, stability of average flow over multiple periods, maximum minimum continuous flow at night over a single period, and minimum minimum continuous flow at night over a single period.
[0235] Persistence characterization parameters include: effective occurrence frequency, effective occurrence rate, comprehensive persistence level, multi-period average offset difference, and cumulative period offset;
[0236] Behavioral representation parameters: including water use behavior type label and the number of consecutive cycles of repetitive continuous water use behavior;
[0237] Baseline calculation parameters: include a baseline reference flow rate value bound to the type of water use behavior, where the baseline reference flow rate value corresponding to occasional nighttime trace water use is 0, and the baseline reference flow rate value corresponding to repetitive nighttime continuous water use behavior is the arithmetic mean of the minimum continuous flow rate at night over multiple periods.
[0238] After generating the abnormal water use characteristics, a full-dimensional compliance check is performed on them. The check items include:
[0239] Data traceability and compliance: Verification shows that all quantitative parameters within the abnormal water usage characteristics are derived from the valid nighttime minimum continuous flow characteristics output by step S3, and there is no data tampered with from unknown sources;
[0240] Logical consistency compliance: Verify that the water use behavior type label and the comprehensive sustainability level of the sustainability analysis results are completely matched, which complies with the judgment rules of step S404;
[0241] Numerical validity and compliance: Verify that all flow parameters are within the rated measurement range of the high-precision flow sensor, and that all duration, frequency, and proportional parameters meet the numerical boundary requirements, with no invalid data exceeding the limits.
[0242] If the abnormal water usage characteristic passes all compliance checks, it is determined to be a valid characteristic and the final output is completed; if it fails the compliance check, return to step S401 to re-execute the dataset construction and analysis process until the abnormal water usage characteristic meets all the verification requirements is output.
[0243] In step S5, based on the abnormal water use characteristics and combined with historical nighttime monitoring results, a user-specific nighttime baseline reference is constructed. Deviation calculation is performed on the abnormal water use characteristics for the current monitoring period to obtain the abnormal deviation results for the current period relative to the individual's normal water use characteristics, including:
[0244] S501: Standardized construction and preprocessing of historical monitoring datasets for individualized baseline construction.
[0245] Using the full historical abnormal water usage characteristics output from step S4, which have passed full-dimensional compliance verification, and the minimum continuous nighttime flow characteristics for each monitoring period, which have passed compliance verification, as the sole core data units, the standardized construction and preprocessing of the historical monitoring dataset for user-individualized baseline construction is completed. The specific execution process is as follows:
[0246] The first step is to lock and define the boundaries of the baseline construction period window: Based on the user's water use type and water use rhythm characteristics, the standardized parameter configuration of the baseline construction period window is completed. The baseline configuration scheme is as follows: the baseline construction period window is set as the preset nighttime monitoring interval corresponding to the 7 consecutive natural days before the current monitoring period to be determined. Each natural day corresponds to one independent historical monitoring period, which corresponds one-to-one with the fixed data collection window period locked in step S101. At the same time, it supports the customization of the total number of cycles of the baseline construction period window for different water use characteristics such as residential users, commercial users, and industrial users. The configuration range is 3 to 30 consecutive historical monitoring periods. After the configuration is completed, the time boundary of the period window is locked to clearly distinguish the historical cycle of baseline construction and the current monitoring period to be determined, ensuring that there is no overlap in the time interval between the two, and providing an unbiased historical data foundation for baseline construction.
[0247] The second step is to collect all historical data and remove invalid periods: Within the locked baseline construction period window, the minimum continuous nighttime flow characteristics and abnormal water use characteristics corresponding to each historical monitoring period are collected in full to establish an initial historical monitoring dataset; at the same time, invalid periods are removed from the initial dataset, and the removal rules are completely consistent with step S401: if a historical monitoring period does not output a valid minimum continuous nighttime flow characteristic that passes the compliance verification of step S306, or if there is no valid stable flow sequence output in that period, it is determined to be an invalid historical monitoring period and is completely removed and not included in the subsequent baseline construction scope.
[0248] The third step is to perform two-dimensional standardization and alignment of the dataset: After removing invalid periods, the historical monitoring dataset is standardized and aligned in two dimensions to ensure that all historical data and the current monitoring period to be determined have a unified comparison benchmark. First, time benchmark alignment is performed to verify that the start and end times of the preset nighttime monitoring intervals of all retained historical monitoring periods are completely consistent with the preset nighttime monitoring intervals of the current monitoring period to be determined, ensuring that the relative time offset of each period has a unified calculation benchmark. Second, numerical dimension alignment is performed based on the rated measurement range of the high-precision flow sensor. The minimum continuous flow value at night for all historical periods is normalized and mapped to the standardized numerical range of [0,1], eliminating the impact of measurement range differences on the accuracy of subsequent deviation calculations, and finally generating a standardized historical monitoring dataset.
[0249] S502: Hierarchical and refined construction of user-individualized nighttime baseline references.
[0250] Based on the standardized historical monitoring dataset generated above, and combined with the user's historical water use behavior type labels output in step S4, a hierarchical user-individualized nighttime baseline reference is constructed, uniquely bound to the user's water use characteristics. This baseline reference is a structured parameter system, divided into three levels: a basic baseline layer, a behavior-adaptive baseline layer, and dynamic correction coefficients. The specific construction rules are as follows:
[0251] The first step is the standardized calculation of the core parameters of the baseline layer:
[0252] The baseline layer consists of general benchmark parameters characterizing users' normal nighttime water usage patterns. All parameters are calculated based on standardized historical monitoring datasets, and the calculation formulas are completely consistent with the aforementioned steps. Core parameters include:
[0253] Individual normal flow baseline Extract the minimum nighttime continuous flow value corresponding to all valid events in the standardized historical monitoring dataset, and calculate the individual normal flow baseline according to the arithmetic mean calculation formula unified in step S202. The formula is as follows:
[0254] ,
[0255] in, The baseline is constructed based on the total number of valid events occurring within the periodic window. For the first The minimum continuous flow value at night corresponding to each valid occurrence event;
[0256] Individual normal duration baseline Extract the minimum flow duration corresponding to all valid occurrence events in the standardized historical monitoring dataset, and calculate the baseline of individual normal duration according to the unified arithmetic mean calculation formula;
[0257] Individual normal stability baseline: includes individual normal coefficient of variation baseline Compared with the baseline of individual normal flow stability ,in, The coefficient of variation is the minimum continuous flow value at night for all valid occurrences in history. The calculation formula is completely consistent with the coefficient of variation formula for step S202. It is the arithmetic mean of the flow stability of the section corresponding to all valid occurrence events in history. The calculation formula is completely consistent with the multi-period average flow stability formula of step S402.
[0258] Individual normal time deviation baseline Extract the relative time offset of the segment corresponding to all valid events in the standardized historical monitoring dataset, and calculate the individual normal time offset baseline according to the unified arithmetic mean calculation formula.
[0259] Baseline fluctuation allowable threshold: Based on the overall standard deviation of historical data, the upper limit of normal fluctuation of each baseline parameter is set. The baseline configuration is ±10% of the arithmetic mean of each parameter, and it can be customized according to the measurement accuracy requirements.
[0260] The second step is the differential construction of the behavior adaptation baseline layer:
[0261] Based on the user's historical water usage behavior type labels output in step S4, differentiated baseline rules are constructed for two types of users: "occasional nighttime trace water usage" and "repetitive nighttime continuous water usage," respectively, to adapt to their water usage characteristics. These rules are completely consistent with the behavior determination rules in step S404.
[0262] For users who occasionally use a small amount of water at night: the historical maximum value of the individual's normal flow baseline is used as the upper limit baseline for flow, 0 is used as the lower limit baseline for flow, and the maximum duration of a single effective event in history is used as the upper limit baseline for duration. It is clear that their normal water use is a small amount of water use with no stable cycle, low frequency, and short duration. The core constraint of the baseline is the upper limit threshold of flow and duration.
[0263] For users with repetitive nighttime continuous water usage behavior: a stable flow range baseline is constructed using the individual's normal flow baseline as the core benchmark and the baseline fluctuation allowable threshold as the upper and lower limits; a stable duration range baseline is constructed using the individual's normal duration baseline as the core; and a time offset allowable range is constructed using the individual's normal time offset baseline as the core, clarifying that their normal water usage is a high-frequency, high-stability, low-time-offset continuous water usage behavior, with the core baseline constraint being the fluctuation range of parameters.
[0264] The third step is the calculation and adaptation of the dynamic correction coefficient:
[0265] Based on the evolution trend of user water usage behavior within the baseline construction period window, a dynamic correction coefficient for the baseline is calculated to adapt to normal changes in user water usage rhythms. The calculation rule for the correction coefficient is as follows: based on the relative deviation between the individual normal flow baselines of the first half and the second half of the baseline construction period window, if the relative deviation does not exceed 20%, the dynamic correction coefficient is 1.0, and the baseline is not adjusted; if the relative deviation exceeds 20%, the calculation results of the second half of the period are used as the core, and the basic baseline parameters are weighted and corrected with a weight of 0.7 to ensure that the baseline can adapt to normal changes in user water usage habits and avoid misjudgment.
[0266] After completing the full-level construction, the final user-individualized nighttime baseline reference is generated, which includes all basic baseline parameters, behavior adaptation rules, and dynamic correction coefficients. It is bound to the user's unique identifier and the baseline construction cycle window, and cannot be tampered with.
[0267] S503: Extraction and benchmark alignment of the feature set expected to be determined in the current monitoring week.
[0268] The target monitoring period not included in the baseline construction period window is the only object of processing. The feature set to be determined is extracted and standardized and aligned to ensure that it has a completely consistent comparison benchmark with the user's individualized nighttime baseline reference. The specific process is as follows:
[0269] The first step is to extract core features for the current monitoring period: Based on the minimum nighttime continuous flow characteristic output from step S3 and the single-cycle abnormal water use characterization quantity output from step S4, extract the feature parameters to be determined that correspond one-to-one with the user's individualized nighttime baseline reference parameters, including: the minimum nighttime continuous flow value for the current period. The duration corresponding to the minimum flow rate in the current period The coefficient of variation of the current period segment Current period segment flow stability Relative time offset of the current period segment The current cycle water use behavior type label constitutes the current week's expected judgment feature set.
[0270] The second step is two-dimensional benchmark alignment: performing two-dimensional standardized alignment on the current week's expected judgment feature set in complete consistency with step S501. First, time benchmark alignment: verifying that the preset nighttime monitoring interval of the current monitoring cycle is completely consistent with the interval of the baseline construction cycle, ensuring that the calculation benchmark of the relative time offset of the segment is unified; second, numerical dimension alignment: based on the rated measurement range of the same high-precision flow sensor, performing a completely consistent range normalization mapping on the minimum continuous flow value at night in the current cycle, ensuring that the comparison benchmark of the flow value is unified.
[0271] The third step is to verify the validity of the feature set to be determined: the validity of the aligned feature set to be determined is verified. The verification rules are completely consistent with the compliance verification rules in step S306. The verification items include compliance of flow range, compliance of duration, compliance of stability value, and compliance of time base. If the verification fails, it is determined that there are no valid features to be determined in the current period, and the deviation calculation process is terminated. If the verification passes, the subsequent deviation calculation stage is entered.
[0272] S504: Standardized quantitative calculation of multi-dimensional deviation index.
[0273] Based on the user's individualized nighttime baseline reference and the current week's expected feature set, a standardized quantitative calculation of multi-dimensional deviation indicators is completed using the same calculation logic as the previous steps. This provides core numerical basis for subsequent anomaly detection. The specific calculation rules are as follows:
[0274] Step 1: Calculation of single-dimensional deviation index:
[0275] For each of the four core dimensions that correspond one-to-one with the baseline parameters, the deviation of each dimension is calculated. All calculation formulas are completely consistent with the logic of calculating the relative deviation and absolute difference in the previous steps.
[0276] Flow value deviation : Characterizes the degree of deviation of the current periodic flow value from the individual's normal flow baseline, and is calculated using the following formula:
[0277] ,
[0278] For users who only use a small amount of water occasionally at night, if The deviation of the flow value is calculated using the historical maximum nighttime minimum continuous flow value as the denominator.
[0279] Duration deviation : Characterizes the degree of deviation of the current cycle's minimum flow duration from the individual's normal duration baseline, calculated using the following formula:
[0280] ,
[0281] Flow stability deviation : Characterizes the degree of deviation of the current periodic flow stability from the individual normal stability baseline, and is calculated using the following formula:
[0282] ,
[0283] Time offset deviation : Characterizes the degree of deviation of the time distribution of the current period's minimum flow segment from the individual's normal time offset baseline, with the absolute difference as the core judgment indicator. The calculation formula is:
[0284] .
[0285] The second step is the weighted calculation of the overall deviation:
[0286] Based on the water use behavior type label corresponding to the current period, differentiated weights are assigned to the deviation of each single dimension, and the overall deviation is calculated by weighted average. The weight allocation rules are fully adapted to the characteristics of water use behavior. The baseline weight configuration scheme is as follows:
[0287] For users with repetitive nighttime continuous water usage behavior: the deviation weight of flow rate is 0.5, the deviation weight of duration is 0.3, the deviation weight of flow rate stability is 0.15, and the deviation weight of time offset is 0.05, with the core emphasis on the abnormal contribution of flow rate and duration.
[0288] For users with occasional nighttime low-volume water usage: the deviation weight of flow rate is 0.4, the deviation weight of duration is 0.4, the deviation weight of flow rate stability is 0.1, and the deviation weight of time offset is 0.1, taking into account a balanced consideration of sudden changes in flow rate and duration;
[0289] Overall deviation The calculation formula is:
[0290] ,
[0291] in, Weighting for deviation of flow value. Weighting for duration deviation. As a weight for the deviation of traffic stability, As the weight for time offset deviation, The total duration of the preset nighttime monitoring interval is used to normalize the absolute difference in time offset to a percentage range, ensuring the uniformity of the units in the weighted calculation.
[0292] After completing the full deviation calculation, a deviation index set for the current period is generated, which includes 4 single-dimensional deviations and 1 comprehensive deviation, and is bound to the feature set to be judged and the user's individualized nighttime baseline reference.
[0293] S505: Determination of abnormal deviation level and generation of structured results based on deviation index.
[0294] Based on the deviation index set calculated above, and combined with user water usage behavior types, multi-level abnormal deviation judgment rules are established to complete the abnormal deviation level classification and structured result generation. The specific process is as follows:
[0295] The first step is to set the threshold system for judging abnormal deviations:
[0296] A judgment threshold system is established that is linked to the overall deviation and the single-dimensional deviation. All thresholds can be customized according to the user's water use type, the hydraulic characteristics of the pipeline network, and the metering accuracy requirements. The baseline threshold configuration scheme is as follows:
[0297] Normal range: Overall deviation ≤10%, and the deviation of each single dimension does not exceed the corresponding baseline fluctuation allowable threshold;
[0298] Mild deviation: 10% < overall deviation ≤ 30%, no single dimension deviation exceeding 50%;
[0299] Moderate deviation: 30% < overall deviation ≤ 60%, or single-dimensional deviation exceeding 50% but not exceeding 100%;
[0300] Severe deviation: Overall deviation > 60%, or flow rate deviation > 100%, or duration deviation > 100%.
[0301] The second step is a comprehensive determination of the level of abnormal deviation:
[0302] Based on a threshold system and combined with the user's water usage behavior type, a comprehensive judgment is made, and the judgment rules are as follows:
[0303] Prioritize single-dimensional bypass judgment: If the deviation of the current cycle flow value is >100%, or the deviation of the duration is >100%, regardless of the overall deviation value, it is directly judged as a severe deviation, corresponding to high-risk abnormal water use behaviors such as pipeline leakage and continuous water flow;
[0304] Standard level determination: When there is no over-level triggering, the corresponding abnormal deviation level is determined based on the threshold range of the comprehensive deviation degree;
[0305] Behavioral adaptation correction: For users with occasional nighttime micro-water usage, if a valid event occurs in the current cycle but no valid event occurs in the historical baseline construction cycle, it is directly judged as a moderate deviation; for users with repetitive nighttime continuous water usage behavior, if no valid event occurs in the current cycle, it is directly judged as a moderate deviation, ensuring that the judgment rules are adapted to the user's normal water usage characteristics.
[0306] The third step is to generate structured anomaly deviation results:
[0307] Based on the aforementioned judgment results, a structured abnormal deviation result uniquely bound to the current monitoring period and user is generated. This result is a standardized dataset containing the following core content:
[0308] Basic identification information includes the user's unique identifier, the current monitoring period time boundary, the baseline construction period window time boundary, and the preset nighttime monitoring interval parameters;
[0309] Benchmark reference information: includes all core parameters of the user's individualized nighttime baseline reference, water use behavior type labels, and weight configuration scheme;
[0310] Information on features to be determined: including all parameters and standardized alignment results of the feature set to be determined this week;
[0311] Deviation calculation results include: full single-dimensional deviation index, comprehensive deviation index, and weight coefficients for each dimension;
[0312] Anomaly determination results include the final anomaly deviation level, determination trigger rules, and anomaly risk level prompts. The anomaly risk level corresponds one-to-one with the anomaly deviation level: normal corresponds to no risk, slight deviation corresponds to low risk, moderate deviation corresponds to medium risk, and severe deviation corresponds to high risk.
[0313] S506: Full-dimensional compliance verification and final output of abnormal deviation results.
[0314] Perform full-dimensional compliance checks on the generated structured anomaly deviation results to ensure the traceability, consistency, and validity of the results. The check rules are completely consistent with the compliance check logic of the aforementioned steps. The specific check items are as follows:
[0315] Data traceability and compliance: Verify that all basic data, feature parameters, and deviation indicators within the abnormal deviation results are valid data that have passed compliance verification and are output from steps S1-S4, without any tampered data of unknown origin or fictitious parameters created out of thin air;
[0316] Benchmark consistency compliance: Verify that the standardized processing rules and deviation calculation formula of the current week's expected judgment feature set are completely consistent with the construction rules and calculation logic of the user's individualized nighttime baseline reference, and there is no calculation deviation caused by benchmark mismatch;
[0317] Logical matching compliance: Verify that the abnormal deviation level judgment result is completely matched with the deviation index and judgment threshold system, and that the water use behavior type is completely matched with the weight configuration and correction rules, with no logical contradictions or misuse of judgment rules;
[0318] Numerical validity and compliance: All deviation indicators and proportional parameters are verified to meet the numerical boundary requirements, with no invalid data exceeding the limits. Flow and duration parameters are all within the time boundary range of the rated measurement range of the high-precision flow sensor and the preset nighttime monitoring interval.
[0319] If the abnormal deviation result passes all compliance checks, it is determined to be a valid result, and the final output is completed; if it fails the compliance check, the corresponding link that does not meet the check requirements is located, and the corresponding step is returned to re-execute the data processing, calculation or judgment process until the abnormal deviation result that meets all the check requirements and is relative to the individual's normal water use characteristics in the current period is output.
[0320] This embodiment continuously collects instantaneous flow data within a preset nighttime monitoring interval. A flow fluctuation filtering algorithm removes short-term spikes and discrete oscillations from the original nighttime flow sequence, retaining a stable flow sequence that characterizes the true continuous water flow state. Based on this, the minimum continuous nighttime flow characteristic is identified. Furthermore, by combining the frequency of this characteristic's occurrence over multiple consecutive monitoring cycles, the degree of flow stability, and the offset relationship between adjacent cycles, a continuous analysis result is established, forming an abnormal water use characterization quantity. Then, a user-specific nighttime baseline reference is constructed using historical nighttime monitoring results, and deviation calculation and abnormal deviation level determination are performed for the current monitoring cycle. Simultaneously, this invention deploys the above method in the flow acquisition module, real-time clock module, main control processing module, data storage module, RS485 communication module, and abnormal alert module of an ultrasonic water meter, realizing an integrated application of abnormal monitoring, result output, remote transmission, and local alerts. This improves the continuous monitoring capability, judgment accuracy, and engineering practicality for abnormal water use behaviors such as hidden leakage and continuous water flow.
[0321] Example 2
[0322] This invention discloses an ultrasonic water meter for monitoring abnormal water usage based on minimum continuous flow at night, including a flow acquisition module, a real-time clock module, a main control processing module, a data storage module, an RS485 communication module, and an anomaly alert module;
[0323] The flow acquisition module uses a high-precision flow sensor, which is installed in the water flow channel of the water meter body to collect instantaneous flow data of water in real time, and convert the collected analog signal into a digital signal and transmit it to the main control processing module.
[0324] The real-time clock module is electrically connected to the main control processing module for accurate timing. It is preset to a nighttime traffic monitoring interval from 2:00 AM to 5:00 AM and triggers the main control processing module to start the monitoring process at regular intervals.
[0325] The main control processing module is the core control unit, which has built-in flow fluctuation filtering algorithm and minimum continuous flow identification algorithm, used to process and analyze the instantaneous flow sequence collected within the preset nighttime monitoring interval. The main control processing module uses a flow fluctuation filtering algorithm based on the instantaneous flow sequence to perform fluctuation component identification and stable component retention processing. Short-term spike components and discrete oscillation components caused by instantaneous start / stop, pipeline pressure fluctuations, and metering jitter are removed to obtain a stable flow sequence reflecting the true continuous water flow state. Then, based on the stable flow sequence, a minimum continuous flow identification algorithm is used to perform continuity discrimination and minimum value screening on each continuous flow segment, extracting the minimum continuous flow segment whose duration meets the judgment requirements and whose flow level remains stable, thus obtaining the nighttime minimum continuous flow characteristic. On this basis, combining the frequency of occurrence of the nighttime minimum continuous flow characteristic in multiple consecutive monitoring cycles, the degree of flow stability, and the offset relationship between adjacent cycles, a continuous analysis result characterizing the user's nighttime hidden water use status is established. Based on the continuous analysis result, occasional nighttime trace water use and repetitive nighttime continuous water flow behavior are distinguished to form an abnormal water use characterization quantity. Furthermore, combined with historical nighttime monitoring results, a user-individualized nighttime baseline reference is constructed. The deviation of the abnormal water use characterization quantity for the current monitoring cycle is calculated to obtain the abnormal deviation result of the current cycle relative to the individual's normal water use characteristics, and the corresponding abnormal monitoring result is output accordingly.
[0326] The data storage module is electrically connected to the main control processing module and is used to store the minimum continuous flow data, corresponding duration, flow fluctuation filtering records, and abnormal monitoring logs from 2:00 to 5:00 every day. The data can be stored cyclically for no less than 90 days to support the correlation analysis of multiple consecutive nighttime monitoring intervals.
[0327] The RS485 communication module is bidirectionally electrically connected to the main control processing module and adopts the standard Modbus-RTU communication protocol. It is used to transmit the monitored minimum continuous flow data, equipment status information, and anomaly judgment results to external reading devices or water management systems. It also supports external devices to send parameter configuration commands through the RS485 interface.
[0328] The anomaly alert module includes an LED warning light and a buzzer, which are electrically connected to the main control processing module. When an abnormal water usage is detected, the main control processing module drives the LED warning light to flash and the buzzer to sound intermittently to achieve local anomaly alert.
[0329] refer to Figure 4 , Figure 4 This is a block diagram of the core hardware structure of an ultrasonic water meter.
[0330] Figure 4The core hardware components and connections of an ultrasonic water meter for monitoring water usage anomalies based on minimum continuous flow at night are shown. These include a display screen for real-time display of monitoring status and parameter information, a sensor group installed in the water flow channel for collecting instantaneous flow data, a main control unit (MCU) that handles the flow fluctuation filtering algorithm and minimum continuous flow identification algorithm, and an RS485 communication interface for data interaction and parameter configuration with external devices.
[0331] It should be noted that, Figure 4 This is for illustrative purposes only, intended to help understand the process structure and data organization, and does not represent the precise working state in actual operation.
[0332] The specific functions of each module described above are as described in the relevant content of the water usage anomaly monitoring method based on minimum continuous flow at night in Example 1, and will not be repeated here.
[0333] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for monitoring abnormal water use based on minimum continuous flow rate at night, characterized in that, Includes the following steps: Instantaneous flow rate data of water are continuously collected within a preset nighttime monitoring interval and arranged in order of sampling time to obtain the instantaneous flow rate sequence for the night of that day; Based on the instantaneous flow sequence, a flow fluctuation filtering algorithm is used to remove short-term spike components and discrete oscillation components to obtain a stable flow sequence. Based on stable flow sequences, a minimum sustained flow identification algorithm is used to perform persistence discrimination and minimum value screening on each continuous flow segment, extract the minimum continuous flow segment, and obtain the nighttime minimum sustained flow characteristics. Based on the frequency of occurrence, flow stability and offset relationship of minimum continuous flow characteristics at night in continuous monitoring cycles, a continuous analysis is established to form a characterization of abnormal water use. Based on the abnormal water usage characteristics, a user-specific nighttime baseline reference is constructed by combining historical nighttime monitoring results. The deviation of the abnormal water usage characteristics in the current monitoring period is calculated to obtain the abnormal deviation results.
2. The water usage anomaly monitoring method based on minimum continuous flow at night as described in claim 1, characterized in that, A flow fluctuation filtering algorithm is used to remove short-term spikes and discrete oscillations, resulting in a stable flow sequence, including: The sampling interval and sampling point to be judged are determined based on the instantaneous flow sequence, and fluctuation judgment indicators corresponding to instantaneous start-stop, pipeline pressure fluctuation and metering jitter are established respectively. For short-term spike components induced by instantaneous start and stop, a stable flow baseline is determined based on the average flow of adjacent stable sampling points before and after the sampling interval to be determined, and identification is completed by combining the abrupt change amplitude and the flow drop status before and after the interval. For the discrete oscillation component induced by pipeline pressure fluctuations, identification is completed based on the coefficient of variation of the continuous sampling interval to be determined and the duration of stable flow within the interval; For discrete oscillation components induced by measurement jitter, identification is completed based on the relative deviation of the sampling point to be determined relative to the adjacent valid sampling points before and after it and the continuity of the deviation. The identified short-term spike components and discrete oscillating components are removed in a hierarchical, non-destructive manner, while retaining the original sampling timestamp information of the candidate stable component intervals to obtain a stable flow sequence.
3. The water usage anomaly monitoring method based on minimum continuous flow at night as described in claim 1, characterized in that, The minimum continuous flow segment is extracted using a minimum sustained flow identification algorithm, including: For each continuous flow segment, a persistence determination and a stability determination are performed sequentially. Continuous flow segments that pass both determinations are marked as qualified continuous flow segments. The qualified continuous flow segments are sorted in ascending order based on the segment representative flow value. All qualified continuous flow segments whose segment representative flow value is within the range of the preset candidate flow deviation threshold are included in the minimum flow candidate set. For each segment within the minimum flow candidate set, a multi-priority review is performed in the following order: longest effective duration of the segment, highest flow stability of the segment, and segment relative time offset closest to the midpoint of the preset nighttime monitoring interval. The segment that passes the review is then selected as the optimal minimum continuous flow segment.
4. The water usage anomaly monitoring method based on minimum continuous flow at night as described in claim 1, characterized in that, The user-personalized nighttime baseline reference is constructed in a hierarchical structure, including three levels: the basic baseline layer, the behavior adaptation baseline layer, and the dynamic correction coefficient. The basic baseline layer calculates the individual normal flow baseline, individual normal duration baseline, individual normal stability baseline, and individual normal time offset baseline based on the historical minimum continuous flow characteristics corresponding to all valid events within the baseline construction period window. The behavior adaptation baseline layer constructs differentiated baseline rules to adapt to the water use characteristics of two types of users: those with occasional nighttime micro-water use and those with repetitive nighttime continuous water use. The dynamic correction coefficient is calculated based on the evolution trend of user water use behavior within the baseline construction period window, and performs weighted correction on the basic baseline parameters to generate a user-individualized nighttime baseline reference.
5. The water usage anomaly monitoring method based on minimum continuous flow at night as described in claim 1, characterized in that, Deviation calculation includes single-dimensional deviation calculation and comprehensive deviation weighted calculation. Single-dimensional deviation includes flow rate deviation, duration deviation, flow stability deviation, and time offset deviation. The deviation of each dimension is calculated as the ratio of the difference between the expected judgment feature parameter of the current monitoring week and the corresponding parameter of the user's individualized nighttime baseline. The comprehensive deviation is calculated based on the deviation of each single dimension, and differentiated weights are assigned to each dimension according to the water use behavior type label corresponding to the current monitoring period.
6. The method for monitoring abnormal water use based on minimum continuous flow at night as described in claim 1, characterized in that, Establish continuous analysis, including: Quantitative calculations were performed on three core dimensions: frequency of occurrence, stability of traffic flow, and offset relationship between adjacent cycles. The frequency of occurrence is calculated as the ratio of the number of valid events occurring within multiple consecutive monitoring periods to the total number of monitoring periods. The core parameters for the stability of traffic flow are the coefficient of variation of the minimum continuous traffic flow value at night over multiple periods and the average traffic flow stability over multiple periods. The dimension of adjacent cycle offset relationship uses the absolute difference of the relative time offset of segments during adjacent monitoring cycles and the offset variation coefficient as the core parameters; Based on the three core dimensions of the grading rules, a multi-dimensional comprehensive persistence determination is performed, and the comprehensive persistence level is divided into high persistence, medium persistence, low persistence and no persistence, and a structured persistence analysis result is established.
7. The method for monitoring abnormal water use based on minimum continuous flow at night as described in claim 2, characterized in that, The calculation of the stable flow baseline and abrupt change amplitude in the short-time peak component includes: Extract the effective instantaneous flow rate values of the number of consecutive preset baseline window sampling points before the start time and after the end time of the sampling interval to be determined, and calculate the arithmetic mean of the forward window flow rate and the arithmetic mean of the backward window flow rate respectively. When the relative difference between the arithmetic mean of the forward window flow and the arithmetic mean of the backward window flow does not exceed the preset baseline consistency threshold, the arithmetic mean of the two is taken as the stable flow baseline. The mutation amplitude is calculated by the proportion by which the maximum instantaneous flow rate of the interval to be determined exceeds the stable flow rate baseline. If the mutation amplitude exceeds the preset peak amplitude threshold and the flow rates before and after the interval fall back to the allowable range of the stable flow rate baseline, the interval is determined to be a short-term peak component.
8. The method for monitoring abnormal water use based on minimum continuous flow at night as described in claim 2, characterized in that, The calculation of relative deviation in discrete oscillation components induced by metering jitter and the determination of the lack of continuity of deviation include: Extract the instantaneous flow rate values of the preceding and following adjacent valid sampling points of the single sampling point to be judged, and use the arithmetic mean of the two as the adjacent reference flow rate values; The relative deviation is defined as the ratio of the absolute value of the difference between the instantaneous flow rate of the sampling point to be determined and the adjacent reference flow rate to the adjacent reference flow rate. The deviation is not continuous, meaning that neither the preceding nor following adjacent sampling point of the sampling point to be judged is determined to be a discrete oscillation component induced by metering jitter; a single sampling point whose relative deviation exceeds the preset jitter deviation threshold and whose deviation is not continuous is determined to be a discrete oscillation component induced by metering jitter.
9. The method for monitoring abnormal water use based on minimum continuous flow at night as described in claim 3, characterized in that, Persistence and stability criteria include: The continuous discrimination check verifies whether the number of continuous valid sampling points in the continuous flow segment is not less than the preset minimum continuous sampling threshold. Continuous flow segments that are lower than the preset minimum continuous sampling threshold are judged as non-compliant and are completely removed. For continuous flow segments that pass the persistence test, the stability assessment uses the coefficient of variation of the total instantaneous flow value within the segment as the evaluation index. Continuous flow segments with a coefficient of variation exceeding the preset stability variation threshold are judged as having substandard stability and are completely removed.
10. An ultrasonic water meter for monitoring water usage anomalies based on minimum continuous flow at night, used to implement the water usage anomaly monitoring method based on minimum continuous flow at night as described in any one of claims 1-9, characterized in that, Includes a traffic acquisition module, a real-time clock module, a main control processing module, a data storage module, an RS485 communication module, and an anomaly alert module. The flow acquisition module collects instantaneous flow data of water through a flow sensor installed in the water flow channel of the water meter body; the real-time clock module is used to lock the preset nighttime monitoring range and trigger the monitoring process at regular intervals; The main control processing module is connected to the flow acquisition module, real-time clock module, data storage module, RS485 communication module and anomaly alert module respectively. It has built-in flow fluctuation filtering algorithm and minimum continuous flow identification algorithm to construct instantaneous flow sequence from instantaneous flow data in chronological order. The flow fluctuation filtering algorithm removes short-term spike components and discrete oscillation components to obtain a stable flow sequence. The minimum sustained flow feature at night is extracted based on the minimum sustained flow identification algorithm using a stable flow sequence. By combining the frequency of occurrence of the minimum continuous flow characteristics at night within the continuous monitoring period, the degree of flow stability, and the offset relationship between adjacent periods, an abnormal water use characterization quantity is formed. Based on the user's individualized nighttime baseline reference, the deviation of the abnormal water use characterization quantity is judged to obtain the abnormal deviation result. The data storage module is used to store nighttime monitoring data; the RS485 communication module is used to transmit monitoring data and receive parameter configuration commands; the anomaly alert module is used to execute local alerts when abnormal water usage is detected.