A platform for user empowerment through Self Ecological Momentary Assessment / Intervention

This paper presents a software platform for semi-automatic life-style self-monitoring, analysis and intervention. Our approach focuses on user empowerment, engaging them into improving their own well-being. We provide a set of software tools which allow users to: (1) collect data from their daily lives, based on Ecological Momentary Assessment (EMA) techniques; (2) carry out interventions in their daily habits, with time/location aware notifications based on Ecological Momentary Intervention (EMI) techniques and (3) obtain insights –which help them in the task of defining those interventions using visual analytics techniques. The contribution of this work is the EMA/EMI techniques being used by the user itself, opposed to conventional researcher-centered approaches.


INTRODUCTION
According to an American study carried out by the "California HealthCare Foundation" in 2013 [6], 7 out of 10 adult Americans regularly measure at least one of their health status related indicators, such as their weight, diet or activity level.The key of this growing trend among the population relies on the high motivating power of an instant feedback.It is also noteworthy that 46% of trackers stated that this activity has changed their overall approach for staying healthy.
Closely related to health tracking, and mainly due to the established trends like "self-empowerment" [4] or "personalized medicine" -which place the individual at the center of his own wellbeing-, the "Quantified Self" movement has arisen, based on using technology to monitor different aspects of a person's daily life.It is sufficient to look at the list of currently available tools for self-quantification managed by the "Quantified Self" 1 website to realize that there is a high interest on this kind of tools.This data is being used for many research studies, which usually require techniques related to the search of evidences in order to generate new knowledge.In general, these techniques are based in surveys, designed by the study promoter and delivered at a particular instant, which may introduce a bias in the study.This moment related limitation led to new techniques, which claim to bring closer the moment when the event occurs and the moment when it is annotated.Therefore, these techniques provide a much more faithful reflection of the individual evolution through the different contexts within his daily life.
As a consequence of these facts, a gradual transformation is occurring, causing the individual -who used to be a passive "element", merely an information generator -, to become a subject capable of analyzing its own data and even able to start acting according to the insights gained from its self-tracking.
The remainder of the paper is structured as follows.Section 2 describes the background of the paper subject.Section 3 introduces the concept behind our approach and Section 4 describes the implementation details.Finally, Section 5 presents some conclusions and future research avenues.

RELATED WORK
Historically, the validation of the hypothesis of research studies has been grounded in questionnaires, performed usually by the promoters of the study by means of: surveys [3], phone calls [7] or even smartphone apps [12].In other research studies, new evidences have been discovered thanks to tests or scores previously validated by the scientific community, such as the PSQI [15].These questionnaires, despite not being flexible enough, are carried out at a particular moment which implies a bias in the results due to the autobiographical memory limitations of an individual.Furthermore, filling these questionnaires with a low periodicity makes it difficult to consistently follow each subject's evolution, due to all the different contexts it goes through day by day [10].
The Ecological Momentary Assessment (EMA) approach was developed with the purpose of solving those deficiencies.EMA is characterized by a set of key features, as pointed out by Shiffman [14]:  Data points are collected in the real-world environment, in the subject's everyday life.This is the "ecological" aspect


Assessments focus on the subject's current state rather than asking for recall or summary over long periods.This is the "momentary" aspect  Moments are strategically selected for assessment  Every subject completes multiple assessments over time, providing a picture of how its experiences and behaviour varies over time and across situations In a complementary manner, the Ecological Momentary Intervention (EMI) [8] is a technique to deliver interventions during the everyday lives of subjects.EMI provides live advice when it is most needed.
Many studies so far have followed these methodologies (EMA and EMI) demonstrating their validity and their advantages over conventional techniques [13].
Nevertheless, the responsibility of defining the set of questions, deciding when to deliver them and managing the EMI strategy remains on the promoter of the initiative.Wouldn't it be useful to provide these tools directly to the final users in order to help them in gaining insights about their behavior and empower them to act towards improving their everyday life?

OUR APPROACH: SELF MANAGED EMA/EMI
In order to provide the "self-quantifiers" with a tool which helps them to collect their everyday all-day-long data, discover insights, set their own goals and self-asses for their achievement, we propose the use of the smartphone as a "bring-your-own-device" tool.In many research studies subjects are required to carry dedicated devices, which usually is cumbersome.On the other hand, people are used to carry their smartphones everywhere, and what is more, these devices already contain multiple built in sensors and computer capabilities, such as storage, wireless connectivity and reasonable computational power.
With the help of an App, as described at Section 4, the smartphone becomes a powerful sensing device, where all sensors' data and interaction with the device can be collected and stored into our platform, in an ubiquitous way.Users have full control over enabling or disabling each data collector service.
Despite the latest advances in mobile technology, there are still many kind of activities which cannot be collected automatically using a smartphone.For this purpose, we provide the user with a tool to manually define and track additional parameters which he may find relevant.Those parameters are classified into two categories: "count" and "measure".The first type can be applied to track a parameter with unit increments during the day (e.g. one coffee in the morning, another in the evening, etc., in order to have the sum of coffee intake at the end of the day).The second one is oriented to parameters which have a value that does not make sense to sum along the day, but to track the variations in it, generally on a daily basis (e.g.weight).The aim, in both cases, is to annotate this information, through the smartphone, in the moment when it occurs, following the EMA methodology.
Once the users have the information they need to make better decisions, it is time to promote behavioral changes by means of interventions tailored by themselves and setting their own goals (e.g."My sleep quality decreases when I have a coffee in the afternoon, plus I'm gaining weight, so I should have just a fruit juice and a healthy snack at the after work.").We provide a tool, according to EMI methodology, to remind themselves about their decisions, at the right time -with programmable alerts-and/or place -with location-aware notifications-, through their smartphone (e.g."It's 5:30 PM and you are near the bar… Remember: it's time for a delicious healthy snack!").
Lastly, the process of gaining insights and setting interventions is supported by a Web Application, where users can review and annotate their own raw and summarized data and even search for trends.We provide various data visualizations for that purpose.

PROPOSED ARCHITECTURE
We propose a modular environment with high cohesion and low coupling which is open-source software code based, as depicted in Figure 1.According to this principle we have developed the following modules:

Smartphone App
A native Android Application has been implemented in order to securely collect the available data from the smartphone sensors and events and deliver the EMA/EMI experience to the users.
One of the main purposes of the App is to acquire the raw data streams from the set of sensors included in a smartphone.It captures device ON/OFF events, accelerometer raw data, location data, screen on/off events and Wi-Fi network connectivity.Each of these sensors generates data at an irregular rate, depending on uncontrollable factors such as the load of the processor or the remaining battery level.
Users have complete control over the data gathering process and can decide which sensors to (de)activate anytime.No data is collected when users logout from the App.
The Application includes two additional features: user-input and alert-system.The former, user-input, permits users to define and quantify their own parameters.To simplify this process, as mentioned at Section 3, two different parameter type options are provided: "count" and "measure".The second, the alert-system is used to schedule alerts at a certain time and/or place, as described in Section 3.
All the data that users choose to collect is automatically sent to the backend.In order to reduce the latency, the network traffic and the costs related to the mobile carrier, this is done using compressed JSON (JavaScript Object Notation) files which are sent as soon as a Wi-Fi connection is established and only while it remains active.

Network interface
Both the smartphone App, which acts as a data provider, and the frontend, which we could define as a data consumer, need a way to communicate with the data storage infrastructure.
For that purpose, the network module implements a RESTful [5] interface that facilitates data intake and querying by means of authenticated HTTPS requests.This web interface is implemented using the Express 2 web application framework, which is built on top of the Node.js 3 platform.
The communication points are generated dynamically, so that new sensors or data sources can be added to the system without having to implement new interfaces manually.This means that whenever a user defines a new parameter, the system is able to automatically generate the data storage structure to store the values, the queries to insert new values and read previous ones and the required web services to permit the transparent querying and insertion through a simple interface for any application, such as the App or the Web Application.

Backend
A cluster computing backend has been set up with the following Big Data capabilities:

Storage infrastructure
Data is stored using a distributed NoSQL database, Apache Cassandra [11], designed to handle large volumes of data.This solution is optimized for dealing with vast amounts of long timeseries data concurrently, which fits perfectly with our requirements.
This infrastructure is composed of a cluster of various machines that ensure low latency for reading and writing operations.The solution is fault tolerant and also easily scalable.

Processing infrastructure
Initial tests using conventional data processing paradigms showed to be unreliable and do not scale well, mainly due to the high volume and the generation speed of data.
In this scenario, a Big Data approach has been applied using Apache Spark [17], a large-scale data processing platform.This solution allows performing parallelized tasks such as feature extraction or data post-processing in a quick and efficient way.
The following tasks are performed using Spark in batch mode:  Extract features from accelerometer data.


Perform aggregation and grouping of data based on the event's timestamp, device id and user id.


Recognize the user activity based on accelerometer data.

Frontend
An interactive Web Application over HTTPS and Node.js has been developed to provide a set of visualization tools to the final user.The main goal of this module is help the user to obtain deep insights to enhance the self-identification of patterns and decision making, that is, to promote the minimization of the gap between raw data and insights.The Web Application supports the selfreflection stage by allowing the user to save a specific visualization instance and a comment for expressing the gained personal insight.This functionality was added following the work of Choe et al. [2], who proposed it as an improvement for personal visualization systems.
2 http://expressjs.com/ 3 https://nodejs.org/ The visualization tools provided to the users are:  A 3-month calendar heat-map representing the daily calorie consumption with a color scale  Daily activity data: location and movement behavior; social interaction and mobile usage behavior and detailed physical activity (as a results of processing accelerometers data through an activity recognition module)


Charts with the daily evolution of the "count" and "measure" user-defined inputs The main technical pillar of this visualization system is the D34 JavaScript library.

CONCLUSION AND FUTURE WORK
In this paper we have presented a toolkit for the self intervention into the own well-being through EMA/EMI techniques.
In recent years, thanks to mobile devices people are starting to play a more relevant role in their own wellbeing: now individuals have become independent subjects who are willing to monitor their own parameters, both objective and subjective.
The next step, which our platform tries to catalyze, is to support users in the process of gaining insight from the parameters they track and even to plan their own control strategies to improve their wellbeing.
Next we mention several research avenues we plan to focus on.
First, we plan to improve the interoperability of our system, focusing on integrating several wearable ecosystems into our platform.We claim the smartphone to be an unobtrusive and widespread monitoring device along this paper, but wearables are bridging some unobtrusiveness limitations and additionally permit to obtain complementary information; and their adoption by the general public is increasing at a steady pace.Although there has been an explosive growth of wearable devices recently, coming in a variety of form factors, sensing and communication capabilities (e.g.Ant+ and Bluetooth Smart protocols), there are still many limitations regarding interoperability and easy access to captured data for the user.This limitation makes it difficult to combine data captured by wearables from different vendors or to analyze it with other tools apart from those provided by the vendor along with the device.We, therefore, plan to integrate several wearable devices in our platform by the following means:  Acquiring data directly from sensors that implement Bluetooth Low Energy standard GATT profiles using Google Fit APIs 5 .


Acquiring data directly from devices that implement ANT+ Device Profiles using Android ANT+ SDK 6 .


Communicating with some vendors' platforms from the server side of our platform, via Subscription APIs (i.e.those that push data into our server instead of following a less convenient pull approach).
Second, we will improve the manual event annotation process.Based on our users' feedback, we plan to add an annotation Widget in our App, in order to make this action more comfortable.
On the other hand, we can't ignore the rise of the smartwatches market.Some years ago, EMA interventions based on electronic diaries were successfully implemented in watch-type computers [16], demonstrating that this is a convenient input device for writing-down relevant events in the precise moment they occur.We will develop an annotation App for Android Wear powered devices and explore voice based annotations.
In order to make the data collection process easier and more precise, we also plan to: (1) trigger questions in response to proximity to a location of interest (i.e.conceptual location such as "home") as "Context-Sensitive EMA" tool [9] and (2) incorporate mechanisms to schedule the assessment of certain parameters which are difficult to identify, such as mood or nostalgia.
Finally, we will continue working on our interactive visualization platform, in order to facilitate the identification of patterns in the data by the users during their self-reflection processes.