A Context-aware Hierarchical Approach for Activity Recognition Based on Mobile Devices


  • Shugang Zhang College of Information Science and Engineering, Ocean University of China
  • Zhiqiang Wei College of Information Science and Engineering, Ocean University of China
  • Jie Nie Department of Computer Science and Technology, Tsinghua University
  • Lei Huang College of Information Science and Engineering, Ocean University of China
  • Zhen Li College of Information Science and Engineering, Ocean University of China


Activity recognition, Smartphone, Smartwatch, Support Vector Machine, Accelerometer


Various sensors integrated in the wearable device provide massive data for activity recognition. In this paper, a context-aware hierarchical approach is proposed for the recognition of activities using accelerometers on smartphones and smartwatches. We adopt a simple variance threshold based method and separate the activities into two major categories named body-fixed set and body-unfixed set according to the inherent characteristics of these activities in the first layer. Next, the Support Vector Machine approach is used respectively for the two sets in the second layer. A probability distribution over activity labels instead of a single activity result is generated in this layer. In the third layer, the contextual information is introduced to improve the classification result. Our comparative study with ordinary Support Vector Machines and other alternative methods has shown that our method is more robust and accurate.


Gayathri, K. S.; Elias, S.; Ravindran, B. Hierarchical activity recognition for dementia care using markov logic network. Pers. Ubiquitous Comput. 2015, 19, 271–285.

Avci, A.; Bosch, S. Activity recognition using inertial sensing for healthcare, wellbeing and sports applications: A survey. … (ARCS), 2010 23rd … 2010.

Hong, Y.-J.; Kim, I.-J.; Ahn, S. C.; Kim, H.-G. Mobile health monitoring system based on activity recognition using accelerometer. Simul. Model. Pract. Theory 2010, 18, 446–455.

Wan, J.; O’grady, M. J.; O’hare, G. M. Dynamic sensor event segmentation for real-time activity recognition in a smart home context. Pers. Ubiquitous Comput. 2015, 19, 287–301.

Belley, C.; Gaboury, S.; Bouchard, B.; Bouzouane, A. An efficient and inexpensive method for activity recognition within a smart home based on load signatures of appliances. Pervasive Mob. Comput. 2014, 12, 58–78.

McAvoy, L. M.; Chen, L.; Donnelly, M. P.; Nugent, C. D.; McCullagh, P. J. Ontological characterization and representation of context within smart environments. Comput. Syst. Sci. Eng. 2015, 30, 19–32.

Rafferty, J.; Chen, L.; Nugent, C.; Liu, J. Goal lifecycles and ontological models for intention based assistive living within smart environments. Int. J. Comput. Syst. Sci. Eng. 2015, 30, 1–14.

Zhao, C.; He, J.; Zhang, X.; Qi, X.; Chen, A. Recognition of driving postures by nonsubsampled contourlet transform and k-nearest neighbor classifier. Comput. Syst. Sci. Eng. 2015, 30, 233–241.

Bulling, A.; Blanke, U.; Schiele, B. A tutorial on human activity recognition using body-worn inertial sensors. ACM Comput. Surv. 2014, 46, 33.

Lara, O. D.; Labrador, M. A. A survey on human activity recognition using wearable sensors. Commun. Surv. Tutorials, IEEE 2013, 15, 1192–1209.

Bao, L.; Intille, S. S. Activity recognition from user-annotated acceleration data. In Pervasive computing; Springer, 2004; pp. 1–17.

Liao, L.; Fox, D.; Kautz, H. Hierarchical conditional random fields for GPS-based activity recognition. In Robotics Research; Springer, 2007; pp. 487–506.

Riboni, D.; Bettini, C. COSAR: hybrid reasoning for context-aware activity recognition. Pers. Ubiquitous Comput. 2011, 15, 271–289.

Khan, A. M.; Lee, Y.-K.; Lee, S. Y.; Kim, T.-S. A triaxial accelerometer-based physical-activity recognition via augmented-signal features and a hierarchical recognizer. Inf. Technol. Biomed. IEEE Trans. 2010, 14, 1166–1172.

Long, X.; Yin, B.; Aarts, R. M. Single-accelerometer-based daily physical activity classification. In Engineering in Medicine and Biology Society, 2009. EMBC 2009. Annual International Conference of the IEEE; 2009; pp. 6107–6110.

Mannini, A.; Intille, S. S.; Rosenberger, M.; Sabatini, A. M.; Haskell, W. Activity recognition using a single accelerometer placed at the wrist or ankle. Med. Sci. Sports Exerc. 2013, 45, 2193–2203.

Lee, M.-W.; Khan, A. M.; Kim, T.-S. A single tri-axial accelerometer-based real-time personal life log system capable of human activity recognition and exercise information generation. Pers. Ubiquitous Comput. 2011, 15, 887–898.

Cleland, I.; Kikhia, B.; Nugent, C.; Boytsov, A.; Hallberg, J.; Synnes, K.; McClean, S.; Finlay, D. Optimal placement of accelerometers for the detection of everyday activities. Sensors 2013, 13, 9183–9200.

Gao, L.; Bourke, A. K.; Nelson, J. Evaluation of accelerometer based multi-sensor versus single-sensor activity recognition systems. Med. Eng. Phys. 2014, 36, 779–785.

Han, M.; Bang, J. H.; Nugent, C.; McClean, S.; Lee, S. A Lightweight Hierarchical Activity Recognition Framework Using Smartphone Sensors. Sensors 2014, 14, 16181–16195.

Guiry, J. J.; van de Ven, P.; Nelson, J.; Warmerdam, L.; Riper, H. Activity recognition with smartphone support. Med. Eng. Phys. 2014, 36, 670–675.

Tapia, E. M.; Intille, S. S.; Haskell, W.; Larson, K.; Wright, J.; King, A.; Friedman, R. Real-time recognition of physical activities and their intensities using wireless accelerometers and a heart rate monitor. In Wearable Computers, 2007 11th IEEE International Symposium on; 2007; pp. 37–40.

Maurer, U.; Rowe, A.; Smailagic, A.; Siewiorek, D. Location and activity recognition using eWatch: A wearable sensor platform. In Ambient Intelligence in Everyday Life; Springer, 2006; pp. 86–102.

Ermes, M.; Parkka, J.; Cluitmans, L. Advancing from offline to online activity recognition with wearable sensors. In Engineering in Medicine and Biology Society, 2008. EMBS 2008. 30th Annual International Conference of the IEEE; 2008; pp. 4451–4454.

Zeng, M.; Nguyen, L. T.; Yu, B.; Mengshoel, O. J.; Zhu, J.; Wu, P.; Zhang, J. Convolutional neural networks for human activity recognition using mobile sensors. In Mobile Computing, Applications and Services (MobiCASE), 2014 6th International Conference on; 2014; pp. 197–205.

Yang, J. B.; Nguyen, M. N.; San, P. P.; Li, X. L.; Krishnaswamy, S. Deep convolutional neural networks on multichannel time series for human activity recognition. In Proceedings of the 24th International Joint Conference on Artificial Intelligence (IJCAI), Buenos Aires, Argentina; 2015; pp. 25–31.

Ordonez, F. J.; Roggen, D. Deep Convolutional and LSTM Recurrent Neural Networks for Multimodal Wearable Activity Recognition. Sensors 2016, 16, 115.

Chavarriaga, R.; Sagha, H.; Calatroni, A.; Digumarti, S. T.; Tröster, G.; Millán, J. del R.; Roggen, D. The Opportunity challenge: A benchmark database for on-body sensor-based activity recognition. Pattern Recognit. Lett. 2013, 34, 2033–2042.

Frank, K.; Rockl, M.; Nadales, M. J. V.; Robertson, P.; Pfeifer, T. Comparison of exact static and dynamic bayesian context inference methods for activity recognition. In Pervasive Computing and Communications Workshops (PERCOM Workshops), 2010 8th IEEE International Conference on; 2010; pp. 189–195.

He, Z.-Y.; Jin, L.-W. Activity recognition from acceleration data using AR model representation and SVM. In Machine Learning and Cybernetics, 2008 International Conference on; 2008; Vol. 4, pp. 2245–2250.

Maurer, U.; Smailagic, A.; Siewiorek, D. P.; Deisher, M. Activity recognition and monitoring using multiple sensors on different body positions. In Wearable and Implantable Body Sensor Networks, 2006. BSN 2006. International Workshop on; 2006; p. 4–pp.

Li, Z.; Wei, Z.; Huang, L.; Zhang, S.; Nie, J. Hierarchical Activity Recognition Using Smart Watches and RGB-Depth Cameras. Sensors 2016, 16, 1713.

Martín, H.; Bernardos, A. M.; Iglesias, J.; Casar, J. R. Activity logging using lightweight classification techniques in mobile devices. Pers. ubiquitous Comput. 2013, 17, 675–695.

Kwapisz, J. R.; Weiss, G. M.; Moore, S. A. Activity recognition using cell phone accelerometers. ACM SigKDD Explor. Newsl. 2011, 12, 74–82.

Khan, A. M.; Lee, Y.-K.; Lee, S. Y.; Kim, T.-S. Human activity recognition via an accelerometer-enabled-smartphone using kernel discriminant analysis. In Future Information Technology (FutureTech), 2010 5th International Conference on; 2010; pp. 1–6.

Ronao, C. A.; Cho, S.-B. Human activity recognition with smartphone sensors using deep learning neural networks. Expert Syst. Appl. 2016, 59, 235–244.

Lara, O. D.; Pérez, A. J.; Labrador, M. A.; Posada, J. D. Centinela: A human activity recognition system based on acceleration and vital sign data. Pervasive Mob. Comput. 2012, 8, 717–729.