An API for Wearable Environments Development and Its Application to mHealth Field †
Abstract
:1. Introduction
2. Materials and Methods
2.1. Related Work
2.2. Definition of Wearable Environment
- is a set of applications, possibly interconnected;
- is a set of wearable devices and smartphones, possibly interconnected; and
- is a set of sensors.
2.3. WES Level: Applications
2.4. API Level: A Bridge between Data and Applications
3. The WEAR-IT API
3.1. Interpreting WEs as FSMs
- is the input alphabet, made of primitives that can activate transitions of states.
- is the output alphabet.
- is the finite set of possible states; in particular, the initial state ;.
- : is the transition function, mapping pairs of a state and an input symbol to the corresponding next state.
- : is the output function, mapping pairs of a state and an input symbol to the corresponding output symbol.
3.2. Operational Semantics
- Name: the name of the method, to identify the service in a non ambiguous way.
- Parameters: the (possibly empty) list of values necessary to perform the required service.
- Description: a brief explanation of the method body.
- Return value: the value obtained by the service invoking entity at the end of the method. This value must be coherent with Table 2.
3.2.1. Scan()
3.2.2. Connect(sp, wd)
3.2.3. Sensors(sp) and Sensors(wd)
3.2.4. Classify(sp) and Classify(wd)
3.2.5. Sensor(sp) and Sensor(wd)
3.2.6. Select(sp, s) and Select(wd, s)
3.2.7. Play(sp) and play(wd)
- Frequency f: This is the sampling frequency to collect data from the sensor s. The default setting is 5000 milliseconds.
- Time period [, ]: This is the time interval during which the application wishes to collect data from sensor s at the given frequency f. Typically, is the instant when the primitive is invoked and ; if only one value will be instantaneously returned, while will generate an error.
3.2.8. Stop(sp, s) and Stop(wd, s)
- If Play(*, s) has been invoked, with * = sp or * = wd, then Stop(*, s) is not mandatory.
- If Play(*, s, , , f) has been activated, with * = sp or * = wd and , then Stop(s) can be used to terminate the execution of Play(*, s, , , f) before the normal exit at the end of the time period.
3.2.9. Store()
- File name: a string composed by the name of the sensor and a timestamp, joined by “_”.
- Archiving directory: the default directory of the application within the device where it runs.
- Format: the format of the file may depend on the type of data gathered by the sensor; the JSON (or XML) format is used to standardize it.
- Access mode: data are generally appended to the file, in order to preserve possible existing information.
3.3. An Example
Algorithm 1 WEAR-IT API. |
|
Algorithm 2 Distributed data collection with WEAR-IT. |
|
- Sensor available provides the list of all sensors mounted on the wearable device, alphabetically ordered. This function is useful to have a quick view about all the possible data an application at the reasoning level can exploit from the current device. The list of sensors can be exported to be used by applications.
- Motion, environment and position sensors group the sensors involved in the detection of the values necessary for the correct execution of an application, on the basis of its goals. The sensors (e.g., accelerometer) belonging to motion category can be exploited by applications interested in the analysis of the user movement, e.g., recommender systems for training. The sensors (e.g., light) belonging to the environment category can be interesting for applications suggesting actions to take in response to changes in the wearable environment context, e.g., personalized entertainment. The sensors (e.g., orientation) belonging to position category can be queried by applications interested in the analysis of the user geographic position, e.g., systems for suggesting places to eat.
4. Case Study
Algorithm 3 WEAR-IT API use in MoveUp. |
|
5. Discussion
5.1. Interoperability at Reasoning Level
- Duration of the PA session: This value can be calculated from the MET amount suggested by MoveUp (remind that 120 MET are equivalent to 30 min of moderate PA). The user is free to setup the value according to his/her wishes.
- Speed: This value is set by default at 6 km/h, but the user can modify it according to his/her conditions.
- Direction: This value is set by default at 0 degrees, but the user can modify it exploiting the rotation vector sensor (if available) provided by WEAR-IT; for example, he/she could point towards a POI he/she sees on the map, in order to force the application to consider it in the calculation.
5.2. Data Reliability
6. Conclusions
Funding
Conflicts of Interest
Abbreviations
API | Application Program Interface |
BLE | Bluetooth Low Energy |
GUI | Graphical User Interface |
HR | Heart Rate |
IoT | Internet of Things |
IPA | Intense Physical Activity |
MET | Metabolic Equivalent of Task |
mHealth | Mobile Health |
MHR | Maximum Heart Rate |
MPa | Moderate Physical Activity |
NCD | Non-communicable Diseases |
NTP | Network Time Protocol |
OS | Operating System |
PA | Physical Activity |
SE | Self Efficacy |
VR | Virtual Reality |
WES | Wearable Expert System |
UUID | Universal Unique IDentifier |
WBAN | Wireless Body Area Network |
WSN | Wireless Sensor Network |
WSNME | Wireless Sensor Networks with Mobile Elements |
WHO | World Health Organization |
References
- Jovanović, J.; Gašević, D. Achieving knowledge interoperability: An XML/XSLT approach. Expert Syst. Appl. 2005, 29, 535–553. [Google Scholar] [CrossRef]
- Garcia-de Prado, A.; Ortiz, G.; Boubeta-Puig, J. COLLECT: COLLaborativE ConText-aware service oriented architecture for intelligent decision-making in the Internet of Things. Expert Syst. Appl. 2017, 85, 231–248. [Google Scholar] [CrossRef] [Green Version]
- Atzori, L.; Iera, A.; Morabito, G. The internet of things: A survey. Comput. Netw. 2010, 54, 2787–2805. [Google Scholar] [CrossRef]
- Sartori, F.; Melen, R. Wearable expert system development: Definitions, models and challenges for the future. Program 2017, 51, 235–258. [Google Scholar] [CrossRef]
- Čolaković, A.; Hadžialić, M. Internet of Things (IoT): A review of enabling technologies, challenges, and open research issues. Comput. Netw. 2018, 144, 17–39. [Google Scholar] [CrossRef]
- Lee, J.; Kim, D.; Ryoo, H.Y.; Shin, B.S. Sustainable wearables: Wearable technology for enhancing the quality of human life. Sustainability 2016, 8, 466. [Google Scholar] [CrossRef] [Green Version]
- Al-Fuqaha, A.; Guizani, M.; Mohammadi, M.; Aledhari, M.; Ayyash, M. Internet of things: A survey on enabling technologies, protocols, and applications. IEEE Commun. Surv. Tutor. 2015, 17, 2347–2376. [Google Scholar] [CrossRef]
- Lin, J.; Yu, W.; Zhang, N.; Yang, X.; Zhang, H.; Zhao, W. A survey on internet of things: Architecture, enabling technologies, security and privacy, and applications. IEEE Int. Things J. 2017, 4, 1125–1142. [Google Scholar] [CrossRef]
- Kim, J.; Yun, J.; Choi, S.C.; Seed, D.N.; Lu, G.; Bauer, M.; Al-Hezmi, A.; Campowsky, K.; Song, J. Standard-based IoT platforms interworking: Implementation, experiences, and lessons learned. IEEE Commun. Mag. 2016, 54, 48–54. [Google Scholar] [CrossRef]
- Zeng, D.; Guo, S.; Cheng, Z. The web of things: A survey. JCM 2011, 6, 424–438. [Google Scholar] [CrossRef] [Green Version]
- Wong, B.P.; Kerkez, B. Real-time environmental sensor data: An application to water quality using web services. Environ. Model. Softw. 2016, 84, 505–517. [Google Scholar] [CrossRef]
- Al Rasyid, M.U.H.; Sayfudin, A.; Basofi, A.; Sudarsono, A. Development of semantic sensor web for monitoring environment conditions. In Proceedings of the 2016 International Seminar on Intelligent Technology and Its Applications (ISITIA), Lombok, Indonesia, 28–30 June 2016; pp. 607–612. [Google Scholar]
- Mukhopadhyay, S.C. Wearable sensors for human activity monitoring: A review. IEEE Sens. J. 2015, 15, 1321–1330. [Google Scholar] [CrossRef]
- Edwards, J. Wireless sensors relay medical insight to patients and caregivers [special reports]. IEEE Signal Process. Mag. 2012, 29, 8–12. [Google Scholar] [CrossRef]
- Shaltis, P.A.; Reisner, A.T.; Asada, H.H. Cuffless blood pressure monitoring using hydrostatic pressure changes. IEEE Trans. Biomed. Eng. 2008, 55, 1775–1777. [Google Scholar] [CrossRef]
- Poh, M.Z.; Kim, K.; Goessling, A.; Swenson, N.; Picard, R. Cardiovascular monitoring using earphones and a mobile device. IEEE Pervasive Comput. 2012, 11, 18–26. [Google Scholar] [CrossRef]
- Salvo, P.; Di Francesco, F.; Costanzo, D.; Ferrari, C.; Trivella, M.G.; De Rossi, D. A wearable sensor for measuring sweat rate. IEEE Sens. J. 2010, 10, 1557–1558. [Google Scholar] [CrossRef]
- Strohrmann, C.; Harms, H.; Kappeler-Setz, C.; Troster, G. Monitoring kinematic changes with fatigue in running using body-worn sensors. IEEE Trans. Inf. Technol. Biomed. 2012, 16, 983–990. [Google Scholar] [CrossRef]
- Ermes, M.; Pärkkä, J.; Mäntyjärvi, J.; Korhonen, I. Detection of daily activities and sports with wearable sensors in controlled and uncontrolled conditions. IEEE Trans. Inf. Technol. Biomed. 2008, 12, 20–26. [Google Scholar] [CrossRef]
- Rodgers, M.M.; Pai, V.M.; Conroy, R.S. Recent advances in wearable sensors for health monitoring. IEEE Sens. J. 2015, 15, 3119–3126. [Google Scholar] [CrossRef]
- Alemdar, H.; Ersoy, C. Wireless sensor networks for healthcare: A survey. Comput. Netw. 2010, 54, 2688–2710. [Google Scholar] [CrossRef]
- Movassaghi, S.; Abolhasan, M.; Lipman, J.; Smith, D.; Jamalipour, A. Wireless body area networks: A survey. IEEE Commun. Surv. Tutor. 2014, 16, 1658–1686. [Google Scholar] [CrossRef]
- Appelboom, G.; Camacho, E.; Abraham, M.E.; Bruce, S.S.; Dumont, E.L.; Zacharia, B.E.; Connolly, E.S. Smart wearable body sensors for patient self-assessment and monitoring. Arch. Public Health 2014, 72, 28. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Casselman, J.; Onopa, N.; Khansa, L. Wearable healthcare: Lessons from the past and a peek into the future. Telemat. Inform. 2017, 34, 1011–1023. [Google Scholar] [CrossRef]
- Mathie, M.J.; Coster, A.C.; Lovell, N.H.; Celler, B.G.; Lord, S.R.; Tiedemann, A. A pilot study of long-term monitoring of human movements in the home using accelerometry. J. Telemed. Telecare 2004, 10, 144–151. [Google Scholar] [CrossRef]
- Sazonov, E.S.; Fulk, G.; Sazonova, N.; Schuckers, S. Automatic recognition of postures and activities in stroke patients. In Proceedings of the 2009 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Minneapolis, MI, USA, 2–6 September 2009; pp. 2200–2203. [Google Scholar]
- Giansanti, D.; Maccioni, G.; Morelli, S. An experience of health technology assessment in new models of care for subjects with Parkinson’s disease by means of a new wearable device. Telemed. Health 2008, 14, 467–472. [Google Scholar] [CrossRef]
- Aziz, O.; Atallah, L.; Lo, B.; ElHelw, M.; Wang, L.; Yang, G.Z.; Darzi, A. A pervasive body sensor network for measuring postoperative recovery at home. Surg. Innov. 2007, 14, 83–90. [Google Scholar] [CrossRef]
- Patel, M.S.; Asch, D.A.; Volpp, K.G. Wearable devices as facilitators, not drivers, of health behavior change. JAMA 2015, 313, 459–460. [Google Scholar] [CrossRef]
- Amft, O.; Tröster, G. Recognition of dietary activity events using on-body sensors. Artif. Intell. Med. 2008, 42, 121–136. [Google Scholar] [CrossRef] [Green Version]
- Benedetti, M.G.; Di Gioia, A.; Conti, L.; Berti, L.; Degli Esposti, L.; Tarrini, G.; Melchionda, N.; Giannini, S. Physical activity monitoring in obese people in the real life environment. J. Neuroeng. Rehabil. 2009, 6, 47. [Google Scholar] [CrossRef] [Green Version]
- Sciacqua, A.; Valentini, M.; Gualtieri, A.; Perticone, F.; Faini, A.; Zacharioudakis, G.; Karatzanis, I.; Chiarugi, F.; Assimakopoulou, C.; Meriggi, P.; et al. Validation of a flexible and innovative platform for the home monitoring of heart failure patients: Preliminary results. In Proceedings of the 2009 36th Annual Computers in Cardiology Conference (CinC), Park City, UT, USA, 13–16 September 2009; pp. 97–100. [Google Scholar]
- Di Francesco, M.; Das, S.K.; Anastasi, G. Data collection in wireless sensor networks with mobile elements: A survey. ACM Trans. Sens. Netw. 2011, 8, 1–31. [Google Scholar] [CrossRef]
- Anastasi, G.; Conti, M.; Di Francesco, M.; Passarella, A. Energy conservation in wireless sensor networks: A survey. Ad Hoc Netw. 2009, 7, 537–568. [Google Scholar] [CrossRef]
- Sartori, F.; Melen, R. Time Evolving Expert Systems Design and Implementation: The KAFKA Approach. In Proceedings of the International Conference on Knowledge Engineering and Ontology Development, Part of the 7th International Joint Conference on Knowledge Discovery, Knowledge Engineering and Knowledge Management (IC3K 2015), Lisbon, Portugal, 12–14 November 2015; pp. 84–95. [Google Scholar]
- Melen, R.; Sartori, F.; Grazioli, L. Modeling and understanding time-evolving scenarios. In Proceedings of the 19th World Multi-Conference on Systemics, Cybernetics and Informatics, Orlando, FL, USA, 12–15 July 2015; pp. 267–272. [Google Scholar]
- Korb, K.B.; Nicholson, A.E. Bayesian Artificial Intelligence; CRC Press: Boca Raton, FL, USA, 2010. [Google Scholar]
- Sartori, F.; Melen, R.; Lombardi, M.; Maggiotto, D. Virtual round table knights for the treatment of chronic diseases. J. Reliab. Intell. Environ. 2019, 5, 131–143. [Google Scholar] [CrossRef]
- Mealy, G.H. A method for synthesizing sequential circuits. Bell Syst. Tech. J. 1955, 34, 1045–1079. [Google Scholar] [CrossRef]
- Hallal, P.C.; Bauman, A.E.; Heath, G.W.; Kohl 3rd, H.W.; Lee, I.M.; Pratt, M. Physical activity: More of the same is not enough. Lancet 2012, 380, 190. [Google Scholar] [CrossRef]
- Conn, V.S.; Hafdahl, A.R.; Mehr, D.R. Interventions to increase physical activity among healthy adults: Meta-analysis of outcomes. Am. J. Public Health 2011, 101, 751–758. [Google Scholar] [CrossRef]
- WHO. Global Recommendations on Physical Activity for Health; World Health Organization: Geneva, Switzerland, 2010. [Google Scholar]
- Baretta, D.; Sartori, F.; Greco, A.; D’Addario, M.; Melen, R.; Steca, P. Improving physical activity mhealth interventions: Development of a computational model of self-efficacy theory to define adaptive goals for exercise promotion. Adv. Hum. Comput. Interact. 2019, 2019. [Google Scholar] [CrossRef] [Green Version]
- Armstrong, T.; Bonita, R. Capacity building for an integrated noncommunicable disease risk factor surveillance system in developing countries. Ethn. Dis. 2002, 13, S13-8. [Google Scholar]
- Baretta, D.; Sartori, F.; Greco, A.; Melen, R.; Stella, F.; Bollini, L.; D’addario, M.; Steca, P. Wearable devices and AI techniques integration to promote physical activity. In Proceedings of the 18th International Conference on Human-Computer Interaction with Mobile Devices and Services Adjunct, Florence, Italy, 6–9 September 2016; pp. 1105–1108. [Google Scholar]
- Manaf, H. Barriers to participation in physical activity and exercise among middle-aged and elderly individuals. Singap. Med. J. 2013, 54, 581–586. [Google Scholar]
- Kumar, M.S.; Dhulipala, V.S.; Baskar, S. Fuzzy unordered rule induction algorithm based classification for reliable communication using wearable computing devices in healthcare. J. Ambient. Intell. Humaniz. Comput. 2020, 1–12. [Google Scholar] [CrossRef]
- Sartori, F.; Melen, R.; Giudici, F. IoT Data Validation Using Spatial and Temporal Correlations. In Proceedings of the Research Conference on Metadata and Semantics Research, Rome, Italy, 28–31 October 2019; pp. 77–89. [Google Scholar]
Input | Scan | Connect | Sensors | Classify | Select | Play | Stop | Store | {Absent} | |
---|---|---|---|---|---|---|---|---|---|---|
States | ||||||||||
⟶Reasoning | Representation | ⌀ | ⌀ | ⌀ | ⌀ | ⌀ | ⌀ | ⌀ | ⌀ | |
Representation | ⌀ | Acquisition | Representation | Representation | Acquisition | Acquisition | Acquisition | Reasoning | ⌀ | |
Acquisition | ⌀ | ⌀ | ⌀ | ⌀ | ⌀ | ⌀ | ⌀ | ⌀ | Representation |
Reasoning State | |
---|---|
g (Reasoning, Scan) | List <Wearable Device > |
Representation State | |
g (Representation, Connect) | Wearable device |
g (Representation, Sensors) | ⌀, List <Sensor > |
g (Representation, Classify) | Tree <Sensor> |
g (Representation, Select) | Sensor |
g (Representation, Play) | True/False |
g (Representation, Stop) | True/False |
g (Representation, Store) | Path |
Acquisition State | |
g (Acquisition, Wearable device) | True/False |
g (Acquisition, Sensor) | True/False |
g (Acquisition, True/False) | List<SensorValue> |
Return Value | Method Name, Parameters, Description |
---|---|
Value | name Primitive(parameter 1, parameter 2, ..., parameter n) Description |
Return Value | Method Name, Parameters, Description |
---|---|
List <WearableDevice> | Scan() Returns the collection of wearable devices available in a wearable environment. |
Return Value | Method Name, Parameters, Description |
---|---|
True/False | Connect (Smartphone sp, WearableDevice wd) Returns True if pairing sp and wd succeed; False otherwise. |
Return Value | Method Name, Parameters, Description |
---|---|
List <Sensor> | Sensors (Smartphone sp) Returns the list of sensors on the smartphone on the smartphone sp. |
List <Sensor> | Sensors (WearableDevice wd) Returns the list of sensors on the wearable device wd. |
Return Value | Method Name, Parameters, Description |
---|---|
Tree <Sensor> | Classify (Smartphone sp) Returns a tree-like cluster of sensors available on the smartphone sp. |
Tree <Sensor> | Classify (WearableDevice wd) Returns a tree-like cluster of sensors available on the wearable device wd. |
Return Value | Method Name, Parameters, Description |
---|---|
True/False | Sensor (Smartphone sp, Sensor s) Returns True if the sensor s is available on the smartphone sp; False otherwise. |
True/False | Sensor (WearableDevice wd, Sensor s) Returns True if the sensor s is available on the wearable device wd; False otherwise. |
Return Value | Method Name, Parameters, Description |
---|---|
Sensor | Select (Smartphone sp, Sensor s) Returns the ID code of the sensor s if it has been correctly activated on the smartphone ; an empty string otherwise |
Sensor | Select (WearableDevice wd, Sensor s) Returns the ID code of the sensor s if it has been correctly activated on the wearable device ; an empty string otherwise. |
Return Value | Method Name, Parameters, Description |
---|---|
List <SensorValue> | Play (Smartphone sp, Sensor s, Time , Time , Frequency f) Returns a list of values gathered by sensor s on smartphone according to the parameters settings. |
List <SensorValue> | Play (WearableDevice wd, Sensor s, Time , Time , Frequency f) Returns a list of values gathered by sensor s on wearable device according to the parameters settings. |
Return Value | Method Name, Parameters, Description |
---|---|
Void | Stop (Smartphone sp, Sensor s) Data detection on sensor s of smartphone is terminated. |
Void | Stop (WearableDevice wd, Sensor s) Data detection on sensor s of wearable device wd is terminated. |
Return Value | Method Name, Parameters, Description |
---|---|
Path | Store (Sensor s, Smartphone sp, Artifact a, List<SensorValue> sensorValues, Format f) Stores a set of data sensorValues gathered by sensor s within the Artifact a, according to the format f. In case of success, the path to the storage is returned; an error code is generated otherwise. |
Path | Store (Sensor s, Wearable device wd, Artifact a, List<SensorValue> sensorValues, Format f) Stores a set of data sensorValues gathered by sensor s within the Artifact a, according to the format f. In case of success, the path to the storage is returned; an error code is generated otherwise. |
Values | Parameter | |||
---|---|---|---|---|
Temperature | Humidity | Luminosity | Voltage | |
Null | 901 (0.03%) | 902 (0.03%) | 93,880 (4%) | 526 (0.02%) |
Outliers | 383,443 (16.6%) | 299,084 (12.9%) | 0 | 8 (0.03%) |
Parameter | Measurement | |
---|---|---|
Minimum Value | Maximum Value | |
Temperature | −15 C | 50 C |
Humidity | 0% h | 100% h |
Luminosity | 0 Lux | 2500 Lux |
Voltage | 1, 5 Volts | 3, 5 Volts |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sartori, F. An API for Wearable Environments Development and Its Application to mHealth Field †. Sensors 2020, 20, 5970. https://doi.org/10.3390/s20215970
Sartori F. An API for Wearable Environments Development and Its Application to mHealth Field †. Sensors. 2020; 20(21):5970. https://doi.org/10.3390/s20215970
Chicago/Turabian StyleSartori, Fabio. 2020. "An API for Wearable Environments Development and Its Application to mHealth Field †" Sensors 20, no. 21: 5970. https://doi.org/10.3390/s20215970
APA StyleSartori, F. (2020). An API for Wearable Environments Development and Its Application to mHealth Field †. Sensors, 20(21), 5970. https://doi.org/10.3390/s20215970