# A Context-Aware Edge Computing Framework for Smart Internet of Things
## 3 Framework Architecture
### Context Management
#### 3.1.3 Context Reasoning  
The context reasoning module attempts to extract new knowledge out of the existing context. Its main functions are shown in Figure 5. IoT allows the deployment of millions of sensors which may serve different or similar goals. Combining data from multiple sensors, identical or different, gives information that is more accurate, complete and of higher certainty. Data fusion can occur in three scenarios: first, complementary fusion incorporates the different factors measured by different sensors to form a full and broader understanding; and second, redundancy fusion helps improve the measurement of a single factor through multiple sensors. Finally, cooperative fusion combines data from different factors to deduce new knowledge [26]. The next step after fusion is the inference which deduces a higher-level context from a low-level one (e.g., context models). These two steps are intertwined and can be distinguished in terms of the output context level.  
Figure 4: Context Modeling Module.  
Reasoning methods have been extensively surveyed in [9; 10]; thus, in this section, we broadly mention just a few of them. Ontology-based reasoning uses description logic and integrates closely with ontology models and therefore has many advantages. It suffers from missing values although it can be mitigated using rules. It is mainly common with hybrid reasoning, activity recognition and event detection applications. Simple if-then-else rules can be used to extract higher levels of context. It is the most popular form of reasoning and it is usually used in combination with ontology reasoning. Supervised learning uses the collected data along with chosen (i.e., expected result) labels to train the models for reasoning. Decision trees, neural networks and support vector machines (SVM) are among the most commonly used models. Unsupervised learning, on the other hand, is used when labels are unavailable: it identifies structures on unlabeled data. K-Nearest Neighbor (KNN) is one of its most popular methods used to find clusters in data. Probabilistic reasoning employs probabilities linked to facts about an event or a task to make decisions. This approach can handle unseen and uncertain situations. Hidden Markov Models (HMMs) and Naive Bayes are known methods which were used in applications such as activity recognition [28].  
A context model is assessed using a quality-of-context (QoC) measure that varies from implementation to another. However, it usually consists of three parameters, namely validity, precision and updatedness. A more comprehensive definition proposed by [29], which takes into account the quality of the sensor and the degree of fulfillment of the requirements, states that \"QoC indicates the degree of conformity of the context collected by sensors to the prevailing situation in the environment and the requirements of a particular context consumer\". QoC evaluators vary in complexity according to the needs of each system and its computational limits. Ref. [29] presents an overview of QoC models. The final step for a context is to be validated to guarantee the correctness of the data. Various conditions can be verified such as the data value, data type, consistency and data source quality.