Research on Block-Chain-Based Intelligent Transaction and Collaborative Scheduling Strategies for Large Grid

In view of the problems of large-grid-level centralized transactions and dispatch centers with information asymmetry and high processing costs, a completely decentralized transaction architecture and a weak centralized scheduling strategy based on block-chain are proposed. Firstly, the concepts of transaction decentralization and scheduling decentralization are defined, and the reliability of distributed transaction communication is studied. Built a blockchain transaction risk control model based on the communication credit consensus mechanism. Secondly, under the weakly centralized scheduling architecture based on the autonomous chain of substations, security checks are performed, and temporary central nodes are set up to perform scheduling tasks. Finally, an improved evolutionary game algorithm is used to solve the above model, and the optimal solution is obtained by dynamically updating the credibility.


I. INTRODUCTION
With the continuous development of modern power systems, a unified power trading and dispatching platform has problems of information asymmetry and low transaction reliability, which does not meet the characteristics of openness, equality and sharing in the power system. Therefore, The State Grid Corporation has been proposed to build a smart grid in China and has successfully developed a smart charging and feeding service monitoring system. At the same time, it has achieved outstanding results in large-scale new energy grid connection and operation control technology [1]. Northeast Asia signed the Memorandum of Cooperation in Northeast Asia Power Interconnection in 2016 [2], [3]. Take the Northeast Asian transnational power grid as an example to analyze the feasibility of its dispatch method and long-term transaction mode [4], [5]. The establishment of a maturity evaluation model for cross-border power trading is conducive to the further improvement of power trading and dispatch mechanisms [6].
The associate editor coordinating the review of this manuscript and approving it for publication was Zhouyang Ren .
As a new type of decentralized computing model, blockchain can simplify operation procedures and reduce execution costs, that makes the power system gradually transition from partial decentralization to complete decentralization [7]. Set up a weak central organization for congestion management, and automatically execute the process through smart contracts, saving transaction execution time [8]. By proposing a heterogeneous block chain interaction method, the interconnection between all levels of energy layer are achieved [9]. To improve the adaptability of power dispatch, the advantages of blockchain autonomous consensus are introduced into demand management [10]- [12]. In fact, there are little works that systematically analyzes trading and dispatching strategies in power systems. Moreover, some existing results in [7]- [12] cannot be verified by simulation based on blockchain theory.
Motivated by discussion, in this paper, the influence of distributed transactions on the stability of large power grids is considered. By defining the proportion of decentralized and quantified blockchain participation, a blockchain transaction risk control model based on the communication credit consensus mechanism is built. On the basis of the completion of the transaction, a weakly centralized scheduling architecture based on the autonomous chain of substations is designed for security verification. At the same time, a temporary central node is set to perform scheduling tasks, and a collaborative optimization scheduling strategy is proposed. Finally, an improved evolutionary game algorithm is used to solve the problem, and a stable scheduling scheme is obtained by dynamically updating the credibility.
The rest of this paper is organized as follows. Section 2 analyzes the feasibility of the integration of blockchain and large power grids. Section 3 proposes distributed trading strategies based on blockchain. Section 4 proposes the weakly centralized scheduling strategy based on the blockchain, and solves it through an improved evolutionary game algorithm. A simulation example is given in Section 5, which is followed by the conclusion in Section 6.

II. THE FEASIBILITY ANALYSIS OF THE INTEGRATION OF LARGE POWER GRID AND BLOCK-CHAIN A. LARGE-GRID AND BLOCK-CHAIN INTEGRATION FUNCTION
The decentralized nature of the blockchain naturally corresponds to the distributed nature of the main body in the power grid, which can meet the demand for direct electricity trading. The data transparency, traceability and anti-tampering characteristics of the blockchain can improve the security and reliability of transactions. Blockchain provides solutions for a number of problems that cannot be implemented in the current smart grid [13]. It can be integrated with smart grid functions as shown in Table 1.

B. SUBSTATION AUTONOMOUS CHAIN MODEL
The substation autonomous chain is composed of substations at all levels. It is a partial decentralized structure with a trusted center. Data access and reading are subject to strict rights management. The privacy protection is better, and it is applicable to the inside of the power grid. As shown in Figure 1, the six substations in the center represent large power consumers in each transaction dispatch layer, adopting direct power purchase to improve the overall operating efficiency. The four small-capacity substations in the outer ring still use centralized power trading, which is conducive to maintaining the stable operation of the platform. When this level of electric energy does not meet the demand for electricity, the neighboring substation submits a transaction application and the transaction authority is obtained after the review is passed.
Since the optimization strategy in this paper is analyzed under a decentralized structure, it prevents randomness and volatility from affecting the safe and stable operation of the power grid. Therefore, equation (1) is defined for the degree of decentralization where T bc is the number of distributed transactions that the block-chain participates in, T tc is the number of dispatches under the participation of a single center and D dt = 100 is fully decentralized. It is shown that all transaction executions do not go through a third-party centralized agency, and all are peer-to-peer(P2P) transactions, 50 < D dt < 100 is weakly centralized. It is shown that more than 50% of transactions are executed as P2P transactions, and the representation of transaction centralization is weak and 0 < D dt < 50 is weakly decentralized. It is shown that more than 50% of transactions are executed as centralized transactions. The decentralization of transactions is weak, D dt = 0 is fully centralized. It is shown that all transactions are executed through a third-party trading center.

III. DISTRIBUTED TRADING STRATEGY BASED ON BLOCK-CHAIN A. SMART CONTRACT MODEL
The core value of the block-chain is to achieve mutual trust through multi-party co-governance. It can also ensure the authenticity and reliability of information without the need for a third party [14]. Its trustworthy features are characterized in the form of smart contracts, which can automatically execute transaction settlement [15]. As shown in Figure 2, the main implementation steps are as follows: i) An electronic agreement is reached between the transaction nodes on the signatures of the two parties, the transaction VOLUME 8, 2020 amount, electronic currency, transaction rules, and the complete state machine, ii) After the P2P network spreads, the transaction information verified by consensus is written to the block-chain, iii) Check the oracle and its external data. Although the smart contract itself does not have strategies the ability to access the external data of the blockchain, it can pass through the oracle. Using external adapters, the blockchain can safely connect with the oracle API. Developers can easily connect their smart contracts with the pre-written oracle API suite to establish a complete off-chain oracle connection. So as to get in touch with outside world and obtain reliable external data.
iv) The conditions for triggering the smart contract can be the state on the chain, such as whether the payment is completed or there are marked electricity purchase and sale prices (ie electricity demand), and external information (such as weather conditions), etc. After the user gets the returned contract address and contract interface information, the user can call the contract by initiating a transaction. When the transaction satisfies triggered condition, it is pushed to the queue for verification, and the transaction is completed after the verification is passed and recognized by more than half of the nodes. When the transaction does not meet the trigger condition, it will not be recorded in the block and return to step (1) to find transaction data that meets the requirements again.
Most power generation companies at the large power grid level are traditional energy sources. It is necessary to give priority to ensuring the safe and stable operation of the power grid, and on this basis to improve corporate efficiency. The fully distributed transaction framework based on the blockchain designed in this paper is shown in Figure 3. The red line in the figure connects power generation companies, power users and grid companies. With the support of blockchain technology, direct electric energy transactions and electricity bill settlement are completed. The usage of the block chain to automatically share and non-tamperable is shown of recording information simplifies transaction settlement, in addition, it improves the efficiency and settlement efficiency of large-user enterprises [16].
In the transaction implementation stage, the smart meter records the actual consumption or output of electricity over a period of time. Broadcast to other nodes, and the bookkeeping node records on the chain. The amount of change in the user's electronic currency is obtained through a smart contract. Each transaction node in the power grid needs to reach a consensus on the generation and consumption of electrical energy, and the electronic money paid to the generator is related to the amount of power generation and supply and demand. The cost of electricity is: where a ele is actual power consumption by users and p ele is the price of unit electricity. The balance fee is composed of the actual electricity cost of the user and the penalty fee of the unfinished transaction indicator. The former is sold at a lower transaction price, and the latter needs to pay a higher actual electricity price. The balance fee can be expressed as: where d s is the power supply, d r is the power demand, δ and τ are coefficients and p punish is the unit of penalty electricity price. The fees payable by users are inversely related to supply and demand: where d c is Power consumption, ε is the coefficient.

B. RELIABILITY RESEARCH OF DISTRIBUTED TRANSACTION COMMUNICATION
Reliable communication is studied from two aspects of link connectivity and transaction reciprocity. The link connectiv-ity considers the link connectivity probability of the communication network topology. On the premise of ensuring link connectivity, nearby transactions can be realized, reducing network loss and improving transaction efficiency. Combined with the definition of the degree of dispersion above, the link connectivity of a completely distributed structure is defined as: Under a fully centralized structure, that link connectivity is defined as: where L p is the number of links connected to node p, e pq is the extensibility of the qth link connected to node p, and the extensibility is defined as the probability that link q is connected to other nodes except node p; e p is the sum of scalability of node p, Link net is the link connectivity of system, M is the total number of nodes. The trade interdependence of the power trading communication network is shown that when the integrity of the communication network is damaged, that is, when the line is overhauled, the remaining nodes and links can still maintain the performance of real-time power trading. Transaction interdependence can effectively reduce the negative impact of unbalanced electricity on the power grid, as defined by equation (7): where h is the shortest path length connecting two nodes, sen p is the communication response speed of node p, sen pj is the set of node communication response speed with the same pitch as node p, L pj is The number of links between the node p and the equal-distance communication set, m pj is the total number of nodes equidistant from node p.
Regarding the whole-network transaction interdependence of the communication network, it is expressed as: In the equation (8): where ∂ p is the weighted coefficient of node p transaction compatibility, z p is the number of nodes in the node p equaldistance communication set, z max is the maximum number of nodes in a node's equidistant communication set.
Assuming that the connectivity of the node and the link is the same, take the extendable interval of the node and the link as [0.91, 0.99]. Comparison of link connectivity  between fully centralized communication and fully decentralized communication is shown in Figure 4. The transaction reciprocity degree under the two communication methods is shown in Figure 5.
It can be seen from Figures 4 that within the range of extensibility [0.91, 0.99], the link connectivity of a fully decentralized power communication based on block-chain technology is superior to that of a fully centralized power communication. The link connectivity of fully decentralized communication networks is 1.9% to 2.4% higher than that of fully centralized communication architectures, that is, on the premise of ensuring link connectivity, it can effectively promote the nearby transaction of electrical energy and reduce network loss.
It is shown that Figures 5 that the completely decentralized power communication architecture based on block-chain technology has better transaction interdependence than the fully centralized architecture. Moreover, Figure 5 shows that the latter's transaction completion rate is only 16.4%∼20.7% of the former. That is, when the completely decentralized communication architecture network is damaged. Due to the decentralized interconnected network structure, power transactions can reach equal-distance transaction nodes through other connected links to maintain the continued operation of power transactions.

C. BLOCK-CHAIN TRANSACTION RISK MANAGEMENT AND CONTROL MODEL BASED ON COMMUNICATION CREDIT CONSENSUS MECHANISM
On the basis of the above reliability research, this section improves the equity proof mechanism and proposes a transaction risk management and control model based on VOLUME 8, 2020 the communicate Proof-of-Credit (cPoC). It incorporates communication reliability and data transmission speed into the credit scoring system as a competitive mechanism for transaction nodes to obtain the right to keep accounts.
The consensus mechanism is important to agreement reached by the nodes in the decentralized system [17]- [19]. In the process of distributed transactions, the speed and reliability of data broadcasting should also be used as constraints when nodes compete for bookkeeping rights, reflecting the value provided by transaction entities participating in direct transactions, which is an important right of market entities. Therefore, this paper proposes a cPoC consensus mechanism, which considers communication reliability and data transmission speed in the setting of the difficulty coefficient. The competition algorithm for the accounting rights of each node in this mechanism is shown in equations (10) and (11): where H (·) is the hash function, R i is the root hash of all the data packed into the block by node i, k i is the random number that node i needs to find, c i is the credit score of node i, N diff is the difficulty factor, N ba is the default basic difficulty coefficient of the coefficient, N (·) is the data transmission network function, tran i is the reliability of data transmission and v i is the data transmission speed (bits/sec). According to the optimization strategy of accounting rights proposed by Equations (10) and (11), the node can obtain the accounting rights according to the flow of Figure 6. Under the cPoC consensus mechanism, the function values obtained by each node's single-run hash function are evenly distributed between 0 and 2 256 − 1. Assume that there are F transaction entities in the network, then the probability of one of them gaining the block accounting right is as follows equation (12) shows: where 2 256 is the space size mapped by the SHA − 256 algorithm.
In the above equation, the numerator represents the probability that node i will successfully obtain the accounting power in a hash function calculation. From (12), the difficulty coefficient of node mining is related to its credit score and communication reliability. The higher the credit score and the higher the communication reliability, the lower the mining difficulty and the greater the probability of obtaining accounting rights. It can reward highly credible subjects and punish low credible subjects. Compared with the existing electricity trading methods, the increased difficulty of selection can control trading risks.
The cPOC algorithm reduces the attack success rate of malicious nodes by increasing the difficulty of choosing the transaction subject. Consequently, realizing the management and control of distributed energy transaction risks, as shown in Figure 7. When the system is attacked by malicious nodes, it has a strong ability to maintain stable operation. As shown in Figure 7, the number of malicious nodes gradually increases from 0 to 40, with a step size of 2. It can be seen from the figure that when the number of malicious nodes is less than 62% of the total, the attack success rate is 0. Therefore, compared with the continuous double auction mechanism, the use of blockchain technology to achieve transaction authentication has higher security and reliability. Figure 8 shows the comparison of throughput under different transaction strategies. Transaction throughput refers to the number of transactions completed by the system in a given time period. That is, the greater the throughput of  the system, the more user or system requests the system completes in unit time, and the system resources are fully utilized. Figure 8 takes the average value of different transaction states. When the number of nodes is less than 40, the blockchain-based transaction strategy proposed in this article has low transaction delay and high consensus speed, and transaction settlement is completed through an automatically executed smart contract. So it has obvious advantages in throughput performance. When it exceeds 40, the throughput under the strategy proposed in this article drops slightly, and finally stabilizes at about 32 times, which still has better room for improvement. Figure 9 shows the effective supply rate of transactions in each period. The effective supply rate refers to the ratio of the number of transactions successfully completed according to the transaction intention to the total transaction volume. The higher the effective supply rate, the smaller the transaction defaults and transaction adjustments, the more conducive to improving transaction quality. As shown in Figure 9, although the continuous double auction mechanism can maintain the supply rate at a relatively high level, there is a significant decline during the peak load period. In the blockchain transaction strategy proposed in this paper, the cPOC consensus mechanism introduces credit scoring and communication reliability to timely amend the entities that do not meet the transaction needs, and has the effect of rewarding high-trust entities and punishing low-trust entities. During the peak transaction period from 18:00-20:00, the highest supply rate can be increased by 11.7%, and the average effective supply rate can be increased by 5.8%, effectively reducing the transaction default rate and adjustment volume.  Table 2 and Figure 10, the existing continuous double auction mechanism has high requirements for local servers. Thus, it is difficult to implement it in a decentralized low-cost network. The block-chain-based transaction strategy proposed in this paper can effectively reduce the daily  operating cost of the microgrid by 8.45%. It is because the block-chain technology can break the information barrier between the generator and the user, reduce the credit cost in the transaction process and the third-party platform construction cost. 6:00p.m∼9:00p.m is the peak load period, and the optimization effect is more obvious.

IV. WEAK CENTRALIZED SCHEDULING STRATEGY BASED ON EVOLUTIONARY GAME ALGORITHM A. WEAK CENTRALIZED ARCHITECTURE BASED ON SUBSTATION AUTONOMOUS CHAIN
At present, electricity market transactions are mainly divided into two types: annual transactions and monthly transactions. This paper first uses the monthly transaction method of centralized bidding as an example to illustrate the relationship between the transaction center and the dispatch center, as shown in Figure 11. The two are jointly responsible for the electricity market. The former is mainly responsible for declaration, clearance and settlement, and the latter is mainly responsible for security check, congestion management and FIGURE 11. Monthly centralized bidding process. VOLUME 8, 2020 transaction execution. All transaction intentions need to pass the security check of the dispatch center to finally form a transaction plan [20], [21].
Considering that there is still a dispatch center in the current grid company system, this paper proposes the weak centralization idea of decentralization of dispatching part, which retains the function of disatch center. A temporary scheduling center is selected through the blockchain consensus mechanism to perform scheduling tasks at all levels. At the same time, the substation autonomous chain will approve transaction scheduling information to provide safety supervision for the stable operation of the power grid. The temporary center node is affected by factors such as load location, power supply location, power supply unit, network delay, etc. According to the different transaction information, the selected temporary center will change, as shown in Figure 12 and Figure 13.   Figure 12 shows the process of selecting the temporary central point at time t 1 . The power plants that provide electrical energy include three thermal power plants, one wind power plant, and one photovoltaic power plant. The system communication node broadcasts the random number that needs to be solved in the round scheduling data, and each node performs distributed storage of the transaction data while updating the local transaction scheduling data. The substation node that can calculate the correct random number result as a priority. The temporary center of this round of scheduling performs its own scheduling tasks and gets certain rewards. Figure 13 shows the selection process of the temporary central point at time t 2 . The power plant that provides electrical energy includes two thermal power plants, two wind power plants, and one photovoltaic power plant, which are different from the geographical location and power supply situation at time t 1 . Therefore, re-select the temporary central node and perform random number calculation. By uploading the data, we can know the active power applied for in the substation for this round of transactions. Using the stored data in the block-chain network, we can know the maximum load during the application period of the substation, so we can obtain the available power and the total power required to ensure the stable operation of the power grid.
According to the submitted address information, the substation autonomous chain automatically recognizes the highest substation level of power purchaser A and power seller B in this round of transactions: f (A, B) = n n = 1, 2, 3, 4, 5 where 1, 2, 3, 4, and 5 represent 35kV substation, 110kV substation, 220kV substation, 330kV substation, and 500kV substation, respectively. Assuming that the level of the substation directly connected to the power purchaser A is m, and the level of the substation directly connected to the power seller B is o, then a total of N station level substations need to be passed: Assuming that A is connected to user B through 500kV, 330kV, 220kV, 110kV, 35kV substation, then n=5, m=5, because A is directly connected to 500kV, B is the user, directly connected to 35kV, o=1, then the number of passing substations between the two is 5, which is in line with the real situation.

B. SMART CONTRACT COLLABORATIVE SCHEDULING MODEL
On the basis of traditional power grid economic dispatch, block-chain technology is incorporated, which effectively introduces the advantages of block-chain in data storage, information security, and data interaction into the power grid economic dispatch [22]- [25]. The economic dispatch plan of the power grid is formed in a smart contract and is checked and confirmed by the energy management system. Finally, the reliable power supply from the power generation unit to the power consumption unit is realized. The specific steps are as follows: i) Each power generation unit and power user access historical data and current status information in the blockchain network, receive existing transaction requests, and perform data backup after authentication by the entire network.
ii) According to all the transaction information that has passed the authentication, each node calls the smart contract to perform economic dispatch calculations. The information format released by the power supply is: where GEN is controllable power information, ID GEN is the unique identification obtained when the controllable power supply joins the block-chain network, H GEN is output capacity, R GEN is cost information, J GEN is the controllable energy type, K GEN is the current start and stop status of the unit, GEN is the climbing rate. iii) Integrate all the effective information received by the smart contract to form an economic dispatch objective function and constraint conditions, thereby generating a dispatch plan. The scheduling model in this paper is shown in equation (16) to equation (20). The scheduling scheme is propagated through the P2P network, waiting for other nodes to verify. iv) If the scheduling plan is verified, it will be recorded in the blockchain in the form of a smart contract, otherwise, go back to step (3) to re-equationte the scheduling plan.
v) When the preset trigger conditions are met, each power generation and consumption unit automatically executes the scheduling plan in the smart contract, which is regarded as the end of a scheduling task.
In the hierarchical scheduling, the main task of the national survey is to equationte a cross-provincial tie-line plan, which is determined by balancing large power distribution and power trading. In the case of a known output curve, if the power transaction situation needs to be adjusted due to security constraints, consider establishing a tie-line model with the goal of minimum adjustment cost. As shown in equation (16): where C n,t is the contribution of the inter-provincial power supply at time t according to the original transaction plan, C s n,t is the suggested contribution after the power supply across the provinces does not meet the safety constraints at time t, N is the total number of power supplies, σ i is the power distribution ratio of the power supply to the tie line i, and the value is between [0, 1], µ n is the adjustment cost of power supply n.
The corresponding constraints under the objective function are: i) Tie line transmission constraints C n,t,min ≤ C n,t ≤ C n,t,max (17) where C n,t,min are the minimum and maximum power that can be received or sent at time t, respectively. ii) Control constraints of unit groups in the control area where G is the large grid, g is the provincial power grid, χ g,min and χ g,max are the minimum and maximum output of the provincial grid unit respectively, L G,t is the load demand of large power grid, C G,t is the large grid tie line plan to contribute. The first equation in equation (18) indicates that the total output of units in the provincial grid meets the fluctuation in the interval [χ g,min , χ g,max ], and the second equation is used to ensure load balance of large grid.
iii) Power flow check constraints The following equations are power balance constraint, node power constraint and node voltage constraint.
where f is all nodes connected to node e, C t e is the power of nodee at time t, the inflow is positive and the outflow is negative, r ef is the current value flowing through the two nodes, the flow direction from e to f is positive, and the flow direction from f to e is negative, E l is a collection of system nodes, C min and C max are the minimum and maximum values of node power C t e respectively, V min and V max are the minimum and maximum values of node voltage V t e respectively.

C. IMPROVED EVOLUTIONARY GAME ALGORITHM
Evolutionary game theory is based on individuals with limited rationality, and it well describes the trend of behavior changes [26]. It makes up for the difficult problem of complete rationality and Nash equilibrium in classical game theory, and actively explores evolutionary stability strategies and evolutionary processes [27], [28].
In the evolutionary game algorithm, large power grids and provincial power grids as game participants generate two populations denoted as P 1 and P 2 respectively, p 1 and p 2 are the probability of population distribution in the initial population. P 1 and P 2 take y 1 and y 2 as benefit targets respectively. When two agents in the group compete for the same benefit, a game will be triggered. Let the two agents x x ∈ ÊP i and x x ∈ ÊP j play the game in the maximization benefit game. When the relationship between i andj is different, the scheduling function obtained by x is different.
when i and j are equal, the scheduling function is shown in equation (21): when i and j are not equal, the scheduling function is shown in equation (22): In each generation of the evolutionary algorithm, a pair of agents is randomly selected to perform a number of repeated games. Take the average scheduling value as the subject's VOLUME 8, 2020 fitness value. The best dispatch decision is obtained by flexibly adjusting the game status between large power grids and provincial power grids.
Since the dispatch strategy in this paper is analyzed under a partially decentralized structure, in order to prevent the randomness and volatility of distributed dispatch from affecting the operation of large power grids. Therefore, the Decentralization of scheduling (Decentralization of scheduling) is defined by equation (23). Considering the credibility of stable decision-making due to distribution, the credibility represents the feasibility of a scheduling scheme that satisfies the operational stability of the power grid. The definition is shown in equation (24), so that the algorithm parameters are dynamically adjusted when the game is evolved.
where S bc is the number of distributed schedules, S sc is the number of centralized scheduling, D sc = 100 is completely decentralized. It is shown that all scheduling executions do not go through a third-party centralized agency, and all are P2P schedules, 50 < D sc < 100 is weakly centralized. It is shown that more than 50% of schedules are executed as P2P schedules, and the representation of scheduling centralization is weak, 0 < D sc < 50 is weakly decentralized. It is shown that more than 50% of schedules are executed as centralized schedules, and the decentralization of schedules is weak, D sc = 0 is completely centralized. It is shown that all scheduling is executed through a third-party dispatch center.
S cred = u error + f error (24) where u error is the voltage deviation value in the power grid, f error is the frequency deviation value in the power grid. The credibility sets the constraint range according to the allowable deviation under each voltage level. It is known that the evolution of the ird generation dispatching decision of the large power grid and the provincial power grid is M dec . In a variety of random scenarios, if the provincial power grid cannot complete the dispatch task, the impact of the generated electric energy fluctuation on the operation of the large power grid can be calculated. Equationte a compensation model corresponding to the impact of the provincial power grid on the operation of the large power grid, and express it as the penalty cost of the impact of the provincial power grid output.
where q is the probability weight corresponding to the scene, Q is the total number of multiple random scenes, M diff is the gap between the actual output of the provincial power grid and the dispatching decision output of M dec , α is the unit penalty cost.
Assuming that the provincial grid operation cost under this dispatch decision is S pro and the minimum credibility is S cred,min , the population distribution probability is adjusted appropriately in the following two situations: i) S comp S pro > S cred,min , The impact of distributed dispatch on the stability of large power grids is greater than the minimum credibility, so the population distribution probability is not adjusted, ii) S comp S pro ≤ S cred,min , The effect of distributed dispatch on the stability of the large power grid is less than the minimum credibility. Starting from i + 1 evolutions, the population distribution probability is adjusted so that the stability impact of large power grid caused by the randomness of distributed dispatch is within the tolerable range.

V. EXAMPLE ANALYSIS
In order to verify the effectiveness of the mechanism proposed in this paper, a weak centralized scheduling model is built on MATLAB. Smart contracts are written in C language. web3 uses HTTP Provider as a connector to the database. After the connection is completed, the scheduling model can be called in the smart contract. In the decision-making phase, the provincial power grid obtains the expected power through the web3.eth.call interface. Complete the clearing solution and optimization scheduling in MATLAB, and write the optimization results into the smart contract through the web3.eth.sendTransaction interface. The parameters of different capacity units are shown in Table 3.
Taking the provincial power grid as an example, simulation calculation of the optimal dispatching problem of coal-fired generating units in the province is carried out. The output plan of the unit determined by the evolutionary game method is shown in Figure 14, which is consistent with the load curve change rule at various times of the day. The peak output of different units is positively correlated with the installed capacity. In the evolutionary game, each unit takes the minimum change in power on the contact line when the power transaction adjustment is required as the objective function. Through equation (25), the minimum credibility is used as the basis for judgment, and the population distribution probability is dynamically adjusted, so that the output of the unit can meet the requirements of safe and stable operation of the large power grid.
As shown in Figure 15, setting different scheduling decentralization degrees will affect the output of the unit. Under weak centralization, the unit output is smoother, which can  reduce peak and valley fluctuations, because the block-chain technology is used by each unit to maintain the weak center. Consensus scheme can realize information sharing and multiparty governance. The output curve of the unit is not only affected by the dispatch center, but also by the remaining power stations. To a certain extent, the output of the unit can be optimized to make it smoother, and then the dispatch efficiency of each power station is improved. However, due to the impact of the block's own storage efficiency, with the increasing number of transactions and scheduling bodies, the limited storage space will reduce the block's response speed, so further research on block management is needed.  Figure 16. It can be seen from the figure that before optimization, the power deviation value in the grid is high and the power fluctuation is large, and the system state is unstable. The blockchain-based optimization strategy proposed in this paper is compared with the optimization effect of genetic algorithm. Although genetic algorithm can find the optimal solution more effectively, the power deviation after blockchain optimization is lower, which reduces power fluctuation. Therefore, the blockchain-based scheduling optimization strategy is more conducive to the safe and stable operation of the power grid.
In order to verify the impact of power flow on the power flow on the tie line under the weakly centralized dispatch mode, a large power grid is used as a test case. Assume that the initial conditions are: a certain province's shortfall of electricity-3385MW, consisting of 16 physical lines, and a power adjustment space of ±10%. As shown in Figure 17, after power adjustment under distributed scheduling, most branch deviations are distributed around 15%, so the calculation and operation costs are reduced at the expense of power flow accuracy near the tie line. Based on the weak centralization of the blockchain, trend data saves computing memory and improves computing efficiency through multiparty consensus. In the evolutionary game algorithm, the dynamic credibility change trends of large power grids and provincial power grids are shown in Figure 18. It can be seen from the figure that large power grids and provincial power grids undergo a dynamic evolutionary game process, which can eventually make weak centralized dispatch to large power grids. The degree of stability is maintained above the minimum confidence level, and the deviation of voltage and frequency can meet the requirements of power grid operation. And minimize the penalty cost of the provincial grid calculated by equation (25). Compared with the traditional scheduling method, the two-way security system established under the blockchain technology can maintain the continuous stability of both parties and obtain better economic benefits.

VI. CONCLUSION
This paper focuses on the research of large grid-level transaction and collaborative scheduling strategies in smart grids, and systematically analyzes the advantages of block-chainbased transactions and scheduling. All the models and strategy analysis described in this paper are based on the substation autonomous chain. Compared with the existing distributed transaction methods, although the robustness is not significantly improved, it can significantly improve the transaction throughput and calculation efficiency. Since the storage efficiency of the block itself restricts the response speed of the block under the main body of large-scale transactions, further study on block congestion management should be conducted as a more effective solution for scheduling optimization.
XIAOLIN FU was born in Jinan, China. She received the bachelor's degree, in 2018. She is currently pursuing the master's degree with Shanghai Dianji University.
She serves as the Head of the Academic Department of the Graduate Association. She published an article in an international journal and she has participated in the compilation of a book. Her research direction is a smart grid multi-layer transaction and collaborative scheduling strategy based on blockchain.
Dr. Fu participated in the Shanghai Green Motors and Intelligent Manufacturing graduate academic forum and won the third prize, in 2018. In 2019, she won a national scholarship. In October 2019, she went to the French Higher School of Science, Technology and Economics and the University of Applied Sciences, Kaiserslautern, Germany, and participated in the 2019 Sino-German Intelligent Manufacturing Technology Postgraduate Academic Forum, and won the first prize.
HONG WANG received the bachelor's degree, in 2017, and the master's degree in electrical and electrical engineering from Strathclyde University, in 2018. He is currently pursuing the MPacc degree with Tongji University, studying accounting, auditing and financial management.
He has published two international conference papers and participated in the compilation of a book. He obtained a total of eight invention patents and utility model patents. His research direction is the application of blockchain in the power economy and power market. He participated in the completion of the national 863 project subproject robot patrol system path planning optimal control strategy research, the National Natural Science Foundation of China sub-project service robot based on information fusion technology decision-making method research, and presided over the Shanghai Natural Science Foundation more than ten projects, such as the Shanghai Municipal Science and Technology Commission Project and the Shanghai Talent Development Fund Project. His main research direction is the energy Internet collaborative optimization dispatch control and active distribution network technology based on blockchain. VOLUME 8, 2020