Intelligent water metering data credible evidence and distributed billing method
By incorporating high-precision sensors and national cryptographic algorithms into smart water meters, combined with consortium blockchain networks and smart contracts, the problems of low data reliability, opaque billing, and insufficient security in traditional water metering systems are solved. This achieves secure data transmission and accurate billing, adapting to different water usage needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA THREE GORGES CORPORATION
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-12
AI Technical Summary
Traditional water metering systems suffer from problems such as low data reliability, opaque billing, low regulatory efficiency, and insufficient security. In particular, they are prone to errors and tampering during data collection, transmission, and billing, and rely on centralized systems.
The system uses a high-precision sensor built into the smart water meter to collect data in real time and performs filtering. It is then double-encrypted using national cryptographic algorithms and transport layer security protocols. The data is transmitted to distributed nodes via a low-power wide area network and stored and billed using a consortium blockchain network. Fees are automatically calculated based on smart contracts.
It improves the security and reliability of data transmission, ensures the accuracy and transparency of billing, reduces human intervention, adapts to the water needs of different regions and users, and achieves reasonable charging.
Smart Images

Figure CN122204418A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart water meter metering and billing technology, specifically to a method for reliable storage of smart water meter metering data and distributed billing. Background Technology
[0002] As the nation's awareness of the importance of water resources gradually increases, rational and economical water use has become a broad consensus among citizens. There is an urgent need for a new urban water supply billing system that effectively combines prepaid single-price billing with tiered pricing, offering a simple, advanced, and low-management-cost system based on "pay first, use later, and tiered pricing." This type of water meter can adopt either a single-price billing model or a tiered pricing method. It provides an intelligent water meter product for realizing tiered billing and water-saving management in urban water supply.
[0003] Traditional water metering systems have the following drawbacks: 1. Low data reliability: Manual meter reading is prone to errors, and smart water meter data is easily tampered with or lost; 2. Lack of billing transparency: Relying on a centralized billing system, users cannot verify the reasonableness of the cost calculation; 3. Low regulatory efficiency: Water authorities need to manually verify data, resulting in high auditing costs and poor timeliness; 4. Insufficient security: Data transmission uses plaintext or weak encryption protocols, making it vulnerable to man-in-the-middle attacks. Summary of the Invention
[0004] The main objective of this invention is to provide a reliable method for storing and distributing metering data of smart water meters. This technical solution solves the problems mentioned in the background section.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for trusted storage and distributed billing of smart water meter metering data, comprising: The smart water meter uses a built-in high-precision sensor to collect water consumption data, ambient temperature and water quality parameters in real time. The raw data is then filtered and denoised to generate a structured data package. The data packets are symmetrically encrypted using the national cryptographic algorithm, and then the ciphertext is encrypted a second time using the transport layer security protocol. The encrypted data is then transmitted to the distributed nodes using a low-power wide area network protocol. After decrypting the received encrypted data, its integrity is verified. The data fingerprint is calculated using a hash algorithm. The data fingerprint, timestamp, and water meter's unique identifier are packaged into a storage unit and uploaded to the consortium blockchain network. Based on the stored data, the pre-designed fee rules are invoked, including tiered water pricing, peak-valley time-of-use pricing, and seasonal price adjustments. The total fee is automatically calculated through smart contracts, and the results are written into the distributed ledger. Based on the user's choice of prepaid or postpaid mode, the system triggers corresponding control instructions or credit assessments, completes the fee settlement, synchronizes it to the fiscal non-tax system, and generates an electronic invoice.
[0006] In the preferred solution, the high-precision sensor built into the smart water meter collects water consumption data, ambient temperature, and water quality parameters in real time. The raw data is then filtered and denoised to generate a structured data package. The specific steps include: The smart water meter is equipped with a high-precision flow sensor, a temperature sensor, and a water quality monitoring sensor, and the high-precision flow sensor is a Coriolis flow sensor. The data collection frequency is adjusted according to the water usage period. During the peak period from 6:00 to 22:00, the sampling frequency of the high-precision flow sensor is 1Hz, and the sampling frequency of the temperature sensor and water quality monitoring sensor is 0.2Hz, so as to obtain water consumption data, temperature data and water quality parameters and form raw data. The raw data is processed, and the processed data is packaged into a JSON format data packet; The processing of the raw data specifically includes: A five-point cubic smoothing algorithm was used to smooth the water consumption data. The formula is as follows: ; in, Here is the raw water consumption data at time t. This is the filtered value; A first-order low-pass filter with a cutoff frequency of 0.5Hz is applied to the temperature data. The transfer function is: ; in, =0.318, It is a time constant; The median value filtering method was used to analyze the water quality data, and the median value was taken from five consecutive data points.
[0007] In the preferred embodiment, the Coriolis flow sensor incorporates two vibrating tubes. The mass flow rate is calculated by detecting the phase difference caused by the Coriolis force, using the following formula: ; in, For quality flow, For sensor coefficients, For phase difference, The frequency is the vibration frequency.
[0008] In the preferred scheme, the data packets are symmetrically encrypted using the national cryptographic algorithm, and then the ciphertext is encrypted a second time using a transport layer security protocol. The encrypted data is then transmitted to the distributed nodes using a low-power wide area network protocol. The specific steps include the following: Data packets are processed using the SM4 national cryptographic algorithm. Perform ECB mode encryption to generate ciphertext. Among them, encryption key The key is generated and stored through the water meter hardware security module. The key length is 128 bits and the initialization vector (IV) is an all-zero vector. Ciphertext via TLS 1.3 protocol Secondary encryption is performed, and a temporary session key is generated using the elliptic curve Diffie-Hellman key exchange algorithm. The encryption process satisfies: ; in, Valid for 24 hours; Double-encrypt data It is encapsulated into a physical layer frame conforming to the LPWAN standard and transmitted to distributed nodes via NB-IoT or LoRa protocol.
[0009] In the preferred scheme, the received encrypted data is decrypted and its integrity is verified. A data fingerprint is calculated using a hash algorithm, and the data fingerprint, timestamp, and unique water meter identifier are packaged into a storage unit and uploaded to the consortium blockchain network. The specific steps include the following: Using temporary session keys via TLS 1.3 protocol Decrypt data packets Restore SM4 ciphertext ; Retrieve the SM4 encryption key via the water meter hardware security module (HSM) ,right Perform ECB mode decryption to restore the original data packet. ; Decrypted data packets Perform hash fingerprint comparison and calculate the local hash value using the SM3 algorithm. SM3 ( The hash value H(t) carried in the data packet is compared with the original hash value H(t). If they do not match, a tampering alarm is triggered. The verified data packet Encapsulated as a proof unit Uploaded to the consortium blockchain network.
[0010] In the preferred scheme, pre-designed fee rules, including tiered water pricing, peak-valley time-of-use pricing, and seasonal price adjustments, are invoked based on stored data. The total cost is automatically calculated via smart contracts, and the results are written into the distributed ledger. Specifically, this includes: When deploying smart contracts in a distributed ledger, the contract rules include the following set of billing rule parameters: Tiered water pricing rules: Three-tier threshold Q0=0m3 Q1=15m 3 Q2=25m 3 The corresponding water price is P1 = 2.5 yuan / m³. 3 P2 = 3.5 yuan / m 3 P3 = 5.0 yuan / m 3 ; Peak-valley time-sharing rules: Peak period t peak =7:00 9:00, 17:00 21:00, corresponding electricity price coefficient k peak =1.5, Pinggu period k flat =1.0; Seasonal price adjustment rules: Price adjustment coefficient for summer (June-August) summer =0.2, winter (December-February) winter =0.1, spring and autumn season =0.05; Query the evidence storage unit from the consortium blockchain via the smart contract interface. After verifying the consistency between the data fingerprint H(t) and the locally calculated value, the data is decompressed to obtain the water consumption Q(t), timestamp t, and water meter identifier ID. Calculating costs for executing multiple rules: The tiered water pricing is as follows: ,in, =Q(t), when Q(t)>Q2, the excess portion is charged according to P3; Peak-valley time-sharing fees: ,in, ( t )=k peak When t∈k peak ,otherwise ( t )=k flat ; Seasonal price adjustment fees: ,in, The value is dynamically determined based on the month of the timestamp t; Get total cost = + + The fee record R(t) is generated through a smart contract = { ,t,ID,Sig}, whereSig is the digital signature of the water authority; R(t) is encapsulated into a transaction data packet and written into the distributed ledger after PBFT consensus.
[0011] In the preferred embodiment, the The base water price is dynamically adjusted based on local water supply costs. The adjustment formula is as follows: ; In the formula, =0.7 is the adjustment factor. The percentage change in water supply costs (%).
[0012] In the preferred embodiment, the The seasonal price adjustment factor has the following dynamic value selection rules: When the month m of timestamp t ∈ {6, 7, 8}, α = 0.2; When m∈{12, 1, 2}, α=0.1; Otherwise, α = 0.05.
[0013] A smart water meter metering data trusted storage and distributed billing system includes: The data acquisition module is used to collect water consumption data, ambient temperature and water quality parameters in real time through the high-precision sensor built into the smart water meter, and to filter and denoise the raw data to generate structured data packets. An encrypted transmission module is used to symmetrically encrypt data packets using Chinese cryptographic algorithms, then encrypt the ciphertext a second time using a transport layer security protocol, and transmit the encrypted data to distributed nodes using a low-power wide area network protocol. The verification and packaging module is used to decrypt the received encrypted data to verify its integrity, calculate the data fingerprint through a hash algorithm, and package the data fingerprint, timestamp, and water meter unique identifier into a storage unit and upload it to the consortium blockchain network. The total water fee calculation module is used to call pre-designed fee rules based on the stored data, including tiered water pricing, peak-valley time-of-use pricing, and seasonal price adjustments. It automatically calculates the total fee through smart contracts and writes the results into a distributed ledger. The payment module is used to select prepaid or postpaid according to the user's mode, trigger corresponding control instructions or credit assessment, complete the fee settlement and synchronize it to the fiscal non-tax system, and generate an electronic invoice.
[0014] An electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
[0015] This invention provides a reliable data storage and distributed billing method for smart water meters. It employs a national cryptographic algorithm for symmetric encryption, followed by secondary encryption using a transport layer security protocol. The encrypted data is then transmitted to distributed nodes using a low-power wide-area network protocol. This dual encryption mechanism significantly enhances data transmission security, preventing data leakage and tampering, and protecting user privacy and security. The decrypted and verified data is then hashed to calculate a data fingerprint, which, along with a timestamp and the water meter's unique identifier, is packaged into a storage unit and uploaded to a consortium blockchain network. The distributed storage and immutability of the consortium blockchain ensure data traceability; any modification to the data leaves a trace, effectively preventing malicious tampering and guaranteeing data authenticity and reliability. Based on the stored data, pre-designed billing rules are invoked, covering various complex billing models such as tiered pricing, peak-valley time-of-use pricing, and seasonal price adjustments. The total cost is automatically calculated via smart contracts. The automatic execution of smart contracts ensures the accuracy and consistency of billing, avoiding errors that may occur with manual calculations. Furthermore, the flexible billing rules better adapt to the water needs of different regions and users, achieving reasonable pricing. Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a schematic diagram of the method flow for S101-S105 in this invention; Figure 2 This is a schematic diagram of the method flow for S201-S203 in this invention; Figure 3 This is a schematic diagram of the method flow of S301-S303 in this invention; Figure 4 This is a schematic diagram of the method flow for S401-S404 in this invention; Figure 5 This is a schematic diagram of the system of the present invention. Detailed Implementation
[0017] Example 1 Example 1 Please refer to Figure 1 As shown, in a first aspect of the present invention, a method for trusted storage and distributed billing of smart water meter metering data is provided, comprising: S101: The smart water meter collects water consumption data, ambient temperature and water quality parameters in real time through its built-in high-precision sensor, and performs filtering and noise reduction on the raw data to generate a structured data packet. S102. The data packet is symmetrically encrypted using the national cryptographic algorithm, and then the ciphertext is encrypted again using the transport layer security protocol. The encrypted data is then transmitted to the distributed nodes using the low power wide area network protocol. S103. After decrypting the received encrypted data, verify its integrity, calculate the data fingerprint using a hash algorithm, and package the data fingerprint, timestamp, and water meter unique identifier into a storage unit and upload it to the consortium blockchain network. S104. Based on the stored data, call the pre-designed fee rules, including tiered water pricing, peak-valley time-of-use pricing, and seasonal price adjustments. Calculate the total fee automatically through smart contracts and write the result into the distributed ledger. S105. Select prepaid or postpaid according to the user's mode, trigger the corresponding control instructions or credit assessment, complete the fee settlement and synchronize it to the fiscal non-tax system, and generate an electronic invoice.
[0018] Those skilled in the art will understand that by using high-precision sensors built into smart water meters to collect multi-dimensional data such as water consumption, ambient temperature, and water quality parameters in real time, and performing filtering and noise reduction processing to generate structured data packets, noise interference is effectively removed, ensuring the accuracy and integrity of the data and providing a reliable foundation for subsequent analysis and processing. Symmetric encryption using national cryptographic algorithms is employed, followed by secondary encryption via a transport layer security protocol. The encrypted data is then transmitted to distributed nodes using a low-power wide-area network protocol. This dual encryption mechanism greatly enhances the security of data transmission, preventing data leakage and tampering, and protecting the privacy and security of users' water usage data. The decrypted and verified data is then used to calculate a data fingerprint using a hash algorithm, packaged with a timestamp and the water meter's unique identifier into a storage unit, and uploaded to the consortium blockchain network. The distributed storage and immutability of the consortium blockchain ensure data traceability; any modification to the data leaves a trace, effectively preventing malicious tampering and guaranteeing the authenticity and credibility of the data. Based on the stored data, pre-designed billing rules are invoked, covering various complex billing models such as tiered water pricing, peak-valley time-of-use pricing, and seasonal price adjustments. The total cost is automatically calculated through smart contracts. The automatic execution feature of smart contracts ensures the accuracy and consistency of billing, avoiding errors that may occur in manual calculations. At the same time, flexible billing rules can better adapt to the water needs of different regions and users, achieving reasonable charges.
[0019] Please refer to Figure 2 As shown, the smart water meter collects water consumption data, ambient temperature, and water quality parameters in real time using its built-in high-precision sensor. The raw data is then filtered and denoised to generate a structured data package. The specific steps include: S201 The smart water meter is equipped with a high-precision flow sensor, a temperature sensor and a water quality monitoring sensor, and the high-precision flow sensor is a Coriolis flow sensor. S202. Adjust the data acquisition frequency according to the water usage period. During peak hours (6:00-22:00), the sampling frequency of the high-precision flow sensor is 1Hz, and the sampling frequency of the temperature sensor and water quality monitoring sensor is 0.2Hz, so as to obtain water consumption data, temperature data and water quality parameters, and form raw data. S203. Process the raw data and encapsulate the processed data into a JSON format data packet; Processing the raw data specifically includes: A five-point cubic smoothing algorithm was used to smooth the water consumption data. The formula is as follows: ; in, Here is the raw water consumption data at time t. This is the filtered value; A first-order low-pass filter with a cutoff frequency of 0.5Hz is applied to the temperature data. The transfer function is: ; in, =0.318, It is a time constant; The median value filtering method was used to analyze the water quality data, and the median value was taken from five consecutive data points.
[0020] The Coriolis flow sensor has two built-in vibrating tubes. It calculates the mass flow rate by detecting the phase difference caused by the Coriolis force. The formula is: ; in, For quality flow, For sensor coefficients, For phase difference, The frequency is the vibration frequency.
[0021] Those skilled in the art will understand that incorporating high-precision flow sensors, temperature sensors, and water quality monitoring sensors into smart water meters enables comprehensive monitoring of water usage from multiple dimensions. High-precision flow sensors accurately measure water consumption, temperature sensors acquire water temperature information, and water quality monitoring sensors detect water quality parameters, providing a rich and accurate data foundation for subsequent water usage analysis, management, and ensuring water safety. Coriolis flow sensors are characterized by high precision and high stability, unaffected by factors such as fluid density, viscosity, temperature, and pressure, and can directly measure the mass flow rate of fluids. Applying them as high-precision flow sensors in smart water meters ensures the accuracy of water consumption measurement, reduces measurement errors, and provides a reliable basis for fair and reasonable water metering and billing. The data acquisition frequency is adjusted according to water usage periods. During peak hours (6:00-22:00), different sampling frequencies are used: the high-precision flow sensor samples at 1Hz, while the temperature sensor and water quality monitoring sensor sample at 0.2Hz. This differentiated acquisition strategy better adapts to the rapid changes in water consumption and the high dynamics of data during peak hours, promptly capturing subtle changes in water consumption. Simultaneously, it rationally controls the amount of temperature and water quality data collected, avoiding data redundancy and improving the efficiency and relevance of data acquisition. By adjusting the data acquisition frequency, unnecessary high-frequency sampling during off-peak hours is avoided while meeting the data monitoring needs during peak hours. This reduces the workload and energy consumption of the sensors, extends their lifespan, and also lowers the cost of data storage and transmission, achieving optimal resource allocation. After processing, the raw data is packaged into a JSON format data packet. JSON format is concise, easy to read, and easy to parse, and can be quickly recognized and processed by various programming languages and systems. This standardized data encapsulation method facilitates data transmission and sharing, improves data compatibility and interoperability across different systems and platforms, and provides convenience for subsequent data analysis, mining, and application.
[0022] Please refer to Figure 3 As shown, the data packet is symmetrically encrypted using the national cryptographic algorithm, then the ciphertext is encrypted a second time using a transport layer security protocol, and the encrypted data is transmitted to the distributed nodes using a low-power wide area network protocol. The specific steps include: S301, Use the SM4 national cryptographic algorithm to process data packets. Perform ECB mode encryption to generate ciphertext. Among them, encryption key The key is generated and stored through the water meter hardware security module (HSM), with a key length of 128 bits and an initialization vector (IV) of all zeros. S302, Ciphertext via TLS 1.3 protocol Secondary encryption is performed, and a temporary session key is generated using the Elliptic Curve Diffie-Hellman (ECDHE) key exchange algorithm. The encryption process satisfies: ; in, Valid for 24 hours; S303, Double-encrypt data It is encapsulated into a physical layer frame conforming to the LPWAN standard and transmitted to distributed nodes via NB-IoT or LoRa protocol.
[0023] Please refer to Figure 4As shown, after decrypting the received encrypted data and verifying its integrity, the data fingerprint is calculated using a hash algorithm. The data fingerprint, timestamp, and unique water meter identifier are then packaged into a storage unit and uploaded to the consortium blockchain network. The specific steps include the following: S401, Using a temporary session key via TLS 1.3 protocol Decrypt data packets Restore SM4 ciphertext ; S402, Retrieve the SM4 encryption key via the water meter hardware security module (HSM) ,right Perform ECB mode decryption to restore the original data packet. ; S403, Decrypt the data packet Perform hash fingerprint comparison and calculate the local hash value using the SM3 algorithm. SM3 ( The hash value H(t) carried in the data packet is compared with the original hash value H(t). If they do not match, a tampering alarm is triggered. S404, Pass the verified data packet Encapsulated as a proof unit Uploaded to the consortium blockchain network.
[0024] Based on the stored data, pre-designed pricing rules are invoked, including tiered water pricing, peak-valley time-of-use pricing, and seasonal pricing. The total cost is automatically calculated via smart contracts, and the result is written to the distributed ledger. Specifically, this includes: When deploying smart contracts in a distributed ledger, the contract rules include the following set of billing rule parameters: Tiered water pricing rules: Three-tier threshold Q0=0m 3 Q1=15m 3 Q2=25m 3 The corresponding water price is P1 = 2.5 yuan / m³. 3 P2 = 3.5 yuan / m 3 P3 = 5.0 yuan / m 3 ; Peak-valley time-sharing rules: Peak period t peak =7:00 9:00, 17:00 21:00, corresponding electricity price coefficient k peak =1.5, Pinggu period k flat =1.0; Seasonal price adjustment rules: Price adjustment coefficient for summer (June-August) summer =0.2, winter (December-February) winter =0.1, spring and autumn season =0.05; Query the evidence storage unit from the consortium blockchain via the smart contract interface. After verifying the consistency between the data fingerprint H(t) and the locally calculated value, the data is decompressed to obtain the water consumption Q(t), timestamp t, and water meter identifier ID. Calculating costs for executing multiple rules: The tiered water pricing is as follows: ,in, =Q(t), when Q(t)>Q2, the excess portion is charged according to P3; Peak-valley time-sharing fees: ( t ),in, ( t )=k peak When t∈k peak ,otherwise ( t )=k flat ; Seasonal price adjustment fees: ,in, The value is dynamically determined based on the month of the timestamp t; Get total cost = + + The fee record R(t) is generated through a smart contract = { ,t,ID,Sig}, whereSig is the digital signature of the water authority; R(t) is encapsulated into a transaction data packet and written into the distributed ledger after PBFT consensus.
[0025] The base water price is dynamically adjusted based on local water supply costs. The adjustment formula is as follows: ; In the formula, =0.7 is the adjustment factor. The percentage change in water supply costs (%).
[0026] The seasonal price adjustment factor has the following dynamic value selection rules: When the month m of timestamp t ∈ {6, 7, 8}, α = 0.2; When m∈{12, 1, 2}, α=0.1; Otherwise, α = 0.05.
[0027] In a second aspect of the present invention, a reliable data storage and distributed billing system for smart water meters is also provided, the system 500 comprising: The data acquisition module 510 is used to collect water consumption data, ambient temperature and water quality parameters in real time through the high-precision sensor built into the smart water meter, and to filter and denoise the raw data to generate structured data packets. The encrypted transmission module 520 is used to symmetrically encrypt data packets using the national cryptographic algorithm, then encrypt the ciphertext a second time using the transport layer security protocol, and transmit the encrypted data to the distributed nodes through the low power wide area network protocol. The verification and packaging module 530 is used to decrypt the received encrypted data to verify its integrity, calculate the data fingerprint through a hash algorithm, and package the data fingerprint, timestamp, and water meter unique identifier into a storage unit and upload it to the consortium blockchain network. The total water fee calculation module 540 is used to call pre-designed fee rules based on the stored data, including tiered water pricing, peak-valley time-of-use pricing, and seasonal price adjustments. It automatically calculates the total fee through smart contracts and writes the results into the distributed ledger. The payment module 550 is used to select prepaid or postpaid based on the user's mode, trigger corresponding control instructions or credit assessments, complete the fee settlement and synchronize it to the fiscal non-tax system to generate electronic invoices.
[0028] In a third aspect of the invention, an electronic device is also provided. The electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform the method of the first aspect of the invention.
[0029] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for trusted storage and distributed billing of smart water meter metering data, characterized by: include: The smart water meter uses a built-in high-precision sensor to collect water consumption data, ambient temperature and water quality parameters in real time. The raw data is then filtered and denoised to generate a structured data package. The data packets are symmetrically encrypted using the national cryptographic algorithm, and then the ciphertext is encrypted a second time using the transport layer security protocol. The encrypted data is then transmitted to the distributed nodes using a low-power wide area network protocol. After decrypting the received encrypted data, its integrity is verified. The data fingerprint is calculated using a hash algorithm. The data fingerprint, timestamp, and water meter's unique identifier are packaged into a storage unit and uploaded to the consortium blockchain network. Based on the stored data, the pre-designed fee rules are invoked, including tiered water pricing, peak-valley time-of-use pricing, and seasonal price adjustments. The total fee is automatically calculated through smart contracts, and the results are written into the distributed ledger. Based on the user's choice of prepaid or postpaid mode, the system triggers corresponding control instructions or credit assessments, completes the fee settlement, synchronizes it to the fiscal non-tax system, and generates an electronic invoice.
2. The method for trusted storage and distributed billing of smart water meter metering data according to claim 1, characterized in that: The smart water meter uses a built-in high-precision sensor to collect real-time water consumption data, ambient temperature, and water quality parameters. The raw data is then filtered and denoised to generate a structured data package. The specific steps include: The smart water meter is equipped with a high-precision flow sensor, a temperature sensor, and a water quality monitoring sensor, and the high-precision flow sensor is a Coriolis flow sensor. The data collection frequency is adjusted according to the water usage period. During the peak period from 6:00 to 22:00, the sampling frequency of the high-precision flow sensor is 1Hz, and the sampling frequency of the temperature sensor and water quality monitoring sensor is 0.2Hz, so as to obtain water consumption data, temperature data and water quality parameters and form raw data. The raw data is processed, and the processed data is packaged into a JSON format data packet; The processing of the raw data specifically includes: A five-point cubic smoothing algorithm was used to smooth the water consumption data. The formula is as follows: ; in, Here is the raw water consumption data at time t. This is the filtered value; A first-order low-pass filter with a cutoff frequency of 0.5Hz is applied to the temperature data. The transfer function is: ; in, =0.318, It is a time constant; The median value filtering method was used to analyze the water quality data, and the median value was taken from five consecutive data points.
3. The method for trusted storage and distributed billing of smart water meter metering data according to claim 2, characterized in that: The Coriolis flow sensor has two built-in vibrating tubes. It calculates the mass flow rate by detecting the phase difference caused by the Coriolis force. The formula is: ; in, For quality flow, For sensor coefficients, For phase difference, The frequency is the vibration frequency.
4. The method for trusted storage and distributed billing of smart water meter metering data according to claim 3, characterized in that: The process of symmetrically encrypting data packets using Chinese national cryptographic algorithms, then further encrypting the ciphertext using a transport layer security protocol, and finally transmitting the encrypted data to distributed nodes via a low-power wide area network protocol includes the following steps: Data packets are processed using the SM4 national cryptographic algorithm. Perform ECB mode encryption to generate ciphertext. Among them, encryption key The key is generated and stored through the water meter hardware security module. The key length is 128 bits and the initialization vector (IV) is an all-zero vector. Ciphertext via TLS 1.3 protocol Secondary encryption is performed, and an elliptic curve Diffie-Hellman key exchange algorithm is used to generate a temporary session key. The encryption process satisfies: ; in, Valid for 24 hours; Double-encrypt data It is encapsulated into a physical layer frame conforming to the LPWAN standard and transmitted to distributed nodes via NB-IoT or LoRa protocol.
5. The method for trusted storage and distributed billing of smart water meter metering data according to claim 4, characterized in that: After decrypting the received encrypted data, its integrity is verified. A data fingerprint is calculated using a hash algorithm. The data fingerprint, timestamp, and unique water meter identifier are packaged into a storage unit and uploaded to the consortium blockchain network. The specific steps include the following: Using temporary session keys via TLS 1.3 protocol Decrypt data packets Restore SM4 ciphertext ; Retrieve the SM4 encryption key via the water meter hardware security module (HSM) ,right Perform ECB mode decryption to restore the original data packet. ; Decrypted data packets Perform hash fingerprint comparison and calculate the local hash value using the SM3 algorithm. SM3 ( The hash value H(t) carried in the data packet is compared with the original hash value H(t). If they do not match, a tampering alarm is triggered. The verified data packet Encapsulated as a proof unit Uploaded to the consortium blockchain network.
6. The method for trusted storage and distributed billing of smart water meter metering data according to claim 5, characterized in that: Based on the stored data, pre-designed pricing rules are invoked, including tiered water pricing, peak-valley time-of-use pricing, and seasonal pricing. The total cost is automatically calculated via smart contracts, and the result is written to the distributed ledger. Specifically, this includes: When deploying smart contracts in a distributed ledger, the contract rules include the following set of billing rule parameters: Tiered water pricing rules: Three-tier threshold Q0=0m 3 Q1=15m 3 Q2=25m 3 The corresponding water price is P1 = 2.5 yuan / m³. 3 P2 = 3.5 yuan / m 3 P3 = 5.0 yuan / m 3 ; Peak-valley time-sharing rules: Peak period t peak =7:00 9:00, 17:00 21:00, corresponding electricity price coefficient k peak =1.5, Pinggu period k flat =1.0; Seasonal price adjustment rules: Price adjustment coefficient for summer (June-August) summer =0.2, winter (December-February) winter =0.1, spring and autumn season =0.05; Query the evidence storage unit from the consortium blockchain via the smart contract interface. After verifying the consistency between the data fingerprint H(t) and the locally calculated value, the data is decompressed to obtain the water consumption Q(t), timestamp t, and water meter identifier ID. Calculating costs for executing multiple rules: The tiered water pricing is as follows: ,in, =Q(t), when Q(t)>Q2, the excess portion is charged according to P3; Peak-valley time-sharing fees: ,in, ( t )=k peak When t∈k peak ,otherwise ( t )=k flat ; Seasonal price adjustment fees: ,in, The value is dynamically determined based on the month of the timestamp t; Get total cost = + + The fee record R(t) is generated through a smart contract = { ,t,ID,Sig}, whereSig is the digital signature of the water authority; R(t) is encapsulated into a transaction data packet and written into the distributed ledger after PBFT consensus.
7. The method for trusted storage and distributed billing of smart water meter metering data according to claim 6, characterized in that: The The base water price is dynamically adjusted based on local water supply costs. The adjustment formula is as follows: ; In the formula, =0.7 is the adjustment factor. The percentage change in water supply costs (%).
8. The method for trusted storage and distributed billing of smart water meter metering data according to claim 7, characterized in that: The The seasonal price adjustment factor has the following dynamic value selection rules: When the month m of timestamp t ∈ {6, 7, 8}, α = 0.2; When m∈{12, 1, 2}, α=0.1; Otherwise, α = 0.
05.
9. A system for trusted storage and distributed billing of smart water meter metering data, used to implement the method for trusted storage and distributed billing of smart water meter metering data as described in any one of claims 1-8, characterized in that: include: The data acquisition module is used to collect water consumption data, ambient temperature and water quality parameters in real time through the high-precision sensor built into the smart water meter, and to filter and denoise the raw data to generate structured data packets. An encrypted transmission module is used to symmetrically encrypt data packets using Chinese cryptographic algorithms, then encrypt the ciphertext a second time using a transport layer security protocol, and transmit the encrypted data to distributed nodes using a low-power wide area network protocol. The verification and packaging module is used to decrypt the received encrypted data to verify its integrity, calculate the data fingerprint through a hash algorithm, and package the data fingerprint, timestamp, and water meter unique identifier into a storage unit and upload it to the consortium blockchain network. The total water fee calculation module is used to call pre-designed fee rules based on the stored data, including tiered water pricing, peak-valley time-of-use pricing, and seasonal price adjustments. It automatically calculates the total fee through smart contracts and writes the results into a distributed ledger. The payment module is used to select prepaid or postpaid according to the user's mode, trigger corresponding control instructions or credit assessment, complete the fee settlement and synchronize it to the fiscal non-tax system, and generate an electronic invoice.
10. An electronic device comprising at least one processor; and a memory communicatively connected to said at least one processor; characterized in that: The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.