Intelligent water meter data coding compression method and water consumption characteristic fine analysis method

By using a data encoding and compression method for smart water meters, dividing the storage area and using binary representation and compression technology, the problem of obtaining water usage characteristics of smart water meters under limited resources is solved, enabling more efficient data management and refined analysis, and extending battery life.

CN120856154APending Publication Date: 2025-10-28SHANDONG FENGSHI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510759150.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-10-28

Smart Images

  • Figure CN120856154A_ABST
    Figure CN120856154A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent water meter data coding compression method and a water consumption characteristic fine analysis method, and belongs to the technical field of data representation. A storage area is divided, one part is used for recording the water consumption of each time period, the other part is used for recording whether water consumption conditions exist in different specific time periods or not, and a binary system 0 or 1 is adopted for representation; according to the water consumption condition, multiple continuous bits with the same numerical value are compressed, compression comprises a compression flag bit, a repetition bit and a flag bit indicating whether water is used or not, the compression flag bit is represented by a binary sequence in which the water consumption condition does not occur or the number of times of occurrence is minimum, and the repetition bit is represented by a binary counting form of the continuous same bits; the flag bit of whether water is used is 0 or 1; and reading and decoding the uploaded compressed data, and performing user water consumption characteristic analysis according to the calculated data. According to the invention, the fine data transmission and analysis capability of the water consumption time period is improved, the condition that the data volume exceeds the limit can be better controlled, and the service life of the battery is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a data encoding and compression method for smart water meters and a method for refined analysis of water usage characteristics, belonging to the field of smart water meter and data representation technology. Background Technology

[0002] In today's digital and intelligent era, water management is undergoing profound changes. To achieve efficient and accurate meter reading and billing management, an increasing number of water companies are widely installing NB-IoT smart remote water meters, greatly improving the efficiency of meter reading and reducing labor costs. Simultaneously, with the deepening of water management, the refined analysis of water usage data is becoming increasingly important. Through in-depth mining of water usage data, water companies can better understand users' water usage habits, optimize water resource allocation, and promptly detect anomalies such as leaks, thereby improving water resource utilization efficiency and the quality of water supply services.

[0003] Currently, NB-IoT smart remote water meters face numerous challenges in data transmission and storage. Their battery capacity is limited and needs to be guaranteed for a certain lifespan, thus restricting the number of times the meter can connect to the network daily. Currently, the water meter can only connect to the network once a day and transmit one data packet. This data packet includes fields such as header, footer, indicator light, and checksum. After removing these fields, the number of bytes actually used to store water usage data is generally between 50 and 100. Therefore, it can only represent hourly water usage data, lacking more detailed information on water usage periods and frequency. This makes it difficult to conduct refined analysis of user water usage characteristics and to fully understand users' water needs and habits at different times.

[0004] To obtain more precise records of water usage periods and frequencies, such as recording water usage information every minute, it would be necessary to collect water usage information for each minute within 60 * 24 = 1440 minutes. Therefore, the number of bytes used to store this data would need to be increased to 180. Compared to recording hourly water usage information, the data required to record this detailed information would increase dramatically, easily exceeding the data packet storage capacity limit. Generally, to avoid data loss, water companies typically take measures such as increasing data upload time. This leads to reduced data real-time performance and also increases the power consumption of the water meter, thus affecting battery life and increasing maintenance costs.

[0005] Therefore, how to obtain richer and more detailed water usage characteristics information with limited storage resources and battery capacity has become an urgent problem to be solved in the field of smart water meter technology. Summary of the Invention

[0006] The purpose of this invention is to overcome the above-mentioned shortcomings and provide a data encoding and compression method for smart water meters. This method acquires richer and more comprehensive water usage characteristic information while ensuring that the designed lifespan of the water meter battery is not affected, thereby improving the efficiency and reliability of smart water meter data management.

[0007] The technical solution adopted in this invention is as follows:

[0008] The data encoding and compression method for smart water meters includes the following steps:

[0009] S1. Determine the data transmission format and data storage area of ​​the smart water meter;

[0010] S2. Divide the storage area into two parts: one part is used to record the water consumption in each time period, and the other part is used to record whether water consumption occurred in different specific time periods. The data is represented by binary 0 or 1, with the corresponding data bit status "0" indicating that no water consumption occurred and "1" indicating that water consumption occurred.

[0011] S3. Based on water usage, compress the number of consecutive identical digits. The compression includes a compression flag, a repeating bit, and a water usage flag. The compression flag is represented by a binary sequence that has not appeared or has appeared the fewest times. The repeating bit is represented by a binary number of consecutive identical digits. The water usage flag is represented by 0 or 1.

[0012] S4. Store and upload data.

[0013] In the above method, step S2 records the water consumption per hour for one day. This storage area has 24 bytes, and it records the water consumption data Q every hour sequentially. i Water consumption Q in 1 hour i =Q i末 -Q i初 Q i末 Q is the water meter reading at the end of that period. i初 This is the initial water meter reading for that period; the storage area containing 180 bytes records whether water usage occurred every minute of the day.

[0014] In step S3, the compression flag is selected from a long sequence of 0s and 1s that appear for a long time, preferably an 8-bit binary "10101010". Preferably, the compression is performed on bits with 16 or more consecutive identical values ​​based on water usage.

[0015] Another object of the present invention is to provide a method for refined analysis of water usage characteristics, including the steps of the above-mentioned smart water meter data encoding and compression method, and further including:

[0016] (1) Perform decoding operations according to the encoding compression method to generate the hourly water consumption Q. iAnd water usage per minute;

[0017] (2) Based on water usage, the hourly water usage frequency n can be statistically generated. i According to Q i and n i It is possible to calculate the average water consumption q per minute during the water usage period. minute The formula is as follows:

[0018]

[0019] Based on the average water consumption per minute and the minute-by-minute water consumption pattern, consecutive identical binary bits are considered as one water consumption period, and the water consumption for that single period is calculated. Calculating water consumption per transaction Let's define a weight α∈(0,1]. The longer the continuous duration of a single water usage, the larger the value of α; otherwise, the smaller the value of α. If the continuous water usage is t minutes, then the formula for calculating the total water usage in a single instance is:

[0020]

[0021] (3) Refined analysis of user water usage characteristics, the steps are as follows:

[0022] ① By comparing the number of times and the amount of water used within a certain period with the number of times and the amount of water used in the previous period, the health status of users can be analyzed. A sudden increase or decrease in the frequency of water use, especially an increase in the frequency of water use at night, reflects a risk to the user's health. Irregular water use frequency and amount for elderly people living alone may indicate that the elderly may have physical abnormalities.

[0023] ② If the user uses water every minute of the day, and uses water less frequently at night with a small amount of water per hour, the user's water pipes may be leaking.

[0024] ③ For working professionals with highly regular water usage patterns, comparing the frequency and amount of water used during a certain period with the frequency and amount of water used during the same period in the past can also help analyze whether the user is working and living normally.

[0025] ④ Based on the total amount of water used in a single transaction By analyzing the duration of continuous water use, the nature of a user's water usage can be determined.

[0026] Another objective of this invention is to provide a refined water usage characteristic analysis system, including a water meter data encoding module, which is used to divide the storage area according to the storage area capacity. The module includes two parts: one part records the water usage in each time period, and the other part records whether water usage occurs in different specific time periods. The system uses binary data bits, and the water usage status is represented by the corresponding data bit status "0" or "1". 0 indicates that there is no water usage in that time period, and 1 indicates that water usage occurs in that time period.

[0027] The encoding data compression module is used to compress multiple consecutive bits of the same value according to water usage. The compression includes a compression flag bit, a repetition bit, and a water usage flag bit. The compression flag bit is represented by a binary sequence that has not appeared or has appeared the fewest times. The repetition bit is represented by a binary count of consecutive bits of the same value. The water usage flag bit is represented by 0 or 1.

[0028] The data storage and upload module is used to save and upload compressed data;

[0029] The data decoding and water consumption characteristic information statistical calculation module is used to read and decode the uploaded data, and calculate the hourly water consumption Q. i Calculate the hourly water usage frequency n based on minute-by-minute water usage status. i The total water consumption per transaction is further calculated by combining the average water consumption per minute.

[0030] The refined water usage characteristics analysis module analyzes user water usage characteristics based on statistically calculated data, enabling analysis of health status, user lifestyle and behavior, leakage early warning analysis, and analysis of the nature of user water usage.

[0031] The beneficial effects of this invention are:

[0032] (1) The compression method of the present invention adopts a three-segment combination, which can reduce the amount of duplicate data and obtain hourly water consumption information, minute water consumption information and minute water consumption estimation information while ensuring that the data is transmitted in one data packet. This improves the ability to transmit and analyze precise water consumption data. Furthermore, the data encoding compression method can better control the situation where the amount of data exceeds the limit, which can increase the battery life.

[0033] (2) By acquiring information such as water usage time period, minute-by-minute water usage and single water usage amount, this invention can perform refined water usage characteristic analysis of users, such as timely and accurate leakage early warning service to avoid significant losses when leakage occurs in the user's meter; provide health early warning for users; provide early warning for abnormal physical condition of elderly people living alone; and provide public services such as resident living pattern characteristics, personnel going out, household personnel gathering, and house occupancy rate for community management. Attached Figure Description

[0034] Figure 1 This is a flowchart of the water feature refinement analysis method according to an embodiment of the present invention;

[0035] Figure 2 This is a diagram showing the data storage area range of an embodiment of the present invention;

[0036] Figure 3 This is a diagram illustrating the data storage content and minute-based encoding and compression process of an embodiment of the present invention.

[0037] Figure 4 This is a graph showing hourly water consumption information according to an embodiment of the present invention.

[0038] Figure 5 This is a single-use water analysis diagram according to an embodiment of the present invention. Detailed Implementation

[0039] The present invention will be further described below with reference to specific embodiments.

[0040] A refined analysis method for water use characteristics (see...) Figure 1 The steps include the following:

[0041] (1) A method for refining data encoding and compression in smart water meters

[0042] S1. Determine the data transmission format and data storage area of ​​the smart water meter:

[0043] The data storage area in this embodiment is 204 bytes in total. Figure 2 As shown.

[0044] S2. Divide the storage area into two parts: one part records the water consumption for each time period, and the other part records whether water was used in different specific time periods. This is represented using binary 0 or 1, with the corresponding data bit status being "0" indicating no water usage and "1" indicating water usage.

[0045] One part records the water consumption per hour for a day. This part of the storage area has 24 bytes and records the water consumption data Q for each hour sequentially. i Water consumption Q in 1 hour i =Q i末 -Q i初 Q i末 Q is the water meter reading at the end of that period. i初 The first part is the initial water meter reading for that period; the other part, 180 bytes of storage, uses binary data bits, totaling 180 × 8 bits = 1440 bits, to record whether water usage occurred every minute of the day. Water usage is indicated by the corresponding data bit status "0" or "1" to indicate whether water usage occurred or not.

[0046] S3. Based on water usage, compress consecutive 16 or more identical digits. Compression includes a compression flag, a repetition flag, and a water usage flag. The compression flag is represented by a binary sequence of water usage that has not appeared or has appeared the fewest times. The repetition flag is represented by a binary count of consecutive identical digits. The water usage flag is represented by 0 or 1.

[0047] Representing water usage per minute in binary format would generate 60 × 24 = 1440 bits. If the data packet sequence is too long, data loss is likely. Considering that users' daily water usage patterns follow a certain sequence, long sequences of 0s and 1s rarely overlap. Based on this characteristic, we compress these 1440 bits to avoid exceeding capacity and data loss. Using historical user data, we find and determine the flag bit for compression. The user's daily water usage characteristics over the past 30 days are converted into a 1440-bit binary sequence. The Rabin-Karp (rolling hash) algorithm is used to calculate the 8-bit binary sequence that has never appeared before, or the 8-bit binary sequence that appears least frequently, as the flag bit for the compression algorithm. The resulting flag bit is "10101010". Repeating bits are represented using consecutive binary digits of the same length. For example, a sequence of no water usage for 60 consecutive minutes is represented as 000...000, totaling 60 bits. We represent this 60 using 7 bits as 0111100, and then append 1 or 0 to the 7 bits to indicate whether water usage or not is being used. In summary, taking the flag 10101010 as an example, the compressed data is 1010101001111000, totaling 16 bits, used to represent 60 consecutive minutes of no water usage after compression. This can compress 44 bits, or more than 5 bytes. Furthermore, this method can also be used to analyze user water usage characteristics using refined minute data, making the analysis results more accurate.

[0048] S4. Store and upload data;

[0049] In this embodiment, 24 bytes are used to record the hourly water consumption information throughout the day, and 180 bytes, or 180 × 8 bits = 1440 binary data bits, are used to record whether water is used every minute throughout the day, represented by the values ​​"0" and "1". 0 indicates that no water is used during that time period, and 1 indicates that water is used during that time period.

[0050] Starting from 0:00, data is recorded every minute. Based on whether water usage occurred, values ​​are assigned to the data bits in the storage area accordingly. For example, it first checks whether water usage occurred between 0:00:00 and 0:01:00 (the method of determination can be, but is not limited to, using methods where the instantaneous flow rate collected by the smart water meter is > 0.01 m³ / h). 3If the time is / h, it is determined that water usage has occurred; otherwise, it is determined that no water usage has occurred, and a value is assigned to the water usage status storage area. This process continues until the data collection of water usage for the entire day is completed from 23:59:00 to 0:00.

[0051] Data content of each byte:

[0052] Hourly water consumption data: For example, water consumption from 0:00 to 1:00 is 12L, water consumption from 1:00 to 2:00 is 0L, ... water consumption from 22:00 to 23:00 is 36L, water consumption from 23:00 to 0:00 is 5L. The water consumption data for the entire 24 hours is stored sequentially in bytes 1 to 24 of the corresponding storage area.

[0053] Water usage records for different time periods: If no water is used between 0:00 and 0:01:00, then the 25th byte of the corresponding storage area, data bit 1, is assigned a value of "0"; if no water is used between 0:01:00 and 0:02:00, then data bit 1 is assigned a value of "0"; if water is used between 0:02:00 and 0:03:00, then data bit 3 is assigned a value of "1", and so on, until 23:57:30 to 0:00, totaling 180 bytes and 1440 bits of status data.

[0054] The process of compressing minute-by-minute water usage characteristic data is as follows: Figure 3 As shown in the example, using "10101010" as the flag bit, this example compresses consecutive identical values ​​of 16 bits or more into a 7-bit binary representation. Since 7 bits can represent a maximum of 127, this compression method can only compress consecutive binary data from 16 to 127. The compressed data consists of 16 bits: the first 8 bits are flag bits, bits 9-15 are the compressed representation, and the last bit indicates whether water is used.

[0055] S5. Perform compression recognition and decoding operations according to the encoding compression method to generate the hourly water consumption Q. i And water usage per minute:

[0056] After receiving the data packet, the computer decodes it using a compression storage mechanism and calculates the water consumption characteristics for the day using a parsing method. This includes hourly water consumption, water consumption periods, and estimated water consumption for each period. Figure 4-5 As shown.

[0057] The computer software reads the uploaded data and calculates the hourly water consumption Q. i And the minute-by-minute water usage status, counting the number of times water is used per hour (n). i Based on hourly water consumption Q i and n i The formula for calculating the average water consumption per minute is as follows:

[0058]

[0059] We define a series of consecutive binary 1s as representing a single water usage, therefore we can calculate the total water usage for a single transaction using the number of binary digits. Calculating water consumption per transaction We define a weight α∈(0,1], where α increases with the duration of a single water usage session and decreases otherwise. Assuming a single continuous water usage session lasts 20 minutes, the formula for calculating the total water usage in a single session is:

[0060]

[0061] S6. Refined analysis of water usage characteristics:

[0062] Using the hourly water consumption and minute-by-minute water usage information obtained from decoding, we further calculate water consumption information such as average water consumption per minute and total water consumption per transaction, and conduct a refined analysis of the user's water consumption characteristics. The process is as follows:

[0063] ① By comparing the number of times water is used during different time periods within a day with the average number of times water is used during different time periods over the past three months, the health status of users can be analyzed. For elderly people living alone, a sudden increase or decrease in the frequency of water use, especially an increase in the frequency of water use at night, reflects a risk to the user's health. Delays or no water use during water use periods indicate that the elderly may have physical abnormalities.

[0064] ② If the user uses water every minute of the day, and uses water less frequently at night with only a small amount per hour, the user's water pipes may be leaking.

[0065] ③ For groups with regular water usage patterns, such as office workers, a detailed comparison of water usage frequency and volume over a specific period (e.g., weekdays within a week) with data from the same period previously revealed can indicate a change in the user's lifestyle. For example, a sudden and significant delay in water usage, particularly during a regular weekday morning routine of washing up and rinsing, coupled with reduced water consumption, could mean the user did not go to work that day, perhaps due to illness and rest at home, or a change in work arrangements.

[0066] ④ Based on the total amount of water used in a single transaction This also allows for a general analysis of the user's water usage patterns. Different water usage behaviors typically correspond to different water usage durations and volumes. For example, water usage within 15-30 minutes and... This most likely indicates that the user is taking a shower. Showering requires continuous water flow to adjust the temperature and rinse the body, so it takes a considerable amount of time and uses a relatively large amount of water. Continuous water use for 5-10 minutes and... It's highly likely the user is washing vegetables. Washing vegetables requires changing the water multiple times to ensure they're thoroughly cleaned, but the overall water usage and duration are less than showering. Water usage within 1-3 minutes... It is highly likely that they are washing up, such as brushing their teeth or washing their face. These water-using behaviors are usually short-lived and use relatively little water.

[0067] Example 2: A water usage characteristic refined analysis system includes a water meter data encoding module, which is used to divide the storage area according to the storage area capacity. It includes two parts: one part records the water usage in each time period, and the other part records whether water usage occurs in different specific time periods. Binary data bits are used, and water usage is represented by the corresponding data bit status "0" or "1". 0 indicates that there is no water usage in that time period, and 1 indicates that water usage occurs in that time period.

[0068] The encoding data compression module is used to compress multiple consecutive bits of the same value according to water usage. The compression includes a compression flag bit, a repetition bit, and a water usage flag bit. The compression flag bit is represented by a binary sequence that has not appeared or has appeared the fewest times. The repetition bit is represented by a binary count of consecutive bits of the same value. The water usage flag bit is represented by 0 or 1.

[0069] The data storage and upload module is used to save and upload compressed data;

[0070] The data decoding and water consumption characteristic information statistical calculation module is used to read and decode the uploaded data, and calculate the hourly water consumption Q. i Calculate the hourly water usage frequency n based on minute-by-minute water usage status. i The total water consumption per transaction is further calculated by combining the average water consumption per minute.

[0071] The refined water usage characteristics analysis module analyzes user water usage characteristics based on statistically calculated data, enabling analysis of health status, user lifestyle and behavior, leakage early warning analysis, and analysis of the nature of user water usage.

[0072] The above description is merely a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data encoding and compression method for smart water meters, characterized in that, The steps include the following: S1. Determine the data transmission format and data storage area of ​​the smart water meter; S2. Divide the storage area into two parts: one part is used to record the water consumption in each time period, and the other part is used to record whether water consumption occurred in different specific time periods. The data is represented by binary 0 or 1, with the corresponding data bit status "0" indicating that no water consumption occurred and "1" indicating that water consumption occurred. S3. Based on water usage, compress the number of consecutive identical digits. The compression includes a compression flag, a repeating bit, and a water usage flag. The compression flag is represented by a binary sequence that has not appeared or has appeared the fewest times. The repeating bit is represented by a binary number of consecutive identical digits. The water usage flag is represented by 0 or 1. S4. Store and upload data.

2. The smart water meter data encoding and compression method according to claim 1, characterized in that, Step S2 records the water consumption per hour for one day. This storage area has 24 bytes, and it records the water consumption data Q for each hour sequentially. i Water consumption Q in 1 hour i =Q i末 -Q i初 Q i末 Q is the water meter reading at the end of that period. i初 This is the initial water meter reading for that period; the storage area containing 180 bytes records whether water usage occurred every minute of the day.

3. The smart water meter data encoding and compression method according to claim 1, characterized in that, In step S3, the compression flag is selected from a long sequence of 0 and 1 alternations over a long period of time.

4. The smart water meter data encoding and compression method according to claim 3, characterized in that, In step S3, the compression flag is selected as 8-bit binary "10101010".

5. The smart water meter data encoding and compression method according to claim 1, characterized in that, In step S3, the number of consecutive identical values ​​of 16 or more digits is compressed according to the water usage situation.

6. A method for refined analysis of water use characteristics, characterized in that, The steps of the above-mentioned smart water meter data encoding and compression method also include: (1) Perform decoding operations according to the encoding compression method to generate the hourly water consumption Q. i And water usage per minute; (2) Based on water usage, the hourly water usage frequency n can be statistically generated. i According to Q i and n i It is possible to calculate the average water consumption q per minute during the water usage period. minute The formula is as follows: Based on the average water consumption per minute and the minute-by-minute water consumption pattern, consecutive identical binary bits are considered as one water consumption period, and the water consumption for that single period is calculated. Calculating water consumption per transaction Let's define a weight α∈(0,1]. The longer the continuous duration of a single water usage, the larger the value of α; otherwise, the smaller the value of α. If the continuous water usage is t minutes, then the formula for calculating the total water usage in a single instance is: (3) Refined analysis of user water usage characteristics, the steps are as follows: ①Analyze the user's health status by comparing the number of times and the amount of water used within a certain period with the number of times and the amount of water used in the previous period. ② If the user uses water every minute of the day, and uses water less frequently at night with a small amount of water per hour, the user's water pipes may be leaking. ③ For working professionals with highly regular water usage patterns, comparing the frequency and amount of water used during a certain period with the frequency and amount of water used during the same period in the past can also help analyze whether the user is working and living normally. ④ Based on the total amount of water used in a single transaction By analyzing the duration of continuous water use, the nature of a user's water usage can be determined.

7. A refined water use characteristic analysis system, characterized in that, It includes a water meter data encoding module, which is used to divide the storage area according to the storage area capacity. It consists of two parts: one part records the water consumption in each time period, and the other part records whether water is used in different specific time periods. It uses binary data bits, and the water use status is represented by the corresponding data bit status "0" or "1". 0 indicates that there is no water use in that time period, and 1 indicates that water use occurs in that time period. The encoding data compression module is used to compress multiple consecutive bits of the same value according to water usage. The compression includes a compression flag bit, a repetition bit, and a water usage flag bit. The compression flag bit is represented by a binary sequence that has not appeared or has appeared the fewest times. The repetition bit is represented by a binary count of consecutive bits of the same value. The water usage flag bit is represented by 0 or 1. The data storage and upload module is used to save and upload compressed data; The data decoding and water consumption characteristic information statistical calculation module is used to read and decode the uploaded data, and calculate the hourly water consumption Q. i Calculate the hourly water usage frequency n based on minute-by-minute water usage status. i The total water consumption per transaction is further calculated by combining the average water consumption per minute. The refined water usage characteristics analysis module analyzes user water usage characteristics based on statistically calculated data, enabling analysis of health status, user lifestyle and behavior, leakage early warning analysis, and analysis of the nature of user water usage.