Boundary Region Detection for Continuous Objects in Wireless Sensor Networks

Industrial Internet ofThings has been widely used to facilitate disaster monitoring applications, such as liquid leakage and toxic gas detection. Since disasters are usually harmful to the environment, detecting accurate boundary regions for continuous objects in an energy-efficient and timely fashion is a long-standing research challenge. This article proposes a novel mechanism for continuous object boundary region detection in a fog computing environment, where sensing holes may exist in the deployed network region. Leveraging sensory data that have been gathered, interpolation algorithms have been applied to estimate sensory data at certain geographical locations, in order to estimate a more accurate boundary line. To examine whether estimated sensory data reflect that fact, mobile sensors are adopted to traverse these locations for gathering their sensory data, and the boundary region is calibrated accordingly. Experimental evaluation shows that this technique can generate a precise object boundary region with certain time constraints, and the network lifetime can be prolonged significantly.


Introduction
The concept of fog computing has attracted more and more attention nowadays, since fog computing promises to provide a relatively low latency and high-efficiency service [1,2].Different from cloud computing, fog computing is geographically closer to the network edge, where the majority of heterogeneous Internet of Things (IoT) devices are located.Consequently, applications can completely or, at least partially, be achieved upon edge nodes, and, hence, sensory data may not be required to be routed to the cloud in order to reduce the network traffic.One of the typical applications for fog computing in industrial IoT is disaster tracking and management [3][4][5], where toxic liquid like vitriol would cause soil acidification and, even worse, toxic gases like ammonia gas would be harmful to human body once leaked.In industrial applications like factory monitoring, sensors are deployed to monitor gas, liquid, or other kinds of dangerous objects.In this article, we concentrate on continuous object boundary detection, where traditional techniques have explored this topic [6][7][8].As shown in Figure 1, wireless sensor networks (WSNs) serve as the foundation of IoT.In the context of fog computing, sensory data provided by sensor nodes are routed to contiguous fog nodes for further processing, and these sensory data are required to be routed to the cloud since fog nodes are weak in capacity to handle these data.Therefore, analyzing these data at the fog nodes in an efficient manner and, thus, detecting the boundary region of continuous objects in an accurate and (near) real-time manner are a promising research topic [9].
Energy efficiency is the key issue in IoT, since IoT smart things are mostly battery-powered, and they are hardly to be recharged due to the harsh working environment.Traditional techniques have been proposed, where an energy-efficient algorithm for boundary detection and monitoring (COBOM) is proposed for boundary detection by selecting a set of boundary nodes [10].Each sensor node saves its neighbor nodes status by a bit array.The head sensor node suppresses sensory data of its neighbors and reports the aggregated data packet to the sink node.In a certain round of data reporting, a few representative boundary nodes would be selected to report their sensory data.Sleep scheduling is applied to reduce energy consumption in sensor networks.In [11], the authors proposed a sleep scheduling scheme for object boundary monitoring.A few sensor nodes around the already existing boundary should be activated, while other nodes are stayed on the sleep mode.Generally, these schemes adopt partial of sensor nodes for data gathering purpose and, thus, for decreasing the network overhead.However, this strategy may lead to a coarse object boundary detection, since many sensor nodes may not report their sensory data to the sink to support the decision-making.
Research has been conducted on precise object boundary detection.In [12], the authors proposed a dynamic cluster structure for detecting and tracking a precise object boundary.Boundary nodes are dynamically organized into certain clusters.The head node in each cluster collects sensory data from other sensor nodes and sends these data to the sink node.More energy is consumed on data transmission so as to get a precise boundary.In [13], a data aggregation scheme is proposed to reduce the number of data packages among sensor nodes in the network.To detect and track a precise boundary, a piecewise quadratic polynomial interpolation scheme is applied.However, this technique does not check the predicted boundary as it may not be correct in some part of the predicted boundary.
To cover sensing holes and detect a precise boundary of continuous objects [14,15], the authors proposed a mechanism through adopting mobile sensors for a precise and efficient boundary detection, where obstacles are not considered [16].Generally, a few static sensor nodes are deployed, while mobile sensors are applied to detect sensing holes.In traditional schemes, object boundary shape is influenced by density and deployment of sensor nodes.This means that the more the sensor nodes are deployed, the more precise the boundary should be derived.Besides, the relatively large amount of sensory data should cause the network congestion.Note that a static sensor network could hardly generate a more precise object boundary when the object keeps relatively stable, since there may be very few sensor nodes deployed in the boundary region.In this proposed scheme, mobile sensors traversing along an interpolationbased estimated boundary would detect a more precise object boundary.
This article proposes an efficient mechanism for object boundary detection in fog computing environment.Mobile sensors collaborate to bypass sensing holes for generating a precise object boundary, while the energy efficiency is a main concern.The main contributions of this proposed mechanism are summarized as follows: (i) Spatial interpolation algorithms are adopted to estimate the object boundary in the network region, where sensory data provided by static sensor nodes serve as the foundation.A threshold, which reflects the occurrence of potential events, is prescribed, and the possible object boundary is generated and represented as a curve.Potential points on the curve, which correspond to cruising stopping locations of mobile sensor nodes, are identified, in order to evaluate the applicability of the object boundary according to corresponding sensory data.(ii) An energy balanced mechanism is developed to schedule the itineraries of mobile sensors.Specifically, the time of cruising time of mobile nodes is estimated through calculating the time required to visit all points in the curve.The number of mobile sensors is derived when considering the time constraint of certain applications.The itinerary scheduling of multiple mobile sensors can be reduced to a multiobjective optimization problem, which can be solved through adopting heuristic algorithms.
Extensive evaluations are conducted to evaluate the accuracy of object boundary and the performance of mobile sensors deployment technique.The results show that the proposed mechanism for object boundary region detection can effectively find a precise object boundary.Meanwhile, the utilization of mobile sensors can discover sensing holes with certain time constraints.This article is organized as follows.Section 2 introduces the concepts and related techniques.Section 3 presents the network initialization mechanism.The precise boundary area detection mechanism is developed in Section 4. Section 5 evaluates the technique developed in this article.Section 6 reviews and discusses relevant techniques, and Section 7 concludes this article.

Preliminary
This section introduces the network model and defines relevant concepts.Algorithms including spatial interpolation and planar graph are presented.

Networks Model.
Sensor nodes are deployed in a twodimensional network region.There are two types of sensing mode of sensor nodes.Fixed sensing range means that the sensing radius of sensor nodes cannot be changed, while adjusted sensing range means otherwise.In this article, we adopt a fixed sensing range for sensor nodes.We define that the sensing range for both types of sensor nodes are nonadjustable.Different from [17], we give the probabilistic sensing model, and the probability of a sensor detecting an event at a distance  is defined as follows: where   represents the sensing radius of sensor nodes.Generally, the communication radius of mobile nodes is larger than that of static sensors.The energy consumption of mobile nodes is mainly for their movement and communication process.To define a shape and a boundary for objects, a curve should be identified and corresponding to the threshold that defines the occurrence of a certain event.
Definition 1 (boundary line (BL)).It is a curve where the sensing value is equal to the prespecified threshold.BL represents the boundary of an object.An object is surrounded by BL.
In this article, static sensors are divided into different types according to their sensing attributes.A sensor node whose sensing value is higher than the threshold is called Inside Node (IN).A sensor node whose sensing value is lower than the threshold is called Outside Node (ON).BL separates the object and its surrounding.
As shown in Figure 2, all blue and black nodes that are located in the yellow object region have sensed the object, and they are INs.On the contrary, all the green nodes that are located on the outside of the object region are ONs.
Definition 2 (inside boundary node (IBN)).A node belongs to IN and there are both inside nodes and outside nodes on its one-hop neighbors.Definition 3 (outside boundary node (OBN)).A node belongs to ON and there are both inside nodes and outside nodes on its one-hop neighbors.
All of IBNs belong to IBs, and all of OBNs belong to OBs.IBN and OBN are considered to be more close to the BL, because, around them, there exist different types of static sensors.

Spatial Interpolation. Spatial interpolation algorithms
are widely used in geographic information systems like disaster risk analysis, agriculture, and event prediction particularly.To predict the condition of an unknown object, a spatial interpolation algorithm, namely, Inverse Distance Weighted (IDW), is applied in this article.
Assume that  represents a position which we want to acquire its estimated value (), and () is influenced by all the points that exist a true sensing value.  is the distance between  and   and  is a parameter that influences the result of interpolation; it is usually set to 2. The influence of   to  is inversely proportional to   : The main steps of Inverse Distance Weighted are listed: (i) Calculate the distance   between the point  and all known points.
(ii) Calculate each point's weight 1/(  )  , which is the reciprocal of distance between  and   .
(iii) Calculate the predicted value of the point  according to formula (3).

Planar Graph.
The planar graph is a kind of graph which consists of three parts: vertexes, edges, and faces.In the planar graph, each face is a closed polygon that consists of  vertexes ( ≥ 3).In WSNs, the planar graph is usually applied to organize the sensor network, and there have developed many kinds of planarization algorithms.The Gabriel Graph (GG) and the Relative Neighborhood Graph (RNG) are two wellknown kinds of the planar graph as presented in [18] and [19], respectively.
Figure 3 shows the rule of RNG and GG.In RNG, if a node  is located in the intersection region of circles about  and V with radius (, V), then the edge (, V) is deleted and it builds the edge (, ), (V, ) separately.In GG, if a node  is located in the circle about the midpoint of  and V with diameter of (, V), then the edge (, V) is deleted and separately builds the edge (, ), (V, ).
Based on the planar graph, we define the following.

Definition 4 (boundary face (BF))
. A polygon area is divided by the planar graph which contains both IBN and OBN on its vertexes.
Definition 5 (boundary area (BA)).It is a continuous area that consists of all BFs.
An example is shown in If there exists a node  in the gray area, the edge between  and V will be broken and they connect with  , respectively.(b) shows the mechanism of generating the edge in GG.If there exists a node  in the gray area, the edge between  and V will be broken and they connect with , respectively.

Inside boundary node
Boundary line

Boundary face
Outside node represent ON.All polygon regions with both IBN marked by blue color and OBN marked by deep green color are named BF and they form the BA which is marked by red lines.BL is the curve that surrounds the yellow region.

Sensory Data Interpolation
In this section, the strategy for initializing the networks is presented.Planar graph algorithms are always applied to build topology networks for data transmission and network dividing.Spatial interpolation algorithms are applied to predict the object boundary.

Static Sensor Data
Gathering.Static sensors are deployed in the network region at first.Once deployed, their positions are fixed.WSNs are often looked on as a self-organization network [20].Static sensors communicate with their nearby nodes; then those sensors can transmit their position information to the base station leveraging network topology [21].Static sensors are limited by energy storage.To reduce energy consumption, sensing time slot is introduced.At first time slot, static sensors start to sense their surroundings and transmit data to the base station.After that they stop sensing until it comes to the next sensing time slot.
Different from dense networks with so many sensors deployed in network region, this article works on a sparse network which has deployed less static sensors relatively.So there are some sensing holes in the region.In the proposed strategy, static sensors are on a small scale deployment and we gather all sensors' data at each time slot, instead of partly gathering sensory data as mentioned in many researches.
We do not focus on static sensors' data transmission strategy mainly because many researches have worked on data transmission routing problem.In this section, we apply planar graph algorithms for building a routing map for static sensors and divided the network region.Different from the grid dividing mechanism in [22,23], the network in this article is divided into many small faces.In each face region, edge connects two nodes within a one-hop communication range.Each sensor in this map could transmit its position information data and sensory data by multihop network to base station.

IDW Spatial Interpolation Mechanism.
Once all sensors transmit their sensory data to the base station, then the data will be analyzed in following steps: (i) Based on planar graphs, a coarse boundary region BA is generated by BFs.The whole network region is divided into many subregions and static sensors are the vertexes of subregions according to planar graphs.Then BFs which have both IBNs and OBNs on their vertexes are selected and BA consists of all those BFs.
(ii) Based on the real data sensed by all static sensors, we apply Inverse Distance Weighted to generate a predicted value for each point that has no real sensing data.According to the interpolation result, we generate a curve called predicted BL where all the interpolation values are equal to the threshold.

Routing for Mobile Sensors
It is thought that sensing holes exist in the network because of the sparse static sensors deployment.After a predicted BL is generated, to reflect the truth in the curve and make a more precise object boundary area, mobile sensors are applied to round the curve.In this section, we propose a strategy of stops selection at first.The mobile sensors deployment and routing strategy are presented then.Finally, the object boundary area precision is discussed.

Stop Stations Selection.
Based on a predicted BL, we try to get the real data on it.Traversing and sensing the whole predicted BL are unpractical, and it is a common sense that trying to traverse some representative positions is effective.Mobile sensors are also with the ability of sensing and a limited sensing range.In the proposed strategy, assume that sensing range for mobile sensors is .To find some suitable stops that could mainly reflect the true situation of the curve, the distance between two stops should be appropriate.We

Require:
(i)   : Distance between a stop station   and first stop  1 .
(ii) : sensing range of mobile sensors.
(iii) : The predicted BL where a series of stops would be selected Ensure: (i) A series of stop stations on curve .(1) Randomly choose the first stop station  1 .
(2) Randomly choose the second stop station  2 from a point where points are in a 0.9 to  range from  1 .
(3) initial   = 2 (4) initial  = 3 (5) while  −1 >  do (6) find a point set PS  where points are in a 0.9 to  range from  −1 .(7) for  = 2 to ( − 1) do (8) PS  = a subset of PS  where   >  (9) end for (10) Randomly choose a stop station   from selected PS  (11) end while (12) remove the stops which are so close to the already existed stops or static sensors from the stops set.suggest the distance between two adjacent stop stations is within the scope of 0.9 and .As shown in Figure 5, it guarantees that the curve is covered completely.And a suitable distance can also reduce overlap.
Algorithm 1 is proposed to select stop stations.At first, an initial stop point  1 is randomly selected in , and the second point  2 which is in 0.9 to  range far from  1 is chosen (lines 1-2).Then a stop position   is picked from the point set PS  generated according to  −1 (lines 6-10).PS  is a point set in which points are in 0.9 to  range far from  −1 .After selection from PS  , some points remain which are not so close to already existing stop points ( , > ) (lines 7-9).Then it randomly chooses a point remaining in PS  (line 10).When a set of stop points have been selected, then it checks whether a stop is within the sensing range of another point or sensors where sensory data exists already (line 12).

Mobile Sensor Determination and Routing Schemes.
In this part, we discuss how to deploy mobile sensors and optimize the routing for them.In some applications, not only energy efficiency, but also the time constraints are taken into consideration.

Mobile Sensor Determination.
As a set of stop points have been selected, then we deploy mobile sensors to traverse all those points in order to get the real sensory data.Time constraints are taken into consideration firstly.We assume that time spending on sensing of a sensor's surroundings is instant compared with moving.So we only concern about the time consumption on mobile sensor's movement.Based on this assumption, we propose a simple method by deploying a certain number of mobile sensors to ensure that all of the stop stations could be traversed on time.
At first, an estimated distance   which links all of the stop stations is generated.  is generated by choosing a stop station and linking it with its nearest stop, then the next stop also links with its nearest stop until all stops have been linked together.Then based on the speed of mobile sensors   , an estimated total time   =   /  is calculated.According to the time constraint   , we get a minimum number of mobile sensors   = ⌈  /  ⌉.

Mobile Sensor Routing Schemes.
In terms of the number of mobile sensors, in this part, a mechanism based on a heuristic algorithm is proposed.The target of this proposed scheme is to find optimal routings for all mobile sensors.

Require:
(i) BA  : Current object boundary area.

Ensure:
(i) BA  : A new object boundary area.It requires that energy consumption and time consumption are similar for each mobile sensor.It can be formulated as a multiobjective optimization problem.Some parameters are represented as follows: (i)   is the moving distance of a mobile sensor   .
(ii)  Stop is the number of stop stations that a mobile sensor   would traverse.
(iii) EM  (  , V) is the energy consumption in movement in distance   with speed V. We assume that all those sensors have same movement ability.
(iv) ES  (data  ,  Stop ) is the energy consumption in data transmission.data  is the package of sensory data generated in a stop.
(v)   is time a mobile sensor would spend.  =   /V.The constraint is   <   .
(vi) (EM  ) represents the variance of energy consumption in a sensor's movement.
(vii) (EC  ) represents the variance of energy consumption in a sensor's sensing.
Output is a tuple which includes a series of sequence denoted as { 1 ,  2 , . . .,   } where   represents an ordered stop points array that a mobile sensor   would traverse.
The fitness function is defined as follows: where 1 and 2 are weights of two subobjects.They can adjust the importance of two subobjects.By adjusting the value of 1 and 2, we can determine the importance of two subobjects.
To solve this multiobjective and multiconstrained optimization problem, heuristic algorithm like ACO can be applied to solve this kind of issues [24,25].ACO is an evolutionary algorithm inspired by ants for finding foods behavior.It simulates the process of biological evolution to find the optimal solution.We apply it to find an optimal stops array for each mobile sensor.Through adopting ACO technique, an approximately optimal { 1 ,  2 , . . .,   } is found.

Object Boundary Area Precision.
Mobile sensors traverse alone their own routings, and they gather the sensory data of all stops located in the predicted BL.The sensory data reflects the truth in stops and it may be different with their predicted values in some stops.With more and more stops being found, We use planar algorithms to redivide the networks again; then we could get a new BA.The faces which are closed to the BL could be smaller and thus the new BA could be smaller and the shape of new BA could be more precise to reflect the object boundary.
In order to reflect the true condition around the object boundary, the previous steps are reused to get a more and more precise BL.The details are represented in Algorithm 2. Firstly, it uses existing sensory data to interpolate in current BA (line 1).Then it selects a set of stop stations in the new BL according to Algorithm 1 and deploys some mobile sensors to traverse those stop stations (lines 2-5).Based on new sensory data gathered by mobile sensors, the planar algorithm is applied to divide the network region and a more precise BA is generated (line 6).

Implementation and Evaluation
The prototype has been implemented in a Java program and a hybrid WSN is constructed.Experimental settings and results are presented as follows.1.There is a That means a position whose sensing value is higher than the threshold inside the object.In this section, the performance of the proposed mechanism is verified by different restricted conditions.

Boundary Area Precision Analysis.
In this part, we discuss the precision of BA.The impact of different planar algorithms, density of static sensors, object sizes, and distance range between stops is taken into consideration in this paper.We analyze the impact of those four factors in this part.

Impact of Planar Algorithm.
Two different planar algorithms GG and RNG are applied in this article.Figure 6 shows the variation of the shape of BA.There are 300 static sensors deployed in the area, and the radius of the object is 80 m.The blue area marks the BA of object.Compared with the initial network, the BAs with iterations are more regular and could more accurately reflect the real boundary region.And it is clear that GG and RNG result in different shape of BA.In fact, GG and RNG organize the network topology in different way, and the size and shape of their faces are different from each other.This results in a difference between the two algorithms.

Impact of Different Amount of Static Sensors.
In this part, both GG and RNG are applied to initialize the network.And the number of static sensors  ranges from 100 to 300.Figures 7 and 8 show the variation of the size of BA and the number of stop stations.In Figure 7, with the increase of time slots, the size of BA is decreased in all of the curves.And after a period of time, the tendency of each curve holds steady.And with the increment of , the size of BA is decreasing within GG and RNG, respectively.Figure 8 shows the increment of stop stations.The number of stations increases but the growth rate decreases.The reason is that more and more selected stops are located in the predicted BL and they have covered the predicted BL almost.In fact, when the number of stops is increasing, the size of boundary faces near the BL is increasing, and the number of boundary faces is decreasing.Finally, BL is covered by a narrow boundary region.9 and 10 show the simulation results.The radius of objects is set to 40 m, 80 m, and 120 m, respectively.Figure 9 shows the size of BA with the increment of time slots.Making a comparison under the same object size, GG and RNG perform differently in the BA's acreage.It is obvious that the size of BA when GG applied is mostly smaller than that of RNG in each time slot.

Impact of Object Size. Figures
Figure 10 is the result of the increment of stop stations.The number of stop stations increases with the increasing of time slot.The growth rate is decreasing but growth rates are similar in all those curves.The scales of stop stations' number are different when the radius of objects are different.The smaller the object radius is, the less stop stations it selects in the predicted BL.

Impact of Distance between Stops. Figures 11 and 12
show the simulation results.The distance between stops ranges from about 0.5 to 1.5 in increments of 0.5.In Figure 11, with the increment of time slot, the size of BA is decreasing in all of the curves.And after a period of time, the tendency of each curve holds steady.In GG, the range of BA's acreage is increasing when the distance between stops increases.In RNG, when the distance between two nearest stop stations is on a range of , the range of BA's acreage is the smallest.It is obvious that different distance ranges between stops have an influence on the size of BA.
Figure 12 shows the number of stop stations.In each curves, the number of stops increases with the time going on.And the growth rate of stop stations number is decreasing.When the distance is on a range of 0.5, the increasing of stops number are less than that of  and 1.5.And the tendency of the increment of stops when the distance between two nearest stops is  or 1.5 are similar.In fact, if there exists many selected stops near BL, it is hard to select more stops because most of related region have been detected and there is no need to detect them again.

Boundary Precision Analysis.
In this part, the precision of BL is shown and we compare the proposed mechanism with COBOM [12].The object boundary precision is used  to make comparison.The object boundary precision in this article is the proportion of boundary nodes which are close to the object boundary.If more boundary nodes are close to the real boundary, the boundary precision is higher.
Figure 13 shows the result of boundary precision under different density of node deployment.The proposed mechanism has a higher boundary precision than that of COBOM because the mechanism in this article can get the sensory data from sensing holes.Mobile sensors are deployed to move to the area without static sensors.COBOM only allows a small set of sensors to report their data; however, the network is sparse and a representative node may be far from the real boundary.The curves of COBOM have no changes.It is because the object boundary is stable.In each time slot, the status of boundary nodes is not changed.So the boundary precision is not changed once the boundary nodes are selected in COBOM.
Figure 14 shows the result of boundary precision with different distance between stops.We randomly deployed 300 sensor nodes in a 500 m × 500 m region.The distance  between two nearest stops ranges from 0.5 to 1.5.With the Time Slots increment of time durations, the boundary precision keeps stable in all curves.And they are on a high level from 90% to 98%.In fact, a well coverage with stops could increase the accuracy of detection.

Mobile Sensor Performance Analysis.
In this section, we analyze the performance of mobile sensors.After network initialization, we select some stop stations on the predicted BL.Assume that time constraint is , that means we should collect all of the sensory data before .We estimate a length  for traversing all those stop stations, and a predicted minimum number of mobile sensors is calculated based on the velocity of mobile sensors.Then this problem can be looked on as a multiple Traveling Salesman Problem, and ACO is applied to solve this problem; the objective function is to minimize the total length for all mobile sensors and to balance the length for each mobile sensor, thus balancing the time consumption.
The time constraint  is set to 50 s, and we have known that  = 5 m/s.According to  and , we implement three different sizes of object about 40 m, 80 m, and 120 m.The In Figures 16, 18, and 20, the maximum and average time consumption for mobile sensors are shown with different objects ranging from 40 m to 120 m.It is obvious that, according to the proposed scheme, there must be a suitable number of mobile sensors that could satisfy the time constraint .With the increasing number of mobile sensors deployed in the network, the maximum and average time consumption would decrease.

Related Works
There has been long-term progress on object detection and tracking research in WSNs.Recently, fog computing framework has been more and more popular in IoT applications [26][27][28][29].In [30], a mobile WSN is applied to intrusion detection, and fog computing is applied to improve the network performance.A three-tier model is proposed where  WSN is a bottom tier.Fog servers are located in the middle tier to manage the WSN and be connected to the cloud.Fog computing builds a flexible framework for gathering data.It is more close to the data source so that latency could be reduced.
In [31], a toxic gas boundary area detection scheme is proposed whose target is to detect the boundary area rather than a single boundary line.Planarization algorithm is applied into the network region and it is divided into many small faces.Then based on inner-boundary node (IBN) and outer-boundary node (OBN), they identify a boundary area.IBN is a node where the reading of the toxic gas is higher than the alarm threshold.OBN is a node where the reading of the toxic gas is lower than the alarm threshold.The characteristic of boundary area is that it has both IBNs and OBNs on its vertexes.But it does not move forward to detect the holes inside the faces.In this article, we concentrate on detecting the sensing holes by mobile sensors according to a predicted boundary line and the shape of boundary area is more precise.In [10], an energy-efficient algorithm for detection and monitoring object boundary called COBOM is proposed.They only choose a part of nodes to report to the sink node.If the current reading of a sensor is different from its previous reading, it broadcasts its reading and ID information.A node that receives the reading and information will store them in a BN-array.If its BN-array exists in different reading, it becomes a boundary node (BN).Only a part of BNs are selected to report message to the sink node, which are called representative nodes.Those representative nodes also suppress their neighbor nodes so that no significant information is discarded.In DEMOCO [32], if a node receives a message containing the same status, it ignores the message.If it receives a different message that is also different from at least one of its neighbor nodes, it is called a boundary node.Different back-off time is assigned to different boundary nodes, and if a boundary node is back early in short duration, it will suppress other nearby boundary nodes in sending messages.They are called representative nodes (RNs).Compared with COBOM, DEMOCO produces fewer BN and RN nodes and it performs better than COBOM.
Sleep scheduling mechanism is proposed to be an energyefficient way in WSNs.In [11] an energy-efficiency scheme for monitoring a large-scale object is used.At first sensor nodes send message to their neighboring nodes.A node that receives a message including different status and has the shortest distance with the sender node is called boundary node (BN).Then master boundary nodes (MBNs) are selected from BNs based on the received event messages.
MBNs are a the same concept as RN in COMBO and DEMOCO.Based on the above steps, it predicts next boundary by collaborating between MBNs.A boundary line is recognized by linked MBNs which is named the current boundary line.According to object diffusing, they draw a predicted next boundary.Sleeping sensor nodes in the next boundary zone waked up to send report.In this scheme, only the sensor nodes near the boundary area are activated to save energy.And next boundary is predicted to a precise object boundary detection.
The authors in [33] presented a sleep scheduling scheme for toxic gas monitoring.A sensor node inside the gas leakage area is selected as the zone head based on the largest residual energy by restricting flooding of the head selection message within the zone.CKN algorithm is applied to ensure global connectivity.Each awake node reports the sensing status and the grid centers covered by itself until the zone head.A awake node sends a wake-up message which contains its position, node ID, and the coordinates of the grid-points covered by itself to its one-hop sleep-neighbor.The sleep node is estimated and wakes up according to its neighbor nodes status.
In [9] a mobile element path planning for timeconstrained data gathering scheme is proposed.Data produced by measuring needs to be delivered to predefined sink within a given time interval from the beginning of the measurement.Mobile elements travel alone a predefined path and collect data.Every node should be visited, and a node-disjoint scheduling scheme is presented for searching an approximately optimal path.In our previous work [34], a WSN region is divided into many small areas: each area should be visited by mobile sensors for gathering data.Multiple mobile sensors are deployed in network: each of them is responsible for a certain subregion, and heuristic algorithms are applied for routing.
In [35] ant colony optimization (ACO) is introduced to schedule mobile sensors in consumer home automation networks.The network is partitioned into several clusters and only one sensor node serves as a CH in each cluster.A node that has a relative higher residual energy is called CH.It forms a center of a cluster by broadcasting message to other nearby sensors and gathering their data.Authors in this work only applied one mobile sensor to traverse those CHs and collect data.The mobile sensor relieves excessive consumption of part nodes and prolongs the lifetime of the consumer home network.ACO is utilized to plan the mobility path for the mobile sensor.In our work, we apply more than one mobile sensor considering the timeliness.

Conclusion
In this article, we propose to detect object boundary region through applying mobile sensors.The network is divided by planar algorithms at first.An estimated object boundary is derived through applying the interpolation algorithm.To examine whether the boundary reflects that fact, candidate sensing locations are discovered and traversed by mobile nodes for gathering sensing data.The heuristic algorithm (i.e., ACO) is applied to generate optimal paths for mobile sensors.Experimental results show that the proposed mechanism can get a precise object boundary region and can balance the energy consumption and time consumption for mobile sensors.

2 WirelessFigure 1 :
Figure 1: The network model in fog computing environment.

Figure 2 :
Figure 2: An example of static sensors distinction near the object boundary.

Figure 4 .Figure 3 :
Figure 3: (a)  shows the mechanism of generating the edge in RNG.If there exists a node  in the gray area, the edge between  and V will be broken and they connect with  , respectively.(b) shows the mechanism of generating the edge in GG.If there exists a node  in the gray area, the edge between  and V will be broken and they connect with , respectively.

Figure 4 :
Figure 4: An example of object detection model.

Algorithm 1 :Figure 5 :
Figure 5: An example of stop selection.Each stop is selected and there is a suitable distance range between two adjacent stops.

( 1 ) 3 ) 4 )
According to the data gathered by both static sensors and mobile sensors, interpolate to the BA  .(2)Applying Algorithm 1 to find a group of new stop stations.(Deploying a suitable number of mobile sensors.(Routing for each mobile sensor.(5)mobile sensors move to stop stations and get the sensory data there.(6) generating the BA  based on planar algorithms.Algorithm 2: Boundary area precision.

Figure 6 :
Figure 6: Object boundary regions of proposed mechanism.(a) shows the initial BA based on GG.(b) shows the BA after 10 time slots based on GG.The blue region in (c) shows the initial BA based on RNG and (d) shows the RNG-based BA after a period of time.

Figure 7 :Figure 8 :
Figure 7: Comparison of the size of BA when different initializations and different  are applied.

Figure 9 :Figure 10 :
Figure 9: Comparison of the size of BA when different initializations and different  are applied.

Figure 11 :Figure 12 :
Figure 11: Comparison of the size of BA when different initializations and different  are applied.

Figure 13 :Figure 14 :
Figure 13: Comparison of the boundary precision for proposed mechanism and COBOM when  is set to 300, 400, and 500.

Figure 15 :Figure 16 :
Figure 15: Comparison of the variance of energy consumption when is set to 3, 4, and 5.

Figure 17 :Figure 18 :
Figure 17: Comparison of the variance of energy consumption when is set to 3, 4, and 5.

Figure 19 :
Figure 19: Comparison of the variance of energy consumption when is set to 1, 2, and 3.

Figure 20 :
Figure 20: Comparison of the time when is set to 1, 2, and 3.