# Fog-Based Two-Phase Event Monitoring and Data Gathering in Vehicular Sensor Networks
## 1 Introduction
The challenge of fog computing lies in that the nodes are ubiquitously connected at the edge of the network, and there should be a careful design of scheduling and cooperation schemes among the fog nodes, as well as collaboration between vehicular nodes and the cloud [13]. For the event detection applications, there is a large amount of vehicular sensed data, and they are characterized as continuous generation. The sensed data should be filtered and preprocessed before being shared or uploaded [14]. Cooperative event-driven data-filtering technologies tailored to the VANET environment are highly needed. In this paper, we propose an efficient continuous event-monitoring and data-gathering framework called TPEG (Two-Phase Event-monitoring and data-Gathering) based on fog nodes in VANETs. TPEG would initiate an event-checking procedure to evaluate the received data. More detailed data would be uploaded to the base station when it considers this necessary, so the scheme suppresses unnecessary message transmission as much as possible while still detecting most of the events. There are two phases in the proposed scheme. In the monitoring phase, nodes sense the environment in low cost sensing mode and generate sensed data. A local fog-based two-level threshold strategy is adopted to suppress unnecessary data upload and transmission. When the probability of event is higher than the threshold, nodes transfer to event-checking phase, and some nodes would be selected to transfer to deep sensing to sense more accurate data of the environment. In the data upload phase, detailed data are uploaded to the ITS server for the final event decision. TPEG adaptively adjusts the threshold to upload a suitable amount of data for decision making, while at the same time suppressing unnecessary message transmissions. The main contributions of this paper are as follows:  
1. By integrating the concept of fog nodes and VANETs, we propose an efficient scheme to efficiently monitor the events and gather data based on VANETs. The sensing operators are roughly classified into the low cost sensing (LCS) mode and the high cost sensing (HCS) mode, and by taking full advantage of the fog nodes, our scheme strikes a good balance between these two modes to achieve better efficiency;
2. The \"two-level threshold adjustment\" (2 LTA) is proposed to avoid unnecessary event-checking and data upload. At the node level, only readings with a larger weight are sent to the RSU for further processing. The RSU then checks the confidence/probability of an event and initiates an event-checking procedure when the confidence exceeds a threshold. No event-checking procedure is needed if the confidence is within the range of thresholds;
3. Extensive experiments were conducted to demonstrate the effectiveness of the proposed algorithm. TPEG reduces more than 84% of data transmissions compared to other algorithms, while at the same time, it detects the events and gathers the event data. The rest of the paper is structured as follows: Section 2 describes the related work; Section 3 introduces some preliminaries and defines the network model and metrics; Section 4 presents the detailed description of the TPEG algorithm, including monitoring, event-checking, data upload and threshold adjustment; Section 5 describes the environmental setup and analyzes the simulation results; finally, Section 6 concludes the paper.