Figure 8. Flow diagram of P-PoW algorithm
By analyzing above flowchart, it can be seen that P-PoW algorithm
proposed in this paper only needs to know the hash value P of
previous block to start running, and this hash value is also referred to
as hash pointer. To generate a new block signature, P-PoW algorithm
combines hash pointer with a random number, and calculates the hash
value of combination string. During new block generation process, the
random number that minimizes the aforementioned hash value would be used
as the signature of that block. The above process can be represented by
following formula:
(1)
Where S n is the signature of n -th block,P n is the block header hash value of
(n−1 )-th block, H (·) is hash function, andr d is the random number generated in thed -th round computation in block generation process. In the
generation process of n -th block, this random numberr d minimizes the result of hash functionH (·) in equation (1).
During the iterative calculation of block signature, block data area is
simultaneously being filled with real-time data. Unlike Bitcoin
blockchain, the application scenario discussed uses blockchain to store
electric power data, where each data item D can include fields
such as sampling time, data type, sampling value, station name,
equipment identity, etc. A possible implementation method will be
discussed in Chapter 4 of this paper.
In new block generation process, signature iterative calculation and
real-time data filling proceed parallelly, and these two processes
continue to run until timer reaches a predetermined moment or other
interrupting events occur. Subsequently, when interruption events
happen, hash pointer, Merkle root hash value, timestamp, block signature
of new block are determined. And the new block is added to blockchain.
4.2. Trusted Transmission Scheme for Electric Power Real-Time Data
Applying P-PoW algorithm to the transmission of electric power real-time
data requires further consideration of dispatch data network structure.
Figure 9 shows the structure of electric power dispatch data network,
where the core layer consists of provincial dispatch, backup dispatch,
and two important 500kV substations, forming a partial mesh network
between nodes; the backbone layer consists of 8 local dispatches and 14
hub substations, and the nodes in backbone layer connected each other in
a mesh or ring manner, forming a ring with the core layer nodes; the
access layer includes remaining 220kV and 110kV substations and 15 power
plants, with substation nodes connected to the backbone layer nodes in a
ring structure. It can be seen that electric power dispatch data network
presents a tree organization structure: from access layer to core layer,
the number of network nodes decreases, while the importance of nodes
increases. Consequently, the communication bandwidth and hardware
configuration of higher-level nodes are much higher than those of
lower-level nodes.
Considering electric power dispatch data network characteristics, P-PoW
algorithm can be applied to data transmission application scenario
between substations, power plants, and dispatch control centers. Figure
10 shows real-time electric power data transmission method based on
P-PoW algorithm, where Substation A, Substation B, and the power plant
are all equipped with local computing and storage devices. And each node
maintains a blockchain to store electric power real-time data locally.
In substations and power plants, the dedicated servers collect real-time
data generated by various data acquisition devices, encapsulating
real-time data in block structures through P-PoW algorithm, and store
such data in local blockchain. Meanwhile, the substations and power
plants send new blocks to local dispatch nodes incessantly.