CN115879937A - Power metering data control verification system and method based on block chain - Google Patents

Power metering data control verification system and method based on block chain Download PDF

Info

Publication number
CN115879937A
CN115879937A CN202211366271.XA CN202211366271A CN115879937A CN 115879937 A CN115879937 A CN 115879937A CN 202211366271 A CN202211366271 A CN 202211366271A CN 115879937 A CN115879937 A CN 115879937A
Authority
CN
China
Prior art keywords
block
data
metering
equipment
hash value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211366271.XA
Other languages
Chinese (zh)
Inventor
黄瑞
肖宇
刘谋海
杨帅
王智
曾伟杰
杨静
苏玉萍
谭海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
State Grid Hunan Electric Power Co Ltd
Metering Center of State Grid Hunan Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Hunan Electric Power Co Ltd
Metering Center of State Grid Hunan Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Hunan Electric Power Co Ltd, Metering Center of State Grid Hunan Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202211366271.XA priority Critical patent/CN115879937A/en
Publication of CN115879937A publication Critical patent/CN115879937A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a block chain-based electric power metering data control verification system and method, which are characterized by comprising the following steps of: the data resource layer comprises a central database of a WEB server end, a block chain network and an RFID tag, wherein the central database of the WEB server end is used for storing metering full-life management and control data, the block chain network is used for storing metering information and recording the circulation information of the metering equipment, and the latest circulation information of the metering equipment is stored in the RFID tag; the supporting layer is used for realizing the access to the data resource layer; the application scheduling layer is used for scheduling various service accesses of the management and control layer; and the management and control layer is used for realizing the whole life management control of the metering equipment. The invention can realize the whole-life management and control of the data of the electric power metering equipment, and has the functions of simple realization method, high efficiency and safety, traceability, tamper resistance and the like.

Description

Power metering data control verification system and method based on block chain
Technical Field
The invention relates to the technical field of electric power metering equipment, in particular to a block chain-based electric power metering data management and control verification system and method.
Background
At present, manufacturers and types of electric power metering equipment are numerous, the quality of products of different manufacturers is uneven, and particularly, the quality problems of the products are gradually revealed when new equipment such as a new generation of intelligent electric energy meter and an intelligent fusion terminal is installed in large quantities. Meanwhile, the existing part of metering equipment lacks a life-cycle management technical means, so that the problems of disordered equipment management, loss and the like exist, the lean management requirement of the metering equipment cannot be met, and the life-cycle management and control of the metering equipment from verification detection, field operation, scrapping removal and the like are difficult to realize.
At present, the management of the electric power metering equipment mainly adopts a bar code management mode, and the following problems can exist:
1. the realization is complicated and the efficiency is low.
When a new metering device is added, a unique identification code is compiled for the device through a set rule while the machine account is registered, and the code is converted into a two-dimensional/three-dimensional bar code label to be pasted on the metering device entity; when the equipment is checked, the bar code is identified through the scanning gun, and the detailed information of the corresponding metering equipment is analyzed and checked. However, due to the fact that the distribution range of the metering equipment is wide, the mode of identifying the equipment by using the bar code label is adopted, once the equipment parts are replaced, the label card needs to be replaced, the bar code is easy to damage, the working process of scanning the bar codes one by one is time-consuming, labor-consuming, complex and tedious, and the problem of low efficiency also exists.
2. Data reporting is not timely or accurate.
Because the variety and the number of the metering equipment are various and the metering equipment can be circulated in different departments, the equipment management needs to manually maintain the state of the equipment in the follow-up process except the first warehousing registration, and the problems of untimely reporting or inaccurate data reporting are easy to occur.
3. Traceability and tamper-proofing are impossible.
Due to the reasons of security and secrecy and the like, metering equipment data cannot be shared generally, so that the problems of equipment loss, difficulty in tracing, easiness in being considered as tampering and the like can be caused easily.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the technical problems in the prior art, the invention provides a block chain-based electric power metering data management and control verification system and method which are simple in implementation method, high in efficiency and safety, traceable and tamper-proof.
In order to solve the technical problems, the technical scheme provided by the invention is as follows:
a block chain-based power metering data management and control verification system comprises:
the data resource layer comprises a central database of a WEB server end, a blockchain network and an RFID tag, wherein the central database of the WEB server end is used for storing metering full-life management and control data, the blockchain network is used for storing metering information and recording circulation information of metering equipment, and the latest circulation information of the metering equipment is stored in the RFID tag;
the supporting layer is used for realizing the access to the data resource layer;
the application scheduling layer is used for scheduling various service accesses of the management and control layer;
and the management and control layer is used for realizing the management and control of the whole service life of the metering equipment.
Further, the storage area of the RFID tag comprises a reserved area, a TID area, an EPC area and a user area, wherein the reserved area is used for writing the password of the current tag, the TID area is used for storing the identification serial number of the current tag chip, the EPC area is used for storing the item code of the metering device bound with the current tag, and the user area is used for storing the latest circulation information of the metering device.
Further, the block chain network is a double-chain structure formed by a main chain and a plurality of sub-chains, the main chain is used for storing the registration blocks of each newly added metering device based on an account, the sub-chains are used for forming independent flow block chains by taking the main chain blocks as starting blocks based on transactions, all flow information of the main chain blocks is recorded, the main chain adopts a merkel prefix tree, and each block structure of the sub-chains adopts a merkel tree structure.
Further, the merkel tree adopts a binary tree structure, wherein leaf nodes store the flow data of the metering equipment and corresponding hash values, and intermediate nodes store hash values obtained by performing hash calculation on combinations corresponding to all the leaf nodes; the root node stores the hash value obtained by carrying out hash calculation on the combination of the middle nodes of the whole block, and the hash value stored by the root node is used as the unique abstract of a group of circulation information and stored at the head of the block as the root of the Merckel tree.
Further, the support layer includes a communication network, an RFID tag printing device and an RFID reader, the RFID tag printing device and the RFID reader are connected to the data resource layer and the RFID tag, and the application scheduling layer performs distributed service deployment by using a micro-service architecture.
A method for the block chain-based power metering data management and control verification system comprises a metering device newly-increased control step, and specifically comprises the following steps:
when a newly added metering device exists, acquiring a TID sequence code and an article code of the bound RFID label;
generating newly added registration block data of the equipment according to the acquired data of the newly added metering equipment, and extracting a hash value of the current block data;
calling a newly-added intelligent contract interface of the deployed block chain metering equipment, and initiating a block chain main chain block entering application;
after the verification is carried out through a main chain consensus mechanism, the registered block data of the newly added metering equipment is linked to a main chain of a block chain;
respectively storing the article codes of the current newly added metering equipment and the hash values of the newly added registration blocks into corresponding RFID tags;
and storing the data of the current newly added metering equipment and the hash value of the newly added registration block into a central database of the WEB server side.
Further, the method also comprises a metering equipment circulation control step, and the specific steps comprise:
when the metering equipment is circulated, collecting circulation information of the metering equipment needing to be circulated;
generating flow block data of the current metering equipment according to flow information, and extracting a hash value of the flow block data;
calling a deployed intelligent contract interface for transferring the block chain metering equipment, and initiating a block chain auxiliary chain block incoming chain application;
after verification through a sublink consensus mechanism, modifying the state information of the main chain block corresponding to the current metering equipment, and linking the transfer block to a sublink of the current main chain block;
writing the hash value of the flow block data into the RFID label corresponding to the current metering equipment;
and storing the circulation information of the current metering equipment and the hash value of the circulation block into a central database of the WEB server side.
Further, the method also comprises a step of verifying the data of the block chain main chain, and the specific steps comprise:
judging the state of the target node before calculating the hash value of the target node, and only recalculating the modified node and the node on the path from the modified node to the root node when the content of the target node is changed to obtain a new hash value of the whole tree;
when the content of the target node changes, the content of the parent node changes, and a new parent node is generated and recursively transferred to the root node, so that a new path is created from the modified node to the root node corresponding to a change.
Further, the method also comprises an RFID data verification step, and the specific steps comprise: inquiring an equipment registration block or an equipment circulation block at the latest time of the verified metering equipment in the block chain, calculating the hash value of the block, comparing the calculated hash value with the hash value read out by the RFID label of the verified metering equipment, if the calculated hash value is consistent with the hash value read out by the RFID label of the verified metering equipment, the verification is successful, otherwise, the verification fails, wherein when the metering equipment is in a newly added state, the RFID label is stored in the hash value of the newly added block of the main chain, and when the metering equipment is circulated, the latest block hash value of the auxiliary chain is stored.
Further, the method comprises a data verification step of a central database, and the specific steps comprise: sequentially reading block information of a block chain main chain, wherein the blocks of the block chain main chain store the latest state information of the corresponding metering equipment, and acquiring hash values of the blocks of the block chain main chain and core data of the corresponding metering equipment; and reading the latest hash value and the equipment data stored by the corresponding metering equipment in the WEB server side central database, finally comparing the read data to verify the consistency of the data, and if the hash value and the equipment data are not consistent, tracing by using the block chain data.
Compared with the prior art, the invention has the advantages that:
1. according to the invention, the block chain network and the RFID tag are arranged on the data resource layer, the RFID technology and the block chain are combined to construct the electric power metering data management and control verification system, the radio frequency identification technology is adopted to identify and manage the metering equipment, the WEB server end central database, the block chain network and the RFID tag are adopted to store the equipment data, the management control and the data verification of the whole life cycle data of the electric power metering equipment are realized by fully utilizing the RFID technology and the block chain, the efficiency of data management and control can be greatly improved, the timely report of the data of each stage of the electric power equipment is ensured, and the traceability and the tamper resistance can be conveniently realized.
2. The invention stores the data of the metering device by adopting a Merckel tree structure, the Merckel tree adopts a binary tree structure, the change of any data in a block can cause the change of the Merckel tree structure, any change of bottom data can be transmitted to the father node of the Merckel tree structure until the tree root, so that in the verification process of the data of the device circulation, only the Hash value of the Merckel tree root needs to be verified, the data calculation amount can be greatly reduced, and the data of the device circulation can be rapidly verified.
3. According to the invention, by setting the four-layer verification method of the measured asset data based on the block chain network, the safety of the asset data in the whole life management and control of the measured asset can be further improved, the functions of traceability, anti-counterfeiting and the like can be realized, the data calculation amount can be greatly reduced, and the verification efficiency can be improved.
Drawings
Fig. 1 is a schematic structural diagram of a power metering data management and verification system based on a block chain according to the present embodiment.
FIG. 2 is a schematic diagram of the double-stranded structure of the block chain in this embodiment.
Fig. 3 is a schematic diagram of a flow of implementing data management control when a metering device adds a service in this embodiment.
Fig. 4 is a flowchart of management control implementation of flow service data of the metering device in this embodiment.
Fig. 5 is a schematic diagram of a new registration block structure of the metering device in this embodiment.
Fig. 6 is a block diagram of the metering device flow in the present embodiment.
Detailed Description
The invention is further described below with reference to the drawings and the specific preferred embodiments, without thereby limiting the scope of protection of the invention.
Radio Frequency Identification (RFID) is a non-contact automatic identification communication technology, can perform remote and multi-target identification without manual intervention in severe environment, and has the advantages of long identification distance, rapidness, difficult damage, high accuracy, large storage capacity and the like compared with bar codes. The block chain is a novel distributed global state database commonly maintained by a plurality of nodes, and has the advantages of data traceability, high data security, data tamper resistance and the like. According to the invention, the block chain network and the RFID tag are arranged on the data resource layer, the RFID technology and the block chain are combined to construct the electric power metering data control verification system, the radio frequency identification technology is adopted to identify and manage the metering equipment, the WEB server end central database, the block chain network and the RFID tag are adopted to store the equipment data, the management control and the data verification of the whole life cycle data of the electric power metering equipment are realized by fully utilizing the RFID technology and the block chain, the efficiency of data control can be greatly improved, the timely report of the data of each stage of the electric power equipment is ensured, and the traceability and the falsification prevention can be conveniently realized.
As shown in fig. 1, the power metering data management and control verification system based on the block chain in this embodiment specifically includes:
the data resource layer comprises a central database of a WEB server end, a block chain network and an RFID tag, wherein the central database of the WEB server end is used for storing metering full-life management and control data, the block chain network is used for storing metering information and recording the circulation information of the metering equipment, and the latest circulation information of the metering equipment is stored in the RFID tag;
the supporting layer is used for realizing the access to the data resource layer;
the application scheduling layer is used for scheduling various service accesses of the management and control layer;
and the management and control layer is used for realizing the whole life management control of the metering equipment.
In this embodiment, the support layer specifically includes a communication network, an RFID tag printing device, and an RFID reader, where the RFID tag printing device and the RFID reader are connected to the data resource layer and the RFID tag, so as to access the data resource layer. The application scheduling layer adopts a micro-service architecture to perform distributed service deployment so as to schedule various service accesses of the equipment management and control layer and realize data management of metering equipment in life management and control of addition, circulation, inventory, scrappage and the like. The management and control layer mainly adopts a B/S mode computer or a mobile terminal to realize the whole-life management and control of the metering equipment, including services of adding, circulating, checking, tracing, scrapping and the like of the metering equipment, and specifically can adopt a micro-service architecture to carry out distributed deployment.
In this embodiment, the storage area of the RFID tag specifically includes a reserved area, a TID area, an EPC area, and a user area, where the reserved area writes a password (such as a destroy password and an access password) of the current tag, and data can only be written in and cannot be read out; the TID area stores the identification serial number of the tag chip, and the data can be read but cannot be modified; the EPC area is used for storing the item code of the metering equipment bound with the current label, and the data can be read; the user area is used for storing the latest circulation information of the metering equipment, and the data can be read.
In order to improve the data security of the RFID tag, data in an EPC area and data in a user area are stored in a cipher writing protection and cipher text mode, the cipher text is encrypted by a symmetric encryption algorithm DES, TID sequence codes of all tags are used as distributed parameters, the encryption and decryption process is completed in an application scheduling layer, and the RFID only realizes cipher text reading and writing. And in the reading and writing process of the RFID tag, mutual authentication is performed between the RFID tag and an RFID reader-writer by adopting a random Hash lock protocol.
In the embodiment, in the data storage of the block chain network, a main-sideline double-chain structure based on role distribution is adopted, as shown in fig. 2, the block chain network is a double-chain structure composed of a main chain and a plurality of sidelines, the main chain is used for storing a registration block of each newly added metering device based on an account, the sidelines form an independent flow block chain by taking the main chain block as a starting block based on transaction, and all flow information of the main chain block is recorded, wherein the main chain adopts a mercker prefix tree, and each block structure of the sidelines adopts a mercker tree structure, so that the mercker tree structure of flow data is stored.
Further, the system adopts a trust mechanism through role distribution, the nodes of the login block chain network are grouped according to the function authority and are divided into a main node (such as a metering equipment purchasing department) and a slave node (a metering equipment circulation department), the main node takes charge of the generation and uplink process of the main chain block, and the slave node takes charge of the generation and uplink process of the auxiliary chain block.
In this embodiment, the merkel tree specifically adopts a binary tree structure, where leaf nodes store metering device flow data and corresponding hash values, and middle nodes store hash values obtained by performing hash calculation on combinations corresponding to all the leaf nodes; the root node stores the hash value obtained by carrying out hash calculation on the combination of the middle nodes of the whole block, and the hash value stored by the root node is used as the unique abstract of a group of circulation information and stored at the head of the block as the root of the Mercker tree.
In order to further improve the security, the system of the embodiment adopts a mode of authority authorization and login password authentication to access the block chain network, and adopts a digital signature mode, namely, only a data string generated by an information sender can prove the identity of the information sender, so that other people cannot imitate to ensure that the information is not tampered and forged; when each user registers, the system generates a public key and a private key by adopting an asymmetric elliptic curve decryption algorithm (ECC) for each user.
The method for the block chain-based power metering data control verification system comprises a metering device newly-added control step S1, and specifically comprises the following steps:
s11, when a newly added metering device exists, acquiring a TID sequence code and an article code of the bound RFID label;
s12, generating newly added registration block data of the equipment according to the acquired data of the newly added metering equipment, and extracting a hash value of the data of the current block;
s13, calling a newly added intelligent contract interface of the deployed block chain metering equipment, and initiating a block chain main chain block entering application;
s14, after the verification through a main chain consensus mechanism, the registered block data of the newly added metering equipment are linked to a main chain of a block chain;
s15, respectively storing the article codes of the newly added metering equipment and the hash values of the newly added registration blocks into corresponding RFID tags;
and S16, storing the data of the current newly added metering equipment and the hash value of the newly added registration block into a central database of the WEB server side.
In a specific application embodiment, as shown in fig. 3, after a metering device is newly added, the complete file data of the device is collated, including the TID sequence code of the RFID tag bound to the device, and an article code is compiled for the device; selecting the core data of the equipment to generate newly added registration block data of the equipment, extracting a hash value of the block data by using an SHA256 hash algorithm, carrying out digital signature on the block data by using a private key of the block data, calling a newly added intelligent contract interface of the deployed block chain equipment, and initiating a block chain main chain block entering application; after the verification is carried out through a main chain consensus mechanism, the registered block data of the newly added equipment is linked to a main chain of a block chain; simultaneously, respectively storing the article code of the equipment and the hash value of the newly added registration block into an EPC area and a user area of the label through an RFID label printer, and sticking the label to the surface of the equipment; and storing the complete file data of the equipment and the hash value of the newly added registration block into a central database of a WEB server side through a remote communication network in a B/S mode, and adding a timestamp.
In this embodiment, the method further includes a metering device circulation control step S2, and the specific steps include:
s21, when the metering equipment is circulated, collecting circulation information of the metering equipment needing to be circulated;
s22, generating streaming block data of the current metering equipment according to the streaming information, and extracting a hash value of the streaming block data;
s23, calling a deployed block chain metering device transfer intelligent contract interface, and initiating a block chain auxiliary chain block entering application;
s24, after verification through a sideline consensus mechanism, modifying the state information of the main chain block corresponding to the current metering equipment, and linking the transfer block to the sideline of the current main chain block;
s25, writing the hash value of the data of the flow block into the RFID label corresponding to the current metering equipment;
and S26, storing the circulation information of the current metering equipment and the hash value of the circulation block into a central database of the WEB server side.
When the metering device has borrowing, returning, allocating and other services, that is, device circulation occurs, and the management of the business data of the metering device circulation is shown in fig. 4. When the equipment generates circulation, collecting the circulation information of the equipment, wherein the circulation information comprises the article codes of the equipment, the change information of custodians of the equipment and the like; selecting core data of the circulation information to generate equipment circulation block data, and extracting a hash value of the block data by using an SHA256 hash algorithm; after the block information is digitally signed by a private key of the device, a deployed intelligent contract interface for equipment flow of the block chain is called, a block chain sublink block chaining application is initiated, after verification is carried out through a sublink recognition mechanism, equipment state information of a main chain block corresponding to the device is modified, and the equipment flow transfer block is linked to a sublink of the main chain block; simultaneously, writing the hash value of the circulation block data into a user area of the RFID label of the equipment through an RFID reader-writer; and storing the equipment circulation data and the hash value of the circulation block into a WEB server end central database in a B/S mode through a remote communication network, and adding a time stamp.
The embodiment further comprises a checking service control step of the metering equipment, specifically, when a certain equipment needs to be checked, a block of the equipment on a block chain main chain is inquired, the flow block information of a recent time of a block chain side chain is read, a hash value of the block is obtained, then the hash value stored in an RFID label user area of the equipment is read through an RFID reader-writer, if the data are consistent, the equipment is checked normally, otherwise, the equipment flow is abnormal.
The embodiment also comprises a scrapping business control step for the metering equipment, wherein the data management method is similar to the flow processing method of the metering equipment and is different from the method for changing the equipment into the scrapping processing mode information of the equipment.
The equipment data managed by the whole-life management and control system of the electric power metering equipment is stored in the central database, the RFID tags and the block chain network, so that the equipment data needs to be verified in order to ensure the consistency of the data, prevent the central database from being crashed or falsified, realize root tracing of the data and improve the safety of the data. The embodiment adopts the following verification method for the metering equipment data:
the embodiment comprises a block chain main chain data verification step, which comprises the following specific steps:
judging the state of the target node before calculating the hash value of the target node, and only recalculating the modified node and the node on the path from the modified node to the root node when the content of the target node is changed to obtain a new hash value of the whole tree;
when the content of the target node changes, the content of the parent node changes, and a new parent node is generated and recursively transferred to the root node, such that a new path is created from the modified node to the root node for a change.
In this embodiment, the metering device is an account of the block chain, that is, a registration block on the main chain, the main chain maintains the final states of all devices, and the information transferred by any device each time is forwarded to the main chain, so that the account states on the main chain are synchronously changed. The metering device newly-added registration block structure based on the account principle is adopted in the embodiment as shown in fig. 5, and is used for updating the latest states of all devices in real time. In the block, the parent block hash value field records the hash value of the last block of the block to maintain the chain structure of the main chain; the time stamp field is used for recording the creation time of the block; the hash value field of the current block stores the hash value of the whole data of the block and uniquely corresponds to the content of the current block; the root hash value field of the state tree stores the root hash value of the state tree, and also includes the hash value of the tertiary block list and field information such as the referred tertiary block list.
In this embodiment, the state tree uses a merkel prefix tree (MPT tree for short) data structure to store key-value pairs of all information, and the main-chain data is verified mainly through three aspects:
(1) Enhancing the security of the state tree: the merkel part of the tree is a deterministic cryptographic hash value of a node, and through the mode, a root node becomes a cryptographic signature of the whole tree, so that the state of the whole tree is not changed as long as the root hash value is not changed, and therefore information can be prevented from being tampered.
(2) A mechanism for rapidly computing hash values of maintained datasets: before the node hash value is calculated, the state of the node is judged, and when the content of the node is changed, the new hash value of the whole tree can be obtained again only by recalculating the modified node and the nodes on the path from the node to the root node.
(3) Fast state rollback mechanism: the MPT tree associates a parent node and a child node according to node hash values, and when the content of one node changes, only one hash value is finally changed for the parent node; the content of the parent node is changed to generate a new parent node, the influence is recursively transmitted to the root node, and finally, a new path from the changed node to the root node is correspondingly created after one change, and the old node can still be accessed from the old root node through the old path. As shown in fig. 5, the content of a node is changed from 36 to 79, a new path corresponding to a new block N +1 is created, a new tree is constructed by multiplexing the unmodified node information circled by the block N, and the old path remains, so that the previous value 36 of the node can still be queried through the old state pair. In the main chain structure, when the branch occurs and the state rollback is performed, the old MPT root node is only used as an entry, and the state rollback can be completed.
In the block chain sideline verification mechanism in this embodiment, when the metering device circulation block is linked to the sideline of the device, the internal data of the metering device circulation block cannot be changed any more, and the data is publicly visible to all trusted users, so that the risk of tampering the data does not exist. The device flow block structure based on transaction principle is shown in fig. 6, in the area structure, the parent block hash value field records the hash value of the last block of the block to maintain the chain structure of the sublinks, the version number field records the version number of the software of the block for tracking the update of the software and the protocol, and the timestamp field records the creation time of the block.
In this embodiment, the block formation process is as follows:
(1) Writing the device stream data in the local memory into the block main body;
(2) Generating a Merck tree of all circulation information in the block in a block main body, and storing the value of a root of the Merck tree in a block header;
(3) Generating a hash value of the block data generated immediately before by using an SHA256 algorithm, and filling the hash value into the parent block hash value of the current block;
(4) The current time is saved in the timestamp field.
In this embodiment, the flow data of the metering device is stored in a merkel tree structure, as shown in fig. 6, the merkel tree structure is a binary tree structure, the leaf nodes store the device flow data and hash values thereof, the intermediate node stores hash values obtained by performing hash calculation on combinations of all leaf nodes under the current intermediate node, the root node stores hash values obtained by performing hash calculation on combinations of the entire block intermediate nodes, and the hash values are placed at the head of the block as the root of the merkel tree as a unique summary of a set of flow information. In this structure, a change to any one of the data in the block will cause the structure of the Merckel tree to change, and any change to the underlying data will be passed on to its parent node, up to the root of the tree. In the verification process of the equipment circulation data, only the hash value of the Merck tree root needs to be verified, the data calculation amount can be reduced, and the equipment circulation data can be quickly verified.
The user area of the RFID tag of this embodiment stores the latest block information of the main chain and the sideline, when the device is in the new state, the hash value of the newly added block of the main chain is stored, and when the device is circulated, the latest block hash value of the sideline is stored, and further this embodiment further includes a step of RFID data verification, which includes the specific steps of: inquiring the latest equipment registration block or equipment circulation block of the verified metering equipment in the block chain, calculating the hash value of the block, comparing the calculated hash value with the hash value read out by the RFID label of the verified metering equipment, if the hash value is consistent with the hash value read out by the RFID label of the verified metering equipment, the verification is successful, otherwise, the verification fails, and the data is wrong.
In order to prevent the down of the central database of the WEB server end or the falsification of the core data, the data of the WEB server end needs to be verified in batches periodically without manual intervention. The embodiment also comprises a data verification step of the central database, and the specific steps comprise: sequentially reading the block information of the block chain main chain, wherein the blocks of the block chain main chain store the latest state information of the corresponding metering equipment, and acquiring the hash value of the blocks of the block chain main chain and the core data of the corresponding metering equipment; and reading the latest hash value and the equipment data stored in the WEB server side central database corresponding to the metering equipment, finally comparing the read data to verify the consistency of the data, and if the data are inconsistent, tracing by using the block chain data.
The foregoing is illustrative of the preferred embodiments of the present invention and is not to be construed as limiting the invention in any way. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention shall fall within the protection scope of the technical solution of the present invention, unless the technical essence of the present invention departs from the content of the technical solution of the present invention.

Claims (10)

1. The utility model provides an electric power measurement data management and control verification system based on block chain which characterized in that includes:
the data resource layer comprises a central database of a WEB server end, a blockchain network and an RFID tag, wherein the central database of the WEB server end is used for storing metering full-life management and control data, the blockchain network is used for storing metering information and recording circulation information of metering equipment, and the latest circulation information of the metering equipment is stored in the RFID tag;
the supporting layer is used for realizing access to the data resource layer;
the application scheduling layer is used for scheduling various service accesses of the management and control layer;
and the management and control layer is used for realizing the management and control of the whole service life of the metering equipment.
2. The system according to claim 1, wherein the storage areas of the RFID tags include a reserved area, a TID area, an EPC area and a user area, the reserved area is used for writing a password of a current tag, the TID area stores an identification serial number of a chip of the current tag, the EPC area is used for storing an article code of a metering device bound to the current tag, and the user area is used for storing latest circulation information of the metering device.
3. The system according to claim 1, wherein the block chain network has a double-chain structure formed by a main chain and a plurality of sub-chains, the main chain is configured to store the registration blocks of each newly added metering device based on an account, the sub-chains are configured to form an independent flow block chain by using the main chain blocks as starting blocks based on a transaction, and record all flow information of the main chain blocks, wherein the main chain employs a mercker prefix tree, and each block structure of the sub-chains employs a mercker tree structure.
4. The system according to claim 3, wherein the Merckel tree has a binary tree structure, wherein leaf nodes store flow data of the metering device and corresponding hash values, and intermediate nodes store hash values obtained by performing hash calculation on combinations corresponding to all the leaf nodes; the root node stores the hash value obtained by carrying out hash calculation on the combination of the middle nodes of the whole block, and the hash value stored by the root node is used as the unique abstract of a group of circulation information and stored at the head of the block as the root of the Mercker tree.
5. The system according to claim 1, wherein the support layer includes a communication network, an RFID tag printing device and an RFID reader, the RFID tag printing device and the RFID reader are connected to the data resource layer and the RFID tag, and the application scheduling layer performs distributed service deployment using a micro-service architecture.
6. The method for the block chain-based power metering data management and control verification system of any one of claims 1 to 5 is characterized by comprising a metering device newly adding control step, and the method comprises the following specific steps:
when a newly added metering device exists, the TID sequence code and the article code of the bound RFID label are obtained;
generating newly added registration block data of the equipment according to the acquired data of the newly added metering equipment, and extracting a hash value of the current block data;
calling a newly-added intelligent contract interface of the deployed block chain metering equipment, and initiating a block chain main chain block entering application;
after the verification is carried out through a main chain consensus mechanism, the registered block data of the newly added metering equipment is linked to a main chain of a block chain;
respectively storing the article codes of the current newly added metering equipment and the hash values of the newly added registration blocks into corresponding RFID tags;
and storing the data of the current newly added metering equipment and the hash value of the newly added registration block into a central database of the WEB server side.
7. The method of claim 6, further comprising a metering device flow control step, the specific steps comprising:
when the metering equipment is circulated, collecting circulation information of the metering equipment needing to be circulated;
generating flow block data of the current metering equipment according to flow information, and extracting a hash value of the flow block data;
calling a deployed intelligent contract interface for transferring the block chain metering equipment, and initiating a block chain auxiliary chain block incoming chain application;
after verification through a sideline consensus mechanism, modifying the state information of the main chain block corresponding to the current metering equipment, and linking the transfer block to the sideline of the current main chain block;
writing the hash value of the data of the flow block into an RFID label corresponding to the current metering equipment;
and storing the circulation information of the current metering equipment and the hash value of the circulation block into a central database of the WEB server side.
8. The method of claim 6, further comprising a step of block chain backbone data verification, comprising:
judging the state of the target node before calculating the hash value of the target node, and only recalculating the modified node and the node on the path from the modified node to the root node when the content of the target node is modified to obtain a new hash value of the whole tree;
when the content of the target node changes, the content of the parent node changes, and a new parent node is generated and recursively transferred to the root node, such that a new path is created from the modified node to the root node for a change.
9. The method according to any one of claims 6 to 8, characterized in that the method further comprises a step of RFID data verification, comprising the steps of: inquiring an equipment registration block or an equipment circulation block at the latest time of the verified metering equipment in the block chain, calculating the hash value of the block, comparing the calculated hash value with the hash value read out by the RFID label of the verified metering equipment, if the calculated hash value is consistent with the hash value read out by the RFID label of the verified metering equipment, the verification is successful, otherwise, the verification fails, wherein when the metering equipment is in a newly added state, the RFID label is stored in the hash value of the newly added block of the main chain, and when the metering equipment is circulated, the latest block hash value of the auxiliary chain is stored.
10. The method according to any one of claims 6 to 8, characterized in that the method comprises a data verification step of a central database, and the specific steps comprise: sequentially reading block information of a block chain main chain, wherein the blocks of the block chain main chain store the latest state information of the corresponding metering equipment, and acquiring hash values of the blocks of the block chain main chain and core data of the corresponding metering equipment; and reading the latest hash value and the equipment data stored in the WEB server side central database corresponding to the metering equipment, finally comparing the read data to verify the consistency of the data, and if the data are inconsistent, tracing by using the block chain data.
CN202211366271.XA 2022-10-31 2022-10-31 Power metering data control verification system and method based on block chain Pending CN115879937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211366271.XA CN115879937A (en) 2022-10-31 2022-10-31 Power metering data control verification system and method based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211366271.XA CN115879937A (en) 2022-10-31 2022-10-31 Power metering data control verification system and method based on block chain

Publications (1)

Publication Number Publication Date
CN115879937A true CN115879937A (en) 2023-03-31

Family

ID=85759345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211366271.XA Pending CN115879937A (en) 2022-10-31 2022-10-31 Power metering data control verification system and method based on block chain

Country Status (1)

Country Link
CN (1) CN115879937A (en)

Similar Documents

Publication Publication Date Title
CN110442652B (en) Cross-chain data processing method and device based on block chain
CN110609869B (en) Block chain-based data storage method, related equipment and storage medium
CN109034833B (en) Product tracing information management system and method based on block chain
CN108053001B (en) Information security authentication method and system for electronic warehouse receipt
WO2020000707A1 (en) Anti-fake method and system based on block chain, computer device, and storage medium
CN110472116B (en) Alliance block chain service network, alliance node thereof and product data storage method
JP4062985B2 (en) Electronic tag unique number management method and management server
CN110827028B (en) Block chain-based data acquisition transaction system and method
CN109426868A (en) Life period of equipment distribution ledger
CN102831529B (en) A kind of commodity information identification method based on radio frequency and system
CN113574913A (en) Method and system for preparing and performing object authentication
JP7422366B2 (en) Methods, application servers, blockchain nodes and media for logistics tracking and origin identification
CN112347521A (en) Medical data management method and system based on medical block chain
CN112737782B (en) Method and apparatus for providing cross-chain messages
CN112487042B (en) Electric energy metering data processing method, device, computer equipment and storage medium
CN113656780A (en) Cross-link access control method and device
US20230019729A1 (en) System and Method of Providing Physically Authenticated Digital Tracking and Association for Objects and Products
CN111429250A (en) Data management method and device in escort scene
CN115879937A (en) Power metering data control verification system and method based on block chain
CN116091087A (en) Quantum encryption anti-counterfeiting tracing method and terminal based on blockchain and NFC
CN109509007A (en) Product false proof electronic tag and electronic tag authentication method and system
CN115730933A (en) Data processing method, device and equipment based on block chain and storage medium
CN110910091A (en) Data processing method, device and medium
Felicetti et al. Deep Learning/PUF-based Item Identification for Supply Chain Management in a Distributed Ledger Framework
CN112905657B (en) Block chain data processing method and system capable of protecting user privacy

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination