A Design of the Settlement Mode of the Electric Vehicles’ Shared Private Piles Based on the Energy Block Chain

To deal with a series of settlement problems such as the insufficient security for the user’s transaction, the complex process of settlement and the difficulty in data analysis within the sharing mode of the electric vehicles’ private piles, this paper proposed a new settlement mode for the shared private piles of electric vehicles. This mode took the shared charging network of the vehicle networking and the pile networking as the background, built a decentralized energy block chain, optimized the structure of the settlement mode by using distributed ledger technology, and used the intelligent contract algorithm to improve the settlement efficiency of charging orders. At the same time, this mode considered the transaction records and subsequent data analysis in its design, and used the evidence-storage and traceability technology to facilitate the integration of charging information data and to realize the configuration optimization of charging network.


Introduction
With the rapid progress of industrial technology in the new era and the strong support of the nation for energy conservation and environmental protection policies, the retained number of electric vehicles in China has been increasing year by year, and with the automobile sales ranking first stably in the world, it is expected to increase more cars than 7 million in 2021. While the retained number of electric vehicles and the demand for parking spaces in China are growing constantly, the pile ratio and its growth rate still remain high, even with such industrial phenomena having emerged as the low utilization efficiency of certain facilities and the insufficient supply of charging piles. In the face of a series of electric vehicles' charging problems that need to be solved urgently, it is found that the charging services mode dominated by public collective charging piles in the past is slightly backward, and it is difficult for it to meet the normal operation of the electric vehicle industry in the future. Moreover, private charging piles are idle for most of the time, resulting in a waste of charging resources and an obstacle to the further development of the whole new energy industry.
In recent years, China has also attached great importance to and actively guided the construction of private charging piles. It is expected to build more than 2.8 million private charging piles by the end of 2020, accounting for 58.3 % of the total number of them. However, the increasing number of private charging piles is in sharp contrast with the low utilization rate. For this reason, the adoption of the sharing mode with public-private combination and pile sharing as the core is the key to guide the development of China's charging services market [1].
With the help of the charging environment of the vehicle networking and the pile networking, it is an effective way to solve the problem of the charging industry by building a smart and safe operation platform of charging services based on the operation mode of shared private piles. At present, many operators are also exploring a new mode to allow the collective access of public and private charging piles to the network together, trying to solve the charging dilemma of new energy vehicles.
However, the existing sharing charging mode of electric vehicles still adopts the traditional economic structure, so there are a series of drawbacks in its fund settlement: Primarily, the insufficient security of transactions for the users: In the traditional settlement mode, the network access and the fund flow are often accompanied by the asynchronous phenomenon of information changes and data update on the platform. It is prone to the disclosure of users' privacy and the tampering of key data, which is difficult to ensure the security of cost settlement.
Secondly, the complex process of settlement and the inefficient order settlement: The existing power transaction is a kind of settlement based on the centralized architecture, and there are many processes and links in one transaction; the settlement data is provided by multi-business entities, and it needs to be supported by complex data verification, not to speak there is a problem of rigid architecture.
Thirdly, the difficult analysis of settlement data and the nonuniform standard of cost settlement: The idle settlement of free charging is not conducive to the data analysis of the enterprises of power grid or the operators of charging services after the order settlement. The databases of different operators of charging services are different, and the sharing of various types of data is relatively less, which is prone to produce 'the information isolated island' [2].
Block chain technology has gained wide attention in recent years. Due to its internal decentralization, strong confidentiality, distributed nature, point-to-point transactions, openness, high security and other characteristics, the energy block chain formed by the new mode of 'block chain [3] + energy' can be highly close to today's economic market of shared electric vehicles in terms of the capital settlement of the spot transactions of energy.
Based on the technology of energy block chain [4], intelligent contracts and Bancor algorithm, this paper designed a mode of fund settlement for the shared private piles of electric vehicles. By constructing the platform of block chain and signing intelligent contracts, the certain drawbacks of the fund settlement of private piles of the sharing mode were properly solved, which can help the sharing economy to flourish and the new energy industry to further advance.

Design Thought
The existing shared charging mode of electric vehicles still uses the traditional economic structure for fund settlement. In view of its business characteristics and specific drawbacks in practice, the application of such functions as the distributed ledger [5] and the intelligent contracts of block chainblock chain technology in the market of power energy can play a very important role in the settlement of the private piles of the electric vehicles of the sharing mode. The design idea of this overall mode is rooted in the environment of the charging network of the vehicle networking and the pile networking to build a new mode of transaction settlement for the shared private piles of electric vehicles. The transaction system is decentralized based on the distributed ledger, the transaction process is simplified based on the intelligent contract algorithm, and the transaction records are able to be tracked based on the evidence-storage and traceability technology.

How to Ensure the Safety of Users' Transactions, and Try to Simplify the Settlement Process While Improving the Efficiency of Settling Charging Orders?
Firstly, in order to protect the charging piles and the transaction security of charging users, this mode constructs an alliance chain containing multi-level trading subjects of electric power, applies the distributed storage technology of energy block chainblock chain to the whole-life-cycle management of the chain, abandons the 'exchange' position under the traditional settlement mode, and uses the data-transmission mechanism on the platform of ring network to replace the data-interaction mechanism of the two-level trading platform in the longitudinal network.
Secondly, in order to avoid the repeated accounting of the same order in many places and achieve the rapid settlement of transaction funds, this mode greatly simplifies the transaction process by allowing the subject who has reached the transaction intention to sign the intelligent contract in advance [6] . When the initial settlement data provided by the subject meets the conditions for the operation of the intelligent contract, the order can be automatically settled, and the consumption of electric power and the data of fund settlement in the order can be quickly generated. At the same time, because the core of the intelligent contract is the consensus mechanism [7] , there is no need to worry about that anybody would modify the contract content in the trading. The unit price of cost for energy charge under the traditional structure is relatively fixed, which is generally divided into the peak price and the valley price according to different periods, namely, the morning period and the evening period. For the control center of power grid, it is complicated to allocate the electricity price in specific time periods, and it is inconvenient for the operators of charging services to calculate the interval electricity price and the payments for specific orders. On this basis, this mode adopts the Bancor algorithm, which is essentially a basic agreement [8] established by intelligent contracts on the block chain. Based on a certain proportion of connector passes, the relationship of sliding point between independent variables and dependent variables can be realized through the leverage of connectors, and the price can be dynamically adjusted according to the trading behaviors in the market, providing an asynchronous price mechanism for the settlement process and capital transactions in the block chainblock chain. In this mode, there are important parameters such as the intelligent currency price(P), the reserve pool (B), the leverage ratio (CRR)and the supply of intelligent token money (S).
The basic formula of this Bancor algorithm is as follows: Generally, if the grid load is large (for the increase in purchase demands), the price will rise automatically, while the load decreases (for the increase in sales demands), the price will fall to the price change ratio, which is controlled according to the self-defined leverage ratio.
In accordance with the characteristics of the Bancor algorithm, it allows users to purchase or liquidate immediately for the already connected nodes through a smart contract, at a price that maintains a balance between buying and selling volume through a continuous calculation, ensuring the continuous flow of specific electricity prices throughout the whole electricity market while optimizing the time-sharing charging, in line with the characteristics of the peak and the valley of the grid load.

How to Design the Settlement Mode to Complete the Record of Settlement Data and Facilitate the Subsequent Analysis of Specific Data?
The settlement mode is based on the alliance chain of multi-level trading subjects of electric power, so when each transaction order is completed between the subjects, the user will be asked to confirm the ring signature [9] , and the block chain will automatically determine the accounting nodes and send out by broadcasting through the POS (proof-of-stake) mechanism or DPOS (delegated proof of stake), so that the whole block chain shall have the corresponding records (accounting) nodes of each order, and the settlement results shall be imported into the historical database of intelligent contracts in the form of evidence storage, which shall provide convenience for traceability and query. Using this evidence-storage and traceability technology, all the records of transactions can be traced and easily checked, which is convenient for the enterprises of power grid and the operators of charging services to carry out the accounting and data analysis of quarterly /annual consumption, and can flexibly meet the needs of various statistical queries.

The Overall Design Architecture
This mode included many subjects, such as the enterprises of power grid, the operators of charging services, public and private charging piles, the owners of electric vehicles and third-party institutions.
The overall design architecture of the settlement mode of the shared private piles of electric vehicles based on the energy block chain is as follows:

The Implementation Process of This Settlement Mode
In this mode, the process of the fund settlement is divided into the preprocessing of the block, the processing within the block chain and the processing of the intelligent contract, namely: 1. The Preprocessing of the Block Before the construction of this mode, the enterprise of electric power shall be responsible for data validation and the collection of the basic information of the block. In the data block, the block ID, block data, time stamp and other information shall be filled according to the block structure, and the hash of the previous block and the hash value of the current block shall be recorded internally. Through the preprocessing of each block, the authenticity and transparency of transaction information are ensured, and the dependable transaction settlement is realized.  Figure 4 The Process of Transaction 2. The Processing within the Block chain Each encapsulated block shall be distributed to the node of corresponding block chain. After the chain operation is completed, the transaction information of the block shall be verified by POS and DPOS. The blocks that can be recognized by specific nodes shall be generated in the form of contracts, and the consistency of each block shall be ensured after the consensus.

The Processing of the Intelligent Contract
After completing the setting of the basic energy block, the overall process of transaction also includes four stages, including reaching the transaction intention.
(1) Reaching the Transaction Intention This scheme provides two options: market-price trading and price-limited trading. Market-price transaction [10] means that the electricity user directly trades with one or more power suppliers in the current electricity market, and the transaction is immediately reached. Price-limited transaction refers to that the electricity user (supplier) is not satisfied with the current market price of electric power and submits to the platform the preliminary orders containing specific information such as the expected transaction price and the expected electric quantity to be purchased, and waits for other suppliers (users) to respond to the order. After choosing the specific transaction type, the transaction intention can be initially reached.
(2) Signing the Intelligent Contract According to the initially reached transaction intention, the power user shall sign an intelligent contract with the power supplier in advance, and stipulate parameters such as the electric power to be purchased, the price of the supplied power and the supply time, so that the later power delivery can be carried out smoothly.
(3) Power Delivery During the period when the contract enters into force, the power supplier shall supply power according to the transaction agreement, and the power grid shall be responsible for the distribution of specific electric power to ensure that each batch of electric power shall be sent to the corresponding power user.  Figure 6 Scheme of the Transaction Contract (4) Expense Settlement After the contract expiration, namely, after the order is completed, the platform shall calculate and generate the expense amount and the capital flow involved in the order. After the confirmation by both parties of this transaction, the corresponding working controller shall completely export the information from the block chain, and obtain the actual results in the MySQL database [11] outside the chain. After that, the order shall be officially completed. When there is a transaction deviation such as the electricity user uses more or less than the electricity amount in the intelligent contract, the enterprise of power grid shall provide or purchase the corresponding electricity amount according to the catalog price to realize the rational adjustment of the energy block chain.

Conclusion
This settlement mode of the shared private piles of electric vehicles used the distributed ledger, the intelligent contract algorithm and the evidence-storage and traceability technology. On the basis of solving the disadvantages of traditional settlement mode, it can realize the safe settlement for the users in their corresponding transaction, the efficient processing of the transaction orders, and the convenient analysis of the transaction records, which can better adapt to the diverse needs of market subjects in the expense settlement of the transaction of the electric power consumed by using shared private piles.
With the vigorous promotion of the sharing mode of private piles, people's participation in this new energy-sharing market will be further enhanced. Energy block chain can realize point-to-point real-time information transmission with strong reliability, which meets the basic requirements of today's sharing economy: low-cost dependable environment. Therefore, we introduce its concept into the settlement of charging-service mode. It is quite feasible to establish a settlement mode for the charging services based on the energy block chain and realized by intelligent contracts.
We have reason to believe that the settlement will help the sharing economy to flourish and the new energy industry to further advance.
In the end, this paper mainly focused on the integrated design of this mode, and the subsequent deep-level development still needs specific research.