# Blockchain-Based Intelligent Interconnection System Optimization Decision

Authors: Caifeng Wang; Shenghua Hao; Yufang Ma
Journal: Security and Communication Networks
 (2022)

---

## Abstract

This article conducts a comprehensive analysis of the relevant content of blockchain; blockchain is a new field that has only emerged in recent decades, and it has a high level of new energy that cannot be compared with other fields. This article proposes the advantages and disadvantages of blockchain and the current factors that trigger network security defense. A multimicrogrid customer transaction system under the blockchain technology is also proposed. We will illustrate the compatibility between multimicrogrid and blockchain, which is self-adaptive and can be adjusted in time with market changes. Third, in order to ensure the normal operation of the distribution network, a smart contract dynamic constraint scheme is designed for power flow constraints and voltage offset problems. Multimicrogrid system as energy interconnection research on multiagent competitive game on multimicrogrid system is crucial to the development of energy Internet technology. Blockchain-based decision-making systems exist based on a comprehensive analysis of the needs and interests of microgrid operators, large users, and distributed aggregators. For the complex problem of multimicrogrid system competition game model, a suitable solution method (IACO) is proposed. The model and solution algorithm established by the experiment are accurately analyzed, and the simulation result is that the optimal electricity price strategy in the subdivision field can effectively balance the interests of different market players and achieve win-win and coordinated development. Experiments show that IACO can deal with the multiple problems of blockchain.


---

## Body

## 1. Introduction

In view of the defects of the existing blockchain system, this paper proposes Hawk, a brand-new decentralized blockchain, which perfectly solves the problem of exposing the privacy of customers to the blockchain. The compiler it uses zero-knowledge proof, etc. The cryptographic primitives are written into an efficient cryptographic protocol between the contracting party and the blockchain, thus ensuring its security [1]. Through the comparison and combination of blockchain and the Internet, this paper analyzes several advantages and concludes that if applicable, the integration of blockchain and the Internet will definitely cause a historic change in the industry, which will lead to more uncertain roads in the future [2]. The performance problems of the early Bitcoin POW blockchain are no longer meaningful today, so this paper makes a simple comparison between POW blockchain and BFT blockchain, and studies how to improve the scalability limit problem, and also provides a comprehensive understanding of “The ultimate” blockchain structure is outlined [3]. This paper proposes a basic model of the blockchain system, discusses the principle, technology, method and application of the blockchain, and the related Bitcoin system. We also discuss smart contracts and their applications, and propose future trends in a blockchain-enabled parallel society. This paper mainly provides some reliable data for future work [4]. This paper addresses the innovative impact of blockchain’s verification and network costs on shaping digital platforms, where shared data supports multiple intellectual property rights and allows participants to coinvest without assigning market power to platform operators. They also challenge existing revenue models and present opportunities for new approaches to data ownership and licensing [5]. In this paper, 3G technology and GpsOne technology are combined in the Intelligent Transportation System (ITS), the principle is described, and the working principle and hardware structure of the intelligent vehicle navigation and wireless interconnection system are discussed [6]. The Internet of Things intelligence in the field of power system can play the role of early warning and protection through computers, remote monitoring, etc. [7]. In this paper, the intelligent high-speed loom industrial interconnection remote monitoring system is designed from the hardware system and the software system. The system briefly describes the data communication and data transmission between the web server and the remote client, and meets the needs of industrial sites [8]. Aiming at the current situation that the abnormal protective layer current of the cross-linked high-voltage cable system cannot accurately reflect the insulation status, this paper proposes a solution and forms a corresponding intelligent interconnection system, which effectively solves the current protection and facilitates the monitoring and maintenance of the cable [9]. In this paper, a multidevice intelligent interconnection method and system based on Bluetooth are invented. The system sends a request to the peripheral device through the central device, the peripheral device reports the service type, and repeats the above operations to complete the networking. The business connection provides convenience [10]. In this paper, the optimal decision-making problem in the TAFC task is obtained through various schemes, and its six models are analyzed to further prove the optimal trade-off between speed and accuracy. Performance makes new predictions [11]. This paper describes that learning the value of options in an uncertain environment is the core of optimal decision-making, and proves that the ACC does not detect errors and correct them, but guides, and does not maintain reward responses after ACC damage, nor does it integrate risk and earnings [12]. This paper studies the optimal data fusion problem in the sense of Neyman-Pearson (NP) test in a centralized fusion center. Examples are derived from the constraints on the sensor system, channel capacity, etc., and provide a method for adjusting the threshold level at the fusion center [13]. In this paper, Clethrionomys glareolus was studied through food addition grids and control grids, and six conclusions were drawn using the capture-mark technique. Finally, there was no evidence that delayed maturation in voles was the best strategy for evolution [14]. This paper studies the optimal data fusion problem in the sense of Neyman-Pearson (NP) test. The fusion center receives data and then performs the NP test by the sensor. The results show that multiple sensors are also possible for the system. Finally, a method for adjusting the threshold is obtained [15].


## 2. Blockchain-Related Content

### 2.1. Background of Blockchain

The emergence of Bitcoin in 2008 has led to a new round of technological revolution and the rapid development of related industries. The blockchain was born and swept the Internet and traditional economic circles at a lightning-fast speed. The blockchain is an Internet database technology, which divides data into many blocks and then passes through some kind of secret. A technology connects them into a data network, which is different from traditional databases. The data in the blockchain is safe and shared, so it can also be seen as a distributed and shared data library. Blockchain is a decentralized distributed storage technology that can establish trust relationships without a network. At present, blockchain is mainly used in research in many fields such as Internet of Things, financial services, electronic depository, digital identity, and education. They can be divided into three types of blockchains: public chain, private chain, and alliance chain. Different blockchain types are aimed at different application scenarios, and they have their own advantages and disadvantages, so they are divided into three types of blocks. Blockchains are uninterrupted digital transactions of economic transactions that can be programmed to record almost anything of value, not just financial transactions. Simply put, it is a decentralized database containing data that cannot be modified, managed by a cluster of computers, and not owned by any one party. Blockchains are saved as databases or flat files.


### 2.2. Design Concept Based on Alliance Chain

In the application field of alliance blockchain, when all nodes receive the transaction file, they will reach a consensus on a set of bit vectors. When the transaction size is greater than or equal to 250 bytes and the number of nodes is about 100, the performance effect is greatly improved. From another angle to analyze the blockchain, we can find that it is actually a distributed system. Brewer's theorem is an important theory in distributed systems, indicating that distribution can be divided into consistency, availability, and partition fault tolerance. Consistency is related to the degree of data or state consistency between different entities in a distributed system. From a practical point of view, consistency actually reflects the uniqueness of the system to the services provided by the client; availability is that the system can continue to send requests when there are roadblocks within the distributed system; partition fault tolerance is that the system divides data into. There are many different types and they are divided into different areas for storage according to their types. If there is a problem in one area, it will not imagine the normal work of other areas, and will not affect the operation of the system.


### 2.3. Blockchain Technology

The essence of blockchain technology is the decentralization and decentralization of data storage, transmission, and authentication as a technical area. It is used to replace the current Internet dependency on a central server, which then records all data changes or transaction items. In the cloud system, in-transit analysis is theoretically completed. Broadly speaking, it goes beyond traditional methods of verifying information that must rely on a central location, reducing the cost of establishing a global “credit.” This new approach indirectly demonstrates the “foundation protocol” that creates the foundation of distributed artificial intelligence. A new share interface is created between human brain intelligence and machine intelligence.


### 2.4. Relevant Features of Blockchain

#### 2.4.1. Features of Blockchain

Blockchain is a distributed digital ledger that keeps pace with the times. It has the following four characteristics: 1. Distributed ledger: The blockchain is just like taking notes when we listen to lectures. It has a security record for every transaction in the Internet, and there will be no unknown transactions or forgetting transactions. Situation is highly secure and available. 2. Irreversibility: From the public’s understanding of the blockchain, one of the cornerstones of the blockchain is nontampering, so people will not work in this opposite direction. Theoretically, it is possible to reverse the transaction, but this requires 51% of the computing power to recognize your reversal. Logically speaking, this is actually an economic game theory, and 51% of the computing power will not agree with your reversal. If you take 10,000 steps back and say that if you have 51% of the computing power, you have no reason to reverse and destroy. 3. Anticensorship: The blockchain itself keeps a record of every transaction, ever made, which prevents the tracking of blockchain projects. 4. Near real-time settlement: its internal time is very close to the outside world, which ensures that the customer’s transaction confirmation time is almost the same, thus reducing the insecurity of the transaction party.


#### 2.4.2. Advantages of Blockchain

Blockchain is an innovative application model of computers in the Internet era, such as distributed data storage and point-to-point transmission consensus mechanism encryption algorithm. It has five major advantages: decentralization, openness, autonomy, information immutability, and anonymity. The five basic advantages have been generally agreed upon. 1. Decentralization: refers to the use of decentralized accounting and storage in the blockchain, without centralized management. All nodes have equal rights and obligations, and system maintenance is handled by specialized maintenance nodes. 2. Openness: The so-called openness means that the blockchain system is open to the outside world. Only specific information is hidden and others are open to everyone. Anyone can query the data through a secure interface. 3. Autonomy: The autonomy of blockchain is based on specifications and protocols. Nodes in the system can freely convert data, so that they can believe that human operations cannot be changed. 4. Information cannot be tampered with: When the user’s information is added to the system and confirmed, it cannot be modified. Only half of the nodes can be manipulated to modify the content, which is why the stability and reliability of the blockchain are very high. 5. Anonymous letter: It means that the exchange between nodes follows a fixed algorithm, and customers will not disclose their identities for each other to identify. These unique advantages will over time change the relationship between various industries in the future.


### 2.5. The Impact of the External Environment on the Blockchain System

#### 2.5.1. Self-Factors

In the 21st century, it is very common for people to cause irreparable losses to the blockchain system due to their own operational errors. Among them, people mainly change, attack, and destroy the network system autonomously, which leads to the leakage of information and network paralysis. Many hackers will use its proficiency in computers to implant viruses on corporate or personal computers, so as to achieve their desired goals. For example, in 2012, the hacker sent a Chinese version, embedded a backdoor in the Chinese version of putty, searched many key things from Baidu, and owned his registered domain name (https://putty.org.cn.cn)), promote the site, and steal the admin. Send the SSH username and password entered by the administrator to the designated server. In March 2015, the attacker hijacked the JS script of Baidu Ad Alliance and replaced it with malware. In addition, on August 1, 2014, a large-scale denial of service attack was launched on GitHub using foreign users to access Chinese websites, according to the official Weibo account of Zhejiang Province. Hackers attacked the set-top boxes of cable TV network users, causing reactionary propaganda and affecting people’s normal TV viewing, which had a negative impact. Through these events that have occurred, 75% of the crimes are out of the inside.


#### 2.5.2. Influence of Network Resources

Resource sharing is the advantage of big data network. Whether it is from various hardware devices, software data, or a large amount of data and information, it is very convenient for users to query information and achieve effective resource sharing. In addition, not only all network users can access server resources, but also various information and data can be shared between different terminal devices. This provides a resource and many criminals use this device to steal and destroy information. This will cause huge economic losses to users and network construction. The environment has become unmanageable, and confidence in the Internet has been lost. In order to solve this problem, users should not only participate in the security of network data responsibly but also optimize the network environment, strengthen the internal firewall settings of the system, and build a safe and environmentally friendly network space for customers as much as possible.


#### 2.5.3. Data Transfer Impact

According to relevant research, communication lines can also lead to the risk of information leakage, especially with the emergence of 5G network technology. All kinds of information technology and equipment fill people’s field of vision. It has brought us a lot of convenience, but there are also a lot of security problems. In view of the current actual situation, many companies or their families have not done a good job of data shielding. Therefore, some illegal users use monitoring communication lines to obtain their personal information. Some unscrupulous people connect our computers through high-end devices. So as to opportunistically intervene in the communication interface, send them the basic information that we usually surf the Internet. In addition, there are many ways we do not know how to steal our important data, such as illegality. There will be intrusion, illegal use, injection of illegal information, line interference, etc. in the communication line, so sufficient measures must be taken to protect the security of data communication.


#### 2.5.4. Virus Effects

Factors that affect the failure of network security defenses include the intrusion of computer viruses that control the behavior of computer software and hardware, which can steal useless information. Legal activity has a huge impact on users. There are many types of computer viruses, and their attack characteristics on the device network are also different. Some viruses are responsible for infecting your files and crashing them, while others attack your computer’s defenses. Therefore, it is unlikely to detect it and remove the virus completely; mainly file-type viruses which are designed to infect unused areas of the disk with viruses. Some DOS functions are often used to spread viruses. This will lead to a huge waste of disk space and will affect the normal operation of our computer. Not only will it cause our data to be lost, but it will also render our computer useless. Complexity of the blockchain itself: The blockchain network is very complex. With the increase of transaction customers and different transaction methods, this greatly reduces the stability of the blockchain system. Super high energy consumption: As far as the Bitcoin blockchain is concerned, it consumes more energy than the entire Switzerland. It is conceivable how huge the energy consumption of the entire blockchain is. Lack of skilled operators: Due to the huge and complex system of the blockchain, there are very few people who learn it, resulting in the loss of talents in this area.


## 2.1. Background of Blockchain

The emergence of Bitcoin in 2008 has led to a new round of technological revolution and the rapid development of related industries. The blockchain was born and swept the Internet and traditional economic circles at a lightning-fast speed. The blockchain is an Internet database technology, which divides data into many blocks and then passes through some kind of secret. A technology connects them into a data network, which is different from traditional databases. The data in the blockchain is safe and shared, so it can also be seen as a distributed and shared data library. Blockchain is a decentralized distributed storage technology that can establish trust relationships without a network. At present, blockchain is mainly used in research in many fields such as Internet of Things, financial services, electronic depository, digital identity, and education. They can be divided into three types of blockchains: public chain, private chain, and alliance chain. Different blockchain types are aimed at different application scenarios, and they have their own advantages and disadvantages, so they are divided into three types of blocks. Blockchains are uninterrupted digital transactions of economic transactions that can be programmed to record almost anything of value, not just financial transactions. Simply put, it is a decentralized database containing data that cannot be modified, managed by a cluster of computers, and not owned by any one party. Blockchains are saved as databases or flat files.


## 2.2. Design Concept Based on Alliance Chain

In the application field of alliance blockchain, when all nodes receive the transaction file, they will reach a consensus on a set of bit vectors. When the transaction size is greater than or equal to 250 bytes and the number of nodes is about 100, the performance effect is greatly improved. From another angle to analyze the blockchain, we can find that it is actually a distributed system. Brewer's theorem is an important theory in distributed systems, indicating that distribution can be divided into consistency, availability, and partition fault tolerance. Consistency is related to the degree of data or state consistency between different entities in a distributed system. From a practical point of view, consistency actually reflects the uniqueness of the system to the services provided by the client; availability is that the system can continue to send requests when there are roadblocks within the distributed system; partition fault tolerance is that the system divides data into. There are many different types and they are divided into different areas for storage according to their types. If there is a problem in one area, it will not imagine the normal work of other areas, and will not affect the operation of the system.


## 2.3. Blockchain Technology

The essence of blockchain technology is the decentralization and decentralization of data storage, transmission, and authentication as a technical area. It is used to replace the current Internet dependency on a central server, which then records all data changes or transaction items. In the cloud system, in-transit analysis is theoretically completed. Broadly speaking, it goes beyond traditional methods of verifying information that must rely on a central location, reducing the cost of establishing a global “credit.” This new approach indirectly demonstrates the “foundation protocol” that creates the foundation of distributed artificial intelligence. A new share interface is created between human brain intelligence and machine intelligence.


## 2.4. Relevant Features of Blockchain

### 2.4.1. Features of Blockchain

Blockchain is a distributed digital ledger that keeps pace with the times. It has the following four characteristics: 1. Distributed ledger: The blockchain is just like taking notes when we listen to lectures. It has a security record for every transaction in the Internet, and there will be no unknown transactions or forgetting transactions. Situation is highly secure and available. 2. Irreversibility: From the public’s understanding of the blockchain, one of the cornerstones of the blockchain is nontampering, so people will not work in this opposite direction. Theoretically, it is possible to reverse the transaction, but this requires 51% of the computing power to recognize your reversal. Logically speaking, this is actually an economic game theory, and 51% of the computing power will not agree with your reversal. If you take 10,000 steps back and say that if you have 51% of the computing power, you have no reason to reverse and destroy. 3. Anticensorship: The blockchain itself keeps a record of every transaction, ever made, which prevents the tracking of blockchain projects. 4. Near real-time settlement: its internal time is very close to the outside world, which ensures that the customer’s transaction confirmation time is almost the same, thus reducing the insecurity of the transaction party.


### 2.4.2. Advantages of Blockchain

Blockchain is an innovative application model of computers in the Internet era, such as distributed data storage and point-to-point transmission consensus mechanism encryption algorithm. It has five major advantages: decentralization, openness, autonomy, information immutability, and anonymity. The five basic advantages have been generally agreed upon. 1. Decentralization: refers to the use of decentralized accounting and storage in the blockchain, without centralized management. All nodes have equal rights and obligations, and system maintenance is handled by specialized maintenance nodes. 2. Openness: The so-called openness means that the blockchain system is open to the outside world. Only specific information is hidden and others are open to everyone. Anyone can query the data through a secure interface. 3. Autonomy: The autonomy of blockchain is based on specifications and protocols. Nodes in the system can freely convert data, so that they can believe that human operations cannot be changed. 4. Information cannot be tampered with: When the user’s information is added to the system and confirmed, it cannot be modified. Only half of the nodes can be manipulated to modify the content, which is why the stability and reliability of the blockchain are very high. 5. Anonymous letter: It means that the exchange between nodes follows a fixed algorithm, and customers will not disclose their identities for each other to identify. These unique advantages will over time change the relationship between various industries in the future.


## 2.4.1. Features of Blockchain

Blockchain is a distributed digital ledger that keeps pace with the times. It has the following four characteristics: 1. Distributed ledger: The blockchain is just like taking notes when we listen to lectures. It has a security record for every transaction in the Internet, and there will be no unknown transactions or forgetting transactions. Situation is highly secure and available. 2. Irreversibility: From the public’s understanding of the blockchain, one of the cornerstones of the blockchain is nontampering, so people will not work in this opposite direction. Theoretically, it is possible to reverse the transaction, but this requires 51% of the computing power to recognize your reversal. Logically speaking, this is actually an economic game theory, and 51% of the computing power will not agree with your reversal. If you take 10,000 steps back and say that if you have 51% of the computing power, you have no reason to reverse and destroy. 3. Anticensorship: The blockchain itself keeps a record of every transaction, ever made, which prevents the tracking of blockchain projects. 4. Near real-time settlement: its internal time is very close to the outside world, which ensures that the customer’s transaction confirmation time is almost the same, thus reducing the insecurity of the transaction party.


## 2.4.2. Advantages of Blockchain

Blockchain is an innovative application model of computers in the Internet era, such as distributed data storage and point-to-point transmission consensus mechanism encryption algorithm. It has five major advantages: decentralization, openness, autonomy, information immutability, and anonymity. The five basic advantages have been generally agreed upon. 1. Decentralization: refers to the use of decentralized accounting and storage in the blockchain, without centralized management. All nodes have equal rights and obligations, and system maintenance is handled by specialized maintenance nodes. 2. Openness: The so-called openness means that the blockchain system is open to the outside world. Only specific information is hidden and others are open to everyone. Anyone can query the data through a secure interface. 3. Autonomy: The autonomy of blockchain is based on specifications and protocols. Nodes in the system can freely convert data, so that they can believe that human operations cannot be changed. 4. Information cannot be tampered with: When the user’s information is added to the system and confirmed, it cannot be modified. Only half of the nodes can be manipulated to modify the content, which is why the stability and reliability of the blockchain are very high. 5. Anonymous letter: It means that the exchange between nodes follows a fixed algorithm, and customers will not disclose their identities for each other to identify. These unique advantages will over time change the relationship between various industries in the future.


## 2.5. The Impact of the External Environment on the Blockchain System

### 2.5.1. Self-Factors

In the 21st century, it is very common for people to cause irreparable losses to the blockchain system due to their own operational errors. Among them, people mainly change, attack, and destroy the network system autonomously, which leads to the leakage of information and network paralysis. Many hackers will use its proficiency in computers to implant viruses on corporate or personal computers, so as to achieve their desired goals. For example, in 2012, the hacker sent a Chinese version, embedded a backdoor in the Chinese version of putty, searched many key things from Baidu, and owned his registered domain name (https://putty.org.cn.cn)), promote the site, and steal the admin. Send the SSH username and password entered by the administrator to the designated server. In March 2015, the attacker hijacked the JS script of Baidu Ad Alliance and replaced it with malware. In addition, on August 1, 2014, a large-scale denial of service attack was launched on GitHub using foreign users to access Chinese websites, according to the official Weibo account of Zhejiang Province. Hackers attacked the set-top boxes of cable TV network users, causing reactionary propaganda and affecting people’s normal TV viewing, which had a negative impact. Through these events that have occurred, 75% of the crimes are out of the inside.


### 2.5.2. Influence of Network Resources

Resource sharing is the advantage of big data network. Whether it is from various hardware devices, software data, or a large amount of data and information, it is very convenient for users to query information and achieve effective resource sharing. In addition, not only all network users can access server resources, but also various information and data can be shared between different terminal devices. This provides a resource and many criminals use this device to steal and destroy information. This will cause huge economic losses to users and network construction. The environment has become unmanageable, and confidence in the Internet has been lost. In order to solve this problem, users should not only participate in the security of network data responsibly but also optimize the network environment, strengthen the internal firewall settings of the system, and build a safe and environmentally friendly network space for customers as much as possible.


### 2.5.3. Data Transfer Impact

According to relevant research, communication lines can also lead to the risk of information leakage, especially with the emergence of 5G network technology. All kinds of information technology and equipment fill people’s field of vision. It has brought us a lot of convenience, but there are also a lot of security problems. In view of the current actual situation, many companies or their families have not done a good job of data shielding. Therefore, some illegal users use monitoring communication lines to obtain their personal information. Some unscrupulous people connect our computers through high-end devices. So as to opportunistically intervene in the communication interface, send them the basic information that we usually surf the Internet. In addition, there are many ways we do not know how to steal our important data, such as illegality. There will be intrusion, illegal use, injection of illegal information, line interference, etc. in the communication line, so sufficient measures must be taken to protect the security of data communication.


### 2.5.4. Virus Effects

Factors that affect the failure of network security defenses include the intrusion of computer viruses that control the behavior of computer software and hardware, which can steal useless information. Legal activity has a huge impact on users. There are many types of computer viruses, and their attack characteristics on the device network are also different. Some viruses are responsible for infecting your files and crashing them, while others attack your computer’s defenses. Therefore, it is unlikely to detect it and remove the virus completely; mainly file-type viruses which are designed to infect unused areas of the disk with viruses. Some DOS functions are often used to spread viruses. This will lead to a huge waste of disk space and will affect the normal operation of our computer. Not only will it cause our data to be lost, but it will also render our computer useless. Complexity of the blockchain itself: The blockchain network is very complex. With the increase of transaction customers and different transaction methods, this greatly reduces the stability of the blockchain system. Super high energy consumption: As far as the Bitcoin blockchain is concerned, it consumes more energy than the entire Switzerland. It is conceivable how huge the energy consumption of the entire blockchain is. Lack of skilled operators: Due to the huge and complex system of the blockchain, there are very few people who learn it, resulting in the loss of talents in this area.


## 2.5.1. Self-Factors

In the 21st century, it is very common for people to cause irreparable losses to the blockchain system due to their own operational errors. Among them, people mainly change, attack, and destroy the network system autonomously, which leads to the leakage of information and network paralysis. Many hackers will use its proficiency in computers to implant viruses on corporate or personal computers, so as to achieve their desired goals. For example, in 2012, the hacker sent a Chinese version, embedded a backdoor in the Chinese version of putty, searched many key things from Baidu, and owned his registered domain name (https://putty.org.cn.cn)), promote the site, and steal the admin. Send the SSH username and password entered by the administrator to the designated server. In March 2015, the attacker hijacked the JS script of Baidu Ad Alliance and replaced it with malware. In addition, on August 1, 2014, a large-scale denial of service attack was launched on GitHub using foreign users to access Chinese websites, according to the official Weibo account of Zhejiang Province. Hackers attacked the set-top boxes of cable TV network users, causing reactionary propaganda and affecting people’s normal TV viewing, which had a negative impact. Through these events that have occurred, 75% of the crimes are out of the inside.


## 2.5.2. Influence of Network Resources

Resource sharing is the advantage of big data network. Whether it is from various hardware devices, software data, or a large amount of data and information, it is very convenient for users to query information and achieve effective resource sharing. In addition, not only all network users can access server resources, but also various information and data can be shared between different terminal devices. This provides a resource and many criminals use this device to steal and destroy information. This will cause huge economic losses to users and network construction. The environment has become unmanageable, and confidence in the Internet has been lost. In order to solve this problem, users should not only participate in the security of network data responsibly but also optimize the network environment, strengthen the internal firewall settings of the system, and build a safe and environmentally friendly network space for customers as much as possible.


## 2.5.3. Data Transfer Impact

According to relevant research, communication lines can also lead to the risk of information leakage, especially with the emergence of 5G network technology. All kinds of information technology and equipment fill people’s field of vision. It has brought us a lot of convenience, but there are also a lot of security problems. In view of the current actual situation, many companies or their families have not done a good job of data shielding. Therefore, some illegal users use monitoring communication lines to obtain their personal information. Some unscrupulous people connect our computers through high-end devices. So as to opportunistically intervene in the communication interface, send them the basic information that we usually surf the Internet. In addition, there are many ways we do not know how to steal our important data, such as illegality. There will be intrusion, illegal use, injection of illegal information, line interference, etc. in the communication line, so sufficient measures must be taken to protect the security of data communication.


## 2.5.4. Virus Effects

Factors that affect the failure of network security defenses include the intrusion of computer viruses that control the behavior of computer software and hardware, which can steal useless information. Legal activity has a huge impact on users. There are many types of computer viruses, and their attack characteristics on the device network are also different. Some viruses are responsible for infecting your files and crashing them, while others attack your computer’s defenses. Therefore, it is unlikely to detect it and remove the virus completely; mainly file-type viruses which are designed to infect unused areas of the disk with viruses. Some DOS functions are often used to spread viruses. This will lead to a huge waste of disk space and will affect the normal operation of our computer. Not only will it cause our data to be lost, but it will also render our computer useless. Complexity of the blockchain itself: The blockchain network is very complex. With the increase of transaction customers and different transaction methods, this greatly reduces the stability of the blockchain system. Super high energy consumption: As far as the Bitcoin blockchain is concerned, it consumes more energy than the entire Switzerland. It is conceivable how huge the energy consumption of the entire blockchain is. Lack of skilled operators: Due to the huge and complex system of the blockchain, there are very few people who learn it, resulting in the loss of talents in this area.


## 3. Mathematical Model of Blockchain Market Entities

The transparency and diversification of blockchain technology can make the market better adapt to its own structure. Each of these nodes has its own smart contract data according to its own terms, such as financial information, customer information, and dynamic contracts, and can track transaction information between different users. After analysis and evaluation, we will optimize the operation strategy, provide users with optimization and transaction convenience, formulate the purchase and sale of electricity in the electricity market, and pursue the optimization of our own profits. In the multimicrogrid system, microgrid operators, large users, and decentralized aggregators participate in the market game. In order to pursue the optimization of their own profits, they are in different stages. Therefore, obtaining ultrahigh profits through competition in the market under blockchain technology is the most concerned issue of every industry.


### 3.1. Demands of Microgrid Operators under the Blockchain

Since the energy (wind, solar, etc.) in the blockchain microgrid is intermittent, in a unit cycle, the content sequence must be balanced with its own load, and the external environment generally provides more or less power. If the system has surplus power, the microgrid operator sells the surplus power to other microgrid operators, large users, and some individual users in pursuit of profit optimization and profitRsellMOt. If the system is out of power, the microgrid operator will purchase electricity from the operator with excess power in the external environment to protect itself and incur power purchase costs CbuyMOt. At the same time, under the multi-microgrid market mechanism of blockchain technology, microgrid operators benefit from improved secondary energy utilization, the return of additional carbon emissions, and the adverse cost of additional carbon emissions. Their presentation is as follows.


#### 3.1.1. Income from Electricity SalesRsellMOt

(1)RsellMOt=∑i=1N1psellMtoMitQsellMtoMit+∑j=1N2PsellMtoAjtQsellMtoAjt+∑m=1N3psellMtoUmtQsellMtoUmt+∑q=1N4PsellMtoIqtQsellMtoIqt,where PsellMtoMit, PsellMtoAjt, PsellMtoUmt, and PsellMtoIqt are the electricity sales prices of the i-th microgrid operator, the j-th distributed aggregator, the m-th large user, and the q-th individual user in time period t, respectively; QsellMtoMit, QsellMtoAjt, QsellMtoUmt, and QsellMtoIqtare the electricity sales of the i-th microgrid operator, the j-th distributed aggregator, the m-th large user, and the q-th individual user at time t, respectively; N1 is the number of microgrid operators; N2 is the number of distributed aggregators; N3 for a large number of users; N4 is the number of individual users.


#### 3.1.2. Cost of Purchasing ElectricityCbuyMOt

(2)CbuyMOt=∑i=1N1cbuyMitoMtQbuyMitoMt+∑j=1N2cbuyAjtoMtQbuyAjtoMt.cbuyMitoMt and cbuyAitoMt are the unit prices of electricity purchased by the ith microgrid operator and the jth distributed aggregator during t, respectively; QbuyMitoMt and QbuyAitoMt are the electricity purchased by the ith microgrid operator and the jth distributed aggregator in time period t, respectively. It depends on whether the system has electricity. When the system has no electricity, it will buy electricity from the outside to maintain its own operation, which will generate electricity purchase costs; when the system has excess electricity, it will sell part of the electricity to gain revenue. This will generate profit. This is the only formula: net profit from selling electricity = revenue from selling electricity − cost of buying electricity.


#### 3.1.3. Incentive Benefits and Penalty Costs

(3)RbonusMOt=i−ireRbonust,RbonusMOt=i−ire0Rbonust,whereRbonusMOt is the reward income at time t; ire is the efficiency that can be reused at present, and ire0 is the standard for system renewable energy. Rbonust It is the benefit obtained by improving the efficiency of secondary energy by 1 point each time; CextreMOt is the unfavorable cost of time period t; Hco2t is the current carbon production; Hco2t0 is the amount of carbon emissions it may generate; and cextret is the unfavorable cost for each additional unit of carbon emissions. This system can only be triggered when the disadvantage factor is greater than the advantage condition, and then the utilization rate of renewable energy can be improved.


#### 3.1.4. Distributed Power Output Subsidy Income

(4)RSubsidyMOt=∑k=1a1QsolarktPsolarSubsidy+∑u=1a2QwindutPwindSubsidy.RSubsidyMOt is the subsidy benefit of distributed power sales in time t; Qsolarkt is the amount of electricity generated by the kth photovoltaic power source within time t; PsolarSubsidy is the subsidy benefit of generating one unit of electricity for photovoltaics, the unit is yuan/(kW·h); Qwindut is the power generation quantity of the uth wind power in time period t; PwindSubsidy It is the discounted loss benefit of wind power generation, the unit is yuan/(kW·h); a1, a2 are the amounts of photovoltaic and wind power generated by the microgrid operator, respectively.


### 3.2. The Main Needs of Major UsersCbuyMtoUt,CbuyAtoUt

As the energy consumers on the demand side, the main purpose of large users is to obtain the target electricity produced at the lowest cost. Some large users also have specific power generation capabilities to sell excess power outdoors. This paper simplifies the model, assuming that the main users of the multimicrogrid system are not qualified to generate electricity. Considering only the purchase of electricity by large users, the purpose of most large users to purchase electricity includes the cost of purchasing electricity from the microgrid operatorCbuyMtoUt and the cost of purchasing electricity at the distributed aggregator CbuyAtoUt. The specific form of electricity purchase depends on the electricity sales strategy of each business.


#### 3.2.1. Purchases Electricity from the Operator of Weidian.com

(5)CbuyMtoUt=∑i=1N1cbuyMitoUtQbuyMitoUt.where CbuyMtoUt is the unit cost of electricity purchased by large users from the i-th microgrid operator during time period t; QbuyMitoUt is the amount of electricity purchased by large users from the i-th microgrid operator during time period t.


#### 3.2.2. Purchase Electricity from Distributed Aggregators

(6)CbuyAtoUt=∑j=1N2cbuyAjtoUtQbuyAjtoUt.where cbuyAjtoUt is the unit cost of electricity purchased by large users from j aggregators during period t; QbuyAjtoUt is the amount of electricity purchased by large users from the jth aggregator during period t.


### 3.3. Distributed Aggregator Requirements

Blockchain technology will automatically generate smart contracts, collect and store distributed secondary energy, centrally manage distributed energy, and realize transactions. Coordinated control of various power generation resources by distributed aggregators constantly requires customers to enter the power market, and concord is also a fast consumption method for realizing energy. Decentralized aggregators mainly use bid-ask spreads to maximize profits. They buy electricity at the lowest cost on the one hand and sell it at the highest profit on the other. The specific performance is as follows.


#### 3.3.1. Cost of Purchasing Electricity from Abroad

(7)Cbuyoutt=∑i=1∂1PwinditQwindit+∑j=1∂2PsolarjtQsolarjt+∑m=1∂3PothermtQothermt.∂1, ∂2, ∂3 are the number of wind power users, the number of photovoltaic power generation users, and the number of other distributed generation users; Pwindit, Psolarjt, and Pothermt are the prices at which the manufacturer purchases distributed electricity from wind power users, photovoltaic power users, and other distributed generation users in time period t; Qwindit, Qsolarjt, and Qothermt are the wind power generation, photovoltaic power generation, and other distributed generation power purchased by the manufacturer in time period t, respectively.The cost of purchasing electricity from a microgrid operator:(8)CbuyMtoAt=∑j=1N1cbuyMjtoAtQbuyMjtoAt.CbuyMtoAt is the unit cost of electricity purchased by the distributed aggregator to the i-th microgrid operator at time t; QbuyMjtoAt is the electricity purchased by the distributed aggregator from the ith microgrid operator in time t.Power purchase cost from other distributed aggregators:(9)CbuyAtoAt=∑j=1N2cbuyAjtoAtQbuyAjtoAt.cbuyAtoAt and QbuyAjtoAt are the unit power purchase cost and the amount of power purchased by the manufacturer from other jth submanufacturers in period t, respectively.


#### 3.3.2. Energy Storage Operating Costs

(10)Crunbatteryst=crunAjtQbatteryAj.Crunbatteryst is the energy storage operation cost of distributed aggregator j in time t; crunAjt is the unit operating cost of energy storage for distributed aggregator j in time t; QbatteryAj is the unit operating cost of energy storage for distributed aggregator j in time t; QbatteryAj is the energy storage capacity of distributed aggregator j.


#### 3.3.3. C Income from Electricity Sales

Proceeds from selling electricity to microgrid operators:(11)RsellAtoMt=∑i=1N1PsellAtoMitQsellAtoMit.PsellAtoMit and QsellAtoMit are the electricity price and electricity sold to microgrid operator i in time t, respectively.Revenue from selling electricity to large users:(12)RsellAtoUt=∑m=1N3PsellAtoUmtQsellAtoUmt.PsellAtoUmt and QsellAtoUmt are the electricity price and electricity sold to large user m in time period t, respectively.Benefits of selling electricity to other distributed aggregators:(13)RsellAtoAt=∑j=1N2PsellAtoAjtQsellAtoAjt.PsellAtoAjt and QsellAtoAjt are the electricity price and electricity sold to other distributed aggregators j during time period t, respectively.


### 3.4. Noncooperative Game Model

#### 3.4.1. Game Subject

The game theme of the multimicrogrid market competition game model studied in this paper is mainly the power purchase demand of NM microgrid operators, NU large users, and NA decentralized energy aggregators in a period of time, which is expressed as(14)ΓM1,M2,…,MNM,U1,U2,…,UNU,A1,A2,…,ANA.


#### 3.4.2. Policy SpaceP(t)

The game strategy of each market entity is the unit price of electricity purchaseCbuyt and electricity price Psellt (the unit is Yuan/(kWh)). The unit price of the microgrid operator is actually the selling price of the power company in period t. Therefore, microgrid operators can temporarily ignore the unit price of electricity according to the established strategy. To maximize your own profits, just sell on a case-by-case basis. In this way, the electricity sales method of the microgrid operator i is: ηsellM=PsellMtoAjt,PsellMtoAjt,PsellMtoUmt,PsellMtoIqt. Large customers cannot sell electricity. A series of market game strategies are mainly reflected in the low cost of electricity purchase: ηbuyU=cbuyMjtoU,cbuyAitoU. Most distributed consumption points mainly collect distributed power through energy storage and use the bid-ask spread to make indirect profits. The scope of the game strategy reflects the electricity price in electricity sales: ηsellA=PsellatoMit,PsellAtoUmt,PsellAtoIqt.


#### 3.4.3. Objective FunctionF

The competitive game goal of microgrid operators, large users, and decentralized aggregators are to maximize their profits, that is, to get more income with the least labor cost and the objective function is as follows.(1) The Objective Function of the Microgrid Operator is(15)max∏MOt=RsellMOt−CbuyMOt+RbonusMOt−CSubsidyMOt=∑i=1N1PsellMtoMitQsellMtoMit−cbuyMitoMtQbuyMitoMt+∑j=1N2PsellMtoAitQsellMtoAit−cbuyAjtoMtQbuyAjtoMt+∑m=1N3PsellMtoUmtQsellMtoUmt+∑q=1N4PsellMtoIqtQsellMtoIqt+ire−ire0Rbonust−cextretHco2t−Hco2t0+∑k=1a1QsolarktPsolarSubsidy+∑u=1a2QwindutPwindSubsidy.The objective function for large users is(16)minCUt=CbuyMtoUt+CbuyAtoUt=∑i=1N1cbuyMitoUtQbuyMitoUt+∑j=1N2cbuyAjtoUtQbuyAjtoUt.The objective function of thec distributed aggregator is(17)max∏At=RsellAtoMt+RsellAtoUt+RsellAtoA−Cbuyoutt−Crunbatteryst−CbuyMtoAt−CbuyAtoAt.(2) Constraints.(2) Constraints for Microgrid Operators.Distributed generator set output constraints:(18)0<Lwindat<Lwindmaxt,0<Lsolarβt<Lwindmaxt,LMT,minθMt<LMTθt<LMT,minθt.Electricity sales constraints:(19)0≤∑i=1N1QsellMtoMit+∑m=1N3QsellMtoUmt+∑j=1N2QsellMtoAJt+∑q=1N4QsellMtoIqt≤∑a=1∂1Lwindat+∑β=1∂2Lsolarβt+∑θ=1∂3LMTθt−∑i=1N1LloadMOitΔt.Electricity price constraints:(20)Pmint≤PsellMtoMit,PsellMtoAjt,PsellMtoUmt≤Pmaxt.(3) Constraints of Large User Principals.Electricity purchase constraints:(21)∑i=1N1QbuyMitoUt+∑j=1N2QbuyAjtoUt≥QbuyUt.Electricity purchase price constraints:(22)ℓbuyU=cbuyMitoU,cbuyAjtoU≤cbuyUt.(4) Constraints of Distributed Aggregators.Energy storage battery power constraints:(23)LESSmin≤LESSt≤LESSmax.Electricity sales restrictions:(24)0≤∑i=1N1QsellAtoMit+∑m=1N3QsellAtoUmt≤∑a=1ℓ1Qwindat+∑β=1ℓ2Qsolarβt+∑θ=1ℓ3Qotherθt.Electricity price constraints:(25)Pmint≤PsellAtoMit,PsellAtoUmt≤Pmaxt.(5) Improvement Method.In a multimicrogrid, if the parametersa and b are not selected correctly, it will directly affect the speed of the experimental solution and the effect of the solution. In order to improve the ACO calculation performance, the parameters a, b can be defined as(26)a=1+e−0.1Nmax,b=2.5e1−a+1.where Nmax is the maximum number of repetitions and it can control one parameter to control multiple other parameters, which enhances the liquidity between them. Formulas (23) and (24) are further improvement formulas for the electricity sold by the multimicrogrid. They can make the system run more efficiently and finally help customers get the maximum benefit. If there is no improved formula, not only the whole system is running, there is a high probability that the system will crash due to the huge data, so these two formulas are essential.


## 3.1. Demands of Microgrid Operators under the Blockchain

Since the energy (wind, solar, etc.) in the blockchain microgrid is intermittent, in a unit cycle, the content sequence must be balanced with its own load, and the external environment generally provides more or less power. If the system has surplus power, the microgrid operator sells the surplus power to other microgrid operators, large users, and some individual users in pursuit of profit optimization and profitRsellMOt. If the system is out of power, the microgrid operator will purchase electricity from the operator with excess power in the external environment to protect itself and incur power purchase costs CbuyMOt. At the same time, under the multi-microgrid market mechanism of blockchain technology, microgrid operators benefit from improved secondary energy utilization, the return of additional carbon emissions, and the adverse cost of additional carbon emissions. Their presentation is as follows.


### 3.1.1. Income from Electricity SalesRsellMOt

(1)RsellMOt=∑i=1N1psellMtoMitQsellMtoMit+∑j=1N2PsellMtoAjtQsellMtoAjt+∑m=1N3psellMtoUmtQsellMtoUmt+∑q=1N4PsellMtoIqtQsellMtoIqt,where PsellMtoMit, PsellMtoAjt, PsellMtoUmt, and PsellMtoIqt are the electricity sales prices of the i-th microgrid operator, the j-th distributed aggregator, the m-th large user, and the q-th individual user in time period t, respectively; QsellMtoMit, QsellMtoAjt, QsellMtoUmt, and QsellMtoIqtare the electricity sales of the i-th microgrid operator, the j-th distributed aggregator, the m-th large user, and the q-th individual user at time t, respectively; N1 is the number of microgrid operators; N2 is the number of distributed aggregators; N3 for a large number of users; N4 is the number of individual users.


### 3.1.2. Cost of Purchasing ElectricityCbuyMOt

(2)CbuyMOt=∑i=1N1cbuyMitoMtQbuyMitoMt+∑j=1N2cbuyAjtoMtQbuyAjtoMt.cbuyMitoMt and cbuyAitoMt are the unit prices of electricity purchased by the ith microgrid operator and the jth distributed aggregator during t, respectively; QbuyMitoMt and QbuyAitoMt are the electricity purchased by the ith microgrid operator and the jth distributed aggregator in time period t, respectively. It depends on whether the system has electricity. When the system has no electricity, it will buy electricity from the outside to maintain its own operation, which will generate electricity purchase costs; when the system has excess electricity, it will sell part of the electricity to gain revenue. This will generate profit. This is the only formula: net profit from selling electricity = revenue from selling electricity − cost of buying electricity.


### 3.1.3. Incentive Benefits and Penalty Costs

(3)RbonusMOt=i−ireRbonust,RbonusMOt=i−ire0Rbonust,whereRbonusMOt is the reward income at time t; ire is the efficiency that can be reused at present, and ire0 is the standard for system renewable energy. Rbonust It is the benefit obtained by improving the efficiency of secondary energy by 1 point each time; CextreMOt is the unfavorable cost of time period t; Hco2t is the current carbon production; Hco2t0 is the amount of carbon emissions it may generate; and cextret is the unfavorable cost for each additional unit of carbon emissions. This system can only be triggered when the disadvantage factor is greater than the advantage condition, and then the utilization rate of renewable energy can be improved.


### 3.1.4. Distributed Power Output Subsidy Income

(4)RSubsidyMOt=∑k=1a1QsolarktPsolarSubsidy+∑u=1a2QwindutPwindSubsidy.RSubsidyMOt is the subsidy benefit of distributed power sales in time t; Qsolarkt is the amount of electricity generated by the kth photovoltaic power source within time t; PsolarSubsidy is the subsidy benefit of generating one unit of electricity for photovoltaics, the unit is yuan/(kW·h); Qwindut is the power generation quantity of the uth wind power in time period t; PwindSubsidy It is the discounted loss benefit of wind power generation, the unit is yuan/(kW·h); a1, a2 are the amounts of photovoltaic and wind power generated by the microgrid operator, respectively.


## 3.1.1. Income from Electricity SalesRsellMOt

(1)RsellMOt=∑i=1N1psellMtoMitQsellMtoMit+∑j=1N2PsellMtoAjtQsellMtoAjt+∑m=1N3psellMtoUmtQsellMtoUmt+∑q=1N4PsellMtoIqtQsellMtoIqt,where PsellMtoMit, PsellMtoAjt, PsellMtoUmt, and PsellMtoIqt are the electricity sales prices of the i-th microgrid operator, the j-th distributed aggregator, the m-th large user, and the q-th individual user in time period t, respectively; QsellMtoMit, QsellMtoAjt, QsellMtoUmt, and QsellMtoIqtare the electricity sales of the i-th microgrid operator, the j-th distributed aggregator, the m-th large user, and the q-th individual user at time t, respectively; N1 is the number of microgrid operators; N2 is the number of distributed aggregators; N3 for a large number of users; N4 is the number of individual users.


## 3.1.2. Cost of Purchasing ElectricityCbuyMOt

(2)CbuyMOt=∑i=1N1cbuyMitoMtQbuyMitoMt+∑j=1N2cbuyAjtoMtQbuyAjtoMt.cbuyMitoMt and cbuyAitoMt are the unit prices of electricity purchased by the ith microgrid operator and the jth distributed aggregator during t, respectively; QbuyMitoMt and QbuyAitoMt are the electricity purchased by the ith microgrid operator and the jth distributed aggregator in time period t, respectively. It depends on whether the system has electricity. When the system has no electricity, it will buy electricity from the outside to maintain its own operation, which will generate electricity purchase costs; when the system has excess electricity, it will sell part of the electricity to gain revenue. This will generate profit. This is the only formula: net profit from selling electricity = revenue from selling electricity − cost of buying electricity.


## 3.1.3. Incentive Benefits and Penalty Costs

(3)RbonusMOt=i−ireRbonust,RbonusMOt=i−ire0Rbonust,whereRbonusMOt is the reward income at time t; ire is the efficiency that can be reused at present, and ire0 is the standard for system renewable energy. Rbonust It is the benefit obtained by improving the efficiency of secondary energy by 1 point each time; CextreMOt is the unfavorable cost of time period t; Hco2t is the current carbon production; Hco2t0 is the amount of carbon emissions it may generate; and cextret is the unfavorable cost for each additional unit of carbon emissions. This system can only be triggered when the disadvantage factor is greater than the advantage condition, and then the utilization rate of renewable energy can be improved.


## 3.1.4. Distributed Power Output Subsidy Income

(4)RSubsidyMOt=∑k=1a1QsolarktPsolarSubsidy+∑u=1a2QwindutPwindSubsidy.RSubsidyMOt is the subsidy benefit of distributed power sales in time t; Qsolarkt is the amount of electricity generated by the kth photovoltaic power source within time t; PsolarSubsidy is the subsidy benefit of generating one unit of electricity for photovoltaics, the unit is yuan/(kW·h); Qwindut is the power generation quantity of the uth wind power in time period t; PwindSubsidy It is the discounted loss benefit of wind power generation, the unit is yuan/(kW·h); a1, a2 are the amounts of photovoltaic and wind power generated by the microgrid operator, respectively.


## 3.2. The Main Needs of Major UsersCbuyMtoUt,CbuyAtoUt

As the energy consumers on the demand side, the main purpose of large users is to obtain the target electricity produced at the lowest cost. Some large users also have specific power generation capabilities to sell excess power outdoors. This paper simplifies the model, assuming that the main users of the multimicrogrid system are not qualified to generate electricity. Considering only the purchase of electricity by large users, the purpose of most large users to purchase electricity includes the cost of purchasing electricity from the microgrid operatorCbuyMtoUt and the cost of purchasing electricity at the distributed aggregator CbuyAtoUt. The specific form of electricity purchase depends on the electricity sales strategy of each business.


### 3.2.1. Purchases Electricity from the Operator of Weidian.com

(5)CbuyMtoUt=∑i=1N1cbuyMitoUtQbuyMitoUt.where CbuyMtoUt is the unit cost of electricity purchased by large users from the i-th microgrid operator during time period t; QbuyMitoUt is the amount of electricity purchased by large users from the i-th microgrid operator during time period t.


### 3.2.2. Purchase Electricity from Distributed Aggregators

(6)CbuyAtoUt=∑j=1N2cbuyAjtoUtQbuyAjtoUt.where cbuyAjtoUt is the unit cost of electricity purchased by large users from j aggregators during period t; QbuyAjtoUt is the amount of electricity purchased by large users from the jth aggregator during period t.


## 3.2.1. Purchases Electricity from the Operator of Weidian.com

(5)CbuyMtoUt=∑i=1N1cbuyMitoUtQbuyMitoUt.where CbuyMtoUt is the unit cost of electricity purchased by large users from the i-th microgrid operator during time period t; QbuyMitoUt is the amount of electricity purchased by large users from the i-th microgrid operator during time period t.


## 3.2.2. Purchase Electricity from Distributed Aggregators

(6)CbuyAtoUt=∑j=1N2cbuyAjtoUtQbuyAjtoUt.where cbuyAjtoUt is the unit cost of electricity purchased by large users from j aggregators during period t; QbuyAjtoUt is the amount of electricity purchased by large users from the jth aggregator during period t.


## 3.3. Distributed Aggregator Requirements

Blockchain technology will automatically generate smart contracts, collect and store distributed secondary energy, centrally manage distributed energy, and realize transactions. Coordinated control of various power generation resources by distributed aggregators constantly requires customers to enter the power market, and concord is also a fast consumption method for realizing energy. Decentralized aggregators mainly use bid-ask spreads to maximize profits. They buy electricity at the lowest cost on the one hand and sell it at the highest profit on the other. The specific performance is as follows.


### 3.3.1. Cost of Purchasing Electricity from Abroad

(7)Cbuyoutt=∑i=1∂1PwinditQwindit+∑j=1∂2PsolarjtQsolarjt+∑m=1∂3PothermtQothermt.∂1, ∂2, ∂3 are the number of wind power users, the number of photovoltaic power generation users, and the number of other distributed generation users; Pwindit, Psolarjt, and Pothermt are the prices at which the manufacturer purchases distributed electricity from wind power users, photovoltaic power users, and other distributed generation users in time period t; Qwindit, Qsolarjt, and Qothermt are the wind power generation, photovoltaic power generation, and other distributed generation power purchased by the manufacturer in time period t, respectively.The cost of purchasing electricity from a microgrid operator:(8)CbuyMtoAt=∑j=1N1cbuyMjtoAtQbuyMjtoAt.CbuyMtoAt is the unit cost of electricity purchased by the distributed aggregator to the i-th microgrid operator at time t; QbuyMjtoAt is the electricity purchased by the distributed aggregator from the ith microgrid operator in time t.Power purchase cost from other distributed aggregators:(9)CbuyAtoAt=∑j=1N2cbuyAjtoAtQbuyAjtoAt.cbuyAtoAt and QbuyAjtoAt are the unit power purchase cost and the amount of power purchased by the manufacturer from other jth submanufacturers in period t, respectively.


### 3.3.2. Energy Storage Operating Costs

(10)Crunbatteryst=crunAjtQbatteryAj.Crunbatteryst is the energy storage operation cost of distributed aggregator j in time t; crunAjt is the unit operating cost of energy storage for distributed aggregator j in time t; QbatteryAj is the unit operating cost of energy storage for distributed aggregator j in time t; QbatteryAj is the energy storage capacity of distributed aggregator j.


### 3.3.3. C Income from Electricity Sales

Proceeds from selling electricity to microgrid operators:(11)RsellAtoMt=∑i=1N1PsellAtoMitQsellAtoMit.PsellAtoMit and QsellAtoMit are the electricity price and electricity sold to microgrid operator i in time t, respectively.Revenue from selling electricity to large users:(12)RsellAtoUt=∑m=1N3PsellAtoUmtQsellAtoUmt.PsellAtoUmt and QsellAtoUmt are the electricity price and electricity sold to large user m in time period t, respectively.Benefits of selling electricity to other distributed aggregators:(13)RsellAtoAt=∑j=1N2PsellAtoAjtQsellAtoAjt.PsellAtoAjt and QsellAtoAjt are the electricity price and electricity sold to other distributed aggregators j during time period t, respectively.


## 3.3.1. Cost of Purchasing Electricity from Abroad

(7)Cbuyoutt=∑i=1∂1PwinditQwindit+∑j=1∂2PsolarjtQsolarjt+∑m=1∂3PothermtQothermt.∂1, ∂2, ∂3 are the number of wind power users, the number of photovoltaic power generation users, and the number of other distributed generation users; Pwindit, Psolarjt, and Pothermt are the prices at which the manufacturer purchases distributed electricity from wind power users, photovoltaic power users, and other distributed generation users in time period t; Qwindit, Qsolarjt, and Qothermt are the wind power generation, photovoltaic power generation, and other distributed generation power purchased by the manufacturer in time period t, respectively.The cost of purchasing electricity from a microgrid operator:(8)CbuyMtoAt=∑j=1N1cbuyMjtoAtQbuyMjtoAt.CbuyMtoAt is the unit cost of electricity purchased by the distributed aggregator to the i-th microgrid operator at time t; QbuyMjtoAt is the electricity purchased by the distributed aggregator from the ith microgrid operator in time t.Power purchase cost from other distributed aggregators:(9)CbuyAtoAt=∑j=1N2cbuyAjtoAtQbuyAjtoAt.cbuyAtoAt and QbuyAjtoAt are the unit power purchase cost and the amount of power purchased by the manufacturer from other jth submanufacturers in period t, respectively.


## 3.3.2. Energy Storage Operating Costs

(10)Crunbatteryst=crunAjtQbatteryAj.Crunbatteryst is the energy storage operation cost of distributed aggregator j in time t; crunAjt is the unit operating cost of energy storage for distributed aggregator j in time t; QbatteryAj is the unit operating cost of energy storage for distributed aggregator j in time t; QbatteryAj is the energy storage capacity of distributed aggregator j.


## 3.3.3. C Income from Electricity Sales

Proceeds from selling electricity to microgrid operators:(11)RsellAtoMt=∑i=1N1PsellAtoMitQsellAtoMit.PsellAtoMit and QsellAtoMit are the electricity price and electricity sold to microgrid operator i in time t, respectively.Revenue from selling electricity to large users:(12)RsellAtoUt=∑m=1N3PsellAtoUmtQsellAtoUmt.PsellAtoUmt and QsellAtoUmt are the electricity price and electricity sold to large user m in time period t, respectively.Benefits of selling electricity to other distributed aggregators:(13)RsellAtoAt=∑j=1N2PsellAtoAjtQsellAtoAjt.PsellAtoAjt and QsellAtoAjt are the electricity price and electricity sold to other distributed aggregators j during time period t, respectively.


## 3.4. Noncooperative Game Model

### 3.4.1. Game Subject

The game theme of the multimicrogrid market competition game model studied in this paper is mainly the power purchase demand of NM microgrid operators, NU large users, and NA decentralized energy aggregators in a period of time, which is expressed as(14)ΓM1,M2,…,MNM,U1,U2,…,UNU,A1,A2,…,ANA.


### 3.4.2. Policy SpaceP(t)

The game strategy of each market entity is the unit price of electricity purchaseCbuyt and electricity price Psellt (the unit is Yuan/(kWh)). The unit price of the microgrid operator is actually the selling price of the power company in period t. Therefore, microgrid operators can temporarily ignore the unit price of electricity according to the established strategy. To maximize your own profits, just sell on a case-by-case basis. In this way, the electricity sales method of the microgrid operator i is: ηsellM=PsellMtoAjt,PsellMtoAjt,PsellMtoUmt,PsellMtoIqt. Large customers cannot sell electricity. A series of market game strategies are mainly reflected in the low cost of electricity purchase: ηbuyU=cbuyMjtoU,cbuyAitoU. Most distributed consumption points mainly collect distributed power through energy storage and use the bid-ask spread to make indirect profits. The scope of the game strategy reflects the electricity price in electricity sales: ηsellA=PsellatoMit,PsellAtoUmt,PsellAtoIqt.


### 3.4.3. Objective FunctionF

The competitive game goal of microgrid operators, large users, and decentralized aggregators are to maximize their profits, that is, to get more income with the least labor cost and the objective function is as follows.(1) The Objective Function of the Microgrid Operator is(15)max∏MOt=RsellMOt−CbuyMOt+RbonusMOt−CSubsidyMOt=∑i=1N1PsellMtoMitQsellMtoMit−cbuyMitoMtQbuyMitoMt+∑j=1N2PsellMtoAitQsellMtoAit−cbuyAjtoMtQbuyAjtoMt+∑m=1N3PsellMtoUmtQsellMtoUmt+∑q=1N4PsellMtoIqtQsellMtoIqt+ire−ire0Rbonust−cextretHco2t−Hco2t0+∑k=1a1QsolarktPsolarSubsidy+∑u=1a2QwindutPwindSubsidy.The objective function for large users is(16)minCUt=CbuyMtoUt+CbuyAtoUt=∑i=1N1cbuyMitoUtQbuyMitoUt+∑j=1N2cbuyAjtoUtQbuyAjtoUt.The objective function of thec distributed aggregator is(17)max∏At=RsellAtoMt+RsellAtoUt+RsellAtoA−Cbuyoutt−Crunbatteryst−CbuyMtoAt−CbuyAtoAt.(2) Constraints.(2) Constraints for Microgrid Operators.Distributed generator set output constraints:(18)0<Lwindat<Lwindmaxt,0<Lsolarβt<Lwindmaxt,LMT,minθMt<LMTθt<LMT,minθt.Electricity sales constraints:(19)0≤∑i=1N1QsellMtoMit+∑m=1N3QsellMtoUmt+∑j=1N2QsellMtoAJt+∑q=1N4QsellMtoIqt≤∑a=1∂1Lwindat+∑β=1∂2Lsolarβt+∑θ=1∂3LMTθt−∑i=1N1LloadMOitΔt.Electricity price constraints:(20)Pmint≤PsellMtoMit,PsellMtoAjt,PsellMtoUmt≤Pmaxt.(3) Constraints of Large User Principals.Electricity purchase constraints:(21)∑i=1N1QbuyMitoUt+∑j=1N2QbuyAjtoUt≥QbuyUt.Electricity purchase price constraints:(22)ℓbuyU=cbuyMitoU,cbuyAjtoU≤cbuyUt.(4) Constraints of Distributed Aggregators.Energy storage battery power constraints:(23)LESSmin≤LESSt≤LESSmax.Electricity sales restrictions:(24)0≤∑i=1N1QsellAtoMit+∑m=1N3QsellAtoUmt≤∑a=1ℓ1Qwindat+∑β=1ℓ2Qsolarβt+∑θ=1ℓ3Qotherθt.Electricity price constraints:(25)Pmint≤PsellAtoMit,PsellAtoUmt≤Pmaxt.(5) Improvement Method.In a multimicrogrid, if the parametersa and b are not selected correctly, it will directly affect the speed of the experimental solution and the effect of the solution. In order to improve the ACO calculation performance, the parameters a, b can be defined as(26)a=1+e−0.1Nmax,b=2.5e1−a+1.where Nmax is the maximum number of repetitions and it can control one parameter to control multiple other parameters, which enhances the liquidity between them. Formulas (23) and (24) are further improvement formulas for the electricity sold by the multimicrogrid. They can make the system run more efficiently and finally help customers get the maximum benefit. If there is no improved formula, not only the whole system is running, there is a high probability that the system will crash due to the huge data, so these two formulas are essential.


## 3.4.1. Game Subject

The game theme of the multimicrogrid market competition game model studied in this paper is mainly the power purchase demand of NM microgrid operators, NU large users, and NA decentralized energy aggregators in a period of time, which is expressed as(14)ΓM1,M2,…,MNM,U1,U2,…,UNU,A1,A2,…,ANA.


## 3.4.2. Policy SpaceP(t)

The game strategy of each market entity is the unit price of electricity purchaseCbuyt and electricity price Psellt (the unit is Yuan/(kWh)). The unit price of the microgrid operator is actually the selling price of the power company in period t. Therefore, microgrid operators can temporarily ignore the unit price of electricity according to the established strategy. To maximize your own profits, just sell on a case-by-case basis. In this way, the electricity sales method of the microgrid operator i is: ηsellM=PsellMtoAjt,PsellMtoAjt,PsellMtoUmt,PsellMtoIqt. Large customers cannot sell electricity. A series of market game strategies are mainly reflected in the low cost of electricity purchase: ηbuyU=cbuyMjtoU,cbuyAitoU. Most distributed consumption points mainly collect distributed power through energy storage and use the bid-ask spread to make indirect profits. The scope of the game strategy reflects the electricity price in electricity sales: ηsellA=PsellatoMit,PsellAtoUmt,PsellAtoIqt.


## 3.4.3. Objective FunctionF

The competitive game goal of microgrid operators, large users, and decentralized aggregators are to maximize their profits, that is, to get more income with the least labor cost and the objective function is as follows.(1) The Objective Function of the Microgrid Operator is(15)max∏MOt=RsellMOt−CbuyMOt+RbonusMOt−CSubsidyMOt=∑i=1N1PsellMtoMitQsellMtoMit−cbuyMitoMtQbuyMitoMt+∑j=1N2PsellMtoAitQsellMtoAit−cbuyAjtoMtQbuyAjtoMt+∑m=1N3PsellMtoUmtQsellMtoUmt+∑q=1N4PsellMtoIqtQsellMtoIqt+ire−ire0Rbonust−cextretHco2t−Hco2t0+∑k=1a1QsolarktPsolarSubsidy+∑u=1a2QwindutPwindSubsidy.The objective function for large users is(16)minCUt=CbuyMtoUt+CbuyAtoUt=∑i=1N1cbuyMitoUtQbuyMitoUt+∑j=1N2cbuyAjtoUtQbuyAjtoUt.The objective function of thec distributed aggregator is(17)max∏At=RsellAtoMt+RsellAtoUt+RsellAtoA−Cbuyoutt−Crunbatteryst−CbuyMtoAt−CbuyAtoAt.(2) Constraints.(2) Constraints for Microgrid Operators.Distributed generator set output constraints:(18)0<Lwindat<Lwindmaxt,0<Lsolarβt<Lwindmaxt,LMT,minθMt<LMTθt<LMT,minθt.Electricity sales constraints:(19)0≤∑i=1N1QsellMtoMit+∑m=1N3QsellMtoUmt+∑j=1N2QsellMtoAJt+∑q=1N4QsellMtoIqt≤∑a=1∂1Lwindat+∑β=1∂2Lsolarβt+∑θ=1∂3LMTθt−∑i=1N1LloadMOitΔt.Electricity price constraints:(20)Pmint≤PsellMtoMit,PsellMtoAjt,PsellMtoUmt≤Pmaxt.(3) Constraints of Large User Principals.Electricity purchase constraints:(21)∑i=1N1QbuyMitoUt+∑j=1N2QbuyAjtoUt≥QbuyUt.Electricity purchase price constraints:(22)ℓbuyU=cbuyMitoU,cbuyAjtoU≤cbuyUt.(4) Constraints of Distributed Aggregators.Energy storage battery power constraints:(23)LESSmin≤LESSt≤LESSmax.Electricity sales restrictions:(24)0≤∑i=1N1QsellAtoMit+∑m=1N3QsellAtoUmt≤∑a=1ℓ1Qwindat+∑β=1ℓ2Qsolarβt+∑θ=1ℓ3Qotherθt.Electricity price constraints:(25)Pmint≤PsellAtoMit,PsellAtoUmt≤Pmaxt.(5) Improvement Method.In a multimicrogrid, if the parametersa and b are not selected correctly, it will directly affect the speed of the experimental solution and the effect of the solution. In order to improve the ACO calculation performance, the parameters a, b can be defined as(26)a=1+e−0.1Nmax,b=2.5e1−a+1.where Nmax is the maximum number of repetitions and it can control one parameter to control multiple other parameters, which enhances the liquidity between them. Formulas (23) and (24) are further improvement formulas for the electricity sold by the multimicrogrid. They can make the system run more efficiently and finally help customers get the maximum benefit. If there is no improved formula, not only the whole system is running, there is a high probability that the system will crash due to the huge data, so these two formulas are essential.


## 4. Experiment and Analysis of Multimicrogrid under Blockchain

### 4.1. Overall Model Diagram of Blockchain Power System

Figure1 shows that the power system under the blockchain operates cyclically. At the beginning, it is necessary to find suitable data information in the big environment of the blockchain. After finding, the power dispatching plan is automatically generated according to the matching dispatching model and dispatching strategy. Intelligent adjustment is made according to different power generation conditions, and finally the data is updated and the sorted results are fed back to the dispatching model for improvement. First, the transaction information must be collected in the blockchain, and then spread to the entire network through the P2P network in the form of smart contracts. The nodes will synthesize blocks and reach a consensus. If the security check is met, proceed to the next step. To prevent it from running, the data that has passed is collected by the smart meter and recorded in the blockchain. After the transaction time, the system automatically completes the value transfer.Figure 1
Power system diagram.


### 4.2. Transaction Analysis and Comparison of Multimicrogrid Interconnection Systems

Figures2 and 3, respectively, show the daily average transaction price and transaction volume of the multimicrogrid interconnection system. Looking at Figure 1 alone, the final average transaction price of the multimicrogrid system is located in the middle of the electricity selling price and the on-grid electricity price. Compared with the previous traditional transaction model of “setting the price to go online, the remaining amount is connected to the Internet,” the producer can have more electricity sales benefits on the trading platform, and consumers can save more electricity bills. As shown in Figure 2, the multimicrogrid system can meet the needs of most electricity purchasers, but at 7:00–15:00, due to the problem of the producer, the electricity sold is not enough, which will make the generator set of the backup scheme. The group provides the electricity required by consumers. The time period from 19:00 to 20:00 is that the platform has not passed the dynamic constraint check, and transactions cannot be performed during this period. The average electricity price of multiple microgrids will vary with time during the day. Between 10:00 and 15:00, the multimicrogrid system will purchase electricity to meet the needs of customers due to lack of electricity, which will lead to an increase in electricity prices and increase customer consumption. It is not difficult to see from the comparison of the two figures that the transaction volume will affect the average electricity price; as the transaction volume increases, the electricity price will also increase.Figure 2
Average electricity price in different time periods.Figure 3
All day volume.Figure4 shows the optimal electricity prices provided by different operators at different times under the multimicrogrid interconnection system. From the above data, it can be seen that the customer’s electricity demand reaches its peak in the morning, and these markets sell electricity at higher prices. Use this time to get the best benefit. When the price for large users reaches the best moment, the microgrid operator sets the price of electricity sales at 1.6 yuan/(kw·h), while the price of distributed aggregators is up to 1.7 yuan/(kw·h). If the price of the distributed aggregator is lower than the price of the microgrid, it will not generate high profits, so the price of the distributed aggregator is set at 1.7 yuan/(kw.h), At this time, both parties achieve the optimal effect.Figure 4
Carrier’s best price.


### 4.3. Multimicrogrid Self-Value Method and Dynamic Constraint Analysis

In order to reflect the obvious comparison, Figure4 compares the fixed aggressive values of 0.05, 0.09, 0.12, the zero-information strategy, and the ZI aggressive value. It can be seen from Figure 5 that the ZI aggressive value is in the range of (0.05, 0.09). This data experiment Fair and accurate. As can be seen from the figure, the average values obtained by these methods are very similar. The number of transaction cycles of the adaptive aggressive value is less than that of other methods, because the value it selects is the data selected from the market, and the size of the value can be determined in the system to improve the success of trading between customers.Figure 5
Progressive value comparison.Figure6 shows the optimization decision for voltage offset in a multimicrogrid system. It can be seen from the figure that under the condition of no voltage offset constraint of multimicrogrid, after meeting the customer’s demand, the producer will put the surplus power into the storage grid to obtain greater profits. This makes the voltage excursion range of the node larger than the constraint. For the voltage offset between 0.890 pu and 1.110 pu, the voltage offset with constraints and without constraints accounts for 97.2% and 93.5%, respectively, so the voltage offset with constraints is more advantageous in multimicrogrid systems. The presence or absence of the voltage offset constraint has little effect on the electricity sold by the multimicrogrid. In these two cases, their electricity prices are basically the same; and the number of affected nodes in these two environments differs by a single digit. Nodes are negligible in the grid system. Voltage offset constraints are optional, but the voltage offset with constraints is more stable and reliable in the system.Figure 6
Voltage offset.Table1 shows the power flow distribution of each branch with dynamic constraint check without dynamic constraint check from Table 1 at 19:50 in the multimicrogrid time period. It can be seen that the none of the trends exceeded their limits.Table 1
Comparison of the flow of each branch.
Branch routeEffective nuclear current (kw)Ineffective nuclear current (kw)6–71001107–81001108–9100110


### 4.4. Smart Contract Transaction Details

Tables2 and 3 show the experimental status, transaction results and transaction information of the multimicrogrid under the blockchain during the entire transaction cycle. It can be seen from Table 2 that the lowest bid price z on the producer side is higher than the highest bid price x on the consumer side, so all customers in the multimicrogrid adjust their bids in turn according to the adaptive aggressive value. After repeated attempts, after the real quotation provided by consumer x, the z quotation of the producer side is lower than the quotation of consumer x, and the two negotiate with each other to reach a consensus. After the successful transaction and settlement of the two, the producer’s z still has excess electricity, and after the consumer c provides the real quotation, the price of x is lower than the price of c, so c matches x. However, the consumer c does not get enough electricity and the quotation reaches the quotation of the producer v, so v and c are matched, but the transaction of v and c cannot pass the dynamic constraint check, so the failure to match the two causes the transaction to fail to reach the transaction limit repeatedly. Therefore, after b on the consumer side submits the real quotation, the quotation of b is lower than that of c and higher than that of v, so v matches b, and the transaction is concluded when all conditions are met. However, at this time, v and b still have excess power, so v and b requote, and the two directly enter the next transaction until the end of the transaction. The final settlement result is that the accounts of consumers x, c and b transferred 20.00, 54.80, and 55.70 ether, respectively, and the corresponding amount of electricity was added to the accounts. Producers v and z sold 70, 110 kW·h, and they obtained the same amount of ether. The corresponding power is 55.80 and 77.10 ether.Table 2
Transaction results.
Trading clientPrice (ether/(kw.h))z-x0.66x-c0.65v-b0.71Table 3
Transaction information.
CounterpartyTransaction addressAccount before transaction (kw.h)Pre-trade balance (ether)Post-trade account (kw.h)Post-trade balance (ether)v1 × 1234…8010020150.20z1 × 1s1s…1101000175.10x1 × g3g4…01004080.50c1 × f4g6…01008544.30b1 × g4h6…01008043.60


### 4.5. Comparison of Transportation Efficiency, Results, and Solution Efficiency of Various Algorithms in Multimicrogrid

A. In this paper, the multiple constraints of multimicrogrids are considered in many aspects. In order to better reflect the impact of the dynamic beam method on the computational efficiency, we compare the transaction time with the computational complexity of participating customers. The trading time of the experiment is set in the table generated when the first microgrid user publishes the actual offer. Moreover, in order to better compare the computing efficiency of smart contracts and traditional transaction modes, the experiment simulated the highest trend of traditional centralized transaction mode and smart contract mode. All the experimental results are shown in Table4. It can be seen that the gas cost of the constrained platform is higher than that of the unconstrained platform, so that the experimental conclusions are in line with their actual calculation amount.Table 4
Running results.
Types ofTime (s)CostBinding platform6152621Unconstrained platform715232Pretraditional trading model1.100Smart contract mode0.500In terms of time comparison, the time difference between the constrained platform and the unconstrained platform is almost the same, which shows that the gas cost of the dynamic constraint method is relatively high, but its computing efficiency is guaranteed and can meet the actual situation of customers. In Matlab, the time of the smart contract mode is much lower than the time of the traditional mode. This comparison highlights that the decentralized transaction model is more excellent than the traditional method. The computing time of both platforms is greater than that of the smart contract model., which is a difference caused by their different mechanisms: it requires operating on the platform interface, although the platform takes much more time than them, but it has security and consistency that the latter two cannot compare in response to this problem. Table4 gives specific data so that we can clearly recognize its advantages; the experiment comprehensively lists four experimental objects, and the smart contract model is far superior to the other three types in terms of transaction time and cost.B. It can be seen from Table5 that the average times of IACO and ACO are lower than GA and PSO algorithms, which reflects ACO. The overall convergence ability of GA is higher than that of GA and PSO algorithms. In addition, the IIMO, IIA, and CU of IACO and ACO are better than GA and PSO algorithms, indicating that the overall convergence ability of ACO is also better than that of GA and PSO algorithms. This is a microgrid system under the ACO multiblockchain network. It is a powerful detection function and efficient solution to optimization problems, so people will choose this algorithm to manage their own blockchain in most cases, and its various experimental results show its advantages, which makes us more firmly believe it. Through the experimental data in Figure 5, the average number of times of IACO is less than that of ACO, and the IIMO, IIA, and CU of IACO are higher than those of ACO, which indicates that the evolution of volatile factor Q and control factors b and d indirectly increases the normal frequency. The overall detection ability and convergence ability of ACO improves the computing efficiency, which leads to better results. Finally, we draw the final conclusion on the overall analysis: based on the basic characteristics of the blockchain system and ACO, we have made experiments on this. Table 5 shows the general operation steps and processes of this experiment. IACO has better overall detection ability and convergence function when solving blockchain multiobjective problems, and the solving efficiency is far greater than other algorithms.Table 5
Comparison of optimization results of each algorithm.
AlgorithmAverage timesIIMO/YuanIIA/YuanCU/YuanLACO60293296.5291233.2286523.2ACO70266152.3256326.2275636.2GA90256362.2255312.1302633.2PSO95256362.1245632.2312635.2C. In addition, the follow-up experiments compared and analyzed the solution efficiency of IACO, ACO, and PSO algorithms in the blockchain for various main competition models of multimicrogrid. As can be seen from Figure7, the experiment analyzed four algorithms. The solution efficiency of them under different network nodes is made. When the number of network nodes is 10, the figure shows that IACO is slightly higher than the other three algorithms, but the difference between them is not large; however, as more and more network nodes are added later, the internal algorithm model becomes larger and larger., more and more complex, the solution efficiency of ACO has become more excellent, and the calculation time in the same scale is equal to that of GA and PSO algorithms, which proves that the decentralization ability of ACO strengthens the communication between blockchain subjects. The model can be solved more effectively. In addition, with the continuous addition of nodes, it can be seen from the figure that PSO and GA will eventually overlap, and it can also be seen that the solution efficiency of IACO is higher than that of ACO, indicating that the continuous changes to the algorithm enhance the overall detection ability and rapid convergence of ACO, ability, and then improve the efficiency of IACO solution. It can be seen from Table 5 that the average convergence times of GA are lower than that of PSO, and IIMO, IIA, and CU are all better than PSO, which proves that GA is more suitable for multimicrogrid system than PSO; Figure 7 also confirms this. It is just that with the continuous addition of nodes, their solution efficiency overlaps, which shows that the difference between them will gradually decrease with the size of the system and eventually shrink to negligible.Figure 7
Solving efficiency diagram of each algorithm.


## 4.1. Overall Model Diagram of Blockchain Power System

Figure1 shows that the power system under the blockchain operates cyclically. At the beginning, it is necessary to find suitable data information in the big environment of the blockchain. After finding, the power dispatching plan is automatically generated according to the matching dispatching model and dispatching strategy. Intelligent adjustment is made according to different power generation conditions, and finally the data is updated and the sorted results are fed back to the dispatching model for improvement. First, the transaction information must be collected in the blockchain, and then spread to the entire network through the P2P network in the form of smart contracts. The nodes will synthesize blocks and reach a consensus. If the security check is met, proceed to the next step. To prevent it from running, the data that has passed is collected by the smart meter and recorded in the blockchain. After the transaction time, the system automatically completes the value transfer.Figure 1
Power system diagram.


## 4.2. Transaction Analysis and Comparison of Multimicrogrid Interconnection Systems

Figures2 and 3, respectively, show the daily average transaction price and transaction volume of the multimicrogrid interconnection system. Looking at Figure 1 alone, the final average transaction price of the multimicrogrid system is located in the middle of the electricity selling price and the on-grid electricity price. Compared with the previous traditional transaction model of “setting the price to go online, the remaining amount is connected to the Internet,” the producer can have more electricity sales benefits on the trading platform, and consumers can save more electricity bills. As shown in Figure 2, the multimicrogrid system can meet the needs of most electricity purchasers, but at 7:00–15:00, due to the problem of the producer, the electricity sold is not enough, which will make the generator set of the backup scheme. The group provides the electricity required by consumers. The time period from 19:00 to 20:00 is that the platform has not passed the dynamic constraint check, and transactions cannot be performed during this period. The average electricity price of multiple microgrids will vary with time during the day. Between 10:00 and 15:00, the multimicrogrid system will purchase electricity to meet the needs of customers due to lack of electricity, which will lead to an increase in electricity prices and increase customer consumption. It is not difficult to see from the comparison of the two figures that the transaction volume will affect the average electricity price; as the transaction volume increases, the electricity price will also increase.Figure 2
Average electricity price in different time periods.Figure 3
All day volume.Figure4 shows the optimal electricity prices provided by different operators at different times under the multimicrogrid interconnection system. From the above data, it can be seen that the customer’s electricity demand reaches its peak in the morning, and these markets sell electricity at higher prices. Use this time to get the best benefit. When the price for large users reaches the best moment, the microgrid operator sets the price of electricity sales at 1.6 yuan/(kw·h), while the price of distributed aggregators is up to 1.7 yuan/(kw·h). If the price of the distributed aggregator is lower than the price of the microgrid, it will not generate high profits, so the price of the distributed aggregator is set at 1.7 yuan/(kw.h), At this time, both parties achieve the optimal effect.Figure 4
Carrier’s best price.


## 4.3. Multimicrogrid Self-Value Method and Dynamic Constraint Analysis

In order to reflect the obvious comparison, Figure4 compares the fixed aggressive values of 0.05, 0.09, 0.12, the zero-information strategy, and the ZI aggressive value. It can be seen from Figure 5 that the ZI aggressive value is in the range of (0.05, 0.09). This data experiment Fair and accurate. As can be seen from the figure, the average values obtained by these methods are very similar. The number of transaction cycles of the adaptive aggressive value is less than that of other methods, because the value it selects is the data selected from the market, and the size of the value can be determined in the system to improve the success of trading between customers.Figure 5
Progressive value comparison.Figure6 shows the optimization decision for voltage offset in a multimicrogrid system. It can be seen from the figure that under the condition of no voltage offset constraint of multimicrogrid, after meeting the customer’s demand, the producer will put the surplus power into the storage grid to obtain greater profits. This makes the voltage excursion range of the node larger than the constraint. For the voltage offset between 0.890 pu and 1.110 pu, the voltage offset with constraints and without constraints accounts for 97.2% and 93.5%, respectively, so the voltage offset with constraints is more advantageous in multimicrogrid systems. The presence or absence of the voltage offset constraint has little effect on the electricity sold by the multimicrogrid. In these two cases, their electricity prices are basically the same; and the number of affected nodes in these two environments differs by a single digit. Nodes are negligible in the grid system. Voltage offset constraints are optional, but the voltage offset with constraints is more stable and reliable in the system.Figure 6
Voltage offset.Table1 shows the power flow distribution of each branch with dynamic constraint check without dynamic constraint check from Table 1 at 19:50 in the multimicrogrid time period. It can be seen that the none of the trends exceeded their limits.Table 1
Comparison of the flow of each branch.
Branch routeEffective nuclear current (kw)Ineffective nuclear current (kw)6–71001107–81001108–9100110


## 4.4. Smart Contract Transaction Details

Tables2 and 3 show the experimental status, transaction results and transaction information of the multimicrogrid under the blockchain during the entire transaction cycle. It can be seen from Table 2 that the lowest bid price z on the producer side is higher than the highest bid price x on the consumer side, so all customers in the multimicrogrid adjust their bids in turn according to the adaptive aggressive value. After repeated attempts, after the real quotation provided by consumer x, the z quotation of the producer side is lower than the quotation of consumer x, and the two negotiate with each other to reach a consensus. After the successful transaction and settlement of the two, the producer’s z still has excess electricity, and after the consumer c provides the real quotation, the price of x is lower than the price of c, so c matches x. However, the consumer c does not get enough electricity and the quotation reaches the quotation of the producer v, so v and c are matched, but the transaction of v and c cannot pass the dynamic constraint check, so the failure to match the two causes the transaction to fail to reach the transaction limit repeatedly. Therefore, after b on the consumer side submits the real quotation, the quotation of b is lower than that of c and higher than that of v, so v matches b, and the transaction is concluded when all conditions are met. However, at this time, v and b still have excess power, so v and b requote, and the two directly enter the next transaction until the end of the transaction. The final settlement result is that the accounts of consumers x, c and b transferred 20.00, 54.80, and 55.70 ether, respectively, and the corresponding amount of electricity was added to the accounts. Producers v and z sold 70, 110 kW·h, and they obtained the same amount of ether. The corresponding power is 55.80 and 77.10 ether.Table 2
Transaction results.
Trading clientPrice (ether/(kw.h))z-x0.66x-c0.65v-b0.71Table 3
Transaction information.
CounterpartyTransaction addressAccount before transaction (kw.h)Pre-trade balance (ether)Post-trade account (kw.h)Post-trade balance (ether)v1 × 1234…8010020150.20z1 × 1s1s…1101000175.10x1 × g3g4…01004080.50c1 × f4g6…01008544.30b1 × g4h6…01008043.60


## 4.5. Comparison of Transportation Efficiency, Results, and Solution Efficiency of Various Algorithms in Multimicrogrid

A. In this paper, the multiple constraints of multimicrogrids are considered in many aspects. In order to better reflect the impact of the dynamic beam method on the computational efficiency, we compare the transaction time with the computational complexity of participating customers. The trading time of the experiment is set in the table generated when the first microgrid user publishes the actual offer. Moreover, in order to better compare the computing efficiency of smart contracts and traditional transaction modes, the experiment simulated the highest trend of traditional centralized transaction mode and smart contract mode. All the experimental results are shown in Table4. It can be seen that the gas cost of the constrained platform is higher than that of the unconstrained platform, so that the experimental conclusions are in line with their actual calculation amount.Table 4
Running results.
Types ofTime (s)CostBinding platform6152621Unconstrained platform715232Pretraditional trading model1.100Smart contract mode0.500In terms of time comparison, the time difference between the constrained platform and the unconstrained platform is almost the same, which shows that the gas cost of the dynamic constraint method is relatively high, but its computing efficiency is guaranteed and can meet the actual situation of customers. In Matlab, the time of the smart contract mode is much lower than the time of the traditional mode. This comparison highlights that the decentralized transaction model is more excellent than the traditional method. The computing time of both platforms is greater than that of the smart contract model., which is a difference caused by their different mechanisms: it requires operating on the platform interface, although the platform takes much more time than them, but it has security and consistency that the latter two cannot compare in response to this problem. Table4 gives specific data so that we can clearly recognize its advantages; the experiment comprehensively lists four experimental objects, and the smart contract model is far superior to the other three types in terms of transaction time and cost.B. It can be seen from Table5 that the average times of IACO and ACO are lower than GA and PSO algorithms, which reflects ACO. The overall convergence ability of GA is higher than that of GA and PSO algorithms. In addition, the IIMO, IIA, and CU of IACO and ACO are better than GA and PSO algorithms, indicating that the overall convergence ability of ACO is also better than that of GA and PSO algorithms. This is a microgrid system under the ACO multiblockchain network. It is a powerful detection function and efficient solution to optimization problems, so people will choose this algorithm to manage their own blockchain in most cases, and its various experimental results show its advantages, which makes us more firmly believe it. Through the experimental data in Figure 5, the average number of times of IACO is less than that of ACO, and the IIMO, IIA, and CU of IACO are higher than those of ACO, which indicates that the evolution of volatile factor Q and control factors b and d indirectly increases the normal frequency. The overall detection ability and convergence ability of ACO improves the computing efficiency, which leads to better results. Finally, we draw the final conclusion on the overall analysis: based on the basic characteristics of the blockchain system and ACO, we have made experiments on this. Table 5 shows the general operation steps and processes of this experiment. IACO has better overall detection ability and convergence function when solving blockchain multiobjective problems, and the solving efficiency is far greater than other algorithms.Table 5
Comparison of optimization results of each algorithm.
AlgorithmAverage timesIIMO/YuanIIA/YuanCU/YuanLACO60293296.5291233.2286523.2ACO70266152.3256326.2275636.2GA90256362.2255312.1302633.2PSO95256362.1245632.2312635.2C. In addition, the follow-up experiments compared and analyzed the solution efficiency of IACO, ACO, and PSO algorithms in the blockchain for various main competition models of multimicrogrid. As can be seen from Figure7, the experiment analyzed four algorithms. The solution efficiency of them under different network nodes is made. When the number of network nodes is 10, the figure shows that IACO is slightly higher than the other three algorithms, but the difference between them is not large; however, as more and more network nodes are added later, the internal algorithm model becomes larger and larger., more and more complex, the solution efficiency of ACO has become more excellent, and the calculation time in the same scale is equal to that of GA and PSO algorithms, which proves that the decentralization ability of ACO strengthens the communication between blockchain subjects. The model can be solved more effectively. In addition, with the continuous addition of nodes, it can be seen from the figure that PSO and GA will eventually overlap, and it can also be seen that the solution efficiency of IACO is higher than that of ACO, indicating that the continuous changes to the algorithm enhance the overall detection ability and rapid convergence of ACO, ability, and then improve the efficiency of IACO solution. It can be seen from Table 5 that the average convergence times of GA are lower than that of PSO, and IIMO, IIA, and CU are all better than PSO, which proves that GA is more suitable for multimicrogrid system than PSO; Figure 7 also confirms this. It is just that with the continuous addition of nodes, their solution efficiency overlaps, which shows that the difference between them will gradually decrease with the size of the system and eventually shrink to negligible.Figure 7
Solving efficiency diagram of each algorithm.


## 5. Conclusion

The theme of this paper is the optimal decision-making of intelligent interconnected systems based on blockchain, in which the background, design concept, related characteristics, and unfavorable factors of blockchain are studied. Experiments are also designed, and the market competition of multimicrogrid systems is established by analyzing game problems, microgrid operators, large users, distributed blockchain technology-based aggregators, and other market player’s needs and thoroughly consider local multimicrogrid. A competitive game model for the grid market competitive relationships among multiple disciplines and their goals. Through a variety of diagrams and tables, the decentralization shared by the blockchain network and ACO is based on the characteristics of IACO. We propose a general method and procedure to solve the multimicrogrid market competition based on IACO. Compared with the algorithms of ACO, GA, and PSO, IACO solves multiple problems under the blockchain technology and has better overall detection and convergence capabilities. This method can comprehensively analyze the advantages and disadvantages of the algorithm in the multimicrogrid network through experiments. The experimental process is simple and fast, and the charts drawn in the later summary are clear and clear; through comparison, it is concluded that IACO solves multiobjective problems under blockchain technology. The global search ability and convergence ability are stronger, and the solution efficiency is higher.



---

*Source: 6818562-2022-07-31.xml*