Improved Reliability of Communication in Cellular Internet of Things through Consensus

With the establishment and large-scale use of fifth-generation (5G) wireless networks, it is foreseeable that the Cellular Internet of Things (CIoT) will be applied in various fields. For instance, there are a large number of sensors for temperature measurement and cameras for video capture in cities. To provide highly reliable CIoT services, a reliable communication network must be designed. One of the commonly used methods to design a reliable communication network in a distributed system is to reach a consensus. However, none of the protocols proposed for the consensus problem in the past can be directly used in the network topology of CIoT. We propose an optimal protocol, the reliable communication medium consensus (RCMC), to reach a consensus on CIoT. The maximum number of abnormal communication media (CMs) in the CIoT topology is tolerated by the proposed RCMC, and only two data exchanges need to be performed.


Introduction
Owing to the popularity of the Internet of Things (IoT) and the popularization of 4G/5G, the data-processing mode of many IoT-related application services is gradually changing. To achieve ubiquitous access to IoT, cellular networks and wireless sensor networks (WSNs) have been integrated. Edge computing (EC) is a computing paradigm in which data are processed at the edge of the network. Through EC, large amounts of computing power and storage space distributed at the edge of the network are collected to generate sufficient resources to provide related services on mobile devices. (1) Therefore, EC and IoT can be implemented in dense cellular networks to establish a practical Cellular Internet of Things (CIoT) platform. Since CIoT with EC is one of the most promising technologies in 5G cellular systems, (2) through CIoT with EC, everything can be connected to the Internet. Vukobratovic et al. proposed a feasible CIoT topology in 2019. (3) Their proposed CIoT topology can realize an integrated platform of EC and IoT in a dense cellular network, so the service performance of the CIoT platform can be improved. In this study, the CIoT platform proposed by Vukobratovic et al. was applied and redefined as ECIoT (CIoT based on EC). Because EC distributes computing and storage resources from centralized clouds to distributed edge servers to support various applications that require low latency, ECIoT can provide more diverse IoT-related applications and services.
To increase the reliability of ECIoT to achieve different application service requirements of distributed computing, secure and highly reliable communication is one of the topics that must be discussed to provide high-quality ECIoT services. Reaching a consensus is one of the commonly used design methods to improve the reliability of distributed systems. So far, there has been no relevant research on ECIoT involving the consensus problem of abnormal network communication. This paper gives the first ever discussion of the consensus protocol for the topology of ECIoT with abnormal communication media (CMs).
The solution to the consensus problem is to define a protocol so that all normal processing units (PUs) can reach a consensus and use the minimum number of data exchanges with the maximum number of allowable abnormal components. In this paper, the solution to the consensus problem is re-discussed in the context of ECIoT. The definition of the problem is to make all PUs in ECIoT reach a consensus. Our newly designed protocol allows each PU of CIoT to select an initial data as a starting point when executing the protocol and to communicate with all other PUs by exchanging data. If the following conditions are met, the PUs have reached a consensus: (4) Consensus: All PUs agree on a common data. Validity: If the initial data of each PU i is v i , then all PUs agree on the data v i .
Many related studies on the consensus problem are based on the assumption that the PU is abnormal in a reliable network. (5) From this assumption, regardless of whether the PU is normal or not, the abnormality of the CMs will be regarded as the abnormality of the PU, so that the normal PU cannot reach a consensus. However, the definition of the consensus problem requires that all normal PUs must reach a consensus. Therefore, to provide CIoT with a reliable communication environment, ECIoT is used in this research. In ECIoT, many PUs are connected to each other. Even if some CMs are abnormal, all PUs must reach a consensus of the same data in ECIoT. We reconsider the consensus problem under the assumption that the CMs are abnormal in ECIoT. The proposed protocol to reach a consensus on ECIoT is called the reliable communication medium consensus (RCMC). The RCMC can solve the consensus problem in ECIoT by using the minimum number of data exchanges and increase the fault tolerance capability by allowing the maximum number of abnormal CMs.
This study is divided into six parts. In Sect. 1, the motivation and goals of this research are given. The topology of ECIoT is defined in Sect. 2. A detailed description of the proposed RCMC is given in Sect. 3. For ease of understanding, an example of executing the RCMC is given in Sect. 4. The optimality of the RCMC is proved in Sect. 5. Section 6 concludes this study.

Topology of ECIoT
Because IoT provides related applications and services through the connection of a large number of IoT sensors (IoT PUs), it is necessary to provide quality of service (QoS) for IoT applications through 5G wireless networks with high-speed transmission capabilities. (6) Nowadays, CIoT is widely regarded as the basic application of 5G wireless networks and enables millions of IoT PUs to connect to a single base station (BS). (7) The main function of an IoT PU is to sense and report relevant information in the environment. However, in some time-sensitive related applications, connecting an IoT PU directly to the Internet will not meet the time requirement. Therefore, some calculations and data will be hosted on a cellular BS in the form of an EC device (edge PU). (1) CIoT with EC can connect all IoT PUs to the Internet. The structure of ECIoT used in this study is shown in Fig. 1. ECIoT includes three tiers: an access tier, an edge tier, and a cloud tier.
A group of IoT PUs will form an access tier. For specific CIoT applications, IoT PUs are used to sense and report the required sensing signal. These IoT PUs within the coverage range of the BS will be connected to this specific BS. Then, all BSs are connected to the edge tier so that the edge PU in the edge cloud can obtain the required data to provide a specific application service.
The edge tier is organized into a group of edge clouds. Each edge cloud is responsible for processing the data required by a specific application and is composed of a large number of edge PUs. A cloud tier is formed by many cloud PUs, and related services required by cloud users will be provided by these cloud PUs. In ECIoT, various request data in real life will be collected through a large number of IoT PUs. With this huge amount of data, various CIoT-related applications and sequence services can be provided.
ECIoT is composed of many PUs that can communicate with each other. Even if some CMs fail due to internal damage or external intruders, it is necessary to reach a consensus on the same data in ECIoT so that the applications of ECIoT can still be executed normally. In this study, the PUs of ECIoT are reliable during the execution of the consensus, whereas the CMs may be abnormal due to noise or interference from hijackers, resulting in the exchange of data that may exhibit arbitrary behavior. When all PUs reach a consensus in ECIoT, the reliability of ECIoT can be enhanced.
Since ECIoT is built based on EC, the edge tier is responsible for the execution of data analysis and processing. In ECIoT, computing and storage resources are managed by the edge tier, so ECIoT can provide more computing and data storage resources for connected PUs. Owing to its characteristics, ECIoT is a platform that can provide various CIoT services and applications.

Proposed Protocol
The purpose of a consensus protocol is to enable each normal PU in the network to reach a consensus. To reach a consensus, each PU should exchange data with all other PUs. Then, each PU collects enough data to determine the consensus data, and the consensus data of each PU must be the same.
In this study, the consensus problem of ECIoT is discussed. In the relevant research results on the consensus problem, (4,5,(8)(9)(10) the CM delay is not considered. Therefore, when the PU executes the protocol of solving the consensus, it should receive data from other PUs within a predictable time. (11) Therefore, if the PU does not receive the data in time, it means that the data have been affected by abnormal CMs.
The proposed RCMC is used to solve the consensus problem in ECIoT with abnormal CMs. On the basis of the three tiers of ECIoT, the proposed protocol RCMC is executed by the PUs in the order of access tier, edge tier, and cloud tier in the three-tier hierarchy. To provide CIoTrelated services, the required data of a specific CIoT application are sensed by IoT PUs in ECIoT. Then, the sensed data are sent by the IoT PUs to the corresponding edge cloud in the edge tier. In the proposed method, the edge PU located in the edge cloud first receives the sensed data sent from the IoT PUs, and then the majority value of the received sensed data is calculated. The majority value of the received data is used as the initial data (v i ) of the edge PU i , which is used to execute the RCMC. When each edge cloud obtains the consensus data separately, the data are expressed as the content of the specific service responsible for the edge cloud. Finally, the consensus data are transmitted to the cloud tier by the edge PUs. In ECIoT, the role of the cloud PUs in the cloud tier is to collect the results of different specific services, and then a consensus vector is obtained, thereby providing an integrated service center for various CIoT-related applications.
The proposed method is initiated by the IoT PUs of the access tier to obtain the sensed data of the specific application service. There are two stages of the proposed RCMC, the data-gathering stage and the consensus data determination stage. The parameters of the RCMC include v i and n, where v i is the initial data of PU i and n is the number of PUs participating in the consensus. For all PUs to reach a consensus, each PU must collect enough exchanged data from all other PUs in the data-gathering stage to enable the consensus data to be determined in the consensus data determination stage. In the RCMC, the data-gathering stage only needs to perform two data exchanges to collect enough data. In the first data exchange, each PU i multicasts its initial data v i through CMs and then receives the initial data of other PUs. The initial data sent from other PUs received by each PU are stored in a vector, and each element in the vector corresponds to the PU that sent the data. In the second data exchange, each PU i sends the vector V i received in the first data exchange and constructs a matrix [V 1 , V 2 , ..., V i ], denoted by MAT i , 1 ≤ i ≤ n. Then, in the consensus data determination stage, the function MAJ k is used to determine the consensus data DEC i by taking the majority data of the kth row of MAT i for 1 ≤ k ≤ n. Finally, the consensus data DEC i are used to reach a consensus for all PUs participating in the consensus. The detailed definition of the RCMC is shown in Fig. 2.

Example of Executing RCMCM
We take the Agricultural Internet of Things (AIoT) constructed by ECIoT as an example to execute the RCMC as an example in this section. When ECIoT is applied to AIoT, by combining a large number of IoT PUs with different functions, sensor data required for various agricultural application services can be collected, and then the related services can be provided. In this example, there are five IoT PUs in the coverage of a specific BS 1 at the access tier, six edge PUs in edge cloud E 1 of the edge tier, and five cloud PUs in the cloud tier. Figure 3 shows the AIoT constructed by ECIoT used as an example.
First, each IoT PU in the access tier perceives the monitoring status. We assume that in the coverage of a specific BS 1 at the access tier, the CM between IoT PU u 11 and the edge tier and the CM between u 13 and the edge tier are abnormal. The sensing data of each IoT PU in B 1 at the access tier are shown in Fig. 4. The sensing monitoring statuses of B 1 at the access tier are transferred to edge cloud E 1 of the edge tier. Because the CM between u 11 and the edge tier and the CM between u 13 and the edge tier are abnormal, the data transmitted by the edge PU through the abnormal CMs will be arbitrarily changed. The data that has been arbitrarily modified are represented by bold and italics.
Each edge PU in edge cloud E 1 receives the sensing data transmitted from the IoT PUs within B 1 . When the edge PU receives the sensing data sent by the five IoT PUs, the majority value of these five sensing data is obtained by the edge PU. Next, the majority data (1) are used as the initial data (v i ) of the PU in edge cloud E 1 , and the proposed protocol RCMC(v i , n) = RCMC(1, 6) is executed. The initial data of each edge PU in edge cloud E 1 of the edge tier are shown in Fig. 4.
After that, the RCMC is executed by each edge PU in edge cloud E 1 . In the first data exchange of the data-gathering stage in the RCMC, each edge PU e ij broadcasts v i , and then receives the initial data from the other edge PUs in the same edge cloud, and constructs vector V i . In this example, the CM between e 11 and e 15 and the CM between e 12 and e 14 are assumed to be abnormal. The vector received in the first data exchange of edge cloud E 1 of the edge tier is shown in Fig. 5. In the second data exchange of the data-gathering stage in the RCMC, edge PU e ij broadcasts V i , then receives the vectors broadcast by the other edge PUs and constructs MAT i . After that, in the consensus data determination stage of the RCMC, the majority data of MAT 1 RCMC(v i , n) //* v i is the initial data of PU i and n is the total number of PUs participating in the consensus *// Data-gathering stage: First data exchange: PU i broadcasts v i then receives the initial data from the other PUs in the same cloud and constructs vector V i = [v 1 , v 2 , ..., v n ], 1 ≤ i ≤ n. Second data exchange: PU i broadcasts V i then receives V k from PU k , 1 ≤ k ≤ n. Matrix MAT i is constructed (by setting vector V k in the kth column for 1 ≤ k ≤ n) Consensus data determination stage: Step 1: Make MAJ k be the majority data of the kth row of MAT i for 1 ≤ k ≤ n.
Step 2: Search for any MAJ k . If (∃MAJ k = ¬vi), then DEC i = φ; Step    Finally, the consensus data of each edge PU in edge cloud E 1 are transferred to the cloud tier. In this example, the CM between e 12 and the cloud tier and the CM between e 14 and the cloud tier are assumed to be abnormal. The cloud PUs in the cloud tier receive the consensus data of each edge PU in edge cloud E 1 , and the majority value of the consensus data is taken by the cloud PU. The consensus data of each cloud PU in the cloud tier are shown in Fig. 7.

Optimality of the RCMC Protocol
The variables used when proving the optimality of the proposed method are listed in detail in Table 1. In previous studies, (4,5,(8)(9)(10) the number of allowable abnormal CMs in the consensus  problem was determined by the total number of CMs in a distributed system. In the study of Wang et al., (10) it was proved that (t − 1)/2 − 1 abnormal CMs is the maximum number of allowed abnormalities, where t is the total number of CMs in the distributed system. Therefore, the constraints of the RCMC are given as follows.
• (Constraint between access tier and edge tier): CM AEj > (CM AEj − 1)/2 + F AEj is the constraint between the access tier and edge tier. This constraint specifies the number of CMs required between the access tier and edge tier. • (Constraint of edge tier): CM Ej > (CM Ej − 1)/2 + F Ej is the constraint of the edge tier. This constraint specifies the number of CMs required in the edge cloud E j of the edge tier. • (Constraint between edge tier and cloud tier): CM ECj > (CM ECj − 1)/2 + F ECj is the constraint between the edge tier and cloud tier. This constraint specifies the number of CMs required between the edge tier and cloud tier. By using the constraints of the RCMC, its optimality will be proved by the following theorems. The optimality of the RCMC is verified by considering the number of data exchanges and the number of tolerable abnormal CMs. Through the proofs of Theorems 1 and 2, the RCMC is proved to be the optimal solution to the consensus problem in ECIoT. Theorem 1: If there is only one data exchange, there is not enough collected data to solve the consensus problem in ECIoT.

Proof:
To reach a consensus among the PUs in ECIoT, data exchange is necessary. Since the PU cannot obtain abnormal data in other PUs without data exchange, the consensus problem cannot be solved. In addition, the data obtained in one data exchange are insufficient to solve the consensus problem. For example, if PU i is connected to PU j through an abnormal CM, PU i only uses one data exchange without knowing the initial data in PU j . Therefore, it is impossible to reach a consensus using only one data exchange.

Conclusions
Because the solution of consensus problems is one of the most commonly used methods in the field of providing reliable distributed systems, many protocols have been proposed to solve the consensus problem for different network topologies. (4,5,(8)(9)(10) In this study, ECIoT with abnormal CMs was considered. The proposed protocol RCMC only requires two data exchanges, and the consensus of all PUs in ECIoT can be reached. Also, the RCMC can tolerate the maximum number of abnormal CMs in ECIoT.
In addition, as WSNs become part of IoT, a cluster of sensor nodes in a WSN can cooperate to achieve certain goals. In a cluster-based WSN (CWSN), each cluster is composed of many sensor nodes and a cluster head. The sink can control the status and communication data of all cluster heads. A tier composed of a cluster of sensor nodes and the cluster head can correspond to the access tier of ECIoT. The cluster head in the cluster of the access tier will be connected to the edge tier and can communicate with the sink. A tier composed of a set of sinks can correspond to the edge tier of ECIoT. Therefore, the RCMC proposed in this study can be directly applied to CWSNs.
Furthermore, only considering the consensus problem of abnormal CMs in ECIoT is still not enough to realize highly reliable ECIoT. This is because in actual ECIoT-related applications, there are not only abnormal CMs in the network topology but also abnormal PUs. Therefore, in future research, the proposed protocol will be extended to solve the consensus problem for the case that abnormal CMs and PUs exist simultaneously in ECIoT.