Intelligent water meter remote monitoring method and system based on Internet of Things
Through the use of Internet of Things technology and smart water meter systems, time series decomposition and cluster analysis are used to identify water usage patterns. Combined with anomaly detection and machine learning algorithms, the limitations of smart water meter systems in data processing and analysis are overcome, and accurate monitoring of water usage behavior and prediction of equipment failures are achieved, thereby improving the scientific nature and efficiency of water management.
Patent Information
- Application Number
- CN202511015388.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-10-03
AI Technical Summary
Existing smart water meter systems have limitations in data processing and analysis, making it difficult to accurately distinguish between normal water use and abnormal behavior, and unable to effectively predict equipment failures or reveal long-term water use trends, resulting in a lack of accurate judgment and decision-making support for water management.
Use IoT technology to obtain real-time water usage data, identify water usage patterns through time series decomposition and cluster analysis, combine anomaly detection and machine learning algorithms to determine water leakage or theft, predict the probability of equipment failure, and generate dynamic water management reports.
It realizes intelligent monitoring and management of water use behavior, improves water use efficiency and the accuracy of equipment maintenance, and enhances the operating efficiency and safety of the water supply system.
Smart Images

Figure CN120750983A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of smart water meters, and in particular relates to a remote monitoring method and system for smart water meters based on the Internet of Things. Background Art
[0002] Water resource management plays a vital role in global sustainable development, especially in the context of accelerating urbanization and increasingly scarce water resources. Smart water meters, enabled by the Internet of Things (IoT), enable remote monitoring, which not only improves water management efficiency but also supports water conservation and scientific decision-making. Currently, smart water meter systems are widely used to collect and transmit water usage data, but existing methods have significant limitations in data processing and analysis. Many systems only focus on basic data recording and simple statistics, failing to fully explore the data's potential value. This is especially true in complex water use scenarios, where it is difficult to accurately distinguish between normal and abnormal water use, effectively predict equipment failures, or reveal long-term water use trends. These limitations leave water management departments without accurate judgments and forward-looking response strategies when faced with issues such as leaks, theft, or equipment maintenance.
[0003] In the field of remote monitoring of smart water meters, efficient data analysis has become a core challenge. While the real-time collection of massive amounts of water usage data provides rich material for analysis, the complexity and diversity of the data make traditional analysis methods difficult to cope with. In particular, the dynamic changes in water usage patterns require the system to be able to adaptively identify the water usage habits of different users and extract patterns from them. However, when building dynamic water usage behavior models, existing technologies often lack intelligent algorithms and are unable to accurately distinguish between normal water use and abnormal situations such as leaks or theft. This inadequacy of model construction further exacerbates another key issue: the limited ability to deeply mine historical data, making it difficult to discover hidden water usage patterns or equipment operating characteristics. This not only affects the decision-making efficiency of water management, but can also lead to wasted resources or delayed equipment maintenance.
[0004] Therefore, how to develop a deep analysis algorithm for smart water meter monitoring data that can not only identify dynamic water use patterns and abnormal behaviors through intelligent methods, but also combine time series analysis to mine the laws and characteristics in historical data has become a key issue in improving the scientificity and efficiency of water management. Summary of the Invention
[0005] To solve the above technical problems, the present invention provides a remote monitoring method for smart water meters based on the Internet of Things, comprising:
[0006] Obtain real-time water consumption data from smart water meters and transmit it to a cloud server using IoT protocols to obtain a structured water consumption dataset.
[0007] For the structured water use dataset, a time series decomposition method is used to separate trend, cycle and noise components to obtain water use pattern characteristics;
[0008] Based on the water use pattern characteristics, an adaptive clustering model is constructed to identify the dynamic water use patterns of different users and determine the user water use behavior classification;
[0009] If the user's water usage behavior classification deviates from the preset normal water usage mode threshold, the data deviation is analyzed through an anomaly detection algorithm to determine whether there is water leakage or theft;
[0010] For water use data that is judged to be abnormal, a time series forecasting model is used to analyze short-term water use fluctuations to obtain the persistence characteristics of abnormal behavior;
[0011] Obtain long-term water usage records from historical data sets and, combined with time series analysis methods, explore periodic water usage patterns and equipment operation characteristics to identify long-term trend characteristics.
[0012] Based on long-term trend characteristics, a machine learning classification algorithm is used to predict the probability of equipment failure and obtain equipment maintenance priority ranking;
[0013] Generate dynamic water management reports based on equipment maintenance priority sorting and persistent characteristics of abnormal behavior.
[0014] Preferably, the process of obtaining the structured water usage dataset includes:
[0015] Obtain real-time water usage data from smart water meters through the MQTT protocol and upload the collected raw data to the cloud server;
[0016] For the initial water consumption data records, the 3σ principle is used on the cloud server to remove data points that deviate from the mean by three times the standard deviation, and completely duplicate records are deleted to obtain a structured water consumption dataset;
[0017] Save the processed data to the water_usage table in the MySQL database and create a timestamp index to ensure query efficiency;
[0018] Scan the database for the latest record time every hour. If the difference between the last update time and the current time exceeds 30 minutes, trigger the MQTT protocol to re-collect data;
[0019] The water consumption data in the database is grouped and summed by hour, and the water consumption change rate of each hour is calculated. When the change rate exceeds the preset threshold of 20%, it is marked as data to be checked;
[0020] The support vector machine algorithm is used to classify the labeled data. The input features are the mean and standard deviation of water consumption in the last 6 hours, and the output is normal or abnormal label.
[0021] When the classification result is abnormal, an adjustment instruction to reduce the valve opening by 50% is sent to the smart water meter, and within 5 minutes after the instruction is issued, it is verified whether the latest water consumption falls back to the average range.
[0022] Preferably, the process of obtaining the water usage pattern characteristics includes:
[0023] Obtain water usage time series from structured data, use preprocessing techniques to clean missing values and outliers, and obtain the cleaned series;
[0024] If missing data points are detected, they are filled using interpolation methods based on the estimated values of adjacent points;
[0025] If a data point is detected to be outside the preset threshold range, it is replaced with the neighboring mean to obtain the cleaned sequence;
[0026] For the cleaned sequence, the classic time series decomposition algorithm STL is used to separate the trend component, periodic component and noise component to obtain the decomposition result;
[0027] Through iterative calculation of STL algorithm, long-term trend, periodic fluctuation and random noise are extracted to obtain decomposition results;
[0028] According to the decomposition results, the trend components are extracted and smoothed using the moving average method to obtain a smooth trend curve;
[0029] By calculating the moving average of a fixed window, short-term fluctuations in the trend component are eliminated to obtain a smooth trend curve;
[0030] For the periodic components in the decomposition results, Fourier transform is used to analyze the periodic frequency and determine the main period length;
[0031] Calculate the frequency distribution of periodic components through Fourier transform, extract the period length corresponding to the significant frequency, and determine the main period length;
[0032] From the smooth trend curve and the length of the main cycle, the variation pattern of water consumption is obtained, and the pattern characteristics are extracted using cluster analysis;
[0033] The K-means clustering algorithm is used to group the trend and period features to obtain the water use pattern characteristics.
[0034] Preferably, the process of determining the classification of user water usage behavior includes:
[0035] By obtaining raw data from water use records and preliminarily sorting out water use patterns, a basic data set was obtained;
[0036] Based on the basic data set, feature extraction methods are used to analyze the temporal distribution and flow changes in water use patterns and determine key characteristic parameters;
[0037] If the key feature parameters meet the preset threshold range, they are classified as valid feature data and a valid feature set is obtained;
[0038] By using effective feature sets, an adaptive clustering model is constructed to group dynamic behaviors and determine the user's water use behavior category.
[0039] According to the grouping processing results, the correlation between user categories and water use behaviors is analyzed to obtain the classification mapping relationship;
[0040] Use classification mapping relationships to conduct real-time comparisons of newly acquired water use data to determine the behavioral categories of the new data;
[0041] By continuously monitoring the categories to which behaviors belong, the parameters of the clustering model are updated to obtain dynamically adjusted classification results.
[0042] Preferably, the process of determining whether there is water leakage or theft includes:
[0043] By obtaining the user's historical water use behavior data from water use records and comparing it with the pre-established normal pattern, preliminary behavior deviation results are obtained;
[0044] Based on the behavioral deviation results, the threshold judgment is performed on the deviated data in combination with the preset threshold to determine whether there is abnormal data beyond the normal range;
[0045] If the abnormal data exceeds the preset threshold, the isolation forest algorithm in the anomaly detection algorithm will be used to further analyze the abnormal data to determine whether there is a significant data deviation;
[0046] Based on the data deviation analysis results, obtain the specific distribution characteristics of the deviation and determine whether the deviation is associated with water leakage;
[0047] If the deviation is associated with water leakage, the historical water use behavior is compared with the current deviation to determine whether it meets the typical characteristics of water leakage;
[0048] Based on the judgment result of the water leakage situation, the behavioral pattern characteristics related to the theft situation are obtained to determine whether the theft situation exists.
[0049] Preferably, the process of obtaining the persistence characteristics of abnormal behavior includes:
[0050] Through the pre-established time series forecasting model, the changing patterns of short-term fluctuations are obtained from water use data, and the preliminary characteristics of the fluctuation trend are determined;
[0051] Based on the preliminary characteristics of the fluctuation trend, the time series analysis method is used to extract the significant patterns of abnormal behavior and obtain the distribution characteristics of abnormal behavior;
[0052] By comparing and analyzing the distribution characteristics of abnormal behavior over time, we can determine the stability of the persistent characteristics. If the distribution characteristics remain consistent over multiple time periods, it is determined to be a long-term abnormal pattern.
[0053] For long-term abnormal patterns, combined with data analysis technology, key indicators related to abnormality determination are extracted from water usage data to obtain the triggering conditions of abnormal behavior;
[0054] Based on the changes in trigger conditions, the preset threshold is used for comparison. If the trigger conditions exceed the threshold range, it is judged as high-risk abnormal behavior;
[0055] By deeply mining the persistent characteristics of high-risk abnormal behaviors and combining them with historical data of behavioral patterns, we can obtain the potential evolution trend of abnormal behaviors and complete the persistent characteristics of abnormal behaviors.
[0056] Preferably, the process of determining the long-term trend characteristics includes:
[0057] By obtaining historical water consumption data from the repository, a complete dataset containing long-term records is constructed to obtain an initialized data set;
[0058] Based on the initialized data set, time series analysis technology is used to decompose the water consumption records, separate the periodic and non-periodic components, and determine the distribution characteristics of the periodic patterns.
[0059] Based on the separated periodic regular distribution features, a pre-established detection model is applied to determine whether there is a significant water use pattern. If the detection result shows that the regularity intensity exceeds the preset threshold, the corresponding periodic regularity feature is extracted;
[0060] By extracting periodic regular features and combining them with equipment operation data, we analyze the correlation between equipment operation characteristics and water usage patterns, and obtain a mapping relationship between equipment operation and water usage changes.
[0061] Based on the mapping relationship between equipment operation and water usage changes, a long-term trend analysis method is used to identify long-term trend characteristics in historical data.
[0062] On the other hand, the present invention also provides a smart water meter remote monitoring system based on the Internet of Things, comprising:
[0063] The data acquisition module is used to obtain real-time water consumption data from smart water meters and transmit it to the cloud server using the Internet of Things protocol to obtain a structured water consumption dataset;
[0064] The time series decomposition module is used to separate the trend, cycle and noise components of the structured water use dataset using the time series decomposition method to obtain the water use pattern characteristics;
[0065] Cluster analysis module, which is used to build an adaptive clustering model based on water usage pattern characteristics, identify the dynamic water usage patterns of different users, and determine the classification of user water usage behaviors;
[0066] Anomaly detection module is used to analyze data deviations through anomaly detection algorithms to determine whether there is water leakage or theft if the user's water usage behavior classification deviates from the preset normal water usage pattern threshold;
[0067] The fluctuation analysis module is used to analyze short-term water usage fluctuations using a time series prediction model for abnormal water usage data to obtain the persistence characteristics of abnormal behavior;
[0068] The pattern mining module is used to obtain long-term water use records from historical data sets and, combined with time series analysis methods, to mine periodic water use patterns and equipment operation characteristics to determine long-term trend characteristics;
[0069] The fault prediction module is used to predict the probability of equipment failure based on long-term trend characteristics and use machine learning classification algorithms to obtain equipment maintenance priority ranking;
[0070] The decision generation module is used to prioritize equipment maintenance, combine the persistence characteristics of abnormal behavior, generate dynamic water management reports, and determine accurate decision support data.
[0071] On the other hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the method is implemented when the processor executes the computing program.
[0072] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the method when executed by a processor.
[0073] Compared with the prior art, the present invention has the following advantages and technical effects:
[0074] The present invention discloses a water use behavior analysis and equipment management method based on smart water meter data. It collects water use data in real time through Internet of Things technology and transmits it to a cloud server. It performs time series decomposition and cluster analysis on structured data to identify users' dynamic water use patterns. When water use behavior deviates from the normal threshold, an anomaly detection algorithm is used to determine whether there is water leakage or theft, and the persistence of the anomaly is determined in combination with short-term fluctuation analysis. At the same time, the present invention uses historical data to mine long-term water use patterns, predict the probability of equipment failure, and sort maintenance priorities. Finally, a dynamic water use management report is generated to provide data support for accurate decision-making. The present invention realizes intelligent management of water use behavior anomaly detection, equipment failure warning, and maintenance optimization, thereby improving the operating efficiency and safety of the water supply system. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0076] Figure 1 Schematic diagram of a method flow in an embodiment of the present invention;
[0077] Figure 2 Schematic diagram of the system structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0078] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0079] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0080] Example 1
[0081] like Figure 1 As shown, this embodiment provides a remote monitoring method for smart water meters based on the Internet of Things, including:
[0082] S101. Obtain real-time water consumption data from the smart water meter and transmit it to the cloud server using the Internet of Things protocol to obtain a structured water consumption dataset.
[0083] Real-time water usage data is collected from smart water meters via the MQTT protocol and uploaded to a cloud server. For the initial water usage data, the cloud server applies the 3σ principle to remove data points that deviate by three standard deviations from the mean and deletes duplicate records, resulting in a structured water usage dataset. The processed data is stored in the water_usage table of a MySQL database, with a timestamp index established to ensure efficient queries. The database is scanned every hour for the latest record time. If the difference between the last update time and the current time exceeds 30 minutes, the MQTT protocol is triggered to recollect data. The water usage data in the database is grouped by hour and summed. The hourly rate of change in water usage is calculated. Data that exceeds a preset threshold of 20% is marked as pending data. A support vector machine algorithm is used to classify the labeled data, using the mean and standard deviation of water usage over the past six hours as input features and outputting a normal or abnormal label. If the classification result is abnormal, a 50% valve opening reduction instruction is sent to the smart water meter. Within 5 minutes of the instruction, the system verifies that the latest water usage has returned to the mean.
[0084] Specifically, when acquiring real-time water usage data through a smart water meter, a built-in ultrasonic flow sensor can be used to collect water usage data every minute. For example, if a user's instantaneous flow rate at a certain moment is 0.5 liters / minute, the sensor converts the data into a digital signal using an analog-to-digital converter and stores it in the water meter's local cache. The cache capacity is 24 hours of data, or 1,440 records. Next, when transmitting data to a cloud server, the IoT-based MQTT protocol can be used to upload data every five minutes over a 4G network. Assuming a single upload packet size of 1KB, including a timestamp and flow rate value, this ensures low latency and high reliability. AES-128 encryption is used during transmission to protect data security and prevent data leakage. After receiving the data, the cloud server uses a distributed storage system such as Hadoop to store the raw data and cleans it using ETL tools, for example, removing anomalous data with negative flow values. For example, after cleaning, the anomalous data percentage for a particular day is found to be 0.2%. The data is then structured into a standard format, including user ID, timestamp, and water usage fields, to form a structured dataset.
[0085] S102. For the structured water use data set, a time series decomposition method is used to separate trend, cycle and noise components to obtain water use pattern characteristics.
[0086] Water consumption time series are obtained from structured data. Preprocessing techniques are used to clean missing and outliers to obtain a cleaned series. If a data point is missing, interpolation is used to fill it in using estimated values from adjacent points. If a data point is detected outside a preset threshold, it is replaced with the mean of the neighboring values to obtain a cleaned series. The classic time series decomposition algorithm (STL) is applied to the cleaned series to separate the trend component, cyclical component, and noise component, resulting in a decomposition result. The STL algorithm is iteratively calculated to extract long-term trends, cyclical fluctuations, and random noise, resulting in a decomposition result. Based on the decomposition result, the trend component is extracted and smoothed using a moving average method to obtain a smoothed trend curve. A fixed-window moving average is used to eliminate short-term fluctuations in the trend component, resulting in a smoothed trend curve. The cyclical component in the decomposition result is analyzed using Fourier transforms to determine the frequency of the main cycle lengths. The frequency distribution of the cyclical component is calculated using Fourier transforms, and the cycle lengths corresponding to the significant frequencies are extracted to determine the main cycle lengths. The smoothed trend curve and main cycle lengths are used to identify water consumption patterns, and cluster analysis is used to extract pattern features. The K-means clustering algorithm is used to group the trend and cyclical features to obtain water consumption pattern characteristics. The stability of the water usage pattern is determined based on the pattern characteristics. If the variance of the pattern characteristics is lower than a preset threshold, the pattern is considered stable. The stability of the pattern is determined by calculating the statistical variance of the pattern characteristics and comparing it with the preset threshold.
[0087] Specifically, for the time series decomposition of a structured water consumption dataset, suppose we are processing daily water consumption data for a city from January to December 2023, measured in kiloliters. The dataset contains 365 data points. For example, water consumption on January 1st is 5000 kiloliters, and on January 2nd is 5100 kiloliters. First, we use a moving average method to extract the trend component, calculating the average over a 7-day window to smooth out short-term fluctuations. For example, we average the water consumption from January 1st to January 7th (5000, 5100, 5200, 5150, 5100, 5050, and 5080), obtaining 5097.14 kiloliters as the trend value for January 4th. This trend series is then generated to reflect long-term upward or downward trends in water consumption. Next, we subtract the trend series from the original data to create the detrended series. For example, subtracting the trend value 5097.14 from the original value 5150 on January 4th yields a residual of 52.86 kiloliters. The detrended sequence is then analyzed using a Fast Fourier Transform (FFT) to identify the main periodic components. Assuming a 7-day weekly cycle, corresponding to a weekly peak in water use with an amplitude of approximately 200 kiloliters, the periodic sequence is extracted as a sinusoidal function: 200 × sin(2πt / 7), where t is the time point. The remaining component is the noise sequence, which is the detrended sequence minus the periodic sequence. For example, the detrended value of 52.86 on January 4th minus the periodic value (assuming it is 50) yields 2.86 kiloliters of noise. Finally, the characteristics of each component are analyzed: the trend shows a slow seasonal increase in water use throughout the year, peaking at 5,500 kiloliters in the summer; the period reflects an increase in weekend water use with an amplitude of approximately 200 kiloliters; and the noise is random fluctuation with a standard deviation of approximately 10 kiloliters, indicating high system stability.
[0088] S103: Build an adaptive clustering model based on water usage pattern characteristics, identify dynamic water usage patterns of different users, and determine user water usage behavior classification.
[0089] By obtaining raw data from water use records and conducting preliminary sorting of water use patterns, a basic data set is obtained. Based on this basic data set, feature extraction methods are used to analyze the time distribution and flow changes in water use patterns and determine key feature parameters. If the key feature parameters meet the preset threshold range, they are classified as valid feature data, and a valid feature set is obtained. Using the valid feature set, an adaptive clustering model is constructed to group dynamic behaviors and determine the user's water use behavior category. Based on the grouping results, the correlation between user categories and water use behaviors is analyzed to obtain a classification mapping relationship. Using the classification mapping relationship, a real-time comparison is performed on newly acquired water use data to determine the behavioral category of the new data. By continuously monitoring the behavioral category, the parameters of the clustering model are updated to obtain dynamically adjusted classification results.
[0090] Specifically, an adaptive clustering model was constructed based on water usage pattern characteristics. First, hourly water consumption data was collected from smart water meters. For example, 100 households in a residential complex were recorded for 30 consecutive days, generating 24 data points per household daily, forming a 100×720 time series matrix. During data preprocessing, a sliding window algorithm (with a 24-hour window size and a 1-hour step size) was used to calculate features, including average daily water consumption (e.g., Household A averages 5.2 liters per day), peak water consumption times (e.g., 6:00 PM to 8:00 PM, accounting for 40%), and water consumption volatility (standard deviation / mean, e.g., 0.35). To eliminate dimensionality effects, Z-score normalization was used to transform feature values to have a mean of 0 and a standard deviation of 1. The K-means++ algorithm was used for the clustering model. The initial K value was determined using the elbow rule. The Silhouette Score (0.68) was calculated for K values ranging from 2 to 10, with K = 4 being the highest, resulting in four clusters. The clustering process uses Euclidean distance, and after iterative convergence, the cluster centers are obtained, namely "morning and evening peak type" (60% of the consumption is between 18:00 and 22:00), "all-day balanced type" (average of about 0.21 liters per hour), "night trough type" (0:00-6:00 consumption <10%), and "random fluctuation type" (volatility >0.5). To achieve self-adaptation, an online learning mechanism is introduced. The data is updated every 7 days, the features are recalculated and the cluster centers are adjusted. If the distance between the new data point and the nearest cluster center exceeds the threshold (such as 2 times the standard deviation), the dynamic increase and decrease of clusters is triggered. The classification results are mapped to behavioral labels through the decision tree algorithm. For example, "morning and evening peak type" corresponds to "office workers", and the accuracy rate reaches 85% after cross-validation. In order to improve the robustness of the model, anomaly detection is added, and the isolation forest algorithm is used to eliminate water consumption mutation points (such as more than 50 liters per day) to ensure clustering stability.
[0091] S104: If the user's water use behavior classification deviates from the preset normal water use mode threshold, the data deviation is analyzed through an anomaly detection algorithm to determine whether there is water leakage or theft.
[0092] By obtaining the user's historical water use behavior data from the water use records and comparing it with the pre-established normal pattern, preliminary behavior deviation results are obtained. Based on the behavior deviation results, the deviated data is judged in combination with the preset threshold to determine whether there is abnormal data outside the normal range. If the abnormal data exceeds the preset threshold, the abnormal data is further analyzed using the isolation forest algorithm in the anomaly detection algorithm to determine whether there is a significant data deviation. Based on the data deviation analysis results, the specific distribution characteristics of the deviation are obtained to determine whether the deviation is associated with the water leakage. If the deviation is associated with the water leakage, the historical water use behavior is compared with the current deviation to determine whether it meets the typical characteristics of the water leakage. Based on the judgment results of the water leakage, the behavioral pattern characteristics related to the theft are obtained to determine whether there is a possibility of theft.
[0093] Specifically, smart water meters collect user water consumption data (in liters) every hour. Assuming a user's normal water usage pattern is 50 liters per hour from 8:00 AM to 8:00 PM daily, and 5 liters per hour from 8:00 PM to 8:00 AM the following day, with a preset threshold for normal mode fluctuation of ±20%, the system first pre-processes the real-time data to remove sensor noise (such as abnormally high values of 1000 liters per hour). Then, using a sliding window averaging filter algorithm, it takes the last five hours of data and calculates the average to produce a smoothed water consumption sequence.
[0094] For example, if 30 liters of water were collected at 10:00 PM on a given day, exceeding the nighttime threshold of 5 liters x 1.2 = 6 liters, triggering anomaly detection, the system uses the Isolation Forest algorithm to analyze deviations. The algorithm inputs a dataset containing time, water consumption, and historical mean values and calculates an anomaly score. Assuming a score of 0.85 (threshold 0.7), the data is considered an anomaly. Further analysis of the deviation pattern reveals that if nighttime water consumption exceeds 20 liters for three consecutive hours and there are no historical holiday or special water use records, the K-means clustering algorithm is used to classify the data into normal and abnormal categories. Confirming that the anomalies are concentrated at night, the system infers a possible water leak. The system then uses time series analysis to calculate the total water consumption during the abnormal period (e.g., 90 liters in three hours). Compared to a normal nighttime threshold of 15 liters, the deviation is 500%. If the deviation persists for 72 hours without user feedback, the system automatically generates a water leak alert and sends it to the property management platform. If the abnormal point is highly similar to the water usage patterns of nearby users (Pearson correlation coefficient > 0.9), the system infers the possibility of theft.
[0095] S105. For water usage data that is judged to be abnormal, a time series prediction model is used to analyze short-term water usage fluctuations to obtain persistence characteristics of the abnormal behavior.
[0096] Using a pre-established time series forecasting model, we extract patterns of short-term fluctuations from water consumption data and identify preliminary characteristics of the fluctuation trend. Based on these preliminary characteristics, we employ time series analysis to extract significant patterns of abnormal behavior and determine its distribution. By comparing and analyzing the distribution characteristics of abnormal behavior over time, we determine the stability of persistent features. If the distribution remains consistent across multiple time periods, we identify a long-term abnormal pattern. For long-term abnormal patterns, we combine data analysis techniques to extract key indicators relevant to abnormality determination from water consumption data and determine the triggering conditions for abnormal behavior. Based on the changes in the triggering conditions, we compare them against pre-set thresholds. If the triggering conditions exceed the threshold range, we identify high-risk abnormal behavior. By deeply exploring the persistent characteristics of high-risk abnormal behavior and combining them with historical behavioral data, we can identify the potential evolutionary trends of abnormal behavior.
[0097] Specifically, for analyzing abnormal water consumption data and predicting short-term fluctuations in water consumption, we can use a time series forecasting model to extract persistent characteristics of abnormal behavior. First, suppose we detect abnormal daily water consumption for a user in a residential area over the past seven days: 50, 55, 60, 48, 70, 65, and 52 cubic meters, respectively. The normal range is 30 to 40 cubic meters. By calculating the standard deviation and setting a threshold (for example, the mean plus twice the standard deviation), the system automatically marks these data as abnormal. Next, the system uses an ARIMA (Autoregressive Integrated Moving Average) model to analyze these abnormal data. The parameters are set to p = 1, d = 1, and q = 1. The model is trained using historical data and forecasts for water consumption for the next three days. The predicted values are 58, 60, and 57 cubic meters. Combined with residual analysis of the actual observed values (e.g., 59, 61, and 58 cubic meters), the average prediction error is 1.0 cubic meter, indicating a relatively accurate prediction. Subsequently, the system judged the persistence of the abnormal behavior by the fluctuation range between the predicted value and the actual value (for example, a daily volatility exceeding 10% is considered a continuous abnormality). It was found that the volatility in the next three days was 1.7%, 1.6%, and 1.8%, respectively, all of which did not exceed the threshold. It was determined that the abnormal behavior might be a short-term sudden phenomenon rather than a continuous problem.
[0098] S106. Obtain long-term water usage records from historical data sets, combine time series analysis methods, explore periodic water usage patterns and equipment operation characteristics, and determine long-term trend characteristics.
[0099] By acquiring historical water consumption data from a repository and constructing a complete dataset containing long-term records, an initialized data set is obtained. Based on the initialized data set, time series analysis techniques are used to decompose the water consumption records, separating periodic and non-periodic components and determining the distribution characteristics of the periodic patterns. A pre-established detection model is applied to the isolated periodic distribution characteristics to determine whether significant water consumption patterns exist. If the detection results indicate that the pattern strength exceeds a preset threshold, the corresponding periodic pattern characteristics are extracted. The extracted periodic pattern characteristics are combined with relevant equipment operation data to analyze the correlation between equipment operation characteristics and water consumption patterns, and a mapping relationship between equipment operation and water consumption changes is obtained. Based on this mapping relationship between equipment operation and water consumption changes, long-term trend analysis methods are used to identify long-term trend characteristics in the historical data and determine the main direction of trend changes.
[0100] Specifically, long-term water use records are obtained from historical datasets and time series analysis is performed to identify periodic water use patterns, equipment operating characteristics, and long-term trends. This can be achieved using the following specific method. First, assume that water use data from the past five years is extracted from a water system's database. This data includes daily water consumption (in cubic meters) and equipment operating status (such as on / off times and operating hours). The data volume is approximately 1,825 days of data points, with an average daily water use of 500 cubic meters and a peak of 800 cubic meters. Through data preprocessing, missing values are interpolated using the Pandas library in Python, and linear interpolation is used to fill in missing data to ensure data integrity. Next, to identify periodic water use patterns, a Fourier transform (FFT) algorithm is used to perform frequency domain analysis on the time series data to identify the main frequency components. Significant 7-day cycles (corresponding to weekly patterns) and 365-day cycles (corresponding to annual patterns) are found in water use. The amplitude of the weekly cycle is 120 cubic meters, and the amplitude of the annual cycle is 200 cubic meters. Subsequently, the equipment operation characteristics were analyzed, and the K-means clustering algorithm was used to classify the equipment operation time and water consumption data into three categories. It was found that the first category of equipment had an average operation time of 6 hours / day, corresponding to low water consumption (approximately 300 cubic meters / day); the second category had an operation time of 12 hours / day, corresponding to medium water consumption (approximately 500 cubic meters / day); and the third category had an operation time of 18 hours / day, corresponding to high water consumption (approximately 750 cubic meters / day), thus revealing the correlation between equipment operation and water consumption. Finally, the long-term trend characteristics were determined, and the Holt-Winters triple exponential smoothing method was used to decompose the water consumption data. The trend term obtained over the past five years showed that water consumption was growing slowly at a rate of 2.5% per year. Combined with the business context, it is speculated that this may be related to regional population growth. At the same time, the seasonal index shows that water consumption in summer (June-August) is approximately 30% higher than in winter (December-February).
[0101] S107. Based on long-term trend characteristics, a machine learning classification algorithm is used to predict the probability of equipment failure and obtain equipment maintenance priority ranking.
[0102] Equipment operating data is obtained and features are extracted from long-term trends to generate a feature dataset. A classification model is trained using the support vector machine algorithm using the feature dataset to generate a prediction model. If the prediction model outputs a failure probability higher than a preset threshold, the device is marked as high-risk, generating a list of high-risk devices. Based on the list of high-risk devices, a logistic regression algorithm is used to calculate maintenance priorities and generate a priority score. Based on the priority score, a sorting algorithm is used to generate a maintenance priority ranking, generating a ranking result. The ranking result is combined with equipment status data to update the maintenance plan and generate a maintenance schedule. Unresolved devices are then identified from the maintenance schedule.
[0103] Specifically, in the technical implementation of equipment failure prediction and maintenance prioritization, long-term trend characteristics of equipment operating status are first collected through historical data. For example, operating data from 100 equipment in a factory, including temperature, vibration frequency, and current values, is collected. Assuming that each equipment records data 24 hours a day for 30 consecutive days, a total of 7,200 data points are collected, with temperatures ranging from 20 to 80 degrees Celsius, vibration frequencies from 0.5 to 5 Hz, and current values from 1 to 10 amps. Next, in the data preprocessing stage, missing values are interpolated using the Pandas library in Python. Assuming a missing rate of approximately 5%, missing data are filled using linear interpolation. The data is also normalized, scaling each eigenvalue to a range of 0 to 1 to eliminate dimensionality effects. Finally, in the feature engineering stage, long-term trend characteristics are extracted. For example, the mean temperature, standard deviation of vibration frequency, and peak current values for each equipment over the past seven days are calculated, resulting in a feature vector with three eigenvalues per equipment. Next, a machine learning classification algorithm was used to predict failure probability. The random forest algorithm was chosen, implemented using the Scikit-learn library. The dataset was divided into an 80% training set and a 20% test set. After training the model, predicted failure probabilities were obtained. For example, the failure probability of device A was 0.85, that of device B was 0.45, and that of device C was 0.12. During model evaluation, the calculated accuracy was 0.92 and the recall was 0.88, ensuring the reliability of the model. Subsequently, maintenance priorities were ranked based on the failure probability, with probabilities greater than 0.8 being high, 0.5 to 0.8 medium, and less than 0.5 low. Therefore, device A was assigned high priority, device B medium, and device C low. Finally, the ranking results were combined with the device's location and business importance. Assuming that device A is located on a core production line, its importance weight was 0.9, further confirming its highest priority. This led to the generation of the final maintenance schedule.
[0104] Specifically, to prioritize equipment maintenance and generate dynamic water management reports, IoT sensors first collect real-time equipment operating data. For example, the vibration frequency of a water pump is collected hourly. Assuming the normal range is 5-10 Hz, if the vibration frequency exceeds 15 Hz for three consecutive hours, the system automatically marks the device as abnormal. The priority algorithm calculates a priority score based on the duration of the abnormality and the magnitude of the frequency exceedance. The score = number of hours of duration × magnitude of the exceedance, for example, 3 hours × (15-10) = 15 points. Devices with a priority score exceeding 10 are automatically placed on the high-priority maintenance list. The system pushes this data to the maintenance scheduling module, forming a dynamic ranking basis for equipment maintenance. Next, based on the persistence of abnormal behavior, the system analyzes the time series of abnormal data. For example, a sliding window algorithm calculates the frequency of abnormalities over the past 24 hours. Assuming a window size of 6 hours, if a device exhibits abnormalities in all four windows, the persistence index is 4 / 4 = 1.0. Devices with an index greater than 0.8 are marked as high-risk, and the system automatically generates an early warning report and links it to water consumption data. Subsequently, a dynamic water management report is generated, integrating equipment anomaly data with water consumption data. For example, if the average daily water consumption in a certain area is 1,000 cubic meters, and the water consumption in the area where high-risk equipment is located fluctuates by more than 20%, or more than 200 cubic meters, the system predicts the potential risk of water leakage through regression analysis. The calculation formula is risk value = fluctuation percentage × persistence index. For example, 0.25 × 1.0 = 0.25. A water-saving recommendation report is automatically generated when the risk value is greater than 0.2. Finally, to determine the precise decision-making support data, the system integrates the priority score, persistence index, and risk value based on the above analysis results. Using a weighted algorithm, a comprehensive decision-making index is calculated. For example, if the weights are 0.4, 0.3, and 0.3, the comprehensive index for a certain equipment is 15 × 0.4 + 1.0 × 0.3 + 0.25 × 0.3 = 6.375. Equipment with an index greater than 5 is recommended for key maintenance. The system automatically generates a visual dashboard displaying all data and recommendations, ensuring accurate and timely decision support.
[0105] Example 2
[0106] like Figure 2 As shown, this embodiment provides a smart water meter remote monitoring system based on the Internet of Things, including:
[0107] The data acquisition module is used to obtain real-time water consumption data from smart water meters and transmit it to the cloud server using the Internet of Things protocol to obtain a structured water consumption dataset;
[0108] The time series decomposition module is used to separate the trend, cycle and noise components of the structured water use dataset using the time series decomposition method to obtain the water use pattern characteristics;
[0109] Cluster analysis module, which is used to build an adaptive clustering model based on water usage pattern characteristics, identify the dynamic water usage patterns of different users, and determine the classification of user water usage behaviors;
[0110] Anomaly detection module is used to analyze data deviations through anomaly detection algorithms to determine whether there is water leakage or theft if the user's water usage behavior classification deviates from the preset normal water usage pattern threshold;
[0111] The fluctuation analysis module is used to analyze short-term water usage fluctuations using a time series prediction model for abnormal water usage data to obtain the persistence characteristics of abnormal behavior;
[0112] The pattern mining module is used to obtain long-term water use records from historical data sets and, combined with time series analysis methods, to mine periodic water use patterns and equipment operation characteristics to determine long-term trend characteristics;
[0113] The fault prediction module is used to predict the probability of equipment failure based on long-term trend characteristics and use machine learning classification algorithms to obtain equipment maintenance priority ranking;
[0114] The decision generation module is used to prioritize equipment maintenance, combine the persistence characteristics of abnormal behavior, generate dynamic water management reports, and determine accurate decision support data.
[0115] The above are merely preferred embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A remote monitoring method and system for smart water meters based on the Internet of Things, characterized in that: include: Obtain real-time water consumption data from smart water meters and transmit it to a cloud server using IoT protocols to obtain a structured water consumption dataset. For the structured water use dataset, a time series decomposition method is used to separate trend, cycle and noise components to obtain water use pattern characteristics; Based on the water use pattern characteristics, an adaptive clustering model is constructed to identify the dynamic water use patterns of different users and determine the user water use behavior classification; If the user's water usage behavior classification deviates from the preset normal water usage mode threshold, the data deviation is analyzed through an anomaly detection algorithm to determine whether there is water leakage or theft; For water use data that is judged to be abnormal, a time series forecasting model is used to analyze short-term water use fluctuations to obtain the persistence characteristics of abnormal behavior; Obtain long-term water usage records from historical data sets and, combined with time series analysis methods, explore periodic water usage patterns and equipment operation characteristics to identify long-term trend characteristics. Based on long-term trend characteristics, a machine learning classification algorithm is used to predict the probability of equipment failure and obtain equipment maintenance priority ranking; Generate dynamic water management reports based on equipment maintenance priority sorting and persistent characteristics of abnormal behavior.
2. The method according to claim 1, characterized in that The process of obtaining the structured water use dataset includes: Obtain real-time water usage data from smart water meters through the MQTT protocol and upload the collected raw data to the cloud server; For the initial water consumption data records, the 3σ principle is used on the cloud server to remove data points that deviate from the mean by three times the standard deviation, and completely duplicate records are deleted to obtain a structured water consumption dataset; Save the processed data to the water_usage table in the MySQL database and create a timestamp index to ensure query efficiency; Scan the database for the latest record time every hour. If the difference between the last update time and the current time exceeds 30 minutes, trigger the MQTT protocol to re-collect data; The water consumption data in the database is grouped and summed by hour, and the water consumption change rate of each hour is calculated. When the change rate exceeds the preset threshold of 20%, it is marked as data to be checked; The support vector machine algorithm is used to classify the labeled data. The input features are the mean and standard deviation of water consumption in the last 6 hours, and the output is normal or abnormal label. When the classification result is abnormal, an adjustment instruction to reduce the valve opening by 50% is sent to the smart water meter, and within 5 minutes after the instruction is issued, it is verified whether the latest water consumption falls back to the average range.
3. The method according to claim 1, characterized in that The process of obtaining the water use pattern characteristics includes: Obtain water usage time series from structured data, use preprocessing techniques to clean missing values and outliers, and obtain the cleaned series; If missing data points are detected, they are filled using interpolation methods based on the estimated values of adjacent points; If a data point is detected to be outside the preset threshold range, it is replaced with the neighboring mean to obtain the cleaned sequence; For the cleaned sequence, the classic time series decomposition algorithm STL is used to separate the trend component, periodic component and noise component to obtain the decomposition result; Through iterative calculation of STL algorithm, long-term trend, periodic fluctuation and random noise are extracted to obtain decomposition results; According to the decomposition results, the trend components are extracted and smoothed using the moving average method to obtain a smooth trend curve; By calculating the moving average of a fixed window, short-term fluctuations in the trend component are eliminated to obtain a smooth trend curve; For the periodic components in the decomposition results, Fourier transform is used to analyze the periodic frequency and determine the main period length; Calculate the frequency distribution of periodic components through Fourier transform, extract the period length corresponding to the significant frequency, and determine the main period length; From the smooth trend curve and the length of the main cycle, the variation pattern of water consumption is obtained, and the pattern characteristics are extracted using cluster analysis; The K-means clustering algorithm is used to group the trend and period features to obtain the water use pattern characteristics.
4. The method according to claim 1, wherein The process of determining the user water use behavior classification includes: By obtaining raw data from water use records and preliminarily sorting out water use patterns, a basic data set was obtained; Based on the basic data set, feature extraction methods are used to analyze the temporal distribution and flow changes in water use patterns and determine key characteristic parameters; If the key feature parameters meet the preset threshold range, they are classified as valid feature data and a valid feature set is obtained; By using effective feature sets, an adaptive clustering model is constructed to group dynamic behaviors and determine the user's water use behavior category. According to the grouping processing results, the correlation between user categories and water use behaviors is analyzed to obtain the classification mapping relationship; Use classification mapping relationships to conduct real-time comparisons of newly acquired water use data to determine the behavioral categories of the new data; By continuously monitoring the categories to which behaviors belong, the parameters of the clustering model are updated to obtain dynamically adjusted classification results.
5. The method according to claim 1, wherein The process of determining whether there is water leakage or theft includes: By obtaining the user's historical water use behavior data from water use records and comparing it with the pre-established normal pattern, preliminary behavior deviation results are obtained; Based on the behavioral deviation results, the threshold judgment is performed on the deviated data in combination with the preset threshold to determine whether there is abnormal data beyond the normal range; If the abnormal data exceeds the preset threshold, the isolation forest algorithm in the anomaly detection algorithm will be used to further analyze the abnormal data to determine whether there is a significant data deviation; Based on the data deviation analysis results, obtain the specific distribution characteristics of the deviation and determine whether the deviation is associated with water leakage; If the deviation is associated with water leakage, the historical water use behavior is compared with the current deviation to determine whether it meets the typical characteristics of water leakage; Based on the judgment result of the water leakage situation, the behavioral pattern characteristics related to the theft situation are obtained to determine whether the theft situation exists.
6. The method according to claim 1, characterized in that The process of obtaining the persistence characteristics of abnormal behavior includes: Through the pre-established time series forecasting model, the changing patterns of short-term fluctuations are obtained from water use data, and the preliminary characteristics of the fluctuation trend are determined; Based on the preliminary characteristics of the fluctuation trend, the time series analysis method is used to extract the significant patterns of abnormal behavior and obtain the distribution characteristics of abnormal behavior; By comparing and analyzing the distribution characteristics of abnormal behavior over time, we can determine the stability of the persistent characteristics. If the distribution characteristics remain consistent over multiple time periods, it is determined to be a long-term abnormal pattern. For long-term abnormal patterns, combined with data analysis technology, key indicators related to abnormality determination are extracted from water usage data to obtain the triggering conditions of abnormal behavior; Based on the changes in trigger conditions, the preset threshold is used for comparison. If the trigger conditions exceed the threshold range, it is judged as high-risk abnormal behavior; By deeply mining the persistent characteristics of high-risk abnormal behaviors and combining them with historical data on behavioral patterns, we can obtain the potential evolution trend of abnormal behaviors and thus obtain the persistent characteristics of abnormal behaviors.
7. The method according to claim 1, characterized in that The process of determining the characteristics of long-term trends includes: By obtaining historical water consumption data from the repository, a complete dataset containing long-term records is constructed to obtain an initialized data set; Based on the initialized data set, time series analysis technology is used to decompose the water consumption records, separate the periodic and non-periodic components, and determine the distribution characteristics of the periodic patterns. Based on the separated periodic regular distribution features, a pre-established detection model is applied to determine whether there is a significant water use pattern. If the detection result shows that the regularity intensity exceeds the preset threshold, the corresponding periodic regularity feature is extracted; By extracting periodic regular features and combining them with equipment operation data, we analyze the correlation between equipment operation characteristics and water usage patterns, and obtain a mapping relationship between equipment operation and water usage changes. Based on the mapping relationship between equipment operation and water usage changes, a long-term trend analysis method is used to identify long-term trend characteristics in historical data.
8. A remote monitoring system for smart water meters based on the Internet of Things, characterized in that: include: The data acquisition module is used to obtain real-time water consumption data from smart water meters and transmit it to the cloud server using the Internet of Things protocol to obtain a structured water consumption dataset; The time series decomposition module is used to separate the trend, cycle and noise components of the structured water use dataset using the time series decomposition method to obtain the water use pattern characteristics; Cluster analysis module, which is used to build an adaptive clustering model based on water usage pattern characteristics, identify the dynamic water usage patterns of different users, and determine the classification of user water usage behaviors; Anomaly detection module is used to analyze data deviations through anomaly detection algorithms to determine whether there is water leakage or theft if the user's water usage behavior classification deviates from the preset normal water usage pattern threshold; The fluctuation analysis module is used to analyze short-term water usage fluctuations using a time series prediction model for abnormal water usage data to obtain the persistence characteristics of abnormal behavior; The pattern mining module is used to obtain long-term water use records from historical data sets and, combined with time series analysis methods, to mine periodic water use patterns and equipment operation characteristics to determine long-term trend characteristics; The fault prediction module is used to predict the probability of equipment failure based on long-term trend characteristics and use machine learning classification algorithms to obtain equipment maintenance priority ranking; The decision generation module is used to prioritize equipment maintenance, combine the persistence characteristics of abnormal behavior, generate dynamic water management reports, and determine accurate decision support data.
9. An electronic device comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein: When the processor executes the computing program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Power amplifier protection method and system based on output power real-time monitoring
CN117520963A
Building construction quality information intelligent supervision system based on BIM
CN119721860A
Intelligent early warning method and device for optical power fluctuation based on wide fixed network FTTH (Fiber To The Home)
CN119814138A
Fault diagnosis and adaptive reconstruction method for communication network of power distribution network
CN120050159A
Abnormal change prediction and failure early warning method of petrochemical process
JP2023138371A
Cited By
Water affair management method, system and device
CN121542707A