Trust-3DM: Trustworthiness-Based Data-Driven Decision-Making Framework Using Smart Edge Computing for Continuous Sensing

Mobile Edge Computing (MEC) has been proposed as an efficient solution for Mobile crowdsensing (MCS). It allows the parallel collection and processing of data in real time in response to a requested task. A sensing task can be one-time or continuous, with multiple readings collected over time. Integrating MEC and continuous sensing in MCS is challenging due to many factors, including workers’ mobility, edge node placement, task location, Reputation, and data quality. In addition, guarantying cooperative communication in the presence of Anomalous data while maintaining a high quality of service (QoS) is a fundamental issue in continuous sensing. A stability-based edge node selection and anomaly detection-based decision-making framework for worker recruitment in continuous sensing is proposed to address these challenges. It can a) Select the most stable edge nodes in the area of interest (AoI), b) Dynamically cluster the workers according to their movement in the AoI, c) Locally detect and eliminate anomalies within the sensing data, and d) Adopt a feedback mechanism that ensures the cooperation between the edge nodes to eliminate untrustworthy workers in the whole sensing period and future tasks. A real-life dataset is used to evaluate the efficiency of the proposed framework. Results show that the framework outperforms the baselines by achieving higher QoS while introducing lower delay, energy consumption, and less resource consumption.


I. INTRODUCTION
With the emergence of edge computing, handling heterogeneous data sources in crowdsensing has become a priority. Collecting data from multiple sources may produce low-quality data caused by device characteristics, environment change, and poor workers' commitment to complete the sensing activity. Also, the limited energy provided by the device battery restricts the usage time, especially for big data processing [1].
The associate editor coordinating the review of this manuscript and approving it for publication was Wenbing Zhao .
However, the task computation intensity determines whether a task can be executed locally or offloaded remotely in single or multiple MEC servers [2]. Locating edge devices close to the data source makes it a powerful solution for handling complex tasks with a fast response time and timely computation [3]. Using parallel computation, MEC is considered an optimal solution for real-time applications while providing high optimization of communication performances and services [4], [5]. An Edge node can be a decision-maker that applies some assessment, detection, or prediction strategies to the sensed data from the workers [6]. The Edge node, deployed as a local or global entity, can play an important role in propagating information between different entities at VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ the same level, not only between the user and the server as in traditional work [7], [8]. It can ensure cooperation on multi-levels that can be edge-to-edge or edge-to-server communications to avoid spreading malicious behavior. Because of prominent features of mobile edge computing (i.e., the mobility of edge node), traditional approaches may obtain less accurate data collection [9] in the MCS environments. The frequent change in the MCS ecosystem leads to the edge nodes' disconnection. The data can become staled or uncompleted or completely forbid the edge nodes from disseminating the collected information to the server or the end-users.
Moreover, the mobility of the workers modifies their distribution and availability in the AoI. In this case, a set of changes may occur, including communication interruption, redundancy, poor coverage of the AoI, and an unbalanced distribution of workers. These problems lead to additional challenges in answering the requirements of the sensing task. Therefore, the primary question this work addresses is: How to select the most stable edge nodes and dynamically place them in the AoI as local edge nodes to be adaptive to the workers' movement?
In such a dynamic environment, another key factor must be considered to achieve the required quality: cooperation between edge nodes.
On the other hand, cooperation refers to the coordination that edge nodes/servers can establish to leverage the decisionmaking process. This cooperation can happen at multi-levels to avoid disseminating malicious, faulty, or inaccurate data. Typically, a worker moving from one cluster to another can keep transmitting anomalous data if no edge node communication is planned to disseminate data and flag any abnormal behavior. Another question remains in this purpose which is: How to ensure the cooperation between edge nodes to avoid the spread of anomalous behavior, represented by workers moving in the area of interest and connecting to different edge nodes during their travel?
The importance of MEC in MCS is even more prominent when it comes to continuous crowdsensing. In this paradigm, workers are supposed to sense and send their readings many times over the sensing period, which generates an increased volume of data and causes communication overhead. In contrast with one-time sensing, where the data can be processed offline, continuous sensing requires a real-time data assessment to a) avoid unnecessary/incomplete data, b) detect anomalous readings, c) and cooperate with edge neighbors to stop the spread of anomalies or the selection of untrustworthy workers in the next time slot.
In the literature, many techniques have been proposed to assess the sensed data in MCS based on different data dimensions (e.g., radical, contextual, representational, etc.), data timeliness (e.g., latency, delay, and Age of Information which measures the task-oriented timeliness of packet delivery [10], [11]), and user perspectives (e.g., information inaccessible, insecure, error, irrelevant, inconsistent, etc.). In continuous crowdsensing, this assessment can further guide the next rounds of sensing. Additionally, crowdsourced data generally comes from multiple sources. While data coming from a single source may preserve its integrity and keep its desegregated form. However, data coming from multiple sources may lose its integrity and necessitate more consideration to detect inconsistencies. This would require an efficient data aggregation and analysis approach across all sources [12].
In MCS, trustworthiness is mainly related to the worker or the sensor's behavior. A worker is trustworthy when he is highly committed to the assigned tasks. In contrast, a sensor is trustworthy when it provides accurate data or data with only slight perturbation and noise. Consequently, an anomalous sensor is a sensor that exhibits abnormal behavior or provides inconsistent readings. MCS systems are vulnerable to many data attacks, including (i) Data Corruption, which occurs when data loses integrity and becomes unusable or inaccessible to the user or the application [13] [14], and (ii) Data Exfiltration, which refers to any unauthorized transfer of data from one device to another [15], [16], and (iii) Data Disruption that occurs when a user loses access to its data for many reasons, such as viruses, software problems, hardware malfunctions, or even when the network is down, or the connection is lost [17], [18].
By considering these challenges, the research question that can be raised is: How to continuously select the workers in the AoI while assessing in real-time their trustworthiness based on the quality of their provided data?
To address these research questions, Trustworthinessbased Data-Driven Decision-Making using smart Edge Computing for Continuous Mobile Crowdsensing is proposed (Hybrid-based approach). This framework is built on top of OffSEC architecture [19] and thrives on maintaining high data quality in continuous sensing in the presence of Multi-source data inconsistency. The latter refers to any abnormal data or high outliers caused by faulty sensors, users' mobility, connection loss, or even sensors specifications related to manufacturing. Also, it can be conducted by untrustworthy users who falsify the data to get benefits from the framework, such as payment or an increase in Reputation.
The main contributions this work provides are: • Maximize AoI coverage while maintaining a continuous sensing process by deploying a stability-based EN selection using a location-based filtering method.
• Maintain a high QoS over the sensing period and tasks by selecting the best workers in terms of QoS using a greedy-based algorithm.
• Detect the non-stationary data-based anomaly using a non-regressive mechanism and classify selected workers as trustworthy and untrustworthy according to their provided readings with the overall outcomes.
• Ensure cooperation between edge nodes by deploying a feedback Mechanism based on the worker's flag and Reputation update.
A real-life dataset is used to evaluate the efficiency of the proposed framework. The results are obtained at three levels: variation over time, over tasks, and the whole sensing period for all tasks. In conclusion, the proposed framework outperforms the baselines by achieving higher Quality of Service (QoS) while introducing lower delay and energy consumption.

II. RELATED WORK
Recent research has highlighted the crowdsensing challenges concerning network heterogeneity and data quality. However, these challenges are affected by 1) the type of sensing, one-time vs. continuous sensing, 2) Spatiotemporal crowdsensing entities distribution, and 3) worker's behavior. If data quality does not satisfy the task requirements in one-time sensing, it cannot be changed since it is already collected. In contrast, continuous sensing can improve data quality over time by discriminating the problem source.
A. ONE-TIME VS. CONTINUOUS SENSING One-time sensing could be an optimal solution for offline operations as training, testing, and assessing the data collected by the workers. Authors in [4] proposed a two-stage Data-Driven Decision-making Mechanism using smart edge computing (Smart-3DM). A group of workers is considered task domain-specific based on their outcomes. The group that provides high-quality data is considered for final selection and sends its collected data to a central edge node for extra processing. Multiple selections are processed locally by local edge nodes (LENs) and globally by the main edge (MEN) to reduce data computation complexity and increase data quality while attaining the task target. Similarly, one-time sensing is proposed in [19]. The authors adopted a distributed architecture (OffSEC) that offloads the server by assigning the selection of the workers to the edge.
The proposed approach overcomes the centralized MCS platform by improving the quality of selected workers while preserving the cost. The data is updated over time, and some workers can show some disloyalty to completing the task. However, opting for continuous sensing can be a good solution to overcome those challenges.
The authors [20] proposed a novel recruitment system for continuous sensing based on group stability (Stable-GRS). The most stable group of participants that provide a high quality of information (QoI) is selected using a genetic algorithm by considering the worker's mobility. In this work, stability refers to the availability of a workers' group in the AoI over the sensing period.
The proposed framework provides high QoI while saving costs compared to the individual-based recruitment system. Similarly, a privacy-preserving dynamic pricing mechanism is proposed [21]. It considers the participant's sensing quality contribution while preserving the total cost allocated for participants' recruitment. The entire cost is then optimized using the reinforcement learning technique after assessing the aggregated data provided by the workers, where only high-quality data is considered.

B. SPATIO-TEMPORAL MCS DISTRIBUTION
In addition, considering the Spatio-temporal distribution of the workers is very important. Every requested task depends on a specific sensing period/time slot and location. However, the workers' movement in a particular AoI can decrease the probability of the worker's commitment to completing the task.
Crowdsensing is location-based, and many attacks can be produced when sensing the data. The authors [22] proposed a smart strategy for attacks' location identification to deal with this attack. It relies on a local configuration of the Self-Organizing Feature Map (SOFM) algorithm to locate where the fake tasks are centered. The improved version of SOFM is compared to the original one, which shows that it can achieve high detection accuracy while preserving resource consumption.
Similarly, the authors [23] involve the impact of the incentive mechanism on the workers' behavior. First, the authors used the Perturbed game theory model to estimate the impact of incentive mechanisms on worker behavior while predicting their mobility patterns. Then, they deploy a distributed approximate algorithm that dynamically selects the participants according to their mobility patterns. They use different incentive strategies such as Hybridbased-first, profit-first, and energy-efficient-first incentive mechanisms.

C. WORKER's BEHAVIOR
In MCS, the workers' Reputation is an important parameter that can be used to evaluate the trustworthiness of the data. Considering the fused data can help identify anomalous workers and improve data quality. The authors [24] propose a reputation-aware data fusion algorithm (CDR) that applies the Gompertz function to rate the trustworthiness of the reported data dynamically. The algorithm calculates the Reputation by evaluating the cooperation and reputation parameters of the correlated sensors. The space and time are discretized into sub-regions and epochs to assess the sensors. The proposed approach provides less Root Mean Square Error (RMSE) than the benchmarks leading to increased data prediction accuracy.
Similarly, a mathematical model for evolutionary dynamic sensing behaviors uses multiplex EGT [25]. The user's behavior is incorporated into the system by evaluating their contribution to QoI and social honesty using evolutionary dynamic and statistical measurements, respectively, and integrating an incentive mechanism that considers the users' reputation scores. The proposed system accurately discriminates user behavior in MCS environments compared to the baselines.
Another problem in MCS platforms is the cooperation between different MCS entities when using D2D communication. The authors [26] proposed a multicriteria decision system that switches between different communication modes, infrastructure, or D2D, relying on a reputation-based incentive mechanism to motivate users' cooperation. The proposed work allows for achieving a high offloading ratio compared to a centralized platform. However, the participants can also react selfishly or rationally when collecting or transferring the data. The authors [27] propose a Hybrid-based-aware task allocation policy relying on a stability monitoring scheme that uses an online control strategy based on the current information to maximize social welfare and ensure network stability balance.

A. ARCHITECTURE MODEL
The proposed model is deployed on our pre-built architecture called OffSEC. It is a multi-layer edge-based framework consisting of an edge server, edge nodes, and workers. The edge servers are responsible for initiating or accepting incoming sensing tasks, clustering the connected edge nodes, and allocating edge nodes' responsibilities. Edge nodes have two distinguished roles: local edge nodes (LENs) and the main edge nodes (MEN). LENs offloads the server by recruiting optimal workers and ensuring parallel computation of the collected data. MEN are the nearest LEN to the task with extra computational power. Each MEN, in addition to its role as LEN, aggregates the overall data from the neighboring LENs and reports the outcome to the edge server. Finally, the workers collect information using their devices and report their outcomes to the closet LEN. Figure 1 illustrates the continuous selection process. The proposed solution is a multi-layer framework where: • First Layer Consists of selection and clustering of ENs by edge server.
• Second Layer Consists of local worker selection and data assessment offloaded by the edge server to LENs (steps 1-6).
• Third Layer Consists of MEN decision-making and the feedback mechanism (Steps 7-10).

1) TASK MODEL
The edge server defines the requirements for task t j over a sensing period, where a task is fulfilled when the sensing period is timed out. A sensing task is defined as j is the task coordinates, S T j is the set of needed sensors, K is the number of required workers, QoS T j is the minimum required QoS per worker. However, the quality of data is evaluated in real time, where the selected workers within a cluster should provide consistent data that is not presenting any abnormal value.

2) MOBILITY MODEL
In the AoI, the workers move following a random mobility model. At each time epoch, the worker at location (X, Y) randomly moves toward the newly chosen direction to be reached at time t + 1. However, some participants can stand in one location for a short period, defined as ''pause time.'' During this time, the speed associated with the worker is equal to 0. A dataset containing the vehicular mobility trace of the city of Cologne, Germany, is used to model the workers' mobility. It consists of participants' IDs, locations, and speed at a specific period [28], [29].

3) COVERAGE MODEL
Considering the mobility of the workers in the AoI, selecting the most stable edge nodes is a requirement. First, the edge server creates a list of preferences based on the availability shared by potential edge nodes during the sensing period. Also, only edge nodes that maximize the coverage of AoI are considered. To evaluate the coverage achieved by a set of edge nodes, the AoI is divided into identical sub-regions with similar dimensions. A sub-area that contains at least one EN is considered covered and uncovered otherwise. The GPS location of EN is used to locate their related sub-regions. To validate the proposed framework, a set of parameters are considered, described as follows: • AoI boundaries: (4000 to 25000) × (4000 to 25000) • AoI is divided into 25 identical sub-area • Sensing period: (21600 to 21630) The edge nodes coverage is evaluated as follows: where: • Coverage is 1 when each sub-area in the AoI is covered by at least one edge node.

4) QUALITY OF SERVICE (QoS) MODEL
To fulfil the requirement of the sensing task in terms of QoS while selecting the optimal worker, each LEN considers the expected QoS required to execute the task. It is used as a selection condition that reflects a worker's ability to perform the sensing task. Only workers that possess QoS Cr i (where i is the worker and Cr refers to its related cluster) greater or equal to the expected one are included in the selection process. The QoS Cr i is computed using the worker's reputation (R w i ), sensors availability (SA w i ) in the worker's device, the propagation delay Dp L i and the propagation energy Ep L i . The QoS Cr i is a weighted sum equation where the weights w 1 − w 4 reflect the metric's importance and are calculated using Eq (2): where: 4 i=1 w i = 1 and 0< w i <1. The sensors availability is calculated as follows: where m is the number of sensors available in a worker device, all variables are listed in Table 2.
The propagation delay is the time a LEN spends to forward the task to the workers within a cluster. It is calculated as: where Dist (W i , LEN ) is the distance between every worker and its related LEN. The propagation energy is the energy spent to deliver the requested task to the workers. It includes the energy consumed by a LEN in full power mode (CPU) and the transmit power spent during the offloading of the task [30]. It is calculated as follows: where P I is the idle power of mobile devices.

5) REPUTATION MODEL
Reputation is updated at the end of each time slot; it measures the ability of a worker to provide accurate data over time.
The cooperative score is calculated according to the worker's outcomes. A faulty contribution of the worker leads to a cooperative score equal to 0, otherwise is equal to 1. The Reputation is then updated as follows: (6) where 0 < α < 1 In the proposed framework, the MEN is responsible for reputation updates and distribution to the neighboring LENs. The LENs then considers the updated Reputation of the workers in their next selection for future time slots and tasks. VOLUME 10, 2022 B. SYSTEM REQUIREMENTS To simulate continuous sensing, a task is fulfilled after the sensing period is over. The sensing period is segmented into slots with equal intervals of 1-second duration. The total sensing period per task is set up to 30 seconds. At a specific time slot, the Reputation of the selected workers is updated and considered in the next time slot when another set of workers is selected, ensuring the sensing process's continuity over time, and satisfying the cooperation goal between LENs through the MEN. However, once the sensing period is over, the new workers' reputation updates are sent to the server to be considered in the following tasks.
To model the proposed framework, a set of requirements are considered to select the most stable ENs that play the role of LENs and MEN, presented as follows: 1) For the LENs • A worker should satisfy the task requirements in terms of QoS In the AoI, four types of workers exist: Connected workers moving out of the AoI, Connected workers moving within the AoI, Non-connected workers moving out of the AoI, and Non-Connected workers moving within the AoI. As illustrated in figure 2 the most stable edge nodes are those moving within the AoI.

IV. PROPOSED APPROACH
This section describes the framework Establishment steps and continuous selection process.

A. STABILITY-BASED EDGE NODES
A stable communication between edge-to-server and edgeto-workers in a mobile environment should satisfy criteria related to the edge nodes' movement in the AoI during the sensing period. In this work, edge node stability is considered. The most stable edge nodes available in the AoI during all the sensing periods are selected and added to the preference list as potential LENs. The AoI is split into several sub-area. The edge nodes that cover most sub-region and move within the AoI while being available during the sensing period are recognized as the most stable edge nodes. The overall process is described in Algorithm 1.

B. TASK DISTRIBUTION AND EDGE NODES CLASSIFICATION
The edge server is responsible for distributing the task to the edge nodes. It calculates the potential LENs objective function, which consists of the residual energy and CPU of the edge node devices, The closeness of the edge node to the requested task, and the displacement of the edge node in the AoI and classifies them in ascending way. The overall process is described in Algorithm 2.

C. DYNAMIC CLUSTERING
Since the EN and the workers are moving in the AoI, the clustering is dynamic and is defined according to the requested task, sensing time slot, and workers' mobility patterns. The optimal number of clusters is determined using the silhouette mechanism. This number is then used to select the top potential LENs that can act as centroids to the clusters. Finally, the clustering is established using the K-means algorithm, where the available workers in the AoI are clustered with closet centroids and are considered for the selection process. The overall process is described in algorithm 3

D. LOCAL SELECTION STRATEGY
At every time slot, every LEN selects a set of workers. The selection process uses a greedy algorithm where the best workers with high QoS are eligible to send their collected data. Once the workers are selected, the LEN assigns a label with the name ''Flag'' initiated with a 0 value. This flag is used to identify untrustworthy workers and as a cooperation index between LENs. This flag is updated later by the MEN when providing its feedback where trustworthy the workers have a positive flag; otherwise, it is negative. After the first selection, the LEN checks the workers' flags. The LEN can find three types of flags: a flag with ''NaN'' value means that the worker is new and has never been selected by other clusters, a flag with a negative value means that the worker was Construct the clusters as: 12 Cr_id = kmeans(L W i , best_size) 13 Centroids = best_size LEN ij s 14 end 15 identified as untrustworthy by one of the LENs and then they are eliminated from the selection, and flag with positive value means that the worker has been identified as trustworthy by one of the LENs. When the selection process is finished, every LEN collects the data from the eligible workers and applies its strategy to detect anomalies in the data. Then the LEN decision output is sent to the MEN for more processing. The selection process is described in algorithm 4. As explained previously, the LENs adopt the DAI-DEO strategy, shown in Algorithm 5. First, the LENs collected the data from the eligible workers. Then they extract some features from this data, such as average and standard deviation, and define upper and lower limits accordingly. Finally, the LENs The MEN receives all the LENs decisions. First, the MEN remove the redundant workers' IDs, whether they are trustworthy or untrustworthy. This redundancy occurs because of the workers' mobility, where a worker in a time slot can be detected and selected by more than one LEN. Consequently, redundant workers' IDs are removed to reduce resource consumption while distributing the MEN feedback. After this filtering process, the MEN assigns a cooperative score to the final set of workers provided by all LENs, as shown in Algorithm 6. A null score is attributed to untrustworthy workers, and a positive otherwise. This cooperative score is then used to update the workers' reputations. Also, the MEN update the workers' flags. All the updates are then forwarded to all LENs for consideration in their next selections. These new updates are also reflected in the following tasks.

V. PERFORMANCE EVALUATION
A set of evaluation metrics are considered to assess the efficiency of the proposed framework and categorized as  15 Send updates to the LENs follows: data-related, network-related, system-related, and worker-related.
• Data-related metric: the coefficient of variation (CV) is used to evaluate the data inconsistency. It is calculated as the ratio of standard deviation and average of the collected data, following the model defined in [4].
• network-related metrics: contains QoS, network delay, and network energy consumption, following the model defined in [4].
• System-related metrics evaluate the overall resource consumption of the proposed framework. It includes Execution time (s), Memory utilization (RAM %), and processing power (CPU %), following the model defined in [4].
• Worker-related metrics include the number of selected workers, trustworthy workers, anomalous readings, and the workers' Reputation. Most of the computed parameters follow the models provided in [19] A. SIMULATION SETUP To fairly compare the proposed mechanism, four modified versions of the worker selection, using edge computing in continuous MCS while adopting multi-layer architecture, are developed and compared with the proposed approach (Hybrid-based approach). Table 3 compares the four approaches.
• Local-based: The LEN locally selects the workers and detects anomalies. However, the feedback mechanism is only within the sensing period.
• Global-based: The LEN locally selects the workers while the MEN detects the anomalies. The feedback mechanism is only within the sensing period.
• Task-based: The LEN locally selects the workers and detects anomalies. However, the feedback mechanism is only over the tasks.
A real dataset containing vehicular mobility traces of Cologne, Germany, is used [28], [29]. It includes participants' IDs and locations over time: another real dataset, namely the Sarwat Foursquare dataset [31], [32] for social networking applications is used to simulate the proposed framework. It includes data about the user's device, such as energy and sensor availability [19]. In addition, the Stack Exchange Data Dump dataset [33] is used for the user's Reputation. The rest of the parameters are randomly generated following a uniform distribution and following the communication technology standards [4], [19]. Multiple independent tasks are generated with different locations and requirements, including the number of required sensors per device, expected QoS, and the number of requested workers. Table 4 summarizes the simulation parameters, such as the AoI, sensing period, devices, communication technologies, and task requirements.

B. RESULTS AND ANALYSIS 1) RESULTS OVER TIME
This section evaluates the proposed framework and benchmarks over the sensing period and is presented in figure 3.
Reputation is the main parameter of the workers' quality of service. Only workers with a high reputation are considered. A high workers' QoS is achieved using a Hybrid-based approach as shown in figure 3a. Initially, the worker's reputation is set to 0.5 for all approaches. The server and edge nodes know no historical information about the workers. For the first task along the sensing period, the Reputation is updated for all proposed solutions except for Task-based selection, where the reputation update is done after the first task is completed. However, as shown in figure 3b, the proposed approach outperforms the benchmarks where the workers' Reputation increases over time and tasks. This is due to the adopted feedback mechanism relying on the workers' contribution to overtime and task. At t=30s, the proposed approach provides a reputation that reaches a value close to 0.8. This new value is then used as an input for Task = 1, and this value increases till reaching a value more than 0.9 for task = 4.

2) RESULTS OVER TASK ID
This section evaluates the proposed framework and benchmarks over tasks' IDs. In this work, the tasks are dependent since any update of workers' Reputation in one task is also considered in future tasks as presented in figure 4. The Hybrid-based approach provides the highest workers' Reputation compared to the benchmarks as presented in figure 4b. It starts with more than 0.7 in the first task, and this value increases till reaching a value of more than 0.8. However, Local-based and Task-based start with a value similar to the initial Reputation of 0.5. This value decreases for the Local-based and Task-based because they keep considering workers with low reputations since there is no cooperation between LENs. Without cooperation among LENs, the workers with anomalous readings are also included in the sensing process. Consequently, the QoS provided by the workers using Hybrid-based is higher than the benchmarks clearly shown in figure 4a. The benchmark provides a low QoS that does not exceed 0.4. However, the Task-based approach still performs better than the Global-based and Local-based approaches. Figure 4c shows that the Hybrid-based approach provides low data variation compared to the benchmarks for all the tasks. This is related to the LENs cooperation that flags the workers with anomalous readings and removes them in future selections. However, the benchmarks have high variations because they keep considering workers with inconsistent data.

3) RESULTS OVER SIMULATION
This section evaluates the proposed framework and benchmarks over different densities. Every task requires a set of workers recruited to process the sensing and collect data. A worker can show trustworthy or untrustworthy behavior and provide accurate readings or anomalous ones. Table 5 wrap up the selection and the data-based anomaly detection process through the computation of the percentage of selected workers, percentage of trustworthy workers, and percentage of anomalous readings.
With a very low number of requested workers (e.g., 1000 every 30 seconds), Hybrid-based, Local-based, and Task-based cannot classify the workers as trustworthy or untrustworthy since the data variation is very low, close to zero. However, with the Global-based approach, the detection  is processed at the MEN level that receives all the LENs outcomes, increasing the probability of detecting anomalous data. Consequently, the Global-based approach is more suitable for data-based anomaly detection for low density. Moreover, It is clear that for the different numbers of requested workers, the Local-based approach select fewer workers than the other approaches, with a percentage between 25% to 34%. Since the detection process is based on the consistency of the worker's outcome and their contribution within the same cluster, local detection allows the discovery of more anomalies than global detection. Decreasing the Reputation of untrustworthy workers reduces the probability of choosing them in future selections. However, with the Global-based, Task-based, and Hybrid-based approaches, more workers are selected with an average of 90%. Then the probability of getting more trustworthy workers is achieved by more than 50%.
As illustrated in figure 5, the Hybrid-based approach shows a higher worker reputation than the benchmarks. This is due   to the feedback mechanism adopted by the Hybrid-based, where the workers with inconsistent outcomes get a low cooperation score and then are excluded from the selection process. This allows for increasing the reputation when the number of requested workers is increased. In contrast, with Local-based, Global-based, and Task-based, the Reputation is decreasing because they keep considering the workers with   low cooperation scores. These results impacted the QoS of the selected workers. The Hybrid-based approach provides the highest QoS compared to the benchmarks, as shown in figure 6. This is due to the higher Reputation of the workers and the closeness of the selected workers that require less propagation delay and energy, which positively impact the QoS. Figure 7 depicts the average total delay for the four approaches, including communication and computation delay. Hybrid-based has a lower time delay than the other approaches due to the selection of the workers that rely on VOLUME 10, 2022 the QoS, including the propagation delay where the more the worker is close to the LEN more it has the priority to be selected. In addition to the feedback mechanism and the greedy selection, this helps to keep the most closed workers, which require less computation and propagation time to report the data. However, Task-based and Local-based spend approximately the same delay, while Global-based takes more time to compute and transmit the data. Processing all the computations at the MEN level is time-consuming for the computation and the transmission.
As is clearly illustrated in figure 8, increasing the number of requested workers leads to an increase in energy consumption. The Global-based approach has the smallest energy consumption compared to the other approaches. In global processing, the LEN oversees transferring of the collected data without processing it. In this case, the energy processing is not counted for at the LEN level, but it considers only the MEN capacity and the amount of data to be processed. However, the proposed approach consumes more power due to the deployment of the feedback mechanism that continuously updates the workers' Reputation over time and tasks. Figure 9 presents the coefficient of variation for the four approaches over the number of requested workers. As distinguished through the figure, when the number of selected workers is very low, the data is not varying from one source to another. The variation is close to zero for one reason: the selected workers are very close to the LEN and provide approximately similar information. However, when the number of requested workers increases, this also increases the possibility of having different data and then high variations. The Hybrid-based approach provides less variation than the benchmarks since the workers providing inconsistent data are excluded in the future selection.

C. FRAMEWORK RESOURCE CONSUMPTION
Three main metrics are measured, over different distributions, to evaluate the overall framework: Execution Time, CPU consumption, and RAM utilization. Figure 10a shows the execution duration for the four approaches. Global-based and local-based show similar behavior in terms of execution time that decreases with the increase in the number of selected workers. However, the Task-based approach has an execution time from 900s to 1300s, while it is between 1000s and 1300s for the Hybridbased approach. The response time of the Hybrid-based approach is significant compared to the other approaches for two reasons: First, the Hybrid-based requires extra time for the reputation update over time and task. Second, additional time is needed for the filtration process based on the workers' flags. With that, the approach still provides a good response time. Figure 10b shows the RAM utilization percentage. The four approaches allocate approximately the same memory during the simulation process. The results clearly show that RAM usage varies between 8% and 23%. The percentage is not linear with the increase of requested workers and depends more on the number of available workers within the cluster and their outcomes. In addition, All approaches require more CPU to run the selection process, as reflected in figure10c. Hybrid-based and Local-based approaches require no less than 60% of the CPU for the computation and update process, and this value can reach more than 96%. However, the Task-based approach uses less CPU between 34% to 96%. Similarly, the global-based approach requires less CPU between 19% to 96%.

VI. CONCLUSION
Trustworthiness-based Data-Driven Decision-Making using smart Edge Computing for Continuous Mobile Crowdsensing is proposed to answer real-time requirements and Detect workers' anomalous behavior when sensing the data in a continuous MCS environment. The proposed solution is a multi-layer framework consisting of first, selection, and clustering of ENs by edge server. Second, the edge server offloads the local selection of the workers and data assessment to LENs. Third, the MEN decision-making and cooperation between edge nodes using a feedback mechanism. Compared to the benchmark, the proposed framework improves the network performances by selecting optimal workers to perform the task with the highest Reputation, QoS, and providing a low coefficient of variation. In addition, the framework offers good resource consumption in terms of RAM and execution time. At the same time, it requires more CPU to handle the continuous updates of the workers' reputations over time and tasks. The proposed approach can be improved to handle more complicated data problems in future work.