Internet of Things meter measurement data tamper-proofing system and method based on block chain
Through a blockchain-based IoT metering data anti-tampering system, combined with dynamic encryption, lightweight consensus mechanisms and smart contracts, the problem of insufficient protection against physical attacks of metrology devices and software-level network attacks in the existing technology is solved, and high data security and reliability are achieved.
Patent Information
- Application Number
- CN202510487699.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-05-16
AI Technical Summary
When preventing power metering data tampering, the prior art has insufficient protection against physical attacks of metrology equipment and software-level network attacks, resulting in insufficient data tampering capability.
The blockchain-based IoT metering data anti-tampering system is adopted to verify and store gas and water meter data through dynamic encryption and lightweight consensus mechanisms, and combine smart contracts and sensors to monitor real-time to achieve multi-dimensional protection for physical and network attacks.
It significantly improves the security and reliability of IoT metering data, realizes data authenticity guarantee, traceability of attack behavior and system self-repair capabilities, and prevents data tampering and attack tracing.
Smart Images

Figure CN120017991A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data tamper-proofing, and more specifically, to a blockchain-based IoT meter data tamper-proofing system and method. Background Art
[0002] The Chinese patent application with publication number CN115378642A discloses a blockchain-based power metering data source tamper-proof verification system and method; obtains power metering data in the user system and its encrypted hash string through a data interface; authenticates power metering data based on hash string and blockchain consensus authentication mechanism; responds to the signal that the power metering data authentication passes, performs on-chain distributed storage on the application blockchain, otherwise no processing; performs anti-tampering verification on the power metering data that has been on-chain distributed storage; responds to the signal that the power metering data anti-tampering verification fails, issues an alarm message that the power metering data has been tampered with, otherwise no processing. This invention uses the encrypted hash string of the power metering data to authenticate the power metering data on the chain and the on-chain anti-tampering verification, prevents the risk of tampering of the power consumption data collected by the meter, improves the credibility and tamper-proofness of the power metering data, and can meet the needs of the deepening development of the future power market.
[0003] Although the above method can meet most scenarios, research and practical application of the above method and existing technology have found that the above method and existing technology have at least the following defects:
[0004] The anti-tampering technology of traditional electricity meters may also only target a single attack dimension. For example, it focuses on preventing data tampering during transmission while ignoring the protection of the metering equipment itself from physical attacks, or only implements anti-dismantling design at the hardware level, but lacks protection against network attacks at the software level.
[0005] In view of this, the present invention proposes a blockchain-based IoT meter data tamper-proof system and method to solve the above problems. Summary of the invention
[0006] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solutions:
[0007] The method for preventing tampering of IoT meter data based on blockchain includes the following steps:
[0008] Collect gas data and water meter data; gas data includes gas flow and gas safety data; water meter data includes water flow and water safety data;
[0009] Dynamically encrypt the gas data and water meter data to obtain gas ciphertext data and water meter ciphertext data; the gas ciphertext data includes gas flow ciphertext and gas safety ciphertext; the water meter ciphertext data includes water flow ciphertext and water safety ciphertext;
[0010] The gas ciphertext data and water meter ciphertext data are classified by category, and the gas ciphertext data and water meter ciphertext data are verified based on the lightweight consensus mechanism. The verified gas ciphertext data and water meter ciphertext data are written into the corresponding chain of the blockchain according to the category;
[0011] The blockchain decrypts and detects the gas safety ciphertext. When it detects that the gas safety data is not 0, it drives the smart contract of the gas meter to respond to the attack. The blockchain decrypts and detects the water meter safety ciphertext. When it detects that the water safety data is not 0, it drives the smart contract of the water meter to respond to the attack.
[0012] Dynamically update the key in the dynamic encryption process according to the preset update time, and dynamically update the key by linking the gas safety data and water safety data;
[0013] The attack source is traced for the entire transmission process of gas data and water meter data, and the attack tracing results are reported.
[0014] Furthermore, the method of obtaining the gas flow ciphertext includes:
[0015] Encrypt the gas flow based on the SM2 elliptic curve equation; obtain the order of a base point on the SM2 elliptic curve ;from Randomly select the private key of user A and obtain the public key corresponding to user A; Randomly select the private key of user B and obtain the public key corresponding to user B;
[0016] User A and User B get the current timestamp , user A randomly selects a random number , calculate the temporary public key of user A; for the timestamp Perform a hash operation to obtain a time hash value, concatenate user A's temporary public key with the time hash value, and then perform a hash operation to obtain user A's hash value; and send user A's temporary public key and user A's hash value to user B;
[0017] User B randomly selects a random number , calculate the temporary public key of user B, and send the temporary public key of user B to user A; concatenate the temporary public key of user B with the time hash value, and then perform a hash operation to obtain the hash value of user B; and send the temporary public key of user B and the hash value of user B to user A;
[0018] User A calculates the midpoint based on user A's private key, user B's public key, and the temporary public key ;
[0019] User B calculates the midpoint based on user B's private key, user A's public key and the temporary public key ; According to the properties of the elliptic curve, ;
[0020] User A and user B both concatenate the coordinates of the middle point with the hash value received from the other party;
[0021] Use a hash function to process the concatenation result and obtain a session key;
[0022] Pick a random number , calculate the temporary public key; obtain the first ciphertext; calculate the corresponding intermediate point; generate the key ;
[0023] Use the generated key Combined with the session key to obtain the final encryption key;
[0024] Perform an XOR operation on the gas flow and the final encryption key to obtain a second ciphertext; calculate to obtain a third ciphertext; and concatenate the first ciphertext, the second ciphertext, and the third ciphertext to obtain a gas flow ciphertext.
[0025] Furthermore, the method of obtaining the water flow ciphertext includes:
[0026] Choose two large prime numbers and ,and ;
[0027] calculate and The product of and The least common multiple of ;
[0028] according to and Generate Public Key and private key ,in, is the public key parameter that satisfies the constraints, The private key parameters that satisfy the constraints; is the public key parameter; is the least common multiple;
[0029] The water meter data and the timestamp are concatenated to obtain updated water meter data;
[0030] Using Public Key The updated water meter data is encrypted to obtain the water flow ciphertext.
[0031] Furthermore, the gas safety data includes magnetic field interference data and illegal disassembly data outside the gas meter, and the method for obtaining the magnetic field interference data includes:
[0032] The environmental magnetic field strength outside the gas meter is collected by integrating a magnetic field strength sensor in the gas meter, and the collected environmental magnetic field strength is compared with a preset environmental magnetic field strength threshold. When the environmental magnetic field strength is higher than the preset environmental magnetic field strength threshold, it is judged that there is external magnetic field interference, and the magnetic field interference data with a value of 1 is obtained, otherwise the magnetic field interference data with a value of 0 is obtained;
[0033] Methods of obtaining illegal disassembly data include:
[0034] The status data of the illegal disassembly of the gas meter casing is collected through the pressure switch. When the gas meter casing is illegally disassembled, the status data is 1, otherwise it is 0, and the status data is regarded as illegal disassembly data;
[0035] Methods for obtaining water safety data include:
[0036] The normal water supply direction is set to the positive direction, and the non-water supply direction is set to the reverse direction. The water flow direction is obtained by the rotation direction of the non-magnetic turntable. When the water flow direction is in the positive direction, the water flow direction data is set to 1, otherwise the water flow direction data is set to 0, and the water flow direction data is used as water safety data.
[0037] Furthermore, the method of driving the smart contract of the gas meter to respond to the attack includes:
[0038] Step 1: Freeze the corresponding user account and suspend the recharge function;
[0039] Step 2: Generate a physical tampering evidence package by combining gas flow, timestamp and operator ID, store it in IPFS and return the content identifier to the blockchain;
[0040] Step 3: Trigger the edge computing node to start the backup communication channel;
[0041] Methods to drive the water meter’s smart contract to respond to attacks include:
[0042] Step A: Send a work order requesting on-site inspection to the water management platform;
[0043] Step B: If no manual confirmation signal is received within the preset waiting time, the corresponding water meter is marked as a high-risk device.
[0044] Furthermore, the method for verifying the gas ciphertext data based on the lightweight consensus mechanism includes:
[0045] The node applies for registration, Verification nodes form a verification alliance; each node in the verification alliance has a unique identity ID and verification node authority, and the public key and identity ID of each node are recorded in the blockchain;
[0046] A transaction is created by the participants of the gas transaction , and create a transaction The party participating in the transaction is recorded as the transaction initiator;
[0047] The transaction initiator uses his own private key to Sign the transaction and send it to Broadcast to the blockchain network;
[0048] Verify that each node in the alliance receives the broadcasted signed transaction After that, use the public key of the transaction initiator to The signature is verified. When each node completes the transaction After verification, the verification results of all nodes are broadcast to the blockchain network;
[0049] Collect the verification results of all nodes, count the number of nodes that have passed the verification, and compare it with the preset node number threshold. When the number of nodes that have passed the verification exceeds the preset node number threshold, the transaction will be Mark as confirmed, otherwise the transaction Marked as failed.
[0050] Furthermore, the method for verifying the water meter ciphertext data based on the lightweight consensus mechanism includes:
[0051] The water meter data transmission link is composed of a distributed network with U consensus nodes participating in the consensus, and the master consensus node is preset. , initialize the historical behavior evaluation value and voting weight for each consensus node;
[0052] Consensus Node Collect water meter ciphertext data and send it to other consensus nodes for consensus at preset collection time intervals;
[0053] In each consensus process, other consensus nodes monitor the behavior of
[0054] According to the monitoring results, consensus nodes Update the historical behavior evaluation value;
[0055] According to the updated consensus node The historical behavior evaluation value of the consensus node is calculated using the weight adjustment function voting weight;
[0056] Master consensus node After receiving the client's request, a sequence number is assigned to the request , and broadcast the pre-prepared message to other consensus nodes. The pre-prepared message includes the sequence number, the content of the request, the requester and the corresponding water meter ciphertext data. After receiving the pre-prepared message, other consensus nodes check whether their voting weight is higher than the preset weight threshold. If it is higher than the preset weight threshold, they participate in the consensus process, otherwise they do not participate;
[0057] If the consensus node Participate in the consensus process and broadcast the preparation message to other consensus nodes; the preparation message includes the sequence number, the content of the request and the identity of the consensus node ;
[0058] Consensus Node Collect the preparation messages of other consensus nodes. When the total voting weight of the collected preparation messages exceeds the preset threshold, the consensus node Enter the next stage;
[0059] Consensus Node Broadcast submission message to other consensus nodes, submission message includes the total voting weight, sequence number, request content and consensus node identification ;
[0060] When the total voting weight of the collected submission messages exceeds the preset submission threshold, the consensus node Execute the request and return the result to the client.
[0061] Furthermore, the method for dynamically updating the key in the dynamic encryption process includes:
[0062] Obtain a global unified timestamp through the oracle, and obtain the expiration time corresponding to the key according to the key rotation cycle;
[0063] The smart contract checks the validity period of the key at preset intervals. The validity period of the key is the current time plus the key rotation period. When the current time reaches or exceeds the expiration time of the key, the key is automatically updated;
[0064] Generate a new key by combining the timestamp corresponding to the current time through dynamic encryption method; store the new key in the blockchain and mark the original key as invalid;
[0065] Record all key updates through blockchain event logs;
[0066] The new key is encrypted and stored in IPFS, and the storage address is written to the blockchain.
[0067] Furthermore, the method of dynamically updating the key by linking the gas safety data and the water safety data includes:
[0068] Detect magnetic field interference data, illegal disassembly data and water flow direction data. When it is checked that the value of the magnetic field interference data or the illegal disassembly data is not 0, revoke all the keys corresponding to the corresponding gas meter at the current time, and dynamically update the keys of the gas meter according to the current time; when it is checked that the value of the water flow direction data is not 0, revoke all the keys corresponding to the corresponding water meter at the current time, and dynamically update the keys of the water meter according to the current time.
[0069] Furthermore, the method of tracing the attack source of the entire process of gas data transmission includes:
[0070] A traceability quintuple of gas data is established, which includes: equipment, operator, sensor status, geographic location, and timestamp. When a gas meter is detected to be under attack, the attack is traced through the blockchain browser combined with the traceability quintuple.
[0071] Furthermore, the method of tracing the attack source of the entire process of water meter data transmission includes:
[0072] Use a hash function to perform a hash operation on the water flow data to obtain a data hash value of a fixed length;
[0073] Convert water flow data and related verification logic into a circuit form of a preset zero-knowledge proof scheme;
[0074] The prover generates a zero-knowledge proof using the zero-knowledge proof algorithm in the preset zero-knowledge proof scheme according to the parameters and circuit of the preset zero-knowledge proof scheme;
[0075] The verifier receives the zero-knowledge proof and the data hash from the prover;
[0076] The verifier verifies the zero-knowledge proof using the received information and the verification procedure of the zero-knowledge proof algorithm; the verifier verifies the consistency of the data through the data hash value;
[0077] Based on the verification results of the zero-knowledge proof and the verification results of the data consistency, the verifier makes the final decision.
[0078] The blockchain-based IoT meter data tamper-proof system is used to implement the blockchain-based IoT meter data tamper-proof method, including:
[0079] Data acquisition module: collects gas data and water meter data; gas data includes gas flow and gas safety data; water meter data includes water flow and water safety data;
[0080] Data encryption module: dynamically encrypt gas data and water meter data to obtain gas ciphertext data and water meter ciphertext data; gas ciphertext data includes gas flow ciphertext and gas safety ciphertext; water meter ciphertext data includes water flow ciphertext and water safety ciphertext;
[0081] Verification and on-chain module: Classify gas ciphertext data and water meter ciphertext data by category, verify gas ciphertext data and water meter ciphertext data based on a lightweight consensus mechanism, and write the verified gas ciphertext data and water meter ciphertext data into the corresponding chain of the blockchain according to category;
[0082] Attack response module: The blockchain decrypts and detects the gas safety ciphertext. When it detects that the gas safety data is not 0, it drives the smart contract of the gas meter to respond to the attack. The blockchain decrypts and detects the water meter safety ciphertext. When it detects that the water safety data is not 0, it drives the smart contract of the water meter to respond to the attack.
[0083] Key update module: dynamically updates the key in the dynamic encryption process according to the preset update time, and dynamically updates the key in conjunction with gas safety data and water safety data;
[0084] Attack tracing module: traces the attack source of the entire transmission process of gas data and water meter data, and reports the attack tracing results.
[0085] The technical effects and advantages of the blockchain-based IoT meter data tamper-proof system and method of the present invention are as follows:
[0086] The blockchain-based IoT meter data tamper-proof system and method of the present invention monitors the physical environment and network status of the gas meter in real time through IoT sensors, and combines the asymmetric encryption, consensus mechanism and distributed storage of blockchain to build a multi-dimensional protection system covering physical attacks and network attacks; the sensor collects device status data in real time and triggers an early warning, and the blockchain solidifies the data hash value, timestamp and device status on the chain to ensure that the entire link from data collection to storage cannot be tampered with; at the same time, the smart contract automatically verifies data consistency, triggers an automated response to abnormal behavior, and synchronizes the attack event hash value on the chain for evidence, forming a closed-loop defense, which solves the limitations of traditional single-dimensional protection, and also through the transparency of the blockchain and the real-time perception capability of the sensor, realizes the authenticity of the gas data, the traceability of the attack behavior and the self-repair capability of the system, significantly improving the security and reliability of the IoT meter data. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 This is a schematic diagram of a method for preventing tampering of IoT meter data based on blockchain according to Embodiment 1 of the present invention;
[0088] Figure 2This is a schematic diagram of a method for preventing tampering of IoT meter data based on blockchain according to Embodiment 2 of the present invention;
[0089] Figure 3 This is a block diagram of an IoT meter data tamper-proof system based on blockchain according to Embodiment 3 of the present invention;
[0090] Figure 4 This is a schematic diagram of the interface of the blockchain-based IoT meter data tamper-proof system according to Example 3 of the present invention. DETAILED DESCRIPTION
[0091] 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.
[0092] Example 1
[0093] See also Figure 1 As shown, the blockchain-based IoT meter data tamper-proof method described in this embodiment includes the following steps:
[0094] Collect gas data and water meter data; gas data includes gas flow and gas safety data; gas safety data includes magnetic field interference data outside the gas meter and illegal disassembly data; gas flow is obtained by reading the data displayed in the gas meter. Accurately collect gas flow data and prevent tampering to ensure that the billing basis is authentic and reliable, and avoid economic disputes caused by data tampering. Monitor the external magnetic field environment of the gas meter. If abnormal interference is detected, malicious attacks (such as tampering with metering data through strong magnetic fields) can be quickly identified and blocked to ensure data integrity. Through physical state perception (such as sensor triggering), it is recorded in real time whether the gas meter has been illegally disassembled to prevent attackers from directly tampering with data or falsifying operating status by destroying the equipment.
[0095] Methods for obtaining magnetic field disturbance data include:
[0096] The ambient magnetic field strength outside the gas meter is collected by integrating a magnetic field strength sensor in the gas meter, and the collected ambient magnetic field strength is compared with a preset ambient magnetic field strength threshold. When the ambient magnetic field strength is higher than the preset ambient magnetic field strength threshold, it is judged that there is external magnetic field interference and a magnetic field interference data with a value of 1 is obtained, otherwise a magnetic field interference data with a value of 0 is obtained.
[0097] Methods of obtaining illegal disassembly data include:
[0098] The status data of the illegal disassembly of the gas meter casing is collected through the pressure switch. When the gas meter casing is illegally disassembled, the status data is 1, otherwise it is 0, and the status data is used as illegal disassembly data.
[0099] Water meter data includes water flow and water safety data; water flow is obtained by reading the data displayed on the water meter; collecting water flow can directly reflect the user's water usage, ensure accurate water resource measurement, and avoid economic disputes caused by data tampering; water safety data can monitor the direction of water flow, and detect abnormal operations such as backflow (such as water theft, equipment failure) in real time, trigger anti-tampering mechanisms (such as closing valves, recording events), and store water flow direction data and hash values on the chain. Combined with timestamps and digital signatures, it can ensure that the data source is traceable, the operation is irreversible, and resist tampering attacks.
[0100] Methods for obtaining water safety data include:
[0101] The normal water supply direction is set to the positive direction, and the non-water supply direction is set to the reverse direction. The water flow direction is obtained by the rotation direction of the non-magnetic turntable. When the water flow direction is in the positive direction, the water flow direction data is set to 1, otherwise the water flow direction data is set to 0, and the water flow direction data is used as water safety data.
[0102] Dynamically encrypt the gas data and water meter data to obtain gas ciphertext data and water meter ciphertext data; the gas ciphertext data includes gas flow ciphertext and gas safety ciphertext; the water meter ciphertext data includes water flow ciphertext and water safety ciphertext;
[0103] In the gas data, the method for obtaining the gas flow ciphertext and the gas safety ciphertext is the same, wherein the method for obtaining the gas flow ciphertext includes:
[0104] Based on SM2 elliptic curve equation Encrypt the gas flow; and are the x-axis and y-axis coordinates of a point on the SM2 elliptic curve equation; is the coefficient of the SM2 elliptic curve equation and satisfies , A large prime number is a prime number with a binary length of at least 2048 bits. It is a modulo operation, i.e., remainder operation; For the SM2 elliptic curve equation in a finite field The set of points on ; is a base point on the SM2 elliptic curve, and the order of the base point is , is a prime number and satisfies , is a point at infinity on the elliptic curve; Randomly select the private key of user A , get the public key corresponding to user A ;in, The public key corresponding to user A The coordinates of Randomly select the private key of user B , get the public key corresponding to user B ;in, The public key corresponding to user B The coordinates of
[0105] User A and User B get the current timestamp , user A randomly selects a random number , calculate the temporary public key ;in, Temporary public key The coordinates of Perform hash operation to obtain time hash value ,Will Coordinates and Perform splicing to obtain user A's splicing value ,in, Indicates string concatenation; then perform hash operation to obtain the hash value of user A ; and and Sent to user B; is a hash function;
[0106] User B randomly selects a random number , calculate the temporary public key , and Sent to user A; Temporary public key The coordinates of Perform hash operation to obtain time hash value ,Will Coordinates and Perform splicing to obtain the splicing value of user B ,right Perform hash operation to obtain the hash value of user B ; and and Send to user A;
[0107] User A calculates the middle point ;set up ;in, The middle point The coordinates of
[0108] User B calculates the middle point ;set up ;in, The middle point The coordinates of ;
[0109] User A and user B both send the coordinates of the middle point ( or ) and the received hash value of the other party ( or ) to splice and get the splicing result or ;in, Indicates string concatenation;
[0110] Use hash function to concatenate the results Process and obtain the session key ;in, is a hash function;
[0111] Pick a random number , calculate the temporary public key ,in, Temporary public key The coordinates of; get the first ciphertext ;in, Indicates string concatenation; calculates the corresponding middle point ;in, is the recipient's public key; The middle point Coordinates of; Generate a key ;in, is a hash function;
[0112] Use the generated key With session key Combine to get the final encryption key ;in, is an XOR operation;
[0113] Gas flow XOR operation is performed with the final encryption key to obtain the second ciphertext ; Calculate the third ciphertext ; Concatenate the first ciphertext, the second ciphertext and the third ciphertext to obtain the gas flow ciphertext ;in, Represents string concatenation.
[0114] Based on the SM2 elliptic curve equation combined with the timestamp to generate session keys, the ciphertext can be generated for the IoT meter metering data encryption. Different session keys are generated at different times to effectively prevent data from being stolen during transmission and storage, and to ensure that the data is not illegally viewed. The security of the SM2 elliptic curve equation and the uniqueness of the timestamp make the generated ciphertext tamper-proof. Once the data is tampered with, errors will occur when the ciphertext is decrypted, and the recipient can discover them in time to ensure the authenticity and accuracy of the metering data; the introduction of the timestamp adds a time dimension to the data, which can trace the source and operation time of the data, which helps to quickly locate and solve problems when they occur, and improve the security and reliability of the IoT metering system.
[0115] In the water meter data, the method for obtaining the water flow ciphertext and the water security ciphertext is the same, wherein the method for obtaining the water flow ciphertext includes:
[0116] Choose two large prime numbers and ,and ;
[0117] calculate and ,in, It represents the function of finding the least common multiple; is the public key parameter; is the least common multiple.
[0118] according to and Generate Public Key and private key ,in, is the public key parameter that satisfies the constraints, satisfy ,in, is the operation function, ; To find the greatest common divisor function, ;in, Is the private key parameter; is the operation modulus;
[0119] Water meter data with timestamp Perform splicing to obtain updated water meter data ;in, is the water meter data;
[0120] Using Public Key Encrypt water meter data to obtain water flow ciphertext ;in, A cryptographic random number.
[0121] Homomorphic encryption allows data to be processed in ciphertext without leaking the plaintext of water meter data, preventing attackers from stealing or tampering with data and ensuring data privacy. For example, during data transmission and storage, attackers cannot directly obtain and tamper with encrypted water meter data. Encrypted water meter data has unique ciphertext features. Once the data is tampered with, the ciphertext features will change, and the decrypted data will be wrong. This feature enables the system to detect whether the data has been tampered with in a timely manner, ensuring the integrity of the IoT meter data.
[0122] Classify gas ciphertext data and water meter ciphertext data by category (such as flow data and security event data), verify gas ciphertext data and water meter ciphertext data based on a lightweight consensus mechanism, and write the verified gas ciphertext data and water meter ciphertext data into the corresponding chain of the blockchain according to the category;
[0123] Methods for verifying gas ciphertext data based on a lightweight consensus mechanism include:
[0124] Gas companies, regulatory agencies, and third-party auditors apply for registration. Verification nodes form a verification alliance; each node in the verification alliance has a unique identity ID and verification node authority, and the public key and identity ID of each node are recorded in the blockchain;
[0125] A transaction is created by the participants of the gas transaction (such as gas suppliers and users) , and create a transaction The party participating in the transaction is recorded as the transaction initiator;
[0126] The transaction initiator uses his own private key to Sign the transaction and send it to Broadcast to the blockchain network;
[0127] Verify that each node in the alliance receives the broadcasted signed transaction After that, use the public key of the transaction initiator to The signature is verified. When each node completes the transaction After verification, the verification results of all nodes are broadcast to the blockchain network;
[0128] Collect the verification results of all nodes, count the number of nodes that have passed the verification, and compare it with the preset node number threshold. When the number of nodes that have passed the verification exceeds the preset node number threshold, the transaction will be Mark as confirmed, otherwise the transaction Marked as failed.
[0129] Based on the lightweight consensus mechanism, gas ciphertext verification quickly verifies data hash values or signatures through multiple nodes to ensure that the ciphertext has not been tampered with during transmission and storage. At the same time, the consensus results are stored on the chain to form an unalterable audit log. Combined with timestamps and digital signatures, full life cycle traceability is achieved, which not only meets the low power consumption and high timeliness requirements of IoT devices, but also resists single-point attacks through a distributed verification mechanism, ultimately achieving the authenticity and tamper-proof goals of gas flow.
[0130] Methods for verifying water meter ciphertext data based on lightweight consensus mechanisms include:
[0131] The water meter data transmission link is composed of a distributed network with U consensus nodes participating in the consensus, and the master consensus node is preset. , initialize the historical behavior evaluation value and voting weight for each consensus node;
[0132] Consensus Node Collect water meter ciphertext data and send it to other consensus nodes for consensus at preset collection time intervals;
[0133] In each consensus process, other consensus nodes The behavior of consensus nodes is monitored; Monitor whether messages are sent on time, whether the messages sent comply with protocol specifications, and whether the water flow data provided is reasonable;
[0134] According to the monitoring results, consensus nodes Historical behavior evaluation value to be updated; for example, if the consensus node Completing a consensus process on time and correctly can increase the historical behavior evaluation value: ;in, To increase the updated historical behavior evaluation value; is the reward value for correct behavior; if the consensus node If abnormal behavior occurs (such as sending error messages, not responding on time, etc.), the historical behavior evaluation value will be reduced. ;in, To reduce the updated historical behavior evaluation value; Penalty value for wrong behavior;
[0135] According to the updated consensus node Historical behavior evaluation value , using the weight adjustment function to calculate the consensus node Voting weight ,in, represents the weight adjustment function;
[0136] Master consensus node After receiving the client's request, a sequence number is assigned to the request , and broadcast the pre-prepared message to other consensus nodes. The pre-prepared message includes the sequence number, the content of the request, the requester and the corresponding water meter ciphertext data. After receiving the pre-prepared message, other consensus nodes detect their own voting weights Is it higher than the preset weight threshold? If so, it participates in the consensus process, otherwise it does not participate;
[0137] If the consensus node Participate in the consensus process and broadcast the preparation message to other consensus nodes; the preparation message includes the sequence number, the content of the request and the identity of the consensus node ;
[0138] Consensus Node Collect the preparation messages from other consensus nodes. When the total voting weight of the collected preparation messages exceeds the preset threshold (for example, 2 / 3 of the total voting weight), the consensus node Enter the next stage;
[0139] Consensus Node Broadcast submission message to other consensus nodes, submission message includes the total voting weight, sequence number, request content and consensus node identification ;
[0140] When the total voting weight of the collected submission messages exceeds the preset submission threshold, the consensus node Execute the request and return the result to the client.
[0141] The water meter ciphertext verification based on the lightweight consensus mechanism quickly verifies the data hash value or signature through multiple nodes to ensure that the ciphertext has not been tampered with during transmission and storage. At the same time, the consensus result is stored on the chain to form an unalterable audit log. The timestamp and digital signature are combined to achieve full life cycle traceability, which not only meets the low power consumption and high timeliness requirements of IoT devices, but also resists single point attacks through a distributed verification mechanism, ultimately achieving the authenticity and tamper-proof goals of water meter measurement data.
[0142] The blockchain decrypts and detects the gas safety ciphertext. When it detects that the gas safety data is not 0, it drives the smart contract of the gas meter to respond to the attack. The blockchain decrypts and detects the water meter safety ciphertext. When it detects that the water safety data is not 0, it drives the smart contract of the water meter to respond to the attack.
[0143] Methods to drive the gas meter’s smart contract to respond to attacks include:
[0144] Step 1: Freeze the corresponding user account and suspend the recharge function (such as obtaining the user account status through Oracle and setting the account status to normal ,freeze , freeze the corresponding user account, then );
[0145] Step 2: Generate a physical tamper evidence package (including sensor data) by combining gas flow, timestamp and operator ID , Timestamp 、Operator ID is ), store it to IPFS and return the content identifier to the blockchain;
[0146] Step 3: Trigger the edge computing node to start the backup communication channel (such as switching to the 4G network).
[0147] Methods to drive the water meter’s smart contract to respond to attacks include:
[0148] Step A: Send a work order for on-site inspection to the water management platform (by calling an external API via Chainlink oracle) to obtain the work order for on-site inspection.
[0149] Step B: If no manual confirmation signal is received within the preset waiting time (if the confirmation status is , unconfirmed ,confirm ), the corresponding water meter is marked as a high-risk device, and the valve lock state is set to ,normal ,locking If the water meter is marked as a high-risk device, then Attribute-based encryption can be used to temporarily authorize the unlocking of valves. For example, only when the maintenance worker carries a digital work order signed by the blockchain, the smart contract authorizes the temporary unlocking of the valve, and the operation record is stored on the chain.
[0150] The smart contracts that drive gas and water meters automatically trigger defense mechanisms by monitoring abnormal flow data in real time, and store the attack event hash value and timestamp on the chain synchronously. Digital signature verification is combined to ensure that the response action cannot be tampered with. At the same time, automated emergency response is achieved through predefined rules, which not only prevents real-time attack behaviors, but also provides on-chain evidence for subsequent traceability, ultimately forming a closed-loop protection system of "monitoring-response-evidence storage", which effectively ensures the integrity and authenticity of water meter measurement data.
[0151] Dynamically update the key in the dynamic encryption process according to the preset update time, and dynamically update the key by linking the gas safety data and water safety data;
[0152] The method for dynamically updating the key in the dynamic encryption process includes:
[0153] Obtain a global unified timestamp through an oracle (such as Chainlink) and obtain the expiration time corresponding to the key according to the key rotation cycle;
[0154] The smart contract checks the validity period of the key at preset intervals. The validity period of the key is the current time plus the key rotation period. When the current time reaches or exceeds the expiration time of the key, the key is automatically updated;
[0155] Generate a new key by combining the timestamp corresponding to the current time through dynamic encryption method; store the new key in the blockchain and mark the original key as invalid;
[0156] Record all key updates through blockchain event logs;
[0157] The new key is encrypted and stored in IPFS, and the storage address is written to the blockchain.
[0158] The dynamic update of keys in dynamic encryption ensures that unique keys are used for data encryption in each cycle by regularly rotating keys (such as generating new keys based on timestamps) to avoid long-term key leakage risks; at the same time, the hardware security module (HSM) or trusted execution environment (TEE) is combined to ensure the security of key generation and storage to prevent keys from being tampered with or stolen; in addition, the key update process is combined with blockchain evidence storage to solidify the key hash value and timestamp on the chain, and the chain verification mechanism is used to ensure that the key is traceable throughout its life cycle, ultimately forming a three-dimensional protection system of "key time control + physical security protection + blockchain evidence storage" to effectively resist the risk of tampering or forgery of IoT meter measurement data.
[0159] The method for dynamically updating the key by linking the physical states of the gas meter and the water meter includes:
[0160] Detect magnetic field interference data, illegal disassembly data and water flow direction data. When it is checked that the value of the magnetic field interference data or the illegal disassembly data is not 0, revoke all the keys corresponding to the corresponding gas meter at the current time, and dynamically update the keys of the gas meter according to the current time; when it is checked that the value of the water flow direction data is not 0, revoke all the keys corresponding to the corresponding water meter at the current time, and dynamically update the keys of the water meter according to the current time.
[0161] Conduct attack tracing for the entire transmission process of gas and water meter data, and report the attack tracing results;
[0162] Methods for tracing the source of attacks on the entire process of gas data transmission include:
[0163] A traceability quintuple of gas data is established, which includes: equipment, operator, sensor status, geographic location, and timestamp. When a gas meter is detected to be under attack, the attack is traced through the blockchain browser combined with the traceability quintuple.
[0164] Methods for tracing the source of attacks during the entire process of water meter data transmission include:
[0165] Use a hash function to perform a hash operation on the water flow to obtain a data hash value of a fixed length;
[0166] Convert water flow and related verification logic into circuit form of preset zero-knowledge proof scheme;
[0167] The prover (usually a gas metering device or a related data processor) generates a zero-knowledge proof using the zero-knowledge proof algorithm in the preset zero-knowledge proof scheme according to the parameters and circuit of the preset zero-knowledge proof scheme;
[0168] The verifier (such as a gas company, regulator, etc.) receives the zero-knowledge proof and data hash value from the prover;
[0169] The verifier uses the received information and the verification procedure of the zero-knowledge proof algorithm to verify the zero-knowledge proof; the verification process mainly checks whether the proof complies with the rules and constraints of the zero-knowledge proof scheme, and whether it can prove the authenticity and integrity of the data; the verifier verifies the consistency of the data through the data hash value; such as comparing the received data hash value with the hash value obtained by re-hashing the water flow. If the two hash values are equal, it means that the data has not been tampered with during transmission and is consistent with the data involved in the proof.
[0170] The verifier makes a final decision based on the verification results of the zero-knowledge proof and the data consistency verification results; if the zero-knowledge proof passes the verification and the data hash value is consistent, the gas flow is considered to be authentic and valid; otherwise, it is considered that there is a problem with the data and further investigation is required or the prover is required to provide a new proof.
[0171] Tracing the source of attacks on gas and water meter data can quickly locate the source of tampering (such as malicious nodes, illegal instructions) by recording the entire life cycle of data operations (such as collection time, device ID, and modification records) and combining it with blockchain hash evidence. At the same time, the integrity of the data chain is verified by timestamps and digital signatures, which not only provides real-time basis for emergency response, but also provides an irrefutable chain of evidence for subsequent accountability and system repair. Ultimately, a closed-loop defense system of "attack discovery-path tracking-vulnerability repair" is formed, which significantly improves the anti-tampering capability and system security of IoT meter measurement data.
[0172] Example 2
[0173] See also Figure 2 As shown, the blockchain-based IoT meter data tamper-proof method described in this embodiment also provides an edge-cloud collaborative real-time defense optimization method, including the following steps:
[0174] Build a local anomaly detection model for the gas meter, use the blockchain input data as the input of the anomaly detection model, and output the predicted flow The actual flow rate is , calculate the deviation rate Only when the deviation rate The data is uploaded to the chain when the transaction is triggered, which can reduce the load on the blockchain.
[0175] Data filtering is performed through the LoRa gateway to remove obvious outliers that exceed the preset data range, and the gateway identity is verified through the blockchain to prevent man-in-the-middle attacks.
[0176] Example 3
[0177] See also Figure 3 As shown, the blockchain-based IoT meter data tamper-proof system described in this embodiment includes:
[0178] Data acquisition module: collects gas data and water meter data; gas data includes gas flow and gas safety data; water meter data includes water flow and water safety data;
[0179] Data encryption module: dynamically encrypt gas data and water meter data to obtain gas ciphertext data and water meter ciphertext data; gas ciphertext data includes gas flow ciphertext and gas safety ciphertext; water meter ciphertext data includes water flow ciphertext and water safety ciphertext;
[0180] Verification and on-chain module: Classify gas ciphertext data and water meter ciphertext data by category, verify gas ciphertext data and water meter ciphertext data based on a lightweight consensus mechanism, and write the verified gas ciphertext data and water meter ciphertext data into the corresponding chain of the blockchain according to category;
[0181] Attack response module: The blockchain decrypts and detects the gas safety ciphertext. When it detects that the gas safety data is not 0, it drives the smart contract of the gas meter to respond to the attack. The blockchain decrypts and detects the water meter safety ciphertext. When it detects that the water safety data is not 0, it drives the smart contract of the water meter to respond to the attack.
[0182] Key update module: dynamically updates the key in the dynamic encryption process according to the preset update time, and dynamically updates the key in conjunction with gas safety data and water safety data;
[0183] Attack tracing module: traces the attack source of the entire transmission process of gas data and water meter data, and reports the attack tracing results.
[0184] Reference Figure 4 The data management system interface presents the key data and related status of gas and water meters, which is of great significance to ensuring data security and accuracy.
[0185] In terms of data statistics, it clearly shows that today's gas consumption is 876.32m 3 , an increase of 2.8% over yesterday, today's water consumption is 1567.84m 3 , down 1.6% from yesterday, which can intuitively understand the changes in usage. At the same time, the gas and water consumption trend charts visualize the fluctuations in usage at different times, helping to analyze usage patterns.
[0186] The security situation is also clear at a glance. There were 5 security incidents in total, 4 of which have been handled, indicating the system's ability to monitor and handle abnormal situations. The blockchain records totaled 28,647, with 342 new records added today, reflecting the application of blockchain technology in data storage and verification, ensuring that data cannot be tampered with and is traceable.
[0187] The real-time data recording section records in detail the data collection time, device number, type, data value and other information, and also marks the encryption status and block status. For example, the data of the gas meter device GAS-001 has been encrypted and uploaded to the chain, while the data of the water meter device WAT-002 has been encrypted but awaiting confirmation, demonstrating the security measures in the process from data collection to storage.
[0188] Through multi-dimensional data presentation and management, this system realizes effective monitoring and security protection of gas and water meter data, providing users with accurate and reliable metering data services.
[0189] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
[0190] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A blockchain-based method for preventing tampering of IoT meter data, characterized in that: The steps include: Collect gas data and water meter data; gas data includes gas flow and gas safety data; water meter data includes water flow and water safety data; Dynamically encrypt the gas data and water meter data to obtain gas ciphertext data and water meter ciphertext data; the gas ciphertext data includes gas flow ciphertext and gas safety ciphertext; the water meter ciphertext data includes water flow ciphertext and water safety ciphertext; The gas ciphertext data and water meter ciphertext data are classified by category, and the gas ciphertext data and water meter ciphertext data are verified based on the lightweight consensus mechanism. The verified gas ciphertext data and water meter ciphertext data are written into the corresponding chain of the blockchain according to the category; The blockchain decrypts and detects the gas safety ciphertext. When it detects that the gas safety data is not 0, it drives the smart contract of the gas meter to respond to the attack. The blockchain decrypts and detects the water meter safety ciphertext. When it detects that the water safety data is not 0, it drives the smart contract of the water meter to respond to the attack. Dynamically update the key in the dynamic encryption process according to the preset update time, and dynamically update the key by linking the gas safety data and water safety data; The attack source is traced for the entire transmission process of gas data and water meter data, and the attack tracing results are reported.
2. The method for preventing tampering of IoT meter data based on blockchain according to claim 1 is characterized in that: Methods for obtaining gas flow ciphertext include: Encrypt the gas flow based on the SM2 elliptic curve equation; obtain the order of a base point on the SM2 elliptic curve ;from Randomly select the private key of user A and obtain the public key corresponding to user A; Randomly select the private key of user B and obtain the public key corresponding to user B; User A and User B get the current timestamp , user A randomly selects a random number , calculate the temporary public key of user A; for the timestamp Perform a hash operation to obtain a time hash value, concatenate user A's temporary public key with the time hash value, and then perform a hash operation to obtain user A's hash value; and send user A's temporary public key and user A's hash value to user B; User B randomly selects a random number , calculate the temporary public key of user B, and send the temporary public key of user B to user A; concatenate the temporary public key of user B with the time hash value, and then perform a hash operation to obtain the hash value of user B; and send the temporary public key of user B and the hash value of user B to user A; User A calculates the midpoint based on user A's private key, user B's public key, and the temporary public key ; User B calculates the midpoint based on user B's private key, user A's public key and the temporary public key ; According to the properties of the elliptic curve, we can get ; User A and user B both concatenate the coordinates of the middle point with the hash value received from the other party; Use a hash function to process the concatenation result and obtain a session key; Pick a random number , calculate the temporary public key; obtain the first ciphertext; calculate the corresponding intermediate point; generate the key ; Use the generated key Combined with the session key to obtain the final encryption key; Perform an XOR operation on the gas flow and the final encryption key to obtain a second ciphertext; calculate to obtain a third ciphertext; and concatenate the first ciphertext, the second ciphertext, and the third ciphertext to obtain a gas flow ciphertext.
3. The method for preventing tampering of Internet of Things meter data based on blockchain according to claim 1 is characterized in that: Methods for obtaining water flow ciphertext include: Choose two large prime numbers and ,and ; calculate and The product of and The least common multiple of ; according to and Generate Public Key and private key ,in, is the public key parameter that satisfies the constraints, The private key parameters that satisfy the constraints; is the public key parameter; is the lowest common multiple; The water meter data and the timestamp are concatenated to obtain updated water meter data; Using Public Key The updated water meter data is encrypted to obtain the water flow ciphertext.
4. The method for preventing tampering of IoT meter data based on blockchain according to claim 1 is characterized in that: Gas safety data includes magnetic field interference data outside the gas meter and illegal disassembly data. Methods for obtaining magnetic field interference data include: The environmental magnetic field strength outside the gas meter is collected by integrating a magnetic field strength sensor in the gas meter, and the collected environmental magnetic field strength is compared with a preset environmental magnetic field strength threshold. When the environmental magnetic field strength is higher than the preset environmental magnetic field strength threshold, it is judged that there is external magnetic field interference, and the magnetic field interference data with a value of 1 is obtained, otherwise the magnetic field interference data with a value of 0 is obtained; Methods of obtaining illegal disassembly data include: The status data of the illegal disassembly of the gas meter casing is collected through the pressure switch. When the gas meter casing is illegally disassembled, the status data is 1, otherwise it is 0, and the status data is regarded as illegal disassembly data; Methods for obtaining water safety data include: The normal water supply direction is set to the positive direction, and the non-water supply direction is set to the reverse direction. The water flow direction is obtained by the rotation direction of the non-magnetic turntable. When the water flow direction is in the positive direction, the water flow direction data is set to 1, otherwise the water flow direction data is set to 0, and the water flow direction data is used as water safety data.
5. The method for preventing tampering of Internet of Things meter data based on blockchain according to claim 4 is characterized in that: Methods to drive the gas meter’s smart contract to respond to attacks include: Step 1: Freeze the corresponding user account and suspend the recharge function; Step 2: Generate a physical tampering evidence package by combining gas flow, timestamp and operator ID, store it in IPFS and return the content identifier to the blockchain; Step 3: Trigger the edge computing node to start the backup communication channel; Methods to drive the water meter’s smart contract to respond to attacks include: Step A: Send a work order requesting on-site inspection to the water management platform; Step B: If no manual confirmation signal is received within the preset waiting time, the corresponding water meter is marked as a high-risk device.
6. The method for preventing tampering of Internet of Things meter data based on blockchain according to claim 1 is characterized in that: Methods for verifying gas ciphertext data based on a lightweight consensus mechanism include: The node applies for registration, Verification nodes form a verification alliance; each node in the verification alliance has a unique identity ID and verification node authority, and the public key and identity ID of each node are recorded in the blockchain; A transaction is created by the participants of the gas transaction , and create a transaction The party participating in the transaction is recorded as the transaction initiator; The transaction initiator uses his own private key to Sign the transaction and send it to Broadcast to the blockchain network; Verify that each node in the alliance receives the broadcasted signed transaction After that, use the public key of the transaction initiator to The signature is verified. When each node completes the transaction After verification, the verification results of all nodes are broadcast to the blockchain network; Collect the verification results of all nodes, count the number of nodes that have passed the verification, and compare it with the preset node number threshold. When the number of nodes that have passed the verification exceeds the preset node number threshold, the transaction will be Mark as confirmed, otherwise the transaction Marked as failed.
7. The method for preventing tampering of IoT meter data based on blockchain according to claim 1 is characterized in that: Methods for verifying water meter ciphertext data based on lightweight consensus mechanisms include: A distributed network consisting of U consensus nodes participating in the consensus is composed of water meter data transmission links. The main consensus node is preset, and the historical behavior evaluation value and voting weight are initialized for each consensus node; Consensus Node Collect water meter ciphertext data and send it to other consensus nodes for consensus at preset collection time intervals; In each consensus process, other consensus nodes Monitor the behavior of According to the monitoring results, consensus nodes Update the historical behavior evaluation value; According to the updated consensus node The historical behavior evaluation value of the consensus node is calculated using the weight adjustment function voting weight; After receiving the client's request, the main consensus node assigns a sequence number to the request. , and broadcast the pre-prepared message to other consensus nodes. The pre-prepared message includes the sequence number, the content of the request, the requester and the corresponding water meter ciphertext data. After receiving the pre-prepared message, other consensus nodes check whether their voting weight is higher than the preset weight threshold. If it is higher than the preset weight threshold, they participate in the consensus process, otherwise they do not participate; If the consensus node Participate in the consensus process and broadcast the preparation message to other consensus nodes; the preparation message includes the sequence number, the content of the request and the identity of the consensus node ; Consensus Node Collect the preparation messages of other consensus nodes. When the total voting weight of the collected preparation messages exceeds the preset threshold, the consensus node Enter the next stage; Consensus Node Broadcast submission message to other consensus nodes, submission message includes the total voting weight, sequence number, request content and consensus node identification ; When the total voting weight of the collected submission messages exceeds the preset submission threshold, the consensus node Execute the request and return the result to the client.
8. The method for preventing tampering of IoT meter data based on blockchain according to claim 1 is characterized in that: The method for dynamically updating the key in the dynamic encryption process includes: Obtain a global unified timestamp through the oracle, and obtain the expiration time corresponding to the key according to the key rotation cycle; The smart contract checks the validity period of the key at preset intervals. The validity period of the key is the current time plus the key rotation period. When the current time reaches or exceeds the expiration time of the key, the key is automatically updated; Generate a new key by combining the timestamp corresponding to the current time through dynamic encryption method; store the new key in the blockchain and mark the original key as invalid; Record all key updates through blockchain event logs; The new key is encrypted and stored in IPFS, and the storage address is written to the blockchain.
9. The method for preventing tampering of Internet of Things meter data based on blockchain according to claim 4 is characterized in that: The method of dynamically updating the key by linking the gas safety data and the water safety data includes: Detect magnetic field interference data, illegal disassembly data and water flow direction data. When it is checked that the value of the magnetic field interference data or the illegal disassembly data is not 0, revoke all the keys corresponding to the corresponding gas meter at the current time, and dynamically update the keys of the gas meter according to the current time; when it is checked that the value of the water flow direction data is not 0, revoke all the keys corresponding to the corresponding water meter at the current time, and dynamically update the keys of the water meter according to the current time.
10. The method for preventing tampering of IoT meter data based on blockchain according to claim 1 is characterized in that: Methods for tracing the source of attacks on the entire process of gas data transmission include: A traceability quintuple of gas data is established, which includes: equipment, operator, sensor status, geographic location, and timestamp. When a gas meter is detected to be under attack, the attack is traced through the blockchain browser combined with the traceability quintuple.
11. The method for preventing tampering of Internet of Things meter data based on blockchain according to claim 1 is characterized in that: Methods for tracing the source of attacks during the entire process of water meter data transmission include: Use a hash function to perform a hash operation on the water flow to obtain a data hash value of a fixed length; Convert water flow and related verification logic into circuit form of preset zero-knowledge proof scheme; The prover generates a zero-knowledge proof using the zero-knowledge proof algorithm in the preset zero-knowledge proof scheme according to the parameters and circuit of the preset zero-knowledge proof scheme; The verifier receives the zero-knowledge proof and the data hash from the prover; The verifier verifies the zero-knowledge proof using the received information and the verification procedure of the zero-knowledge proof algorithm; the verifier verifies the consistency of the data through the data hash value; Based on the verification results of the zero-knowledge proof and the verification results of the data consistency, the verifier makes the final decision.
12. A blockchain-based IoT meter data tamper-proof system, used to implement the blockchain-based IoT meter data tamper-proof method according to any one of claims 1 to 10, characterized in that: include: Data acquisition module: collects gas data and water meter data; gas data includes gas flow and gas safety data; Water meter data include water flow and water security data; Data encryption module: dynamically encrypt gas data and water meter data to obtain gas ciphertext data and water meter ciphertext data; gas ciphertext data includes gas flow ciphertext and gas safety ciphertext; water meter ciphertext data includes water flow ciphertext and water safety ciphertext; Verification and on-chain module: Classify gas ciphertext data and water meter ciphertext data by category, verify gas ciphertext data and water meter ciphertext data based on a lightweight consensus mechanism, and write the verified gas ciphertext data and water meter ciphertext data into the corresponding chain of the blockchain according to category; Attack response module: The blockchain decrypts and detects the gas safety ciphertext. When it detects that the gas safety data is not 0, it drives the smart contract of the gas meter to respond to the attack. The blockchain decrypts and detects the water meter safety ciphertext. When it detects that the water safety data is not 0, it drives the smart contract of the water meter to respond to the attack. Key update module: dynamically updates the key in the dynamic encryption process according to the preset update time, and dynamically updates the key in conjunction with gas safety data and water safety data; Attack tracing module: traces the attack source of the entire transmission process of gas data and water meter data, and reports the attack tracing results.
Citation Information
Patent Citations
Electric power measurement data source tamper-proofing verification system and method based on block chain
CN115378642A
Special module for intelligent water meter based on NB-IOT modem
CN109427186A
Block chain-based credible Internet-of-Things gas meter and local and cloud credible method
CN112769758A
Fuel gas supervision system and supervision method
CN114331759A
Energy information utilization platform based on Internet of Things
CN114626956A