Future Generation Computer Systems 94 (2019) 351–367
Contents lists available at ScienceDirect
Future Generation Computer Systems journal homepage: www.elsevier.com/locate/fgcs
A novel code data dissemination scheme for Internet of Things through mobile vehicle of smart cities ∗
Haojun Teng a , Yuxin Liu a , , Anfeng Liu a,b , Neal N. Xiong c , Zhiping Cai d , Tian Wang e , Xuxun Liu f a
School of Information Science and Engineering, Central South University, ChangSha 410083, China Jiangsu High Technology Research Key Laboratory for Wireless Sensor Networks, Nanjing, Jiangsu 210003, China c Department of Mathematics and Computer Science, Northeastern State University, Tahlequah, OK 74464, USA d Department of Network Engineering, School of Computer, National University of Defense Technology, Changsha 410073, China e College of Computer Science and Technology, Huaqiao University, Xiamen, 361021, China f College of Electronic and Information Engineering, South China University of Technology, Guangzhou 510641, China b
highlights • • • •
A novel low-cost code dissemination model is proposed by using mobile vehicles of city with opportunistic communication style. A coverage based greedy deployment scheme for code stations is proposed to maximize coverage of code dissemination with low cost. An optimized code selection scheme is proposed to minimize the code dissemination cost and delay and improve coverage. Extensive simulation indicates the effectiveness of the proposed schemes through real taxi trajectory dataset.
article
info
Article history: Received 11 August 2018 Received in revised form 30 September 2018 Accepted 26 November 2018 Available online 10 December 2018 Keywords: Code data dissemination Mobile vehicle Coverage Internet of Things Low cost Update duration
a b s t r a c t More and more sensor-based devices are deployed for various applications to collect a huge amount of data for understanding the world, which constitute ubiquitous sensing Internet of Things (IoT) for smart cities. At the same time, Software-defined technology is also widely used in sensor-based devices. These sensor-based devices can get new functions and become smarter by updating their software. These sensor-based devices can be called smart sensors because they can generate smart data (which means filter out the noise and hold the valuable data). These smart sensors can adapt to the needs of new applications and form smart software-defined IoTs. However, it is a huge challenging issue that disseminating the update code to the smart sensors that are widespread and large quantity. We found that there are hundreds and thousands of mobile vehicles moving in the city, which can be used as the code mules to disseminate code with low cost. In this paper, a novel low-cost code dissemination model is proposed which disseminate the update code by using the mobile vehicles in the city with an opportunistic communication style. In order to improve the performance of such code dissemination model, a coverage based greedy deployment scheme for code stations and an optimized code selection algorithm are proposed to maximize coverage of code dissemination over the city with low cost and duration time. Extensive simulation experiments validate the proposed code dissemination model is feasible and indicate the effectiveness of the proposed schemes by using a real taxi trajectory dataset. © 2018 Elsevier B.V. All rights reserved.
1. Introduction The Internet of Things (IoT) [1–3] uses a large number of sensor-based devices to collect data more conveniently. It provides a new approach to solving complex sensing applications ∗ Corresponding author. E-mail addresses:
[email protected] (H. Teng),
[email protected] (Y. Liu),
[email protected] (A. Liu),
[email protected] (N.N. Xiong),
[email protected] (Z. Cai),
[email protected] (T. Wang),
[email protected] (X. Liu). https://doi.org/10.1016/j.future.2018.11.039 0167-739X/© 2018 Elsevier B.V. All rights reserved.
such as telemedicine systems [4], intelligent traffic management systems [5,6], and environmental monitoring systems [7]. These sensor-based devices can be deployed in a large quantity in the area to be monitored to obtain real-time data according to the needs of the application. The amount of data obtained from them grows geometrically as the number of sensing devices grows. But only a large amount of data does not meet the exact needs of the application. Thus, the concept of Smart Data is proposed. Smart Data aims to filter out the noise and hold the valuable data, which can effectively support IoT for planning, operation, monitoring, control, and intelligent decision making. However, it
352
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
is a challenging issue to acquire smart data from IoTs. One of a viable and effective approach is to place data filtering algorithms on sensor-based devices [8]. Therefore, the sensor-based devices can process and filter the generated data and upload it to the network, more valuable data can be obtained in this way, while the network load is greatly reduced [9]. Nowadays, the development of artificial intelligence is changing with each passing day, and new artificial intelligence algorithms are introduced almost every once in a while. In this case, how to disseminate the program code to sensor devices so that makes devices have smart functions to implement smart data Internet of Things is a challenging issue. The concept of soft-defined devices has also been proposed for many years. The basic idea is to implement the function by software means instead of hardware directly. In this way, the functionality of the devices can be adapted to the new application by updating the software [10], and the high-cost disadvantages caused by updating the hardware can be avoided. Soft-defined technology also brings new opportunities for smart data in IoT [11]. Smart data IoT can update the code of sensor device to make it have the latest intelligent processing algorithms, so that, smart data can be obtained effectively by filtering data at the data source. However, disseminating the code to the deployed sensor devices is a very challenge issue. In the past, the number of devices deployed in the sensor-based network was small, and the deployed area was also small. Moreover, the sensor network needs to deploy a dedicated line to connect to the Internet [12]. Due to its high deployment cost, the sensor network is only deployed in critical and important occasions. However, with the development of the Internet of Things, the current situation is completely different from the past. Many buildings and infrastructures are embedded with embedded sensor devices for various purposes. These embedded sensor devices can sense the state of the device itself and monitor the surrounding environment. According to statistics, the number of these embedded sensor devices is very large, far exceeding the number of humans. In addition to the sensor devices embedded in the manufacturing process, there are a large number of sensor devices that are deployed after manufacture for an application. For example, buildings, street lights, garbage bins, and even advertising facilities are generally embedded those smart sensing devices in order to monitor their status [13]. Garbage cans with embed sensing devices can monitor their trash levels and report the status to the data center. Street lights equipped with smart sensor devices can sense self-state such as light level and working hours [14]. Applications such as these are widely available in Smart City [15]. These sensor devices have the following common problems: (a) These sensor devices are generally small in size and easily embedded in the target to be monitored. At the same time, it means that the energy is limited and the communication distance is small [16]. (b) In most cases, there is no networking, so the upgrade code will not be able to use wired network transmission. (c) These devices are not only numerous, widely distributed, but also unattended and can be moved at any time. It is not realistic to deploy a fixed network. For example, the smart sensor-based garbage can is a ready-to-deploy facility that is dynamically placed based on actual needs. In the tourist season, some smart garbage cans need to be added to meet the needs of the application at the tourist attractions which are mostly located in remote, dangerous areas. Therefore, it is costly to deploy dedicated lines for these sensor-based facilities to connect to the network. One of the characteristics of this type of application is that the dissemination of code to sensor-based devices is delayed tolerance. On the other hand, the data monitored by the sensor-based device does not need to be reported to the data center in real time [17]. The network formed by these devices is the delay tolerant network. In general, the updated sensor devices are compatible with unupdated sensor devices. These devices will also work fine before
getting new code. Therefore, it does not require devices in the entire city to be updated at the same time. During the entire code update process, devices running old codes and new codes coexist. Although the time of this coexistence will vary depending on the application, it usually lasts for several days, even for several months [18]. Similar situations exist in the collection of perceptual data. For example, in a biologically diverse experimental system, the sensor devices periodically collect the temperature and humidity of the monitored object, and store the data in the local memory first, and then transmit it to the data center when there is an opportunity. In such applications, data can be kept locally for a few days, or even for a month without being affected [19]. Because these are long-term monitoring applications, sometimes it takes even a few decades of data to get a macro law. In applications such as garbage cans level monitoring, bridge deformation monitoring, urban greening monitoring, the transmission of monitoring data to the data center delayed for hours, even 1–2 days is acceptable. According to characteristics of these applications mentioned above, the main difficulties of disseminating the code for these sensor-based devices are as follows: (1) The number of sensor-based devices is very large and the distribution range is wide. These devices, belonging to different management parts, require different codes and update cycle. Therefore, updating the code for these devices requires huge cost and time. Here give a few possible solutions: (a) Connect these devices directly to the Internet so that the code can be download to the devices via the internet. But this is difficult to implement in many cases. In many places in the city, the Internet has not yet been connected, and the cost of accessing the Internet is very high and thus prevents this approach. For example, in the road under construction, the objects that need to be monitored will move with the construction of the road. These areas are not suitable for deploying the network, so this method is not realized. (b) Using a mobile communication method such as 5G, a SIM card is installed on each sensor device, so that each sensor device can obtain the code directly through the cellular network. However, such an approach is often too costly to apply in large quantities. Due to the development of manufacturing processes, existing sensor devices have rapidly reduced their cost through mass production. In general, the price of the sensor device is approximately equal to the SIM card. More expensive is the cost of using cellular network communication, the cost of just one month far exceeds the price of sensor devices, so the high cost prevents this method. (2) Another manifestation of Code dissemination in sensor devices is that there is no unified code dissemination strategy and various methods of code dissemination result in extremely high cost, but inefficiency [20]. As mentioned above, these huge numbers of devices belong to different departments. In general, each department is only responsible for the code dissemination of its own application. In some areas, there are devices deployed for multiple different applications in the same building [21]. For example, on a bridge, the construction department deployed sensor devices to monitor deformation, and the transportation department deployed sensor devices to detect vehicle speed. When these devices require software upgrades, technicians from different departments will repeatedly go to the same area, which is very costly and time consuming. In summary, due to the limitations of cost, transmission distance, and environment, disseminating the code of multiple applications to these devices is a challenging issue. Therefore, a universal, low-cost, and efficient code dissemination strategy is urgently needed. After careful study, we noticed that there are a large number of mobile vehicles in the city that are constantly moving in the city. These mobile vehicles have the powerful wireless communication equipment and have a certain storage capacity [22]. If the update code can be stored in these mobile vehicles, when
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
the mobile vehicles pass by the sensor devices that need to be updated, they can transmit the update code to the devices, so that the devices can be updated. These mobile vehicles can be called ‘‘code mules’’. There are several reasons below why mobile vehicles as ‘‘code mules’’ can disseminate the code to the sensor devices in a low-cost, unified, and efficient manner. (1) First, the mobile vehicle as ‘‘code mules’’ can be implemented in a unified code dissemination mode, which greatly simplifies the difficulty of code dissemination for many applications in smart city. In the mobile vehicle as ‘‘code mules’’ code dissemination mode proposed in this paper, only a small number of code stations need to be deployed in the city. The code station stores the code for updating the smart sensor. When the mobile vehicle passes the code station, the code station transmits the code to the mobile vehicle by wireless transmission. The mobile vehicle moves in the city. When the mobile vehicle passes the smart sensor that needs to be updated, it sends the code to the smart sensor to upgrade the smart sensor. This model has the following advantages: (a) The system in this mode is easy to construct, low cost and efficient. In this mode, only the code station needs to be newly constructed, and other parts such as sensor devices, mobile vehicles are already in the system. The construction cost of the code station is just a wireless broadcasting facility similar to the mobile phone base station, which requires a small footprint and low construction cost. Moreover, the cost of building a code station is shared by all applications, so the cost of each application is low. (b) Simplified code dissemination process. In this mode, each application only needs to transmit the code to the code station via the Internet. Then the mobile vehicle gets the code from the code station and disseminates it to smart sensors. The code dissemination process is uniform and automatic. Therefore, the process of code dissemination is simplified. (2) Secondly, the ‘‘code mules’’ can better cover the city, ensures that most devices can get codes. Because there are a large number of mobile vehicles in the city. In medium-sized cities, the number of mobile vehicles reaches more than 1 million. These mobile vehicles are constantly moving around the city and have strong mobility. Therefore, these ‘‘data mules’’ can effectively cover the entire city. (3) Such an opportunistic communication approach with ‘‘code mules’’ can meet the needs of the applications. In this code dissemination mode, the code mules carrying the code move in the city, not specifically to spread the code to the devices, but to spread the code to the devices by the device. Therefore, this is a kind of opportunistic communication. In this way, the time when the smart sensor gets the code is uncertain, and there may be a large delay. However, as the previous analysis shows, larger delays can be tolerated in most IoT applications [23], so this mode is appropriate. Although, using ‘‘code mules’’ based opportunistic communication method for code dissemination is good according to the analysis above. But there are still many challenges in the specific designs and applications. (1) First of all, the feasibility of this method needs to be explained by experiments using actual data. (2) A code mule cannot store the code of all applications since there are many applications in a smart city but the storage capacity of a vehicle is limited. That is, when a code mule passes the code station, if the free space of storage is insufficient, only the code of the partial application can be stored. Obviously, the code mules should choose the appropriate code to store, so that the overall efficiency of the system can be higher. However, the situation of code dissemination in different applications is different, and the trajectory of code mules is also uncertain. The goal of code diffusion is also a multi-objective optimization problem that combines cost, coverage, and delay. These conditions make the code dissemination very challenging. (3) Another key issue is: How to choose the location of code stations. Because code stations are the beginning of
353
the code dissemination process, their positions have an important impact on the result of code dissemination. Therefore, the location of the code station needs to be optimized. We proposed a Vehicles as Code Mules based Code Dissemination (VCMCD) scheme can achieve higher coverage code dissemination effects with lower cost and lower delay. The main innovation point for our proposed VCMCD scheme is as follows: (1) We propose the VCMCD scheme and perform the technical feasibility and system performance analysis by an experiment using real city taxi trajectory dataset. It is confirmed that the VCMCD model can effectively disseminate the code to meet the need the application. To the best of our knowledge, this work is the first effort to validate vehicles as code mules can be applied in smart sensor based IoTs. (2) An Optimized Code Selection Scheme of Code Mules is proposed to improve coverage and duration time of code dissemination with low cost in the VCMCD model. Since the storage capacity of vehicles is limited, when the vehicles pass the code station, they need to select the appropriate code to improve the performance of code dissemination. In our proposed optimized code selection algorithm, the weights of different application codes are calculated according to the current coverage and duration time of code dissemination and code mule moving direction. Then, according to the weights, the code with the largest weight will be selected for store and dissemination. The calculation of the code weights will be repeated as long as there is a code mule pass the code station. Therefore, the selection of codes can adapt to changes in the code dissemination of various applications and the performance of code dissemination can be improved. (3) A greedy deployment scheme for code station deployment is also proposed to improve the coverage and reduce the duration time of code dissemination. As mentioned earlier, this problem is a multi-objective optimization problem that requires balancing cost, coverage and duration time of code dissemination. (4) Finally, we have done an experiment with our proposed VCMCD scheme using real taxi GPS trajectory dataset from Beijing city. Our extensive simulation study demonstrates that the VCMCD scheme can improve the code dissemination coverage rate and reduce code dissemination duration time at the same time. The remainder of this paper is organized as follows: In Section 2, the related works are reviewed. The system model and problem statement are described in Section 3. In Section 4, the details of the VCMCD scheme are presented. In Section 5, discusses the results of experiments and comparisons, and Section 6 concludes the paper. 2. Related work Smart City does not currently have a formal and widely recognized concept. But Smart City’s goal is to make better use of public resources to provide citizens with higher quality public services while reducing management and labor costs [24]. The implementation of Smart city can be further stepped with the help of wireless sensor networks [25,26]. A wireless sensor network based approach is proposed to monitor the water quality of lakes in Smart City in [27]. The water quality of the lake is detected by the sensor at regular intervals. Then, the water quality data is collected and processed through the wireless sensor network. Finally, the data are transmitted to relevant departments through GPRS communication as a decision reference. This method of detecting water quality using WSN can quickly perceive changes in lake water quality and greatly reduce labor costs. This is clearly in line with the goal of smart cities. However, the realization of the smart city obviously needs to be reflected in more aspects, such as smart traffic management [28], smart building [29], etc. The realization of the smart city requires a large number of sensors deployed in different places in the city
354
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
to form a heterogeneous sensing system to collect different data of city [30]. But transmitting data using GPRS communication technology requires payment to mobile operators, which is obviously not suitable for large-scale data collection. How to collect the data generated by these sensing systems at a low cost is a challenging issue [31]. [32] proposes an architecture for collecting data generated by wireless sensor networks. The mobile entities are used to move in areas where wireless sensors are deployed, collect and store data generated by wireless sensors, and finally put the data in a fixed location. These mobile entities are vividly called ‘‘data mules’’. This architecture can efficiently collect data from wireless sensors deployed over a wide area by the rationally using of data mules. This architecture does not require a large amount of network infrastructure, so it has the advantages of low cost and low power consumption. However, one drawback of this architecture is high latency. The concept of data mules is extended in [33], naming a more realistic mobile entity as oblivious data mules. Compared to the original data mules, this concept removes the deliberate control of the mobile entity, which is more in line with the real-world mobile entities. Taxis running in the city can be regarded as data mules, and their path of moving changes according to the requirements of the passengers. For the architecture of data collection, the moving path of a taxi is random and not controlled by the data collection architecture. Therefore, oblivious data mules are more realistic than data mules. In addition, the coverage of the data collection increases as the oblivious data mules increase. Experiments in [33] were carried out using a real dataset from the taxis of Rome, illustrate that the coverage rate can reach more than 80% in one day by use of a limited number of oblivious data mules to collect data in the urban area. However, the coverage rate will decrease in areas far from the center of the city, as the number of data mules in these areas is much smaller than in urban area [25]. A routing protocol called ‘‘epidemic routing’’ shows advantages in data collection in remote areas. In the epidemic routing protocol, when a data mule meets another, they try to collect data from each other. This protocol is similar to the process of infection [34]. Obviously, the data collected by data mules are more likely to be transmitted to the data center, which can increase the coverage of data collection in the remote area by using the epidemic routing protocol. By using the epidemic routing protocol, the coverage of the urban area and the remote area can be increased at the same time. However, because the number of data mules in the urban area is much more than the remote area, frequent data exchange between data mules will aggravate the broadcast storm problem. Although the broadcast storm problem is a well-known problem in Ad hoc networks, it has become more complicated in VANET [35]. The VANET is the network formed by the data mules mentioned above. Due to the highly dynamic topology of data mules and the large traffic flow in urban areas, frequent data exchange between data mules will result in a large number of transmission collisions. In [35], the severity of the broadcast storm problem in VANET are discussed and an efficient broadcast scheme based on a neighbor table to the company broadcast storms. However, their research is limited to one-dimensional roads and lacks universality. Considering the complicated traffic conditions in the city, the broadcast storm problem is worthy of further study. In addition to the aforementioned data mules for data collection, another novel method has been proposed, called mobile crowd sensing [36–39]. In the mobile crowding sensing system, mobile phones with rich sensors such as GPS, microphone, camera, are an excellent data collection device. And the number of smartphones is numerous and widely distributed in the city. In order to obtain sufficient and high-quality data, an incentive mechanism
called QUOIN in proposed in [36], which can ensure the quality and availability of information that meets the application requirements simultaneously. But this mechanism requires payment to the participants who provide the data. If the data demand is huge, it will cost a lot of money. A matrix completion technique is used in [38] to minimize costs while ensuring application quality. However, how to avoid leakage of personal privacy is a problem that Mobile crowd sensing must face. [39] proposes a way to coordinate their perceived tasks through the collaborative work of participants rather than relying on traditional centralized servers. Furthermore, it proposes cooperative data aggregation, incentive distribution method and punishment mechanism to protect the privacy information of the user’s personal location while satisfying the Quality of Information (QoI) of the collected data. Moreover, the realization of smart cities is also reflected in the autonomous driving and the rational deployment of energy. However, there are some challenges to achieve this goal. (1) To achieve autonomous driving, heavy load computing tasks are needed. But limited computing power of autonomous vehicles cannot ensure the quality of autonomous driving. To address this problem, the author in [30] proposed a collaborative task computing scheme for autonomous vehicles to explore more compute power by incentivizing AVs to contribute their computing power. (2) Mobile charging stations (MCS) are emerging for easier charging of electric vehicles. How to low the cost of MCS while provide a stable QoS is a challenging problem. [40] proposed a Lyapunov-based online distributed algorithm to maximize the long-term average profits of MCSs, and their scheme also considered the multiple kinds of power supply, which shows the universality. (3) Another important challenge is the security and privacy issues. [29] propose a secure charging scheme based on a contract-based energy blockchain can make the electric vehicles charge in smart communities securely. 3. System model and problem statement 3.1. System model In the Vehicles as Code Mules based Code Dissemination (VCMCD) scheme, there are three important parts: Smart Sensors, Code Stations, and Code Mules. The definitions and introductions of them are given below. As described in the Introduction section, Smart Sensors are wireless sensor devices that can be updated. They can update their software automatically after receive the Update Code of matching type via low-power wireless communication. These smart sensors can adjust the various control parameters by self-update to meet the application requirements. A large number of smart sensors are deployed close to the street in different places of the smart city so that they can receive Update Code from Code Mules on the road within communication range. In order to achieve different functions, the Smart Sensors in the city have multiple types that can be applied in different scenarios. For example, in the fire-prone area, a temperature sensor is needed to detect the temperature of the environment; in a garbage can, a sensor for monitoring the height of the garbage is needed; for predicting the weather, a wind sensor is needed. Assume that there are k types of Smart Sensors in the city, which can be represented by the set {H1s , H2s , · · · , Hks }. Different types of sensors have different Update Codes because of their different functions. We use {H1U , H2U , · · · , HkU } to indicate different types of Update Code. Code Stations is the device responsible for getting the Update Code from the Internet. A type of Smart Sensors has a corresponding type of Code Station responsible for getting the Update Code. Because Smart Sensors have different types, Code Stations also have multiple types, which can be represented by the set {H1C , H2C ,
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
355
after the VCMCD Scheme has been running for a certain period of time. Obviously, the higher the CDCR, the better. We need to try our best to improve the Code Dissemination Coverage Rate. CDCR can be expressed as Eq. (1) as: C = Nupdated /Ntotal
Fig. 1. Sketch of VCMCD scheme.
· · · , HkC }. Code Stations of type H1C , H2C , · · · , HkC are responsible for getting Update Codes of type H1U , H2U , · · · , HkU and transmitting them to Smart Sensors of type H1s , H2s , · · · , Hks via Code mules. For convenience of description, we collectively call HiS , HiU , HiC as type i. In addition, Code Stations have a stable power supply and the ability to access the Internet to exchange data with the cloud data center. Code Stations periodically synchronizes with the cloud data center. Therefore, Code Stations of the same type in different locations transmit the same Update Code to Code Mules at the same time. In VCMCD Scheme, Code Mules are mobile vehicles equipped with wireless communication devices, which are widely distributed and constantly moving in the city. GPS and some wireless communication devices are commonly equipped on mobile vehicles, so most mobile vehicles can become Code Mules with no modification. The function of Code Mules is to get and store Update Code from Code Stations and transmit the Update Code to the Smart Sensor when they pass by the Smart Sensor. In general, Code Mules is involved in Code dissemination at no charge. Because Code Mules is not specifically responsible for transmitting Update Code from Code Station to Smart Sensor in VCMCD Scheme. That is to say, the moving path of Code Mules is not affected by the VCMCD Scheme but depends on the destination the passenger is going to. This kind of Non-regular and nonscheduled communication between Code Mules and Code Station and between Code Mules and Smart Sensors can be called opportunistic communication. In summary, the VCMCD Scheme consists of Smart Sensors, Code Stations, and Code Mules. The running process of the VCMCD scheme can be shown in Fig. 1. The Code Stations get the Update Code from the cloud data center and transmit the Update Code to the Code Mules passing by. Code Mules run on the streets of Smart City, receive the Update Code from Code Station, and transmits the Update Code to Smart Sensor when they pass by. 3.2. Problem statement In VCMCD Scheme, the moving path of Code Mules are not adjusted for VCMCD Scheme, so it is unpredictable whether Update Code can finally reach Smart Sensor. In addition, the storage space of Code Mules is limited. So, there are some issues that need to be addressed: How to transmit the Update Code to more Smart Sensors as much as possible. How to transmit Update Code from Code Station to Smart Sensors faster. In order to state the problems need to be solved in detail, we give a formal definition and representation below. (1) Code Dissemination Coverage Rate (CDCR): Code Dissemination Coverage Rate is the ratio of the number of Smart Sensors that receive the Update Code to the total number of Smart Sensors
(1)
where Nupdated indicates the number of updated Smart Sensors and Ntotal represents the total number of Smart Sensors. (2) Code Dissemination Duration Time (CDDT): Code Dissemination Duration Time is the time it takes from the start of the VCMCD Scheme to the end. The end of the VCMCD is considered when the CDCR reaches 100% or does not grow for a certain period of time. The end of the VCMCD scheme is also considered as the moment when the last Smart Sensor completes the self-update. Obviously, the lower the CDDT, the better. CDDT can be expressed by Eq. (2) as: T = tend − tstart = tlatest − tstart
(2)
where tend is the moment when the VCMCD Scheme ends, tstart is the moment when the VCMCD Scheme start, tlatest denotes the moment when the last Smart Sensor completes the self-update. In summary, the problems we have to solve are how to maximize CDCR and how to minimize CDDT. It can be expressed by the following formula (3):
{
max (C) = max Nupdated /Ntotal
(
)
min (T ) = min (tlatest − tstart )
(3)
4. Designing of VCMCD scheme 4.1. Motivation In order to realize the smart city, a large number of smart sensors are needed. As mentioned in Section 3.1, Smart Sensors can meet the changing requirement of the sensing application by update their software. However, most Smart Sensors in the smart city cannot connect to the Internet directly due to limitations of power source and cost. And they are in large quantity and widely distributed in the whole smart city. Therefore, managing the Smart sensor by transmitting the update code in a traditional way is quite difficult. Actually, there are mobile vehicles also in large quantity and widely distributed in the city. Mobile vehicles run in the street almost anywhere and anytime. And the most important thing is most mobile vehicles are equipped with wireless communication devices. Therefore, they can be used as carriers to transmit the update code to Smart Sensors. 4.2. Overview The VCMCD Scheme proposed in this paper is a low-cost solution for disseminating the update code to smart sensors by mobile vehicles. This scheme can realize the management of a huge number of smart sensors at low cost. In the VCMCD Scheme, Smart Sensors are distributed in different locations in the city and installed in the roadside infrastructure. Although there are some sensors in the traditional city, once these sensors are installed, their working status is difficult to adjust. But the smart sensor can be updated wirelessly after installation to adjust its working status, which is necessary for some scenarios. Sometimes the environment monitored by the sensor changes, for example, in summer, the temperature is higher than in other seasons and easy to cause fires. In order to monitor the occurrence of fires more quickly, the temperature smart sensor can be easily adjusted to a faster detection frequency in summer with update code. But it is difficult to get the update code without the Internet. The VCMCD scheme
356
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
Fig. 2. Running Process of Code Station.
uses the mobile vehicles (Code Mules) to transmit Update Code from Code Stations to Smart Sensors, which makes it possible to easily manage Smart Sensors with low cost. The following sections detail the running of Code Stations, Smart Sensors and Code Mules in VCMCD Scheme.
4.3. Code stations 4.4. Smart sensors Code Stations are similar to base stations, have a stable power supply and the ability to connect to the network. The main function of Code Stations in the VCMCD scheme is getting the Update Code from the cloud data center and transmitting it to Code Mules. Code Stations always switch between the three modes shown in Fig. 2, Detecting mode, Transmission mode and Sync mode. When Code Station is in Sync mode, it synchronizes data with the cloud data center through the Internet. It not only gets the latest version of the update code from the cloud data center but also synchronizes some Code Mule logs to the cloud data center. These logs record the information of the transmission of Update Code from Code Mules to Smart Sensor. When the synchronization is completed, Code Station switches to Detecting mode. In the Detecting mode, Code Station detects in a specific frequency if a Code Mule is nearby. If a Code Mule appears, Code Station will enter the Transmission mode. In the Transmission mode, Code Station will transmit the Update Code to Code Mule, and Code Mule will also transmit its logs to Code Station. The size of data in the transmission process is not very large, so the transmission time is very short and the transmission process can be completed in the process of Code Mule movement. After completing the transmission with Code Mule, Code Station will enter Sync mode again. In order to be consistent with cloud data in a timely manner, Code Station periodically enters Sync mode from Detecting mode. In order to clearly explain the working status of Code Station, we give the following pseudo code for a detailed description. In Algorithm1, Code Station and Code Mule are replaced by the abbreviations CS and CM respectively.
Smart Sensors are wireless sensors that can be self-updated. Smart Sensors come in different types, such as temperature sensors, wind sensors, magnetic sensors, photosensitive sensor. These Smart Sensors can adjust the performance by adjusting specific parameters, but different sensor types have different parameters that can be adjusted. So, different types of sensors require different Update Codes to update. In VCMCD Scheme, Smart Sensor is the final destination of the Update Code.
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
357
4.5. Code mules
Fig. 3. Running Process of Smart Sensor.
Fig. 4. Running Process of Code Mule.
The Update Sensor always switches between the three modes shown in Fig. 3, Detecting mode, Receiving mode, Update mode. When the Smart Sensor is in the detecting mode, the Smart Sensor detects whether there is a Code Mule in the communication range at a certain frequency. If there is a Code Mule, first check if the Code Mule has the same Update Code as its own type. If it exists, Smart Sensor will enter Receiving mode. If it does not exist, Smart Sensor will still be in Detecting mode. When the Smart Sensor is in Receiving mode, the Smart Sensor receives the Update Code sent by the Code Mule. After the reception is completed, it sends a confirmation message to the Code Mule and enters Update mode. When the Smart Sensor is in Update mode, the Smart Sensor reads and parses the Update Code executes the command in the Update Code. After that, it will enter the Detecting mode again. We use pseudo code to describe the Smart Sensor’s running process in detail. In Algorithm 2, Smart Sensor and Code Mule are replaced by the abbreviations SS and CM respectively.
Code Mules is the mobile vehicle equipped with computing and storage devices and a wireless communication device that can communicate with Code Station and Smart Sensor. Most vehicles today meet the above conditions, so a common vehicle as a Code Mule requires almost no hardware changes, which greatly reduces the cost of Code Dissemination. The main functions of Code Mules in VCMCD Scheme are: (1) get Update Code from Code Station (2) transmit Update Code to Update Sensor. Code Mule has limited storage capacity, but different types of sensors need different Update Codes. Therefore, when the storage of Code Mule is full, some decisions must be made: Whether to save a new type of Update Code and which type of Update Code can delete to free enough space. Code Mule always switches between the three modes shown in Fig. 4: Detecting mode, Receiving mode, Transmission mode. In Detecting mode, Code Mule will detect at a certain frequency whether there is a Code Station or Smart Sensor in the communication range. Code Mule will switch to the Receiving mode if there is a Code Station and switch to Transmission mode if there is a Smart Sensor. In the Receiving mode, Code Mule will perform a series of data exchange operations with Code Station, not just receiving packets. In the Transmission mode, Code Mule sends a request to the Smart Sensor and queries whether its storage has the corresponding type of Update Code according to the response. If it has, Code Mule will send the update to Smart Sensor. Otherwise, it will enter the Detecting mode again. We use pseudo code to describe in detail what Code Mule does in each of the three modes. In Algorithm 3, Smart Sensor, Code Station and Code Mule are replaced by the abbreviations SS, CS, and CM respectively.
358
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
4.6. Deployment scheme of code stations Since Code Stations is the source of the Update Code in VCMCD Scheme, it is very important to select the locations of Code Stations. In order to improve the Code Dissemination Coverage Rate with low cost as much as possible, a Code Station Deployment scheme called Greedy Deployment scheme is proposed in this paper.
4.6.1. Greedy deployment scheme It is assumed that the overall situation of vehicles driving in the city has certain similarities between the past and the future. Therefore, the historical driving data of vehicles have certain reference significance for the future. We turned the deployment problem of Code Stations into two minimum set coverage problems: (1) Based on all Code Mules historical driving data, find a Code Mules set that can reach all Smart Sensor locations. (2) Based on the historical driving data of the selected Code Mule set, find a set of areas, so that all Code Mules in the selected Code Mule set that pass through at least one area in this area set. The set coverage problem is a typical NP-hard problem, and a reasonable solution set can be obtained by the greedy algorithm. Therefore, a greedy algorithm can be used in the Greedy Deployment Scheme to find a reasonable Code Mule set that satisfies the requirement of the first problem mentioned above. Similarly, the greedy algorithm can be used again to find a suitable set of areas to meet the requirement of the second problem mentioned above. The concrete implementation of the Greedy Deployment Scheme is shown in Algorithm 4. And the meanings of the symbols in Algorithm 4 are listed in Table 1 for easy understanding.
Table 1 Meanings of Symbols. Symbol
Meaning
SCM SSS SCS CMbest SS Sbestco v ered CM Sselected CM Sbestcov ered SArea Areabest FSS (CM) FCM (Area)
Set of Code Mules Set of Smart Sensors Set of Code Stations The Code Mule passed the maximum number of Smart Sensors Set of Smart Sensor that CMbest passed Code Mules set selected by the greedy algorithm Set of Code Mules passed by Areabest selected Set of Areas where Code Mules in SCM passed The Area where the most Code Mules passed in SArea A function that can find the Smart Sensor set that the CM passed A function that can find the Code Mules set passed by Area
To verify the effectiveness of the Greedy Deployment Scheme, we present the following Random Deployment Scheme for comparison in later experiments. 4.6.2. Random deployment scheme In the Random Deployment Scheme, the deployment locations of Code Stations are randomly selected from a set of areas that meet certain conditions. 4.7. Code selection scheme of code mule As mentioned earlier, Code Mule has limited storage capacity. Therefore, when Code Mule passes by a Code Station, if the Update Code stored in Code Station is not in the storage of Code Mule and the storage space is full, then some problems need to solve. Whether to receive and store the Update Code from the Code Station. Which type of Update Code to delete for enough free space. In the following part, an Optimized Code Selection Scheme is proposed that can improve the performance of Code Dissemination in a limited storage space. 4.7.1. Optimized code selection scheme The Optimized Code Selection Scheme selects Update Codes based on current coverage rate and duration time of Smart Sensors and vehicle moving direction. Specifically, in Optimized Code Selection Scheme, Code Mules preferentially select the Update Code with the type of the low coverage to store, which can increase the number of Code Mules store the Update Code with low coverage, thereby improve the overall CDCR. And Code Mules preferentially select the Update Code with the longer wait time to reduce the overall CDDT. In addition, Code Mule will select the Update Code that can reach the corresponding type of Smart Sensor first according to its driving direction, which obviously helps to reduce the overall CDCR and CDDT. In order to easily select the Update Code according to factors mentioned above, we introduce the concept of weight for Update Code. The following is a specific weight expression: Wi = di · [u · (1 − Ci ) + v · Ti ]
(4)
where u, v are the adjustment factors and the meaning and calculation method of Ci , Ti , di are explained in the following. Ci is the coverage rate of Update Code type i, that is the ratio of the number of updated Smart Sensor type i to the total number of Smart Sensor type i. Ci can be calculated by Eq. (5): updated
Ci = N i
/Nitotal
updated
(5)
where Ni is the number of Smart Sensor type i that have been updated as far, Nitotal is the total number of Smart Sensor type i.
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
Fig. 5. Update Code selection based on driving direction.
Ti is the duration time of Update Code type i, that is the time
from the moment that Update Code type i is gotten by Code Station
359
Optimized Code Selection Scheme requires Code Station and Code Mule to be implemented together. Code Station has relatively strong compute power and is responsible for calculating the values of Ci , Ti , di , while Code Mule is relatively weak, just responsible for calculating Wi according to Ci , Ti , di . Algorithms 5 and 6 respectively show the implementation of Optimized Code Selection Scheme in Code Mule and Code Station in the form of pseudo code.
to the present moment. Ti can be calculated by Eq. (6): Ti = tnow − tstart
(6)
tnow denotes the present moment, tstart denotes the moment that
Update Code type i is gotten by Code Station. di is the direction parameter, which is used to indicate whether
the driving direction towards to the closest Smart Sensor type i. di can be calculated using Eq. (7):
{ di =
1,
if CM toward SS type i
−1, if CM not toward SS type i
(7)
Obviously, if Code Mule is heading towards Smart Sensor type i, Code Mule will pass the Smart Sensor type i in the near future with high possibility, di = 1. If the driving direction of Code Mule is
In order to verify the effect of the Optimized Code Selection Scheme, we propose two comparison schemes for comparison in the next experiment.
facing away from the Smart Sensor type i, the Code Mule is unlikely to pass the Smart Sensor type i in the near future, di = −1. As shown in Fig. 5, when Code Mule passes Code Station, the driving direction is toward Smart Sensor type 1, and facing away from Smart Sensor type2. So, W1 > 0, W2 < 0, Code Mule will receive and store Update Code type1 accord to weights.
4.7.2. FIFO code selection scheme The main idea of FIFO Code Selection Scheme is first in first out. If a Code Mule passes the Code Station and needs to select the Update Code to store, the Code Mule using FIFO Code Selection Scheme will delete the Update Code stored first and store the new Update Code.
If a Code Mule passes the Code Station and needs to select the Update Code to store, the Code Mule using the Optimized Code Selection Scheme will send a request to Code Station. Code Station will calculate the values of Ci , Ti , di and return them to the Code Mule. And Wi can be calculated by the Code Mule using Ci , Ti , di which is used to select Update Code.
4.7.3. Random code selection scheme The main idea of Random Code Selection Scheme is to select the Update Codes randomly. If a Code Mule passes the Code Station and needs to select the Update Code to store, the Code Mule using Random Code Selection Scheme will select the Update Code to delete or store by using random function.
360
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
Fig. 6. Trajectory points of taxi 3579. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
Fig. 7. Filtered trajectory points of taxi 3579.
5. The experiments of VCMCD scheme 5.1. Preparation of experiments In order to verify the viability of the VCMCD Scheme and the performance under different sub-schemes in VCMCD Scheme. We performed a simulation experiment using T-Drive dataset [41,42]. This dataset contains GPS trajectory information for 10,357 taxis in Beijing from February 2nd to February 8th. This dataset records the real traffic conditions of taxis in Beijing, so using this dataset for simulation experiments is persuasive. Remove invalid GPS data points. After inspection, it was found that the latitude and longitude of some records in the T-Drive dataset obviously deviated from the Beijing area. Therefore, in order to reduce the error, the data set needs to be filtered before use. We selected data from the dataset with longitudes ranging from 116.15◦ E to 116.75◦ E and latitudes ranging from 39.7◦ N to 40.2◦ N as experimental data. In addition, there still are some GPS data points deviation from the normal path. For example, the red dot in Fig. 6 shows the deviation points of the taxi with id 3579. In order to filter out this erroneous data, we calculated the average speed between two consecutive points and removed the last of the two consecutive points where the average speed is much greater than 90 km/h. After two times of filtering, we get a usable data set. Fig. 7 shows the two filtered trajectory points of taxi 3579. Grid the dataset. Assume that Code Station, Code Mule, and Smart Sensor use ZigBee protocol for wireless communication. This protocol has a minimum transmission range of up to 100m outdoors, which means that within a range of 100m, they can detect each other and communicate with each other. For the convenience of calculation, we divide the whole experimental range into a large number of square areas. We call a square area a grid. If Code Station and Code Mule are in the same grid, wireless communication is √ possible. Because the longest distance is 2d √ in a foursquare grid with side length d, and the longest distance 2d cannot be greater than 100 m in order to communicate with each other. That is, √ √ 2d ≤ 100 , d ≤ 100 × 2/2 ≈ 70 m, so we assume the side length d is 70 m. We convert the longitudes and latitudes in the dataset into gridded values according to the following Eq. (8) and Eq. (9). Gx = ⌈(lon − lonmin )/elon ⌉
(8)
where lon is longitude, lonmin is the smallest longitude within the experimental range. elon is the longitude difference across 70 m. Gy = ⌈(lat − latmin )/elat ⌉
(9)
Fig. 8. Visualization of T-Drive Dataset . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
where lat is latitude, latmin is the smallest latitude within the experimental range, elon is the latitude difference across 70 m. Compress the dataset. Because of traffic congestion or parking breaks, the taxi will be stationary for part of the time. Therefore, the GPS points of a part of the data in the data set are the same for a period of time. This part of the data can be compressed without affecting our experimental results, but it can reduce the amount of computation. After filtering, gridding and compressing, we got 176,846 Grids with taxis passing by. We counted the number of taxis passing through each Grid and showed the results in Fig. 8. In Fig. 8, a point represents a Grid. The closer the color of the point is to the yellow, the more taxis pass through the Grid. From Fig. 8, it can be seen that the number of taxis passing through the downtown area is much higher than the peripheral area. 5.2. Comparison of deployment scheme In order to implement the VCMCD Scheme, we need to determine the location of the Smart Sensor and the location of the Code Station. First, the locations of the Smart Sensors need to be determined. In this experiment, assume that there are 4 types of Smart Sensors, each with a quantity of 200. 800 grids were selected from the 59,925 grids with more than 10 taxis passing through as the location of the Smart Sensor by using the random algorithm. The deployment locations of 800 Smart Sensors are shown in Fig. 9.
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
Fig. 9. Deployment of Smart Sensor.
361
Fig. 11. Deployment of Code Station generated by Random Deployment scheme . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
Fig. 10. Deployment of Code Station generated by Greedy Deployment Scheme.
Deploy the Code Station by the Greedy Deployment Scheme. The locations of Code Stations have been determined by using the Greedy Deployment Scheme according to the locations of Smart Sensors and T-Drive dataset. There are 6 Code Station of type1 and type2, 4 Code Stations of type3 and 5 Code Stations of type4. Fig. 10 shows the deployment location of all Code Stations determined by the Greedy Deployment Scheme. The ‘‘Code Stations’’ is abbreviated to ‘‘CS’’ in the legends of Figs. 10 and 11. Overall, Code Station’s deployment location is relatively scattered, but some Code Station deployment locations are relatively close. Deploy the Code Station by the Greedy Deployment Scheme. Assume that 5 Code Stations is deployed for each type. The deployment locations of the Code Station are selected by the random algorithm in the top 100 grids of the number of taxis passing through. Fig. 11 shows the deployment locations of Code Stations determined using the Random Deployment Scheme. Comparing Figs. 10 and 11, it can be seen that the deployment locations of the Code Stations selected by the Random Deployment Scheme are closer to each other than that by the Greedy Deployment Scheme. We performed Code Dissemination experiments based on the deployment locations of the Smart Sensors and the deployment locations of Code Stations selected by the two deployment schemes. In order to avoid the Code Selection Scheme affecting the results,
Fig. 12. The result of Random Deployment Scheme . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) Table 2 Results of two Deployment schemes. Deployment Scheme
CDCR
CDDT (min)
Greedy Random
99.875% 99.75%
6799 7853
we assume that there is no limit to the size of the Code Mule’s storage. After the experiment we got the following results: Table 2 shows the experimental results with deploying Code Stations using two deployment schemes. It can be seen from Table 2 that Code Dissemination under the VCMCD scheme can reach more than 99% of the Code Dissemination Coverage Rate after the end of the experiment. This proves the feasibility of the VCMCD Scheme. And Greedy Deployment Scheme is significantly better than the Random Deployment Scheme because of higher CDCR and lower CDDT. Figs. 12 and 13 show the results of code dissemination based on the deployment locations selected by the Greedy Deployment Scheme and Random Deployment Scheme respectively. In Figs. 12 and 13, SS in the legend represents Smart Sensor, the red points
362
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367 Table 3 Records of taxis passed the unupdated Smart Sensor. Taxi id
Date
Time
Grid x
Grid y
7696 4961 4769 3845 5384 993 10324 6007 3530 3267
2008/2/2 2008/2/2 2008/2/3 2008/2/3 2008/2/3 2008/2/4 2008/2/4 2008/2/4 2008/2/5 2008/2/5
19:50:38 20:42:43 1:21:16 9:34:14 20:27:31 14:37:55 15:09:00 17:19:48 16:24:04 18:53:04
437 437 437 437 437 437 437 437 437 437
156 156 156 156 156 156 156 156 156 156
Table 4 Records of taxi passed Code Station type3.
Fig. 13. The result of Greedy Deployment Scheme.
Fig. 14. Comparison of CDCR.
Taxi id
Date
Time
Grid x
Grid y
10324 3530 10324 3845 993
2008/2/3 2008/2/3 2008/2/6 2008/2/7 2008/2/8
11:53:51 19:08:38 15:48:34 17:37:01 10:01:25
329 344 329 344 344
303 248 303 248 351
Fig. 14 shows the comparison of CDCR in the two deployment schemes. As can be seen from Fig. 14, the CDCR of Update Code type1 and type3 can reach 100% and the CDCR of Update Code type2 and type4 can reach 99.5%, in Random Deployment Scheme. The CDCR of Update Code type1 type2 and type4 can reach 100% and the CDCR of Update Code type3 can reach 99.5%, in Greedy Deployment Scheme. Fig. 15 compares the changes in CDCR over time. Before about 1000 min, the CDCR increase speed under the Greedy Deployment Scheme and the Random Deployment Scheme was about the same, but after 1000 min, the CDCR under the Greedy Deployment Scheme increase faster than the Random Deployment Scheme. We analyzed the reason for an unupdated Smart Sensor in Greedy Deployment scheme. According to experimental data, the location of this unupdated Smart Sensor is (437, 156) and the type of this unupdated Smart Sensor is type3. All the records of taxis that passed this Smart Sensor are listed in Table 3. It can be seen that from 2008/2/2 to 2008/2/5 , 10 different taxis passed the Smart Sensor, but only 4 taxis passed through Code Station type3. Comparing Tables 3 and 4, it can be found that the time of four cars passed by the Code Station type3 is later than the time of them passed by the Smart Sensor. That means, when the 4 Code Mules passed the Smart Sensor, they did not store the Update Code of type3, so the Smart Sensor could not complete the update. As can be seen from the above experimental results, comparing to the Random Deployment Scheme, the Code Dissemination Coverage Rate is higher and the Code Dissemination Duration Time is shorter in Greedy Deployment Scheme. Obviously, Greedy Deployment Scheme is better than Random Deployment Scheme. 5.3. Comparison of code selection scheme
Fig. 15. The changes of CDCR with Time.
represent the locations of Smart Sensors that are not updated. As we can see from Fig. 8, the grids where these red points are located has fewer taxis passed.
In order to compare the effects of the three Code Selection Schemes, we need to limit the memory size of the Code Mule. Assume that the sizes of Update Codes of different types are the same. We use storage = 1 to indicate that the storage of Code Mule can store 1 Update Code at most. We do experiments under storage = 1, 2, 3 respectively. The deployment locations of Code Stations are selected by Greedy Deployment Scheme. In addition, due to the instability of the experimental results of the Random Code Selection Scheme, we conducted 10 experiments under the Random Code Selection Scheme and took the worst result as the comparison.
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
363
Table 5 Results of Code Selection Schemes (storage limit = 1). Code Selection Scheme
CDCR
CDDT (min)
OCS scheme FCS scheme RCS scheme
97.375% 97% 96.625%
8581 8702 8699
Fig. 17. CDCR with Time under OCS scheme (storage = 1).
Fig. 16. Comparison of CDCR (storage = 1).
5.3.1. The results of experiments under storage = 1 The experiments were performed under storage = 1. After the experiments were completed, we summarized the results in Table 5, Figs. 16–19. The experimental results of the three Code Selection Schemes are listed in Table 5. For CDCR, the Optimized Code Selection scheme (OCS scheme) is higher than the FIFO Code Selection scheme (FCS scheme) and the Random Code Selection scheme (RCS scheme). For CDDT, the OCS scheme is smaller than the FCS scheme and RCS scheme. That is, in the case of storage = 1, the OCS scheme can reach a higher CDCR in less time. Obviously, the OCS scheme is better than the FCS and RCS scheme. Fig. 16 shows the comparison of the CDCR of four types in three Code Selection Schemes. As can be seen from Fig. 16, the OCS scheme is the most balanced in three Code Selection Schemes, with a maximum and minimum CDCR difference of 0.025. The difference between the maximum and minimum values of CDCR is 0.04 in the RCS scheme and 0.06 in the FCS scheme. For CDCR of type 3, the FCS scheme and the RCS scheme are both low, but the OCS scheme achieves a higher CDCR. Figs. 17, 18, 19 show the variation of CDCR of four types over time in three Code Selection Scheme respectively. As can be seen from Figs. 18 and 19, in the FCS scheme and RCS scheme, the CDCR of type3 is always lower than the other three types during the whole process of experiments. But the CDCR of type3 is not significantly lower than the other three types, as can be seen from Fig. 17. The CDCR increase rate of type4 is improved after about 500 min, and the CDCR of type4 has exceeded 0.4 at 1000 min. Comparing Figs. 17–19, it can be seen that the CDCR of type4 has a significant improvement in the OCS scheme. In Summary, The OCS scheme is better than the FCS scheme and the RCS scheme in the case of storage = 1. 5.3.2. The results of experiments under storage = 2 The experiments were performed under storage = 2. After the experiments were completed, we summarized the results in Table 6, Figs. 20–23.
Fig. 18. CDCR with Time under FCS scheme (storage = 1).
Fig. 19. CDCR with Time under RCS scheme (storage = 1).
As can be seen from Table 6, the CDCR can reach more than 99% in all three Code Selection Schemes. The CDCR in OCS scheme
364
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
Fig. 20. Comparison of CDCR (storage = 2).
Fig. 22. CDCR with Time under FCS scheme (storage = 2).
Table 6 Results of Code Selection Schemes (storage size = 2). Code Selection Scheme
CDCR
CDDT (min)
OCS scheme FCS scheme RCS scheme
99.875% 99.625% 99.375%
7742 7807 7827
Fig. 23. CDCR with Time under RCS scheme (storage = 2). Table 7 Results of Code Selection Schemes (storage size = 3).
Fig. 21. CDCR with Time under OCS scheme (storage = 2).
can reach 99.875%, which is higher than that in the FCS scheme and RCS scheme. The CDCR in OCS scheme has already reached the maximum value in the experiments. And the CDDT in OCS scheme is lower than that in the FCS scheme and RCS scheme. Fig. 20 shows the comparison of the CDCR of four types in three Code Selection Schemes in the case of storage = 2. As can be seen from Fig. 20, the CDCR of type1, type2 can reach 100% in all three Code Selection Schemes. And the CDCR of type3 in OCS scheme is higher than that in FCS scheme and RCS scheme. Figs. 21, 22, 23 show the variation of CDCR of four types over time in three Code Selection Scheme respectively in the case of storage = 2. In Figs. 22, 23, the CDCR of type4 is always the highest during 0-3000 min while the CDCR of type3 is always the lowest during the experiment. In Fig. 21, the CDCR of the type4 is similar to the CDCR of type3 during 1000–4000 min. The CDCR of the type4 in Fig. 21 is lower than that in Figs. 22 and 23 during 1000–4000 min. But the CDCR of type3 in Fig. 21 is higher than that in Figs. 22 and 23
Code Selection Scheme
CDCR
CDDT (min)
OCS scheme FCS scheme RCS scheme
99.875% 99.875% 99.75%
6799 6799 6799
during the most time. Because the number of Code Mules storing Update Code type3 is more in the OCS scheme. In Summary, The OCS scheme is better than the FCS scheme and the RCS scheme in the case of storage = 2. 5.3.3. The results of experiments under storage = 3 The experiments were performed under storage = 3. After the experiments were completed, we summarized the results in Table 7, Figs. 24–27. As can be seen from Table 7, the CDCR in OCS scheme and FCS scheme both reach 99.875% and the CDCR in the RCS scheme reach 99.75%. And the CDDT in three code selection schemes both is 6799 min. Fig. 24 shows the comparison of the CDCR of four types in three code selection schemes in the case of storage = 3. The CDCR of type1, type2 and type4 both reach 100% in three code selection schemes, and there are differences in CDCR of type3.
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
Fig. 24. Comparison of CDDT (storage = 3).
Fig. 27. CDCR with Time under RCS scheme (storage = 3).
Fig. 25. CDCR with Time under OCS scheme (storage = 3).
Fig. 28. Comparison of CDCR in different storage sizes.
365
the same. Because the times of Code Mules need to select the Update Code to Store become less when Code Mules pass the Code Stations due to sufficient storage size of Code Mules in the case of storage = 3. In summary, the OCS scheme and the FCS scheme have the same effect, and the RCS scheme is the worst, in the case of storage = 3. 5.3.4. Summary Fig. 28 shows the CDCR in three code selection schemes in the case of storage = 1, 2, 3. As can be seen from Fig. 28, the CDCR increases with the increase of storage size. Fig. 29 shows the CDDT in three code selection schemes in the case of storage = 1, 2, 3. In Fig. 29, the CDDT decreases as storage size increases. The OCS scheme is better than the FCS scheme and the RCS scheme in most cases. Set the storage = 2 and use the OCS scheme can achieve a better Code Dissemination with a lower cost. Fig. 26. CDCR with Time under FCS scheme (storage = 3).
Figs. 25, 26, 27 show the variation of CDCR of four types over time in three Code Selection Scheme respectively in the case of storage = 3. Comparing Figs. 25, 26, 27, it can be seen that the variation of CDCR in three code selection schemes are almost
6. Conclusion In this paper, we have proposed a novel low-cost code dissemination scheme called as VCMCD scheme. In this scheme, hundreds and thousands of mobiles vehicles in the smart city are used as Code Mules. And Code Stations are deployed in the smart city to get the Update Code from the cloud data center and transmit it to Code Mules. The Update Code can be transmitted to Smart Sensors
366
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367
Fig. 29. Comparison of CDDT in different storage sizes.
by Code Mules with opportunistic communication style. Because there are a large number of mobile vehicles in the city and they are widely distributed, Code Dissemination by using the VCMCD scheme can achieve high coverage. In the VCMCD scheme, only the Code Stations need to be newly constructed, and other parts such as sensor devices, mobile vehicles are already in the system. Therefore, the VCMCD scheme is low cost. On the basis of the VCMCD scheme, we proposed the Optimized Code Selection scheme and Greedy Deployment scheme to maximize coverage of code dissemination over the city with low cost and duration time. In the Optimized Code Selection scheme, the concept of weight for Update Code is introduced to select Update Code properly based on coverage rate and duration time of Smart Sensors and vehicle moving direction. In the Greedy Deployment scheme, we turned the deployment problem of Code Stations into two minimum set coverage problems and used the greedy algorithm to find a suitable location set to deploy the Code Stations. And extensive simulation experiments validate the proposed code dissemination model is feasible and indicate the effectiveness of the proposed scheme by using a real taxi trajectory dataset. Acknowledgments This work was supported in part by the National Natural Science Foundation of China (61772554), Jiangsu High Technology Research Key Laboratory for Wireless Sensor Networks, China (NLBKF201804). References [1] Z. Li, Y. Liu, A. Liu, S. Wang, H. Liu, Minimizing convergecast time and energy consumption in green internet of things, IEEE Trans. Emerg. Top. Comput. (2018) http://dx.doi.org/10.1109/TETC.2018.2844282. [2] Z. Ding, K. Ota, Y. Liu, N. Zhang, M. Zhao, H. Song, A. Liu, Z. Cai, Orchestrating data as services based computing and communication model for informationcentric internet of things, IEEE Access 6 (1) (2018) 38900–38920. [3] M. Huang, A. Liu, M. Zhao, T. Wang, Multi working sets alternate covering scheme for continuous partial coverage in WSNs, Peer-to-Peer Networking and Applications (2018) http://dx.doi.org/10.1007/s12083-018-0647-z. [4] N. Xiong, A.V. Vasilakos, L.T. Yang, L. Song, Y. Pan, R. Kannan, Y. Li, Comparative analysis of quality of service and memory usage for adaptive failure detectors in healthcare systems, IEEE J. Sel. Areas Commun. 27 (4) (2009) 495–509. [5] Waze - outsmarting traffic, together, 2013 (online). Available: http://www. waze.com/. [6] Mana rapid transit iphone application, 2012 (online) Available: http://itunes. apple.com/sg/app/mana-rapid-transit/id501961346?mt=8. [7] M.Z.A. Bhuiyan, J. Wu, G. Wang, T. Wang, et al., e-Sampling: Event-Sensitive Autonomous Adaptive Sensing and Low-Cost Monitoring in Networked Sensing Systems, ACM Trans. Auton. Adapt. Syst. 12 (1) (2017) 12.
[8] Z. Ning, X. Kong, F. Xia, W. Hou, X. Wang, Green and sustainable cloud of things: enabling collaborative edge computing, IEEE Commun. Mag. (2018) http://dx.doi.org/10.1109/MCOM.2018.1700895. [9] X. Liu, P. Zhang, Data drainage: a novel load balancing strategy for wireless sensor networks, IEEE Commun. Lett. 22 (1) (2018) 125–128. [10] X. Hu, J. Cheng, M. Zhou, B. Hu, X. Jiang, Y. Guo, et al., Emotion-aware cognitive system in multi-channel cognitive radio ad hoc networks, IEEE Commun. Mag. 56 (4) (2018) 180–187. [11] F. Xiao, X. Xie, Z. Li, Q. Deng, A. Liu, L. Sun, Wireless network optimization via physical layer information for smart cities, IEEE Network 32 (4) (2018) 88–93. [12] T. Wang, G. Zhang, M.Z.A. Bhuiyan, A. Liu, W. Jia, M. Xie, A novel trust mechanism based on fog computing in sensor-cloud system, Future Gener. Comput. Syst. (2018) http://dx.doi.org/10.1016/j.future.2018.05.049. [13] X. Liu, Y. Liu, A. Liu, L. Yang, Defending on-off attacks using light probing messages in smart sensors for industrial communication systems, IEEE Trans. Ind. Inf. 14 (9) (2018) 3801–3811. [14] Y. Liu, A. Liu, S. Guo, Z. Li, Y. Choi, H. Sekiy, Context-aware collect data with energy efficient in cyber-physical cloud systems, Future Gener. Comput. Syst. (2017) http://dx.doi.org/10.1016/j.future.2017.05.029. [15] C. Zhang, R. Chen, L. Zhu, A. Liu, Y. Lin, F. Huang, Hierarchical information quadtree: efficient spatial temporal image search for multimedia stream, Multimedia Tools Appl. (2018) http://dx.doi.org/10.1007/s11042-018-6284y. [16] X. Liu, A novel transmission range adjustment strategy for energy hole avoiding in wireless sensor networks, J. Netw. Comput. Appl. 67 (2016) 43–52. [17] W. Xiao, W. Bao, X. Zhu, L. Liu, Cost-aware big data processing across geodistributed datacenters, IEEE Trans. Parallel Distrib. Syst. 28 (2017) 3114– 3127. [18] G. Wu, J. Chen, W. Bao, X. Zhu, W. Xiao, J. Wang, Towards collaborative storage scheduling using alternating direction method of multipliers for mobile edge cloud, J. Syst. Softw. 134 (2017) 29–43, http://dx.doi.org/10.1016/j.jss.2017. 08.032. [19] C. Gao, S. Lv, Y. Wei, Z. Wang, Z. Liu, X. Cheng, M-SSE: an effective searchable symmetric encryption with enhanced security for mobile devices, IEEE Access 6 (2018) 38860–38869, http://dx.doi.org/10.1109/ACCESS.2018.2852329. [20] X. Liu, M. Dong, K. Ota, P. Hung, A. Liu, Service pricing decision in cyberphysical systems: insights from game theory, IEEE Trans. Serv. Comput. 9 (2) (2016) 186–198. [21] C. Zhou, Y. Gu, X. Fan, Z. Shi, G. Mao, Y. Zhang, Direction-of-arrival estimation for coprime array via virtual array interpolation, IEEE Trans. Signal Process. 66 (22) (2018) 5956–5971, http://dx.doi.org/10.1109/TSP.2018.2872012. [22] H. Zhu, F. Xiao, L. Sun, R. Wang, P. Yang, R-TTWD: robust device-free throughthe-wall detection of moving human with wifi, IEEE J. Sel. Areas Commun. 35 (5) (2017) 1090–1103. [23] A. Zanella, N. Bui, a. Castellani, L. Vangelista, M. Zorzi, Internet of things for smart cities, IEEE Internet Things J. 1 (2014) 22–32, http://dx.doi.org/10.1109/ JIOT.2014.2306328. [24] T. Li, W. Chen, Y. Tang, H. Yan, A homomorphic network coding signature scheme for multiple sources and its application in iot, Secur. Commun. Netw. (2018) http://dx.doi.org/10.1155/2018/9641273. [25] T. Li, S. Tian, A. Liu, H. Liu, T. Pei, DDSV: optimizing delay and delivery ratio for multimedia big data collection in mobile sensing vehicles, IEEE Internet of Things Journal (2018) http://dx.doi.org/10.1109/JIOT.2018.2847243. [26] M. Huang, A. Liu, N. Xiong, T. Wang, A.V. Vasilakos, A low-latency communication scheme for mobile wireless sensor control systems, IEEE Trans. Syst. Man Cybernet. Syst. (2018) http://dx.doi.org/10.1109/TSMC.2018.2833204. [27] X. Huang, J. Yi, S. Chen, X. Zhu, A wireless sensor network-based approach with decision support for monitoring lake water quality, Sensors (Basel) 15 (2015) 29273–29296, http://dx.doi.org/10.3390/s151129273. [28] Z. Li, Y. Liu, M. Ma, A. Liu, X. Zhang, G. Luo, MSDG: a novel green data gathering scheme for wireless sensor networks, Comput. Netw. 142 (4) (2018) 223–239. [29] Z. Su, Y. Wang, Q. Xu, M. Fei, Y. Tian, N. Zhang, A secure charging scheme for electric vehicles with smart communities in energy blockchain, IEEE Internet Things J. (2018) http://dx.doi.org/10.1109/JIOT.2018.2869297. [30] Z. Su, Y. Hui, T.H. Luan, Distributed task allocation to enable collaborative autonomous driving with network softwarization, IEEE J. Sel. Areas Commun. (2018) http://dx.doi.org/10.1109/JSAC.2018.2869948. [31] Z. Ning, J. Huang, X. Wang, Vehicular fog computing: Enabling real-time traffic management for smart cities, IEEE Wirel. Commun. (2018) http://dx.doi.org/ 10.1109/MWC.2017.1700441. [32] R.C. Shah, S. Roy, S. Jain, W. Brunette, Data MULEs: Modeling a three-tier architecture for sparse sensor networks, in: Proc. 1st IEEE Int. Work. Sens. Netw. Protoc. Appl. SNPA 2003, IEEE, 2003, pp. 30–41, http://dx.doi.org/10. 1109/SNPA.2003.1203354. [33] M. Bonola, L. Bracciale, P. Loreti, R. Amici, A. Rabuffi, G. Bianchi, Opportunistic communication in smart city: Experimental insight with small-scale taxi fleets as data carriers, Ad Hoc Networks. 43 (2016) 43–55, http://dx.doi.org/ 10.1016/j.adhoc.2016.02.002. [34] T. Spyropoulos, K. Psounis, C.S. Raghavendra, Spray and wait : an efficient routing scheme for intermittently connected mobile networks, Sigcomm (2005) 252–259, http://dx.doi.org/10.1145/1080139.1080143.
H. Teng, Y. Liu, A. Liu et al. / Future Generation Computer Systems 94 (2019) 351–367 [35] J.S. Bae, D.W. Kum, J.C. Nam, J.I. Choi, Y.Z. Cho, Neighbor information-based broadcast scheme for VANET, in: APCC 2012 — 18th Asia-Pacific Conf. Commun. ‘‘Green Smart Commun. IT Innov’’, IEEE, 2012, pp. 544–545, http://dx. doi.org/10.1109/APCC.2012.6388253. [36] K. Ota, M. Dong, J. Gui, A. Liu, QUOIN: incentive mechanisms for crowd sensing networks, IEEE Network Magazine 32 (2) (2018) 114–119. [37] X. Wang, Z. Ning, X. Hu, E. Ngai, L. Wang, B. Hu, R.Y.K. Kwok, A city-wide realtime traffic management system: enabling crowdsensing in social internet of vehicles, IEEE Commun. Mag. 56 (9) (2018) 19–25. [38] Y. Ren, Y. Liu, N. Zhang, A. Liu, N. Xiong, Z. Cai, Minimum-Cost mobile crowdsourcing with QoS guarantee using matrix completion technique, Pervasive Mob. Comput. 49 (2018) 23–44. [39] B. Zhang, C. Liu, J. Lu, Z. Song, Z. Ren, J. Ma, W. Wang, Privacy-preserving QoIaware participant coordination for mobile crowdsourcing, Comput. Netw. 101 (2016) 29–41. [40] H. Chen, Z. Su, Y. Hui, H. Hui, Dynamic charging optimization for mobile charging stations in internet of things, IEEE Access (2018) http://dx.doi.org/ 10.1109/ACCESS.2018.2868937. [41] J. Yuan, Y. Zheng, C. Zhang, W. Xie, T-Drive: Driving directions based on taxi trajectories, in: Proc. 18th SIGSPATIAL Int. Conf. Adv. Geogr. Inf. Syst., 2010, pp. 99–108. http://dx.doi.org/10.1145/1869790.1869807. [42] J. Yuan, Y. Zheng, X. Xie, G. Sun, Driving with knowledge from the physical world, in: Proc. 17th ACM SIGKDD Int. Conf. Knowl. Discov. Data Min. - KDD ’11, ACM Press, New York, New York, USA, 2011, p. 316, http://dx.doi.org/10. 1145/2020408.2020462.
Haojun Teng is currently a Master student at the School of Information Science and Engineering of Central South University, China. His research interests include big data, machine learning, and cloud computing. E-mail:
[email protected].
Yuxin Liu is currently a student at the School of Information Science and Engineering of Central South University, China. Her research interests include wireless sensor networks and cloud computing. E-mail:
[email protected]. cn.
Anfeng Liu is a Professor at the School of Information Science and Engineering of Central South University, China. He received M.Sc. and Ph.D. degrees in computer science from Central South University, China, in 2002 and 2005. His research interests include services computing, wireless sensor networks, and crowd sensing networks. Email:
[email protected].
Neal N. Xiong is currently an Associate Professor of 3 years at the Department of Mathematics and Computer Science of Northeastern State University, OK, USA. He has received his Ph.D. from Wuhan University (on sensor system engineering) and the Japan Advanced Institute of Science and Technology (on dependable sensor networks). Before he attended Northeastern State University, he worked at Georgia State University, Wentworth Technology Institution, and Colorado Technical University (as a full professor for 5 years) for approximately 10 years. His research interests include cloud computing, security and dependability, parallel and distributed computing, networks, and optimization theory.
367
Dr. Xiong has published over 300 papers in international journal and over 100 papers presented at the international conference. Some of his works have been published in IEEE JSAC, IEEE or ACM transactions, ACM Sigcomm, IEEE INFOCOM, ICDCS, and IPDPS. He has served as a General Chair, Program Chair, Publicity Chair, PC member and OC member of over 100 international conferences and as a reviewer of roughly 100 international journals including IEEE JSAC, IEEE SMC (Park: A/B/C), IEEE Transactions on Communications, IEEE Transactions on Mobile Computing, and IEEE Trans. on Parallel and Distributed Systems. He is currently serving as an Editorin-Chief, Associate Editor or editorial member for over 10 international journals (including acting as an Associate Editor for IEEE Tran. on Systems; Man & Cybernetics: Systems; as an Associate Editor for Information Science; as an Editor-in-Chief of Journal of Internet Technology (JIT); Editor-in-Chief for the Journal of Parallel & Cloud Computing (PCC)); and as a guest editor for over 10 international journals including Sensor Journal, WINET and MONET. He received the Best Paper Award at the 10th IEEE International Conference on High Performance Computing and Communications (HPCC-08) and the Best Student Paper Award at the 28th North American Fuzzy Information Processing Society Annual Conference (NAFIPS2009). Dr. Xiong is the Chair of the ‘‘Trusted Cloud Computing’’ Task Force, of the IEEE Computational Intelligence Society (CIS) (http://www.cs.gsu.edu/~cscnxx/indexTF.html), and of the Industry System Applications Technical Committee, (http:// ieee-cis.org/technical/isatc/). He is a Senior member of the IEEE Computer Society, E-mail:
[email protected].
Zhiping Cai received the B.Eng., M.A.Sc., and Ph.D. degrees in computer science and technology from the National University of Defense Technology (NUDT), China, in 1996, 2002, and 2005, respectively. He is a full professor in the College of Computer, NUDT. His current research interests include network security and big data. He is a senior member of the CCF and a member of the IEEE. His doctoral dissertation has been rewarded with the Outstanding Dissertation Award of the Chinese PLA. Email:
[email protected].
Tian Wang received his BSc and MSc degrees in Computer Science from Central South University in 2004 and 2007, respectively. He received his Ph.D. from the City University of Hong Kong in 2011. He is currently an Associate Professor with the National Huaqiao University of China. His research interests include wireless sensor networks, social networks, and mobile computing. E-mail:
[email protected].
Xuxun Liu (M’14) received the Ph.D. degree in communication and information system from Wuhan University, Wuhan, China, in 2007. He is currently an Associate Professor with the School of Electronic and Information Engineering, South China University of Technology, Guangzhou, China. He has authored or co-authored over 30 scientific papers in international journals and conference proceedings. His current research interests include wireless sensor networks, wireless communications, computational intelligence, and mobile computing. His research has been supported by the National Natural Science Foundation of China for three times. He serves as an Associate Editor of the IEEE ACCESS, and as Workshop Chair, Publication Chair, or TPC Member of a number of conferences. He has served as a reviewer of over 30 journals, including ten IEEE journals and five Elsevier journals. E-mail:
[email protected].