Research on the application of block chain technology in electricity trading system

. As the technical basis of Bitcoin, block chain has the characteristics of decentralization ， openness and transparency. In order to promote the development of security and openness of power trading system and solve the trust problem among participants in power market ， a new research direction of power trading method based on block chain is proposed. Therefore ， this paper outlines the block chain ， explains the definition and characteristics of block chain in detail ， discusses the application of block chain in power trading system ， and summarizes the challenges faced by block chain technology in power trading system.


Overview of block chain and power trading system
At present, electricity trading is different from ordinary commodity trading. With the continuous opening of the electricity market, the number of trading entities participating in electricity transactions has gradually increased, and the trading methods and pricing mechanisms of electricity services have become increasingly complex. Therefore, in view of the above problems, block chain technology is adopted to meet the characteristics of joint maintenance, sharing, and nontampering of market data, and a co-constructed and shared power trading environment is built on the electricity side [1][2] .

power trading system
Electricity transactions generally include electric power trade, right transmission transactions, and ancillary service transactions. The existing electricity transactions in our country are mainly completed by centralized transaction centers. That is to say, the whole transaction process is dominated by specific institutions. It not only reduced all participants in the power trading to data islands and poor data circulation, but also ignored the autonomy and selectivity of the central part of the power market, and inevitably created contradictions between the power market players and the leading trading institutions [3] . At the same time, power transactions are difficult to trace and trace, and lack of safe and credible support has been criticized as unfair and opaque. It can be seen that the trust problem caused by the centralized scheduling method will bring high additional costs to the transaction [4] .

block chain technology
At present, the definition of block chain technology has not yet been recognized. "Block chain: New Economic Blueprint and Guide" defines it as an open and transparent, decentralized database [5] . This definition clarifies the two most important features of block chain, but it is not clear enough. Literature [6] believes that block chain is a decentralized infrastructure and distributed computing paradigm that is an organic combination of important technologies such as encryption algorithms and consensus mechanisms. This definition fully expresses the uniqueness and innovation of block chain technology as a brand-new decentralized infrastructure and computing paradigm. Figure 1 is a hierarchy diagram of the block chain.

Features of block chain technology
The block chain has the characteristics of decentralization, transparency, traceability, and system autonomy, for it adopts a series of technical combinations such as cryptography methods, "block + chain" structure, consensus algorithms, and smart contracts [7][8][9].
(1) Decentralization. Block chain technology does not establish a trust relationship between multiple nodes through a central node. Instead, it uses simple mathematical methods to back up data at various nodes, significantly improving the accuracy and reliability of data storage.
(2) Transparency. The operation rules and data of the block chain system can be queried at all nodes, and the information is highly transparent, which becomes a necessary condition for the block chain system to win trust.
(3) Traceability. The block chain uses time-stamps and a chain structure. Not only the transaction information is indicated by time-stamps, but its transmission path is also recorded and tracked through the complete chain structure. Therefore, it is difficult to tamper with the transaction information of the block chain.
(4) System autonomy. The block chain system uses technical means such as consensus algorithms and smart contracts to ensure that the system can automatically run and operate without third-party trust guarantees.

Specific application of block chain
As for the power trading system based on block chain technology, block chain technology, as a low-level technology, can be applied to the following links of the transaction process.
(1) Power transaction billing medium. The transaction medium is the core component of the block chain system. Similar to Bitcoin and Ethereum, when virtualizing electricity as a digital asset, choosing "electricity currency" as the transaction medium can promote the development of the block chain of the electricity trading system.
(2) Registration and issuance of electric power. The registered publication of electricity is used to indicate how much electricity the power plant can produce at any given time. In the block chain of the power trading system, electricity is virtualized as a digital asset "power coin" and registered and issued on the block chain. Users can purchase electricity in the manner of purchasing actual commodities.
(3) Electricity trading. Electricity producers issue electrical energy to the block chain, and users (individuals or enterprises) can conduct electricity trading through electricity trading platforms or offline peer-to-peer methods. The transaction information in this process includes buyer and seller information, electricity price information and transaction electricity amount etc.
(4) Electricity collection and subsidy payment. As an essential task of the traditional power trading system, collecting electricity bills often consume more human resources. The power trading system, based on the block chain, can efficiently complete the task of collecting electricity bills. The use of block chain technology can not only collect electricity fees in real-time during use but also record and distinguish. We cooperate with the government's subsidy policy to encourage the production and consumption of environmentally friendly power and energy (5) Electricity payment and settlement. The use of "power coins" to record power transaction information helps alleviate the pressure of power payment, arrangement, and agreement. We can use block chain technology to run distributed transaction programs and smart contract technologies on nodes, and it is to achieve real-time clearing and settlement of electricity payments without going through banks.

The block chain transaction process in the power trading system
Different from the traditional power trading system, the application of blockchain to the power trading system can improve the effectiveness and security of power asset issuance, trading, service and management. The block chain transaction process in the power transaction system attaches importance to the immutability and undeniability of the block chain transaction record. Therefore it can accurately record the entire process of the power transaction. The core steps are shown in The power user submits a power purchase application, completes the payment, and the transaction information is recorded in the regional company. (According to the payment and settlement contract, funds are divided and the data is written into the block. Information includes time, power user, power generator, power purchase, unit price, etc) According to the payment and settlement contract, funds are divided and the data is written into the block.

Application scenario
Electricity users submit electricity demand in the trading platform, and n power generation companies participate in the transaction declaration. The electricity transaction process adopts the block chain method for organization, transmission, consensus and storage. Multilateral cooperative game transactions between generators and consumers on the power trading platform are not limited to two-party transactions. The unit production cost function of each power generation company is shown in Equation 1. The quotation function is specifically shown in Equation 2.

 
Where: i a , i b , i c respectively are the generation cost function coefficient of the i-th company; i p is the actual output of unit i ; i k is the quote function The actual output of a certain enterprise's generator set needs to meet the upper and lower limits of actual output.
To ensure that the profit of all units is non-negative, the marginal pricing method is used to determine the market clearing price. According to the market clearing price, a cooperative game and income distribution plan for power generation companies with the best income is given. Using the Shapley value distribution board players to participate in the market transaction cooperation game generated by the common profit mouth, the benefits shared by the players are expressed as Where: N is the set of players in the game, with n elements; S is the alliance generated from N , with S elements;   ( {}) indicates the marginal contribution of the players to the alliance S .
After the power generation and consumption companies reach a consensus, a transaction form is formed on the system to record the information of the transaction generator and user, creation time, transaction power, transaction power price, transaction time and other information. After the transaction sheet has been reviewed by the trading center and the grid company's safety check, power users, power generation companies, and grid companies sign power purchase contracts and power transmission contracts. Power transaction information is recorded in the system in the form of a block chain.

Problems and challenges
At present, although the research on the block chain based power trading system has made some progress, as a new technology that has just emerged, the block chain still faces problems and challenges. In the power trading system, the challenges faced by the block chain are mainly reflected in the two levels of technology and policy.

Technology level
Block chain technology is an emerging technology that is still in the development stage, and there is always room for improvement and improvement. The number of application cases of block chain technology in the energy field is small and small, and the potential problems at the technical level cannot be fully highlighted. At present, the critical technical issues in the application of block chain technology can be summarized in the following three aspects.
(1) There are information security issues. The encryption mechanism, smart contract and privacy protection mechanism used by the block chain technology all have hidden security risks. With the development of cryptography, the encryption mechanism adopted by the block chain will become increasingly fragile, and the probability of distributed nodes being invaded gradually increases, which will cause the leakage of node account information. The smart contract of block chain technology is still standardized and unified and has its security threats. Therefore, a smart contract needs to be regularly updated and maintained. The nodes of the block chain system cannot be completely anonymous, and the data is entirely open and transparent, which is very unfavorable to the privacy protection of users.
(2) There are efficiency and response speed issues. The block chain system requires each node to have a complete set of data, and the increase in the length of the block chain will lead to an increase in data storage costs. Besides, in the transaction process, because the optimal results of the block chain involve data transmission and verification between a large number of nodes, the transaction volume processed by the block chain per second is not large enough compared with mature bank transaction platforms. The transaction delay problem of the power trading system block chain will limit the scale of its application projects.
(3) There are data maintenance issues. Everyone has power trading needs so that the power trading system based on block chain technology contains a large number of nodes. Besides, the amount of data stored by each node itself is considerable, so it is extremely difficult to filter, manage, and maintain the overall data of the project.

Policy level
Energy security is about the lifeblood of the country. The application of block chain technology in the energy industry will have an impact on the traditional business model, so domestic and foreign countries are very cautious about the use of block chain in the energy industry. For relevant projects to be implemented, they must be supported by appropriate policies and laws. At present, this new technology has uncertainties in the use of the law. With the continuous development of block chain technology, there is a certain degree of incompatibility with legal rules, which will limit the growth of block chain. Besides, the trust mechanism of block chain technology is completely different from

In conclusion
There are many participants in the power trading system, and there have always been trading frictions caused by trust issues. Block chain technology can solve this problem to a high degree by its decentralization, openness, and transparency. This paper analyzes the application of block chain technology in each link for the specific relationships of the power transaction process, and on this basis, gives the power transaction method and specific transaction process based on the block chain. Although block chain technology has shown good prospects in power transactions, block chain technology is not a panacea. Its core advantage is to change centralized management to distributed, without improving system performance. Given this, this article finally discusses the challenges faced by block chain technology in the power trading system from both technical and policy aspects, which helps to establish a power trading system based on block chain technology in line with China's national conditions. Block chain in energy system: concept, function and prospect.