Energy-Efficient Boundary Detection for Continuous Objects in Collaborative Edge Networks

Along with a large and increasing number of resource-constrained and battery-powered smart things being deployed in networks, an energy-efficient mechanism for continuous object boundary detection is fundamental for prolonging the network lifetime. Most of the existing studies focus on how to improve the boundary accuracy of continuous objects while ignoring the energy consumption of smart things in edge networks, which may lead to some smart things being in an unusable state. To address this issue, we propose an <inline-formula> <tex-math notation="LaTeX">${E}$ </tex-math></inline-formula>nergy-efficient <inline-formula> <tex-math notation="LaTeX">${C}$ </tex-math></inline-formula>ontinuous object boundary <inline-formula> <tex-math notation="LaTeX">${D}$ </tex-math></inline-formula>etection <inline-formula> <tex-math notation="LaTeX">${M}$ </tex-math></inline-formula>echanism, namely <italic>ECDM</italic>. This mechanism consists of two stages: (i) edge-collaboration monitoring mechanism, where only sensory data relevant to toxic gas are transmitted among multi-edge networks, thus minimizing the number of exchanged sensory data involved in the detection, and reducing the transmission energy consumption of smart things; (ii) gas diffusion model is used to predict the diffusion of toxic gases, such that suspicious edge networks can be located quickly and efficiently, further reducing the energy consumption of smart things transmitting anomalous sensory data. Experimental results show that the energy consumption of <italic>ECDM</italic> is reduced by 34.5% compared to the latest boundary detection method that introduces a gas diffusion model while maintaining detection accuracy.


I. INTRODUCTION
With the rapid development of the Internet of Things (IoT) technology, smart things have been widely deployed in edge networks. Smart things can cooperate for environmental monitoring and emergency prevention [1]- [3]. Massive sensory data such as temperature, humidity, and gas concentration can be captured by heterogeneous smart things [4]. These sensory data are transmitted among multi-edge networks to determine whether an abnormity occurs. Monitoring them with smart things can reduce risk and help emergency responders respond on time. However, the scope of environmental monitoring is usually large and requires the deployment of a large number of sensor nodes. All sensor nodes perform real-time sensing, which is undoubtedly very energy-intensive. It is The associate editor coordinating the review of this manuscript and approving it for publication was Jie Tang . worth noting that most smart things are powered by batteries and hardly to be recharged. Wireless Power Transfer (WPT) is a technology that promises to extend the battery life of wireless sensor devices, but the energy transfer efficiency is low when the energy transmitter is far away from the energy receiver [5]. In [6], authors proposed to use rotary-wing unmanned aerial vehicle as energy transmitters for scheduling and periodically transmitting radio frequency signals to a set of energy receivers, which have been optimized for energy transmission. However harmful gas leaks can occur in more complex environments that are not suitable for drones. Therefore, it is necessary to study an efficient detection mechanism.
Boundary detection for toxic gas is a long-standing research challenge, and has been explored by recent works in edge networks. Traditional monitoring methods are to activate on all smart things in edge networks to monitor the surrounding environment in real-time [7]. In [8], authors proposed to activate only the head node and periodically detect the gas concentration. When the head node detects toxic gas, the control message sent by this node will activate their one-hop neighbor nodes for detection until the boundary is detected. Finally, the information from the boundary nodes will be aggregated and transmitted to the sink node. In [9], authors proposed to deploy the gas diffusion model in the cloud. When the head node detects toxic gases, this sensory data is collected and transmitted to the cloud for prediction. The boundary results predicted by the gas diffusion model are transmitted to the backbone node, which activates the boundary nodes for adjustment.
In previous work, authors considered using the sleep mechanism [8]. Only some nodes are turned on for periodic detection, which will reduce some of the network energy consumption. However, it is still necessary to keep activating nodes for real-time detection when anomalies are detected to occur. A large amount of data transmission between nodes is required, which consumes the energy of the nodes [10]. In [9], Lei et al. proposed Cloud Model-IoT Sensing Network Collaboration (CM-IoTSNC). Large amounts of sensory data are transmitted across the network, which can lead to network congestion and energy consumption. When the cloud is located far from the backbone node, it may lead to data loss and affect the detection results. In this paper, we propose an Energy-efficient Continuous object boundary Detection Mechanism (ECDM). This method deploys the gas diffusion model in edge networks. When certain smart things sense toxic gas, these sensory data are collected and transmitted among multi-edge networks for analysis. Considering the fact that the environment is usually in a relatively stable state, only under special circumstances will the leakage of toxic gas occur [7]. To reduce the energy consumption of the network, we optimize the sleep mechanism. Reduce the number of activated nodes. Based on CM-IoTSNC, the gas diffusion model is considered to be applied to multi-edge networks. Offload the prediction task to multiple edge networks to reduce the stress on the network and perform detection of continuous object boundaries through edge collaboration. The major contributions of this paper are summarized as follows: • We propose an edge-collaboration monitoring mechanism. This mechanism can shorten the transmission distance of abnormal data, reduce network energy consumption, and reduce data loss.
• We propose to combine the gas diffusion model in multi-edge networks. The gas diffusion model can efficiently calculate the boundaries of gas diffusion, reducing the number of activated smart things and the amount of data transmission.
• We propose a source leakage determination method. A network graph is constructed collaboratively by smart things and assigned different weights to represent the perceived concentration of smart things. The barycenters of this graph correspond to the location of the source leak.
Extensive experiments have been conducted and evaluated. Experimental results show that ECDM has better performance compared with other methods in terms of reducing energy consumption and network traffic.
The rest of this paper is organized as follows. Section II reviews and discusses relevant works. Section III introduces concepts and models used in the paper. Section IV describes the initial work of boundary detection. Section V introduces the energy-efficient boundary detection mechanism. Section VI describes the implementation and evaluation of the above method. Finally, Section VII concludes this paper.

II. RELATED WORK
In this section, we have summarized the features of related work applying IoT technologies to boundary detection and our contributions, as shown in Table 1.

A. BOUNDARY DETECTION
Wireless Sensor Networks (WSNs) are mainly used for individual tracking, and multiple discrete object tracking, such as vehicle tracking in the intelligent transportation systems [11], [12]. With the continuous development of WSNs, it has been widely used in continuous object detection [13]. Compared with WSNs, IoT networks add a large number of intelligent devices. They can perform preliminary processing of sensory data, thus reducing the amount of data that needs to be transmitted to the aggregation nodes and effectively saving network energy [14]. Traditional anomaly boundary detecting requires all sensor nodes to monitor the environment in real-time and transfer the sensory data to the server unconditionally, consuming a lot of energy. In [15], Kim et al. proposed energy-efficient detection and monitoring for continuous objects (DEMOCO). This method only uploads the representative node of the boundary node without transmitting all node information, which can reduce the traffic load between the boundary nodes and sink. In addition, the representative node only needs to send the information of the abnormal node. In the case of high deployment node density, this reduces the upload volume of reported messages. However, the method still requires activation of a large number of nodes before the boundary nodes are activated, and a large number of messages are exchanged between neighboring nodes. In [16], authors proposed a planarization algorithm for implementing a monitoring network that simplified the calculation of dangerous areas. The impact of 5 planarization algorithms on the accuracy of dangerous area detection is analyzed. In [8], authors proposed to divide the wireless sensor networks into grids, and each grid selects the head node for cyclic detection. The other nodes enter the sleep state. When the sensory data value of a representative head node exceeds the threshold, it activates its one-hop neighbor node, and so on. When both a node and its neighboring nodes detect a normal value, it is removed from the anomaly node. Finally, the sensing data of the abnormal node is routed to the sink node through the shortest path. Since the network is in a normal state most of the time [17], adopting a sleep mechanism can greatly reduce network energy consumption. However, the activation of neighboring nodes generates a large amount of redundant information transmission and consumes network energy. In [18], Tang et al. proposed a method of using a spatial grid index routing tree to detect continuous objects in the IoT networks. A boundary point detection mechanism based on probability density function and dominance graph is proposed for boundary point identification using edge devices and clouds. This method not only ensures high tracking accuracy but also reduces the number of exchanged messages involved in the detection and tracking process. In [9], Lei et al. proposed the application of gas diffusion model to boundary detection. First, the gas diffusion model is deployed on the cloud. Then, the terminal network node selects the head node through grid division, and the head node performs periodic detection. When the head node detects toxic gas, it activates its neighbor nodes to detect and routes the data it senses to the cloud through the shortest path. Simulation of gas diffusion by a Gaussian plume model pre-deployed in the cloud. Transmit the simulated toxic gas diffusion boundary information to Backbone node, which activates the corresponding boundary node. This method can reduce the activation of IoT nodes in the network and reduce the transmission of information between nodes. However, the amount of data processed on the cloud is large, which may cause delays. When the data transmission distance is long, packet loss may occur, affecting the simulation results and leading to errors in judgment [19].
Considering the above problems, we use a combination of gas diffusion model and edge network, which can effectively reduce data transmission between nodes. Deploying the gas diffusion model on the edge network shortens the data transmission distance, saves energy, and improves detection efficiency compared to transferring the data to the cloud.

B. BOUNDARY REFINEMENT
Determining hazardous gas boundaries is labor-intensive and dangerous. Accurate boundary information is helpful for emergency departments to take measures to avoid losses. In general, by gathering sensory data, comparing the sensory data with the threshold value, and judging the boundary of toxic gas according to the gas concentration. In [15], Kim et al. proposed to determine the boundary nodes by automatic adjustment of the sensing radius by the nodes, without using the comparison of sensory data between nodes. As the node sensing radius changes, the gas concentration value it sensors will also change. According to these changes, we can adjust the boundary of toxic gas. This method effectively reduces information transmission between nodes and can significantly save energy. However, as the node sensing radius expands and shrinks, its perception ability is constantly changing, which will lead to inaccurate detecting boundaries. In addition, when the target boundary shrinks, this method selects the nodes in the area occupied by the object as boundary nodes. However, in actual situations, the inner boundary nodes narrow the actual boundary of the continuous objects. Some of the continuous objects will be ignored, leading to poor decision-making. In [20], Park et al. proposed a continuous object tracking method considering a grid-based structure. This method creates a two-layer grid structure. The sensor network is first constructed as a coarse-grained grid structure, which allows for energy-efficient detection over a large area. Once a continuous object appears, a fine-grained grid structure is built around the continuous object within the coarse-grained grid cells. For reliability reasons, the fine-grained grid structure with tiny grid cells can provide detailed shapes of continuous object boundaries. To quickly handle the diffusion of continuous objects, the method performs fine-grained meshing in the next coarse-grained mesh cell in the direction of diffusion of continuous objects. However, if a node does not exist in one of the grids, even if the event covers the entire coarse grid, that grid cannot be selected as the boundary grid. In [13], Han et al. proposed coarse-to-fine method for refinement of the gas diffusion boundary. Filter nodes that are not beneficial for target monitoring and tracking while ensuring the general outline of the boundary. Refinement of the selected boundary nodes is then performed. This minimizes the number of boundary nodes and reduces the data exchange between nodes. In [21], Manatakis et al. proposed to use the local frontier properties provided by distributed sensors to estimate to track the boundary of an evolving continuous object. The method first filters and fuses the sparse set of available local front estimates, and then uses the resulting information to reconstruct smooth curve predictions of future time-evolving object boundaries. In [22], Trisnawan et al. proposed to incorporate mobile sensors to obtain a more accurate boundary when detecting toxic gases. However, some of the monitored areas may be more complex terrain environments, not suitable for mobile sensors to move.
For toxic gas detection, the accuracy of the diffusion boundary is critical and directly affects the decision-making of emergency responders. Therefore, we use the traditional method of comparing the sensory data with the threshold to adjust the boundary. Activate the boundary nodes predicted by the gas diffusion model and their neighboring nodes for sensing, and collect the sensory data to determine the boundary situation. This method is not the least energy-consuming but has the highest detection accuracy.

C. GAS DIFFUSION MODE
In recent years, with the rapid development of the economy, the corresponding also brought some environmental problems. The best way to deal with environmental problems is to conduct real-time monitoring to detect and deal with problems early to prevent damage. However, using a continuous monitoring approach is very energy-consuming. Applying the gas diffusion model to the detecting of toxic gases can effectively improve this problem. The gas diffusion model can quickly and accurately calculate gas diffusion. Reduce the transmission of information between nodes, thereby reducing the energy consumption of the network. Therefore, it is necessary to study a suitable predictive simulation model for gas diffusion. Diffusion modeling is a physical process that describes the diffusion of gas particles or chemicals in the atmosphere through mathematical equations. Many models exist for gas diffusion simulation and prediction. So far, the Gaussian plume model is still the most popular gas diffusion model, and it is the core of all adjusted gas diffusion models. The model has few input parameters, simple and convenient calculation method, low calculation cost, and has been widely used [23], [24]. Also, the Gaussian plume model is the basis of the computer diffusion model, which is a normal model based on statistical theory. In [25], authors used geographic grid calculations to design a simulation method for gas diffusion in complex geographic environments such as wind fields, terrain surface, dry deposition and decay of the gas, etc. It makes the gas diffusion model more applicable to complex environments. In [26], Schulman et al. proposed a new Gaussian dispersion model, the Plume Rise Model Enhancement Technique (PRIME). The technology was developed for plume rise and building downwash. PRIME takes into account the position of the stack relative to the building, the deflection of the flow line near the building, the effect of vertical wind speed shear and velocity deficit on the rise of the plume. PRIME explicitly calculates the fields of turbulence intensity, wind speed, and streamline slope that gradually decays to ambient values downwind of the building. The plume trajectories in these modified fields are estimated using a numerical model of plume rise. In [27], Izumi et al. proposed a behavioral algorithm for installing a gas sensor in a mobile robot to track the gas concentration distribution from the source and to detect the source. The algorithm adopts the insect pheromone search behavior model and investigates the air source search method based on the insect pheromone behavior model through simulation.
In summary, our boundary detection method combining edge network and gas diffusion model minimizes the number of activated IoT nodes and reduces energy consumption. Deploying the gas diffusion model on the edge network effectively shortens the data transmission distance and reduces the data transmission volume. When the edge network processes less data its processing speed is faster, reducing energy consumption while decreasing latency.

III. PRELIMINARIES
This section introduces some of the concepts defined, and the energy model and the gas diffusion model used in the paper.

Definition 1 (Network Nodes):
A network node is a tuple (id, loc, engy, r, sen, stat), where: • id is a unique identifier for each IoT node.
• loc is the location information of the IoT node, which can be obtained based on Global Positioning System (GPS).
• engy is the remaining energy of the IoT node at the current moment.
• r is the transmission radius of the IoT node.
• sen is the gas concentration detected by the IoT node at the current moment.
• stat is the state of the IoT node, the network node can have both active and sleep states. Each IoT node can be regarded as a smart thing. In environmental monitoring, the IoT node can perceive the surrounding environment information, collect and transmit the perceptual information to the edge server for further processing. When the gas concentration sensed by an IoT node is greater than a pre-set threshold, we consider the node as an abnormal node. According to the GPS of the IoT node, it can obtain its geographical location information, and then determine the specific location of toxic gas diffusion. Compared with terminal nodes, edge nodes contain more resources and have more computing power, they have higher initial energy and longer data transmission distance [28]. The edge node can manage the terminal nodes within its communication range.

Definition 2 (IoT Networks):
The IoT network is a new type of network that connects a large number of smart things [29]. Smart things in the network can communicate with each other. The IoT networks have data collection, data storage, data diagnosis, and data processing capabilities. Smart things can collect all kinds of physical data from their surroundings and transmit them to communication networks [30]. As shown in Fig. 1, the IoT networks can be divided into three layers: the sensing layer, the edge layer, and the cloud layer. Layer (a) is the sensing layer, which contains a large number of smart things, such as smoke sensors, temperature sensors, smart transportation, smartphones, and smart medical care, etc. Smart things are responsible for sensing and collecting physical data from the surrounding area. Layer (b) is the edge layer, which is equipped with edge servers and other things. Lightweight models can be deployed on the edge network for simple processing of data. Layer (c) is the cloud layer, where the cloud requires complex processing of large amounts of data. Connecting IoT nodes in the communication range in pairs can form an undirected graph that represents the IoT networks [14]. Smart things in the IoT networks can be terminal nodes, representative nodes, edge servers, etc. Different smart things contain different energy, computing, and storage capacities.

B. EDGE COMPUTING TECHNOLOGY
With the continuous development of IoT technology, more and more smart things are connected to the IoT networks, and the data generated at the network edge are increasing. Transferring huge amounts of data to the cloud platform for further processing can cause severe network congestion, resulting in network latency [31]. Especially in environmental monitoring, real-time sensing of the surrounding environment generates intensive transmission data. When dealing with emergencies, time is very precious, and the time delay needs to be reduced as much as possible. If all data processing is centralized in the cloud, this will inevitably increase the computational burden of the central cloud and make it difficult to VOLUME 9, 2021  achieve low latency requirements. At the same time, transferring massive amounts of data over long distances is affected by network bandwidth, which may reduce the accuracy of calculation results. In order to address these issues, edge computing has been proposed [32]. Edge computing, also known as micro cloud, transfers tasks such as data processing from the cloud to a closer edge network. The technology features low latency, high bandwidth, high real-time computing power, security, and reliability.

C. GAS DIFFUSION MODEL
When detecting toxic gases, it's important to determine the source of the leak and the rate and direction of gas diffusion. In previous studies, the diffusion situation of gases was determined by continuous monitoring of the surrounding environment. However, this uninterrupted detection method is very inefficient and requires a relatively high cost. Therefore, we use a suitable model to predict the gas diffusion and thus effectively reduce energy consumption.
Gas diffusion models provide great help in dealing with emergencies. Currently, some results have been achieved in the study of gas diffusion. The more commonly used gas diffusion model is the Gaussian model, which is simple, easy to implement, and easy to improve [23]. The Gaussian model analyzes the concentration distribution of gas diffusion mass based on statistical theory. The calculation process of the Gaussian model is relatively simple and close to the actual situation under stable atmospheric conditions [33]. The Gaussian model is divided into the Gaussian plume model and the Gaussian puff model [34]. The Gaussian puff model is mainly applied to the instantaneous leakage of gas to form a gas cluster. The Gaussian plume model is mainly used for gas leakage with the long-term stability of the leakage source, and its diffusion range can be calculated according to the time of leakage. This research focuses on the continuous gas leakage problem, so we chose the Gaussian plume model. By modeling and simulating the process of toxic gas diffusion, the diffusion can be predicted, provide decision support for relevant governance measures [33]. Gaussian plume model is based on the Sutton idea (1932) proposed by Pasquill (1961) and Gifford (1976), originally modeled by Paul Connolly (University of Manchester, 2017). Gas leakage is modeled as horizontal and vertical diffusion along the centerline [35]. The model is standard normally distributed when the wind and turbulence diffusion coefficients are of certain values. We assume that the wind speed is constant and along the x-direction. When the wind speed is fast enough, the gas diffusion in the x-direction is much smaller than advection, so the gas diffusion in the x-direction can be ignored, and only the diffusion in the y-direction and z-direction need to be considered [23]. The specific expression of the Gaussian plume model is as follows: where: C(x, y, z) is pollutant concentration (mg/m 3 ). Q is leakage source strength, pollutant discharging per unit of time (mg/s).
u is average wind speed (m/s).
x, y, z mean downwind distance, across wind distance and distance from the ground (m).
H is the effective height of the leakage source (m). σ y and σ z represent diffusion parameters in y and z direction.
The traditional Gaussian plume model applies to the ideal situation independent of the surrounding environment, which treats turbulence in the atmosphere as stationary and homogeneous [36]. However, environmental factors such as wind speed and wind direction can affect the diffusion of gases. Therefore, we can have made appropriate adjustments to the original gas diffusion model. Add wind speed and direction, temperature, relative humidity, and other environmental data to the model to make it more applicable to realistic situations.

D. ENERGY MODEL
The amount of energy determines the length of use of the IoT networks, which is important for the entire network. This time we chose one of the most commonly used models to calculate energy consumption, the first-order radio model [37]. The parameters in the model are described in the following Table 2.
E Tx (n, d) represents the energy consumed to transmit n bits of data to a node at distance d and E Rx (n) represents the energy consumed to receive n bits of data from the node at distance d. They can be expressed by the formula as follows: Data transmission between IoT nodes needs to consider both transmission and reception energy consumption of the nodes. Therefore, the total energy consumed for transmitting n bits of data from node i to node j at a distance of d is as follows: The energy consumed for transmitting data between nodes is different from the energy consumed by nodes for transmitting data to the cloud. Since there is no energy constraint in the cloud, the energy consumption for receiving and transmitting data in the cloud is negligible.
It should be noted that k is the transmission attenuation coefficient. The coefficient is determined by the environment in which the IoT network is located. When the transmission process is unobstructed, set the value of parameter k to 2. When data needs to be transmitted over long distances, IoT nodes are deployed in vegetation or buildings, When there is a transmission barrier, the value can be set to 3-5 according to the size of the transmission barrier [38].

IV. INITIAL BOUNDARY DETECTION
This section introduces the types of IoT nodes involved in the toxic gas detection process. The division of edge networks and the deployment of the Gaussian plume model before boundary detection.

A. TYPES OF IOT NODES
In the process of detecting the diffusion boundary of toxic gases, the following types of IoT nodes are involved.
• Terminal Nodes (TNs): IoT nodes that are randomly deployed in the detected area.
• Representative Nodes (RNs): After dividing the IoT networks into a grid, the central node is selected from the grid as a representative node. When the environment is stable, only the representative node needs to be activated for periodic detection, and other terminal nodes go to sleep. When a node goes to sleep, it no longer senses its surroundings and no longer collects and transmits data.
• Edge Nodes (ENs): After dividing the IoT networks into multiple edge networks, one node selected in each edge network is used as an edge node. Simple data processing can be performed at the edge nodes. Edge nodes contain more resources than end nodes and have more computational power than terminal nodes. The initial energy of the edge node will also be greater than the energy of the terminal node, and the data transmission distance of the edge node is also longer than that of the terminal node [28]. Edge nodes can manage the terminal nodes within their communication range.
• Boundary Nodes (BNs): The set of nodes involved in the gas boundary after the diffusion of toxic gases. The location of this part of the node represents the boundary position information after gas diffusion.
• Normal Nodes (NNs): Node set where no toxic gas is detected. It means that the geographical location of this part of the node is not contaminated.
• Abnormal nodes (ANs): Node set where toxic gases are detected. It means that the geographical location of this part of the node is contaminated with toxic gases.

B. SEGMENTATION OF THE EDGE NETWORK
Since toxic gas diffusion tends to occur over a large area, a large number of IoT nodes need to be deployed. Traditional boundary detecting methods require a large number of sensor nodes for real-time sensing and long-distance information transmission, and the nodes collaborate to complete. For sensor nodes, information transmission is the largest part of their energy consumption. And a small-scale information transmission is much more energy efficient than a large-scale communication [39]. Therefore, we divide the entire network into multiple edge networks. Edge network segmentation not only shortens the distance of data transmission but also speeds up the transmission speed of the network. Reduce loss and errors during data transmission. Each edge network is equipped with an edge server, which can summarize and analyze the data sensed by the terminal nodes, simulate with a pre-set gas diffusion model, and determine the diffusion of the gas at the current moment.

C. DEPLOYMENT OF GAUSSIAN PLUME MODEL
Deploy the Gaussian plume model on each edge server separately. Offloading data processing and boundary prediction tasks from the cloud to the edge can effectively improve accuracy and reduce latency. When a terminal node senses a gas concentration above a threshold, it transmits its sensed environmental information to the edge server. The Gaussian plume model deployed on the edge server can estimate the gas diffusion at a given moment based on the leak source concentration and the ambient conditions at the current moment. In turn, the corresponding gas diffusion boundary nodes are activated for detecting. The use of an appropriate gas diffusion model can significantly reduce the number of activated nodes, decrease communication, and reduce energy consumption.

V. ENERGETIC-EFFECT BOUNDARY DETECTION
This section is a detailed description of our proposed energy-efficient boundary detection method. Toxic gases are slowly released from the source of the leak, and depending on the surrounding natural environment, different forms of diffusion boundaries are created. When the toxic gas spreads over a large area, long-distance communication between IoT nodes is required to determine its diffusion boundary. To save energy consumption, we integrate gas diffusion models and edge computing technology into environmental monitoring. The monitoring steps are as follows:

A. PERIODIC PERCEPTION OF NODES
Algorithm 1 describes the node detection process in detail.
IoT nodes are randomly distributed in the area to be monitored. Considering that events often occur in exceptional circumstances, the monitored environment is generally in a healthy state. Therefore, we only activate Representative Nodes (RN) to sense the surrounding environment (lines 1-4), the other nodes go to sleep. IoT nodes are more energy efficient in the sleep state, which reduces the energy consumption of IoT networks. An event is considered to have occurred when representative nodes detect gas concentration values greater than a pre-set threshold. Activate its one-hop neighbor node to sense and collect data from its surroundings and aggregate the data to its corresponding edge server (lines [6][7][8][9]. To determine the coverage of the event and the source of the leakage. N is sleep and DetL.delete(N ) 12: end if 13: end for 14: send abnormal information in AbnS to ES, return abnormal node information.
As shown in Fig. 2, we randomly distribute all IoT nodes in the detected area, divide the IoT networks into multiple grids, and each grid selects only one representative node for periodic detection. The green nodes in the figure are representative nodes, which only need to be activated for periodic monitoring of the surrounding environment, while the other terminal nodes (white nodes) enter sleep state. When representative nodes A and B detect that the concentration of toxic gases in the surrounding environment is greater than a pre-set threshold, they activate their one-hop neighbor nodes (orange nodes) to monitor the surrounding environment and transmit the aggregated data sensed by the nodes to the corresponding edge server. It should be noted that when the IoT node does not detect an event, it does not need to transmit sensory data. This reduces the energy consumption caused by unnecessary information transmission, especially if the environment being tested is healthy [40].

B. IDENTIFY THE SOURCE OF LEAKAGE
The accuracy of the leak source is critical in determining the accuracy of the gas diffusion scenario simulated by the gas diffusion model [41]. However, finding the source of a gas leak can be very dangerous and difficult for humans. When multiple representative nodes sense that the concentration of toxic gas exceeding a specified threshold, we need to infer the location of the leakage source based on the toxic gas detected by the representative nodes. In general, representative nodes that have detected toxic gases can form a weighted graph according to their geographic location and the concentration of the detected toxic gases. The location of the leakage source can be determined according to the barycenters of the graph [40]. When the geographic distance of two representative nodes that detect toxic gases is less than their transmission radius, we can connect them. Two nodes are connected to produce an edge, the average of the concentrations of the two nodes is attached as the weight of the connected edge [40].
As shown in Algorithm 2, we select some of the nodes in which toxic gas nodes are detected as leak source nodes. If node N is the node where the toxic gas is detected, retrieve its edges connected to each node in the event graph and calculate the sum of the weighted values of each edge (lines 2-7). If the number of leak source nodes does not reach the specified number, add it to the sequence of leak source nodes (lines [8][9]. Otherwise, The node with the smallest sum of weights (N min )in the sequence of leaked sources is selected and compared with the sum of weights of that node (N ). If the sum of weights of (N ) is greater than the sum of weights of N min , then the node with the smallest sum of weights (N min ) in the leak source sequence is replaced with that node (N ) (lines [10][11][12][13]. This allows the location of the gas leak source to be calculated. Usually, the event source is the node where the sensed data differs the most from the threshold value. Transfer the calculated leakage source location and gas concentration information to the gas diffusion model, which can simulate the gas diffusion. for each e n ∈ E n do 5: Wn ←retrieve the weight for en from G.W

6:
Wn sum ← Wn sum + Wn 7: end for 8: if sizeOf (EvtS) < NSevt then 9: EvtS ← EvtS ∪ {N } 10: else 11: N min ←retrieve an IoT node from EvtS whose Wn sum is the smallest 12: if N .Wn sum > N min .Wn sum then 13: end if 15: end if 16: end for C. SIMULATION OF TOXIC GAS DIFFUSION When the representative node transmits its sensed and aggregated information to the edge server, the edge server calculates the geographic location and gas concentration of the leakage source using Algorithm 2 and transmits it to the pre-deployed Gaussian plume model for gas diffusion simulation. As shown in Fig. 3, the edge server can manage the representative nodes within its range, and when the representative node detects toxic gas, it can summarize and transmit the sensed information to the corresponding edge server. Input the current environmental conditions, wind speed, and direction, etc. The gas diffusion model can predict the diffusion of gases at different times, and thus obtain the boundary situation of toxic gas diffusion.

D. EDGE NETWORK COLLABORATION ACTIVATES BOUNDARY NODES
When the spread of toxic gases is large, the boundaries may involve multiple edge networks, requiring collaboration between edge networks to determine the full picture. Therefore, the geographic location information of the toxic gas diffusion boundary is routed to its corresponding edge server through the Dijkstra algorithm, and then the edge server activates the corresponding boundary node within its range to detect whether it is within the hazardous gas range. As shown in Fig. 3, the toxic gas diffusion range involves three edge networks A, B, and C. Edge network A is in the direction of the center of the gas leak, and edge server A is the first to receive the information transmitted by the representative node. When the edge server A receives the toxic gas information transmitted by the representative node, the location and concentration information of the toxic gas leak source can be calculated by algorithm 2. Inputs leak source information and current environmental information into a Gaussian plume model pre-deployed on the edge service for gas diffusion simulation. From the simulation results, we know that the boundary of gas diffusion at the current moment involves two edge networks B and C. Edge server A sends the boundary node information obtained from the simulation to edge servers B and C correspondingly. Edge servers B and C continue to activate the corresponding boundary nodes within their range and determine the diffusion of toxic gases.

E. ADJUST THE GAS DIFFUSION BOUNDARY
To check and obtain more accurate gas diffusion boundaries. After the boundary nodes calculated by the Gaussian plume model are activated by the corresponding edge servers, we activate the one-hop neighbor nodes of all boundary nodes to monitor the surrounding environment. When the node around it senses a toxic gas concentration greater than a threshold value, it is added to boundary nodes. When its detected concentration of toxic gas is less than the threshold, it is removed from the list of active neighbor nodes and put go to sleep. Through the information communication between the boundary node and its one-hop neighbor node, a more precise gas diffusion boundary can be determined. As shown in Fig. 4. The gray shaded area is the extent of toxic gas diffusion, the red nodes are the boundary nodes of the toxic gas diffusion calculated by the Gaussian plume model. We activate the one-hop neighbor node (orange node) of the boundary node. The orange node inside the red node is the inner boundary node, and the orange node outside the red node is the outer boundary node. Refinement of the gas diffusion boundary by comparing the sensory data of itself and surrounding nodes through communication between internal and external boundary nodes. Adjustment of hazardous gas boundaries by this method, although it will activate some nodes and require communication between nodes, which will cause some energy consumption. But this method is one of the most accurate methods to determine the boundary nodes. When detecting for toxic gases, the accuracy of the boundaries is critical to our approach to emergency response. The method is robust to node failure.

VI. IMPLEMENTATION AND EVALUATION
The experiment was conducted on a desktop PC with Intel(R) Core(TM) i7-3770 CPU @3.40GHz, 4GB of RAM, and 64-bit operating system. Testing performance with java programs.

A. ENVIRONMENTAL SETTINGS
We deploy IoT nodes in a 300 × 300 geographical area for environmental monitoring. IoT nodes can be distributed in an irregular state, and their skewness is different. The skewness degree of the IoT nodes is calculated by Equation 5. da is the number of IoT nodes in a dense area, sa is the number of IoT nodes in a sparse area, and sum is the total number of IoT nodes in the IoT networks. According to the deployment of IoT nodes, adjust the communication radius of the IoT nodes to ensure that the IoT network can communicate normally. Depending on the experimental requirements we can adjust the number of IoT nodes, the number of edge networks, and the skewness of the IoT nodes. The experimental parameters are set as shown in Table 3.

B. EXPERIMENTAL RESULTS AND DISCUSSION
The method was evaluated and improved by adjusting the number of IoT nodes and the number of edge networks. At the same time, compared with other continuous object boundary detection methods, the energy efficiency of this method is evaluated.

1) PARAMETERS AFFECTING ENERGY CONSUMPTION a: IMPACT OF THE NUMBER OF IOT NODES
We use a control variable approach. In the case that the edge network is determined and the skewness of the IoT nodes is certain, we set the number of terminal IoT nodes to 1000, 1500, 2000, 2500, 3000. To evaluate the energy efficiency of the method. As shown in Fig. 5, with the continuous increase of terminal IoT nodes, energy consumption is also increasing. This is because the higher the number of terminal IoT nodes, without changing the monitoring range, indicates a higher distribution density of nodes. The number of neighboring nodes for each IoT node is then increased. Therefore, in the event of a gas leakage, the more corresponding nodes will be activated, the greater the amount of information transmission and the consequent increase in energy consumption.

b: IMPACT OF THE NUMBER OF EDGE NETWORKS
In the case of a certain number and skewness of terminal IoT nodes, we set the number of edge networks to 4,9,16,25,36,49. To evaluate the energy-saving effect of this method. As shown in Fig. 6, as the edge network continues to decrease, the energy consumption first becomes smaller and then larger. The overall energy consumption of the network is relatively small when the number of edge networks is 25. This is due to the fact that the data after the gas diffusion simulation on the edge server needs to be routed to the edge servers involved in the gas diffusion range. When there are too many edge networks, the total distance grows as more nodes are routed between edge servers, increasing the energy consumption of the network. And when the number of edge networks is small, the number and distance of representative nodes transmitting data from anomalous nodes to the edge network will also increase, which will also increase the network energy consumption.

2) PARAMETERS AFFECTING DETECTION ACCURACY
Boundary detection accuracy should be guaranteed while reducing network energy consumption. In this paper, we used the traditional method of boundary adjustment by activating the one-hop neighbor nodes of the boundary nodes and adjusting the boundary based on the sensory data of the one-hop nodes. Although this method is relatively energyconsuming, it has high detection accuracy [14]. The factor that has the greatest impact on detection accuracy is the number of IoT nodes in the network. We set the number of terminal  IoT nodes as 1000, 1500, 2000, 2500, 3000 to evaluate the detection accuracy of the method under the condition that the edge network is determined and the skewness of IoT nodes is certain. As shown in Fig. 7, the detection accuracy of this method is high. As the number of nodes increases the accuracy is improving. This is because the more densely the IoT nodes are deployed, the finer the tuning of the detection boundary, and the higher the detection accuracy.

3) COMPARE WITH OTHER METHODS
In this section, the following two methods are selected as baselines for comparison with the method proposed in this paper. Each of the three methods detects the anomaly and compares the energy consumption of the process.

a: ACTIVATING ONE-HOP NEIGHBOR NODES (AONN)
This method selects the head node for periodic monitoring of the surrounding environment, while the other nodes go to sleep. When a node detects a toxic gas, it activates its one-hop neighbor node for detecting. Repeatedly, if neither the node nor its one-hop node detects toxic gases, it goes to sleep. Finally, the information of the detected toxic gas is routed to the sink node through the shortest path for summary. Toxic gas detecting by this method requires activation of a large number of sensor nodes, and the information transmitted between nodes is large, generating more redundant information and therefore consuming more energy. As shown in Fig. 8, with a certain number of edge networks and constant node skewness, with the increasing number of IoT nodes, the energy consumption of this method will be much larger than our proposed method. As shown in Fig. 9, we arrange the number of IoT nodes to 1500, as the node skewness continues to increase, the energy consumption is increased. When the number of edge networks and IoT nodes is constant, we change the size of the event. Assume that the surrounding environment information is consistent. As shown in Fig. 10, when the event continues to expand, the energy consumption of both methods is increasing. However, the increase in energy consumption of our proposed method is much smaller than the increase in energy consumption of AONN. This indicates that the greater the diffusion of toxic gases, the more significant the energy efficiency of our proposed method. This method applies the gas diffusion model to the IoT sensing networks, and its detection method is as follows: First,  the network is divided and a head node in each grid is selected for periodic detecting, and when a node detects a toxic gas, its one-hop neighbor node is activated. And its information is routed to the Backbone node through the shortest path, and the Backbone node transmits the toxic gas data to the cloud. Through the Gaussian plume model deployed in the cloud in advance to carry out the simulation of toxic gas diffusion, the simulated gas diffusion boundary information will be transmitted to the Backbone node, and the Backbone node to activate the corresponding boundary nodes. The boundary node activates its one-hop neighbor node for boundary detection and finally determines the gas diffusion. The inspection of toxic gases by this method requires the transmission of large amounts of data over long distances. When the network connection is not smooth, there may be data loss, which affects the modeling effect of the model. Simultaneous transfer of data to the cloud for simulation, which takes more time compared to simulation at the edge. When detecting toxic gases, we need to quickly understand the diffusion of the gas to help the relevant departments and reduce unnecessary casualties and property damage [3].
As shown in Fig. 8, the energy consumption of both methods increases as the number of IoT nodes continues to increase. This is due to the increased density of nodes and the increased communication between nodes. As shown in Fig. 9, when the number of IoT nodes is constant, we change the skewness of the node, the greater the node skewness, the greater the energy consumption. The uneven distribution of nodes causes the variation of information transmission distance between nodes, which in turn will affect the energy consumption. As shown in Fig. 10, when the number of nodes and the number of edge networks are certain. In the same environmental situation, we simulate the diffusion of the gas. As the radius of gas diffusion increases, the energy consumption of both methods increases. The larger the gas diffusion radius, the greater the number of its boundary nodes must increase, and therefore the energy consumed will also increase. However, the energy consumption of our proposed method will always be less than the energy consumption of CM-IoTSNC. This is because our proposed method does not need to transfer data from all anomalous nodes to the cloud for gas diffusion simulation, which shortens the data transmission distance. Especially if the cloud is far from the location of the anomalous event, our approach will be more energy-efficient. By comparing the two methods with AONN, we conclude that the introduction of a gas diffusion model has a clear advantage when performing toxic gas detection.
In summary, compared with AONN and CM-IoTSNC, our proposed method reduces the number of activation nodes when performing continuous object boundary detection. Collaborative edge detection reduces data transmission distances. As a result, our approach can effectively reduce energy consumption and extend the life cycle of the network. To ensure the accuracy of the detection boundary, we use the traditional boundary adjustment method, but this method is relatively energy-intensive. In the next work, we investigate more energy-efficient methods of boundary adjustment while ensuring the accuracy of the boundaries.

VII. CONCLUSION
The energy efficiency of the continuous object boundary detection is fundamental for prolonging the network lifetime. In this paper, we propose an Energy-efficient Continuous object boundary Detection Mechanism, namely ECDM. The method uses a combination of edge networks and gas diffusion models to monitor the diffusion of toxic gases. Specifically, the entire network is divided into multiple edge networks, and the gas diffusion model is deployed on each edge server. Representative nodes that detect harmful gases transmit abnormal information to the gas diffusion model for simulation. Simulation results are routed through the Dijkstra algorithm to the edge servers within the diffusion range of the harmful gas, activating the corresponding boundary nodes. Our proposed method effectively reduces the number of activated nodes and the distance of data transmission. Use the control variable method to compare our proposed method with AONN and CM-IoTSNC. The experimental results show that the method is effective in reducing network energy consumption when detecting continuous object boundaries. We use the basic gas diffusion model and the traditional boundary adjustment method. The result of our experiments shows that our method is energy efficient. In the future, we will adjust the gas diffusion model based on the prediction results and focus on the boundary refinement.