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.

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 [46]. 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 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 Figure 1). 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.

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 Figure 1, represents the IoT domain identifier, represent different IoT domain identifiers, represents the domain manager of IoT domain , and represents different IoT devices in the domain , which is managed by , where .

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 of is denoted as , which refers to the evaluation of a given IoT device by another IoT device . It is defined as follows.

where indicates the serial number of the evaluation currently received by .

If the device numbers and are not given here, the evaluation value represents the evaluation value of , which refers to the evaluation of a domain manager by another domain manager .

Definition 2. Trust scale.

When receiving the th evaluation, the trust scale of is denoted as , and it is iterated according to the evaluated value given by other evaluators. It is defined as follows.

where is a trust initial value (we suppose in our experiments for simplicity) and represents the maximum serial number of the current evaluation received by .

If the device numbers and are not given here, the trust scale represents the trust scale of a domain manager , and it is iterated according to its evaluation value given by another domain manager .

Definition 3. Normative trustrank.

The normative trustrank of is denoted as , which represents the standardized trustrank of device . It is defined as follows.

where represent different IoT domain identifiers, represent different IoT devices, and represents the maximum serial number of the current evaluations received by .

If the device numbers and are not given here, the normative trustrank represents the normative trustrank of a domain manager .

Definition 4. The mean value.

The mean value of the trust of is denoted as , which represents the average value of the latest normative trust of . It is defined as follows.

where represents the maximum evaluation serial number received by and represents the number of included in the risk assessment.

If the device numbers and are not given here, this value represents the mean value of a domain manager , which represents the average value of the latest normative trust of .

Definition 5. Risk value.

The risk value of is denoted as , which is used to measure the risk of the credit performance of in the history. Up to the maximum evaluation serial number , the most recent normative trustranks are taken into consideration, and the risk measure of definition is as follows.

where represents the maximum evaluation serial number received by , and represents the number of included in the risk assessment.

If the device numbers and are not given here, this value represents the risk value of a domain manager , which is used to measure the risk of the credit performance of in the past.

Definition 6. Harmonic trustrank.

The harmonic trustrank of is denoted as , which is used to represent the comprehensive trust evaluation of . Considering the normative trustrank and risk measure of , we define as follows.

If the device numbers and are not given here, this value represents the harmonic trustrank of a domain manager , which is used to represent the comprehensive trust evaluation of .

The architecture of the trust management model is shown in Figure 2.

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 as . represents the block head, and represents the block body. The trust data in 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 and as an example, we define the block structure of the trust data blockchain as follows: , where , .

represents the hash value of the previous block , a block appearing before on the blockchain, represents the identity of the block producer, and represents the identity of the domain manager being evaluated. is the evaluation value of and , which is the evaluation value received by . is the next evaluation’s serial number. is the Merkle tree root, which is the hash result of the information in the block; is the transaction details of this transaction between and . represents ’s signature on the transaction details . is the public key of . represents ’s signature on the transaction information of this block. represents the average value of the latest normative trust of , and represents the trust risk value of . represents the harmonious trustrank of , and represents the number of the normative trust included in risk assessment. represents the collection of normative trust of all the other IoT devices that have been recently evaluated by IoT device . 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, , and the structure of the block body is shown in Figure 3.

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 managers and not to cooperate. During this time, it is impossible to share the evaluation results given by the IoT device in to the blockchain, and other devices cannot get the latest trust evaluation.

At the moment, firstly, the domain manager 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 that maintains two fixed-size storage spaces, which are denoted as storage pool and storage pool , respectively. is used to receive all the evaluation values presented by the subordinate equipment 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 . uses the evaluation value in to obtain the latest trust scale value of using Equation (2) and then uses Equation (3) to calculate the latest normative trust of , among which . The detailed operation is as follows.

When the utilization of the storage space of reaches a critical value , that is, when is satisfied, will sum up all the evaluation values of device in and the sum value is denoted as .

Then, will verify the validity of . If is not satisfied, considers this evaluation as malicious and deletes all the evaluations presented by the IoT device .

In the above discussion, represents the storage capacity usage of pool , and represents the storage capacity of the pool. and are two critical value parameters which represent the storage capacity of the pool 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 and .

Then, passes the remaining evaluations of to . queries on the blockchain to obtain the latest normative trust of . According to the deformation of Equation (3), the current trust scale value of can be obtained. If it fails to query the latest normative trust of on blockchain , will calculate the trust scale value of using Equation (2). Then, using the condition , can calculate the latest trust scale value of . Finally, calculates the latest normative trust of using Equation (3).

In this way, calculates the normative trust of all the IoT devices that have been evaluated by other IoT devices in their domain and constructs the block body . All the normative trust is organized in the form of a Merkle tree where the block head of the MR is added to the new block. will form a new block with the newly generated block head and body and then publish it to the blockchain.

Since there is no cooperation between and 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, ). These fields include trust scale value , evaluation value , serial number , transaction details , signature of on transaction information, mean value of trust , risk value , harmonic trustrank , and .

At the same time, domain manager of the domain of all the evaluated devices is stored in , which is convenient for the search of the trust data, and then, the new block is released to the blockchain, so as to ensure the timely update of the trust evaluation. The evaluation process is shown in Figure 4.

3.2.2. Scenario 2

When domain managers and cooperate, evaluates the trust of and its subordinate devices after the cooperation. calculates the latest trust data of and each IoT device evaluation result in domain from domain , generates the block head and body of the new block, and then publishes it to the blockchain.

It is assumed that the evaluation value of from is at this time. obtains ’s current trust scale value , serial number , mean value of trust , risk value , harmonic trustrank , and the number of the included risks by querying the blockchain. uses Equations (2) and (3) to calculate the latest trustrank and the latest normative trust of .

Then, use Equations (4)–(6) to calculate the mean value of trust , risk value , and harmonic trustrank of . Finally, the fields related to this process are encapsulated in the block head to form a new block. These fields include , , , , , , , , and .

At the moment, due to the frequent cooperation between domain manager 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 stored in storage pool of is relatively small, so it is impossible to judge whether or not these malicious evaluations exist.

In this way, sends all the evaluations stored in to . In the subsequent work, will iteratively calculate the evaluation data in to obtain the trust data of the target IoT device and publish it to the blockchain. That is, queries the current normative trustrank of in the blockchain and calculates the latest normative trust of according to Equations (2) and (3), where . Then, generates the block body from the collection of and forms a new block together with the block header 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 () given by subordinate device of domain manager .

Output: new block . (1)Evaluation Collection. The storage of the domain manager continuously collects the evaluation value given by the subordinate equipment and judges whether or not the storage space utilization rate satisfies the inequality (). If it is satisfied, will sum up all the evaluation values in according to the evaluation equipment to obtain . We then judge whether or not is satisfied. If it is, passes the evaluation value in to . Otherwise, we delete the evaluation.(2)Trust Data Query. queries on blockchain to produce the latest normative trust of .(3)Trust Data Update. If the query is successful, the current trust scale value of can be obtained according to the deformation of Equation (6) and then updated according to . If the query fails, calculates the trust scale value of according to Equation (2) and calculates .(4)Block Publish. The calculated constitutes the block body of the new block, and is organized as a Merkle tree in the block header of the new block. forms a new block together with the block body 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 is , 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 57.

It can be seen from Figure 5(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 Figure 5 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.

It can be seen from Figure 6 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 Figure 8, showing the four parameters’ changing trends.

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 Figure 9.

The trust management model in the distributed Internet of Things proposed in Section 2 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 Figure 10, 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.

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.

Data Availability

There is no data included in this paper.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper.

Acknowledgments

This work was partly funded by the European Union Horizon 2020 DOMINOES Project (Grant Number 771066).