# Autonomic Semantic-Based Context-Aware Platform for Mobile Applications in Pervasive Environments
## 5 Potentials Scenarios and Validation
### Real-Life Scenarios
#### 5.2.1 Scenario I: User A in Home Using Smartphone (or Smart TV or Smart Watch)  
A first simple scenario is made of a User A, which is at _home_ using a Samsung smartphone. User A can use our platform to monitor his or her health in a more practical way. He or she uses an intelligent environment (smart home), which includes smart devices, sensors (glucose meter, weight scale, video camera) and services. As proposed in our architecture, the principal role of the _Context Monitor_ is to supervise User A in order to detect abnormal situations. The _Context Monitor_ collects and preprocesses context information from the smart sensors and stores it in a database. Then, it represents and reasons about this context using our ontology and _Context Reasoner_ in order to deduce the current situations that are reported to the _Service Controller_. The latter is responsible for providing the appropriate service to the user according to the inferred situations. In fact, as illustrated in Figure 18: (1) contextual information is collected from the smart home by the Context Collector, and it is stored in a database; this means that the information simulated via the prototype interfaces is stored automatically in a database; (2) this information is pre-processed by the Context Pre-processor and (3) converted into a triple pattern in OWL format and inserted in our ontology by the Context Translator; then, (4) the Context Reasoner uses the Situation Inference Engine, which is based on JESS, which executes the Situation Rules presented in Table 2 (translated in SWRL by _Constraint Translator_) and infers the current situations. These situations are transmitted to the Service Controller. Figure 18: Ontology/rule-based architecture simulation. Once User A is connected and clicks \"**My Space**\", the Kali-smart platform sends the initial actions configuration file to the Kalimucho Server, launching automatically the GPS location service. The script bellow is generated by the reconfiguration generator after scanning the environment with the help of Kalimucho in order to know the available devices and to orchestrate the best way to deploy the components (Figure 19). Once a user location is identified (e.g., smart home, smart car, smart office), the _Action Reasoner_ receives a notification that triggers the search for appropriate services according to the identified user location. The script bellow is generated by the reconfiguration generator after scanning the environment with the help of Kalimucho. Our Prediction Reasoner deploys interactive multimodal services in a smart TV using the voice modality and in a smart watch using the gesture modality. Once an abnormal situation is identified, the ASSACR is responsible for discovering available services around the user location. This is done thanks to the SNMP protocol and the middleware Kalimucho server side offering such a service; the ASSACR uploads different available services' profiles and starts semantic service matching that fulfills the user context and preferences according to Equation (1) (Section 4.2). User A is looking for a quality multimedia health service with low cost with implicit constraints: the screen resolution of the smartphone is limited to = 400 \(\times\) 600, which is less than the document video. Now, studying both local and remote service results and taking into consideration the user preferences, the degree of the similarity is always high if the set of context  
Figure 19: Available devices in a smart home and the initial script generation. attributes suggested by the health service and requested by User A is great, no matter the number of attributes provided by the service, but not asked by the client. Three available health services with different modalities with different multimedia contents across User A's location are as depicted in Figure 20. We used [18] for classifying the relevant interactive services that have a potential benefit.