# Power IoT System Architecture Integrating Trusted Computing and Blockchain

Authors: Yong Yan; Jinqian Chen; Ying Yao; Shaoyong Guo; Ao Xiong; Wang Zhang
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

With the construction of power Internet of Things, the network scale is constantly expanding, the network structure is increasingly complex, and the number of terminals is increasing rapidly, resulting in huge pressure on network security protection, and it is urgent to build a credible operation environment to ensure that the Internet of Things runs safely and reliably. This paper proposes a power Internet of Things architecture combining trusted computing and blockchain. The architecture ensures the credibility and security of the terminal based on remote integrity verification and access control policy verification. A method for malicious node detection based on blockchain (MMNDB) is placed in acquisition layer. It is used to monitor the status of each acquisition devices in time, detect the malicious terminal in time, isolate the suspicious terminal with low credibility from the power Internet of Things, and ensure credibility of the acquisition terminal and the data collected. Under premise of ensuring the communication efficiency of the power communication network, this architecture can greatly ensure the stable working of the power Internet of Things.


---

## Body

## 1. Introduction

The definition of IoT was first proposed by Kevin Ashton [1], the founder of the Automatic Identification Center of the Massachusetts Institute of Technology. Currently, IOS/IEC defines IoTs as an infrastructure that connects people to things and information systems, on top of which are intelligent services capable of processing and responding to information. The Internet of Things is an information carrier based on the Internet, traditional telecommunications networks, etc. It enables all ordinary physical objects that can be independently addressed to form an interconnected network. At present, scholars have put forward the concept of ubiquitous power IoT. The ubiquitous Internet of Things revolves around the power system, making full use of information technologies to realize the power system’s interconnectedness of everything and everyone, forming a comprehensive state observation, efficient modern information processing, and application of intelligent services system. It is convenient and flexible [2].In trusted computing, many organizations have different understandings of trust. ISO/IEC stresses the need to be resistant to a certain degree of virus and physical attack [3]. The IEEE definition emphasizes that it must be provable [4]. The Trusted Computing Group (TCG) defines trusted willfulness as follows: An entity is trusted if it always behaves in the expected way and toward the expected goal [5]. TCG’s trusted computing technology approach is to improve the security of computer systems by introducing a trusted platform module (TPM) on the hardware platform. This technology approach has been generally recognized by the industry. At the same time, the blockchain is a technology that allows a fully decentralized ledger to be created for transactions. All nodes in the network have access to its ledger. It is being used in an increasing number of fields [6–8].Nowadays, the scale of network continues to expand, the network structure is increasingly complex, and the number of terminals has increased sharply. This has caused great pressure on network security protection. It is urgent to build a credible operating environment to ensure the network quality of the power Internet of Things and ensure the Internet of Things Safe and reliable operation of business. However, traditional trusted computing is used to solve the security problems of the architecture. It aims to establish a trust chain in computing system and extend trust relationship from the underlying hardware to the upper application to enhance the security of the computing system. The issue of trust in the data space also requires urgent attention. Decentralization is a feature of blockchain, and it can be used to solve the data space’s trust problem through a consensus method. As a result, it has become a development trend to integrate blockchain and trusted computing to build a high-credibility environment of physical networks and data logic spaces to support the construction of a trusted power Internet of Things.The main contributions of this article are as follows:(i)
This paper proposes a power Internet of Things architecture that integrates blockchain and trusted computing. This architecture enables the device to have strong identity certification by deploying trusted chips in Internet of Things devices to ensure that the power Internet of Things has high-confidence characteristics. At the same time, the architecture achieves reliable data collection, secure transmission, reliable storage, and efficient use based on blockchain technology(ii)
This paper proposes a method for detecting malicious nodes based on reputation. This method evaluates the credibility of power Internet of Things nodes from multiple dimensions and uses smart contracts to automatically execute malicious node detection algorithms, isolate malicious nodes in time, and ensure the stable and safe operation of power Internet of Things(iii)
This paper designs a network quality evaluation model based on multidimensional evaluation indicators. The model uses a combined weight optimization model based on the least squares method to obtain the optimal weight value to assign the weight of the evaluation index, thereby improving the accuracy of the evaluation result(iv)
According to the results of simulation experiments, the proposed strategy for detecting malicious nodes in this paper is more accurate, lower false alarm rate, and shorter detection time. At the same time, the power Internet of Things architecture proposed in this article can isolate malicious nodes in a timely manner after being attacked, maintain good network quality, and ensure the continuity of smart grid business


## 2. Related Work

Different international organizations have provided different IOTS reference architectures, and their development has been widely recognized and used [9]. Traditional Internet of Things architecture employs a tiered system, which divides the Internet of Things into three layers: perception, network, and application. Comprehensive perception, dependable transmission, and intelligent processing are the features of the corresponding layer. Sensors, RFIDs, QR codes, and other information-gathering objects are found at the perception layer, as are smart devices and actuators for control; the network layer takes data from the perception layer and transfers it to the application layer, receiving a response from the application layer. The information will be routed and managed at the network layer, and the instructions will be passed to the perception layer; then there is another layer: The application layer contains middleware, application infrastructure, and numerous IoT services, with the purpose of providing interfaces for Internet of Things applications [10]. However, this traditional three-layer architecture does not build a credible operating environment and cannot well meet the requirements of power Internet of Things security protection.Blockchain can be integrated with the Internet of Things to achieve decentralization and high accuracy of network resource management and access control, while ensuring data and identity privacy [11, 12], ensuring the stable operation of the Internet of Things system. The use of blockchain in the energy sector would increase energy security and efficiency by offering a distributed platform for systems, hence boosting the Internet of Things’ efficacy. People can immediately obtain energy information without the intervention of a third party, and real and high-quality data can be freely transmitted across devices. Furthermore, a blockchain-based IoT system aids the long-time running of smart grid devices [13]. There are still several issues with applying blockchain technology directly to the Internet of Things system due to a lack of sufficient computational resources and network bandwidth. At the same time, the security of blockchain nodes is also facing severe challenges.For these reasons, some researchers have proposed to improve the overall security of related application systems by integrating blockchain with trusted computing.Hybridchain is a solution presented by Wang et al. [14], which integrates blockchain with a TEE. Hybridchain can provide excellent performance while maintaining confidentiality. This technique, however, has yet to be successfully implemented in IoT applications.In view of the problems of data privacy breach and difficulty in confirming data rights in the existing data transaction solutions, Zhang et al. [15] proposed a data transaction solution that combines blockchain and trusted computing technology with business requirements to build a new data transaction system. Compared with the traditional data transaction model, this solution uses the decentralized characteristics of the blockchain to store data index information, transaction process, and data usage records, which realizes the credibility and confirmation of data and prevents data privacy. However, data transaction is too cumbersome and requires high performance on the blockchain and trusted computing platform; otherwise, it cannot meet the real-time demand for massive data transactions.Gao et al. [16] integrated trusted computing and blockchain technology to propose a secure medical IoT data analysis framework, which adds the hardware-based software protection extension technology (SGX) in trusted computing to edge computing nodes. This technology can provide an encrypted trusted execution space in the memory for processing and analyzing medical data and storing analysis results. This part of the area is invisible to edge computing nodes, thus avoiding data leakage. The blockchain network of this framework is used to store data analysis results and result access control strategies to realize the credible use of data analysis results. However, the SGX technology used in this framework is based on Intel chips, which has compatibility and performance limitations. At the same time, it has high memory performance requirements for edge computing nodes.Liu et al. [17] proposed a credible network architecture based on blockchain-B-TNC. B-TNC fully integrates the security features of blockchain decentralization, tamper-proof, and traceability and realizes a stronger network trust model. However, this method focuses on cross-domain network connection and is not suitable for interaction with IoT terminals.In summary, preliminary work has been carried out on the integration of trusted computing and blockchain to build a high-credibility cyberspace and application system [18, 19]. However, it is still necessary to integrate trusted computing and blockchain to build a highly trusted power Internet of Things.


## 3. High-Credibility Power Internet of Things Architecture Integrating Trusted Computing and Blockchain

The high-credibility power Internet of Things architecture that integrates trusted computing and blockchain mainly include three parts: a trusted protection layer, a trusted power Internet of things layer, and a trusted data management layer. To solve potential data untrustworthiness of power IoT, this architecture adds a trusted chip to the collection terminal so that each collection terminal has a strong identity certificate. The trusted power Internet of Things layer works on top of the protection layer and ensures the credibility of data transmission and business applications in the Internet of Things through trusted terminals and trusted edge servers. The trust data management layer uses the blockchain to store the trust relationship and energy data of the collection terminal and uses the traceable and immutable characteristics of the blockchain to ensure that the trusted control data in the TPCM and the energy data in the Internet of Things are not illegally tampered with. Blockchain provides credible supervision of credible energy data and improves the sharing efficiency of credible energy data (see Figure1).Figure 1
High-credibility power IoT architecture integrating trusted computing and blockchain.The credible protection layer is the basis for ensuring the credibility of the entire power communication network architecture. The collection terminals and edge servers of the traditional power Internet of Things work in an open environment, so they are susceptible to various attacks, resulting in untrustworthy or leakage of energy data. In this architecture, the trusted platform control module (TPCM) is implanted in the collection terminal, edge server, and server of the blockchain node. It can achieve the credibility of the operating environment. TPCM builds a chain of trust when the terminal is started, tracks the log information recorded in the process of trust chain construction, and encapsulates the log information into transactions and uploads it to the blockchain as trusted control data. Each verifier can quickly pass the trusted control data. The correctness of the trust data is verified, the trust information of the terminal is effectively supervised, and the data is prevented from being maliciously tampered with.The credible power Internet of Things network aims to extend the trust relationship from the collection terminal to the entire network. This architecture collects energy data through collection terminals with trusted chips, uses edge agents to filter invalid information, manages trusted energy data through the IoT management center and cloud system, and publishes energy data to the blockchain network. The trusted Internet of Things realizes the flexible recording of various trusted collection terminals and the interconnection of trusted energy data. At the same time, the data center can provide real-time data analysis and provide data sharing interfaces for other data applications, which greatly reduces the construction cost and technical complexity of the Internet of Things, and improve safety.Data credibility management is mainly completed through the blockchain, which provides the entire architecture with trusted sharing of energy data and trusts computing security management. The blockchain stores the trusted control data of the TPCM. When a terminal is abnormal, or the control data is tampered with by an illegal attack, the blockchain can quickly find out the specific data through traceability. Moreover, deal with suspicious terminals to ensure the credibility of the credible power Internet of Things working environment. The efficiency of mass data sharing of traditional power Internet of Things is extremely low, and this architecture manages the energy data collected by the terminal through the blockchain and uses the decentralized characteristics of the blockchain to prevent the problem of major failure caused by the high concurrency of massive data. The use of the traceability feature of the blockchain to monitor trusted energy data prevents the problem of illegal data tampering that may exist in the traditional energy data center. At the same time, when a user application makes a data request, the data in the blockchain can be directly accessed. The need for cumbersome iterative requests and the coordination of data sources between different departments greatly simplify the processing process and improve the efficiency of the power Internet of Things.


### 3.1. Trusted Protection Layer

TPCM is the core component to ensure the credibility of network architecture calculations. It is responsible for credibility measurement and protection of nodes. It can build a trusted system, prevent malicious access, and effectively avoid real-time attacks in the process of server running. As the root of trust of the system, TPCM supplements root of trust control function based on TPM to realize active control and measurement of the system.When the system is initialized, TPCM will actively verify the BIOS before the CPU starts. After the verification is passed, the CPU can run, ensuring active control of the entire platform. TPCM will first evaluate the integrity of the entire system before all applications run and generate integrity values. When the program starts, the integrity measurement process checks the status of each application and module and saves the resultant integrity measurement value in PCR, which cannot be tampered with. The PCR log is kept by TPCM. TPCM uploads the data fingerprint obtained by calculating the PCR log data and other related information to the blockchain. The appropriate steps are as follows (see Figure2):
(1)
Extract the data fingerprint of the previous PCR log information, and perform a hash operation together with this log information, user signature information, and user public key [3](2)
Transfer the data fingerprint of this log information obtained by the hash operation to the blockchainFigure 2
TPCM Llog Ffingerprint on Tthe bBlockchain.The system administrator can use logs to ensure the validity of the integrity authentication process.


### 3.2. Data Trust Management

This section mainly introduces the high-credibility power information communication platform that integrates blockchain and trusted computing. After the platform is installed and deployed, it provides administrator control, asset management, and security policy configuration. The unified management of the host computer facilitates the operation of the administrator. At the same time, the security log of the host in the trusted computing environment is also collected, which is convenient for the administrator to view and manage.As shown in Figure3, the data trusted management platform can implement user management, log management, node management and other functions. User management controls administrator users, controlling user login, information modification, and user permissions. We can also use security options to strengthen the system’s own security from the system administrator identity, administrator use frequency, and password security. Node management is the unified management of hosts in a trusted computing environment, including node registration approval, whitelist scanning, allocation strategies, group management, modification of risk levels and groups, resetting node strategies, and deleting nodes. The platform can also collect security logs. The management center log performs auditing and log query functions of the administrator’s system operation behavior. The content of the log includes the administrator’s login, logout and all write operations. The node cluster log supports the auditing of event types and has a built-in default risk level.Figure 3
Data trust management platform architecture.


## 3.1. Trusted Protection Layer

TPCM is the core component to ensure the credibility of network architecture calculations. It is responsible for credibility measurement and protection of nodes. It can build a trusted system, prevent malicious access, and effectively avoid real-time attacks in the process of server running. As the root of trust of the system, TPCM supplements root of trust control function based on TPM to realize active control and measurement of the system.When the system is initialized, TPCM will actively verify the BIOS before the CPU starts. After the verification is passed, the CPU can run, ensuring active control of the entire platform. TPCM will first evaluate the integrity of the entire system before all applications run and generate integrity values. When the program starts, the integrity measurement process checks the status of each application and module and saves the resultant integrity measurement value in PCR, which cannot be tampered with. The PCR log is kept by TPCM. TPCM uploads the data fingerprint obtained by calculating the PCR log data and other related information to the blockchain. The appropriate steps are as follows (see Figure2):
(1)
Extract the data fingerprint of the previous PCR log information, and perform a hash operation together with this log information, user signature information, and user public key [3](2)
Transfer the data fingerprint of this log information obtained by the hash operation to the blockchainFigure 2
TPCM Llog Ffingerprint on Tthe bBlockchain.The system administrator can use logs to ensure the validity of the integrity authentication process.


## 3.2. Data Trust Management

This section mainly introduces the high-credibility power information communication platform that integrates blockchain and trusted computing. After the platform is installed and deployed, it provides administrator control, asset management, and security policy configuration. The unified management of the host computer facilitates the operation of the administrator. At the same time, the security log of the host in the trusted computing environment is also collected, which is convenient for the administrator to view and manage.As shown in Figure3, the data trusted management platform can implement user management, log management, node management and other functions. User management controls administrator users, controlling user login, information modification, and user permissions. We can also use security options to strengthen the system’s own security from the system administrator identity, administrator use frequency, and password security. Node management is the unified management of hosts in a trusted computing environment, including node registration approval, whitelist scanning, allocation strategies, group management, modification of risk levels and groups, resetting node strategies, and deleting nodes. The platform can also collect security logs. The management center log performs auditing and log query functions of the administrator’s system operation behavior. The content of the log includes the administrator’s login, logout and all write operations. The node cluster log supports the auditing of event types and has a built-in default risk level.Figure 3
Data trust management platform architecture.


## 4. Malicious Node Detection of High-Credibility Power Internet of Things

The architecture proposed a method of malicious node detection in the power IoT based on blockchain, which is called MMNDB. First of all, we introduce the data structure of the blockchain. The smart contract of the blockchain is designed in Sec.4.2. This section presents the formal expression of the smart contract and discusses indicators of evaluating malicious nodes. Finally, the detailed process of malicious node detection is also expressed.


### 4.1. The Blockchain Data Structure for Detection of Malicious Nodes

In order to describe the blockchain for the detection of malicious nodes, this paper determines a block data structure based on blockchain for the detection of malicious nodes (Bbdmn−BDS). Bbdmn−BDS records all data of communication.Block header and block body are the two fundamental portions of a blockchain data structure, as shown in Figure4. The block body contains the primary information of the power IoT gathering equipment, such as location, HMD, ID, PLR, MDR, CDR, and HBRT (see Sec. 4.2)Figure 4
Block data structure.In a malicious node detection technology, the reputation of the collection terminal is evaluated in real-time from multiple angles. Check the terminals with low reputation value in time.Here,T1−Tn represents each piece of equipment, Hash1 denotes the hash pointer of T1 data, and Hash12 denotes the hash pointer of Hash1+Hash2, resulting in a unique Merkle-root.Bbdmn employs a “block + chain” chain data structure, and it uses a Merkle Tree formed by a hash pointer to store the information acquired by each block. Once the data of any block is adjusted, such a data structure allows the hash pointer of the block to be changed. Furthermore, the data is recorded by various types of devices utilizing this data structure. When the entire network is freed, the risk of hostile manipulation is reduced, safety and fairness are ensured, and the detection process is made easier.


### 4.2. Smart Contract for Detection of Malicious Nodes

An expression for the smart contract is as follows:(1)Bbdmn−SC=LS,ES,Sen,θ,P,σ,LOC,TIM,HCD.Among them,LS is generally trusted to deploy smart contract, ES is the server to execute contract, Sen is the collection device to be detected, θ is the assessment criteria, P is reputation points, σ is threshold of a node that is judged to be malicious, and LOC is the location of the device to be detected. TIM is timestamp of the message forwarded by the node. HCD is hash of control data of the node.As shown in Figure5, the steps are as follows:Figure 5
Steps of malicious node detection.Step 1. TheLS deploys the smart contract Bbdmn−SCStep 2. TheLS authorizes the ES to execute the Bbdmn−SCStep 3. In a trusted computing environment, (2)-(6) is used to calculate the communication information of collection equipment to obtain the correspondingPLR, MDR, CDR, and HBRT. These evaluation indicators will be stored in the blockchain periodicallyStep 4. The ES use the Judge() function of smart contract to check hash of control data (HCD), the timestamp, and location information of the terminal to be detected. If the control data is changed or the timestamp and location information is not as expected, the node can be judged to be malicious directly. Finally, theid of malicious nodes will be added to Setid of malicious nodesStep 5. TheNodeCommunicationScore uses the value of PLR, MDR, CDR, and HBRT stored in the blockchain to calculate the CS value by (6)Step 6. Compute the amount ofP using Formula (7)Step 7. TheES uses the Detect to cast the ID of malicious nodes as fellows: The system administrator sets threshold σ. When P≤σ, the collection device is recorded to be malicious device. The id of this node will be added to Setid of malicious nodes.Step 8. According to theSetid of malicious nodes, LS publishes malicious node information to the whole network by using consensus and isolates them from the credible network.It is determined preliminarily that the current network is normal and the credible score value of the current network communication is calculated. The standards are expressed as follows:PLR: Malicious devices and insecure links will increase the loss tolerance of the network, so the packet loss rate can be used as a measure of malicious nodes.(2)PLR=1−nrecvnsend,where nrecv presents number of packets successfully received. nsend is the amount of data packets sent in the time period.MDR: Bad devices may purposefully lengthen the time it takes to process data. To assure real-time data, the server calculates the message delay rate by obtaining the time to forwarding data and setting a time intervalTd:
(3)MDR=Tsensor/TdTd1Tsensor≥Td.CDR: The response time required by malicious nodes is usually longer. The server notes the total time from receiving the request to the requester receiving the response from the node to be detected within a certain time interval.(4)CDR=Thd+TtdTe,Ttd=Ms/Nb+pdts.Among them,Thd is the time to process data. Ttd is the time for message propagation, and Ms is the message size. Nb is network bandwidth. ts is the propagation speed, and Te is the predetermined time period.Historical behavior: The server calculates the proportion of malicious communication of the node to be detected in a certain time interval and uses this proportion as a reference standard for evaluating reputation:(5)HBRT=NumMB/NumNB+NumMB,where NumMB is the number of malicious network communications. NumNB represents the number of normal network communications.CS of the device under test is as follows:(6)CS=λ1∗PLR+λ2∗MDR+λ3∗CDR+λ4HBRT.Depending on the application context, each evaluation factor (λ) can be changed, and the sum of the evaluation factors needs to be 1.The entire communication reputationP of the device under test is calculated by the overall amount of malicious network communication (NMB) and the overall amount of normal communication NNB:
(7)Ρ=eNNBeNNB+eNMB+1.


## 4.1. The Blockchain Data Structure for Detection of Malicious Nodes

In order to describe the blockchain for the detection of malicious nodes, this paper determines a block data structure based on blockchain for the detection of malicious nodes (Bbdmn−BDS). Bbdmn−BDS records all data of communication.Block header and block body are the two fundamental portions of a blockchain data structure, as shown in Figure4. The block body contains the primary information of the power IoT gathering equipment, such as location, HMD, ID, PLR, MDR, CDR, and HBRT (see Sec. 4.2)Figure 4
Block data structure.In a malicious node detection technology, the reputation of the collection terminal is evaluated in real-time from multiple angles. Check the terminals with low reputation value in time.Here,T1−Tn represents each piece of equipment, Hash1 denotes the hash pointer of T1 data, and Hash12 denotes the hash pointer of Hash1+Hash2, resulting in a unique Merkle-root.Bbdmn employs a “block + chain” chain data structure, and it uses a Merkle Tree formed by a hash pointer to store the information acquired by each block. Once the data of any block is adjusted, such a data structure allows the hash pointer of the block to be changed. Furthermore, the data is recorded by various types of devices utilizing this data structure. When the entire network is freed, the risk of hostile manipulation is reduced, safety and fairness are ensured, and the detection process is made easier.


## 4.2. Smart Contract for Detection of Malicious Nodes

An expression for the smart contract is as follows:(1)Bbdmn−SC=LS,ES,Sen,θ,P,σ,LOC,TIM,HCD.Among them,LS is generally trusted to deploy smart contract, ES is the server to execute contract, Sen is the collection device to be detected, θ is the assessment criteria, P is reputation points, σ is threshold of a node that is judged to be malicious, and LOC is the location of the device to be detected. TIM is timestamp of the message forwarded by the node. HCD is hash of control data of the node.As shown in Figure5, the steps are as follows:Figure 5
Steps of malicious node detection.Step 1. TheLS deploys the smart contract Bbdmn−SCStep 2. TheLS authorizes the ES to execute the Bbdmn−SCStep 3. In a trusted computing environment, (2)-(6) is used to calculate the communication information of collection equipment to obtain the correspondingPLR, MDR, CDR, and HBRT. These evaluation indicators will be stored in the blockchain periodicallyStep 4. The ES use the Judge() function of smart contract to check hash of control data (HCD), the timestamp, and location information of the terminal to be detected. If the control data is changed or the timestamp and location information is not as expected, the node can be judged to be malicious directly. Finally, theid of malicious nodes will be added to Setid of malicious nodesStep 5. TheNodeCommunicationScore uses the value of PLR, MDR, CDR, and HBRT stored in the blockchain to calculate the CS value by (6)Step 6. Compute the amount ofP using Formula (7)Step 7. TheES uses the Detect to cast the ID of malicious nodes as fellows: The system administrator sets threshold σ. When P≤σ, the collection device is recorded to be malicious device. The id of this node will be added to Setid of malicious nodes.Step 8. According to theSetid of malicious nodes, LS publishes malicious node information to the whole network by using consensus and isolates them from the credible network.It is determined preliminarily that the current network is normal and the credible score value of the current network communication is calculated. The standards are expressed as follows:PLR: Malicious devices and insecure links will increase the loss tolerance of the network, so the packet loss rate can be used as a measure of malicious nodes.(2)PLR=1−nrecvnsend,where nrecv presents number of packets successfully received. nsend is the amount of data packets sent in the time period.MDR: Bad devices may purposefully lengthen the time it takes to process data. To assure real-time data, the server calculates the message delay rate by obtaining the time to forwarding data and setting a time intervalTd:
(3)MDR=Tsensor/TdTd1Tsensor≥Td.CDR: The response time required by malicious nodes is usually longer. The server notes the total time from receiving the request to the requester receiving the response from the node to be detected within a certain time interval.(4)CDR=Thd+TtdTe,Ttd=Ms/Nb+pdts.Among them,Thd is the time to process data. Ttd is the time for message propagation, and Ms is the message size. Nb is network bandwidth. ts is the propagation speed, and Te is the predetermined time period.Historical behavior: The server calculates the proportion of malicious communication of the node to be detected in a certain time interval and uses this proportion as a reference standard for evaluating reputation:(5)HBRT=NumMB/NumNB+NumMB,where NumMB is the number of malicious network communications. NumNB represents the number of normal network communications.CS of the device under test is as follows:(6)CS=λ1∗PLR+λ2∗MDR+λ3∗CDR+λ4HBRT.Depending on the application context, each evaluation factor (λ) can be changed, and the sum of the evaluation factors needs to be 1.The entire communication reputationP of the device under test is calculated by the overall amount of malicious network communication (NMB) and the overall amount of normal communication NNB:
(7)Ρ=eNNBeNNB+eNMB+1.


## 5. Simulation

To assess the method’s effectiveness of malicious node detection and the network architecture, the corresponding experiments are designed based on NS2. This paper used Ethereum to buildBbdmn. The experiment evaluated the method’s effectiveness from several aspects, as shown in Table 1.Table 1
Simulation parameter.
ParameterValueSimulation area1000m∗1000mMAC protocol802.11DCFInitial battery power10 JTransfer protocolUDPPacket size1040byte


### 5.1. Detection Rate

When the number of total nodes is 80, the influence of the different numbers of malicious nodes on the detection rate is tested. There are 10 rounds of testing:(8)detectionrate=∑Ntmnd/Ntmn∗R.Ntmnd is the number of times that maliscious nodes are detected in each round. Ntmn presents the number of total malicious nodes. R is the number of rounds.In terms of the detection rate of malicious nodes, MMNDB and the approach proposed in [17] are compared in Figure 6. In the initial stage, the detection rates of the two scenarios are nearly identical, as seen below. As the simulation progressed, the number of malicious nodes in the network grew, and the figure shows that MMNDB has a greater detection rate than the technique in [17]. This is because the strategy described in this research uses more trustworthy data to detect malicious nodes. Furthermore, this article uses a combination of attributes to determine whether or not a node is malevolent. When it comes to detecting malicious nodes, MMNDB has a higher sensitivity.Figure 6
The detection rate of malicious nodes.


### 5.2. False-Positive Rate

When the number of malicious nodes is 20, the influence of the different number of total nodes on the false-positive rate is tested. The false-positive rate of the two methods is compared in Figure7. There are ten rounds of testing:
(9)falsepositiverate=∑Nfp/Ntmnd∗R.Figure 7
False-positive rate.Nfp is the number of false positives. Ntmnd is the number of times malicious nodes are detected in each round. R is the number of rounds.The chart demonstrates that at the initial simulation stage, the false-positive rate is about the same. When the total number of nodes reaches 60, the false-positive rate of this technique is much lower than the algorithm in [17]. The false-positive rate of the algorithm in [17] increases dramatically as the number of total nodes grows. Because the more nodes there are in the network, the more difficult it is for the management system to monitor the behavior of nodes. Then, the attacker can tamper with communication data or detection algorithms easily. The normal nodes can be defiled as malicious nodes by the attacker to destabilize the network. However, MMNDB can ensure integrity of communication evaluation data and credibility of detection process based on blockchain. Therefore, this approach has a lower false-positive rate than the comparison algorithm. Moreover, it can ensure that the security and stability of the network operation are better.


### 5.3. Detection Time

When the number of malicious nodes is 20, the number of total nodes is 80. The detection time of the two methods is compared in Figure8. As shown in the figure, the number of malicious nodes in the power Internet of Things decreases gradually with the increase of detection time. However, the proposed method can detect more malicious nodes simultaneously than [17]. Because the scheme determines the node reputation from more dimensions, the scheme has a higher detection accuracy. At the same time, the scheme uses the smart contract method to automatically execute the malicious node detection algorithm, which has a higher execution speed and can detect and isolate the malicious node in time.Figure 8
Detection time.


### 5.4. Mean Throughput Speed

Throughput can be defined as the data successfully transmitted over some time. By testing the throughput of the normal network (NN) and the network with malicious nodes (NWMN), the network uses MMNDB to detect malicious nodes, and the effectiveness of the method proposed by this paper can be proved:(10)MeanThroughputspeed=∑PRtsp−tst.where ∑PR= size of the total receiving packet, tst= the start time, and tsp= end time.The throughput of different types of networks was tested under the condition that malicious nodes were randomly distributed with a probability of 30%, as shown in Figure9. As the number of nodes increases, the throughput increases. However, the throughput of a network with malicious nodes is the lowest. The throughput of network uses MMNDB that is affected by malicious nodes barely. Therefore, it can resist the attacks of malicious nodes on the network and ensure the efficient circulation of the network effectively.Figure 9
Throughput.


### 5.5. End-to-End Latency

The overall time it takes for data to travel from the source to the destination is referred to as end-to-end latency, and it encompasses all of the numerous latencies experienced by the package from the sender to the receiver.The average end-to-end latency (AEL) is as follows:
(11)AEL=∑Tpr−TpsNprwhere Tpr= time of receiving the package, Tps= time of sending the package, and Npr= number of received packages.The end-to-end latency of different types of networks was tested under the condition that malicious nodes were randomly distributed with a probability of 30%, as shown in Figure10. As the number of nodes increases, the latency of networks with malicious nodes increases sharply. However, the latency of the network uses MMNDB that is influenced by malicious nodes slightly. Therefore, it can reduce the negative effect of malicious nodes on the whole network effectively.Figure 10
End-to-end latency.


### 5.6. Package Delivery Rate

The package delivery rate (PDR) represents the success rate of packet transmission within a given time interval. It is as follows:
(12)PDR=∑Nr∑Ng∗100,where Nr= number of package received and Ng= number of package generated.The package delivery rate of different types of networks was tested under the condition that malicious nodes were randomly distributed with a probability of 30%, as shown in Figure11. As the number of nodes increases, the package delivery rate decreases. However, the PDR of networks with malicious nodes goes down dramatically. Meanwhile, the network uses MMNDB to accurately isolate the malicious nodes to ensure that the packet loss rate is reduced efficiently.Figure 11
Package delivery rate.


### 5.7. Network Quality Evaluation

The evaluation index is the state parameter that reflects the quality of network service. Establishing evaluation indexes and building a network quality evaluation model can quantify the evaluation process, and the objective evaluation of network service quality can be achieved. In order to make the network service quality reference, this paper chooses the following evaluation indicators for research:(1)
Stability refers to the degree to which the measured values of various indicators in the network deviate from the normal values after being disturbed and affected. In this experiment, the stability of each service throughput needs to be calculated. The less the deviation, the better the stability of the network; otherwise, the worse the stability of the network. The specific calculation formula is as follows:(13)S=Xi−X¯.S denotes the system’s stability, Xi is the measured value of each indicator, and X¯ is the average measurement value of each indicator.(2)
Response time represents the time from the start of the request message from the IoT terminal to the end of service execution. It includes data transmission time, requests queuing time, system processing time, data read, and write time. Response time is the indicator of the timeliness of the system to provide services. The shorter the response time, the better the system performance and the higher the service quality(3)
Utilization refers to the hardware resource overhead of an IoT system when executing a process. This paper uses server CPU utilization and link utilization as evaluation indicators. Excessive utilization may lead to equipment consumption. If the utilization rate is too low, it is not easy to utilize resources fully. Therefore, for the whole Internet of Things system, the average utilization rate is taken to reflect the overall situation of the system. Figure12 shows the evaluation index of this experimentFigure 12
Network quality evaluation index.According to the above indexes, the original evaluation index matrixV in the network quality evaluation problem is established as
(14)V=v11v12⋯v1nv21v22⋯v2n⋯⋯⋯⋯vm1vm2⋯vmn.As the value range of each attribute value in the original evaluation index matrix is not uniform, data preprocessing of matrixV is required. In this paper, the range method is used to get the standard evaluation matrix Z. In the evaluation process, it is necessary to assign weights to relevant evaluation indicators. At the moment, there are two types of weighting methods: subjective weighting and objective weighting. Subjective weighting reflects the preference of decision-makers, but subjective factors influence the results. Objective weighting is based on mathematical theory, but it ignores the preference of decision-makers. In order to effectively avoid the limitation of single weight, this paper adopts the combined weight optimization model based on the least square method to obtain the optimal weight value. We define grouping weights as ω=ω1,ω2,⋯,ωn. The specific operations are as follows:
(1)
Subjective weightU=u1,u2,⋯,un can be determined by modified step analysis(2)
Objective weightV=v1,v2,⋯,vncan be determined using the improved G1 method(3)
Lagrangian functions are constructed using least squares models:(15)Lω,λ=gω+λ∑j=1mωj−1=∑i=1m∑j=1nuj−ωjzij2+vj−ωjzij2+4λ∑j=1mωj−1.(4)
The optimal comprehensive weight was obtained by Lagrange function:(16)ω=A−1B+1−ETA−1BETA−1EE.Among them:(17)A=diag∑i=1mzi12,∑i=1mzi22,⋯,∑i=1mzin2E=1,1,⋯,1TB=∑i=1mu1+v1zi122,⋯,∑i=1mun+vnzin22Tω=ω1,ω2,⋯,ωn.The weighted standardized evaluation matrix is obtained by multiplying the optimal comprehensive weight and standardized evaluation index matrix:(18)Y=ω1z11ω2z12⋯ωnz1nω1z21ω2z22⋯ωnz2n⋯⋯⋯⋯ω1zm1ω2zm2⋯ωnzmn.Based on the weighted normalization matrix, this paper establishes a multi-attribute network quality evaluation model. The combined weight was calculated by MATlab software. The combined weights are shown in Table2.Table 2
Combined weights.
WeightValueLink utilization0.0982CPU utilization0.0815Response time of database0.1054Response time of FTP0.0316Response time of HTTP0.0316Response time of MQTT0.0376Response time of CoAP0.0883Stability of database throughput0.2431Stability of database throughput0.2826The experimental process of network quality assessment is as follows:(1)
In the initial stage of the experiment, NS2 software was used to build the simulation network. The total number of IoT nodes in the IoT system was 100, including 30 malicious nodes and two servers. MQTT/CoAP protocol was used for communication between IoT nodes and servers. The FTP/HTTP protocol is used to transfer data between the Internet of Things client and server(2)
In the experimental stage, two malicious nodes were added to the Internet of Things system every 5 minutes, and data was collected according to the evaluation indicators given in Figure12. The network quality assessment model designed in this paper is used to evaluate the network quality between the network architecture that integrates blockchain and trusted computing technology and the traditional IoT architecture every 2 minutes. The results are shown in Figure 13Figure 13
Network quality evaluation experiment.As shown in Figure13, with the increase of experiment time, the network quality of the two architectures increases gradually and eventually tends to be stable, but the network architecture proposed in this paper has better network quality.


### 5.8. Result Analysis

Based on the above simulation analysis results, under the same conditions, this paper proposed a malicious node detection method with higher accuracy compared with the literature [17], which can effectively guarantee the normal communication of the power Internet of Things. Meanwhile, this method has a lower false-positive rate and detection time. According to a network quality evaluation model, the quality of the proposed network architecture is tested. The test results show that the proposed network architecture can identify malicious nodes quickly and accurately, ensuring the stable operation of the power Internet of Things. The method proposed in this paper uses blockchain technology to store data of communication quality. The corresponding data must be obtained from the blockchain system during detection, so there are certain defects in detection efficiency. However, the method uses the trusted computing technology, which is complicated in function implementation and has disadvantages of poor compatibility.


## 5.1. Detection Rate

When the number of total nodes is 80, the influence of the different numbers of malicious nodes on the detection rate is tested. There are 10 rounds of testing:(8)detectionrate=∑Ntmnd/Ntmn∗R.Ntmnd is the number of times that maliscious nodes are detected in each round. Ntmn presents the number of total malicious nodes. R is the number of rounds.In terms of the detection rate of malicious nodes, MMNDB and the approach proposed in [17] are compared in Figure 6. In the initial stage, the detection rates of the two scenarios are nearly identical, as seen below. As the simulation progressed, the number of malicious nodes in the network grew, and the figure shows that MMNDB has a greater detection rate than the technique in [17]. This is because the strategy described in this research uses more trustworthy data to detect malicious nodes. Furthermore, this article uses a combination of attributes to determine whether or not a node is malevolent. When it comes to detecting malicious nodes, MMNDB has a higher sensitivity.Figure 6
The detection rate of malicious nodes.


## 5.2. False-Positive Rate

When the number of malicious nodes is 20, the influence of the different number of total nodes on the false-positive rate is tested. The false-positive rate of the two methods is compared in Figure7. There are ten rounds of testing:
(9)falsepositiverate=∑Nfp/Ntmnd∗R.Figure 7
False-positive rate.Nfp is the number of false positives. Ntmnd is the number of times malicious nodes are detected in each round. R is the number of rounds.The chart demonstrates that at the initial simulation stage, the false-positive rate is about the same. When the total number of nodes reaches 60, the false-positive rate of this technique is much lower than the algorithm in [17]. The false-positive rate of the algorithm in [17] increases dramatically as the number of total nodes grows. Because the more nodes there are in the network, the more difficult it is for the management system to monitor the behavior of nodes. Then, the attacker can tamper with communication data or detection algorithms easily. The normal nodes can be defiled as malicious nodes by the attacker to destabilize the network. However, MMNDB can ensure integrity of communication evaluation data and credibility of detection process based on blockchain. Therefore, this approach has a lower false-positive rate than the comparison algorithm. Moreover, it can ensure that the security and stability of the network operation are better.


## 5.3. Detection Time

When the number of malicious nodes is 20, the number of total nodes is 80. The detection time of the two methods is compared in Figure8. As shown in the figure, the number of malicious nodes in the power Internet of Things decreases gradually with the increase of detection time. However, the proposed method can detect more malicious nodes simultaneously than [17]. Because the scheme determines the node reputation from more dimensions, the scheme has a higher detection accuracy. At the same time, the scheme uses the smart contract method to automatically execute the malicious node detection algorithm, which has a higher execution speed and can detect and isolate the malicious node in time.Figure 8
Detection time.


## 5.4. Mean Throughput Speed

Throughput can be defined as the data successfully transmitted over some time. By testing the throughput of the normal network (NN) and the network with malicious nodes (NWMN), the network uses MMNDB to detect malicious nodes, and the effectiveness of the method proposed by this paper can be proved:(10)MeanThroughputspeed=∑PRtsp−tst.where ∑PR= size of the total receiving packet, tst= the start time, and tsp= end time.The throughput of different types of networks was tested under the condition that malicious nodes were randomly distributed with a probability of 30%, as shown in Figure9. As the number of nodes increases, the throughput increases. However, the throughput of a network with malicious nodes is the lowest. The throughput of network uses MMNDB that is affected by malicious nodes barely. Therefore, it can resist the attacks of malicious nodes on the network and ensure the efficient circulation of the network effectively.Figure 9
Throughput.


## 5.5. End-to-End Latency

The overall time it takes for data to travel from the source to the destination is referred to as end-to-end latency, and it encompasses all of the numerous latencies experienced by the package from the sender to the receiver.The average end-to-end latency (AEL) is as follows:
(11)AEL=∑Tpr−TpsNprwhere Tpr= time of receiving the package, Tps= time of sending the package, and Npr= number of received packages.The end-to-end latency of different types of networks was tested under the condition that malicious nodes were randomly distributed with a probability of 30%, as shown in Figure10. As the number of nodes increases, the latency of networks with malicious nodes increases sharply. However, the latency of the network uses MMNDB that is influenced by malicious nodes slightly. Therefore, it can reduce the negative effect of malicious nodes on the whole network effectively.Figure 10
End-to-end latency.


## 5.6. Package Delivery Rate

The package delivery rate (PDR) represents the success rate of packet transmission within a given time interval. It is as follows:
(12)PDR=∑Nr∑Ng∗100,where Nr= number of package received and Ng= number of package generated.The package delivery rate of different types of networks was tested under the condition that malicious nodes were randomly distributed with a probability of 30%, as shown in Figure11. As the number of nodes increases, the package delivery rate decreases. However, the PDR of networks with malicious nodes goes down dramatically. Meanwhile, the network uses MMNDB to accurately isolate the malicious nodes to ensure that the packet loss rate is reduced efficiently.Figure 11
Package delivery rate.


## 5.7. Network Quality Evaluation

The evaluation index is the state parameter that reflects the quality of network service. Establishing evaluation indexes and building a network quality evaluation model can quantify the evaluation process, and the objective evaluation of network service quality can be achieved. In order to make the network service quality reference, this paper chooses the following evaluation indicators for research:(1)
Stability refers to the degree to which the measured values of various indicators in the network deviate from the normal values after being disturbed and affected. In this experiment, the stability of each service throughput needs to be calculated. The less the deviation, the better the stability of the network; otherwise, the worse the stability of the network. The specific calculation formula is as follows:(13)S=Xi−X¯.S denotes the system’s stability, Xi is the measured value of each indicator, and X¯ is the average measurement value of each indicator.(2)
Response time represents the time from the start of the request message from the IoT terminal to the end of service execution. It includes data transmission time, requests queuing time, system processing time, data read, and write time. Response time is the indicator of the timeliness of the system to provide services. The shorter the response time, the better the system performance and the higher the service quality(3)
Utilization refers to the hardware resource overhead of an IoT system when executing a process. This paper uses server CPU utilization and link utilization as evaluation indicators. Excessive utilization may lead to equipment consumption. If the utilization rate is too low, it is not easy to utilize resources fully. Therefore, for the whole Internet of Things system, the average utilization rate is taken to reflect the overall situation of the system. Figure12 shows the evaluation index of this experimentFigure 12
Network quality evaluation index.According to the above indexes, the original evaluation index matrixV in the network quality evaluation problem is established as
(14)V=v11v12⋯v1nv21v22⋯v2n⋯⋯⋯⋯vm1vm2⋯vmn.As the value range of each attribute value in the original evaluation index matrix is not uniform, data preprocessing of matrixV is required. In this paper, the range method is used to get the standard evaluation matrix Z. In the evaluation process, it is necessary to assign weights to relevant evaluation indicators. At the moment, there are two types of weighting methods: subjective weighting and objective weighting. Subjective weighting reflects the preference of decision-makers, but subjective factors influence the results. Objective weighting is based on mathematical theory, but it ignores the preference of decision-makers. In order to effectively avoid the limitation of single weight, this paper adopts the combined weight optimization model based on the least square method to obtain the optimal weight value. We define grouping weights as ω=ω1,ω2,⋯,ωn. The specific operations are as follows:
(1)
Subjective weightU=u1,u2,⋯,un can be determined by modified step analysis(2)
Objective weightV=v1,v2,⋯,vncan be determined using the improved G1 method(3)
Lagrangian functions are constructed using least squares models:(15)Lω,λ=gω+λ∑j=1mωj−1=∑i=1m∑j=1nuj−ωjzij2+vj−ωjzij2+4λ∑j=1mωj−1.(4)
The optimal comprehensive weight was obtained by Lagrange function:(16)ω=A−1B+1−ETA−1BETA−1EE.Among them:(17)A=diag∑i=1mzi12,∑i=1mzi22,⋯,∑i=1mzin2E=1,1,⋯,1TB=∑i=1mu1+v1zi122,⋯,∑i=1mun+vnzin22Tω=ω1,ω2,⋯,ωn.The weighted standardized evaluation matrix is obtained by multiplying the optimal comprehensive weight and standardized evaluation index matrix:(18)Y=ω1z11ω2z12⋯ωnz1nω1z21ω2z22⋯ωnz2n⋯⋯⋯⋯ω1zm1ω2zm2⋯ωnzmn.Based on the weighted normalization matrix, this paper establishes a multi-attribute network quality evaluation model. The combined weight was calculated by MATlab software. The combined weights are shown in Table2.Table 2
Combined weights.
WeightValueLink utilization0.0982CPU utilization0.0815Response time of database0.1054Response time of FTP0.0316Response time of HTTP0.0316Response time of MQTT0.0376Response time of CoAP0.0883Stability of database throughput0.2431Stability of database throughput0.2826The experimental process of network quality assessment is as follows:(1)
In the initial stage of the experiment, NS2 software was used to build the simulation network. The total number of IoT nodes in the IoT system was 100, including 30 malicious nodes and two servers. MQTT/CoAP protocol was used for communication between IoT nodes and servers. The FTP/HTTP protocol is used to transfer data between the Internet of Things client and server(2)
In the experimental stage, two malicious nodes were added to the Internet of Things system every 5 minutes, and data was collected according to the evaluation indicators given in Figure12. The network quality assessment model designed in this paper is used to evaluate the network quality between the network architecture that integrates blockchain and trusted computing technology and the traditional IoT architecture every 2 minutes. The results are shown in Figure 13Figure 13
Network quality evaluation experiment.As shown in Figure13, with the increase of experiment time, the network quality of the two architectures increases gradually and eventually tends to be stable, but the network architecture proposed in this paper has better network quality.


## 5.8. Result Analysis

Based on the above simulation analysis results, under the same conditions, this paper proposed a malicious node detection method with higher accuracy compared with the literature [17], which can effectively guarantee the normal communication of the power Internet of Things. Meanwhile, this method has a lower false-positive rate and detection time. According to a network quality evaluation model, the quality of the proposed network architecture is tested. The test results show that the proposed network architecture can identify malicious nodes quickly and accurately, ensuring the stable operation of the power Internet of Things. The method proposed in this paper uses blockchain technology to store data of communication quality. The corresponding data must be obtained from the blockchain system during detection, so there are certain defects in detection efficiency. However, the method uses the trusted computing technology, which is complicated in function implementation and has disadvantages of poor compatibility.


## 6. Conclusion

The combination of trusted computing and blockchain technology can achieve trust transfer in trusted computing. However, the current blockchain has the disadvantages of low performance and high hardware requirements. Trusted computing also has the disadvantages of poor compatibility and slower computing speed. Therefore, no one has combined the applicable blockchain technology and trusted computing technology in the power Internet of Things. The high-credibility power Internet of Things architecture that integrates trusted computing and blockchain combines the benefits of trusted computing with the benefits of blockchain. It solves the problem of the centralization of former power IoTs and ensures the safety of every node based on trusted computing. The architecture is based on access control policy verification to ensure the security of terminal access. The existing malicious node detection methods [20–22] are mainly to realize the judgment by analyzing the node’s log, behavior, configuration, and other data. However, these data can easily be tampered with by attackers to conceal malicious behavior. As a result, the current method has the disadvantages of low detection rate, high false alarm rate, and long detection time. As a result, at the collection layer, a malicious node detection technique based on blockchain and reputation is designed. The low suspicious terminal is isolated from the high-credibility power information communication network, ensuring the credibility of the collection terminal. In conclusion, the high-credibility power Internet of Things architecture, which combines trusted computing and blockchain, dramatically improves system security while also maintaining the efficiency of power Internet of Things communication.Although the system architecture proposed in this paper has many advantages above, it still has some defects. Considering the application scenarios comprehensively, the production of trusted computing chips usually needs to be adapted according to the different power equipment, which has poor compatibility and is difficult to be modified according to the application scenarios. At the same time, this architecture uses blockchain to store relevant data, which is insufficient in writing and reading. Therefore, in future work, the focus will be on improving the compatibility of the trusted computing platform and the efficiency of blockchain access.



---

*Source: 2891917-2022-05-09.xml*