The rapid development of the energy Internet continues to influence and change the architecture of the grid.The Energy Internet involves a broader range of energy forms and a wider range of participants and decentralized interaction models.These aspects increase the complexity of the energy internet and pose a huge challenge to building trust within the system.Blockchain technology has the characteristics of decentralization,transparency,tamper resistance,traceability,etc.And the blockchain is compatible with the energy internet conceptually and can solve the trust problem in the energy internet.The data in the blockchain is transparent and open(such as bitcoin)to ensure traceability of the data.Therefore,data stored in the blockchain is prone to reveal user privacy.There is the real-time electricity data of users related to the privacy of users closely stored in the electricity blockchain.Therefore,the thesis selects the distribution network environment connected to multiple distributed generations under the energy internet.And then an electricity auction transaction scheme of distributed network blockchain based on smart contract is proposed.In addition,decentralization is introduced into the grid.The blockchain is applied to save the user’s real-time electricity consumption data collected by the smart meter.Then an electricity blockchain is designed and and a privacy protection scheme based on homomorphic encryption is proposed for the privacy leakage problem.This thesis analyzed the characteristics of distributed electricity trading in distribution network by introducing the idea of decentralization into electricity trading.And an electricity auction transaction scheme of distributed network blockchain based on smart contract was proposed.Then the process of the scheme was discussed in detail from the perspective of blockchain.The thesis constructed a distribution network electricity trading smart contract with the auction mechanism considering the trend of power flow while multiple distributed generations were connected to the grid.The stability of the distribution network was ensured through safety check and congestion management.Finally,the efficiency and advantages of the scheme were analyzed,and in order to prove the feasibility of the scheme,the smart contract of electricity trading for the IEEE 33 nodes distributed system was designed as an instance and then deployed to the private chain of Ethereum.It proved the correctness of the contract compared with the test results in the Visual Studio 2017 environment.This thesis analyzed the disadvantages of the centralized structure of real-time power data collection and storage in the power grid.And then an electricity blockchain based on smart contract was constructed to save the real-time electricity consumption data of users and complete functions such as electricity bill settlement by introducing decentralization into power grid.In the electricity blockchain,the transparency of data makes users’ privacy threatened.Therefore,an electricity blockchain privacy protection scheme based on homomorphic encryption was proposed.From the perspectives of identity privacy and data privacy of the user,the scheme designed a dual account structure to protect the user’s identity privacy security,and applied the additive homomorphic encryption algorithm to encrypt users’ real-time electricity to protect the user’s data privacy security.In addition,to solve the problem of large storage space consumption of matrix operations in BGN homomorphic encryption algorithm,a more efficient and less space-consuming additive homomorphic encryption algorithm was designed by changing the matrix operation to vector operation.Then the security and additive homomorphism of the algorithm were proved by theoretical analysis.The algorithm was used to encrypt the real-time electricity consumption data of the user and at the same time realized functions such as electricity bill settlement.Finally,by the comparison with other privacy protection schemes in the blockchain,the advantages of this scheme in the electricity blockchain were proved. |