The Internet of Things (IoT), cloud computing, and machine learning opened an opportunity for new smart systems. These technologies have triggered huge traffic and delay by continuously transmitting telemetry data to the cloud. IoT edge choice made decision-making closer to the environment, which decreases traffic and speeds up response time. Human activity recognition (HAR) systems, among other IoT applications, require systems with quick response time; reduce costs using constrained traffic to the cloud while maintaining accurate prediction results. This study proposes an application of HAR for predicting activities using up to three smartphone accelerometers. Three models are developed, trained, and deployed to achieve the necessary accuracy at the IoT edge and in the cloud, with an acceptable response time. Since each coordinate value from the three accelerometers has different importance in activity category prediction, focusing on the data from the most related values can help minimize the amount of information transferred from the edge to the cloud. Six models were trained in the cloud; three were deployed and tested at the edge with different features by selecting the most important ones using Principal Component Analysis (PCA). Different experiments showed that traffic and processing time decreased significantly based on the time required to predict HAR categories with acceptable accuracy. Since there is significant latency between the edge and the cloud and within the cloud, sending samples for verification save bandwidth, and processing requests locally at the edge speed up predictions. Results illustrate that the time required to serve one request from the environment where smartphones generate traffic through the internet connection to the cloud took about 5.8 s on average, including transmission delays and the prediction process. During this time, the model at the edge can serve 150 requests with the same accuracy using nine features. In addition, the edge can serve 286 requests in 5.8 s with 94.8 % accuracy when choosing the top four features at the edge.
Read full abstract