Intelligent water meter online fault detection method and system
By designing an online fault detection system for intelligent water meter and using machine learning algorithms to detect abnormalities, the problems of low fault detection efficiency, high cost and difficulty in accurately locate the root cause of the problem in the existing technology are solved, and more accurate and flexible fault detection results are achieved.
Patent Information
- Application Number
- CN202510386292.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The fault detection methods of existing smart water meters are inefficient and costly, and it is difficult to detect sudden failures in a timely manner. The traditional fixed threshold method is prone to false alarms or missed reports. The communication module is insufficient in fault diagnosis, making it difficult to accurately locate the root cause of the problem.
An intelligent water meter online fault detection system is designed, including a data reception module, a data analysis module, a feature value evaluation module and a classification response module. By obtaining online data of smart water meters, regional division and data sorting, using machine learning algorithms to detect abnormalities, dynamically adjust the alarm threshold, and achieving more accurate fault identification and location.
It realizes more accurate identification of abnormal behaviors, reduces the false alarm rate and missed alarm rate, and dynamically adjusts the alarm threshold, making fault detection more flexible and accurate, reducing the limitations of traditional methods, and improving the efficiency and accuracy of fault detection.
Smart Images

Figure CN119915364A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault detection, and in particular to an online fault detection method and system for a smart water meter. Background Art
[0002] With the acceleration of urbanization and the increase in demand for water resource management, smart water meters are increasingly used in municipal water supply systems. However, smart water meters may encounter various faults in actual operation, such as equipment aging, sensor failure, communication interruption, etc. If these faults are not discovered and handled in time, they may lead to inaccurate measurement, waste of resources, and even safety hazards. Therefore, it is particularly important to develop an efficient online fault detection method and system for smart water meters. At present, the fault detection of traditional smart water meters is done by technicians regularly visiting the site to check the equipment status, but this method is inefficient, costly, and unable to detect sudden faults in a timely manner; alarms are triggered by setting fixed thresholds, but this method is too simple and prone to false alarms or missed alarms, and cannot adapt to complex water use scenarios; remote data collection and monitoring using communication modules can improve response speed, but it is still insufficient in fault diagnosis, making it difficult to accurately locate the root cause of the problem, and lacks analysis and processing capabilities with an artificial intelligence background. Summary of the invention
[0003] 1. Technical issues to be resolved In view of the deficiencies in the prior art, the present invention provides an online fault detection method and system for a smart water meter, so as to solve the problem in the prior art that technicians regularly go to the site to check the equipment, which leads to low efficiency and high cost. However, the alarm is triggered by a fixed threshold, but this method is too simple and prone to false alarms or missed alarms. The communication module is still insufficient in fault diagnosis, and it is difficult to accurately locate the root cause of the problem.
[0004] (II) Technical solution To achieve the above objectives, the present invention is implemented through the following technical solutions: An online fault detection system for a smart water meter, comprising: Data receiving module: obtains online data uploaded by smart water meters, including water flow velocity, pressure, temperature, signal strength and IP address, and divides online data into regions, including smart water meter grouping and IP address division; Data analysis module: organizes online data and sorts them according to timestamps and regional division results, and obtains water use characteristic data after regional division by combining geographic space analysis; Characteristic value evaluation module: Based on the water use characteristic data, the machine learning algorithm is used to detect the anomalies of the smart water meter to obtain the fault classification value of the smart water meter. The fault type value includes the group anomaly evaluation value and the periodic anomaly evaluation value; Classification response module: The group anomaly assessment value and the periodic anomaly assessment value are compared with the preset thresholds. When an anomaly exists, the preset fault detection and repair actions are performed respectively.
[0005] Furthermore, obtain the online data uploaded by the smart water meter: Through the two built-in communication modes of the smart water meter, the smart water meter can be adjusted and set; Among them, the communication modes include wireless communication and infrared communication, and the water flow velocity, pressure and temperature measured in the smart water meter are uploaded.
[0006] Furthermore, wireless communication: through the 4G network, the status of smart water meters distributed in various places can be monitored in real time, water usage information can be obtained, data can be analyzed, parameters can be adjusted, and instructions can be sent; Infrared communication: read the online data of the smart water meter by infrared function; perform preliminary settings through the infrared interface, including input of meter address, initial base number and parameters; Parameter settings: By defining freezing rules for different time periods, setting the transmission protocol for wireless communication data, uploading online data at a scheduled time, setting the amount and type of data uploaded each time, and configuring a retry mechanism, it will automatically try to resend after the initial upload fails.
[0007] Further, the smart water meter grouping: By assigning fixed IP addresses to smart water meters, using DHCP servers combined with MAC address binding, one of the smart water meters is used as the main smart water meter, uploading data through the 4G network, and the remaining smart water meters are connected to the main smart water meter using the LoRaWAN network, and the coverage of the local area network is planned.
[0008] Further, IP address division: Utilizing the built-in 4G module of the smart water meter, online data is transmitted to the server via the wireless network, and the base station with the strongest signal is automatically selected as the access point. Based on the base station ID to which the smart water meter is connected, the location of the device is obtained, and the smart water meter IPs of the same base station are divided into a group.
[0009] Furthermore, the process of collating and sorting online data is as follows: Extract original records from the online data uploaded by the smart water meter through the 4G module, store them in JSON, verify the fields in the records, mark missing values, and delete redundant records based on unique identifiers; generate online data sets by obtaining multiple sets of online data uploaded by smart water meters; The online data set is globally sorted according to the timestamp, grouped according to the device ID, and the online data in each group is sorted. The smart water meters are assigned to the corresponding areas based on the base station ID and its corresponding geographic coordinates, and a regional label is added to each record to mark the geographic area to which the record belongs. For smart water meters in the same area, their online data are calculated to form regional feature data.
[0010] Furthermore, water characteristic data is used to obtain: The water usage characteristic data include: water usage data of each group under the smart water meter group, water usage data of each IP address under the IP address division, water usage habits and preferences of each user, and water usage data on weekdays and weekends; The process of obtaining the water consumption data of each group and each IP address is as follows: The uploaded data under the main smart water meter is obtained, including the water consumption data of each sub-smart water meter under the main smart water meter, and stored in the database; at the same time, the water consumption data of each IP address under the IP address division is obtained and stored in the database.
[0011] Furthermore, the water usage preference of each user is obtained: Using an unsupervised learning algorithm, users are divided into different water use type groups. Initialization: randomly select k initial cluster centers (c1, c2, ..., ck); for different water use type groups xj, assign them to the nearest cluster center; recalculate the new center ci of each cluster, that is, the mean of all samples in the cluster; repeat the assignment and update steps until the cluster center no longer changes significantly or the maximum number of iterations is reached; let X = {x1, x2, ..., xi}, which represents the set of water use behavior feature vectors of all users, where xi represents the water use behavior feature vector; By minimizing the within-cluster squared error argmin C To find the best cluster center set R, the formula is: Where Si is all sample points assigned to cluster i; ci is the center point of cluster i; i is the ordinal number of the current user; Isolation forest is used for anomaly detection. Several random decision trees are constructed to isolate abnormal points. For each user, the anomaly score is calculated based on the water use behavior feature vector xi. The formula is: Where E(h(xi)) is the expected value of the path length, c(f) is the average path length with f nodes in the binary search tree; S(xi,f) is the anomaly score; By obtaining the error between the online data and the feature data as the reconstruction error value, the group anomaly evaluation value Wp is calculated. The formula is: Where xi is the water use behavior feature vector; is the reconstructed eigenvalue; n is the verification weight; The error between the input data and the reconstructed data is calculated as the period anomaly evaluation value Ep, and the formula is: In the formula, Sh is the user's water consumption weight; Qu is the periodic fluctuation trend value; f is the number of nodes; By obtaining the difference between weekday and weekend water use patterns and using statistical tests to evaluate the significance of the difference, the user's water use is evaluated and the periodic anomaly evaluation value Eps after error elimination is calculated. The formula is: Where Sc is the trend change value of water use; Go is the error weight; and are the average water consumption on weekdays and weekends respectively; Dt is a binary variable; t is the date corresponding to the timestamp.
[0012] Furthermore, the period anomaly evaluation value and the group anomaly evaluation value are: The group anomaly assessment value and the period anomaly assessment value are compared with the preset thresholds respectively. When both the group anomaly assessment value and the period anomaly assessment value exceed the preset thresholds, it is judged that an anomaly exists and the preset fault repair actions are performed respectively.
[0013] A method for online fault detection of a smart water meter comprises the following steps: Step 1: Obtain online data uploaded by smart water meters, including water flow velocity, pressure, temperature, signal strength and IP address, and divide the online data into regions, including smart water meter grouping and IP address division; Step 2: Organize the online data and sort them according to the timestamp and regional division results, and obtain the water use characteristic data after regional division by combining geographic space analysis; Step 3: Based on the water usage characteristic data, the machine learning algorithm is used to detect the anomalies of the smart water meter to obtain the fault classification value of the smart water meter. The fault type value includes a group anomaly assessment value and a periodic anomaly assessment value. The group anomaly assessment value and the periodic anomaly assessment value are compared and judged with the preset thresholds respectively. When an anomaly exists, the preset fault repair behavior is executed respectively.
[0014] (III) Beneficial effects The present invention provides a method and system for online fault detection of a smart water meter, which has the following beneficial effects: (1) This solution uses machine learning algorithms to conduct in-depth analysis of time series data, combined with multi-dimensional feature extraction, to more accurately identify abnormal behaviors and effectively reduce false alarm and missed alarm rates. At the same time, it dynamically adjusts the alarm threshold based on actual operating data, making fault detection more flexible and accurate, and avoiding the limitations of the traditional fixed threshold method. (2) This solution monitors the data uploaded by the smart water meter in real time to ensure that fault information is captured as soon as possible so that countermeasures can be taken quickly. It also classifies the periodic abnormal evaluation values and the group abnormal evaluation values to reasonably arrange maintenance tasks, give priority to handling serious faults, avoid unnecessary on-site inspections, improve work efficiency, and reduce resource waste caused by blind maintenance and maintenance costs by accurately locating the fault point. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of the system flow of the present invention; Figure 2 It is a schematic diagram of the overall method of the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] Embodiment 1:
[0018] See also Figure 1 This embodiment provides an online fault detection system for a smart water meter, the detection system comprising: Data receiving module: obtains online data uploaded by smart water meters, including water flow velocity, pressure, temperature, signal strength and IP address, and divides online data into regions, including smart water meter grouping and IP address division; Get online data uploaded by smart water meters: The smart water meter is powered by lithium batteries. The smart water meter is adjusted and set up through two built-in communication modes, including wireless communication and infrared communication. The smart water meter is used to set time-sharing freeze, timed upload and obtain water supply data. The water flow rate, pressure and temperature are measured through the sensors inside the smart water meter. Smart water meter power supply: The built-in 3500mAh lithium battery provides the smart water meter with a rated operating voltage of 3.7V and a communication operating current of less than 130mA. At the same time, it adopts a low-power design, including a deep sleep mode and an optimized wake-up mechanism. When the preset parameter conditions are met, the sensors and related components are activated to collect and transmit online data, ensuring the large capacity and long battery life of the smart water meter. When the smart water meter is low on power, the battery is powered by connecting the USB-C charging port through a data cable. Two communication modes: Wireless communication: Through the 4G network, the status of smart water meters distributed in various places can be monitored in real time, detailed water use information can be obtained, data analysis can be performed, and parameters can be adjusted or instructions can be sent as needed. Smart water meter readings can be completed without manual visits, reducing operating costs while improving work efficiency; Infrared communication: Users can read the current water flow rate, pressure, temperature, signal strength and IP address of the smart water meter by handheld terminals with infrared function without manual acquisition, and can obtain online data as a backup means when the network is unavailable or the wireless module fails. At the same time, preliminary settings can be made through the infrared interface, including the input of important parameters such as meter address and initial reading. The effective range of infrared is generally within a few meters, which is suitable for close-range operation. At the same time, because infrared is not affected by radio waves, it performs well in some special environments (such as places with strong electromagnetic interference), and the cost of infrared transmitters and receivers is low, and it is easy to integrate into the equipment. Parameter settings: By defining freezing rules in different time periods and setting the transmission protocol of wireless communication data, it is ensured that the Internet can be correctly accessed and data can be uploaded; basic communication parameters such as the working frequency and baud rate of the infrared interface are determined to ensure stable communication between the handheld device and the smart water meter; online data is uploaded regularly to determine the upload time interval, set the amount and type of data uploaded each time, and configure the retry mechanism to automatically try to resend after the initial upload fails. After three consecutive upload failures, the upload and transmission will continue according to the preset time interval; For example: based on the nominal diameter of the smart water meter of DN15~50mm; record the key indicators such as instantaneous water flow and cumulative water flow at a specific time point every hour, day or month; use TCP / UDP transmission protocol to access the Internet and upload data, port number, encryption method, and use the configured SIM card information, APN settings, server address, etc. Smart water meter group: By assigning fixed IP addresses to smart water meters, the DHCP server is used in combination with MAC address binding to automate this process for easy subsequent management and identification. One of the smart water meters is used as the main smart water meter to upload data through the 4G network. The remaining smart water meters are connected to the main smart water meter using the LoRaWAN network, and the coverage of the local area network is planned to ensure that all smart water meters can obtain good signals. For example: suppose a smart water meter system is installed in a public housing estate with 10 units. The water meter in a unit located in the center of the building is selected as the main smart water meter, and the remaining 9 units are each equipped with a sub-smart water meter, which is connected to the main smart water meter through the LoRaWAN network; a DHCP server is set up in the network, which is responsible for automatically assigning IP addresses to smart water meters connected to the network. A static mapping is created on the DHCP server to bind a specific MAC address to a specific IP address, ensuring that each time these smart water meters connect to the network, they receive the same IP address; one of the smart water meters that need to be grouped together is selected as the main smart water meter, which has a 4G module for data upload and a location with good signal coverage. The sub-smart water meters communicate with the main smart water meter through LoRaWAN and regularly send information such as water consumption to the main smart water meter. The landlord can monitor the water consumption of each unit in real time through the application applet, thereby more effectively managing and optimizing the use of water resources; In addition, alarm rules can be set to notify the landlord when abnormal water use patterns are detected, such as continuous high flow that may indicate a water leak; IP address division: The 4G module built into the smart water meter is used to transmit online data to the server via a wireless network. Each base station has fixed geographic coordinates. When the device is connected to the 4G network, it automatically selects the base station with the strongest signal as the access point. The approximate location of the device is estimated based on the base station ID to which the smart water meter is connected. The location of the smart water meter can be roughly estimated, and the smart water meter IPs of the same base station are grouped together. After understanding the actual water demand in different areas, the investment and improvement of water supply facilities are planned to ensure that resources are optimally allocated. When it is found that the water consumption of many households under a certain base station has increased significantly in recent days, it means that there are undetected leaks or illegal water use behaviors. Data analysis module: By sorting the acquired online data and sorting the online data according to the timestamp and regional division results, combined with geographic space analysis, the water use characteristic data after regional division is obtained; Online data sorting: Extract the original records from the online data uploaded by the smart water meter through the 4G module, usually stored in JSON or CSV format, verify whether each record contains all necessary fields (such as device ID, timestamp, flow, pressure, temperature, etc.), mark missing values, check whether there is duplicate online data, and delete redundant records based on unique identifiers (such as device ID + timestamp). If the proportion of missing uploaded data to the total data volume is less than 5%, it is judged as a small amount of missing data; when the missing uploaded data is greater than 20%-30%, it is judged as too much missing data; for a small amount of missing online data, use interpolation statistical methods to estimate; when there are too many missing online data, consider marking the online data of this time period as unavailable, and ensure that all physical quantities use the same unit, for example, convert the online flow data from different sources into liters / minute; The process of sorting online data is: The entire online data set is globally sorted by timestamp to ensure that the online data is in chronological order. The online data in each group is sorted again according to the device ID or other grouping basis (such as base station ID) to ensure that the online data of each smart water meter is also in chronological order. Combined with the base station ID and its corresponding geographic coordinates, each smart water meter is assigned to the corresponding area. This is achieved through a pre-built base station location database, and a regional label is added to each record to identify which geographical area the record belongs to. For smart water meters in the same area, their summary statistical online data (such as total water consumption, average flow rate, etc.) are calculated to form regional feature data. Based on the aggregated regional feature data, useful features are extracted, such as average daily water consumption, peak time, and water consumption pattern change trend. Example: Every night, the system automatically receives all uploaded records from the previous day and imports them into a temporary table. The program automatically scans newly added online data rows to find any possible problems. It performs repair measures for the problems found, such as cleaning up outliers, merging duplicates, and filling missing values. It converts all online flow data into liters per minute and converts timestamps into the standard UTC time format. It globally sorts the entire online data set by timestamp. It sorts the online data in each group again according to the device ID. It uses the base station location information to determine the geographical area to which each smart water meter belongs. The code example is as follows: ```sql UPDATE water_meter_data SET region = ( SELECT region FROM base_stations WHERE base_stations.id = water_meter_data.base_station_id; ``` And calculate the summary statistics of all water meters in the area; the final results are saved in the official database, and indexes are created for important fields to facilitate subsequent query and analysis. The code example is: ```sql CREATE INDEX idx_timestamp ON water_meter_data (timestamp); CREATE INDEX idx_device_id ON water_meter_data (device_id); CREATE INDEX idx_region ON water_meter_data (region); ``` Use water characteristic data to obtain: The water use characteristic data includes the water use data of each group under the smart water meter group, the water use data of each IP address under the IP address division, the water use habit preference of each user, and the water use data on weekdays and weekends. Acquisition of water consumption data for each group and each IP address: By acquiring the uploaded data under the main smart water meter, including the water consumption data of each sub-smart water meter under the main smart water meter, and storing it in the database; at the same time, acquiring the water consumption data of each IP address under the IP address division, and storing it in the database; Example: By comparing the water consumption data of each IP address under different IP address divisions, the characteristics of high water consumption areas and low water consumption areas in the community are found, and the factors affecting water consumption are explored in combination with population density and building type; a water consumption hotspot map based on geographical location is drawn to intuitively display the water consumption density of each area in the community, and areas with abnormal water consumption are marked on the map to facilitate rapid location of problem areas; by statistics on the water consumption data of the main smart water meter, the cumulative water consumption of all users in each time period is calculated; the maximum water consumption and minimum flow rate, the maximum and minimum instantaneous flow values of each day or hour, as well as the average and average daily water consumption in the distribution are recorded, the average daily water consumption of each user or each area is calculated, the volatility of water consumption is evaluated, and the stability of water consumption in different time periods is understood; Acquisition of each user's water usage preferences: Through unsupervised learning algorithms, we discover the correlation between water use behaviors in different time periods, analyze individual behaviors, and use isolation forests to mark users who deviate significantly from normal water use patterns; Using an unsupervised learning algorithm, users are divided into different water use type groups by initialization: randomly select k initial cluster centers (c1, c2, ..., ck); for each different water use type group xj, assign it to the nearest cluster center; recalculate the new center ci of each cluster, that is, the mean of all samples in the cluster; repeat the assignment and update steps until the cluster center no longer changes significantly or the maximum number of iterations is reached; let X = {x1, x2, ..., xi} be the set of water use behavior feature vectors of all users, where xi represents the water use behavior feature vector of the i-th user; By minimizing the within-cluster squared error argmin C To find the best cluster center set R, the formula is:
[0019] Where Si is all sample points assigned to cluster i, ci is the center point of cluster i; i is the ordinal number of the current user; Isolation forest is used for anomaly detection. Multiple random decision trees are constructed to isolate anomalies. For each user, the anomaly score is calculated based on the water use behavior feature vector xi. The formula is:
[0020] Where E(h(xi)) is the expected value of the path length, c(f) is the average path length with f nodes in the binary search tree; S(xi,f) is the anomaly score; Summary of weekday and weekend water use data: Create a binary variable Dt for each day to identify whether the day is a weekday or a weekend. The formula is: In the formula, t is the date corresponding to the timestamp; And calculate the average water consumption on weekdays and weekends respectively: In the formula, and are the average water consumption on weekdays and weekends, respectively; is the average daily water consumption; By comparison and , visually see the difference between weekday and weekend water use patterns, and use statistical tests to evaluate the differences, the formula is: In the formula, and are the standard deviations of water consumption on weekdays and weekends, respectively; and is the number of samples for weekdays and weekends; Example: Assume that in a public housing estate, we distinguish between weekday and weekend water use patterns and analyze seasonal changes. We create a binary variable Dt to indicate whether each day is a weekday or a weekend, and calculate the average daily water use. , and calculate the average water consumption on weekdays and weekends respectively and , the t-test was used to evaluate the significance of the difference between the two; Characteristic value evaluation module: by using the acquired water usage characteristic data and machine learning algorithms to detect the anomalies of the smart water meter, the group anomaly evaluation value and the period anomaly evaluation value are obtained, and the type of smart water meter fault is obtained through the evaluation value; By obtaining the error between the online data and the feature data as the grouping anomaly evaluation value, the reconstruction error value is calculated and the reconstruction error value Wp is calculated as follows: Where xi is the water use behavior feature vector; is the reconstructed eigenvalue; n is the verification weight; The larger the reconstruction error, the more likely the water consumption data of this user group is abnormal; Set a threshold value θ1, which is determined based on experience or cross-validation. By comparing the group anomaly evaluation value Wp with the threshold value θ1, it is determined as follows: When the group abnormal evaluation value Wp> θ1, it is considered that the water consumption data of the user group is abnormal, and there is a hidden fault risk, which needs to be checked; When the group abnormal evaluation value Wp≤θ1, it is considered that the water consumption data of the user group is normal, there is no hidden fault risk, and no need to investigate; When using an autoencoder, the error between the input data and its reconstructed data (such as mean square error MSE) is calculated as the period anomaly evaluation value Ep, and the formula is: Where xi is the water use behavior feature vector; Sh is the user's water use weight; Qu is the periodic fluctuation trend value; f is the number of nodes; By analyzing the difference between weekday and weekend water use patterns and using statistical tests to assess whether the difference is significant, the user's water use is evaluated at the same time, and the abnormal misjudgment is reduced. The periodic abnormal evaluation value Eps after the error is eliminated is calculated. The formula is: The formula is: Sc is the change value of water use trend; Go is the error weight; Set a threshold value θ, which is determined based on experience or cross-validation. By comparing the period anomaly evaluation value Eps with the threshold value θ, it is determined that: When the periodic abnormal evaluation value Eps > θ, it is considered that the user's water consumption data is abnormal and there is a hidden fault risk that needs to be checked; When the periodic abnormal evaluation value Eps≤θ, it is considered that the user's water consumption data is normal, there is no hidden fault risk, and no need to check; Classification response module: used to compare the group anomaly assessment value and the period anomaly assessment value with the preset thresholds, and when anomalies exist, perform preset fault repair actions; The periodic anomaly assessment value refers to the anomaly assessment value calculated based on time series data (weekly). The assessment value helps identify abnormal user behavior within a specific time period. The threshold of the periodic anomaly assessment value is set based on historical data or business requirements. The judgment is: When the period anomaly assessment value is greater than the period anomaly assessment threshold, and the group anomaly assessment value is greater than the group anomaly assessment threshold, it is judged as a serious anomaly; When the period anomaly assessment value is less than or equal to the period anomaly assessment threshold, and the group anomaly assessment value is less than or equal to the group anomaly assessment threshold, it is judged as a moderate anomaly; When the period anomaly assessment value is less than or equal to the period anomaly assessment threshold, and the group anomaly assessment value is greater than the group anomaly assessment threshold; or when the period anomaly assessment value is greater than the period anomaly assessment threshold, and the group anomaly assessment value is less than or equal to the group anomaly assessment threshold, it is judged as a moderate anomaly; Minor abnormalities: Send reminder notifications to property management personnel or users, prompting them to check whether there are leaks or other problems with water-using equipment; record abnormal logs for subsequent analysis; Moderate abnormality: Automatically generate a work order and dispatch technicians for on-site inspection; temporarily adjust the water supply strategy, such as reducing water supply pressure during certain periods of time to avoid the expansion of potential risks; Serious abnormalities: Immediately close the relevant water meters or valves to prevent further losses; activate the emergency plan and notify all relevant personnel (including users, property, and maintenance teams) to take emergency measures.
[0021] Embodiment 2:
[0022] See also Figure 2 Based on Example 1, this embodiment also provides an online fault detection method for a smart water meter, including the following specific steps: Step 1: Obtain online data uploaded by smart water meters, including water flow rate, pressure, temperature, signal strength and IP address, and divide the online data into regions, including smart water meter grouping and IP address division; Step 2: By sorting the obtained online data and sorting the online data according to the timestamp and regional division results, combined with geographic space analysis, the water use characteristic data after regional division is obtained; Step 3: Use the machine learning algorithm to detect the anomalies of the smart water meter based on the acquired water usage characteristic data, obtain the group anomaly evaluation value and the periodic anomaly evaluation value, obtain the type of smart water meter fault through the evaluation value, and perform the preset fault repair behavior respectively.
[0023] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. A person of ordinary skill in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution.
[0024] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0025] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. An online fault detection system for a smart water meter, characterized in that: The system includes: Data receiving module: obtains online data uploaded by smart water meters, including water flow velocity, pressure, temperature, signal strength and IP address, and divides online data into regions, including smart water meter grouping and IP address division; Data analysis module: organizes online data and sorts them according to timestamps and regional division results, and obtains water use characteristic data after regional division by combining geographic space analysis; Characteristic value evaluation module: Based on the water use characteristic data, the machine learning algorithm is used to detect the anomalies of the smart water meter to obtain the fault classification value of the smart water meter. The fault type value includes the group anomaly evaluation value and the periodic anomaly evaluation value; Classification response module: The group anomaly assessment value and the periodic anomaly assessment value are compared with the preset thresholds. When an anomaly exists, the preset fault detection and repair actions are performed respectively.
2. The smart water meter online fault detection system according to claim 1, characterized in that: Get online data uploaded by smart water meters: Through the two built-in communication modes of the smart water meter, the smart water meter can be adjusted and set; Among them, the communication modes include wireless communication and infrared communication, and the water flow velocity, pressure and temperature measured in the smart water meter are uploaded.
3. The smart water meter online fault detection system according to claim 2, characterized in that: Wireless communication: Through the 4G network, the status of smart water meters distributed in various places can be monitored in real time, water usage information can be obtained, data can be analyzed, parameters can be adjusted, and instructions can be sent; Infrared communication: read the online data of the smart water meter by infrared function; perform preliminary settings through the infrared interface, including input of meter address, initial base number and parameters; Parameter settings: By defining freezing rules for different time periods, setting the transmission protocol for wireless communication data, uploading online data at a scheduled time, setting the amount and type of data uploaded each time, and configuring a retry mechanism, it will automatically try to resend after the initial upload fails.
4. The smart water meter online fault detection system according to claim 1, characterized in that: Smart water meter group: By assigning fixed IP addresses to smart water meters, using DHCP servers combined with MAC address binding, one of the smart water meters is used as the main smart water meter, uploading data through the 4G network, and the remaining smart water meters are connected to the main smart water meter using the LoRaWAN network, and the coverage of the local area network is planned.
5. The smart water meter online fault detection system according to claim 1, characterized in that: IP address division: Utilizing the built-in 4G module of the smart water meter, online data is transmitted to the server via the wireless network, and the base station with the strongest signal is automatically selected as the access point. Based on the base station ID to which the smart water meter is connected, the location of the device is obtained, and the smart water meter IPs of the same base station are divided into a group.
6. The smart water meter online fault detection system according to claim 1, characterized in that: The process of collating and sorting online data is as follows: Extract the original records from the online data uploaded by the smart water meter through the 4G module, store them in JSON, verify the fields in the records, mark missing values, and delete redundant records based on the unique identifier; Generate an online data set by acquiring multiple sets of online data uploaded by smart water meters; The online data set is globally sorted according to the timestamp, grouped according to the device ID, and the online data in each group is sorted. The smart water meters are assigned to the corresponding areas based on the base station ID and its corresponding geographic coordinates, and a regional label is added to each record to mark the geographic area to which the record belongs. For smart water meters in the same area, their online data are calculated to form regional feature data.
7. The smart water meter online fault detection system according to claim 4, characterized in that: Use water characteristic data to obtain: The water usage characteristic data include: water usage data of each group under the smart water meter group, water usage data of each IP address under the IP address division, water usage habits and preferences of each user, and water usage data on weekdays and weekends; The process of obtaining the water consumption data of each group and each IP address is as follows: The uploaded data under the main smart water meter is obtained, including the water consumption data of each sub-smart water meter under the main smart water meter, and stored in the database; at the same time, the water consumption data of each IP address under the IP address division is obtained and stored in the database.
8. The smart water meter online fault detection system according to claim 7, characterized in that: Acquisition of each user's water usage preferences: Using an unsupervised learning algorithm, users are divided into different water use type groups. Initialization: randomly select k initial cluster centers (c1, c2, ..., ck); for different water use type groups xj, assign them to the nearest cluster center; recalculate the new center ci of each cluster, that is, the mean of all samples in the cluster; repeat the assignment and update steps until the cluster center no longer changes significantly or the maximum number of iterations is reached; let X = {x1, x2, ..., xi}, which represents the set of water use behavior feature vectors of all users, where xi represents the water use behavior feature vector; By minimizing the within-cluster squared error argmin C To find the best cluster center set R, the formula is: Where Si is all sample points assigned to cluster i; ci is the center point of cluster i; i is the ordinal number of the current user; Isolation forest is used for anomaly detection. Several random decision trees are constructed to isolate abnormal points. For each user, the anomaly score is calculated based on the water use behavior feature vector xi. The formula is: Where E(h(xi)) is the expected value of the path length, c(f) is the average path length with f nodes in the binary search tree; S(xi,f) is the anomaly score; By obtaining the error between the online data and the feature data as the reconstruction error value, the group anomaly evaluation value Wp is calculated. The formula is: Where xi is the water use behavior feature vector; is the reconstructed eigenvalue; n is the verification weight; The error between the input data and the reconstructed data is calculated as the period anomaly evaluation value Ep, and the formula is: In the formula, Sh is the user's water consumption weight; Qu is the periodic fluctuation trend value; f is the number of nodes; By obtaining the difference between weekday and weekend water use patterns and using statistical tests to evaluate the significance of the difference, the user's water use is evaluated and the periodic anomaly evaluation value Eps after error elimination is calculated. The formula is: Where Sc is the trend change value of water use; Go is the error weight; and are the average water consumption on weekdays and weekends respectively; Dt is a binary variable; t is the date corresponding to the timestamp.
9. The smart water meter online fault detection system according to claim 8, characterized in that: Periodic anomaly assessment value and group anomaly assessment value: The group anomaly assessment value and the period anomaly assessment value are compared with the preset thresholds respectively. When both the group anomaly assessment value and the period anomaly assessment value exceed the preset thresholds, it is judged that an anomaly exists and the preset fault repair actions are performed respectively.
10. A method for online fault detection of a smart water meter, characterized in that: The steps include: Step 1: Obtain online data uploaded by smart water meters, including water flow velocity, pressure, temperature, signal strength and IP address, and divide the online data into regions, including smart water meter grouping and IP address division; Step 2: Organize the online data and sort them according to the timestamp and regional division results, and obtain the water use characteristic data after regional division by combining geographic space analysis; Step 3: Based on the water usage characteristic data, the machine learning algorithm is used to detect the anomalies of the smart water meter to obtain the fault classification value of the smart water meter. The fault type value includes a group anomaly assessment value and a periodic anomaly assessment value. The group anomaly assessment value and the periodic anomaly assessment value are compared and judged with the preset thresholds respectively. When an anomaly exists, the preset fault repair behavior is executed respectively.
Citation Information
Patent Citations
Intelligent water meter communication anomaly detection method, device and equipment and storage medium
CN117686068A
Household water meter centralized reading method, system and device, electronic equipment and medium
CN118158564A
Remote water meter reading method and system and electronic equipment
CN119172418A
Remote monitoring method and device for intelligent water meter integrated with NB-IoT
CN119618332A
Enhanced intelligent multi-mode data exchange water meter and intelligent diagnosis system
CN119719998A