| As an industrial-level application of the Internet of Things,the Industrial Internet of Things integrates technologies in many fields and gradually develops towards Industry 4.0.Among them,the industrial Internet of Things energy transaction realizes the efficient use of resources through network interconnection and data exchange.However,great majority of the current IIoT infrastructure is based on a centralized architecture,which is vulnerable to a single point of failure,causing huge losses in real production.Blockchain is a distributed system whose tamperproof and autonomous features can provide data security for the Industrial Internet of Things.This thesis focuses on building a scalable blockchain platform for industrial IoT energy trading,which supports structural expansion and configuration modification to accommodate different optimization scenarios.The traditional blockchain has a long final confirmation delay(TTF),and in industrial production,the slow response to important information may lead to serious losses.Moreover,IoT devices usually have limited computing power and storage capacity,and it is very inappropriate to record a complete blockchain ledger or to use PoW that consumes computing power.In addition,despite the anonymity of the blockchain,transaction information may still expose the private information of participants,which may lead to significant property losses.Therefore,this thesis conducts in-depth research on the above challenges,and the main work is as follows.To resolve the efficiency and reliability of point-to-point energy trading in the Industrial Internet of Things,this thesis proposes a blockchain-based energy trading system,which is optimized in terms of smart contracts,storage methods,and consensus algorithms.The resource status in energy transactions is maintained and recorded in the blockchain through smart contracts,thereby providing accurate data synchronization and achieving atomic transactions.Considering the limited storage and computing power of IoT devices,this thesis adopts cloud storage and state data storage to reduce the local storage burden and support fast data query;in order to improve the consensus efficiency of the blockchain,a lightweight consensus algorithm is proposed based on PBFT and RAFT,which reduces the transaction confirmation time.While extending the computing power consumption of nodes,it provides security protection against Sybil attacks and double-spending attacks.The simulation results show that the proposed scheme has good effect.To resolve the privacy leakage problem of energy transactions in the Industrial Internet of Things,this thesis proposes a group-sharing blockchain architecture to achieve reliable privacy protection through ring signature algorithm and PBFT-based group consensus algorithm.Although the blockchain anonymizes the information of buyers and sellers,attackers with certain prior knowledge can still obtain the private information of participants from transaction data.To solve this problem,this thesis introduces a ring signature algorithm to blur the association between user information and transaction information,making it difficult for attackers to crack.In addition,this thesis proposes a group consensus algorithm,which can achieve efficient data consensus while ensuring transaction data isolation.The simulation results show that the proposed scheme has good effect.Finally,this thesis designs and implements a scalable blockchain system to ensure that the data in the system is open,transparent,traceable and difficult to be illegally tampered with.This thesis designs and implements a blockchain system with an alliance architecture.Compared with public chains,it has strict node access restrictions and is more flexible in form.It designs and implements an interfaced transaction structure module to support token business and token-free business.Considering the delay requirements of the Industrial Internet of Things and the computing power of IoT devices,a switchable consensus algorithm module is designed and implemented,and a variety of switchable consensus algorithms are set up based on PoW,PoS,PBFT,etc.to adapt to throughput and delay.Require.In order to ensure the stability of the system,this thesis adopts fork detection and retransmission to prevent possible forks.Finally,in order to improve the usability and practicability of the system,this thesis also designs and implements modules such as visual interface,log system,and performance analysis to provide users with an efficient and fast operating experience. |