Research on Distributed Energy Transaction Technology Based on Blockchain

The distributed power industry has the characteristics of multiple participants, long business processes, and wide distribution areas, which leads to serious data islands, difficulties in credit transmission, and outstanding transaction risks. Blockchain has technical characteristics such as openness, transparency, traceability, tamper resistance, and decentralization, making it an inevitable trend for its extensive and indepth application in the energy and power industry. The article first analyzes the generation and development of block technology, and then analyzes the current application status of block chain technology in distributed power transactions; then, based on the summary of existing research, it introduces in detail the blockchain-based technology The technical mechanism design of the distributed energy trading scheme analyzes the problems existing in the current application of blockchain in the field of distributed power trading, and proposes targeted development suggestions.


Introduction
Distributed energy, as a comprehensive energy utilization system, combines primary energy with natural gas as the main energy and secondary energy with cogeneration as the main energy, and is supported and supplemented by the public energy supply system to realize energy trapezoidal utilization [1]. Distributed energy has the highest resource and environmental benefits. my country's power system needs to use distributed energy to gradually replace energy from place to place [2]. At present, trust issues caused by opaque information, undisclosed rules, and untimely subsidies in the process of distributed energy transactions have received more and more attention [3]. For example, some energy service providers or load aggregators falsify information to defraud subsidies after mastering the information on the national subsidy issuance policy; users falsify their own transactions and electricity data to defraud high subsidies; the transaction volume caused by power loss in electricity market transactions Inconsistent with the actual receiving volume, etc. [4]. Blockchain technology with the characteristics of decentralization, traceability, transaction transparency, and non-tampering can solve the above-mentioned trust problem [5], so this paper studies the distributed energy transaction scheme based on the blockchain to optimize the distributed energy transaction system Provide new ideas.
Domestic scholars have put forward many ideas for the application of blockchain in the energy field. Literature [6] considers the network constraints and proposes a scheme of using blockchain and smart contracts for power transaction management in the energy Internet. Literature [7] proposed an overall framework for comprehensive demand-side response resource transactions based on blockchain technology. Literature [8] introduced the decentralized idea of blockchain technology into power distribution-side power trading, and conducted research on intelligent power trading mechanisms between producers and consumers. Literature [9] takes into account economic benefits and energy saving and consumption reduction, and applies blockchain technology to trans-provincial power generation rights transactions. Literature [10] proposes the information and physical flow of energy transactions between energy producers and consumers using blockchain technology, and simulates the information matching, authentication and value transfer of energy transactions. However, the above-mentioned documents basically stay at the level of theoretical discussion, and are more about application scenarios. There are relatively few conclusive results that can be applied to engineering, and they lack verification and simulation under actual platforms. Foreign scholars prefer to construct a blockchain technology system in a certain scenario. Literature [11] uses the alliance chain to solve the transaction security and privacy protection problems in the electric energy auction between hybrid vehicles. Literature [12] established a P2P transaction microgrid model and designed smart contracts to give local consumers the opportunity to participate in P2P energy transactions. It can be seen from comprehensive domestic and foreign research that the current research is mainly biased towards the theoretical application and system conception of the blockchain, as well as the description of the implementation process of smart contracts, and lacks the design of actual smart contracts and the realization of transaction processes.

Research progress of blockchain technology
Blockchain technology originated from a paper in the cryptography mailing group in 2008 that advocated digital encryption currency, and then a digital currency, Bitcoin, was realized as an open source. Its purpose is to build a digital currency that spans government and bank centralized management. At the same time, general currency functions are realized through technical means. In recent years, digital currency has flourished, and blockchain technology has attracted widespread attention and applications. Bitcoin demonstrated for the first time a distributed database (ledger) design based on technologies such as cryptography, P2P networks, and consensus algorithms. Blockchain technology has also continued to develop. At present, Blockchain 1.0 represented by Bitcoin, Blockchain 2.0 represented mainly by Ethereum and HyperLedger based on smart contracts, and blocks targeting a programmable society have been formed. Chain 3.0 technology path. The blockchain technology system has a certain degree of flexibility, and various digital currencies and industry applications form a unique technical framework according to actual needs. The typical technical content of the block chain mainly includes: In terms of basic support technology, it mainly includes chain block data structure, digital encryption, distributed network, consensus algorithm, smart contract, Merkle Tree structure and hash ( Hash) functions, consensus algorithms, etc.; In terms of application architecture, it generally includes network layer, data layer, consensus layer, contract layer, application layer, etc. from bottom to top; In terms of technical characteristics, it has distributed synchronization and decentralization , The whole process is traceable, can not be tampered with, has the characteristics of confidentiality and openness, and high degree of automation. In addition, blockchain technology has gradually attracted attention in application security and integration with artificial intelligence technology.
From a narrow perspective, a blockchain is a chained data structure that connects blocks of data storage in chronological order [13]; it can be regarded as a distributed ledger, which has the characteristics of nontampering and non-fabricating. From a broad perspective, blockchain is a new type of data storage and verification based on a chain structure, a node consensus algorithm is used to generate new data, asymmetric encryption is used to ensure data security, and smart contracts are used to control and run data. Calculation. The blockchain is essentially a distributed database with an incentive mechanism that is difficult to tamper with. However, due to the needs of financial supervision in China, the incentive mechanism cannot be implemented, so it is essentially a distributed database without an incentive mechanism. Therefore, in the domestic application of blockchain, its non-tamperable features and smart contract functions are mainly used. Blockchain has the characteristics of traceability, non-tampering, safe and reliable, and autonomously programmable, so it can be used to record and store any information and ensure its safety and accuracy. Block chains can be divided into public chains, private chains, and alliance chains according to the main management responsibility. The public chain is a fully decentralized blockchain that has no authorization mechanism and is open to all nodes; the alliance chain only allows specific group members and limited third parties to join, and internally designates multiple pre-selected nodes as part of the bookkeeper to decentralize The private chain can be regarded as a special alliance chain with only one management agency. Obviously, if distributed power transactions are based on public chains, it is inappropriate for all companies and individuals to participate directly without authorization. The alliance chain is more suitable for the distributed power trading environment. The power trading center or dispatching agency is equivalent to the management node of the alliance chain. Only certified market members can be authorized to participate in the power transaction.

Interconnection consensus mechanism
Interconnection consensus is the core issue of blockchain technology in a decentralized environment. Most of the current power blockchain trading market assumptions are to build a public chain and use the PoW workload proof consensus mechanism. In the PoW-based public chain, the blockchain has been proved that when the computing power is less than 50%, the transaction information on it cannot be forged and modified. In view of the fact that the electricity market is a monopolistic market in my country, the system has high confidentiality and the possibility of 51% illegal computing power is small, so the implementation of this scheme in the application has been considered and used more often in the existing literature [14]. However, there is an "impossible triangle" paradox in the design of the blockchain technology system, that is, the system cannot take into account the three properties of decentralization, efficiency, and security [15]. Literature [16] researched and improved the consensus mechanism, and proposed a solution to eliminate abnormal nodes in the DPoS consensus mechanism in a timely manner, that is, to publicly vote on anonymous nodes and identify the status of the nodes.

Energy Trading Account
At present, the transaction mode of blockchain can be divided into two types, one is the utxo model based on bitcoin system, and the other is the account transaction of Ethereum.The transaction mode of bitcoin is different from the traditional transaction relying on the third party organization, which only relies on the utxo model to complete the transaction [17].In the utxo model, only the input and output values are concerned, that is, the buying volume, selling volume and balance of distributed energy transaction.Ethereum abandons bitcoin utxo model and designs account model instead. Users can directly see the change of account status before and after transaction.Both have their advantages and disadvantages. For example, utxo has anonymity, and any user's unused transaction information is confidential to achieve privacy protection, but the account model cannot achieve anonymity; utxo can run in parallel, but Ethereum is difficult to expand; utxo model can only realize simple conversion of account status and lack of circular statements, while Ethereum realizes complex state transition through several lines of code of smart contract; utxo scripting language lacks Turing completeness and cannot be combined with smart contracts, while Ethereum can be combined with smart contracts [18].Referring to the concept of Ethereum's account model, the distributed energy trading account can be divided into external account and contract account.Any state change of the distributed energy trading system is triggered by the transaction of the external account, which is the information transmission between the external account and the contract account in the transaction process. The "transaction information" transmitted between the external account only realizes the simple value transfer. The "transaction information" transmitted between the external account and the contract account can be executed by the program code in the contract accountThe "status information" transmitted between the user and the external account triggers the state change of the external account, thus completing the node account payment, collection and other transaction operations in the process of distributed energy transaction.

Payment mechanism
In order to avoid the restrictions of financial supervision and respond to the national policy and regulations that prohibit the use of ICO, the distributed energy trading platform based on blockchain uses power points instead of legal currency or token to transmit capital flow.The system issues points to the nodes according to the following situations: 1) the new node registers and logs into the system for the first time.A certain amount of initial points can encourage users to try to use the system, which is conducive to the establishment of integrity development environment.2) At the completion of the transaction, the node sold, purchased and used clean energy.Every 1kW ā h clean power is labeled by the system, and the node will also get green certificate when purchasing clean power. The certificate indicates the source of the specific 1000kW ā h power purchased, which is convenient for tracing.3) Nodes contribute to the calculation of the system.For example, the node helps the system calculate the Merkel tree root and verify the transaction information.4) The node obtains the accounting right of the block, packs and manages the block.The node obtains the accounting right through the dpos mechanism of equity certificate and voting, and the system can set the carbon emission certificate or green certificate as equity.In the blockchain trading system, only the power points in the wallet account can be used to trade between nodes. Users can use the points to exchange electricity charges and pay settlement. At the same time, the power points can be identified and tracked, effectively prevent malicious tampering, and ensure that only one payment can be made.Users can use, transfer and exchange power points. If there are not enough energy points in the node account, they can purchase from other nodes.That is to say, the distributed energy trading platform based on blockchain regards power points as a value carrier to support asset circulation, a right proof to support user consumption, and a social consensus to develop market mutual trust.

Conclusion
The advantage of distributed energy trading based on blockchain is that on the one hand, it makes distributed energy P2P trading transparent and convenient, on the other hand, it ensures centralized and effective supervision.The disadvantage is that the number of distributed nodes on the grid has a certain upper limit, which will bring higher risk to the operation of the trading market.At present, there are few reliable and realizable application cases of blockchain entities, and the subsequent problems of blockchain throughput increase, security protection and data processing optimization have not been solved. It is difficult for blockchain technology to be implemented in the distributed energy trading market.The future distributed energy trading blockchain market may be a form of Multi Chain Collaboration and cross chain circulation. It will interconnect the source network storage, Internet of things, microgrid, power trading, carbon emissions, multi energy complementation, asset-based energy projects and other fields through different blockchains, so as to solve the problem of interface expansion and adaptation, and accelerate the distribution of distributed energy in cross chain form.