Abstract

At present, precision agriculture and smart agriculture are the hot topics, which are based on the efficient data collection by using wireless sensor networks (WSNs). However, agricultural WSNs are still facing many challenges such as multitasks, data quality, and latency. In this paper, we propose an efficient solution for multiple data collection tasks exploiting edge computing-enabled wireless sensor networks in smart agriculture. First, a novel data collection framework is presented by merging WSN and edge computing. Second, the data collection process is modeled, including a plurality of sensors and tasks. Next, according to each specific task and correlation between task and sensors, on the edge computing server, a double selecting strategy is established to determine the best node and sensor network that fulfills quality of data and data collection time constraints of tasks. Furthermore, a data collection algorithm is designed, based on set values for quality of data. Finally, a simulation environment is constructed where the proposed strategy is applied, and results are analyzed and compared to the traditional methods. According to the comparison results, the proposal outperforms the traditional methods in metrics.

1. Introduction

At present, precision agriculture and smart agriculture have attracted wide attentions in academia and industry, which is seen as a new means for achieving food growth [13]. As data is the foundation of agricultural artificial intelligence, big data analysis, and other applications, different data are the most important driving force for realizing smart agriculture [47]. Therefore, data acquisition and recording are the first steps towards scientific research and applications of smart agriculture. Usually, data acquisition is concluded within the network device field or sensing layer. Among the supporting technologies, agriculture WSNs are the most important ones, and they are usually responsible for data acquisition.

With the development of agriculture, data collection becomes the main key step by WSN [8, 9]. At the same time, cyberattacks of WSN are another hot topic for the researchers [10, 11]. Therefore, more and more studies focus on the topic for different perspective, especially network attacks, data collection. Concerning multiple sensor data tasks, the researchers have proposed different methods to meet the requirements from hardware [1214] and task scheduling and optimization [15, 16]. On the sensing level, these methods can be summarized into two large groups: Periodically Sensing with All Nodes (PSAN) and Effective Node Sensing (ENS). In the first group, network nodes are equipped with multiple sensors and periodically collect all data from all network nodes, as a way to handle multiple tasks. The second group consists of networks that first select task-related node and then collect the data.

Comparing with traditional WSN, multiple data collection task WSNs are still facing some new challenges [1719]. Firstly, WSNs are constrained by limited energy, low bandwidth, and limited computing and storage capability [2022]. So, there seems to deepen the contradiction between the WSN constraints and the actual requirements of multiple tasks, especially in valid sensor data acquisition. Secondly, a great number of applications become more demanding as the requirements rise and multiple tasks (especially for data acquisition) need to be concluded within one system. It means that the WSN using the traditional data collection methods will spend much time and energy for sensing and transmitting more data with invalid data, which will impact on quality of data (QoD) and latency of whole system. In summary, the two metrics become the very important metrics for multiple data collection task WSN in smart agriculture. As discussed above, the relative studies are cited in this paper, but it must be noted that there are only a few of them focusing on QoD and latency. As the current data acquisition frameworks and strategies are lacking in the consideration of these metrics, the whole system of agricultural WSNs or IoT has to spend considerable time to fuse or analyze the raw data.

To improve the QoD and meet the latency requirement of data collection, we designed an edge computing-enabled wireless sensor networks in smart agriculture and proposed a novel method including WSN node selecting, sensing parameter optimization, based on cloud computing and big data analysis. Our contributions are summarized as follows: (1)A framework of edge computing-enabled WSN is constructed taking into account QoD and data collection time constraints(2)An edge computing-enabled valid data collection method is provided, based on the nodes position, data type, and other parameters that ensure real-time execution and high QoD(3)The proposed data acquisition method is applied in a simulation environment and is compared to the traditional approaches

The paper is organized as follows. In Section 2, a literature review is given from a different aspect relating to multiple tasks in WSN and multiple sensors for data collection methods. In Section 3, a framework of edge computing-enabled WSN is designed. In Section 4, the mathematical model is constructed according to WSNs. In Section 5, a multiple data collection task algorithm is proposed based on edge computing. The simulation results are presented in Section 6. Finally, the conclusions are outlined in Section 7.

Obviously, data collection is the base for data-driven applications. In this section, we will review the existing works on multitasking in IoT and WSN sectors and on multiple sensor systems.

2.1. Multitasking in WSNs

There are a number of researchers working on multiple tasks in WSNs. In [23], to avoid transmission of multiple task data through the same routing path, the authors proposed node weights-driven task allocation algorithm, based on the framework of SD-WSNs (software-defined wireless sensor networks). In [24], by considering a minimum energy consumption and multitask scheduling in SDSNs (software-defined sensor networks), the authors build a MILP (mixed-integer linear programming) formulation to deal with the problem of multitasking; an online strategy is proposed, based on local information to solve the dynamic task issue. In [25], an overlapping coalition formation strategy was designed to deal with multitasking in WSNs. Based on this strategy, the authors developed a cooperative and competitive ant colony to solve multiple task scheduling. In [26], based on the sharing of sampled data for multiple tasks, the author proposed an algorithm for solving multiple tasks and scheduling the sampling intervals in WSN. Next, a real-sized testbed was constructed, where it was demonstrated that the proposal could reduce energy consumption. In [27], the authors presented an adaptive negotiation process to configure the WSN resources, based on the QoI (quality of information) network capacity. Moreover, the WSN multiple task management approach, in a dynamic environment, was studied. Extensive research has successfully proved the feasibility of multiple tasks in data collection by wireless sensors networks. However, few studies are focusing on the data quality of multiple tasks, considering also the low latency of data acquisition.

2.2. Multiple Sensors for Data Collection

For WSNs, an important issue is the sensing capacity of every node. Multiple sensors mounted on a sensing node are the best option. Only a few studies have focused on this issue, in the literature. In [28], the multisensor data collection system of evapotranspiration was built among wine grapes grown in a Mediterranean climate, and data were collected with the new thermal infrared sensor system. In [29], multiple sensors (CO, CO2, smoke, air temperature, and relative humidity) were integrated into one node of WSN to detect forest fire. Then, an experiment was conducted, where burning materials from a residual of forest were used to test responses of each sensor node. In [30], a multisensor WSN was adopted to underground channel conditions in coal mines, where multicarrier code division multiple access (MC-CDMA) was developed, to make full use of network resources. WSN sensing value would degrade after long periods of use; therefore, in [31], for enhancing the accuracy of multisensory measurements, a method, based on interval voting, was presented. In [32], a multisensor WSN system is used for high-resolution thermal monitoring of vine responses to summer abiotic stresses.

Most work focuses on data fusing or multisensor WSN-specific applications. However, none of the existing works jointly pays attention to the quality of sensing data and data acquisition time. Therefore, our work, based on multisensor WSNs, focuses on a strategy for sensor data quality, under multiple sensing task conditions, with low latency constraints.

3. Framework of Edge Computing-Enabled Agricultural WSN

In this section, a framework of edge computing-enabled agricultural WSN is presented; meanwhile, the working mechanism is discussed.

It is known that traditional WSN for multiple data collection tasks has some drawback such as invalid data, which is harmful for data transmission and processing because of more energy, bandwidth, and time being spending for invalid data. Therefore, we could control the QoD for data source that is the sensing layer of WSN. Recently, the edge computing technology has proved an effective assistance for WSN. To improve the computing ability and intelligence, the edge computing and other components are introduced into the traditional agricultural WSN for building a new framework. The presented architecture includes three layers, WSN, edge computing layer, and application layers, as demonstrated in Figure 1. While all layers are highly interconnected by wireless and wired networks, edge servers are deployed near to WSN nodes for providing computing services.

The working processing of the framework is explained as followings: Firstly, the multiple data collection tasks are issued to edge server or WSN nodes according to the real requirement from application layers. Then, edge server analyzed the tasks and get the tasks sensing parameters considering the filtering the invalid data. Moreover, WSN nodes finish the data collection after receiving the sensing parameters for the corresponding edge server. Finally, WSNs transmit the collection data to edger server or cloud.

4. System Mathematical Model

In this section, the mathematical model of a multitask data acquisition system is presented.

For simplifying the mathematical model, the following assumptions are here: (1) WSN topological structure is fixed, and WSN node is equipped with multisensor and adopts the serial sensing method; (2) the data rate is constant; (3) the sensing time of each different sensor is fixed; and (4) the sensor weight of each task is constant. A multisensor WSN is operating the monitoring area , and the multisensor WSN has sensors. Let be the set of nodes. For any node , the location is . Let be the set of sensors in the system, , where is the number of WSN sensor. Meanwhile, every node has not been mounted with all of sensors. Therefore, for any node and any sensor , the node connecting to sensor function is given as where means node connected to sensor .

Let TA be the data collection task: , with task weight vector . The task weights meet constraints with the following formulation

Every task occurs within a fixed region . Assume that every task region is independent, and it is described as follows

It is known that different sensor types have different weights for the task . So, we can create a weight vector for and sensor set , formulated as the follows where is the weight value of the sensor for the task . Also, the sensor weight for task matrix can be formulated as where the row denotes tasks and the column denotes sensor.

Assume that multitasking will randomly occur in the monitoring area , during a limited time. The incidence matrix () shows the relationship between and TA. The first class is and the second is TA; the matrix has one row for each element of , and one column for each element of . The entry in row and column is 1, if and are related, and 0 if they are not. According to the above assumptions, the incidence function of task and node can be expressed as

Furthermore, the incidence matrix () between task and node is formulated as follows where the node is the row and the task is the column of this matrix.

Data acquisition time must be less than the limit time in the light of a real application. We propose the following definition and analysis.

Definition 1. Data collection time (DCT) is from the time point where multisensor WSN node sensed the data to the time when the data server received all the data.

According to the definition of DCT of multiple tasks, for each node contains node sensing time (), data transmission time (), and queue waiting time () in data server, as shown in Equation (9)

Especially, the DCT for of the sensor node for the task is described as where is the -th sensor sensing time of node for the task , is the data volume of WSN node for the task , is the communication speed of WSN, is the waiting time during the wireless communication, and is the network route hop number for delivering the data to the server of node . Furthermore, it is known that the DCT of the task is determined by the maximum . Let be the data collection time for task , defined as

Meanwhile, the energy consumption of this strategy is given by where are the power consumption of sensing, communication, and waiting time for a task, respectively.

Definition 2. QoD (quality of data) index is the ratio of the valid data to the sum of collected data, for each task. Therefore, the QoD index of the task is defined as: where is the valid data of task and is the sum of collected data of WSN for the task . Therefore, the total QoD index of the multitask can be formulated as:

It is known that the task-driven model is sensitive to DCT. So, in this paper, we focus on the time as the main metric. Meanwhile, energy consumption is closely related to the DCT, which contains transmission time, waiting time and sensing time. This means that more DCT leads to higher energy consumption. So, we regulate DCT accordingly, as to limit energy consumption. The problem of maximum QoD of can be formulated as

In Equation (15), the data collection time must meet the constraint of being less than the task assigned timeframe .

5. Edge Computing-Driven Sensing Algorithm for Valid Data

In light of the assumptions (1)-(4) and Equations (3) and (4), every task is independent. Therefore, the problem as formulated in Equation (15) can be simplified to searching the maximum QoD of each task, respectively. This is formulated as

Definition 3. Node correlation degree (NCD) is the product of the node (), incidence (), and sensor total weight for task . In addition, according to the problem analysis, we can use node correlation degree to demonstrate the QoD. For this purpose, the node data weight is defined as

So, the subproblem, as defined in Equation (16), can as formulated as

In other words, we can delete the irrelevant or less relevant nodes and sensor data, in order to improve the quality of collected data, while the respective task is completed within its assigned timeframe. The DCT can simply be limited to the number of valid WSN nodes and their sensors.

5.1. Framework of Our Proposal

According to the above analysis, we can conclude that two factors are impacting on the data weight: multisensor WSN nodes and sensors. Therefore, we propose a two-step approach, as shown in Figure 2. The proposal outline is as follows: First, when the multisensor WSN is created, every node transmits the parameters to the edge computing server platform (such as location and sensors). Second, the edge computing platform calculates the weight of the sensor data for a specific task by using Algorithm 1. Third, when multitask occurs, the edge computing platform selects a sensor node, according to its location and then in light of the sensor weight. Finally, the WSN system completes the data communication and collection. In general, the applications (multiple tasks) directly connect to the edge computing platform by wired/wireless networks. In addition, all nodes parameters are stored in edge servers. Therefore, the edge servers can calculate the results according to the global information.

5.2. Edge Computing-Driven Sensing Strategy for Multiple Sensors

According to the analysis of Section 5.1, where the details of the main steps of our proposal are described, WSN node and sensor selection strategy is outlined in Algorithm 1.

Initialization: Input V, S, TA, W, , X
Output:
begin
for
  for
     //selecting WSN node by location
   if
    
   else
    Break;
  Create the sensor weight matrix W.
  if //selecting WSN node by valid sensor.
   
  for
   for to N
    Compute
   Compute
    
   if //selecting WSN node by task deadline
    
   else
    Break;
  

The algorithm can be divided into the following steps. The first step is the initialization of the parameters at set values. Meanwhile, a temporary WSN node set is selected for task based on whether the node location is within the task region. The second step is to delete the multisensor WSN node that does not contain the incidence sensors. The third step is to compute the sensing time and transmitting time, according to Equation (10). Then, according to the time limit, an optimized WSN node that deals with the multitasking is reselected. At last, return the optimization sensor node set for task .

6. Simulation and Results

In this section, a simulation platform is set up, where the proposed approach is evaluated and compared to two classic sensing strategies, PSAN and ESN.

6.1. Simulation Setup

We evaluated the performance of our approach in MATLAB. Figure 3 shows the flowchart of simulation. The simulation mainly includes the following steps: initialization, WSN deployment, task occurring, and data collection. Finally, we can get the result after the simulation running many times. The details of the simulation are as follows. The WSN platform contains 1000 sensor nodes in the WSN. Every node is connected with 10 sensors. Five tasks occur in different spatial domains. Every task area covers a fixed number of sensor nodes (10-100), while a valid sensor number ranges between 1 and 10.

The following assumptions, for the simulation scenario, are made: (1) the sensor nodes are isomorphic, (2) all sensor nodes are equipped with the same number sensors, (3) all nodes are uniformly deployed on the simulation platform, (4) the sensing time is a constant value,and (5) the data rate is a constant value. After 10 iterations, the average evaluation results are produced. The details of the other involved parameters are listed in Table 1. Next, we compared the proposed strategy ECDSC (edge computing driven for sensing control) with the current popular methods: Effective Node Sensing (ENS) (the incidence node sensing of the data) and Periodically Sensing with All Nodes (PSAN). Three metrics are used to evaluate the performance: (1) latency (including communication latency and DCT); (2) energy consumption (EC): the energy used for sensing, transmission, and waiting; and (3) quality of data (QoD).

6.2. Result Analysis

Communication latency and DTC are used to evaluate the latency of the proposed algorithm. Figure 4 shows the results for latency at different data rates and included node number. The average communication latency in the different methods producing the best results, at various data rates, at 4 as valid sensors number and every task area including 10 sensor nodes, is shown in Figure 4(a). As demonstrated, the value of communication latency of the three methods decreases as the data rate increases, because a higher data rate can reduce the data transmission time. Figure 4(b) demonstrates the results of DCT for various covering node numbers. The DCT will increase in ECDSC and ESN, while the PSAN demonstrates nearly the same DCT values. In comparison, our proposal gives the minimum communication latency and DCT value at different data rates and included node number, as in this approach, the valid data will be collected and delivered in networks, thus effectively limiting the invalid data for each task. The PSAN approach demonstrates the maximum communication time and DCT, due to the fact that all nodes and sensors data are collected from the WSN. Due to the fact that ESN uses selected part sensor nodes, instead of completed tasks, it can achieve a better performance in communication latency and DCT than PSAN. Specifically, as shown in Figure 4(a), when the data rate is 50 Mbps, the ECDSC can reduce communication latency by more than 10% and by 20% compared to ESN and PSAN, respectively.

Quality of data is the best metric for multiple task WSN. The comparative results for the average quality of data are demonstrated in Figure 5, for various valid sensors and included node number, at a fixed deadline timeframe of 10 s. It is known that the ECDSC will get 100% QoD for various valid sensor numbers, as a valid sensor, network node, and timeframe are considered in the strategy. Similarly, ESN demonstrates better performance than PSAN. As shown in Figure 5(a), when the valid sensor number is 6, for each WSN node, the QoDs of ECDSC, ESN, and PSAN is at 100%, 60%, and 12%, respectively. As shown in Figure 5(b), when the included node number increases, the QoD of ECDSC and ESN will maintain a constant value, while QoD of PSAN will increase. This means that ECDSC can collect more valid data than other methods.

The comparison of energy consumption in various valid sensors and covering node numbers is presented in Figure 6. Obviously, when the data rate is 10 Mbps and the number of valid sensors increases, the energy consumption of ECDSC also increases, as demonstrated in Figure 6(a). The same trends are shown in Figure 6(b), for various covering node numbers. This is due to our approach adopting the selecting method strategy, according to valid sensors and nodes. Meanwhile, it is shown that the PSAN reaches the maximum energy consumption and operates on a constant maximum energy consumption level. Our proposed strategy demonstrates the best performance of the three methods. As ESN and PSAN do not consider the valid sensor in their algorithms, ECDSC outperforms them, in the aspect of energy consumption.

7. Conclusions

An edge computing-enabled multiple data collection task strategy for WSNs is presented in this paper, aiming to achieve a higher volume of valid data and a lower data collection time. First, we develop a framework for WSN by merging the edge computing and model the data collection for multiple tasks and sensors in a WSN. Then, different tasks are completed at a lower data collection time, by a selecting WSN node and dynamic configuration of sensor nodes that close/open sensors according to the concrete tasks, within a set timeframe, by exploiting the edge computing. Finally, with the aid of simulation, the performance of the proposed WSN data collection strategy is evaluated and compared to the traditional methods. The results show that the proposal outperforms the traditional methods, in aspects of data collection time, quality of data, and energy consumption.

We evaluated the framework and strategy in a simulation environment, and the results reflected success in different aspects. In the future, we plan to implement the proposed framework of edge computing-driven agricultural WSN and data collection algorithm in real agricultural environment.

Data Availability

The data used to support the findings of this study are available from the first or corresponding author upon request.

Conflicts of Interest

The authors declare there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

The paper is supported by the Natural Science Foundation of Guangdong Province of China under Grant 2019A1515011346 and the Key Area Research and Development Program of Guangdong Province of China under Grant 2019B020223003.