The market-oriented transaction of Distributed Energy Resources(DER)is one of the important measures for my country’s power grid to solve the problem of local consumption of DER and ensure the safety and stability of the distribution network.In recent years,blockchain technology has been widely used in the energy Internet,especially in the field of distributed energy trading,due to its features of decentralization and traceability.In the single-chain structure,each transaction is stored in a block,which leads to more data stored in the blockchain.Therefore,the storage capacity of the node is insufficient.In addition,the single-chain structure cannot guarantee the independence of user privacy information and transaction data,which may lead to illegal access and tampering of distributed energy transaction information.Side chain,hash time locking,master-slave chain structure and other technologies can improve the storage scalability of blockchain and provide new solutions to solve these problems.This paper analyzes the problems of blockchain technology in distributed energy trading,and proposes a distributed energy trading model based on multi chain.This model decentralizes the centralized authentication strategy to the side chain,which protects user privacy information.At the same time,the power transaction storage structure based on the master-slave chain in this model enables the efficient storage of massive transaction data in the distributed energy transaction scenario.This paper deploys the main chain and side chain through the cross-chain technology platform Bitx Hub,and finally realizes the functions of cross-chain asset transaction and information sharing of the main chain and side chain on Ethereum.Finally,it is proved theoretically that the master-slave chain structure of this model has high load capacity and cannot be tampered with.In order to solve the problems of slow consensus speed and lack of punishment for malicious nodes in distributed energy transactions,this paper designs a distributed energy consensus mechanism based on reputation value.This mechanism limits the number of nodes participating in consensus,divides consensus nodes into three categories: master node,voting node and candidate node,and uses simplified consensus protocol to quickly reach consensus.In order to prevent malicious nodes from frequently exiting or joining the network,the mechanism introduces the reputation point system.Finally,this paper uses Docker technology to simulate the consensus mechanism.This experiment simulates the change of node reputation value of this mechanism in the presence of faulty nodes.Then,a comparative experiment on consensus performance was carried out with the PBFT algorithm.Experiments show that this mechanism can reduce the coordination time between DERs on the premise of ensuring the same fault tolerance rate.At the same time,it has a punitive effect on the malicious nodes. |