# Wireless Communications and Mobile Computing Blockchain-Based Trust Management in Distributed Internet of Things

Authors: Fengyin Li; Dongfeng Wang; Yilei Wang; Xiaomei Yu; Nan Wu; Jiguo Yu; Huiyu Zhou
Journal: Wireless Communications and Mobile Computing
 (2020)

---

## Abstract

The development of Internet of Things (IoT) and Mobile Edge Computing (MEC) has led to close cooperation between electronic devices. It requires strong reliability and trustworthiness of the devices involved in the communication. However, current trust mechanisms have the following issues: (1) heavily relying on a trusted third party, which may incur severe security issues if it is corrupted, and (2) malicious evaluations on the involved devices which may bias the trustrank of the devices. By introducing the concepts of risk management and blockchain into the trust mechanism, we here propose a blockchain-based trust mechanism for distributed IoT devices in this paper. In the proposed trust mechanism, trustrank is quantified by normative trust and risk measures, and a new storage structure is designed for the domain administration manager to identify and delete the malicious evaluations of the devices. Evidence shows that the proposed trust mechanism can ensure data sharing and integrity, in addition to its resistance against malicious attacks to the IoT devices.


---

## Body

## 1. Introduction

Mobile Edge Computing is a new technology which provides an IT service environment and cloud-computing capabilities at the edge of the mobile network. In recent years, with the widespread implementation of the Internet of Things, the number of edge services running on mobile devices has exploded [1]. It is estimated that by 2025, the number of global IoT connections will reach 25.1 billion, and the market size will exceed 10 trillion Chinese yuan. Emerging technologies such as data mining [2], artificial intelligence [3], 5G technology, and natural language processing are also increasingly being extended to IoT applications [4–6]. For example, in the Internet of vehicles [7], we can build a smart city traffic system [8]. Through the use of intelligent abnormal event monitoring for electric vehicles [9] and the use of deep learning to preanalyze road conditions [10], the occurrence of traffic jams can be effectively reduced [11]. Therefore, the need for cooperation between IoT devices has been significantly increased [12]. However, the performance of IOT devices in the process of cooperation is uncertain [13]. The focus of the recent research is how to measure the availability and privacy of data [14, 15] and how to measure the performance of devices through trust data to understand the recent performance of IOT devices [16].The blockchain technology is essentially a distributed and secure ledger that records all the transactions into a hierarchically expanding chain of blocks. Edge computing brings the cloud capabilities closer to the computation tasks. The convergence of blockchain and edge computing paradigms can overcome the existing security and scalability issues [17]. An IoT device is expected to cooperate with the devices of high reliability. Before that, it is necessary to ensure the performance of the other devices and the trustworthiness of them, which is the criterion to examine the reliability of the devices before cooperation [18, 19]. However, existing trust mechanisms heavily rely on the trusted third parties or additional trust assumptions; there are hidden security risks such as malicious modifications to the trusted data [20]. Moreover, most distributed trust systems have not considered the malicious evaluation on the IoT devices [21, 22]. Wang et al. proposed a trust management method using environment awareness [23]. From nodes’ historical behaviors in different cooperation types, they obtained a comprehensive trustrank to handle any new task, but this process relies on a reliable trust management institution. By caching previous interaction summaries, Liu et al. proposed a verifiable method to solve the hierarchical trust problem of IoT systems [24], but this method needs to establish additional trusted third parties over different domains.Benkerrou et al. proposed an IoT trust evaluation method based on trust and honesty [25], but they assumed that all master nodes in the domain were completely trusted. Chi et al. proposed an algorithm SRAmplified−LSH can ensure a good balance between the accuracy and efficiency of recommendation and user privacy information [26]. Based on blockchain technologies, Ren et al. proposed a trust management method suitable for distributed Internet of Things, but they did not consider the irresponsible malicious evaluation problems between malicious devices [27].Blockchain is a new application of distributed data storage, point-to-point transmission [28], consensus mechanism [29, 30], and encryption algorithms [31, 32]. Blockchain has the characteristics of distributed trust [33], openness, and unforgeability [34], in which the intelligent contract ensures the traceability and irreversibility of transactions. The adoption of multiparty computation and measurement method can guarantee the user to derive results from multiple data sources [35, 36]. Therefore, data sharing and integrity can be guaranteed, and reliable trustworthiness can be established among parties that are blind to each other. Blockchain can realize the sharing and synchronization of trusted data in the distributed Internet of Things, so as to ensure that the data will not be forged or modified by malicious entities [37, 38].By introducing the theory of blockchain and risk into trust management, we propose a trust management method for distributed IoT. The new mechanism does not rely on any trusted third party; the process of trust establishment and management is entirely independent maintained by each IoT domain manager. The main contributions of our method are as follows:(1)
Aiming at the dependence of trusted third party, a trust mechanism of Internet of Things based on normative trust and risk trust is proposed. This trust mechanism does not rely on any trusted third party, and all trust establishment and trust management are completely managed and maintained by IOT domain administrators and IOT devices(2)
Aiming at the phenomenon of malicious evaluation of devices by existing mechanisms, a trust data storage scheme based on blockchain is proposed. In order to ensure the reliability of the trust mechanism, a storage structure and identification method are designed for domain manager to identify and filter a large number of malicious evaluations of devices


## 2. Trust Management Model in Distributed Internet of Things

### 2.1. The Structure of System

According to the characteristics of IoT, we design a decentralized distributed IoT architecture (as shown in Figure1). Each management domain consists of a domain manager and all subordinate IoT devices. The domain manager manages all IoT devices in the domain. IoT devices can communicate and cooperate with other devices in any management domain. The domain manager can collaborate with others to exchange data.Figure 1
Architecture of distributed IoT.Each cooperation between the domain manager and the device will be evaluated in both directions based on each other’s performance. The gist for evaluation includes the device’s communication success rate, data processing capability, transmission range, and network stability. The device can be evaluated based on the other party’s overall performance. The communication success rate between the devices is considered as the main indicator of the devices’ performance in this paper.In Figure1, x represents the IoT domain identifier, x1,x2,x3 represent different IoT domain identifiers, Hx represents the domain manager of IoT domain x, and Dx,yi represents different IoT devices in the domain x, which is managed by Hx, where yi∈N∗i=1,2,⋯,n.


### 2.2. Trust Model

In order to describe the trustworthiness of IoT devices, this paper uses normative trust and risk measures to quantify trustrank. Normative trust defines the ability of a specific entity to earn credit by other entities, and the risk measure defines the stability level of a specific entity’s credit performance in the past period. The concrete definition of the trust model is as follows.Definition 1.
Evaluation value.The evaluation value ofDxi,ym is denoted as δxi,ym,xj,yn,l, which refers to the evaluation of a given IoT device Dxi,ym by another IoT device Dxj,yn. It is defined as follows.
(1)δxi,ym,xj,yn,l=1,Goodperformance,0,Ordinaryperformance,−1,Poorperformance,wherel indicates the serial number of the evaluation currently received by Dxi,ym.If the device numbersym and yn are not given here, the evaluation value represents the evaluation value of Hxi, which refers to the evaluation of a domain manager Hxi by another domain manager Hxi.Definition 2.
Trust scale.When receiving thekth evaluation, the trust scale of Dxi,ym is denoted as TCxi,ym,k, and it is iterated according to the evaluated value δxi,ym,xj,yn,l given by other evaluators. It is defined as follows.
(2)TCxi,ym,k=I+∑l=1k−1δxi,ym,xj,yn,l,whereI is a trust initial value (we suppose I=50 in our experiments for simplicity) and k∈N∗ represents the maximum serial number of the current evaluation received by Dxi,ym.If the device numbersym and yn are not given here, the trust scale represents the trust scale of a domain manager Hxi, and it is iterated according to its evaluation value given by another domain manager Hxi.Definition 3.
Normative trustrank.The normative trustrank ofDxi,ym is denoted as NTxi,ym,k, which represents the standardized trustrank of device Dxi,ym. It is defined as follows.
(3)NTxi,ym,k=fTCxi,ym,k=11+e−TCxi,ym,k,wherexi,xji≠j represent different IoT domain identifiers, yi,yji≠j represent different IoT devices, and k∈N∗ represents the maximum serial number of the current evaluations received by Dxi,ym.If the device numbersym and yn are not given here, the normative trustrank represents the normative trustrank of a domain manager Hxi.Definition 4.
The mean value.The mean value of the trust ofDxi,ym is denoted as MTxi,ym,k,r, which represents the average value of the latest r normative trust of Dxi,ym. It is defined as follows.
(4)MTxi,ym,k,r=∑k′=k−r+1kNTxi,ym,k′r,wherek∈N∗ represents the maximum evaluation serial number received by Hxi and r∈N∗ represents the number of CDxi,ym,k′ included in the risk assessment.If the device numbersym and yn are not given here, this value represents the mean value of a domain manager Hxi, which represents the average value of the latest r normative trust of Hxi.Definition 5.
Risk value.The risk value ofDxi,ym is denoted as RVxi,ym,k,r, which is used to measure the risk of the credit performance of Dxi,ym in the history. Up to the maximum evaluation serial number k, the most recent r normative trustranks are taken into consideration, and the risk measure of definition Dxi,ym is as follows.
(5)RVxi,ym,k,r=∑k′=k−r+1kNTxi,ym,k′−MTxi,ym,k,r2r,wherek∈N∗ represents the maximum evaluation serial number received by Dxi,ym, and r∈N∗ represents the number of NTxi,ym,k′ included in the risk assessment.If the device numbersym and yn are not given here, this value represents the risk value of a domain manager Hxi, which is used to measure the risk of the credit performance of Hxi in the past.Definition 6.
Harmonic trustrank.The harmonic trustrank ofDxi,ym is denoted as HTxi,ym,k,r, which is used to represent the comprehensive trust evaluation of Dxi,ym. Considering the normative trustrank and risk measure of Dxi,ym, we define HTxi,ym,k,r as follows.
(6)HTxi,ym,k,r=NTxi,ym,k1+NTxi,ym,k×RVxi,ym,k,r.If the device numbersymand yn are not given here, this value represents the harmonic trustrank of a domain manager Hxi, which is used to represent the comprehensive trust evaluation of Hxi.The architecture of the trust management model is shown in Figure2.Figure 2
Trust management model.


## 2.1. The Structure of System

According to the characteristics of IoT, we design a decentralized distributed IoT architecture (as shown in Figure1). Each management domain consists of a domain manager and all subordinate IoT devices. The domain manager manages all IoT devices in the domain. IoT devices can communicate and cooperate with other devices in any management domain. The domain manager can collaborate with others to exchange data.Figure 1
Architecture of distributed IoT.Each cooperation between the domain manager and the device will be evaluated in both directions based on each other’s performance. The gist for evaluation includes the device’s communication success rate, data processing capability, transmission range, and network stability. The device can be evaluated based on the other party’s overall performance. The communication success rate between the devices is considered as the main indicator of the devices’ performance in this paper.In Figure1, x represents the IoT domain identifier, x1,x2,x3 represent different IoT domain identifiers, Hx represents the domain manager of IoT domain x, and Dx,yi represents different IoT devices in the domain x, which is managed by Hx, where yi∈N∗i=1,2,⋯,n.


## 2.2. Trust Model

In order to describe the trustworthiness of IoT devices, this paper uses normative trust and risk measures to quantify trustrank. Normative trust defines the ability of a specific entity to earn credit by other entities, and the risk measure defines the stability level of a specific entity’s credit performance in the past period. The concrete definition of the trust model is as follows.Definition 1.
Evaluation value.The evaluation value ofDxi,ym is denoted as δxi,ym,xj,yn,l, which refers to the evaluation of a given IoT device Dxi,ym by another IoT device Dxj,yn. It is defined as follows.
(1)δxi,ym,xj,yn,l=1,Goodperformance,0,Ordinaryperformance,−1,Poorperformance,wherel indicates the serial number of the evaluation currently received by Dxi,ym.If the device numbersym and yn are not given here, the evaluation value represents the evaluation value of Hxi, which refers to the evaluation of a domain manager Hxi by another domain manager Hxi.Definition 2.
Trust scale.When receiving thekth evaluation, the trust scale of Dxi,ym is denoted as TCxi,ym,k, and it is iterated according to the evaluated value δxi,ym,xj,yn,l given by other evaluators. It is defined as follows.
(2)TCxi,ym,k=I+∑l=1k−1δxi,ym,xj,yn,l,whereI is a trust initial value (we suppose I=50 in our experiments for simplicity) and k∈N∗ represents the maximum serial number of the current evaluation received by Dxi,ym.If the device numbersym and yn are not given here, the trust scale represents the trust scale of a domain manager Hxi, and it is iterated according to its evaluation value given by another domain manager Hxi.Definition 3.
Normative trustrank.The normative trustrank ofDxi,ym is denoted as NTxi,ym,k, which represents the standardized trustrank of device Dxi,ym. It is defined as follows.
(3)NTxi,ym,k=fTCxi,ym,k=11+e−TCxi,ym,k,wherexi,xji≠j represent different IoT domain identifiers, yi,yji≠j represent different IoT devices, and k∈N∗ represents the maximum serial number of the current evaluations received by Dxi,ym.If the device numbersym and yn are not given here, the normative trustrank represents the normative trustrank of a domain manager Hxi.Definition 4.
The mean value.The mean value of the trust ofDxi,ym is denoted as MTxi,ym,k,r, which represents the average value of the latest r normative trust of Dxi,ym. It is defined as follows.
(4)MTxi,ym,k,r=∑k′=k−r+1kNTxi,ym,k′r,wherek∈N∗ represents the maximum evaluation serial number received by Hxi and r∈N∗ represents the number of CDxi,ym,k′ included in the risk assessment.If the device numbersym and yn are not given here, this value represents the mean value of a domain manager Hxi, which represents the average value of the latest r normative trust of Hxi.Definition 5.
Risk value.The risk value ofDxi,ym is denoted as RVxi,ym,k,r, which is used to measure the risk of the credit performance of Dxi,ym in the history. Up to the maximum evaluation serial number k, the most recent r normative trustranks are taken into consideration, and the risk measure of definition Dxi,ym is as follows.
(5)RVxi,ym,k,r=∑k′=k−r+1kNTxi,ym,k′−MTxi,ym,k,r2r,wherek∈N∗ represents the maximum evaluation serial number received by Dxi,ym, and r∈N∗ represents the number of NTxi,ym,k′ included in the risk assessment.If the device numbersym and yn are not given here, this value represents the risk value of a domain manager Hxi, which is used to measure the risk of the credit performance of Hxi in the past.Definition 6.
Harmonic trustrank.The harmonic trustrank ofDxi,ym is denoted as HTxi,ym,k,r, which is used to represent the comprehensive trust evaluation of Dxi,ym. Considering the normative trustrank and risk measure of Dxi,ym, we define HTxi,ym,k,r as follows.
(6)HTxi,ym,k,r=NTxi,ym,k1+NTxi,ym,k×RVxi,ym,k,r.If the device numbersymand yn are not given here, this value represents the harmonic trustrank of a domain manager Hxi, which is used to represent the comprehensive trust evaluation of Hxi.The architecture of the trust management model is shown in Figure2.Figure 2
Trust management model.


## 3. Trust Management Method of Distributed Internet of Things

### 3.1. Blockchain Structure

In order to achieve trust integrity in data sharing and avoid the existence of irresponsible participants to make a large number of malicious evaluations of other collaborators, a new data structure of the blockchain is designed in this paper, adding the identity of the domain managers, evaluators, evaluatees, and the corresponding evaluation information for providing traceability of the trust evaluation information of the domain managers.A blockchain can be represented asBt∣t∈N∗. HeadBt⊆Bt represents the block head, and Bt−HeadBt=NT⋅ represents the block body. The trust data in NT⋅ is stored in the block body as a Merkle tree, and the root of the Merkle tree is stored in the block head. The block head stores the evaluation information between the domain managers of IoT and the connection information between the blocks. The block body stores the evaluation information between the IoT devices. Taking the evaluation of domain managers Hxi and Hxj as an example, we define the block structure of the trust data blockchain as follows: Bt=HashBt−1,Hxi,Hxj,TCxj,k−1,δxj,xi,k−1,k,MR,HTxj,k,r,r,NT., where σHxjTrl=SigHxjHashTrl, σHxiHash=SigHxiHashHashBt−1,Hxi,k,MR,Trl,PKxi.HashBt−1 represents the hash value of the previous block Bt−1, a block appearing before Bt on the blockchain, Hxi represents the identity of the block producer, and Hxj represents the identity of the domain manager being evaluated. δxj,xi,k−1 is the evaluation value of Hxi and Hxj, which is the k−1th evaluation value received by Hxj. k is the next evaluation’s serial number. MR is the Merkle tree root, which is the hash result of the information in the block; Trl is the transaction details of this transaction between Hxi and Hxj. σHxjTrl represents Hxj’s signature on the transaction details Trl. PKxi is the public key of Hxi. σHxiHash represents Hxi’s signature on the transaction information of this block. MTxj,k,r represents the average value of the latest r normative trust of Hxj, and RVxj,k,r represents the trust risk value of Hxj. HTxj,k,r represents the harmonious trustrank of Hxj, and r represents the number of the normative trust included in risk assessment. NT⋅ represents the collection of normative trust NTxj,yn,k of all the other IoT devices Dxj,yn that have been recently evaluated by IoT device Dxi,ym. These normative trustranks constitute different records in the IoT domains to which the devices belong, and the domain manager’s ID of each IoT domain is marked in the block header.Assume that there are four sets of device specification trustrank records in the block body, namely,NT⋅=NT1,NT2,NT3,NT4, and the structure of the block body is shown in Figure 3.Figure 3
Block structure.


### 3.2. Bookkeeping Rights Selection and Block Release

The function of bookkeeping rights selection is to determine which node is used to wrap the trust data, create a block, and then publish it to the blockchain.


#### 3.2.1. Scenario 1

It is a long time for the domain managersHxi and Hxj not to cooperate. During this time, it is impossible to share the evaluation results given by the IoT device Dxi,ymm=1,2,⋯,n in Hxi to the blockchain, and other devices cannot get the latest trust evaluation.At the moment, firstly, the domain managerHxi detects the utilization rate of the local storage pool. When the utilization rate of the local storage pool reaches a critical value, it performs screening for malicious evaluation of the devices in the IoT domain. If it is determined that there are malicious evaluations of the IoT devices in this domain, these malicious evaluations will be deleted. Then, the normative trustrank of the appraiser is determined by querying the blockchain. The domain manager iterates and updates other valid evaluations of the IoT devices in the domain based on the normative trustrank, generates new blocks, and then publishes them to the blockchain. Meanwhile, the block head uses the fixed format defined in the previous section.For this purpose, we modify the storage structure of the domain manager so thatHxi maintains two fixed-size storage spaces, which are denoted as storage pool Pool1xi and storage pool Pool2xi, respectively. Pool1xi is used to receive all the evaluation values δxj,yn,xi,ym,l presented by the subordinate equipment Dxi,ymm=1,2,⋯,n and sum the evaluation values given by each evaluation device. According to whether or not the sum of the evaluation values exceeds a critical threshold, we can decide whether or not the device has performed a malicious evaluation behavior. If it exists, all the evaluations of the malicious devices will be deleted, thereby blocking all the malicious evaluation data. The evaluation values without any malicious evaluations are assigned to Pool2xi.Hxi uses the evaluation value δxj,yn,xi,ym,l in Pool2xi to obtain the latest trust scale value TCxj,yn,k′of Hxj using Equation (2) and then uses Equation (3) to calculate the latest normative trust of Hxj, among which k′=k+1. The detailed operation is as follows.When the utilization of the storage space ofPool1xi reaches a critical value a, that is, when a≤OccupiedPool1xi/MaxPool1xi≤1 is satisfied, Hxi will sum up all the evaluation values δxj,yn,xi,ym,ln∈N∗ of device Dxi,ym in Pool1xi and the sum value is denoted as Sxi,ym.Then,Hxi will verify the validity of Sxi,ym. If −α≤Sxi,ym≤α is not satisfied, Hxi considers this evaluation as malicious and deletes all the evaluations presented by the IoT device Dxi,ym.In the above discussion,OccupiedPool1xi represents the storage capacity usage of pool Pool1xi, and MaxPool1xi represents the storage capacity of the pool. a and α are two critical value parameters which represent the storage capacity of the pool Pool1xi and the repeating evaluation times of the evaluators, respectively. Based on the results of our multiple simulations, the performance of the model is well performed while a=0.6 and α=6.Then,Hxi passes the remaining evaluations of Pool1xi to Pool2xi. Hxi queries on the blockchain Bt∣t∈N∗ to obtain the latest normative trust NTxj,yn,k of Dxj,yn. According to the deformation of Equation (3), the current trust scale value TCxj,yn,k=f−1NTxj,yn,k of Dxj,yn can be obtained. If it fails to query the latest normative trust TCxj,yn,k of Dxj,yn on blockchain Bt∣t∈N∗, Hxi will calculate the trust scale value TCxj,yn,k of Dxj,yn using Equation (2). Then, using the condition TCxj,yn,k′=TCxj,yn,k+∑l=1txiδxj,yn,xi,ym,l, Hxi can calculate the latest trust scale value TCxj,yn,k′ of Dxj,yn. Finally, Hxi calculates the latest normative trust NTxj,yn,k′ of Dxj,yn using Equation (3).In this way,Hxi calculates the normative trust NTxj,yn,k′ of all the IoT devices Dxj,yn that have been evaluated by other IoT devices in their domain and constructs the block body NT⋅. All the normative trust NTxj,yn,k′ is organized in the form of a Merkle tree where the block head of the MR is added to the new block. Hxi will form a new block with the newly generated block head and body NT⋅ and then publish it to the blockchain.Since there is no cooperation betweenHxi and Hxj and the latest evaluation value is not obtained, the domain manager related to the cooperation in the block head is set to a specific value ρ (without losing generality, ρ=0). These fields include trust scale value TCxj,k−1, evaluation value δxj,xi,k−1, serial number k, transaction details Trl, signature σHxjTrl of Hxjon transaction information, mean value of trust MTxj,k‐1,r+1, risk value RVxj,k‐1,r+1, harmonic trustrank HTxj,k−1,r+1, and r+1.At the same time, domain managerHxj of the domain of all the evaluated devices is stored in HeadBt, which is convenient for the search of the trust data, and then, the new block HeadBt,NT⋅ is released to the blockchain, so as to ensure the timely update of the trust evaluation. The evaluation process is shown in Figure 4.Figure 4
Evaluation flow between IoT devices.


#### 3.2.2. Scenario 2

When domain managersHxi and Hxj cooperate, Hxi evaluates the trust of Hxj and its subordinate devices after the cooperation. Hxi calculates the latest trust data of Hxj and each IoT device evaluation result in domain xj from domain xi, generates the block head and body of the new block, and then publishes it to the blockchain.It is assumed that the evaluation value ofHxjfrom Hxi is δxj,xi,k−1 at this time. Hxi obtains Hxj’s current trust scale value TCxj,k−2, serial number k−1, mean value of trust MTxj,k−2,r, risk value RVxj,k−2,r, harmonic trustrank HTxj,k−2,r, and the number of the included risks r by querying the blockchain. Hxi uses Equations (2) and (3) to calculate the latest trustrank TCxj,k−1 and the latest normative trust NTxj,k−1 of Hxj.Then,Hxi use Equations (4)–(6) to calculate the mean value of trust MTxj,k−1,r+1, risk value RVxj,k−1,r+1, and harmonic trustrank HTxj,k−1,r+1 of Hxj. Finally, the fields related to this process are encapsulated in the block head HeadBt to form a new block. These fields include Hxj, TCxj,k−1, δxj,xi,k−1, k, Trl, σHxjTrl, RVxj,k−1,r+1, HTxj,k−1,r+1, and r+1.At the moment, due to the frequent cooperation between domain managerHxi and the other domain managers, the time interval between the two trust data submissions is relatively short. During this period, the number of the evaluation of subordinate IoT device Dxi,ymm=1,2,⋯,n stored in storage pool Pool1xi of Hxi is relatively small, so it is impossible to judge whether or not these malicious evaluations exist.In this way,Hxi sends all the evaluations stored in Pool1xi to Pool2xi. In the subsequent work, Hxi will iteratively calculate the evaluation data in Pool2xi to obtain the trust data of the target IoT device and publish it to the blockchain. That is, Hxi queries the current normative trustrank NTxj,yn,k of Dxj,ynn∈N∗ in the blockchain and calculates the latest normative trust NTxj,yn,k′ of Dxj,yn according to Equations (2) and (3), where k′=k+1. Then, Hxi generates the block body NT⋅ from the collection of NTxj,yn,k′ and forms a new block together with the block header HeadBt formed by the domain manager’s trust data and then publish it to the blockchain.The algorithm for the evaluation between the IoT devices is as follows.Input: evaluation valueδxj,yn,xi,ym,l (n∈N∗) given by subordinate device Dxi,ym of domain manager Hxi.Output: new blockBt.
(1)
Evaluation Collection. The storage Pool1xi of the domain manager continuously collects the evaluation value δxj,yn,xi,ym,l given by the subordinate equipment and judges whether or not the storage space utilization rate satisfies the inequality a≤OccupiedPool1xi/MaxPool1xi≤1 (a=0.6). If it is satisfied, Hxi will sum up all the evaluation values δxj,yn,xi,ym,l in Pool1xi according to the evaluation equipment Dxi,ym to obtain Sxi,ym. We then judge whether or not Sxi,ym∣≤α is satisfied. If it is, Hxi passes the evaluation value in Pool1xi to Pool2xi. Otherwise, we delete the evaluation.(2)
Trust Data Query. Hxi queries on blockchain Bt∣t∈N∗ to produce the latest normative trust NTxj,yn,k of Dxj,yn.(3)
Trust Data Update. If the query is successful, the current trust scale value TCxj,yn,k=f−1NTxj,yn,k of Dxj,yn can be obtained according to the deformation of Equation (6) and then updated according to TCxj,yn,k′=TCxj,yn,k+∑l=1txiδxj,yn,xi,ym,l. If the query fails, Hxi calculates the trust scale value TCxj,yn,k of Dxj,yn according to Equation (2) and calculates NTxj,yn,k.(4)
Block Publish. The calculated NTxj,yn,k constitutes the block body NT⋅ of the new block, and NTxj,yn,k′ is organized as a Merkle tree in the block header of the new block. Hxi forms a new block together with the block body NT⋅ and publishes it to the blockchain.


## 3.1. Blockchain Structure

In order to achieve trust integrity in data sharing and avoid the existence of irresponsible participants to make a large number of malicious evaluations of other collaborators, a new data structure of the blockchain is designed in this paper, adding the identity of the domain managers, evaluators, evaluatees, and the corresponding evaluation information for providing traceability of the trust evaluation information of the domain managers.A blockchain can be represented asBt∣t∈N∗. HeadBt⊆Bt represents the block head, and Bt−HeadBt=NT⋅ represents the block body. The trust data in NT⋅ is stored in the block body as a Merkle tree, and the root of the Merkle tree is stored in the block head. The block head stores the evaluation information between the domain managers of IoT and the connection information between the blocks. The block body stores the evaluation information between the IoT devices. Taking the evaluation of domain managers Hxi and Hxj as an example, we define the block structure of the trust data blockchain as follows: Bt=HashBt−1,Hxi,Hxj,TCxj,k−1,δxj,xi,k−1,k,MR,HTxj,k,r,r,NT., where σHxjTrl=SigHxjHashTrl, σHxiHash=SigHxiHashHashBt−1,Hxi,k,MR,Trl,PKxi.HashBt−1 represents the hash value of the previous block Bt−1, a block appearing before Bt on the blockchain, Hxi represents the identity of the block producer, and Hxj represents the identity of the domain manager being evaluated. δxj,xi,k−1 is the evaluation value of Hxi and Hxj, which is the k−1th evaluation value received by Hxj. k is the next evaluation’s serial number. MR is the Merkle tree root, which is the hash result of the information in the block; Trl is the transaction details of this transaction between Hxi and Hxj. σHxjTrl represents Hxj’s signature on the transaction details Trl. PKxi is the public key of Hxi. σHxiHash represents Hxi’s signature on the transaction information of this block. MTxj,k,r represents the average value of the latest r normative trust of Hxj, and RVxj,k,r represents the trust risk value of Hxj. HTxj,k,r represents the harmonious trustrank of Hxj, and r represents the number of the normative trust included in risk assessment. NT⋅ represents the collection of normative trust NTxj,yn,k of all the other IoT devices Dxj,yn that have been recently evaluated by IoT device Dxi,ym. These normative trustranks constitute different records in the IoT domains to which the devices belong, and the domain manager’s ID of each IoT domain is marked in the block header.Assume that there are four sets of device specification trustrank records in the block body, namely,NT⋅=NT1,NT2,NT3,NT4, and the structure of the block body is shown in Figure 3.Figure 3
Block structure.


## 3.2. Bookkeeping Rights Selection and Block Release

The function of bookkeeping rights selection is to determine which node is used to wrap the trust data, create a block, and then publish it to the blockchain.


### 3.2.1. Scenario 1

It is a long time for the domain managersHxi and Hxj not to cooperate. During this time, it is impossible to share the evaluation results given by the IoT device Dxi,ymm=1,2,⋯,n in Hxi to the blockchain, and other devices cannot get the latest trust evaluation.At the moment, firstly, the domain managerHxi detects the utilization rate of the local storage pool. When the utilization rate of the local storage pool reaches a critical value, it performs screening for malicious evaluation of the devices in the IoT domain. If it is determined that there are malicious evaluations of the IoT devices in this domain, these malicious evaluations will be deleted. Then, the normative trustrank of the appraiser is determined by querying the blockchain. The domain manager iterates and updates other valid evaluations of the IoT devices in the domain based on the normative trustrank, generates new blocks, and then publishes them to the blockchain. Meanwhile, the block head uses the fixed format defined in the previous section.For this purpose, we modify the storage structure of the domain manager so thatHxi maintains two fixed-size storage spaces, which are denoted as storage pool Pool1xi and storage pool Pool2xi, respectively. Pool1xi is used to receive all the evaluation values δxj,yn,xi,ym,l presented by the subordinate equipment Dxi,ymm=1,2,⋯,n and sum the evaluation values given by each evaluation device. According to whether or not the sum of the evaluation values exceeds a critical threshold, we can decide whether or not the device has performed a malicious evaluation behavior. If it exists, all the evaluations of the malicious devices will be deleted, thereby blocking all the malicious evaluation data. The evaluation values without any malicious evaluations are assigned to Pool2xi.Hxi uses the evaluation value δxj,yn,xi,ym,l in Pool2xi to obtain the latest trust scale value TCxj,yn,k′of Hxj using Equation (2) and then uses Equation (3) to calculate the latest normative trust of Hxj, among which k′=k+1. The detailed operation is as follows.When the utilization of the storage space ofPool1xi reaches a critical value a, that is, when a≤OccupiedPool1xi/MaxPool1xi≤1 is satisfied, Hxi will sum up all the evaluation values δxj,yn,xi,ym,ln∈N∗ of device Dxi,ym in Pool1xi and the sum value is denoted as Sxi,ym.Then,Hxi will verify the validity of Sxi,ym. If −α≤Sxi,ym≤α is not satisfied, Hxi considers this evaluation as malicious and deletes all the evaluations presented by the IoT device Dxi,ym.In the above discussion,OccupiedPool1xi represents the storage capacity usage of pool Pool1xi, and MaxPool1xi represents the storage capacity of the pool. a and α are two critical value parameters which represent the storage capacity of the pool Pool1xi and the repeating evaluation times of the evaluators, respectively. Based on the results of our multiple simulations, the performance of the model is well performed while a=0.6 and α=6.Then,Hxi passes the remaining evaluations of Pool1xi to Pool2xi. Hxi queries on the blockchain Bt∣t∈N∗ to obtain the latest normative trust NTxj,yn,k of Dxj,yn. According to the deformation of Equation (3), the current trust scale value TCxj,yn,k=f−1NTxj,yn,k of Dxj,yn can be obtained. If it fails to query the latest normative trust TCxj,yn,k of Dxj,yn on blockchain Bt∣t∈N∗, Hxi will calculate the trust scale value TCxj,yn,k of Dxj,yn using Equation (2). Then, using the condition TCxj,yn,k′=TCxj,yn,k+∑l=1txiδxj,yn,xi,ym,l, Hxi can calculate the latest trust scale value TCxj,yn,k′ of Dxj,yn. Finally, Hxi calculates the latest normative trust NTxj,yn,k′ of Dxj,yn using Equation (3).In this way,Hxi calculates the normative trust NTxj,yn,k′ of all the IoT devices Dxj,yn that have been evaluated by other IoT devices in their domain and constructs the block body NT⋅. All the normative trust NTxj,yn,k′ is organized in the form of a Merkle tree where the block head of the MR is added to the new block. Hxi will form a new block with the newly generated block head and body NT⋅ and then publish it to the blockchain.Since there is no cooperation betweenHxi and Hxj and the latest evaluation value is not obtained, the domain manager related to the cooperation in the block head is set to a specific value ρ (without losing generality, ρ=0). These fields include trust scale value TCxj,k−1, evaluation value δxj,xi,k−1, serial number k, transaction details Trl, signature σHxjTrl of Hxjon transaction information, mean value of trust MTxj,k‐1,r+1, risk value RVxj,k‐1,r+1, harmonic trustrank HTxj,k−1,r+1, and r+1.At the same time, domain managerHxj of the domain of all the evaluated devices is stored in HeadBt, which is convenient for the search of the trust data, and then, the new block HeadBt,NT⋅ is released to the blockchain, so as to ensure the timely update of the trust evaluation. The evaluation process is shown in Figure 4.Figure 4
Evaluation flow between IoT devices.


### 3.2.2. Scenario 2

When domain managersHxi and Hxj cooperate, Hxi evaluates the trust of Hxj and its subordinate devices after the cooperation. Hxi calculates the latest trust data of Hxj and each IoT device evaluation result in domain xj from domain xi, generates the block head and body of the new block, and then publishes it to the blockchain.It is assumed that the evaluation value ofHxjfrom Hxi is δxj,xi,k−1 at this time. Hxi obtains Hxj’s current trust scale value TCxj,k−2, serial number k−1, mean value of trust MTxj,k−2,r, risk value RVxj,k−2,r, harmonic trustrank HTxj,k−2,r, and the number of the included risks r by querying the blockchain. Hxi uses Equations (2) and (3) to calculate the latest trustrank TCxj,k−1 and the latest normative trust NTxj,k−1 of Hxj.Then,Hxi use Equations (4)–(6) to calculate the mean value of trust MTxj,k−1,r+1, risk value RVxj,k−1,r+1, and harmonic trustrank HTxj,k−1,r+1 of Hxj. Finally, the fields related to this process are encapsulated in the block head HeadBt to form a new block. These fields include Hxj, TCxj,k−1, δxj,xi,k−1, k, Trl, σHxjTrl, RVxj,k−1,r+1, HTxj,k−1,r+1, and r+1.At the moment, due to the frequent cooperation between domain managerHxi and the other domain managers, the time interval between the two trust data submissions is relatively short. During this period, the number of the evaluation of subordinate IoT device Dxi,ymm=1,2,⋯,n stored in storage pool Pool1xi of Hxi is relatively small, so it is impossible to judge whether or not these malicious evaluations exist.In this way,Hxi sends all the evaluations stored in Pool1xi to Pool2xi. In the subsequent work, Hxi will iteratively calculate the evaluation data in Pool2xi to obtain the trust data of the target IoT device and publish it to the blockchain. That is, Hxi queries the current normative trustrank NTxj,yn,k of Dxj,ynn∈N∗ in the blockchain and calculates the latest normative trust NTxj,yn,k′ of Dxj,yn according to Equations (2) and (3), where k′=k+1. Then, Hxi generates the block body NT⋅ from the collection of NTxj,yn,k′ and forms a new block together with the block header HeadBt formed by the domain manager’s trust data and then publish it to the blockchain.The algorithm for the evaluation between the IoT devices is as follows.Input: evaluation valueδxj,yn,xi,ym,l (n∈N∗) given by subordinate device Dxi,ym of domain manager Hxi.Output: new blockBt.
(1)
Evaluation Collection. The storage Pool1xi of the domain manager continuously collects the evaluation value δxj,yn,xi,ym,l given by the subordinate equipment and judges whether or not the storage space utilization rate satisfies the inequality a≤OccupiedPool1xi/MaxPool1xi≤1 (a=0.6). If it is satisfied, Hxi will sum up all the evaluation values δxj,yn,xi,ym,l in Pool1xi according to the evaluation equipment Dxi,ym to obtain Sxi,ym. We then judge whether or not Sxi,ym∣≤α is satisfied. If it is, Hxi passes the evaluation value in Pool1xi to Pool2xi. Otherwise, we delete the evaluation.(2)
Trust Data Query. Hxi queries on blockchain Bt∣t∈N∗ to produce the latest normative trust NTxj,yn,k of Dxj,yn.(3)
Trust Data Update. If the query is successful, the current trust scale value TCxj,yn,k=f−1NTxj,yn,k of Dxj,yn can be obtained according to the deformation of Equation (6) and then updated according to TCxj,yn,k′=TCxj,yn,k+∑l=1txiδxj,yn,xi,ym,l. If the query fails, Hxi calculates the trust scale value TCxj,yn,k of Dxj,yn according to Equation (2) and calculates NTxj,yn,k.(4)
Block Publish. The calculated NTxj,yn,k constitutes the block body NT⋅ of the new block, and NTxj,yn,k′ is organized as a Merkle tree in the block header of the new block. Hxi forms a new block together with the block body NT⋅ and publishes it to the blockchain.


## 3.2.1. Scenario 1

It is a long time for the domain managersHxi and Hxj not to cooperate. During this time, it is impossible to share the evaluation results given by the IoT device Dxi,ymm=1,2,⋯,n in Hxi to the blockchain, and other devices cannot get the latest trust evaluation.At the moment, firstly, the domain managerHxi detects the utilization rate of the local storage pool. When the utilization rate of the local storage pool reaches a critical value, it performs screening for malicious evaluation of the devices in the IoT domain. If it is determined that there are malicious evaluations of the IoT devices in this domain, these malicious evaluations will be deleted. Then, the normative trustrank of the appraiser is determined by querying the blockchain. The domain manager iterates and updates other valid evaluations of the IoT devices in the domain based on the normative trustrank, generates new blocks, and then publishes them to the blockchain. Meanwhile, the block head uses the fixed format defined in the previous section.For this purpose, we modify the storage structure of the domain manager so thatHxi maintains two fixed-size storage spaces, which are denoted as storage pool Pool1xi and storage pool Pool2xi, respectively. Pool1xi is used to receive all the evaluation values δxj,yn,xi,ym,l presented by the subordinate equipment Dxi,ymm=1,2,⋯,n and sum the evaluation values given by each evaluation device. According to whether or not the sum of the evaluation values exceeds a critical threshold, we can decide whether or not the device has performed a malicious evaluation behavior. If it exists, all the evaluations of the malicious devices will be deleted, thereby blocking all the malicious evaluation data. The evaluation values without any malicious evaluations are assigned to Pool2xi.Hxi uses the evaluation value δxj,yn,xi,ym,l in Pool2xi to obtain the latest trust scale value TCxj,yn,k′of Hxj using Equation (2) and then uses Equation (3) to calculate the latest normative trust of Hxj, among which k′=k+1. The detailed operation is as follows.When the utilization of the storage space ofPool1xi reaches a critical value a, that is, when a≤OccupiedPool1xi/MaxPool1xi≤1 is satisfied, Hxi will sum up all the evaluation values δxj,yn,xi,ym,ln∈N∗ of device Dxi,ym in Pool1xi and the sum value is denoted as Sxi,ym.Then,Hxi will verify the validity of Sxi,ym. If −α≤Sxi,ym≤α is not satisfied, Hxi considers this evaluation as malicious and deletes all the evaluations presented by the IoT device Dxi,ym.In the above discussion,OccupiedPool1xi represents the storage capacity usage of pool Pool1xi, and MaxPool1xi represents the storage capacity of the pool. a and α are two critical value parameters which represent the storage capacity of the pool Pool1xi and the repeating evaluation times of the evaluators, respectively. Based on the results of our multiple simulations, the performance of the model is well performed while a=0.6 and α=6.Then,Hxi passes the remaining evaluations of Pool1xi to Pool2xi. Hxi queries on the blockchain Bt∣t∈N∗ to obtain the latest normative trust NTxj,yn,k of Dxj,yn. According to the deformation of Equation (3), the current trust scale value TCxj,yn,k=f−1NTxj,yn,k of Dxj,yn can be obtained. If it fails to query the latest normative trust TCxj,yn,k of Dxj,yn on blockchain Bt∣t∈N∗, Hxi will calculate the trust scale value TCxj,yn,k of Dxj,yn using Equation (2). Then, using the condition TCxj,yn,k′=TCxj,yn,k+∑l=1txiδxj,yn,xi,ym,l, Hxi can calculate the latest trust scale value TCxj,yn,k′ of Dxj,yn. Finally, Hxi calculates the latest normative trust NTxj,yn,k′ of Dxj,yn using Equation (3).In this way,Hxi calculates the normative trust NTxj,yn,k′ of all the IoT devices Dxj,yn that have been evaluated by other IoT devices in their domain and constructs the block body NT⋅. All the normative trust NTxj,yn,k′ is organized in the form of a Merkle tree where the block head of the MR is added to the new block. Hxi will form a new block with the newly generated block head and body NT⋅ and then publish it to the blockchain.Since there is no cooperation betweenHxi and Hxj and the latest evaluation value is not obtained, the domain manager related to the cooperation in the block head is set to a specific value ρ (without losing generality, ρ=0). These fields include trust scale value TCxj,k−1, evaluation value δxj,xi,k−1, serial number k, transaction details Trl, signature σHxjTrl of Hxjon transaction information, mean value of trust MTxj,k‐1,r+1, risk value RVxj,k‐1,r+1, harmonic trustrank HTxj,k−1,r+1, and r+1.At the same time, domain managerHxj of the domain of all the evaluated devices is stored in HeadBt, which is convenient for the search of the trust data, and then, the new block HeadBt,NT⋅ is released to the blockchain, so as to ensure the timely update of the trust evaluation. The evaluation process is shown in Figure 4.Figure 4
Evaluation flow between IoT devices.


## 3.2.2. Scenario 2

When domain managersHxi and Hxj cooperate, Hxi evaluates the trust of Hxj and its subordinate devices after the cooperation. Hxi calculates the latest trust data of Hxj and each IoT device evaluation result in domain xj from domain xi, generates the block head and body of the new block, and then publishes it to the blockchain.It is assumed that the evaluation value ofHxjfrom Hxi is δxj,xi,k−1 at this time. Hxi obtains Hxj’s current trust scale value TCxj,k−2, serial number k−1, mean value of trust MTxj,k−2,r, risk value RVxj,k−2,r, harmonic trustrank HTxj,k−2,r, and the number of the included risks r by querying the blockchain. Hxi uses Equations (2) and (3) to calculate the latest trustrank TCxj,k−1 and the latest normative trust NTxj,k−1 of Hxj.Then,Hxi use Equations (4)–(6) to calculate the mean value of trust MTxj,k−1,r+1, risk value RVxj,k−1,r+1, and harmonic trustrank HTxj,k−1,r+1 of Hxj. Finally, the fields related to this process are encapsulated in the block head HeadBt to form a new block. These fields include Hxj, TCxj,k−1, δxj,xi,k−1, k, Trl, σHxjTrl, RVxj,k−1,r+1, HTxj,k−1,r+1, and r+1.At the moment, due to the frequent cooperation between domain managerHxi and the other domain managers, the time interval between the two trust data submissions is relatively short. During this period, the number of the evaluation of subordinate IoT device Dxi,ymm=1,2,⋯,n stored in storage pool Pool1xi of Hxi is relatively small, so it is impossible to judge whether or not these malicious evaluations exist.In this way,Hxi sends all the evaluations stored in Pool1xi to Pool2xi. In the subsequent work, Hxi will iteratively calculate the evaluation data in Pool2xi to obtain the trust data of the target IoT device and publish it to the blockchain. That is, Hxi queries the current normative trustrank NTxj,yn,k of Dxj,ynn∈N∗ in the blockchain and calculates the latest normative trust NTxj,yn,k′ of Dxj,yn according to Equations (2) and (3), where k′=k+1. Then, Hxi generates the block body NT⋅ from the collection of NTxj,yn,k′ and forms a new block together with the block header HeadBt formed by the domain manager’s trust data and then publish it to the blockchain.The algorithm for the evaluation between the IoT devices is as follows.Input: evaluation valueδxj,yn,xi,ym,l (n∈N∗) given by subordinate device Dxi,ym of domain manager Hxi.Output: new blockBt.
(1)
Evaluation Collection. The storage Pool1xi of the domain manager continuously collects the evaluation value δxj,yn,xi,ym,l given by the subordinate equipment and judges whether or not the storage space utilization rate satisfies the inequality a≤OccupiedPool1xi/MaxPool1xi≤1 (a=0.6). If it is satisfied, Hxi will sum up all the evaluation values δxj,yn,xi,ym,l in Pool1xi according to the evaluation equipment Dxi,ym to obtain Sxi,ym. We then judge whether or not Sxi,ym∣≤α is satisfied. If it is, Hxi passes the evaluation value in Pool1xi to Pool2xi. Otherwise, we delete the evaluation.(2)
Trust Data Query. Hxi queries on blockchain Bt∣t∈N∗ to produce the latest normative trust NTxj,yn,k of Dxj,yn.(3)
Trust Data Update. If the query is successful, the current trust scale value TCxj,yn,k=f−1NTxj,yn,k of Dxj,yn can be obtained according to the deformation of Equation (6) and then updated according to TCxj,yn,k′=TCxj,yn,k+∑l=1txiδxj,yn,xi,ym,l. If the query fails, Hxi calculates the trust scale value TCxj,yn,k of Dxj,yn according to Equation (2) and calculates NTxj,yn,k.(4)
Block Publish. The calculated NTxj,yn,k constitutes the block body NT⋅ of the new block, and NTxj,yn,k′ is organized as a Merkle tree in the block header of the new block. Hxi forms a new block together with the block body NT⋅ and publishes it to the blockchain.


## 4. Performance Evaluation

In order to test the effectiveness of the proposed scheme, simulation experiments are carried out to analyze the update rate of trustranks, the probability of the high trustrank equipment being selected, and the success rate of the cooperation.The experiment simulates three scenarios of the IoT domains and the corresponding IoT devices. The domain manager set isH=Hx1,Hx2,Hx3, including one malicious device and two benign devices. We used MATLAB to generate evaluation data for 50 device-to-device evaluations, simulating the trend of the trust data in the IoT trust model, the probability of high-trustrank devices being selected, and the success rate of cooperation between IoT devices. All the data are obtained by averaging the results of 10 iterations. The experimental results are shown in Figures 5–7.Figure 5
Trends of the trustrank of the domain manager. (a) Trend of trustranks of our scheme and Liu’s scheme. (b) Trend of trustranks of our scheme and Chen’s scheme. (c) Trend of trustranks of our scheme and Ren’s scheme.
(a)(b)(c)Figure 6
Comparison of the probability of a high-trust device being selected.Figure 7
Comparison of cooperation success rates between devices.It can be seen from Figure5(a) that the trustrank of Liu’s scheme [6] is updated every fixed period of time, and the trustrank is not updated in a timely manner. However, the scheme proposed in this paper will immediately update the trustrank after each evaluation by the domain manager, which can reflect the trust status of the IoT devices and the domain managers in a timely manner, and provide more accurate services for the selection of the IoT devices. As can be seen from Figure 5(b), with the increase of the trustrank, in Chen’s scheme [19], the trustrank will fluctuate when it converges, and the faster the convergence, the greater the fluctuation of the trustrank, which is not conductive to providing precise services for the selection of IoT devices. However, in this scheme that we proposed, with the increase of the trustrank, when the trustrank converges, the trustrank remains stable and no fluctuation occurs, which is more conducive to providing accurate services for equipment selection. It can be seen from Figure 5(c) that the update of trust in Ren’s scheme [11] is slower than the evaluation scheme by almost two evaluation times, so the update speed of trust in this scheme is more timely.It can be seen from Figure5 and Table 1 that the selected probability of a high-trust device always remains unchanged at 0.33 in the no-trust model. With the increase of the number of the experiments (the number of the evaluations), compared with Liu’s, Chen’s, and Ren’s schemes, the probability of high-trust devices being selected is steadily increased. However, this scheme has a faster rise rate, and the probability of being selected for high-trust IoT devices is also higher, which can provide a strong guarantee for the subsequent success rate of the cooperation.Table 1
Performance comparison table.
SchemeProbability of high-trust devices being selectedCooperation success rateNo choice model0.330.67Liu’s0.500.84Chen’s0.640.92Ren’s0.680.94Our scheme0.720.97It can be seen from Figure6 and Table 1 that in the trustless model, the cooperation success rate remains unchanged at 0.67 since the IoT device is a randomly selected partner. With the increase of the number of the experiments (the number of the evaluations), the success rate of the cooperation between the devices in this scheme is steadily increasing compared with Liu’s, Chen’s, and Ren’s schemes. However, our scheme has a faster rise rate and a higher cooperation success rate. It can effectively improve the success rate and reliability of the cooperation between the IoT devices.


## 5. Prototype System

To test the validity of the trust scheme, we implement the system prototype as follows.


### 5.1. IoT Device Details

The detailed information of the IoT device mainly includes four factors: the numbers of cooperation with other devices in the last week, the cooperation stability in the last week, the current trust value, and the comprehensive performance analysis. Comprehensive consideration of risks can determine the trustworthiness of the device and the expected trust value that can be achieved in cooperation, which can help users select the most trusted devices for cooperation. The gradually changing curves of the detailed information of the IoT device are shown as in Figure8, showing the four parameters’ changing trends.Figure 8
Detailed information of devices. (a) The numbers of cooperation with other devices in the last week. (b) The current trust value. (c) The cooperation stability in the last week. (d) The comprehensive performance analysis.


### 5.2. Evaluation of IoT Devices

After the users complete the cooperation, they can evaluate the cooperation according to the performance of the other party device. By filling in the information of the evaluated device, the evaluating device, and the evaluation value, the evaluation process is completed by the evaluation submission operation. The evaluation submission model is shown in Figure9.Figure 9
Evaluation operation of IoT devices.The trust management model in the distributed Internet of Things proposed in Section2 calculates and updates the trust value of the evaluated device, completes the release of blocks by calling smart contracts, and realizes the sharing and synchronization of trust data.


### 5.3. Trust Data Block Generation

As shown in Figure10, detailed information such as the block’s hash value, block generation address, and contract address is generated. Click CONTRACT CALL to enter the transaction detail information; as shown in Figure 11, we can see the transaction data hash value.Figure 10
Block detailed information map.Figure 11
Details of the transactions in the block.


## 5.1. IoT Device Details

The detailed information of the IoT device mainly includes four factors: the numbers of cooperation with other devices in the last week, the cooperation stability in the last week, the current trust value, and the comprehensive performance analysis. Comprehensive consideration of risks can determine the trustworthiness of the device and the expected trust value that can be achieved in cooperation, which can help users select the most trusted devices for cooperation. The gradually changing curves of the detailed information of the IoT device are shown as in Figure8, showing the four parameters’ changing trends.Figure 8
Detailed information of devices. (a) The numbers of cooperation with other devices in the last week. (b) The current trust value. (c) The cooperation stability in the last week. (d) The comprehensive performance analysis.


## 5.2. Evaluation of IoT Devices

After the users complete the cooperation, they can evaluate the cooperation according to the performance of the other party device. By filling in the information of the evaluated device, the evaluating device, and the evaluation value, the evaluation process is completed by the evaluation submission operation. The evaluation submission model is shown in Figure9.Figure 9
Evaluation operation of IoT devices.The trust management model in the distributed Internet of Things proposed in Section2 calculates and updates the trust value of the evaluated device, completes the release of blocks by calling smart contracts, and realizes the sharing and synchronization of trust data.


## 5.3. Trust Data Block Generation

As shown in Figure10, detailed information such as the block’s hash value, block generation address, and contract address is generated. Click CONTRACT CALL to enter the transaction detail information; as shown in Figure 11, we can see the transaction data hash value.Figure 10
Block detailed information map.Figure 11
Details of the transactions in the block.


## 6. Conclusion

Aiming at the problem that the current trust mechanism relies on a trusted third party or additional trust assumptions, which leads to the vulnerability of trust data to malicious attacks, in this paper, we quantify trust into normative trust and risk measure, which can construct a comprehensive review of normative trust, and we propose a trust mechanism for distributed IoT, which modifies the storage structure of the domain manager and realizes the identification and shielding of malicious evaluations between IoT devices, solves the secure storage and sharing of trust data, and can select the device that performs well and stable. Then, it performs well in improving the success rate and reliability of cooperation on IoT devices. However, the mechanism in this paper also increases the storage space requirements of the domain manager, and how to work out this problem is the focus of the future work.



---

*Source: 8864533-2020-12-19.xml*