This manuscript is written in total fulfillment of the requirements of the French degree Habilitation à Diriger des Recherches (HDR). HDR is an additional academic research accreditation after the Ph.D. degree. It is required, in the French academic system, to direct research strategies and develop an independent research activity (e.g.

Introduction

This document intends to provide a summary of my research work that I have been leading for the last eight years. The broad scope of my contributions is the consideration and application of the context-awareness concept either to improve the e ectiveness of existing systems, or to make them incorporating easily new human-centric services, or to design new approaches with new services that better meet the expectations of end users. With this aim in view, we need a multidisciplinary approach that tackles di erent components of systems and architectures and solves the related issues under di erent perspectives. The key question that we address, throughout the document, is how to take advantages of the knowledge of the user's context in providing optimal services that are as close as possible to what the user expects? How to avoid that users are required to significantly alter their behavior to accommodate the system, rather than the system accommodating the users? To answer such questions, we will focus on three main topics: the integration of context-aware services within existing architectures and protocols, the design of human-centric services, and the anticipation of context changes. For the last two topics, we will focus on the challenging e-health realm in smart spaces for both the definition of the context and the services that we target to provide.

Research Context and Motivations

Context-awareness represents the main key to a successful system thanks to the consideration of the user's environment, preferences, capabilities and the characteristics of the services and the surrounding environment. The context-awareness principles can be applied in numerous fields of research, as in smart spaces, when the aim is to provide services to the end user. Context-awareness consists of adding systems the capability to use information sensed from their surrounding physical environment and exploit the available knowledge along with their own states, in order to adapt their behavior accordingly. Context-awareness allows an automatic provision of information, actions, and services according to the user's current context and needs [1]. According to [2], context-awareness refers to applications capable of monitoring inputs from sensor devices and selecting the suitable context according to the subject's needs or interests. In [3], a system is qualified as context-aware if it uses the context to provide relevant information and services to the subject. In contrast, from the pervasive healthcare systems perspective, context-aware computing systems consider the application's ability to adapt to changing circumstances and respond according to the context of use [4].

In the literature, the most used definition of the context term considers the context as any information that can be used to characterize the situation of an entity. An entity includes a person, a place or an object [5]. Two kinds of information can be distinguished: raw data and context information [6]. Raw data, also called low-level contextual data, is unprocessed data provided directly from a source (e.g. a sensor) in a given space. Such data may represent, for instance, a person's vital signs, environmental parameters (e.g. temperature, humidity, and sound), or personal movements. Our key idea is that acquired raw data is worthless if it is not well interpreted and understood by the underlying system. The second kind of context information is generated by processing raw data, i.e. by applying consistency validation or metadata enrichment. It refers to extracting high-level information such as behavior patterns or a human activity recognition.

Context has been broken down into various dimensions depending on the di erent perspectives of the application. Each context dimension is used to define a piece of information. For instance, one can consider the location, environment, identity, and time when defining the context. The evaluation of the person's context will, consequently, depend on the accuracy of the contextual information at a given time. For instance, a lying position in the bedroom, at night, can be interpreted as a normal situation, while the same position in the middle of the day for an extended period could indicate an abnormal situation. The primary pieces of the context should answer the following five W questions: Who, What, Where, When, and Why. These questions were identified in the literature as a minimal set of information necessary to understand the context and situations [7,8]. Other related information can be used to refine the description of the context depending on the targeted objectives. For example, in smart spaces and network architectures, the context can consider the used access technologies, the kind of the architecture, used protocols, available servers, data rates, available bandwidth, the capabilities of terminals, and connected objects.

Overall, context-awareness computing systems are usually designed and implemented for a specific purpose and, thus, are focused on reaching some objectives for specific problems. As a result, no standards or guidelines exist for building such systems. The core di erence between each system lies in the levels of context-awareness each system possesses [9]. Context-awareness systems should define several components that are responsible for required functions including the optimal sensing, representation, management, reasoning, and analysis of context information.

Network architectures and protocols for pervasive services

Context-aware systems and projects rely on a set of common components and use standard or commercial sensors for the purpose of gathering contextual data of persons and their environment. The most used interconnections of pervasive and context-aware services are based on wireless sensors networks (WSN) with a limited coverage such as NFC, Bluetooth, Zigbee, and Z-Wave. The main focus is on the personal and immediate space around the person including his own body; these are the wireless personal area/sensor networks (WPAN/WPSN) including body area/sensor networks (BAN/BSN). They run on battery power and are characterized by their limited coverage and number of interconnected devices, low bandwidth, and data rate. Selected sensors and devices are integrated into the user's space and infrastructure and connected using the selected network technology. Each sensor is responsible for one or more task at the same time. In e-health services, PSNs are usually used to consider the human daily activities and measure conditions in the user's space. BSNs are usually used to monitor vital signs and health conditions by measuring physiological parameters and detecting ambulatory activities. For more advanced operations, such as remote monitoring and bandwidth-intensive applications, other networks can be used such as wired, 5G, and WiFi. Power-line networks (PLN), that relay data over the electrical wiring, represent an interesting low-cost solution which is adapted to some settings, such as providing older houses with a healthcare IoT network.

Providing context-aware services adapted to the user's context and needs is paramount to improve the user's quality of experience and adoption of proposed services. However, the degree of such user's satisfaction rely on a complex set of factors and involve many actors including the service provider, the network architecture, and the targeted user with his surrounding environment. In order to provide a global context-aware approach, it is important to consider the used network architectures and protocols and take advantages of their advanced functionalities, otherwise, determine the required modifications or improvements to better consider the user's context. In this manuscript, we will consider three major architectures that are carefully selected primarily because they o er an appealing environment for providing pervasive and context-aware services with the ability to use heterogeneous technologies, devices, and complex services under di erent contexts. These three architectures are: the Digital Living Network Alliance (DLNA) architecture [10], the IP Multimedia Subsystem-based Next Generation Network (IMS-NGN) [11], and the Multimedia Broadcast Multicast Service (MBMS and eMBMS) architecture [12]. From the protocol perspective, we believe that the adoption of the Web, when applicable, improves the quality of experience of users regarding the pervasive access and use of services even in complex architectures. In this context, the use of WebRTC [13] enhances the interoperability and interactions with users in specific complex services involving two-way video and audio streams.

Smart spaces

Smart spaces are an integration of ubiquitous computing and communication technologies. Emerging pervasive technologies such as the Internet of Things (IoT) are giving shape to a powerful environment where it becomes easy to develop new services with a high degree of ubiquity, accessibility, autonomy, and control [14]. These services mainly rely on sensing, communication, and the processing capabilities of the system. Most existing systems involve the interaction with users using one or more types of sensors. Sensors are responsible for data acquisition and are either stationary sensors deployed in domestic settings or wearable sensors carried by the user, for instance, in the context of smart cities. Both of these two categories of sensors collect the user's contextual information in a constant or periodic way. Sensors relay data through, for instance, an access point or a base station to a coordinator (e.g. a home server or a portable device) using the network architecture and available protocols.

Diverse parameters and heterogeneous data collected from sensors can be involved, such as from the environment (e.g. sound detection), movement and location tracking, and vital signs (e.g. heart rate, and blood pressure). This data provides a low-level view of the context of the user evolving in the space. According to the system architecture, hardware capabilities (sensors, actuators, connections, and gateways) and methods used in processing the data, the system can gain a high-level view of the context. Existing systems can be di erentiated based on the following three aspects: the target application and population, the system capabilities (e.g. storage, processing, communication, bandwidth, and energy management), and deployed methods such as learning-based and reasoningbased approaches.

Smart homes represent an application of smart spaces that involves the integration of di erent services by using a common communication system at home. Smart home technologies promise tremendous benefits for users such as elderly and dependent persons living alone. The environment can provide users context-aware services like comfort, healthcare, safety, and energy conservation. Many smart home projects and architectures have been conducted over the last decades [15]. However, proposed systems are always faced with the problem of their adaptability to the user's need. Hence, their adoption and real use by the general public remains an issue. The situation is more striking for persons with heterogeneous profiles and specific needs.

e-Health

There is a high proliferation of emerging technologies, such as IoT, in many areas thanks to the ability of the technology to easily address important needs and improve users lives [16]. The situation is particularly significant regarding the e-health realm with the potential increasing loss of autonomy of the growing aging population, the countless heavy costs of traditional healthcare institutions, and the available technological advances, which continue to influence the global economy. For the end of 2025, we expect that e-health applications will dominate IoT with 41% of the global market, followed by manufacturing (36%), and smart grids (8%) 1 . Healthcare applications hold significant potential for providing continuous quality healthcare with far less expenditure. e-Health allows the use of new objects and communication means to promote a self-care such as ensuring an independent monitoring of chronic disease while minimizing the restrictions and constraints for the users. For instance, e-health services can help to manage the Alzheimer's disease by locating patients with indoor and outdoor techniques, indicating the placement of various objects using tracking tags, reminding food and medicine, boosting the brain functions using various applications, etc. Healthcare systems are characterized by their smooth integration of many components with a strong heterogeneous level of capabilities in terms of processing, hardware functionalities, and networking methods. Used objects can vary from the simple presence and localization sensors to biometric and physiological sensors, smart clothing, smart pills, implantable devices, and devices for the next-generation genomic health.

The hardware and the human-machine interface of the software are generally simple and compact in terms of architecture and functionalities. Basically, they are dedicated to a few number of specific needs such as displaying an overview of sensed ECG data (e.g. the blood glucose level), providing a medical prescription, or ensuring a remote assistance using video conferencing in more advanced healthcare systems. The optimization of hardware and software results in a limited user's ability to personalize a solution or to change it in order to meet his preferences. The lack of this ability is increasingly perceptible by users in healthcare since involved technologies, especially in the mobile health (m-Health) field, are directly engaging persons in their own healthcare.

Overall, e-health is a complex ecosystem where services require a transversal and cross-layer approach. Proposed approaches should be human-centric and context-aware to consider the user's context, preferences and their evolutions over time. As mentioned previously, raw data provided by an isolated object become less important if they are not cross-analyzed and moderated by the global context of the system. Therefore, there is a need to develop global/distributed smart components to ensure data collection, processing, and storage. High-level abstractions can be achieved in order to identify relevant information for the application services. Smart algorithms can be designed to ensure the interoperability between heterogeneous objects and protocols and guarantee an optimal coordination of objects. Furthermore, other objectives can also be considered by services 1 In our projections, as applied in the IBSG projections [17], we use the findings of [18] where it is shown that similar to the Moore's Law, the Internet doubles in size every 5.32 years. We combine the MGI projections for IoT applications and the United Nations projections (2015) [19]. Our results lead to estimate 100 billion of connected devices. This is a minimum value since we consider the entire population including developing nations and people not yet connected to the Internet. such as optimizing the energy consumption or minimizing delays of data processing and network delivery. This last objective is paramount in e-health, particularly when the application should trigger quick and appropriate decisions such in emergency situations.

Challenges

The adoption of a context-aware approach, while proposing new services intended for use in di erent contexts, raises some key challenges to be addressed by the research community. Tremendous work has been devoted to increase the satisfaction of end users. However, with new emerging technologies, like IoT, the democratization of connected objects, and the growing complexity of systems, protocols, and networks much more e orts would need to be carried out. On the other side stand the complex expectations of humans in terms of personalized computer services especially for some profiles who count, more than others, on the system's assistance and help in daily life.

The integration of context-awareness in current heterogeneous network architectures and protocols

Nowadays, several networks, architectures, and protocols are involved in the delivery of human-centric services. Usually, to ensure the ability to provide adaptive services, the network architectures and protocols must be either redesigned or include several modifications. Indeed, architectures should address the lack of ubiquity, pervasivity, and contextawareness by providing functionalities like dynamic adaptability during execution time, flexible allocation and execution of network functions depending to: the user's profile, services discovery by the core of the architecture, support for mobility, etc. For instance, in digital homes, proposed systems and norms (e.g. DLNA) are designed to o er an interoperable home network that provides services in di erent contexts regardless existing devices, media sources, formats, location, delivery methods, and protocols. Unfortunately, actual digital home networks do not meet the basic requirements of contextawareness and several users are still unaware of the existence of such digital technologies. From the user's perspective, the complexity of such architecture is very high in terms of intercommunication and collaboration between di erent norms, the heterogeneity of application protocols and services, media formats, and devices. Overall, there is a lack of smart components that help users to find the services and resources and to use existing services in an intuitive, transparent and adaptable way.

On the other hand, there are other architectures that already holds advanced functionalities and components which could be exploited to run adaptive services according to the context of the end users (e.g. IMS-NGN). Unfortunately, these architectures need fundamental reviewing in order to determine the appropriate existing components and define an e cient collaboration between them in a global context-aware approach. Architectures and protocols should integrate as many interoperable elements as possible. These elements must ensure a bidirectional transmission of contextual information between the user's space and the service provider. Formats involved in the service's delivery must support a minimum level of personalization and be understood by the end user and his own platform (devices and network).

Providing interoperable and adapted services

Ensuring an automatic adaptation of services is a challenging task. Depending on the nature of the service, the adaptation may rely on a plethora of parameters. Such parameters may include the user's network access method, the protocol used to provide data, the profile of the end user, the user's needs, the user's behavior, preferences and interests, and the capabilities of the user's terminal. With emerging technologies and the increasing need for a pervasive access, heterogeneous and unconventional objects are more and more involved to render the service's data to the user. These constraints need to be overcome while designing context-aware services. The user's quality of experience (QoE) becomes as important as the conventional quality of service (QoS) in the sense that context-aware systems need additional metrics and methods to evaluate the user's satisfaction to avoid the non-adherence of users. It is required to strengthen the link between the user's context and the personalization's degree of the service. This implies that the original form of the service should support operations like decomposition, filtering, and changes of settings to meet various contexts and satisfy di erent constraints. For these challenges, the use of standards should be the preferred practice in the design of services. For instance, Webrelated technologies (protocols and formats) present good candidates to ease the task of adaptation even for complex services.

Understanding the context

The foundation stone of context-aware systems is the sound knowledge of the user's context and his surrounding environment. This knowledge is used to adapt a given service to a given context at any given moment. With the myriad of available information sources (e.g. with sensors), it becomes necessary to develop optimized methods that capture and handle relevant contextual dimensions that are appropriate to the provided service. The system's capture of context should lead to a better understanding of observations and an e cient context summarization. Hence, the system becomes able to consider the user needs and provide appropriate and automatic answers. To achieve these goals, it is important to rely on an e cient and flexible context modeling with optimized operations like processing, storage, and matching. The main challenges in such modeling are to ensure a high degree of expressiveness, storage and processing optimization with the ability to capture relevant data related to the real expectations and needs of users. Another challenge is related to the ease of integration of contextual models into existing systems in addition to the ability to vary the context. The latter is crucial to test the behavior of new systems to face up to unexpected and risky contexts (e.g. emergency situations in e-health).

Human-centric services in e-health

e-Health is a challenging topic when we aim to provide context-aware services. Expected services can be numerous, interrelated and complex with a wide heterogeneity of users profiles and changing contexts. For e-health services in smart spaces, context plays a significant role mainly for three reasons. First, in smart environments, evaluating the users regarding their health conditions and performances in their daily lives relies on understanding the user's surroundings. For example, changes in the person's vital signs data should be correlated with the person's current situation in order to achieve a better understanding of the person's condition. For instance, the system's interpretation of the cardio activity should be linked to the nature of the current activity, which can di er substantially for a house keeping activity compared to a watching TV activity. A high recording of sleep disorders could imply hepatitis C [20]. Second, context can be useful in making smart spaces more e cient and optimal. Data regarding the user's context is often collected using various sensors and devices. A continuous processing and fusion of such data require a huge amount of processing. To increase the system's e ectiveness, required sensors should be appropriately selected and data should be appropriately and accurately analyzed [21]. Finally, some specific services require an accurate knowledge of the context and expect quick answers from the context-aware system. Such is the case, for instance, of services for persons with a severe degree of dependence in addition to emergency services and the monitoring of critical physiological parameters.

The anticipation of context changes

If the consideration of the current context is the core of context-aware approaches, taking into account the future context may be particularly e ective on several levels and objectives. First, it provides highly useful support for specific services like handling the emergency situations or following the context evolution and trend with critical health parameters. Second, it increases the degree of the system's adaptability and, hence, the user's satisfaction and confidence in the system as a whole. Finally, it enables the system to mobilize only required resources for the objectives of the provided services.

Several studies and methods have been designed to optimize the context prediction such as probabilistic techniques, fuzzy and case-based reasoning rules, support vector machines, clustering approaches, and time series analysis [22,23,24]. The main challenge of the anticipation of contexts is to define an approach that avoids the processing of a large amount of data and to provide a short-term prediction. Another challenge, particularly perceived in smart spaces with multiple sources of contextual data, is to ensure the anticipation even with discrete data and incomplete or poor information. Overall, we need to define an e cient system combining an optimal cost of data collection with short training periods and an accurate prediction of the user's context.

Contributions

Our contributions to the previous challenges are organized as follows:

Chapter 2 focuses on the study and the integration of context-awareness concept with regards to some existing network architectures and protocols. In particular, we consider the Digital Living Network Alliance (DLNA) architecture in smart homes [25,26,27,28], and the two ISP architectures: the IP Multimedia Subsystem-based Next Generation Network (IMS-NGN), and the Multimedia Broadcast Multicast Service (MBMS and eMBMS) architecture [29,30,31,32,33,34]. In smart home environments, we propose a context-aware framework, called Universally, that aims to simplify and optimize the complexity of current home architectures. We consider limited objects and users like novice users and dependent persons that are not always aware of setting up their devices. Moreover, using a new adaptive scheme for media selection, we consider the user's behavior and preferences to adapt the digital home system when providing content and services. Using a global context-aware approach we deeply review the two ISP architectures of IMS-NG and MBMS with the aim of enabling context-aware services. For the IMS architecture, we focus on providing healthcare services by involving di erent elements: the heterogeneous sensor networks (at the user's level), the IMS core network, and the application servers (AS) level. Our approach includes the services invocation, with consideration of services priorities, the ability to update the context, and the integration of e-health records. In MBMS, we focus on the proposition of a new global context-aware method that considers the heterogeneity of wireless networks, terminals, users, and services. We propose to extend the decision of delivering broadcast-based services by the incorporation of the context of users, operators, and service providers. On the protocol front, throughout our di erent propositions, we adopt a Web-based approach in order to improve the interoperability of services and the quality of experience of users regarding the pervasive access and use of services even in complex architectures [35,36,37]. We consider any service as the union of the following three sets: inputs, advanced operations, and output results that we provide in the form of standard and adaptable Web interfaces. Di erent techniques were exploited to consider the variety of targeted contexts such as content pagination, delivery size optimization, and real-time media adaptation. We enrich our Web-based approach, by using the WebRTC [38,39,40], in order to consider the user interactions in complex services involving bidirectional video and audio streams; Chapter 3 addresses the application of context-awareness in the design of humancentric services with a focus on the e-health realm. We start by proposing an approach to understand and model the context [41,42,43,44,45,26,37,25]. Then, we provide a generic context-aware framework for services with three main services applications: the monitoring of activities of daily living, handling emergency situations, and the localization of persons in the context of smart cities [16,46,47,38,28]. Our objective of understanding the context is to identify the degree of assistance needed by users while facilitating the future integration of adaptive services into a real-world environment. We study the overlaps and di erences between the most important models used to evaluate the dependency of persons, namely AGGIR and SMAF models, and propose a matching approach between the di erent models with a new evaluation algorithm. Based on the lessons learned in the previous step, we propose a modeling of the context that considers three kinds of profiles: data related to the user (user profile), characteristics of objects available in the smart environment (space profile), and services that could provide or process any kind of data (service profile). We enrich our modeling of real contexts through a generation process of contexts instances. The objective is to assist the design and test of new adaptive systems without risking the safety of persons in case of fails or runtime errors. The three investigated categories of services (activities of daily living, handling emergency situations, and the localization) are discussed using three di erent approaches: the first one is algorithmic with the proposition of a new adaptive algorithm, the second is based on finite states machine (FSM), and the third approach is based on the combination of localization techniques and genetic algorithms; Chapter 4 is dedicated to the discussion of our main approaches that we have proposed to anticipate and predict the changes in contexts. We focus on two main approaches: the Grey theory [48,49,46,45] and Neural Networks [50,51,52]. In the first approach, we propose a context-aware monitoring algorithm which is able to collect relevant and contextual data, predict and detect risky contexts, and evaluate the person's need for help while remaining e ective and cost-e cient. The considered context mainly includes actions and activities of daily living with a special attention to the accuracy with regards to critical health parameters (e.g. blood pressure and pulse). We also include the user's own power consumption as a contextual dimension and as an e cient indicator for our system to understand the user's behavior and predict its changes. In our second approach, we use recurrent techniques that have shown promising results when the data presents some sequential dependencies. Specifically, we improve the existing Extreme Learning Machine model by providing a temporal relationship between the observations at di erent time steps. The resulting model, called RELM (Recurrent Extreme Learning Machine), is able to learn the human behavior and ensures a right balance between the learning time and the prediction accuracy. To evaluate our approaches, several metrics are used such as the percentage of prediction's error (PE), the forecast error (FE), forecast accuracy (FA), root means squared error (RMSE), and the mean absolute deviation (MAD); Chapter 5 concludes this manuscript by summarizing our main achievements and gives some insights on our main research perspectives.

Introduction

In this chapter, we consider the problem of integrating adaptive and context-aware services using existing protocols and network architectures. How the current architectures and protocols address the context of users, their terminals, and network access technologies? What are the drawbacks of current architectures? How can we improve the interoperability and use of services in heterogeneous environments with resource-constrained connected objects? In order to answer the previous questions, we discuss some of our contributions related three topics: digital smart home architectures, the integration of context-aware services, and the use of Web technologies as a means to improve the interoperability and solve some of the main issues of heterogeneity.

In the topic of digital smart home architectures, we focus our on the Digital Living Network Alliance (DLNA) architecture since it knows a high penetration in homes. We propose the Universally approach with the aim of simplifying and optimizing the complexity of current home architectures and provide an adaptive scheme for home services [25,26,27,28,35,37].

Regarding the integration of context-aware services topic, we contribute to the integration of adaptive services in the major architectures of IP Multimedia Subsystem-based Next Generation Network (IMS-NGN) and the Multimedia Broadcast Multicast Service (MBMS and eMBMS). These architectures were carefully selected because they o er an appealing environment for providing pervasive applications and services with the ability to use heterogeneous access technologies that converge to the same core [29,30,31,32,33,34,36].

In the topic of Web-based approaches, we first contribute with the generation of standard and compatible Web interfaces that increase the quality of experience of users by enabling them to interact with services, rich content, and receive a context-aware and adapted output. Second, we focus on the interactions of users with complex services (like home emergency services) using emerging Web technologies such as the WebRTC [38,35,39,40,37]

Architectures and Protocols for Digital Smart Homes

Research context

Home users, and more specifically elderly, are constantly faced with the ever-evolving technology and need appropriate support in order to satisfactorily meet the di culties of everyday living. This becomes an increasingly important issue as IoT is increasingly being used in smart spaces. Smart homes represent an application of pervasive environments that involves the integration of di erent services by using a common communication system. Smart home technologies promise tremendous benefits for elderly and dependent persons living alone. The environment provides user context-aware services like comfort, healthcare, safety, and energy conservation.

One of the main challenges facing smart home systems is balancing the complexity of proposed systems against their usability [15,28]. Half of the majority of computerbased information systems related to healthcare fail due to user's resistance and sta interference. This situation is mainly due to the fact that users were asked to significantly alter traditional workflow patterns to accommodate the system, rather than the system accommodating the users. In sum, current systems su er from the absence of components that consider the context of the devices (software and hardware capabilities) and the context of the user (preferences and behavior) [53,54,[START_REF] Kim | Implementation of the DLNA Proxy System for Sharing Home Media Contents[END_REF][START_REF] Kuriyama | Home Appliance Translator for Remote Control of Conventional Home Appliance[END_REF][START_REF] Lee | Enhanced UPnP QoS Architecture for Network-Adaptive Streaming Service in Home Networks[END_REF].

We focus our propositions on the Digital Living Network Alliance (DLNA) architecture since it knows a high penetration in homes [10]. Moreover, we consider the user's behavior and preferences to adapt the digital home system in providing content and services.

A context-aware architecture for media access

In digital homes, proposed systems and norms are designed to o er an interoperable network that ensures using and sharing multimedia content in a seamless environment regardless existing terminals and media sources: formats, location, delivery methods, and protocols. Proposed systems -used mainly by non-expert users-represent an interesting means where the inhabitant can use di erent services, media and data coming from different sources. Unfortunately, actual digital home networks do not meet this objective yet and several users are still unaware of the existence of such digital technologies.

Several reasons can explain this situation: the complexity of proposed technologies inside the home network, the intercommunication and collaboration between di erent norms, the heterogeneity of services, media formats, and devices, etc. Overall, there is a lack of smart components that help users to find resources, configure and connect devices in order to use the content and services in an intuitive, transparent and optimized way.

In this contribution, we investigated how the user's quality of experience is negatively a ected by existing digital home systems. Particularly, in heterogeneous environments where devices and networks having di erent capabilities. Through our propositions, we demonstrate how the use of the home network resources can be significantly improved with a better quality of user's experience (QoE). We consider the use and access of media in di erent contexts and particularly in a resource-constrained context such as using limited mobile devices or connected objects through a wireless access. We focus our propositions on the Digital Living Network Alliance (DLNA) architecture since it knows a high penetration in homes [10]. Indeed, DLNA is integrated into at least 74% of existing consumer electronics. Unfortunately, the DLNA norm has a low rate of users with only 6% of real users that are aware of digital functionalities and are able to use them intuitively [START_REF]Stat, UPnP and DLNA-Standardizing the Networked Home[END_REF].

DLNA architecture

The DLNA architecture aims to manage and distribute content from a given source to all the compatible devices [10]. The main provided functions are connectivity and networking, device discovery and control, media management, media formats and media transport. Connectivity and networking use the existing home network. Device discovery and control use the UPnP Device Architecture (DA) 1.0 specification [START_REF][END_REF]. Media management is based on the UPnP AV specification [60]. Three entities are specified: devices, services and control points (CPs). Services are functions provided by a device, found and invoked by a control point.

The main functions of a UPnP device are: IP addressing, discovery, description of services and capabilities, control in a response to CPs requests and eventing to notify registered CPs. SSDP (Simple Service Discovery Protocol) messages are sent using the HTTP Multicast (HTTPMU) over UDP in order to discover resources in the network. SOAP allows specifying available operations. For media content, three main entities are used: the media server (MS), the media renderer that plays content, and CPs that control what and how contents are viewed. DLNA defines two main entities: A Digital Media Server (DMS) and Digital Media Player (DMP). Digital Media Server is a UPnP/AV Content Directory Service (CDS) device that provides media resources. DMP is a UPnP/AV Content Directory Service (CDS) control point that can discover resources and render them.

Drawbacks of current architectures

Based on a theoretical analysis of current home systems, especially the DLNA architecture, and using real-world evaluations we identified a set of important drawbacks of existing architectures and provide useful lessons for optimizing the media access and network resources in heterogeneous environments with resource-constrained connected objects [25].

The impact and the performance of digital home networks is a concern with regards to the used protocols. For instance, there is a negative impact of SSDP advertisement in Personal Area Networks (PAN) such as for BT power cost -when advertisements are spreadand channel's bandwidth usage especially for large SOAP messages, transfer, and media streaming. When the number of devices increases 1 (as is typically the case for IoT-based home networks), the network knows negative performances regarding the discovery e ectiveness (the percentage between announcements and real discovery), discovery latency and bu er overruns. The reasons are mainly the responses loss, the explosion of response at the level of control points (CPs) and collision periods in a large network.

Overall, the number, nature (UDP and multicast) and the periodicity of UPnP advertisements, used in the digital home, are inconvenient. Also, to be able to visualize one media item, several messages and steps must be achieved. Consequently, an object which joins the digital home should support the multicast functions, the UPnP Template Language parsing [START_REF][END_REF], the SOAP protocol and the unreliable nature of the UDP protocol, especially over a wireless access. In addition, there is no guarantee that the media item is compatible with the targeted renderer. This situation is not adapted for heterogeneous environments where rendering capabilities, access technology, bandwidth, congestion probability and power consumption are not the same for all the existing devices that can be connected through Ethernet, WLAN, Bluetooth, etc. The level of the provided control, using UPnP, depends on the design and implementation of each media server. The control of media items is completely specified by the media server's vendor and is not standardized. Hence, it does not guarantee a universal access for heterogeneous devices.

Universally

We propose Universally with the aim of simplifying and optimizing the complexity of current home architectures. We consider limited devices and objects and users like novice users and dependent persons that are not always aware of setting up their devices. From the system and network perspective, unnecessary resources and periodic tra c are avoided when no media resource is in use by the inhabitant. Here, the benefits of context awareness are the improvement of the user's experience by, for instance, adapting the media formats and avoiding the streaming of content that will not be understood by the targeted device.

The key idea of Universally is to provide an easy access to content and services only when it is needed by the user and requested by a home device. Universally adopts a client/server model and integrates 4 main modules: Advanced Web Interface (AWI) module, adaptation transport module, UPnP functions module, and the media adaptation and context handling module (Fig. 2.1). The latter is used to describe the hardware and software capabilities of home devices. It uses the Multimedia Universal Profiling (MUP) schema based on the W3C RDF language that we have proposed in [37].

Thanks to the AWI interface, home devices can browse available media servers (DMS) and resources using the HTTP protocol. Once a media resource is found, the user can use it directly thanks to hyperlinks. In order to improve the media transfer, the media transport is extended to any transport protocol by including appropriate and compatible transport in the source of hyperlinks. For instance, hyperlink sources can include rtp:// or rtsp:// sources if the target device supports them. To perform media controls and actions (e.g. a stream seek) over HTTP, a Web server is implemented with a full support The module dedicated to UPnP functions (discovery, control, etc.) ensures the access using limited devices such as those which do not support the multicast or are not compatible with DLNA. UPnP advertisements of media services are filtered and only responses to the UPnP M-SEARCH message originated by a user's action are authorized. Unnecessary tra c is so avoided.

MUP specifies the capabilities of near to 14.000 di erent user agents. Based on these capabilities, if the original format of a media is not supported, it can be adapted then transferred to the device. Based on the device's rendering capabilities, the AWI interface is also dynamically adapted by performing a pagination of discovery results when the device explores media resources of available media servers. The pagination allows to dynamically generate small HTML pages with next and previous navigation links and so only small parts of the content is sent to the user. The pagination is based on the number of discovered resources (child element of a device or a directory) which is extracted from the SOAP answer of a Browse/BrowseMetadata action (childCount attribute of the XML element DIDL-Lite/container) [START_REF][END_REF]60].

An adaptive scheme for media selection

The study in [START_REF] Roupa | The Use of Technology by the Elderly[END_REF], involving a group of 300 persons, shows that elderly are able to handle the TV sets at 99.4% while only 67.7% of them are able to use a simple wireless phone. Providing services through TV sets help users on gaining access to a personalized content adapted to their needs without complex home architectures. Familiar TV sets simplify the use of advanced technologies and make their integration in home easily accepted by elderly. It is important to note that the trends in smart spaces research show an important popularity of using middleware to integrate heterogeneous multivendor devices that coexist in the same system [START_REF] Alaa | A Review of Smart Home Applications Based on Internet of Things[END_REF]15]. The objective of our media selection scheme is to take advantage of the increased TV viewing by elderly living alone and personalize the watched media content. The proposed automatic personalization, called also media selection, is made according to the elderly situation, preferences over the time, needs of contact and assistance. This cost-e ective approach tuned towards preferences and needs of the users would accelerate the rapid adoption of the system and increases the acceptance of advanced technologies and services by elderly.

In this contribution, the main requirement of the proposed system is to be able at any given time, to display the most appropriate media content or service. This is the primary scope of the context-aware media selection problem. In our media selection scheme, we focus on welfare and healthcare services by considering the user preferences, media recommendations, alert notifications and connected media. User preferences refer to the preferred content that the user likes to watch as expressed by him. Preferences are expressed once. However, they can be changed by the system over the time depending on the user behavior. Media recommendations are intended to be advised by the referring doctor, a caregiver, or a healthcare assistant. For instance, recommendations to avoid arbitrary TV content, identify the most appropriate TV content regarding the user situation (age, health situation, and culture), and recommend the maximal time to spend in watching TV, times to take medicine, and recommended sleeping time. Alert messages are used for healthcare and safety such as the notification when it is time to take medicine. Connected media refer to received calls from family, friends and can be extended to assistance institutions.

The media selection is applied to available media sources: external media items and current TV channel programs. The output is a decision to either play a media item or select a TV channel program. Used metadata sets resulted primarily from the MPEG-7, ETSI TV-Anytime XMLTV, and the EPG data [START_REF] Etsi | Broadcast and On-line Services, Search, Select, and Rightful Use of Content on Personal Storage Systems ("TV-Anytime[END_REF][START_REF]XMLTV Project[END_REF]. Each media item viewed by the user is logged with the following main information: the item's title/category/subcategory, passing (viewed) time -pt, duration of watching (watching time) -wt, duration of the item -d, and the item's source.

Our proposed selection scheme performs 4 steps and applies a new rule-based algorithm. In this first step, the system identifies a set media items (S 1 ) that fulfill the requirements of the media recommendation profile. Essentially, it performs a best e ort strategy to reach the recommended watching time for items and to keep the given proportion of the di erent item categories. In the first step, S 1 is ordered using a score function (MediaScore). In the second step, the ordered set of items, S 2 , is ordered again based on the user preferences profile. The two last steps (3 and 4) are devoted to select top In our rule-based algorithm [28], we consider 3 rules for the user's behavior (own control of media items) and 5 rules for specific events. Table 2.1 shows a subset of the defined rules. The algorithm applies a MediaScore function using Equations 2.1 and 2.2.

scorepiq "

ÿ j ‡ j ¨wtpjq dpjq (2.1) ‡ j " --¨pptpjq -w 1 q ¨pptpjq -w 2 q (2.2)
To calculate a media score of an item i, we consider the time spent by the user to watch similar items j (Equation 2.1). pt(j) returns the most recent week in which the j item was watched. However, in order to avoid boring the user with repeated selections of the same content's category and consider that the user preferences may change over time, we define the passing time importance factor ( ‡). ‡ is used with a normalizing coe cient and a time window [w 1 , w 2 ]. For a time window [w 1 =1 week, w 2 =4 weeks], the value ofis 44.44. Hence, the ‡ factor will be positive if the item was watched recently but at least w 1 weeks ago. Old items watched before the last w 2 weeks will have a negative importance factor (Figure 2.2).

Summary of results

Based on real-world evaluations and an architecture representing a typical home architecture [25], we demonstrated how existing digital home systems and media servers a ect negatively the home resources in terms of availability of services, the performance of the home network, the integration and use of home devices (energy and processing), and the user applications. The proposed testing architecture integrated the most commonly used media servers (e.g. TVMOBiLi, PMS, TWonkyMedia and Skifta) and one media server of the ISP home-box.

The Universally architecture does not only simplify the home architecture but also enhance the user's quality of experience when using media content and services at home. We compared the impact of existing systems with our propositions -and show significant improvements of Universally. Our experimentations show that with current systems even if the user does not perform any actions, the home network should keep all the components awake (consuming energy) and any device is requested by 3000 KB and 104 unnecessary messages per hour. This drawback is avoided thanks to the nature of the HTTP protocol and the proposed client/server model. Besides eliminating the user's di culties in using digital systems and improving the interoperability of heterogeneous devices with a content adapted to their profiles, the interactivity of the home system was also improved using Universally. For instance, using existing media servers 16,11 seconds (respectively 26,17) are required to browse 140 folders (respectively items). However, using Universally, the user action requires only 0,0282 seconds.

Our proposed context-aware media selection scheme was validated using a real-world implementation that extends the Universally system with the user control management and rules-based algorithm [27,35,25]. Scenarios including adaptive media selection and enabling TV-based external calls were tested within senior volunteers and show the adaptability of the system regarding the user's behavior changes [28].

Toward Context-Aware Network Architectures

Research context

In this contribution, we adopt a global approach to provide context-aware services by considering two major network architectures: the IP Multimedia Subsystem-based Next Generation Network (IMS-NGN) [11] and the Multimedia Broadcast Multicast Service (MBMS and eMBMS) [12]. These two architectures were carefully selected primarily because they o er an appealing environment for providing pervasive applications and services with the ability to use heterogeneous access technologies that converge to the same architecture. Hence, it becomes easy to design new services once (e.g. for e-health) and then deploy them to a range of users evolving in di erent contexts.

To ensure the ability to provide adaptive services, the network architectures must be redesigned. Indeed, architectures should address the lack of ubiquity, pervasivity, and context-awareness by providing functionalities like dynamic adaptability during execution time, flexible allocation and execution of network functions depending on the user's profile, services discovery by the core of the architecture, and support for mobility. [START_REF] Sanchez-Loro | A Semantic Context-Aware Network Architecture[END_REF].

For the IMS architecture, we focus on providing healthcare services by considering the whole chain from the heterogeneous sensor networks (at the user's level) to application servers (AS) level by going through the IMS core network [29]. For the MBMS architectures, we focus on the proposition of a new global context-aware method that considers the heterogeneity of wireless networks, terminals, users, and services. Specifically, we extend the decision of delivering broadcast-based services by the integration of three entities representing the users, operators, and service provider [30,33,32,31].

IMS model for pervasive services

We review the IMS functionalities and identify pertinent changes and extensions in order to trigger context-aware pervasive services, specifically e-health applications and services. The proposed model is based on existing third-party servers that can be selected and personalized according to the user's context. For the IMS integration, we focused on providing a road-map for a flexible selection and redirection to AS mainly using the IMS Initial Filter Criteria (iFC) [START_REF]3GPP, IP Multimedia (IM) Subsystem Cx and Dx interfaces; Signaling Flows and Message Contents (Release 11)[END_REF]. Unlike existing works, such as in [START_REF] Said | New e-Health Signaling Model in the NGN Environment[END_REF], we focus on the improvement of the IMS functionalities rather than creating new architectural components. This deliberate choice allows to make the proposal more scalable and facilitate the integration of several scattered services of e-health.

The IMS Core Network includes three main entities: the Home Subscriber Server (HSS), Call/Session Control Functions (CSCFs) and the application server (AS), see figure 2.3. HSS stores services subscription-related data. CSCFs include a proxy CSCF (P-CSCF) Figure 2.3: An overview of the IMS architecture which is the contact point of an IMS terminal; an interrogating CSCF (I-CSCF) that queries the HSS to find the user location and routes the service requests to the assigned Serving CSCF (S-CSCF). S-CSCF contacts the appropriate AS after the evaluation of filter criteria (Initial Filter Criteria -iFC) stored in the HSS. iFC is composed of an AS section (information about the server to be contacted) and zero or one instance of a Trigger Point section that expresses logical conditions under which an AS is invoked.

Our proposed model for enabling the easy integration of context-aware e-health services into IMS architectures considers the invocation of services, priorities of services, supporting the changes of context, and the storage of data, specifically, the e-health records (EHR).

e-Health services invocation

In IMS, the profile of a service is processed by the S-CSCF that evaluates a set of conditions and invokes an application server (AS) if some conditions are met. These conditions are expressed in the IMS Initial Filter Criteria (iFC). We extend the iFC functionalities of the IMS in order to provide more flexibility and ability to integrate e-health services. Therefore, services could be invoked according to the context of the patient or monitored subjects. For a given e-health service, the conditions of e-health services invocation depend on the patient's profile, data reported by sensors, e-health services priorities, and user preferences. From a conceptual point of view, iFC is extended regarding the following IMS iFC classes: Application Server (AS) and Service Point Trigger (SPT) classes. The Server Name class is extended to include not only SIP URLs but any URL of a given e-health application server. We generalize the S-CSCF processing to trigger any service (general AS or e-health AS) according to the patient's profile. The SPT is extended by the expression of logical conditions that become related to any SIP/HTTP/SOAP messages and headers rather than the only SIP.

Received protocol methods by the IMS core are the basis of the logical conditions (evaluated by the S-CSCF) that invoke the application servers. Hence, iFC new conditions related to headers will consequently include SIP MESSAGE Body, HTTP body, and HTTP-SOAP-ENV_Body. Therefore, sensors and the home network are enabled to use these methods to report the sensors setting, sensed data, alarms, user preferences, and requests. The AS iFC element is extended to include the invocation of any server including servers which host e-health services.

e-Health services priorities

We extend the XML semantic of the iFC priority element to indicate the priority of any e-health service according to the patient's profile. For example, when a sensor reports an urgent alarm such as the fall or the burn, the alarm becomes a priority. We use the priority element in setting up the initial profile configuration of a given patient or monitored person according to its current needs in terms of e-health services. For example, if we focus on the dependency of monitored persons, the notification of the dependency level changes will allow providing the person with quick assistance related to his needs and allowance for new healthcare services.

Changes of context

In order to consider the context changes in IMS, stored iFC should be updated according to the patient profile. Since we have extended the support of the SPT methods, updating the iFC can be easily invoked upon the reception of a given protocol method. We use the HTTP PATCH method to invoke the updates of some parts of the patient's iFC rather than putting a complete replacement of the service profile. The following example shows a simple new iFC that invokes the update of the e-health service profile upon the reception of the PATCH message. In this example, the service profile is enriched with the new service ../drugReminderRecorder/record.php that will be invoked by the S-CSCF upon the reception of the SIP MESSAGE method with certain headers.

Supporting e-health records

In addition to the private medical history record, we use the e-health records (EHR) to save all the e-health related information that can be useful in a context-aware e-health service (e.g. list of required actions, current health status, sensors and access network settings, etc.)

To integrate EHR, we selected the IMS HSS component as the appropriate place. This choice is driven by three main reasons. First, the HSS is contacted by the S-CSCF upon the reception of di erent protocol methods sent by the home network. Consequently, invoking the e-health becomes easily dependent on EHR so one can provide contextaware and personalized services. The second reason is that the IMS specification already defined an intra-operator interface, called Sh [11], that transports transparent data i.e. data where the exact representation of the information is not necessarily understood by the HSS or the transport protocol. This guarantees the privacy of the personal medical data of monitored persons and solves legal issues regarding the Telco operators' access to data. Finally, it is necessary to add the ability to distribute EHR across di erent places in the IMS architecture. Indeed, e-health services are dedicated to a pervasive use with a huge amount of EHR data. Distributing transparent data across di erent HSS is natively supported by the IMS architecture. IMS uses the Subscription Locator Function (SLF) to identify the address of the HSS that holds the subscriber data for a given user. However, the IMS identification of the HSS is based only on the User Identity. Therefore, we propose to consider the couple: (user identity, e-health application server identity) in the identification. Hence, we distribute di erent EHR across di erent HSS. According to the e-health service required by the monitored person, the appropriate part of the EHR is used when the e-health service is invoked. Figure 2.4 shows a general scenario that summarises our IMS extensions and modifications. The e-health service is provided by the application server AS1. The indoor/outdoor monitoring network sends a SIP MESSAGE (step 1) with contextual data about the monitored person (health status change, alarms, etc.). The P-CSCF forwards the request to the S-CSCF (2) which knows already the set of iFC related to the person. The S-CSCF evaluates the conditions of the received data and identifies the AS to be invoked (i.e. AS1). The S-CSCF requests the SLF (3) in order to identify the location of EHR related to AS1. Then, the identified HSS (4) sends the required data in EHR (5 and 6). Now, the S-CSCF is able to invoke the service (7) with the person's context. The person's context is used by third-party application servers in order to provide context-aware and personalized e-Health services. In this way, the context includes contextual data sent by the monitoring network and the queried EHR.

A global context-aware method for broadcasting services

One of the main challenges in providing a global context-aware approach is to consider the constraints of the service provider, network's operator, and user. Regarding these three main actors, we identify six objectives, two objectives for each actor.

For the provider, the objectives are: (1) encoding the data according to available encoders and methods and (2) the selection of the wireless network o ering a QoS adapted to the provided service. For the network manager: (3) reduce the consumption of the network resources by delivering the service when it is possible, and (4) select the least loaded wireless network. For the user, the objectives are: (5) reach the service in a format adapted to his context, and (6) the selection of the network with the best ratio QoS/cost.

The choices of the user can be opposed to the choice of the network manager. To overcome this drawback, we defined a method allowing the three actors of the whole chain to cooperate. We implement the six objectives in the MBMS architecture (Fig. 2.5). In addition, to consider the user's mobility, we integrate the handover of users when partitioning users in multicast subgroups (division process) depending on their context (Fig. 2.6). We use the Hierarchical and Distributed Handover (HDHO) process [START_REF] Suciu | Assessing the Handover Approaches for Heterogeneous Wireless Networks[END_REF] for the handover process where the three main actors (provider, network, user) negotiate the target network according to their own objectives. HDHO is implemented for every medium used by a service and considers the mobility management process in a distributed way. If the class of service is VO or VI, the number of subgroups is the value of CI CoS that maximizes the utility function of users. Hence, the satisfaction of users is a priority. If the class of service is BE or BK, the number of subgroups is the half of CI CoS . Hence, the three actors have the same weight during the negotiation. If CI CoS is empty, the number of subgroups (G CoS ) is the same as the number of flows to be transmitted (F CoS ). Hence,

F CoS flows are transmitted in unicast.
During the third phase, an iterative process, of 7 stages3 , inserts the flows in the subgroups according to two criteria. The first criterion is used first, in stage 3, to consider the reception rate as perceived by the user's terminal (see the flow-chart of figure 2.8). Then, the second criterion is used, in stage 4, to reduce the consumption of radio resources by transmitting, if applicable, the flows of the same subgroup over the same radio network (flow-chart of figure 2.9).

For the first criterion, F CoS flows are inserted in subgroups according to the reception rate. Except for the first iteration (It CoS = 1), the insertion is done with a Layered Media Multicast Control (LMMC) based algorithm [START_REF] Yousefi'zadeh | Layered Media Multicast Control (LMMC): Rate Allocation and Partitioning[END_REF]. The algorithm inserts of the flow f CoS into the subgroup g CoS by comparing the reception rate of f CoS (noted rf CoS , with the square root of the emission rate of the subgroups g CoS -1, g CoS , and g CoS + 1 (noted eg CoS ). In the first iteration, as the subgroups emission rates are not known, the insertion of the flows is achieved using an ISO-DATA based algorithm [START_REF] Jain | Data Clustering: A Review[END_REF].

For the second criterion, we aim to reduce the consumption of the radio networks resources. The first steps of stage 4, where this criterion is checked, are presented in the flow-chart of figure 2.9. First, we check if all the flows of the subgroup g CoS , noted F g CoS , are delivered using a single multicast radio network. If it is the case, we examine the following subgroup. Otherwise, the process examines if all the terminals belonging to subgroup g CoS , noted Rg CoS , share at least one common access technology (e.g. WiFi). If it is the case, the process examines for each common technology whether there exist multicast radio networks common to Rg CoS terminals. If it is true, the list of discovered networks is sent to the HDHO process. The HDHO process selects a multicast radio network for the subgroup g CoS .

Selection of adapted network and transmission mode

As the transmission mode impacts the QoS and the QoE of the user, we defined a distributed and a hierarchical selection process of the transmission mode for a given service. Hence, for a given service composed of a voice and video mediums, the user's device can

It CoS °1 ? g CoS = 1 F g CoS = 0; fg CoS = 0 g CoS = g CoS + 1
g CoS °GCoS ? Each TMME selects a transmission mode according to its objectives. The final decision is based on a hierarchy of decisions. This means that the more the position of a TMME in the hierarchy is high, the more its weight in the final decision is important. We use four kinds of decisions: local, partial, integrated and final decisions. Each decision a ects a level of satisfaction to each path (transmitter-receiver), then, orders each path according to the level of satisfaction. Local decisions are the decisions taken by each TMME. Partial decisions are those achieved by each level of the hierarchy. Integrated decisions are performed by each TMME when it wishes to integrate into its local decision the partial decision of the upper hierarchy. If not, integrated and local decisions are the same. Final decisions are the decisions performed by the highest level of the hierarchy.

f CoS = 1 g CoS = 2 a peg CoS ´1q ¨eg CoS † rf CoS § a peg CoS q ¨eg CoS `1 ? g CoS = g CoS + 1 g CoS °GCoS ´1 ? rf CoS °apeg CoS ´1q ¨eg CoS ? g CoS = 1 insert flow f CoS in subgroup g CoS fg CoS = fg CoS +1; rfg CoS = rf CoS ; Fg CoS = Fg CoS +1 f CoS = f CoS + 1 f CoS °FCoS ? insertion_of_the_F CoS _flows = 0
A typical targeted architecture consists of a broadcast multicast service center (BM-SC) where the service provider implements its TMME, a service provider network (SPN), UMTS/MBMS core and UTRAN networks implementing a TMME in the GGSN and SGSN nodes and the RNC controller, and UMTS/MBMS bi-mode terminals implementing their own TMME. The BM-SC encodes a service, composed of a voice medium and a video medium, with an H.264 codec. The destination IP of packets can be a unicast or multicast address.

For each service's medium, each actor selects a possible path between the BM-SC and the terminal. For this, a terminal identifies existing UMTS/MBMS cells in its neighborhood. Then, for each identified cell, each actor collects the information needed for the calculation of his local decision. Our analysis of possible paths reveals that there are 9 paths for each identified UMTS/MBMS cell. Indeed, in MBMS, the following segments can deliver the packets of services in unicast or multicast mode: GGSN-to-SGSN, then SGSN-to-RNC, then the segment in the radio network which can transmit packets in a point-to-point or point to a multipoint radio channel. Finally, in the UMTS architecture, all the segments are unicast segments.

We defined, for each TMME (BM-SC, GGSN, SGSN, RNC, and terminals), a utility function that satisfies a set of properties (equation 2.3). For instance, the function is increasing between 0 and 1 for all x which means that the satisfaction increases when x increases. In addition, the convexity, (respectively the concavity) of the function models the satisfaction of the actor when 0 § x † S x (respectively when x °Sx ).

The used utility functions extend the work of Suciu et al. [START_REF] Suciu | Assessing the Handover Approaches for Heterogeneous Wireless Networks[END_REF] and are used to perform a local decision of the entity. For instance, for the user's entity (i.e. the terminal's TMME), the function's parameters used for the selection of paths for di erent services and available mediums are shown in Table 2.2.

g sx pxq " 1 ´expp´x -x¨- " ¨S-x¨- x q, with " " -x ¨- -x ¨- ´1 (2.3)

Summary of results

We performed a deep analysis and review of the existing IMS architecture and its complex components. The key question underlying our research was: "how can we rethink the IMS architecture for an easy integration of context-aware complex services like e-health services?". Four improvements were identified, namely with regard to services triggering and priorities, supporting the changes of context, and the storage of e-health data.

The proposed improvements are major for the end users but easy to integrate, for instance, by Telco operators who aim to provide new context-aware and complex services like healthcare and welfare. The contribution reveals that some useful functionalities can be ensured with already existing components such as the SLF and the HSS for e-health date and data distribution. The proposed extension of the iFC and protocols opens up new interesting horizons to more personalized/adaptive services using heterogeneous means. This is a very interesting combination of IMS pervasivity and context-aware approaches.

We evaluated the feasibility of our context-aware method allowing several actors (users, the operators managing the networks, and the service providers) to select the appropriate network and a transmission mode by considering a typical architecture with di erent scenarios. We analyzed di erent scenarios implementing our the context-aware proposal in a heterogeneous architecture composed of UMTS/MBMS networks. In our analysis, we observe that the operator managing the networks has a prominent role in the decision-making process regarding the service providers and the users. This predominance is obtained by positioning him at the top level of the hierarchy of the decision-making and the service providers and users being positioned at the first level of the hierarchy. This scenario modelized the behavior of operators managing the 3GPP architectures in which the choice of the couple (radio network, transmission mode) is performed by the operator.

The evaluation of the di erent decisions distributed among the di erent entities (namely BM-SC, GGSN, SGSN, RNC, and terminals) shows that the decisions consider, each time, the local context and objectives of each entity. In addition, our proposal succeeded to reinforce the architecture components with a means that enables evaluating and ordering the satisfaction levels for each selected path and medium. The experimentations of the proposal showed that it ensures an adaptive selection based on the current context of the whole architecture and allows each TMME to take pertinent decisions. Preferences were also successfully considered. We observe this, for instance, for the cost of services when the user prefers cheapest services with an average bandwidth.

The Mobility Management Entities and the Transmission Mode Management Entities can be seen as part of a programmable control plane and the architectures called 4D architectures [START_REF] Greenberg | A Clean Slate 4D Approach to Network Control and Management[END_REF]. The Autonomic Future Internet group of the European Telecommunications Standards Institute (ETSI) standardizes this kind of architectures and our work could help to define the Decision Elements (DE) proposed by the ETSI.

A Web-based Approach for Optimized and Interoperable Services

Research context

My contributions related to the application of Web technologies in many areas started from 2004 when I was a member of the W3C Device Independence working group (DI WG) [START_REF]Tayeb Lemlouma -contributor Author of W3C notes & standards, as a member of the DI WG, Authoring Techniques for Device Independence[END_REF]. My main contributions using the Web-related technologies and norms have a common objective. We believe that the adoption of the Web improves the quality of experience of users regarding the access and use of services even in complex architectures. This vision can be summarized as follows. We consider any service as the union of the following three sets: (1) inputs, (2) advanced operations and (3) output results. Consequently, enabling a service in limited or heterogeneous environments becomes equivalent to perform the following tasks: (1) delegate the execution of incompatible operations to a smart component, and (2) design a standard and compatible Web interface that allows users to interact with services, rich content, and receives a context-aware output in a form that is adapted to their contexts [35,[START_REF] Layaïda | NAC, une Architecture pour l'Adaptation Multimédia sur le Web[END_REF][START_REF] Layaida | Adaptation and Mobile Multimedia on the Web[END_REF][START_REF]Tayeb Lemlouma -contributor Author of W3C notes & standards, as a member of the DI WG, Authoring Techniques for Device Independence[END_REF]38,39,40,29,27].

In this part, we will address two main challenges. First how to design such targeted Web interface and increase the QoE of users. Second, how to improve the interactions of users in complex services (like healthcare) using the Web. Here, we need to circumvent the limits of the Client/Server model (adopted by the HTTP protocol) which force users to be usually in a passive mode (i.e. consumers of data) [38,39,40].

Generation of adapted Web interfaces

The W3C Web Content Accessibility Guidelines (WCAG) 2.0 [START_REF]Web Content Accessibility Guidelines (WCAG) 2.0[END_REF] propose recommendations for making Web content more accessible for users. The W3C Mobile Web Best Practices (MWBP) recommendation 1.0 [START_REF]Mobile Web Best Practices 1.0, Mobile Web Initiative (MWI)[END_REF] addresses a series of recommendations designed to improve the user experience of the Web with mobile devices. The proposed recommendations refer to delivered content but are not intended to be the best practice for the processes of content creation and rendering on devices. The result of performing complex services must lead to Web interfaces designed in a compliant way to the two previous W3C standards. As we focus on the accessibility in heterogeneous environments (e.g. in smart spaces with connected Things), we propose an approach to generate advanced Web interfaces (AWI) that consider the recommendations of the MWBP standard and where the interface can behave as a portal or middleware between complex services and constrained devices.

The approach guarantees an important number of W3C statements thanks to the use of content pagination with small size, navigation hyperlinks, the use of the same and simple template for di erent pages, and the simple and short URI that identifies hosts of services. We apply a page refreshing when a network operation is triggered. This is compliant with the statement #14 of the MWBP 1.0 standard [START_REF]Mobile Web Best Practices 1.0, Mobile Web Initiative (MWI)[END_REF]. At any time, the user can stop a remote services using hyperlinks.

We evaluate the AWI interfaces according to the sixty statements of MWBP 1.0. Table 2.3 summarizes the support of MWBP 1.0 by AWI. The large compliance, regarding the MWBP statements, is due to the structure's simplicity of AWI that hides the support of advanced networking functionalities. We experiment the proposed interfaces with content pagination, delivery size, and within a real-time adaptation of media content in terms of access time and segments generation time.

Content pagination

The content pagination technique is applied to deliver Web fragments of the original content (i.e. the output of services) in a suitable way that is well balanced between the number of necessary requests and the size of each fragment. In order to paginate the content of a root element (e.g. a server hosting a list of services), the number of child elements must be known in advance. The number of the child elements to display in a AWI interface is set according to the terminal's profile. Handling the terminal profiles is based on the Multimedia Universal Profiling (MUP) schema that we have proposed based on the W3C RDF language [37]. MUP handles near to 14.000 user agents and allows the identification of displaying and rendering capabilities of a device [START_REF] Lemlouma | An Overview of the MUP Repository's Identifiers[END_REF].

Delivery size

For constrained devices, outputs of services, delivered in a Web form, must be limited in size. In our approach, we propose to make a balance between the scrolling and pagination of results presented in AWI interfaces. Long scrolling negatively a ects the user experience and requires a long time load. On the other hand, an important pagination implies multiple requests to receive relevant results. In order to optimize our process, we consider three input parameters: the screen size of the device, the size of delivered page and the network access technology used by the device. AWI delivers a paginated content where the number of displayed links in each page depends on terminal's profile (screen size and access technology) and is limited to a maximum of 20 links. This choice guarantees the compliance with the MWBP statement #21 in respect to the default delivery context which was defined as being the minimum delivery context specification necessary for a reasonable experience of the Web [START_REF]Mobile Web Best Practices 1.0, Mobile Web Initiative (MWI)[END_REF].

Real-time media adaptation

Media streams (video and voice) are usually involved in complex services such as in healthcare related services. Media delivery has to improve the user experience and to be adapted to devices. Several media delivery protocols and methods were proposed for di erent environments including limited devices [START_REF] Ma | Mobile Video Delivery with HTTP[END_REF]. In order to gain access to a large number of heterogeneous devices and avoid complex network requirements, we adopt the HTTP as the delivery protocol. For heterogeneous environments, HTTP is a common protocol either for downloading or streaming media or structural content. HTTP is easily accepted by firewalls and di erent network configurations which is not the case of other methods like RTP over UDP with dynamic ports.

We adopt an approach of media fragmentation, using the HTTP Live Streaming [START_REF] Pantos | HTTP Live Streaming[END_REF], similar to content pagination for structural content. AWI delivers a hyperlink pointing to a playlist file (m3u file in our case) that contains links to di erent video fragments. The playlist is updated each time a new video fragment is created. We use the VLC transcoding [START_REF]LAN Project[END_REF] with 10 seconds video segments. The generation and download of segments depend on the segmenter implementation, the original and targeted video transcoding, the segment size and the available link bitrate between the transcoder and the terminal.

Emerging Web technologies for complex services

Like human-centric services, that we will discuss in chapter 3, handling emergency situations represents a complex service of paramount importance in smart spaces. Indeed, such situations potentially represent an immediate risk to the users of a given space and may require urgent actions. IoT is involved in emergency management where low latency has an impact on their performances [START_REF] Gupta | iFogSim: A Toolkit for Modeling and Simulation of Resource Management Techniques in the Internet of Things, Edge and Fog Computing Environments[END_REF]. More specifically, the concept of Web of Things (WoT) presents an e cient framework to enable the interaction with the space devices using advanced Web applications [START_REF] Raggett | The Web of Things: Challenges and Opportunities[END_REF][START_REF] Jin | Telemedicine in the Cloud Era: Prospects and Challenges[END_REF].

In order to enhance the interoperability of complex services towards the existing heterogeneity of Things, medical platforms, and networks, we take advantage of emerging Web technologies. We focus on the WebRTC technology [13] to enhance the interoperability and interactions with users (subject and health professionals). The WebRTC is used to ensure a remote control of the space gateway/network and real-time monitoring of subjects. We take benefits from the advanced functionalities of WebRTC, that enriched previous Web norms, in order to propose a multiplexing of video/audio streams of di erent sources into the same video/audio channel. We consider enabling remote assistance services with an interoperable and pervasive accesses. Consequently, di erent health actors gain an e cient interaction with monitored subjects and their space from anywhere. Users could benefit from di erent healthcare services such as diagnosis, treatment, and prevention of residential accidents and injuries.

Description of the proposed architecture

Our deep literature review reveals several existing works that addressed the use of Web technologies for complex services [START_REF] Abdallah | Web-based Robot Control for Wrist Telerehabilitation[END_REF][START_REF] Solana | Improving Brain Injury Cognitive Rehabilitation by Personalized Telerehabilitation Services: Guttmann Neuropersonal Trainer[END_REF][START_REF] Bose | A Two Way Emergency Medical Monitoring System with a Computing Device Fitted on a Rotating Holder[END_REF][START_REF] Pavón-Pulido | Cybi: A Smart Companion Robot for Elderly People: Improving Teleoperation and Telepresence Skills by Combining Cloud Computing Technologies and Fuzzy Logic[END_REF][START_REF] Moustafa | Remote Monitoring and Medical Devices Control in eHealth[END_REF]. For instance, in [START_REF] Abdallah | Web-based Robot Control for Wrist Telerehabilitation[END_REF], the proposed approach enables a real-time remote control of home devices and bidirectional communications involving audio, video, and data. Other systems use the WebRTC to enable audio-visual communication in conjunction with other technologies such as SMS [START_REF] Bose | A Two Way Emergency Medical Monitoring System with a Computing Device Fitted on a Rotating Holder[END_REF]. Unfortunately, neither of these works is fully based on the normalized technologies nor ensures an advanced access to the user's space. WebRTC channels optimization was not addressed and it was not mentioned how to define customized emergency management roles.

Our review helped us to come up with a set of requirements, propose a new architecture for emergency services, and address the main challenges for such complex service. These challenges are mainly the genericity of the solution, remote access, interoperability, heterogeneity, real-time communication, mobility, user's interface, and the traversal issues of network address translation (NAT) [38]. Figure 2.10 shows our proposed architecture.

The main components are:

• Home devices: sensors and actuators of the user's space. • Web applications: personalized Web interfaces for controlling the devices of the space and providing the main functionalities such as the monitoring and alerts.

• Home gateway: guarantees the communication between the devices and the Web application. It performs an advanced algorithm to detect risky situations based on the sensors and database data 4 .

• Web and Signaling servers: provide the Web application and signaling functions for the caregivers.

• STUN and TURN Servers: used to solve NAT traversal issues.

The proposed home gateway consists of many modules that ensure the di erent functionalities of a Home Emergency Management System (HEMS). For instance, the control module is responsible for running algorithms to control the home gateway, the home services, and automatically manages emergency situations. The WebRTC native module enables the communication with the Web applications using WebRTC channels for real-time audio/video streams, data, and commands (Figure 2.10).

WebRTC flow

In order to increase the interoperability of complex services, we provide remote caregivers with a Web application using WebRTC. This approach enables a pervasive access to services anytime and using constrained devices. The key advantage of WebRTC is the integration of advanced functionalities combining real-time data and streams with the ability to interact (send commands and apply actions) with the monitored space. Thanks to the WebRTC, the proposed architecture enables caregivers to interact with the monitored person and his surrounding space. In addition, remote caregivers can interact with assistants on-site (e.g. a family member) to achieve some complex or immediate actions.

We propose the following WebRTC flow message when an emergency situation or event occurs (Figure 2.10). First, the home gateway tries to manage the situation by performing the adequate finite states machine (FSM5 ) to reduce or avoid any damage to the user. Second, the gateway generates a Web application and uploads it to a Web server (Step 1 ) with the required information to initiate a WebRTC session. This is paramount to configure the session with data related to the emergency. The objective is to speed up the care intervention and minimize lead times of signaling messages.

Depending on available access technologies (e.g. VoIP facilities) and contact form (e.g. calls and SMS), in Step 2, emergency notifications are sent to available caregivers. Hence, the caregiver starts the application (Step 3 ) by establishing a WebRTC session (Steps 4 and 5 ). WebRTC sessions are established directly (Step 6 ) or through the TURN server (Step 7 ) after the reception of the gateway public address (Step 4 ) and the negotiation of the session parameters (Step 5 ). Using the Web applications, caregivers can provide remote assistance using WebRTC channels with the required data and real-time streams regarding the emergency situation, available home devices and sensors, and the monitored person.

Summary of results

The evaluation of our generation approach of adapted Web interfaces shows a large compliance regarding the MWBP statements [START_REF]Mobile Web Best Practices 1.0, Mobile Web Initiative (MWI)[END_REF]. This increases the accessibility and flexibility of the interfaces for heterogeneous contexts and allows them to receive outputs from complex services. The evaluation of AWI interfaces regarding the HTTP responses and content-length variations over the user's access time confirms the conformance of our approach with regards to the size metric adopted in the default delivery context of MWBP. The maximal size of paginated Web content is near to 3,5 KB.

For more complex Web contents, particularly with outputs including important lists of hyperlinks (e.g. media or services items) with several parameters, the evaluation of the AWI result's size shows that the size will never exceed 10 KB. This is suitable for any network access technology (cellular, wireless and wired) and required in a default delivery context. The size of each received result (after the network discovery of services) still very small. Hence, this will not negatively a ect the QoE.

The AWI media adaptation was experimented using a native player of a mobile device (AppleCoreMedia of an iPhone 4GS, iOS 5.0.1) during a video fragmentation. The original video is a 1,02 Gbytes HD video of 25 minutes with a video codec of H264 MPEG4 AVC (part 10), 1440 per 1080 resolution and audio codec of A52 with a rate of 384 Kb/s. The adapted format is H.264 Base Profile, level 3, with a 320 per 240 resolution. The results show that the video segmentation delays vary from 0 to 4 seconds. The generated fragments allow the player to quickly download and apply segments bu ering for a smooth play-out regardless the original size and format.

WebRTC was adopted to consider complex services such those requiring bidirectional communications involving audio, video streams, and data with more interactivity of users. We focused on the use case of home emergency and proposed an interoperable architecture for this service.

For the evaluation purpose, we implemented a prototype of a home gateway that provides services for monitoring a home. Since WebRTC is still an emerging technology, the development of such a prototype was a challenging task especially to provide a WebRTC native module able to interact with devices other than those integrated into Web browsers [38]. Our prototype served to validate our approach in terms of feasibility, delays, and scalability. The later will be discussed later. The experimentations of the prototype show that when an emergency situation occurs a caregiver can remotely retrieve information about the person and interact successfully with the monitored space (control of devices and real-time interactions with assistants on-site).

We evaluated the round-trip delays between the Web application and the home gateway using secure WebSocket, HTTPS, and WebRTC Data Channel. The best performance is observed with WebSocket when the size of exchanged messages is less than 211 Bytes approximately. Otherwise, the delays start to significantly increase and become greater than the WebRTC Data Channels. HTTPS gives the worst round-trip delay time whatever the messages sizes. WebRTC Data Channel provided a reliable exchange of data and solves the NAT traversal issue. In addition, the exchange is secure without the need of using additional certificates neither on the home gateway nor on the remote Web application. The major drawback is the use of additional servers (STUN, TURN, and signalization). Fortunately, in a global approach with smart cities perspectives, servers can be mutualized to manage several home gateways and Web applications. To avoid privacy and security issues, all public servers must be managed by a trusted entity like a well protected medical institution.

Conclusion of the Chapter

In this chapter, we addressed the adaptive and context-aware integration of services from network architectures an protocols perspectives. Our contributions were classified into three main topics: improving digital home architectures, integration of services contextualization into major architectures of Internet operators, and the use of a Web-based approach to handle the heterogeneity of contexts and increase the satisfaction of users.

Our first contribution related to digital home architectures highlighted the major drawback of current architectures where users are asked to significantly alter traditional workflow patterns to accommodate the system, rather than the system accommodating them [25,27]. Indeed, in current architectures, there is no proper consideration of terminals context (software and hardware capabilities) [37] nor the context of home users (preferences and behavior) [35]. To solve these issues, we proposed Universally to provide an easy and interoperable access to existing home media resources such as media servers and audio/video related services. Content and services delivery is achieved only when it is requested by the user thanks to the HTTP client/server model. As a result, unnecessary periodic tra c and content that is not adapted to the context of terminals and home objects are avoided.

For the user's quality of experience, the provided interface, masks the complexity of networking operations (e.g. discovery and analysis of services and media) and delivers, using the Multimedia Universal Profiling schema (MUP), a content adapted to the targeted devices. Furthermore, our adaptive scheme of media selection takes on board the user preferences and their changes over time [28,26].

Our second contribution attempts to improve the integration of services contextualization into the architectures used by Internet operators. We focused on the two major architectures of IP Multimedia Subsystem-based Next Generation Network (IMS-NGN) and the Multimedia Broadcast Multicast Service (MBMS). These architectures were carefully selected because they have a particular potential for context-aware approaches in the sense that they provide pervasive services using heterogeneous access technologies [29,30,31,32,33,34,36].

We performed a deep review of the complex IMS components and proposed appropriate changes and extensions for an easy integration of context-aware services. To this end, we extended the IMS Initial Filter Criteria (iFC) [START_REF]3GPP, IP Multimedia (IM) Subsystem Cx and Dx interfaces; Signaling Flows and Message Contents (Release 11)[END_REF] in order to consider the context of services and users and tailor the outbreak of services according to the context dimensions. The strategy was to propose an easy and scalable integration of several scattered services by avoiding the creation of new architectural components. We focused on e-health services and integrate the e-health records (EHR) using the IMS transparent data. We defined a way to invoke services, based on iFC and a flexible selection of thirdparty application servers, and considered the priorities of services and changes in contexts through the HTTP PATCH method. Our proposal represents an interesting combination of IMS pervasivity and context-aware approaches. It opens up new interesting horizons toward personalized/adaptive services using heterogeneous means.

The second architecture concerned by the proposal is the Multimedia Broadcast Multicast Service (MBMS) architecture. We were interested in MBMS with the aim to propose a global approach that considers the context and objectives of several actors, namely the operators managing the networks, the service providers, in addition to users. We focused on the delivery (broadcast) of di erent classes of services in respect of six objectives distributed among the main components of the architecture. Our heuristic of services delivery defined three phases wherein the last phase, an iterative process of seven stages is carried out. In this chapter, we only focused on two criteria, used in stages 3 and 4. These criteria are related to the reception rate perceived by users and the consumption of radio resources while transmitting a service. The evaluation of our proposal showed that the parameters of a service delivery consider the local context and objectives of each entity of the global architecture. For a given service, our approach provides a flexible means to evaluate and order the satisfaction levels for each selected path and medium.

In our third contribution, we addressed the use of Web-based approaches to handle the heterogeneity of contexts and increase the satisfaction of users [38,35,39,40]. In this realm, we first contribute to the use of standard and compatible Web interfaces that increase the QoE of users. the objective is to help users to easily interact with complex services, rich content, and receives a context-aware and adapted output. The content pagination, optimization of delivery size, and the integration of real-time media adaptation were the main techniques used in our approach. All of these techniques were defined while bearing in mind the compliance regarding the W3C standard content accessibility guidelines [START_REF]Web Content Accessibility Guidelines (WCAG) 2.0[END_REF] and recommendations for making the content more accessible to users [START_REF]Mobile Web Best Practices 1.0, Mobile Web Initiative (MWI)[END_REF]. The evaluation of our generation approach of adapted Web interfaces (AWI) shows a large compliance regarding the existing norms. The provided interoperability with optimized delivery sizes and ability to adapt, in real-time, media formats increases the accessibility and flexibility of the interfaces for heterogeneous contexts. Second, we focused on more complex services, like healthcare and welfare services, which usually require a bidirectional participation of users. We attempt to circumvent the limits of the Client/Server model (adopted by purely HTTP-based approaches) in which users are in a passive mode (i.e. consumers of data). We adopted the WebRTC emerging technology [13] to enhance the interoperability and interactions with users. We focused on the use of WebRTC to provide a remote control of smart spaces and real-time monitoring of users specifically for handling emergency situations. Our implemented prototype helped us to experiment our approach in terms of feasibility, delays, and scalability. The experimentations show that our proposed architecture succeeds to handle emergency situations in a pervasive and interoperable way. It provides health professionals with the ability to retrieve the person's data and interact, in real-time, with the monitored space and assistants on-site.

These contributions are parts of the results of four Ph.D. thesis work:

• Joël Penhoat, University of Rennes I, that I co-supervised with M. Salaün (Senior expert at Orange) [30,31,32,33],

• Selim Ellouze, University of Rennes I, that I co-supervised with G. Rubino (Research Director at INRIA) [START_REF] Ellouze | A Bidirectional Network Collaboration Interface for CDNs and Clouds Services Tra c Optimization[END_REF][START_REF] Ellouze | A Proposal for Improving Network-Aided CDN Server Selection[END_REF],

• Allal Tiberkak, University of USTHB (Algeria), ongoing Ph.D. thesis supervised by B. Abdelkader (Professor at the University of USTHB) [38,36],

• Saad El Jaouhari, IMT Atlantique, ongoing Ph.D. thesis supervised by A. Bouabdallah (Associate Professor at Télécom Bretagne) and J-M. Bonnin (Professor at IMT Atlantique) [39,40],

and other collaborations such as with the T2i/LIUPPA and LIGM teams [26,29].

Introduction

In this chapter, we focus on the use of the context as the foundation stone for humancentric services. How can the context be e ciently modeled for an easy integration in complex services? and, how can we design, experiment, and evaluate context-aware services? In answer to these questions, we provide our contributions through two main topics related to the e-health realm: context processing and design of services.

In the context processing topic, we study, compare, and evaluate the existing e-health models that describe the user's context such as the needs of help, and dependency degree of persons. We aim to identify the degree of help required by users while facilitating the future integration of our propositions of services with real-world environments such as health institutions and smart homes [41,42,43,44,45,26,37,25].

In the second topic with regards to the design of services, we discuss three categories of context-aware services using three di erent approaches. The first category is the services based on the daily living activities where person activities and actions, performed in the smart space, represent the primary context of our system. The second category of services takes on board the presence of illness while the third category extends the scope of services to the outdoor environment with localization services. We investigate these three categories of services using three di erent approaches: the first one is algorithmic with the proposition of a new adaptive algorithm, the second one is based on finite states machine (FSM), and the third approach is based on the combination of localization techniques and genetic algorithms [16,46,47,38,28].

Understanding and Modeling the Context

Research context

In this section, we focus on understanding the context with the aim to provide e cient context-aware and adaptive services. Targeted applications concern e-health services for persons evolving in a smart space. To reach our objective and for a better understanding and handling of the context, we address the analysis of existing contextual models, the modeling of the context, and the generation of realistic scenarios.

As we focus on e-health services, more precisely providing automatic assistance for persons in need of care, we first analyze the existing models that describe such user contexts. We aim to strike two objectives. In the first objective, we aim to identify the needs and model the degree of help required by end users with automatic and adaptive services. In the second objective, we seek to facilitate the integration of our propositions with the real world such as health institutions and smart homes. The degree of help required by a given person is called dependency level. We study the overlaps and di erences between the most important models (used to evaluate the dependency of persons) and propose a matching approach between di erent models with a new evaluation algorithm. It is important to notice that in the e-health realm, no existing works addressed the crossevaluation of contextual models. The only work was presented in [START_REF] Gervais | Classification des Personnes Âgées en Perte D'autonomie Fonctionnelle : Comparaison des Profils Iso-Smaf aux Groupes Iso-Ressources issus de la Grille Aggir[END_REF] which compared the classification of persons' needs with the two popular models AGGIR and SMAF. The evaluation was achieved with a limited group of 207 persons.

Second, we propose a modeling of the context starting from the following observation. In existing contextual models, we observe that the concept of profiles used to describe a given context, particularly for users and devices, is poor semantically, not generic and not enough dynamic to consider the evolving situations of persons [START_REF] Maslow | A Theory of Human Motivation[END_REF][START_REF] Henderson | The Nature of Nursing: A Definition and its Implications for Practice, Research and Education[END_REF][START_REF] Aggir | Autonomy Gerontology Iso-Resources Group) model, The National Standardized Instrument Determining the Attribution of the Specific Dependence Allowance in France[END_REF][START_REF] Héber | The Functional Autonomy Measurement System (SMAF): Description and Validation of an Instrument for the Measurement of Handicaps[END_REF][START_REF]User Agent Profile, Specifications[END_REF][START_REF] Klyne | Composite Capability/Preference Profiles (CC/PP): Structure and Vocabularies 1.0[END_REF]. Existing profiles describe mainly static descriptive values and do not express rich semantic constraints related to the user or the surrounding environment. Furthermore, mixing all the existing heterogeneous profiles inside one application domain lead to an explosion of profiling information. Consequently, the management, the storage and the access of all these information could lead to a real bottleneck, thus decreasing the e ciency of systems. This represents an important challenge in human-centric services because relevant and optimized profiles modeling is more than necessary. Indeed, in some critical situations, such as in e-health emergency services, the system has to retrieve the relevant information at a given time and make the relevant decisions as soon as possible.

Modeling the context or analyzing existing contextual models is not enough when it comes to experiment and validate a new context-aware system. This is why, in the third topic of this section, we address the generation of realistic contexts. In order to evaluate the e ciency of a given adaptive system in learning and reacting to the user's context (e.g. the person's behavior and the amount of needed assistance), it is required to process series of rich scenarios that can involve a person in his real environment. This requirement is of great importance for critical services such as e-health and assisted living systems [START_REF] Cardinaux | A Home Daily Activity Simulation Model for the Evaluation of Lifestyle Monitoring Systems[END_REF]. The generation of simulated contexts can provide su cient data to help the design and test of new approaches without risking the safety of persons in case of fails or runtime errors. It is worth noting that real-life platforms require complex implementations including an important integration of sensors in the smart space. Furthermore, a real-life implementation requires a long-time and risky testing. This represents a lack of flexibility regarding the aim to vary contexts particularly if proposed systems should evolve during the experimentations.

Analysis of existing models

Existing models have di erent methods to calculate the dependency level of a given person. They are based on the consideration of activities of daily living (i.e. ADL, e.g. eating and washing) and instrumental activities of daily living (i.e. IADL, e.g. medication use and budgeting). We observed that the concept of person's profile and group is used in these models in order to classify the persons based on their needs, assistance, costs, diagnosis, etc. We focus on the most popular and used models: AGGIR model [START_REF] Aggir | Autonomy Gerontology Iso-Resources Group) model, The National Standardized Instrument Determining the Attribution of the Specific Dependence Allowance in France[END_REF], used in France, and SMAF model used in Canada [START_REF] Héber | The Functional Autonomy Measurement System (SMAF): Description and Validation of an Instrument for the Measurement of Handicaps[END_REF]. We analyzed the compatibility between the two models including the considered human's activities (items), the results and classification. We identify the weakness of the existing models in order to determine the improvement areas related to the consideration of the person's context and the focus on the main activities to be monitored by the context-aware system.

The AGGIR model considers 17 items describing the activities of daily living. Eight of them are really used in the classification of the dependent persons, which in turn creates 13 profile ranks and 6 groups. The 13 profile ranks refer to a decline in the autonomy of persons. Each considered item is qualified, manually by a medical reviewer using the four possible adverbs: Spontaneously (S), Completely/Totally (T ), Usually (U ) and Correctly (C). According to a logical condition involving these adverbs, a given activity is evaluated with three modalities: A (completely autonomous), B (partially dependent) or C (dependent). The SMAF model has 29 items which are included in five aspects of functional abilities. These abilities are ADL, mobility, communication, mental functions, and IADL. Each item is given a score of 0, -0.5, -1, -2, or -3. There are 16 items measured by this 5-point rating scale, while 10 items are measured only using a 4-point rating scale (0, -1, -2, and -3). The person's disability, varying from autonomy to dependency, is identified with a maximum negative score of -87. A higher disability score denotes a higher level of dependency, thus, the amount of person's need for care is increased.

Matching di erent contextual models

A sound knowledge of the user's context helps to determine the needed help and allows to provide automatic e-health services and care accordingly. In order to study how the person's context is handled and evaluated in di erent models, we perform a set of simulations regarding the possible variation of contexts. Then, we apply the SMAF and AGGIR models to evaluate these contexts. In order to be able to evaluate the same person with di erent models using our simulations, we perform a matching and aggregation between the SMAF and AGGIR items. Aggregated items are those referring the similarity of activities. To do so, we have identified thirteen (13) items defined in SMAF and all the items (8) defined in the AGGIR model. In our matching approach, we apply either one-to-one associations and many-toone associations. This means that we associate either one item of the SMAF model with one item of the AGGIR model or several items of SMAF with one item of AGGIR (Figure 3.1). For instance, in the one-to-one association, the eating item of the SMAF model, with scoring criteria varying from -3 to 0, corresponds with the eating activity of AGGIR with the scoring criteria of A, B or C. For many-to-one associations, we match the SMAF and AGGIR items using a specific weight based on the priority for each item. For instance, for the AGGIR's hygiene item (H ), we associate the washing item with a 0.70 ratio of priority and the grooming item with a 0.30 ratio of priority. Consequently, we have H = 0.7.Washing + 0.3.Grooming (see Figure 3.1).

The choice of these weights is explained by the observation that only some part of grooming properties cares about cleaning in SMAF. The SMAF scoring of 0 refers to a full autonomy while -0.5 refers to autonomy with minor di culties. Therefore, our matching process associates 0 and -0.5 with the A scoring of AGGIR. The SMAF scoring of -1 and -2 indicates an increased level of dependency so we associate it with the B evaluation in the AGGIR model. Finally, the maximum level of dependency is evaluated with -3 in SMAF and, hence, with C in AGGIR. Note that in one-to-one matching we use the following associations:

Cross-evaluation of contextual models

As mentioned previously, in order to study how the person's context is handled and evaluated in di erent contextual models, we perform a set of simulations regarding the possible variation of contexts. In our simulation, a huge amount of data is handled. This amount comes from twenty trillion (5 19 x4 10 ) of possible contexts when we consider the SMAF context dimensions and more than six thousand (3 8 ) of contexts using the AG-GIR dimensions. Each processed context represents a person with a certain situation of dependency. A given situation is represented by values (rating scales) associated with all the human activities defined in the used model.

Based on the previous matching process, we propose a new algorithm (Algorithm 1) that evaluates all the di erent context variations related to the persons' activities. The more a context-aware system considers contextual dimensions, the more adaptive services it can provide. However, handling a large number of contextual dimensions is challenging because it requires huge resources of processing and memory. Such is the case of Algorithm 1. Indeed, for only one million of context instances, the running time is approximately 2.66 seconds under a DELL Precision M6700 computer with an Intel® Core™ i7-3940XM, 3.20 GHz processor and 32 GB of RAM. Hence, it requires approximately 1.687.826 years for the twenty trillion of possible situations. For the sake of clarity, we have deliberately chosen to present it in the present form. The reader can refer to [41] for our optimized version of the algorithm 1 .

In Algorithm 1, we consider all the SMAF activities (called SM 1 to SM 29 ) evaluated either using the SMAF or AGGIR model. We compute the SMAF profiles using the (GetSMAFprofile) function and match the 13 items of SMAF to all of the 8 items (A 1 to A 8 ) used in AGGIR. Then, we compute the AGGIR scores (AggirScor). The algorithm returns the M matrix that gives the distribution of all the dependency evaluations using the two models. Indeed, after each simulation's instance (the inner loops of Algorithm 1, e.g. Lines 1, 5, and 6), the M matrix counts and save the instance into the right index of

M (i.e. M [SMAF-Profile, GIR] -M [SMAF-Profile, GIR]

+ " with " = 1).

Modeling the context

In smart spaces, we propose to consider three kind of profiles: (1) data related to the user (user profile), (2) characteristics of objects available in the smart environment (space profile), and (3) services that could provide or process any kind of data (service profile). For the user profile, a wide variety of sources could provide required information. Data sources could be stored locally or remotely using, for instance, medical records (Section 2.3.2), relatives or friends, visited places, agendas, etc. The user profile can integrate and/or refer to such data. Parts of the user's profile may be public or private with a restricted/controlled access. The space's profile describes all the capabilities of a smart environment in terms of hardware and software. For instance, the available objects, sensors, handheld devices, and any device involved in the delivery of services or the interaction of the users (e.g. TV sets [25,26,27,28,35,37]). The service profile describes related actions that a given service provides. The main information is related to the service types of inputs and outputs, its availability, current e ciency, execution constraints, and location. For more details about our profiling modeling, please refer to [26,37,42].

Whatever the specific objectives of a given context-aware application, we identified the Semantic Web technologies and linked data principles as a pillar of the context modeling.

Algorithm 1 Evaluations of contextual models using the context variation

1: for SM 1 -1 to 5 do 2:

...

3:

//note that in some loops, SM variable varies between 1 to 4 and not between 1 to 5 4:

... compute the score using 8 predefined functions S 1´8 applied on items A i (see [START_REF] Aggir | Autonomy Gerontology Iso-Resources Group) model, The National Standardized Instrument Determining the Attribution of the Specific Dependence Allowance in France[END_REF]) Our approach takes on board the following considerations.

• Expressiveness: since several data have to be connected (local and external data which may be available in the linked open data cloud), we adopted the W3C RDF standard in order to reach the expressiveness of context in a compatible way. The standard supports ontologies (e.g. RDFS and OWL) used to specify flexible semantic vocabularies (e.g. general concepts and subconcepts) as well as complex inference rules (e.g. subsumptions, disjunctions and other combinations).

• Storage optimization: thanks to RDF, we refer to URIs in the description of contexts. The benefits of URIs are twofold. First, it reduces the size of a given profile by distributing some of its parts (or specific facets) and/or default information in several data centers. Parts are loaded and processed on-demand when it is required. Second, in a smart environment, contexts may refer to a common set of data, hence these data sets are stored once and not duplicated. The former allows optimizing the profile access, while the latter reduces the storage space.

• Processing optimization: human-centric services may be invoked to provide upto-date data. For instance, personal social contacts and their availabilities, the current weather, the EHR, current localization, etc. The services may be annotated with rich semantic descriptions (like WSMO and SAWSDL [START_REF] Farrell | Semantic Annotations for WSDL and XML Schema[END_REF]) in order to better retrieve and compose them. Usually, profiles contain dynamic parameters that are updated regularly. In profiles, for particular properties, instead of hardcoding values and periodic updates, the profiles refer to potential services that might provide relevant information at a given time.

Generation of realistic contexts for services validation and experimentations

Requirements and challenges

The context generation process must follow some requirements. As we focus on e-health services in smart spaces, one key requirement for such generation is that the daily life scenario (i.e. one generated context) should consider events and human activities in a realistic way. Another requirement is the need of long periods contexts. This allows the evaluation of various aspects of the system such as the dynamic monitoring and the health decline impact. Another requirement for the input scenarios is to consider abnormal situations that may occur during the monitoring of a person.

To fulfill the identified requirements and gain an e cient evaluation, it's necessary to select realistic, rich and flexible scenarios that take into consideration various human activities monitored for long periods. Simulating realistic daily activities is a challenging task since the achievement of activities is usually subject to a complex number of factors such as basic needs, lifestyle, physical, and mental abilities. The scenarios should be impacted by the level of dependency and the variation of persons' profiles. Unfortunately, our deep review reveals that existing datasets and real-life monitoring cannot provide a good testing environment [16,46,[START_REF] Kasteren | Datasets for Activity Recognition[END_REF][START_REF] Ordóñez | Activity Recognition Using Hybrid Generative/Discriminative Models on Home Environments Using Binary Sensors[END_REF][START_REF] Logan | A Long-Term Evaluation of Sensing Modalities for Activity Recognition[END_REF][START_REF] Cook | CASAS: A Smart Home in a Box[END_REF][START_REF] Virone | Modeling and Computer Simulation of Physiological Rhythms and Behaviors at Home for Data Fusion Programs in a Telecare System[END_REF][START_REF] Kormányos | Multilevel Simulation of Daily Activities: Why and How?[END_REF].

Context generation model

In our generation of contexts, we were based on the variable-length Markov class (VMM [START_REF] Galata | Learning Variable-Length Markov Models of Behavior[END_REF]) which helps in increasing the expressivity level while generating sequences of contexts. Such a sequence is denoted as follows: s " a 1 , a 2 , ..., a l where l is an order greater than one. Activities, a i , are the human actions performed for the di erent activities as defined in geriatrics. Based on our previous contribution (Section 3.2.2), we focused on the activities of the SMAF model enriched by additional actions. We associate, for each action, a startingTime and a variable (pseudo-random) duration activityDuration in the range [aD min , aD max ]. A pseudo-random transition time transitionTime pa i , a j q P [tT min , tT max ] is used from the end of each action a i to the starting time of an action a j (Figure 3.3). To keep outputting realistic sequences, we define 5 transition matrices which correspond to the following day periods: from 8.00 am to 11.00 am, from 11.00 am to 2.00 pm, from 2.00 pm to 5.00 pm, from 5.00 pm to 10.00 pm, and from 10.00 pm to 8.00 am. In addition, we define two other matrices for particular periods and days such as for Friday and Sunday since these days could include some specific contexts for the daily life of a person. The most activities that can be achieved by the person during a given period are associated with the highest probability. For instance, taking a shower in the morning, having dinner in the evening, possible house keeping in Friday and leaving the home for a long period in Sunday. Our contribution gave rise to our project eHealth Monitoring Open Data Project [45]. The reader can access online the related datasets, matrices, and scenarios in both human readable and coded versions.

We use the Markov property in our generation strategy with the seven matrices M pPt1 to 7u used to explore di erent transitions. Each state a i is a possible human action or activity as defined based on real-world geriatric models. Next actions, a j , follow the probability P (a j | a i ) = M p (a i , a j ). In order to consider di erent contexts and levels of dependency (i.e. the degree of needed help), the definition of probabilities P is performed for each person's profile as defined in the SMAF model. When a new action a j is selected, it is appended to the sequence s which is the sequence of the current activities performed by the person.

Although the used probabilities are strongly related to the real-world SMAF model, relying exclusively on the probabilities of transitions provides what is knows as a random walk approach. In order to improve our approach, it is important to avoid the possible drawbacks of the random walk. We cite, mainly, the possible consideration of less probable sequences and the lack of control during the construction of sequences. Indeed, an absolute random walk could end up with a sequence that ignores a required activity in a given day period (e.g. morning or afternoon). This may occur even if the person is able to achieve such activity. Another example is the possible generation of a sequence that takes a long time that significantly exceeds a given day period. To tackle these issues, we control the generation process of contexts by adopting a set of constraints. This approach leads to define a pseudo Markovian model, where sequences s rely on the transition probabilities under certain conditions. Each transition, from a current state to a possible state, is checked using the introduced constraints. If the transition to a new state violates, at least, one constraint, the random walk is reoriented to another possible state.

Constraints and matrices M p guarantee, by construction, the following properties: (a) a finite generation and convergent sequences, and (b) transitions that are faithful to the person's dependency level as defined in geriatrics [START_REF] Raiche | Yearly Transitions of Disability Profiles in Older People Living at Home[END_REF]. Two main constraints are introduced: the frequency of occurrence f (a i ) P [f min , f max ] of some particular activities and the duration sd of a sequence's segment. Thus, a given activity can occur at least f min (that could be null) and at most f max . This constraint controls how much particular activities should appear in a sequence's segment. For example, the number of grooming and eating for an autonomous person. When all the non-null frequencies are satisfied, the process stops when the duration of the whole generated sequence reaches or starts to exceed the sd value. The value of sd is computed as follows:

sd = ∞ l i"1 activityDurationpa i q + ∞ l´1
i"1 transitionTimepa i , a i`1 q, with a sequence s " a 1 , a 2 , ..., a l .

Summary of results

The output of Algorithm 1 (i.e. the M matrix) led us to observe an uneven distribution of the two contextual models AGGIR and SMAF with some incoherence in the evaluation of the persons' level of dependency. The results have highlighted that the AGGIR model is not as comprehensive as SMAF. For instance, there is a mismatch between the levels of autonomy and dependency from AGGIR to SMAF: the same person can be considered autonomous using one model and dependent using the other. There is also incoherences in the distribution of the persons' evaluations: from the autonomy level in AGGIR to the dependency level in SMAF and, similarly, from the dependency level in AGGIR to the autonomy level in SMAF. Indeed, the number of persons considered as autonomous in SMAF (0.258%) is less than this number in AGGIR (5.235%) while the number of dependent persons in SMAF (0.087%) is more than this number in AGGIR (0.007%). Finally, the AGGIR model is not covering all the important contextual dimensions that denote the real performance of individuals in achieving their daily tasks. On the other hand, SMAF shows weaknesses in some aspects. The model lacks validity periods regarding the evaluations of the human activities and shows some exaggerations by taking into account some activities in situations of severe dependency.

In the e-health ecosystem, linking validity periods to the context evaluations is paramount if we target providing context-aware services. The validity should be tailored to the type of activity and the necessity of updates with a well-determined threshold. From the optimization perspectives, not all of the activities have to be monitored all the time. For instance, in severe dependency levels, it is not necessary that the context-aware system monitors the grooming activity all the time. Indeed, the system has to monitor only appropriate activities that could trigger some services. Finally, we realized that the existing models are not e cient to give an accurate assessment of the human dependency. Indeed, the existing models do not reflect the real context of the person. As we have seen, the same person can be considered autonomous using one model and seen as a dependent person in another model.

Our deep analysis of existing contextual models in e-health with the output of Algorithm 1 reveals several interesting observations and lessons. These observations enabled us to highlight the weaknesses of models and identify their drawbacks. The learned lessons helped us to adopt a new approach that ensures a better knowledge and handling of the user's context. This new approach proposes a new modeling of the context and a strategy of generating realistic contexts that gave rise to our project eHealth Monitoring Open Data Project [45]. As we will see in the next parts of this document, both of the context modeling and generation of contexts will be used as pillars in many of our contributions and propositions of context-aware services.

Design of Context-Aware Services

Research context

Many systems and applications have been designed to provide human-centric services using sensing and network communications [START_REF] Wang | Smart Home M2M Networks Architecture[END_REF][START_REF] Yao-Lin | Wireless Communication Technology in Family Health Monitoring System[END_REF], computing analysis algorithms [24], energy consumption [START_REF] Kim | Analysis of Energy Consumption for Wearable ECG Devices[END_REF], time-cost e ectiveness, assisting and providing services [42], etc. Provided services mainly concern physiological monitoring, movement or fall detection, emergency situations, and activity monitoring.

The monitoring of activities of daily living covers the daily activities and helps to gain an e cient knowledge of the person's context. In addition, it allows the persons, especially elderly, to live independently and to provide accurate services for caregivers [42,[START_REF] Shimokawara | Estimation of Basic Activities of Daily Living Using ZigBee 3D Accelerometer Sensor Network[END_REF]. Existing approaches lack a true understanding of the user's activities that should be considered in a context-aware human-centric approach. Their lack of adaptability leads to a limited and narrow range of activity selection.

The several heterogeneous sensors and devices deployed in smart spaces increase both energy consumption and network tra c. Saving power can be ensured using techniques like scheduling the sensor nodes or sentry-based algorithms in order to maintain sensing coverage [START_REF] Tian | A Node Scheduling Scheme for Energy Conservation in Large Wireless Sensor Networks[END_REF]. However, such schemes are not automatically adjusted at the execution time of monitoring. Hence, a dynamic approach of selecting monitoring modes is required.

In smart spaces, given the extent of sensors heterogeneity and number of daily activities, we need to define data-summarizing and relevant data filtering mechanisms while maintaining a good knowledge of the person's context. Dynamic updating of the monitoring mode, including moderate usage of sensors, can help in monitoring the person's situations, which cannot be done with one unique sensor but with a composition of several ones.

Providing human-centric services should take on board specific profiles of persons such as subjects with illness. When a person gets a disease, there is a strong likelihood that emergency situations occur without prior warnings. Hence, it is paramount that the context-aware service provides timely appropriate actions. Existing emergency management systems generate actions based on specific and sometimes limited contexts (e.g. fall detection [START_REF] Garripoli | Embedded DSP-Based Telehealth Radar System for Remote In-Door Fall Detection[END_REF]). Current generic solutions are rules-based. Rules follow the form of if {conditions} then {list of actions} [START_REF] Meng | A Rule-based Service Customization Strategy for Smart Home Context-Aware Automation[END_REF][START_REF] Minutolo | A Rule-Based mHealth System for Cardiac Monitoring[END_REF]. Unfortunately, in some circumstances, suggested actions could not solve the situation. Furthermore, the system could repeatedly invoke the same actions and may become unstable or continue in endless loops. On the other hand, systems for emergency situations managements usually present a risk of wrong alerts: alerts for a non-emergency situation or the lack of alerts in a real emergency [START_REF] Forkan | A Clinical Decision-making Mechanism for Contextaware and Patient-specific Remote Monitoring Systems Using the Correlations of Multiple Vital Signs[END_REF].

Context-aware services, based on the activities of daily living and home emergency, represent human-centric services that are more appropriate to confined spaces such as smart homes or health institutions. Therefore, it is important to consider the user's context beyond this kind of spaces. In e-health, the outdoor localization and accuracy of localization must be worthy of particular attention, especially for outdoor emergency situations. For instance, for sudden decrease of the health state, loss of way by a dependent person, or an unexpected event like falling or vertigo. Existing localization approaches can be classified into range-based and range-free techniques. Range-based techniques require additional hardware and important cost [START_REF] Park | An Adaptive Parameter Estimation Method for Wireless Localization Using RSSI Measurements[END_REF]. On the one hand, range-free techniques, such as Centroid, APIT, and Distance Vector-Hop algorithm (DV-Hop) are more economical and cost-e ective [START_REF] Niculescu | Global Telecommunications Conference[END_REF]. They do not require information of unknown nodes, however, their results are always less accurate than range-bases.

Framework of context-aware services

In order to design e cient context-aware services, it is required to define a common framework and design its main components which are required by the targeted services. Figure 3.4 shows the main components of our proposed framework. In a human-centric service, the human's behavior and the environment represent the foundation stone of the context. In our framework, this can be reflected in part by the activities actually performed by the user or those generated in order to solve the issues previously addressed in Section 3.2.4. The activities and environment are used in advanced functionalities including sensing, processing, and recommendation of services (Figure 3.4).

The smart space is fitted with adequate sensors who transmit data in a continuous or periodic/optimized way. The coordinator analyses and processes the received data. Streams coming from di erent sources are handled by the data management system, which is able to apply primitives such as data queries and updates. The analysis agents consider di erent profiles and mainly the person's profile that includes the level of required assistance (i.e. the dependency level) and history. The first inference is applied to set up the monitoring mode (i.e. how to sense the environment?). This is achieved thanks to the connection between the analysis agents and the model-based management. The latter selects the contextual profiling model, which is in turn considered in the data management, and combined with input data to adjust the monitoring. Finally, sensing and processing data will result in recommending or triggering e-health services adapted to the person's situation (Figure 3.4).

Context-aware monitoring of daily living activities

Context-aware monitoring systems require a global and full visibility of the person's context. This visibility includes recognizing the daily activities and detecting abnormalities. In this contribution, we aim at developing such an adaptive and optimized monitoring framework that can be easily integrated into health institution systems. To reach this goal, we focused on the definition of activities provided by the SMAF model [START_REF] Raiche | Yearly Transitions of Disability Profiles in Older People Living at Home[END_REF] enriched by additional actions. In sum, five standard categories of activities were considered (ADL, IADL, mobility, mental functions, and communication) with other activities like watching TV and sleeping.

The key challenges in optimizing our systems are to determine: what, when and how to monitor and analyze data related to the person's context. For those purposes, we define three approaches for handling the set of activities and actions as the primary context of our system. These approaches are (1) the activity-per-activity approach, (2) the relational approach, and (3) the global approach. In this section, we will discuss in detail the first approach. The reader can refer to [16,46,43] for further details on the two remaining approaches.

The activity-per-activity approach

The activity-per-activity approach is important during the initial settings of the adaptive monitoring of users and helps to learn the person's behavior evolution. It focuses on the monitoring of each activity separately and independently of the other activities. The objective is to take into account the nature of each activity with regards to the system's monitoring. Each activity is associated with a set of parameters such as the daily frequency of monitoring (denoted x), a category of monitoring, possible monitoring sensors, class of sensors (in terms of required computing and networking resources), and the used modalities for scoring the activities. Scores are used to identify the level of achievement of a given activity by a person. The categories of monitoring denote a specific way of monitoring a given activity. We defined three categories of monitoring. In Category I, sensors are active till the activity occurs, then the next monitoring will be after the x period. In Category II, when the activity occurs, the monitoring will be active during a period of time (e.g. the next 24h). The evaluation and monitoring of a given activity in Category III is based on the user's achievement of other activities as defined in our relational approach based on the relationships between activities.

An example of activities monitoring

For the sake of simplicity, we consider the following example using the activity-per-activity approach. Let us assume that the x value (daily frequency) is fixed to 3 for the Toileting activity. This means that the system will monitor this activity every 3 days and get 10 monitoring results during a period P =30 days. This result will indicate how many times the person succeeded to achieve the activity correctly. We call this value activitySubScore. We evaluate the levels of dependency using four modalities from the score -3 to score 0. Each score is associated with a level of dependency (as defined in geriatrics) as follows. -3: Dependence (D), -2: Need of help (H), -1: Supervision (S) and 0: Autonomous (A). Since we have 4 scores, the activitySubScore value is tested within four intervals having a step of P {p4 ¨xq where P is the period selected to re-evaluate the person's dependency level. With P = 30 days and x = 3 days, the score intervals are as follows. D " [0, step=2.5[, H " [step=2.5, 2.step=5[, S " [2.step=5, 3.step=7.5[, A " [3.step=7.5, 4.step=10]. Hence, if the monitoring result is activitySubScore = 8, the activity score (activityScore) will be A (i.e. autonomous).

Another challenge of the adaptive monitoring is how to let the system incrementally compute the scores of activities (i.e. activitySubScore) within short periods such as every 24 hours. If we consider the previous example, the question is equivalent to "how to obtain activitySubScore = 8 for P = 30 days?". This requires defining a way where the system judges if the person has correctly performed a given activity during a duration of monitoring. After this duration, if the activity is well performed, the system will count it (i.e.

C activity (duration)=1), otherwise the system detects an abnormal behavior. For example, for some activities, we need to know how many times the activity was performed during a day (i.e. duration = 24 hours). For instance, for the Toileting activity and according to the observed number, the system will decide if this activity was correctly achieved or not after the monitoring period as follows. If the observed number after 24 hours is 0 or 1 time, the situation is considered abnormal and the system will not count it. This means the considered value will be zero (C T oileting (24)=0). If the observed number is 2 or 3 times, the situation is judged normal and the considered value is C T oileting (24)=1. Similarly, if the current number is higher than the previously observed average, the considered value is C T oileting (24)=1. However, this last situation could be considered as abnormal depending to the person's history (e.g. high toileting activity with Diabetes ; high recording of sleep disorders with Hepatitis C, etc.). For any kind of abnormal detection, the system will extend the monitoring for an extra duration period to record opposite behavior and/or notify caregivers if the situation is confirmed. For some activities, our proposed monitoring system needs only to know if the activity is done once or not in order to count it. This is the case, for instance, of the washing activity and other activities like house keeping and dressing.

Global and relational approaches

The objective of the global approach used in our adaptive monitoring is to avoid the exaggerations of the dependency evaluation models that require the processing of all the activities whatever the level of dependency of persons even in severe ones. Thanks to this approach, the system determines the degree of data frequency and avoids unnecessary data sensing, which is usually achieved in traditional monitoring systems. The relational approach takes advantages from the two defined global and activity-per-activity approaches. It focuses on the logical relationships that can exist between the monitored activities. Based on the existing logic related to the person's ability in performing di erent activities, we can improve the monitoring mode and optimize the system resources without compromising the level and quality of the monitoring service and maintain the system's ability to detect abnormal situations [46,16,43].

Adaptive algorithm

Based on the three previous approaches, we propose an adaptive algorithm that provides a dynamic monitoring adapted to the current situation of the person. Algorithm 2 simulates the time evolution and applies our three approaches on several one-year input scenarios [45]. The x value, related to the frequency of the monitoring, depends on the nature of the monitored activity and is updated regarding the evolution of the person's context, such as the loss of abilities regarding some tasks. These abilities are computed using scores associated with the di erent activities (Algorithm 2, lines 10, 18 and 33) and a global score related to the profile of the person (line 35).

Our second and third approaches are implemented using the GlobalApproachUpdates and RelationalApproachUpdates functions shown in Algorithm 3. Our algorithm uses adaptive monitoring periods with the required duration and includes the determination of the next monitoring time and the frequency in which the used sensors should send their data. Our adaptive algorithm allows evaluating the network tra c and energy consumption required by our adaptive monitoring (lines 11 and 19).

Emergency situations

In the previous contribution, we focused on providing context-aware human-centric services based on the daily activities of persons. Although we considered the changes of contexts and dependency levels (in the geriatrics sense of the term), we didn't consider the presence of illness. When a person gets a disease, there is a strong likelihood that risky situations occur without prior warnings. In this contribution, we focus on handling such emergency situations in smart spaces.

Our approach is based on the concept of Finite-State Machine (FSM) [START_REF] Mealy | A Method for Synthesizing Sequential Circuits[END_REF]. The used formalism of our proposed FSM is inspired by Mealy's machine [START_REF] Mealy | A Method for Synthesizing Sequential Circuits[END_REF] and UML state machine. The main di erence is that we generate actions instead of generating binary values. Our FSM modeling aims to select the set of actions to be performed depending on the observed context. We use the ability to consider the previous states, i.e. the implicit memory of the FSM, to invoke services in answer to observed situations. If a service does Algorithm 3 Helper Functions and Procedures 1: function SMAFScore(activitySubScorepa l q) 2: P -30 days; step -P {4 ¨X _V aluepa l q; 3: //see the example of activities monitoring (Section 3.3.3)

4:

v -activitySubScorepa l q; . . . 9: end function 1: procedure GlobalApproachUpdates(prof ile)

2:

//the monitoring is also adapted according to the current person's profile P i (degree of dependency):

3:
switch prof ile do 4:

case P 1 :

5:

//update the monitoring frequency and "next monitoring time" for activity a i :

6:
updates nxtM T imepa i q; updates X _V aluepa i q;

7:

case P 2 : . . . 8: end procedure 1: procedure RelationalApproachUpdates(activityScores)

2:

//If a i is achieved autonomously, do not //monitor related activities a j :

3:
if activityScorespa i q == 0 then updates nxtM T imepa j q;

4:

end if 5: end procedure not solve a given situation, the system invokes other services that are likely able to do it di erently. For instance, if a hypoglycemia situation is detected, our system will first notify the user to eat, otherwise, the system will trigger alerts with an increasing level.

Proposed FSM model

We propose the following 6-tuple FSM:

( p Q, p T , p A, p E, p O, p C). p Q " tq 1 , .., q Q u is the set of states q i with Q " | p Q|. p T " tt ijk , i, j, k P N, 1 § i, j § Q, 1 § k § K ij u
is the set of possible transitions from the state q i to state q j among K ij available transitions. p A " ta 1 , .., a A u is the set of context attributes (e.g. temperature, blood glucose) with A " | p A|. For each context attribute a i , we define a set of possible values q A i that can include discrete values or intervals. p E " te 1 , .., e E u is the set of extended state variables. Extended variables are internal variables used in the FSM's algorithm such as repetition counters, system waiting-time, etc. For each extended variable e i , the set of possible values is q

E i . p O " to ijk , i, j, k P N, 1 § i, j § Q, 1 § k § K ij u
represents all the subsets of actions that could be invoked when the FSM leaves a state. When the FSM moves from the state q i to state q j following the transition t ijk , it invokes all actions listed in the subset o ijk . Here, K ij is the number of possible transitions between q i and q j . p C " tc ijk , i, j, k P N, 1 § i, j § Q, 1 § k § K ij u is the set of conditions checked when selecting the correct transition from one state to another. c ijk is the k th condition that allows to leave the state q i to reach the state q j following the transition t ijk . Each condition is a conjunction of items where each item checks if a context attribute a i , or extended variable e i , belongs to a set of possible values. Each set of possible values q

A vijk (or q E vijk ) depends on the attributes used in the condition c ijk of the transition t ijk (i.e. the k th transition from q i to q j ). It is worth noting that @i, j, k, q A vijk Ñ q A v . Formally, the condition

c ijk can be written as ´ôA v"1 pa v P q A vijk q ¯^´ô E v"1 pa v P q E vijk q ¯.

An application example

For the sake of simplicity, we instantiate our model for the diabetes management. Several factors influence the context and health status of a diabetic person. To simplify, we consider a single context attribute: the blood glucose level (BG). To identify the levels of risk, BG values are presented, in g/l, with the following intervals: [0.0, 0.5[, [0.5, 0.8[, [0.8, 1.5[, [1.5, 3.0[, and [3.0, 6.0[. We associate to each interval a risk level and a set of actions to be performed by the system. Five levels are defined. Level 0 is defined as a normal situation. In some cases, the system should inform the caregiver that there is no risk. Level 1 is used to request assistance or warn an emergency. Level 2 notifies situation that can be managed by a non-expert person while level 3 notifies an emergency that requires actions of a health professional. Finally, level 4 is defined to notify extreme emergency situations.

The FSM presented in figure 3.5 uses the two extended state variables R and T . R is used to indicate how many times our system invokes the same set of actions under the same conditions. T indicates how long the system has to wait before it takes the next transition. Two actions eat() and alert() are used. The first action is used to inform the diabetic that he should eat sugar to raise the BG. The alert() action is used to notify caregivers that the system detects an abnormal situation. The first argument of the alert() action is the caregiver identifier (the all value means all available referring caregivers) while the second argument is the alert level.

Extension of the context scope

The proposed model can easily be extended to consider other contexts. For instance, to support other kinds of emergencies such as hypertension, the FSM should simply be extended with required new states, conditions and actions. In e-health, such design of our FSM instances should be driven by health professionals using their technical expertise and clinical guidelines. For the correctness of new FSM instances, we identified the following criteria that should be satisfied:

• The instance must be deterministic. This means that starting from a given state, Figure 3.5: An application example of FSM for diabetes management. Each arc follows the format conditions (c ijk )/set of actions (o ijk ). Multiple (conditions/actions) mean a possible transition for each (conditions/actions). only one transition is possible under the same conditions. Formally: @pc ijk , c ijl q P p C 2 , pc ijk " true ^cijl " trueq ùñ k " l

• The instance must be complete. This means that there is no blocking state. Formally, @q i P p Q, Dq j P p Q, Dk P N, c ijk " true

• The instance must avoid the integration of conditions that are never satisfied. Formally, @c P p Q, Dv P p

± A i"1 q A i q ¨p± E i"1 q E i q, c " true

Localization

In this part, we focus on outdoor monitoring in the context of smart cities. Specifically, we address the localization of persons when they are outside. As a context dimension, the location was the most dimension addressed by early context-aware systems. Here, our objective is to provide an e cient localization algorithm in terms of rapidity, energysaving, and cost while being able to exploit existing network localization techniques. To reach our objective, we focus on the widely used localization technique that is range-free algorithms, especially the Distance Vector Hop (DV-Hop) algorithm [START_REF] Niculescu | Global Telecommunications Conference[END_REF]. We combined DV-Hop and genetic algorithms in a smart cities context in order to consider the outdoor mobility of persons and provide them a continuous monitoring and assistance [47].

DV-Hop algorithm

DV-Hop is a location algorithm that is inspired by the well-known distance-vector method. It enables nodes to learn their location without the need for range estimation. Furthermore, it is suitable for sensor positioning due to its cost-e ectiveness. DV-Hop is based on the estimation of the unknown node's location based on the anchor location. Each anchor node broadcasts, in the first step, the anchor's location with a hop-count value initialized to one. Each receiving node maintains the minimum hop-count value per anchor. Hopcounts are incremented by one when a node is passed (similarly with the distance-vector technique). Thanks to this distribution, all the nodes get the minimal hop-count to every anchor node. In the second step, once an anchor gets the locations and minimal hop-count to other anchors, it estimates the average hop distance (AHD) for one hop (Equation 3.1), which is then flooded to the network (Figure 3.6). After receiving the AHD, unknown (or blindfolded) nodes multiply AHD by the minimum hop-count value to estimate the distance to the anchor (Equation 3.2). In the third and last step of the DV-Hop algorithm, each unknown node computes its location coordinate X "

«

x y by solving the matrix equation A ¨X " B using the least squares method, i.e., X " pA T Aq ´1A T B. A, B matrices are given in (3.3) where px i , y i q are the coordinates of anchor i and d i is the estimated distance between the unknown node and anchor node i (Equation 3.4) 2 .

AHD i " ∞ j‰i a px i ´xj q 2 `py i ´yj q 2 ∞ j‰i hops ij (3.1) d ij " hops ij ¨AHD j (3.2) A " 2 ¨» - - - - - x n ´x1 y n ´y1 x n ´x2 y n ´y2 ... ... x n ´xn´1 y n ´yn´1 fi fl , B " » - - d 2 1 ´d2 n `x2 n ´x2 1 `y2 n ´y2 1 ... d 2 n´1 ´d2 n `x2 n ´x2 n´1 `y2 n ´y2 n´1 fi fl (3.3)
2 We can easily check that the equation A ¨X " B is equivalent to the equations 3.4 with 1 § i § n.

For instance using equations 3.4, d 2 1 ´d2

n is equivalent to the first element of the product A ¨X " B d i " a px ´xi q 2 `py ´yi q 2 (3.4)

Proposed algorithm

We focus on the improvement of the most important step of DV-Hop which is the choice of the anchor node. To do so, we investigate the selection of anchors using genetic algorithms to improve the quality of estimation and increase the accuracy of the localization.

The main steps of our Algorithm are presented in the flow-chart of figure 3.7.

1 compute the minimum hop-count from each node to each anchor node 2 estimate the average hope distance of each anchor node (Eq. 3.1)

3 each unknown node estimates the distance to the anchor node using the minimum hop-count value and the AHD (Eq. 3.2)

4 determine the population of the applicable region of each unknown node and generate an initial population in this region 5 evaluate the fitness of each individual 6 apply the genetic operations (crossover, mutation, and selection) in order to generate the next generation We tackle the errors in the estimation of distances with DV-Hop using the following objective function:

F px, yq " M inp n ÿ i"1 ˇˇpx ´xi q 2 `py ´yi q 2 ´d2 i ˇˇq (3.5)
and the flowing fitness function used in Step 5 of our algorithm:

f itnesspx, yq " ‡ F px, yq p ‡ is a positive real coef f icientq (3.6)
In order to evaluate the performance of our localization algorithm, we evaluate the error of the location using the following formula: Á " a px e ´xi q 2 `py e ´yi q 2 (3.7)

Where x e and y e are the estimated coordinates of the unknown node i and x i and y i are the current coordinates of this node. In our human-centric localization, we propose that each node in the network represents the user (e.g. an elderly or a dependent person) who evolves in the smart city. Each anchor node can be presented by a caregiver such as a nurse or nursing auxiliary. Users can be dynamically classified according to their presence and their autonomy level (discussed in Section 3.2.1) in the sense that people who are less vulnerable (i.e. more autonomous in their life) can take the role of an anchor node.

Summary of results

Our adaptive monitoring using Algorithm 2 (Section 3.3.3) has allowed us to obtain several significant results [46,43,16]. In this section, we summarize a subset of these results. We compared our approach with conventional continuous monitoring systems and evaluated our proposal regarding the processing (number of processed activities), consumption of energy and network bandwidth, the ability to detect abnormal situations, and number of false alarms. These evaluations considered persons with the same profile during the monitoring and persons with a change of profiles (i.e. changes in the degree of dependence). The results show that our approach succeeds to determines the user's context with a high accuracy (87,28% of accuracy and more for severe dependency levels) which significantly reduces the scope of false alarms. Moreover, our approach is able to sense, with a high flexibility, a very reasonable amount of data (15.12% compared to a continuous monitoring) while reducing the energy consumption by 90.99% and the network bandwidth use by 90.2%.

For our approach based on FSM, we can observe that our defined model provides a high and e cient flexibility in defining and integrating the context (states, context attributes, and conditions) with a high degree of the system's refinement (parameters of implementations, actions, and transitions). We performed several scalability evaluations of the proposed FSM in terms of supported number of states, transitions per state, items per condition, and actions per transition. We also evaluated the model's scalability in terms of concurrent actions and matching time. Obtained results (under a laptop with I7 core, 16 GB of RAM, 512 GB of SSD hard drive with Ubuntu 14.04 LTS OS), illustrate, for instance, that our model can process up to 293 di erent states for 440 transitions by state, 100 items per condition, 100 actions per transition, and 10 arguments per action. This performance is more than enough for handling emergency situations. The matching time is also very promising. For instance, with 20 states, 20 transitions per state, 20 items per condition, and 50 actions per transition, the matching time is less than 0.1ms and the system can invoke all actions in less than 15ms.

As regards our outdoor improvement of localization, we evaluated the error rate of our proposal compared to the required number of generations of the genetic algorithm. The simulations of the DV-Hop based on AG reveals a high accuracy with an error rate of 0.0185. For a 1000m x 1000m region with a number of smart homes and buildings and with 40 mobile nodes (n=30 anchors and k=10 unknown), the results show that the error rate decreases rapidly from 0.1 to 0.03 errors. Thereafter, it decreases to 0.01 in nearly the 2000th generation. We also compared the localization's error of our algorithm and the classic DV-Hop algorithm. The result shows clearly the improvement of the performance and the accuracy of the proposition. The location error of the classic DV-Hop was 1.1974 against 0.0185. Of course, as expected, the number of anchors impacted the accuracy of the localization. When the number of anchor nodes increases, the estimation error significantly decreases. Hence, particular attention should be given to the selection of the number of anchors in order to meet the targeted performance and accuracy of the human-centric service.

Conclusion of the Chapter

In this chapter, we addressed the consideration of the context in the definition of new ehealth human-centric services. The addressed contributions were classified into two topics: handling the context and the integration of it into context-aware services in smart spaces.

In our first contribution, we analyzed the most used models that describe the user's context in terms of needs of assistance, namely SMAF and AGGIR. We study the overlaps and di erences between these models and proposed a matching approach between the models with a new evaluation algorithm. The matching algorithm involved a huge amount of context instances that we succeeded to process in order to understand how the variation of the context is considered. The results of our investigation led us to highlight the main drawbacks of existing models (e.g. the incoherence in the evaluation of the context, and the lack of validity periods regarding the evaluations) and helped to identify the main requirements for an e cient context-aware system [41,42]. The learned lessons enabled us to propose a framework for modeling the context while considering the expressiveness, storage, and processing optimization of the context [37,44,26,25]. Furthermore, we defined a method for generating realistic scenarios and contexts for long periods. Such generation is paramount when it comes to experiment and validate a new context-aware system. This contribution gave rise to our project eHealth Monitoring Open Data Project [45,43].

Our second contribution addressed the design of human-centric services that handle the rich set of activities of daily living [16,46,28], the emergency situations [38] and the accurate outdoor localization of persons [47]. We provided an e cient adaptive algorithm that considered a rich set of contextual dimensions using three abstractions at di erent levels: the human activity basis, the global overview of the context, and the logic of dependencies between human activities. These considerations enabled the algorithm to be as close as possible to the current situation of the user and adapt the monitoring accordingly. As a consequence of this adaptive approach, the system and network resources were significantly optimized if compared to traditional and continuous monitoring.

The proposition of FSM-based model provided a high and e cient flexibility in the definition and integration of di erent contexts with the ability to refine proposed systems for specific needs. The performance of the model, particularly regarding the scalability and the matching time, makes it adapted to particular contexts where the system's services and reactions must be quick and appropriate. For outdoor services, we proposed an improvement of the localization accuracy of the DV-Hop algorithm using genetic algorithms. As a consequence, the notable improvement of our algorithm provides a better knowledge of the contextual dimension of the location which is very useful for specific human-centric services such as outdoor emergency situations for dependent persons.

These contributions are parts of the results of three Ph.D. thesis work:

• Haider Hasan Mshali, University of Bordeaux, that I co-supervised with D. Magoni (Professor at the University of Bordeaux) [16,46,41,48,43,45],

•

• Allal Tiberkak, University of USTHB (Algeria), ongoing Ph.D. thesis supervised by B. Abdelkader (Professor at the University of USTHB) [38,36] and the continious collaboration with the T2i/LIUPPA and LIGM teams [42,26].

context by only relying on relevant data collected in the smart environment?. Given that contextual data can be poor, incomplete, and sometimes erroneous, what are the best approaches that could be applied for such needs, and what are the main metrics that we could use to evaluate them? We provide answers to these questions through the use of two main approaches: Grey theory and Neural Networks-based approaches. Both of the investigated approaches focus on e-health human-centric services by the consideration of activities of daily living and other physiological parameters.

In the Grey theory-based approach, we propose a context-aware monitoring algorithm which is able to collect relevant and contextual data, predict and detect risky contexts, and evaluate the person's need for help while remaining e ective and cost-e cient [48,46,45]. We consider the properties of smart spaces where data is collected from multiple sources of data (e.g. sensors and clinical files) that are not available all the time. We pay special attention to health parameters and the accurate evaluation of our proposal compared to conventional forecasting models such as the Box-Jenkins ARIMA [49].

In our contributions related to the Neural Networks-based approaches [50,51,52], we focus on the improvement of recurrent techniques that have shown promising results when the data presents some sequential dependencies. We improve the Extreme Learning Machine model by providing a temporal relationship between the observations of the context at di erent time steps. We propose RELM (Recurrent Extreme Learning Machine) that provides the ability to learn the human behavior and ensures a good balance between the learning time and the prediction accuracy [50,51,52].

Grey Model-based Approach

Research context

The success of context-aware services, particularly in e-health, can be measured by the service's ability to understand the user's context but also to detect and predict future abnormal contexts in order to timely provide required assitance [START_REF] Suryadevara | Forecasting the Behavior of an Elderly using Wireless Sensors Data in a Smart Home[END_REF]. Several studies and methods have been designed to optimize the context prediction such as probabilistic techniques, fuzzy and case-based reasoning rules, support vector machines, clustering approaches [22,23,24]. Time series analysis is used for many purposes such as the identification of trends variation data and forecasting future values of the series. In this realm, Box-Jenkins (or ARIMA) is usually applied to forecast the future values [START_REF] Box | Time Series Analysis, Forecasting and Control[END_REF]. The main drawback of Box-Jenkins is that it requires a large amount of data for short-term prediction. The Grey model is a dynamic model that has been widely used for prediction in many research fields [START_REF] Deng | Introduction to Grey System Theory[END_REF]. GM (1,1) is the core of all the grey prediction models. It becomes a very e ective method used to solve uncertainty problems under discrete data and incomplete or poor information [START_REF] Kayacan | Grey System Theory-based Models in Time Series Prediction[END_REF].

Most of the existing studies share the same challenges which are mainly: the identification of an optimal prediction method, need of long training period, analysis of a huge amount of data, and need to perform a continuous monitoring all the time whatever the user's context. Therefore, it is paramount to design an e cient system combining an optimal cost of monitoring (sensing of data) with an accurate prediction of the user's context. In pursuit of that objective, we propose a Grey-based predictive and context-aware monitoring approach which is able to collect relevant and contextual data, detect abnormal behaviors and evaluate the person's need for help while remaining cost-e cient. Particular attention is paid to important contextual dimensions such as critical health parameters (e.g. blood pressure and heart rate).

Used forecasting model

We define a predicted model based on the Grey Model (GM). GM uses n-order di erential equations and a set of variables of cardinal h (noted GM (n, h)). We use the single variable first-order model GM (1,1) to learn and predict the behavior and level of dependency trends [START_REF] Kayacan | Grey System Theory-based Models in Time Series Prediction[END_REF]. GM (1, 1) is summarized as follows. The system considers an initial nonnegative time sequence of data: X p0q " tx p0q p1q, x p0q p2q, .., x p0q pnqu (4.1)

Based on the initial sequence X p0q , a new sequence X p1q , called accumulated sequence, is generated by applying the accumulated generating operation (AGO) in order to smooth the randomness.

X p1q " tx p1q p1q, x p1q p2q, .., x p1q pnqu (4.2)

Using AGO, we have x p1q pkq "

k ÿ i"1 x p0q piq, 1 § k § n (4.
3)

The generated mean sequence Z p1q is derived from X p1q using the mean value of each two consecutive terms.

Z p1q " tz p1q p2q, z p1q p3q, .., z p1q pnqu (4.4)

Where z p1q pkq "

1 2 x p1q pkq `1 2 x p1q pk ´1q, 2 § k § n (4.5)
The first order di erential equation of GM (1, 1) is defined in the following:

x p0q pkq `az p1q pkq " b, 2 § k § n (4.6)
Thus, the whitening equation is

dx p1q dt `ax p1q " b (4.7) If we consider Y " » - - - - -
x p0q p2q x p0q p3q . . . Then, a and b parameters, of Eq. 4.7, can be determined as follows:

ra, bs T " `BT B ˘´1 B T Y (4.9)
According to the whitened equation of GM (1, 1), the solution of X p1q at time k is:

x p1q p pk `1q " " x p0q p1q ´b a ‰ e ´ak `b a (4.10)
Consequently, to obtain the predicted value of the initial data row at time pk `1q we use

x p0q p pk `1q " " x p0q p1q ´b a ‰ e ´ak p1 ´ea q (4.11)

For all the considered activities, we calculate the predictive values (e.g. duration and frequency) by applying the previous model on the initial data sequence, which is represented by the input values.

Prediction for human activities and actions

Despite the uncertainty caused by the environment and the unstable context of the person's intraday behavior, the data series of the user's history can help to e ciently estimate and forecast the future behaviors. Since we aim to sense highly relevant data of the person's context, we model this approach using the GM (1,1) model. GM (1,1) is widely used in predictions with incomplete information. Moreover, it is suitable to be applied with only short learning (training) periods. The support of short training and incomplete data make the GM model adapted to human-centric and context-aware services in smart spaces. Indeed, to improve the quality of experience of users, the system should start providing services as soon as possible without undue delay. In addition, in smart spaces, the completeness of the context rely on the di erent data sources and depend on many parameters such as the number and quality of sensors. Some contextual data coming from sensors or other sources can be incomplete or even erroneous. In our approach, changes in the user's performance can be determined using durations, frequencies, and absence of activities. We also include the user's own power consumption as a contextual dimension and as a good indicator for our system to understand the user's behavior and predict its changes. Our objective is to predict the health condition based on the user's behavior and using the knowledge related to the energy consumption involved for each activity in a given smart space. Consequently, the system can provide a proactive attention and trigger notifications to caregivers if there is a risk of decline.

Predictive context-aware monitoring

Using a minimum amount of sensed data and short training periods, we propose a monitoring system that categorizes the behavior of the monitored user as normal (regular) or abnormal (irregular). After the determination of the standard deviation ‡ of the input values and the Grey values using Eq. 4.11, we get a range of forecast between a lower (minimum) and upper (maximum) limits where the lower limit of the range is Grey value - ‡ and the upper limit is Grey value + ‡. The duration and frequency of each activity or action are checked with lower/upper limits of the forecast. A given context is considered as a normal behavior if the observed values for the activity (i.e. duration and frequency) fit with the forecasting range [Grey value - ‡, Grey value + ‡]. Otherwise, the observation is categorized as an anomalous situation. It is worth noting that the combination of the standard deviation (SD) with GM (1, 1) values represents a good indicator for the detection of the context changes.

Unfortunately, this indicator is not su cient to judge if a behavior change represents a real abnormality or not. By only relying on SD, some normal situations could be seen as abnormal if they are compared to the majority of inputs. Similarly, real abnormalities can be ignored if they occur in a series of abnormal values. Unlike expert data, SD values merely depend on a relative mathematical comparison between observed values whatever the performed activity. Expert data are based on medical knowledge and experiments that identify real risks, which depends widely on the nature of the activity. For instance, with some studied profiles and illnesses, mean values and acceptable deviations for some activities should be properly configured in order to avoid false detections of abnormalities. Consequently, input expert data (e.g. coming from health professionals) are needed during the setup of our system in order to moderate the SD impact. These inputs enrich the system with the ability to determine if a detected change represents a real abnormality that could be risky for the subject.

The user's own power consumption as a contextual dimension

We consider the user's consumption of the energy consumption, in a given smart space, as an e cient indicator to predict the change of the person's global behavior. In order to achieve this objective, we realized that the person's consumption of energy used in performing the daily tasks can be classified into two main categories. The first category includes the energy related to achieving ADL and IADL (i.e. the major activities) such as washing, toileting, and meal preparation. The second category (that we call Leisure) includes the energy consumed in monitoring activities such as watching T V , reading, and sleeping (i.e. minor activities). Generally, a person who becomes more dependent, and therefore need more help, tends predominantly to perform less ADL/IADL activities (i.e. basic and instrumental activities) and more activities for Leisure with less mobility. Using our predictive approach, we consider abnormal situations when the two following conditions are satisfied at the same time. The first condition is satisfied when the power consumption is less than the predicted value for ADL/IADL activities. The second condition is satisfied when the power consumption is more than predicted value for Leisure activities.

Proposed algorithm

We proposed a predictive monitoring of the user activities and actions by incorporating the prediction model in Algorithm 2 (discussed in Section 3.3.3 of chapter 3). The new approach is presented in Algorithm 4 where the main modifications are underlined.

The algorithm uses data series with time evolution i using di erent input scenarios. Scenarios are based on the datasets of our eHealth Monitoring Open Data Project [45] and the MavHome project [START_REF] Cook | MavHome: An Agent-based Smart Home[END_REF] (Section 4.2.4). Algorithm 4 uses scenarios involving a long period of monitoring (one year, line 2). All the considered human activities and action in the smart space (category I and category II1 in the algorithm) have a monitoring time (M T ime) which depends on the sensing frequency of the system. We call this frequency

x. The x value varies according to the nature of the human activity and the monitoring mode (i.e. when and for how long we have to monitor a given activity?). The x value is updated regularly based on the evaluation of person's context. The context considers the user's dependency profile in the geriatrics sense of the term. This evaluation is obtained by computing scores associated with the di erent activities (Algorithm 4, lines 11, 19 and 32). The activity score is tested with the four modalities A, S, H and D using the SMAFScore function (line 45). These modalities indicate the user's level of abilities to perform a given task (see Section 3.2.2). Then, the overall person's profile is computed using the computeSMAFProfile function (line 47). Thanks to the profile's determination and using this global view of the user's context, we determine the new x value and the monitoring time for each activity (line 50). Although the incomplete data sequence and for only a short time of monitoring, our algorithm is able to start approximating the person's daily life behavior and predict values based on the duration duration(activity) and repeatability activityNo(activity) in achieving the di erent activities.

The overall idea is once the observed context satisfies the predicted values, the system will continue the regular monitoring mode (lines 11 and 32). Otherwise, the system will identify an abnormal behavior (lines 12, 20 and 30) and force the related sensors to continue the monitoring (lines 12, 27 and 30) till the behavior becomes as usual. Our Algorithm 4 uses a set of predictive functions regarding di erent parameters of activities such as durations, repeatability, and power consumption. Algorithm 5 presents an example of prediction about the required duration of activities. Initial data include the sequence of durations that were used, by the person, to achieve the daily activities. If the data raw size is very small (less than 3), the system considers previously observed durations. Otherwise, the Grey-based model is applied to predict next values.

Prediction for critical contexts

We enrich the user's context by incorporating contextual data other than the daily activities and the user's power consumption considered previously. We focus on critical health parameters such as parameters related to blood and heart. We note that in [START_REF] Billis | Employing Time-Series Forecasting to Historical Medical Data: an Application Towards Early Prognosis Within Elderly Health Monitoring Environments[END_REF], a first attempt to time-series forecasting analysis was applied to a set of artificial time-series data X p0q -{x p0q (1), x p0q (2), .. , x p0q pnq}. //the data sequence of some contextual dimension 3:

if n † 3 then 4:

x p0q pn `1qx p0q pnq To review the e ectiveness of our GM(1,1)-based predictive model, we apply our approach to the data collected from the smart home MavHome project [START_REF] Cook | MavHome: An Agent-based Smart Home[END_REF]. Considered data is based on a single inhabitant living in an on-campus apartment called the MavPad. Critical health variables (e.g. data related to blood, pressure, and heart rate) were observed during forty days. We take into account three main health measures: systolic pressure, diastolic pressure, and pulse for elderly persons using the observed dataset of the MavPad. Our predictive model uses the historical sensed parameters to predict the future condition. Thus, through this approach, the system can make, in advance, preventive decisions for potentially critical situations.

In order to evaluate the performance of the prediction, we split the data history into two sets: the first one used for the training and the second for comparing the real values with the predicted values. In addition, we consider six metrics: the percentage of correctly predicted values and five standard metrics, namely, the forecast error (FE), forecast accuracy (FA), mean forecast error (MFE), the mean absolute deviation (MAD), and the tracking signal (TS). These metrics are calculated as follows:

F A " maxp0, 100% ´F Eq, ( 4.12)
where F E " p|observedptq ´predictedptq|{observedptqq ¨100

Summary of results

A robust context-aware monitoring system can be evaluated by how much the vision and knowledge of the user's context are good and how the relevant knowledge is appropriately used to timely provide services and assistance. In our predictive approach that considers the human activities and actions in the user's context, we evaluated our algorithm in order provide e cient sensing frequencies and context prediction. We consider users with a changing profile and decline of autonomy over the time. We select four performance metrics to evaluate our proposition: the number of activities processed by the system, the required energy, the network tra c consumption, and the accuracy to detect abnormal situations. Compared to a full continuous monitoring system (i.e. a non-predictive and non-context-aware system), our approach optimizes the resources, in terms of computing, network, and energy. It provides the smart space with optimal sensing frequencies for highly relevant data that are strongly linked to the user's context. For instance, with an adaptive and high frequency of monitoring, that ensures a perfect accuracy in detecting abnormal behaviors, the gain was 48.3% for energy consumption, 49.3% for network tra c and a processing of only 54.3% of daily activities. Our system automatically evaluates the user's dependency (i.e. the need for assistance) and is able to predict the person's behavior by analyzing a minimum amount of sensed data with a short period of training. The proposed predictive model has allowed gaining a high accuracy in the detection of abnormal behaviors of monitored persons: 100% of accuracy using a high frequency of monitoring, 95.8% using a medium frequency of monitoring, and 91.9% using a minimum frequency of monitoring.

In the prediction approach that enriches the user's context with critical health parameters, we compared the system performances obtained to predict sensor data using our predictive model with those provided by Box-Jenkins ARIMA as a conventional forecasting model. The simulation results show that the Grey Model is more e cient than the Box-Jenkins ARIMA [START_REF] Box | Time Series Analysis, Forecasting and Control[END_REF] as it has resulted in more accurate forecasting values. For instance, the GM(1,1)-based model provided 0.33 (respectively -0.46) of mean forecast error for diastolic data (respectively pulse data) against 6.15 (respectively 1.69) using ARIMA. However, we observed that the forecasting accuracy of Grey is not stable thanks to our cross-validation between ARIMA and our model using the four metrics FA, MFE, MAD, and TS. In the monitoring of critical health contextual dimensions, our simulation has led us to realize that the forecasting models based only on historical data, are not e cient to give an accurate prediction of the future health conditions of the user. Indeed, both Box-Jenkins ARIMA and GM(1,1)-based model did not consider some deep changes in the context. An interesting way to solve this issue would combine the results provided by the GM(1,1)-based model and ARIMA to help the system to provide a more accurate prediction. Hence, we can use the GM(1,1)-based model to observe, in advance, the health state and define the predicted range (lower and upper limits) of Box-Jenkins ARIMA as a threshold to trigger preventive notifications of possible critical situations.

Recurrent Neural Networks-based Approach

Research context

Artificial Neural Networks (ANN) have been widely applied in the recent smart spaces search for monitoring, clustering, identifying and predicting tasks based on the sensor data [START_REF] Oniga | Human Activity Recognition Using Neural Networks[END_REF]44]. The main drawback of ANNs is the fact they are sensitive to the used learning algorithm and parameters and require a long time to achieve a reliable network. To overcome such drawback, in [START_REF] Huang | Extreme Learning Machine: Theory and Applications[END_REF] an improved algorithm for single-hidden layer feedforward neural network, called Extreme Learning Machine (ELM) was proposed. ELM had a great and rapid success in several areas. However, it still sensitive to the applications that require the processing of large datasets [START_REF] Çatak | Classification with Boosting of Extreme Learning Machine over Arbitrarily Partitioned Data[END_REF] such as context-aware applications. Recurrent techniques have recently shown promising results in a variety of applications, especially when the data presents some sequential dependencies [START_REF] Guo | Robust Online Time Series Prediction with Recurrent Neural Networks[END_REF]. In the context of e-health for smart spaces, it is clearly observed that the daily living activities, that we consider as an important element of the user's context, consist of scenarios where each new activity depends on the previous achieved activities. Therefore, we propose to consider these relationships by defining a new dynamic model. To do so, we improve the ELM model by defining a recurrent form. This form ensures a temporal relationship of inputs between observations at di erent time steps. The resulting model, called Recurrent Extreme Learning Machine (RELM), provides the ability to learn the human behavior and ensures a good balance between the learning time and the prediction accuracy [50].

The ELM model

In the ELM model, for N distinct inputs x i " " x i1 , x i2 , . . . , x in ı T P R n , the m-dimensional output of the model is y i " " y i1 , y i2 , . . . , y im ı T P R m where y i is given by:

y i " k ÿ j"1 -j f pw j .x i `bj q, i " 1, . . . , N (4.16)
and w j " " w j1 , w j2 , . . . , w jn ı is the weight vector connecting the input neurons to the j th hidden neuron,j " " -j1 , -j2 , . . . ,jm ı T is the weight vector connecting the output neurons to the j th hidden neuron, k is the number of hidden layer neurons, b j is the bias of the j th hidden neuron (Figure 4.2). w j .x i indicates the inner product of w j and x i , and f is a sigmoid function2 . The equivalent matrix format of Eq. 4.16 is:

H-" y (4.17)
Where H is the hidden layer output matrix of the neural network: The input weight and hidden layer bias are determined randomly according to the output matrix H. Hence, the learning of the model is simply equivalent to finding the last square solution as follows:

H " » - - - - - - f pw 1 .x 1 `b1 q . . . fpw k .x 1 `bk q . . . . . . . . . . . . f pw 1 .x N `b1 q . . . fpw k .x N `bk q fi fl N ˆk with -" » - - - - - - -T 1 . . . . . .
-" H `y

Where H `represent the Moore-Penrose generalized inverse of the H (i.e. H `" pH T Hq ´1.H T ). Generally, -, which contains the optimal solution of the model, can yield the optimal generalization capability of the output connection weights and the network. -is unique, which avoids producing a locally optimal solution. Depending on -, the training error can be improved.

The proposed recurrent model

In our Recurrent Extreme Learning Machine (RELM) model, we define a feedback connection from the output neuron to the input layer. This way allows the integration of the output in the context (behavior) prediction. RELM guarantees a dynamic characteristic by providing a temporal relationship between observations at di erent times which is adapted to smart spaces with sensors. From another perspective, RELM holds a memory, which captures information about what has been calculated so far. Consequently, thanks to the incorporated feedback connections, our proposed model becomes able to address the temporal relationships of the input data (figure 4.3). Using RELM, we aim to approximate the following function: ypt `1q " f pxptq, xpt ´1q, . . . , xpt ´Nx q, yptq, ypt ´1q, . . . , ypt ´Ny qq Where ypt `1q denotes the predicted output expected at time t `1, xptq is the input of the model at time t, f is the activation function, and N x , N y are the input and the output memory orders respectively. Using Eq. 4.16, the predicted output ypt `1q can be written as:

ypt `1q " k ÿ j"1 -j f pw j Nx ÿ i"1 xpiq `bj q `k ÿ j"1 -j f pw j Ny ÿ m"1 ypmq `bj q (4.20)
Where, X " " xptq, xpt ´1q, . . . , xpt ´Nx q ı , Y " " yptq, ypt ´1q, . . . , ypt ´Ny q ı , w j " " w j1 , w j2 , . . . , w jpNx`Nyq ı T is the weighting vector connecting the input neurons to the j th hidden neuron, -" " -1 , . . . ,k ı T is the weighting vector connecting the output neurons to the j th hidden neuron, andj is the bias of the j th neuron of the hidden layer (b j ). As mentioned previsouly and like in ELM, since the input weighting and the hidden layer bias are determined randomly, the learning of our RELM based on the output matrix Hptq is equivalent to the identification of the last square solution of:

-" pHptq `q . ypt `1q (4.21)

Where Hptq `is the general inverse of the matrix Hptq. Equation 4.21 can be simplified as follows:

Hptq . -" ypt `1q (4.22) With, Hptq " » - - - - - - - - - - - - - - - feedforward matrix G Nxˆk Nyˆk C backforward matrix fi fl .
Again, as mentioned for the ELM model, -, which contains the optimal solution of the RELM, is unique, which avoids producing a locally optimal solution. In RELM, the hidden layer output matrix is composed of two sub-matrices: the feedforward matrix and the backforward matrix. The first matrix is the same as defined in the basic version of ELM (i.e. the feedforward matrix, Eq. 4.17). The second matrix is the backforward matrix which contains the outputs at times pt ´Ny q to t. For details of the used feedforward and backforward matrices, please refer to [50].

The context's prediction using RELM

We apply our RELM model in order to provide a behavior prediction mechanism for e-health monitoring services in smart spaces. In daily monitoring, it is important to ensure a fast prediction process in order to anticipate risks and emergency situations. The key idea using RELM, is to guarantee an e cient processing of large datasets coming from multiple data sources such as sensors, historical records, and available clinical data. Moreover, we aim to improve the convergence speed and the accuracy of the prediction. The most significant aspect of our behavior prediction process is to provide the same (or approximate) input/output mapping relationship between the contextual parameters and the user behavior habits.

The context which includes the user's behavior and the parameters of his environment are considered as the input and output of our RELM model. A continuous training is applied to the collected data. Once the training is completed, RELM is used to predict the future behavior of the user. In figure 4.4, we present the main steps of our approach. These steps are: pre-processing of the data, selection of learning set, and finally the application of RELM. In the pre-processing step, we process raw data in order to provide a better data representation. We convert data sources into time series in order to gain a clear observation of the situations using time slots. These slots are used in the prediction of the user's behavior. We focus on the activities durations using the start and end time of each activity or action. The data normalization is applied, before the training of the dataset, in order to eliminate redundancy in input values x (Eq. 4.23). Hence, normalized values, x, become in [0, 1], which is ready to be used as the inputs for the predictive process.

x "

x ´minpxq maxpxq ´minpxq (4. 23) In order to perform an e cient prediction, a su cient number of representative samples is required in the learning phase (i.e. selection of learning set step). To satisfy the require-ments of the RELM, we split the input real data into two parts: a learning set used to build and train our model and a test set used to experiment our model on newly collected data. Typically, a testing set is used to evaluate how well the model behaves with data outside the scope of the training set. For testing purposes, we split the input data of the activities of daily living into 3 weeks for the learning step and 9 days for the testing step. Algorithm 6 represents the application of our RELM model.

Summary of results

The hidden neuron number (HNN) and the recurrent neuron number (RNN) have an important impact on the performance of our proposed model RELM in terms of learning time and prediction error. Our deep evaluations of the RELM tuning leads us to determine the best behavior of RELM by setting HNN to 5 in the hidden layer and fixing RN N to 4 in the input layer using the sigmoid activation function. Indeed, RELM reaches the maximal accuracy when HNN • 5 and RN N • 4 with a root means squared error (RMSE) of 1.5625 ˆ10 ´6. When HNN °5 and RN N °4, the RMSE is almost unchanged.

We evaluated RELM during the learning step. Then, the RELM predicted values were compared against real values. The prediction was evaluated using three metrics which were successively applied to observed and predicted data. The three metrics are: the root means squared error (RMSE), the similarity, and the percentage of the error (PE) between observed and predicted values. As regards to the three metrics, RELM provided excellent results during the learning and testing steps. For instance, the RMSE in the testing step is bounded by 2.2146 ˆ10 ´4 and 2.3457 ˆ10 ´4 with a high similarity varying from 0.9978 to 0.9993. The observed error rate is low and varies from 8.11% to 12.10% while the observed percentage of similarity is high with at least 87.90% and can reach 91.90%. In addition to the accuracy of predictions, another significant parameter, in e-health services, is the speed of prediction. Our evaluation confirmed the rapidity of our model with a reasonable average time for the learning and testing steps with 1.492 seconds and 0.0493 respectively. Moreover, by comparison, our evaluation shows the supremacy of our model in terms of RMSE and required time for both the learning and testing steps. This result is confirmed thanks to a deep comparative evaluation between RELM and other existing prediction models based on ELM (e.g. classic ELM, Sa-ELM, ELM-GA, and Elman-NN-DE).

Conclusion of the Chapter

Predicting the future contexts related to the human activities is a challenging issue. Our motivation, in e-health, is to provide a proactive attention and trigger notifications to caregivers if there is a potentially risky situation or health decline. In this chapter, we addressed the anticipation of context changes for context-aware approaches in smart spaces.

Our first contribution enriched the proposed adaptive monitoring, discussed previously, with prediction mechanisms that were integrated into a general adaptive and predictive monitoring algorithm [48,46,45]. The algorithm takes on board the processing of few input data and scenarios that can be incomplete and sometimes incorrect. Our contribution answers the question how to quickly and accurately predict the health condition based on the knowledge of the user's context? Using a Grey-based model, the proposed algorithm considered the user's performance, related to a rich set of daily activities and actions, in terms of duration, frequencies, non-achievement of some activities, and the user's own power consumption as an excellent indicator to understand the global context of the user. The second contribution extends the user's context to the physiological monitoring with critical parameters and applies our approach to the real-world data of the MavHome project [49,[START_REF] Cook | MavHome: An Agent-based Smart Home[END_REF]. The results helped us to come up with a set of valuable lessons such as the need to pay particular attention to a subset of critical dimensions of the context, but also the confirmation of the good performances of our approach with several evaluation metrics.

Our third contribution addressed the question what are the best approaches that could be applied to satisfy our needs of prediction, and what are the main metrics that we could use to evaluate them [50,51,52]? To answer this question, in addition to our contribution using the Grey theory, we investigated other existing models, specifically Artificial Neural Networks. We identified their main drawbacks such as the need of long times to provide a reliable network, and proposed RELM (Recurrent Extreme Learning Machine) to improve the called Extreme Learning Machine (ELM) model by taking advantage of recurrent techniques. The key idea was to ensure a temporal relationship of inputs between observations at di erent time steps. The best setting of RELM was obtained with a few number of hidden and recurrent neurons. RELM succeeds to provide the ability to learn the user's behavior with a good balance between the learning time and the prediction accuracy. Our deep evaluation and comparison with other ELM-based improvements (e.g. Sa-ELM and ELM-GA) confirm the supremacy of our model in terms of root means squared error and required time for both the learning and testing steps. Consequently, RELM can ultimately be used to predict future values representing the expected activities and actions with a great confidence and great learning rapidity.

These contributions are parts of the results of two Ph.D. thesis work:

• Chapter 5

Conclusions and Perspectives

This chapter concludes the manuscript. We first provide a summary of our main contributions, then we provide some insights on short-term and long-term perspectives for our future work.

Conclusions

In the recent past, although some thought that the deployment of the context-awareness paradigm in real-world systems is quite a complicated task, it becomes easy today, thanks to emerging technologies like IoT, to acquire a su cient knowledge of the user's context, to adapt complex services to this current context, and even to predict the future context.

It has now become possible to get a plenty of contextual dimensions about the user even those related to his personal and immediate space including his own body and beyond. For instance, in the next-generation genomic health with advances in nanotechnology, research is underway to provide context-aware diagnosis, treatment, and real-time monitoring of side e ects. The objective is to develop a better knowledge of the genetic variations and its relation to illness.

The research reported in this manuscript is a summary of my activities that I have been leading during the last eight years in the area of context-awareness. The results were structured along three chapters: context-awareness application with architectures and application protocols (chapter 2), the integration of context into human-centric services (chapter 3), and the prediction of the future context (chapter 4).

The first part of this manuscript focused on the determination of changes to be applied in current architectures and protocols in order to make them more context-aware and ready for an easy integration of context-aware services. We carried out a review of the main drawbacks of current architectures and proposed accordingly a context-aware framework for media access with an adaptive scheme for media selection in smart home environments. The key idea is to facilitate the use of services by novice users, adapt the service to the user preferences, and hide the complexity of network and services operations behind interoperable and standard interfaces. We proposed a global approach for two major ISP architectures (IMS-NGN and MBMS) to consider complex services such as e-health and broadcasting services. Pertinent changes and extensions were proposed in IMS. We succeeded to enable triggering pervasive services adapted to the context of users using a flexible selection and redirection to application servers and an appropriate use of the native IMS Initial Filter Criteria (iFC). The originality of this approach consists in the improvement of existing IMS functionalities rather than creating new architectural components. This deliberate choice made the proposal more scalable and facilitates the integration of several services. The proposed extension of the IMS opens up new prospects and interesting horizons to more personalized and adaptive services that can be used from heterogeneous means. This is a very interesting combination of IMS pervasivity and our context-aware approach. Another originality of our contributions was the distribution of the context concept for a multitude of actors involved in the decision-making and delivery of broadcasting services. Our proposition considered the heterogeneity of wireless networks, terminals, users, and services. Moreover, the context and preferences of users, operators, and service providers were taken into consideration. Throughout our contributions, we proposed Web-based approaches (using the conventional Web and WebRTC) in order to elevate the level of interoperability and quality of experience regarding the pervasive access to services even in complex architectures involving bidirectional media streams.

The second part of this document addressed how can we take advantages of the context knowledge in the design of user-centric services in e-health. In this realm, we performed a deep analysis and evaluation of contextual models to bring up useful lessons for our next modeling of the context. This evaluation involved a huge amount of data coming from the variation of possible contexts (twenty trillion of possible contexts). Our context modeling framework provided e cient and flexible descriptions with optimized operations like processing, storage, and matching. The model ensured a high degree of expressiveness, with the ability to capture relevant data related to the real expectations and needs of users. To enrich our modeling, we proposed an original methodology to generate human scenarios and contexts instances. The objective is to assist the experimentation of new adaptive systems, especially in e-health, without risking the safety of persons in case of fails or runtime errors. The feasibility and e ectiveness of our approaches have been demonstrated through three types of user-centric services: the monitoring of activities of daily living, handling emergency situations, and ensuring the outdoor localization of persons. Our approaches based on adaptability techniques, finite states machine (FSM), and the combination of localization and genetic algorithms succeeded to provide a high level of accurate context-aware services with an optimized usage of resources.

The last part of the manuscript addressed the need of anticipating the context changes in context-aware systems. Our consideration of the context prediction provided, as ex-pected, a valuable support to handle critical services and improve the system's adaptability. However, the good consequences of our selected methods were the optimization of resources usage and the ability to provide adapted services even by processing a few amount of data. We proposed two di erent approaches. In the first approach, we were based on the Grey theory to design a new predictive monitoring algorithm. The resulting algorithm was able to collect relevant and contextual data, predict and detect risky situations, and evaluate the user's context while remaining e ective and cost-e cient. Our second approach was inspired by recurrent techniques that demonstrated promising results when the input data presents some sequential dependencies. This is the case of most human activities. Hence, we proposed RELM (Recurrent Extreme Learning Machine), in order to learn the input context and ensures a right balance between the learning time and the prediction accuracy. The e ectiveness of our approaches was demonstrated using many metrics such as the prediction's error and the forecast accuracy.

Perspectives

In this section, we provide some insights on short-term and long-term perspectives for our research directions.

Combining autonomic computing and context-awareness approaches

Autonomic networks are self-managed networks which run while minimizing the human intervention. An autonomic approach defines autonomic components aware of their current state and context. Once a change of the network's context is detected (e.g. using sensors), autonomic components take appropriate actions to reconfigure themselves (e.g. using actuators), and hence, the entire network is reconfigured [START_REF] Kephart | The Vision of Autonomic Computing[END_REF]. In autonomic computing, a control loop is applied in order to ensure such automatic and continuous self-management and configuration. The network autonomic elements are handled by an autonomic manager which monitors and analyses the context of the managed elements and trigger the execution of reconfiguration tasks. Di erent objectives (i.e. policies) can be targeted by the manager such as resources optimization and cost saving. In autonomic approaches, it appears essential to develop new distributed and collaborative functions in order to gain a sound knowledge of the network's context and its di erent elements. Such good knowledge will help to provide context-aware actions that consider not only the context of managed elements but also the whole network. Moreover, we can consider in the global context, the user's context including the user's terminals, his home network, and the characteristics of the services he usually uses. The design of new context-aware and autonomic functions will allow a dynamic adaptation of the network components in order to satisfy a set of predefined objectives. The AFI (autonomic network engineering for the self-managing Future Internet) of ETSI proposed an interesting generic autonomic network architecture (GANA) which defines a generic framework to specify and design autonomics-enabling functional blocks for any network architecture and its management architecture [START_REF]Autonomic Network Engineering for the Self-Managing Future Internet (AFI)[END_REF]. We are investigating the application of contextawareness principles within GANA in fiber to the home gigabit passive optical networks (FTTH-GPON). We aim to provide a dynamic management of the network parameters toward an optimized bandwidth allocation according to the user's behavior and use of the network [134] [135]. This research will be conducted in the ongoing Ph.D. thesis of Nejm Eddine Frigui that I co-supervise with J-M. Bonnin (Professor at IMT Atlantique).

Handling the heterogeneity in IoT networks for e-health

e-Health realm is known for its strong heterogeneity at di erent levels such regarding the used sensors, actuators, devices, protocols, data, and user profiles. IoT applications are still facing enormous challenges in healthcare such as the optimization of resources and the interoperability for an easier interconnection and integration of di erent hardware and software components [START_REF] Kim | IoT Networking: From Coexistence to Collaboration[END_REF]. Many manufacturers provide devices using their own technologies and services that may not be accessible by others. The standardization of IoT is very important to provide better interoperability of all Things. Moreover, new approaches should be defined in order to guarantee the coexistence of di erent protocols and devices with di erent capabilities especially in e-health. The network energy consumption is increasing at very high rate due to increase in data rates, the number of Internet-enabled services and rapid growth of Internet-connected edge devices. Future IoT will cause a significant increase in the energy consumption and network tra c. Thus, energy-saving based approaches are needed to make the IoT network as energy e cient as possible while minimizing the tra c and limiting it to the most relevant one, for example by adopting context-aware approaches and exploring prediction techniques to control Things. We aim to investigate these issues with a practical perspective and using theoretical (mathematical) models such as using recognition and prediction techniques. The proposition of new models for interoperability and resources optimization should be through the definition of new cross-layer and context-aware approaches, which consider di erent blocks and technologies of IoT such as communication, computation, and services. The context-aware paradigm will allow the design of smart adaptive IoT systems and networks that are able to manage and control the di erent available functionalities (sensing, acting, processing, storage, and communication) by including in the context: the current application (service), current context/profile of the user, the coordination of Things, services priorities, and available networks and protocols, etc. Hence, a better control of the IoT network, a better resources usage, and a healthcare service that matches better the user's preferences and needs. This topic will be investigated, with B. Cousin (Professor at University of Rennes I), in a new Ph.D. thesis in cooperation with the IUL University of Lebanon.

User's acceptability and adherence to IoT-based e-health systems

IoT systems are confronted with acceptance issues regarding their use and adoption by subjects and caregivers. This is explained by three main reasons: IoT still a new emerging concept, the requirements of end-users to whom the healthcare solutions are addressed, and healthcare professionals who usually lack for a technological background to use such new technologies and, sometimes, do not want to change their workflow and modes. Most of the healthcare systems combine several fields such as the monitoring of biometric information, chronic diseases, illness management, and daily activities monitoring. Therefore, the user's acceptance becomes a complex result influenced by the acceptance of each specific area. For instance, regarding the development of new care objects, it is observed that wearable sensors are more adapted to some populations (e.g. children and elders) especially for monitoring the daily activities or tracking specific vital signs. Indeed, such applications do not rest on the cognitive abilities of persons who simply wear the sensor for a specified time. Wearable can be traditional body sensors or used as smart clothing, which o ers optimum ease and comfort, thereby favoring their acceptance. The world market trend shows a notable growth of smart clothing shipments that surpassed body sensors in 2016. By 2020, it is expected that the number of shipments of smart clothing will be three times greater than body sensors [START_REF]Tractica, The Wearable Devices Market is Poised for Expansion into Smart Clothing and Body Sensors, tractica[END_REF]. Many real-world and theoretical researches have been conducted on the user's acceptance of new technologies but not in IoT for elderly. Moreover, the majority of existing real-world studies lack validation with a sound acceptance model like the UTAUT model [START_REF] Venkatesh | User Acceptance of Information Technology: Toward a Unified View[END_REF]. Since IoT is new, the few existing studies related to elders and new technologies must be reviewed in order to moderate previous findings to IoT and generalize factors of acceptance to be applicable in IoT. In our future research projects, we plan to investigate and highlight the acceptance of end-users and identify the major factors that a ect the user's adherence to proposed IoT-based healthcare systems.

Web of Things (WoT)

In a smart environment, a rich set of heterogeneous sensors can be used. Also, at any moment, a new sensor or Thing can be added or removed. In current smart spaces, integrating new sensors in the global processing of the system is not an easy task. There are many reasons for this situation. Mainly, the nature of the sensor and its abilities to communicate and how it communicates with the outside in an interoperable way, the proprietary and closed nature of some monitoring systems which not accept sensors from other manufacturers, and technical di culties related to data formats, frequency of sampling, and required modification of the existing monitoring algorithms [START_REF] Jänicke | Self-Adapting Multi-Sensor Systems: A Concept for Self-Improvement and Self-Healing Techniques[END_REF]. In IoT, the lack of interoperability can be likened to the situation before the Internet when there were competing non-interoperable networking technologies. The Internet solved this issue by making it easy to develop networked services independently of those technologies [START_REF]Web of Things Interest Group[END_REF]. The Web of Things Working Group, launched in early 2017, seeks to enable the expression of Things semantic upon the RDF and Linked Data standards [START_REF]Web of Things Working Group[END_REF]. The working group has recently released the Web of Things Architecture where the targeted use cases (smart homes, smart factories, and connected cars) are strongly close to our research interests. In the W3C WoT architecture, the first set of WoT building blocks is now being standardized [START_REF]Web of Things Working Group[END_REF]. These blocks are the WoT description, protocol binding templates, and scripting API. The first block provides a formal model and common representation for WoT descriptions. Descriptions provide a set of interactions based on a small vocabulary that can be used in our research to integrate heterogeneous objects and to allow di erent services to interoperate. The second block (protocol binding templates) provides reusable vocabulary and enables a Thing description to be adapted to the specific protocol usage across the di erent standards. The third block (scripting API) provides a standard interface that allows embedded scripts to achieve collaborative operations like finding and handling properties, actions, and events of other Things. These standard blocks are of high interest in our Web-based approaches with the aim to elevate the user quality of experience in smart spaces. In our future research, we plan to pursue our e orts in using and generalizing the Web as a powerful mean of interoperability across heterogeneous platforms.

5G networks and e-health evolution

The 5 th generation network (5G) will be a catalyst for new services by integrating networking, computing and storage resources into a unified infrastructure, becoming the nervous system of cognitive objects and cyber-physical systems. [START_REF] Thuemmler | A New Generation of eHealth Systems Powered by 5G[END_REF][START_REF] Thuemmler | Health 4.0: Application of Industry 4.0 Design Principles in Future Asthma Management[END_REF]. Unlike previous generations of cellular networks, there is a consensus that the 5G will be driven by a number of newly emerging use cases, particularly by the e-health applications [144]. 5G will provide a high variety of applications and variability of their performance attributes. For instance, from delay-sensitive video applications to ultra-low latency and from best e ort applications to reliable and ultra-reliable ones such as health and safety [144]. With 5G, the e-health services will be distributed and patient-centered with a shift towards virtualization and individualization of care [START_REF] Thuemmler | Health 4.0: Application of Industry 4.0 Design Principles in Future Asthma Management[END_REF]. 5G will accelerate the shifting of healthcare from conventional use to a strong pervasive use. With 5G, network function virtualization (NFV) and software-defined networks (SDN) technologies will form the backbone of future e-health services with IoT, smart pharmaceuticals, and individualized medicine. Cloud computing, big data, and enhanced security will enable virtualization and individualization of care [START_REF] Thuemmler | Health 4.0: Application of Industry 4.0 Design Principles in Future Asthma Management[END_REF]. The Next Generation Mobile Networks (NGMN) Alliance has developed 25 use cases for 5G, as representative examples, classified into 8 use case categories. We are particularly interested in the study of use cases in the Massive IoT and Ultra-reliable Communications categories. The first category considers smart wearables and sensor networks. The key challenges for these use cases are the overall management of multiple objects and the aggregation of the involved data. The second category (Ultra-reliable Communications) includes e-health extreme life-critical applications, mobile remote surgery (e.g. in ambulances or for disaster-response), and public safety. The main challenges are to ensure an ultra-reliable communication for emergency services and to handle priorities of the tra c.

Figure 2 . 1 :

 21 Figure 2.1: Main modules of Universally architecture.

Figure 2 . 2 :

 22 Figure 2.2: Evaluation of the media score with the window [w 1 =1 week, w 2 =4 weeks].

Figure 2 . 4 :

 24 Figure 2.4: Scenario: services integration and invocation with the proposed IMS extension

Figure 2 . 5 :

 25 Figure 2.5: Implementation of the 6 objectives in the MBMS architecture. BM-SC: Broadcast Multicast Service Center ; GGSN: Gateway GPRS Support Node ; SGSN: Serving GPRS Support Node ; RNC: Radio Network Controller.

Figure 2 . 6 :

 26 Figure 2.6: Services delivery based on the context of users

Figure 2 . 7 :

 27 Figure 2.7: Used intervals for the negotiation of number of subgroups

Figure 2 . 8 : 1 modify_the_subgroup_g 1 rgFigure 2 . 9 :

 281129 Figure 2.8: The application of criterion 1 in order to consider the reception rate of users

Figure 2 .

 2 Figure 2.10: WebRTC-based architecture for complex services.

3 . 1 47 3. 2 48 3. 2 . 1 48 3. 2 . 2 49 3. 2 . 3 52 3. 2 . 4 56 3. 3 57 3. 3 . 1 57 3. 3 . 2 60 3. 3 . 4 66 3. 3 . 6 69 3. 4

 3147248214822492352245635731573260346636694 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understanding and Modeling the Context . . . . . . . . . . . Research context . . . . . . . . . . . . . . . . . . . . . . . . . . Analysis of existing models . . . . . . . . . . . . . . . . . . . . Modeling the context . . . . . . . . . . . . . . . . . . . . . . . Generation of realistic contexts for services validation and experimentations . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 3.2.5 Summary of results . . . . . . . . . . . . . . . . . . . . . . . . . Design of Context-Aware Services . . . . . . . . . . . . . . . . Research context . . . . . . . . . . . . . . . . . . . . . . . . . . Framework of context-aware services . . . . . . . . . . . . . . . 59 3.3.3 Context-aware monitoring of daily living activities . . . . . . . Emergency situations . . . . . . . . . . . . . . . . . . . . . . . 62 3.3.5 Localization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of results . . . . . . . . . . . . . . . . . . . . . . . . . Conclusion of the Chapter . . . . . . . . . . . . . . . . . . . . . 70

Figure 3 . 1 :

 31 Figure 3.1: Matching of the dependency models AGGIR and SMAF

7 : 8 : 14 :

 7814 Smafscore -SM 1 + SM 2 + ... + SM 29 SMAF_Profile -GetSMAFprofile (Smafscore) 9: GIR -AggirScor (Smaf2AggirMatching(SM 1, SM 2, .. , SM 29)) 10: M [SMAF_Profile, GIR] -M [SMAF_Profile, GIR] + " function AggirScore(A1, A2, .. , A8) 15:

Figure 3 . 2 :

 32 Figure 3.2: An overview of the RDF modeling of context identification. Three properties are presented: identify, idType, and idValue. They are properties of the class MUPCon-textProfile: a super-class of software, hardware and services profiles classes. The identify property identifies a given context profile ; idType identifies the type of the identifier ; idValue is the value of the identifier.

Figure 3 . 3 :

 33 Figure 3.3: An example of simple transitions involving four activities.

Figure 3 . 4 :

 34 Figure 3.4: Framework of e-health context-aware services

5 : 6 : 7 :

 567 switch v do //we use the 4 intervals D/H/S/A (see the example of Section 3.3.3) case v • 0 and v † step : return -3; case v • step and v † 2.step : return -2; 8:

Figure 3 . 6 :

 36 Figure 3.6: Example of average hope distances (AHD) for anchor nodes A 1 , A 2 , and A 3 .

Figure 3 . 7 :

 37 Figure 3.7: Main steps of the proposed DV-Hop improvement based on GA. The algorithm is repeated till some stopping criterion is met.

Fig. 4 .

 4 1 shows an example of the observed (input) values and the predicted trend of monitored activities. The example considers the toileting activity in terms of duration and frequency.

Figure 4 . 1 :

 41 Figure 4.1: Comparison between the input (observed) values and the predicted values using GM(1,1). Here, the considered contextual dimension is the human activity of toileting and the values are the durations (required to achieve the activity each time) and the number of occurrences.

Algorithm 5

 5 The prediction of contextual values using the GM(1, 1)-based model 1: function GreyModel(durationBehavior(act)) 2:

X

  p1q -AGO X p0q .8:ra,bs T -`BT B ˘´1 B T Y . //Grey tries to find an estimation of "a" and "b" (1-e a ) //determine the predicted value at time k end function and simulating hypertensive patient profiles based only on blood pressure measurement.

Figure 4 . 2 :

 42 Figure 4.2: The Extreme Learning Machine (ELM) model.

Figure 4 . 3 :

 43 Figure 4.3: The Recurrent Extreme Learning Machine (RELM) proposed model.

Figure 4 . 4 :

 44 Figure 4.4: Main steps of the prediction using REM.

Table 2 .

 2 1: A subset of rules used in the media selection

	Rules	Behavior/Event	System actions
			-apply the 4 steps of media selection scheme;
			-display the identified item on the TV Set;
	R 1	turn on the TV	-initialize the energy saving timer 2 ;
			if (time to sleep OR the maximal recommended TV time per day is exceeded)
			then Display an alert message every 30mn;
	...	...	...
	R 3	flick the proposed channel/media item	-accept and perform the desired user's action; -updates the behavior patterns and preferences;
			-updates the wt value of the item in the behavior patterns (wt = current time -pt);
	R 4	a media item is completely watched	-apply the media selection scheme;
			-display the identified item on the TV Set;
	...	...	...
			-display the call on the TV set;
	R 8	a call is received	-pause on the current media item if it is an external media;
			-exclude the call interruption from the wt calculation;
	items of the new set of items and update the user's behavior log with the selected media
	item in the steps 1 and 2. It is worth noting that when the user performs an action (e.g.
	turning o the TV set or zapping a program), the system updates the behavior patterns
	and preferences. Newly identified preferences are updated using the MediaScore function
	upon new values of the pt, wt, and d variables of the last viewed items.

Table 2 .

 2 2: User's context used in local decisions of terminals collected by implementing the protocols SNMPv2 for IP and Multicast Ping Protocol (see IETF RFC 6450 and 2011).

	Parameter Signification
	service name	name of the requested service
	med	medium used in the delivery of the user's service
	x med BWi delayi errori	available bandwidth for the medium med in the path i xmed transmission's delay of the medium med in the path i xmed error rate of the medium med in the path i xmed
	costi	financial cost of the transmission using the medium med in the path i added to the cost of the service
	S med BW	required bandwidth to receive the "IP/UDP/RTP/Medium" packets from the BM-SC
	S med delay	maximal delay requested by the terminal to receive the service
	S med error	maximal error rate required by the treminal to receive the service
	S service cost	maximal financial cost supported by the terminal to receive the service

˚As

Table 2 .

 2 3: The support of MWBP 1.0 by AWI interfaces

	Best practices	# of MWBP 1.0 # of n/a # of supported
	of MWBP 1.0	statements	statements	statements
	overall behavior	4	0	4
	navigation and links	12	4	8
	page layout and content	12	2	10
	page definition	25	4	21
	user input	7	6	1

end if 31: end function

	16: 17:	if S1 • 4380 then return 1
	18: 19: 20:	else if (S1 • 4140 and S1 † 4380) or (S1 • 3390 and S1 † 4140) or .. or (S4 • 2400) then return 2 //note that values like 4380 and 4140 are the limits used by S 1´8 , see [94]
	21:	else if ... then
	22:	end if
	23: end function
	24: function GetSMAFprofile(Smafscore)
	28:	return 2
	29:

25: if Smaf score § -9.33 and Smaf score °-13.23 then 26: return 1 27: else if Smaf score § -13.23 and Smaf score °-19.76 then else if ... then (see [95]) 30:

  Zaineb Liouane, University of Rennes I and Ecole Nationale d'Ingénieurs de Monastir (ENIM, Tunisia), that I co-supervise with F. Weis (Associate Professor at University of Rennes I), P. Roose (Associate Professor at the University of Pau et des Pays de l'Adour), and H. Messaoud (Professor at ENIM, Tunisia) [

  Randomly choose the values of the weight w i and the bias b i of the pN x ˆkq forward matrix;//i P t1, . . . , ku is the index of the hidden layer neuron 4.Randomly choose the values of the weight w i and the bias b i of the pN y ˆkq backward matrix; //i P t1, . . . , ku is the index of the hidden layer neuron 5.Calculate the output matrix Hptq of the hidden layer; (see Eq.4.22)

	Algorithm 6 Recurrent Extreme Learning Machine (RELM)
	1. begin
	2.	for each sequence in the training set of sequences
	3.
	6.	Calculate the output weight -; (see Eq. 4.18)
	7.	end for
	8. end

  Zaineb Liouane, University of Rennes I and Ecole Nationale d'Ingénieurs de Monastir (ENIM, Tunisia), that I co-supervise with F. Weis (Associate Professor at University of Rennes I), P. Roose (Associate Professor at the University of Pau et des Pays de l'Adour), and H. Messaoud (Professor at ENIM, Tunisia) [50, 51, 52, 47, 44],• Haider Hasan Mshali, University of Bordeaux, that I co-supervised with D. Magoni (Professor at the University of Bordeaux)[46, 16, 48, 41, 43, 45],and the collaboration with L. A. Saidane (Professor at Université de la Manouba, Tunisia)[49]

used to turn o the TV set if no user's action or new event is detected within a fixed time value (EnerySavingValue variable set initially to 4 hours)

for more details on the 7 stages, the reader is referred to[30] and[32]

The FSM concept will be discussed in Chapter 3

The optimized version requires two steps: one with 1.35 hours then a second step with 3.81 hours[41]

see Section 3.3.3/activity-per-activity approach for the categories of activities

The sigmoid function is the most used in time series prediction problems[START_REF] Lotfi | Smart Homes for the Elderly Dementia Su erers: Identification and Prediction of Abnormal Behaviour[END_REF][START_REF] Patra | An Adaptive Local Linear Optimized Radial Basis Functional Neural Network Model for Financial Time Series Prediction[END_REF]. The selection of this function for our model was subject to validation in our contributions, see[50].

Algorithm 2 Adaptive Monitoring

A -29 activities; N -365 ˚24 ˚3600 seconds;

3:

//read the first activity & initialize the "next monitoring time" for activitie:

activity -readLine(inputScenario); nxtM T imepa i q -0;

5:

for i " 1 Ñ N do //simulate the time evolution, i is the current instant 6:

if i == startingT imepactivityq then 7:

switch activity do //the monitoring depends on the category of each activity 8:

case Category I : for l " 1 Ñ A do 33:

activityScorepa l q -SM AF ScorepactivitySubScorepa l qq;

34:

end for

35:

prof ile -computeSM AF P rof ilepactivityScoresq;

36:

//for computing the SMAF score, see [41] 37:

GlobalApproachU pdatespprof ileq;

38:

RelationalApproachU pdatespactivityScoresq;

Introduction

In this chapter, we present our contribution to the anticipation of context changes in context-aware approaches. If the consideration of the current context is the core of such approaches, taking into account the future context and following its evolution trend can provide valuable support for some specific services. Examples of such services include healthcare in smart spaces and the contextual monitoring of critical health parameters. We address the following questions: how to perform an accurate prediction of the user's Aset of activities; N -365 ˚24 ˚3600 seconds; //one year 3: activity -readLine(inputScenario); nxtM T imepa i q -0; end for 53: end procedure