Keywords

1 Introduction

With the rapid developments of sensors, computer science, and communication technologies, the intelligence degree of calculation also becomes higher and higher. As a kind of intelligent computing mode, context-aware computing has begun to be recognized by the industry and attracted widespread concerns. It requires that the system should automatically detect the context information (such as users’ location, time, environmental parameters, users’ activities, and so on), and use these information effectively to compute and provide appropriate services without much concern from users [1]. However, on one hand, various kinds of context information and different ways of perception in the real world make the expression of knowledge and realization of knowledge sharing and reuse become more and more difficult, which will make it hard to implement the knowledge-based reasoning; on the other hand, due to the limitations of sensing devices and network transmission, the context information acquired may be incomplete and imprecise [2]. Meanwhile, because of the inappropriate reasoning method, the high-level context information which is inferred from raw sensing data also has a certain degree of uncertainty [3]. Therefore, for the context-aware computing, how to explicitly describe the context information, realize knowledge sharing and reuse, and at the same time have the capability of modeling and reasoning about the uncertain context are the problems which need to be urgently solved.

The emergence of the ontology model and certainty factor model theory provides a good chance to resolve the problems above. Ontology-based models are more expressive for complex context information than other modeling methods. It becomes possible to share context by providing the formal semantics for context information [4]. But ontology-based models are difficult to support the uncertain reasoning. To overcome the difficulty, we introduce the certainty factor model, which is useful and successful for the uncertain reasoning. Its representative application is MYCIN system [5]. But the certainty factor model is weak in supports for semantic information and it is difficult to achieve the full expression of context information. So in this paper, we put forward an ontology modeling approach based on certainty factor in order to make full use of the complementary advantages of the ontology model and certainty factor model theory. Moreover, the weighting factors are introduced to the model to represent the importance and independence of evidences. On this basis, a certainty factor reasoning approach based on weights is presented to deal with the uncertain context.

This paper is structured as follows. Section 2 outlines the context-aware system. Section 3 gives the research on the ontology model based on certainty factor. Section 4 introduces the certainty factor reasoning approach based on weights. In Sect. 5, we show a simple application case. And Sect. 6 concludes the paper.

2 Overview of the Context-Aware System

Context is any information that can be used to characterize the situation of entities (e.g., a person, place, or object) which are considered relevant to the interaction between a user and an application, including the user and the application themselves [6]. Depending on different properties and purposes, context information can be divided into the following categories:

  • User context: user location, personal preferences, social relations.

  • Computing context: computing power, network bandwidth, and costs of communication.

  • Physical context: temperature, light intensity, noise level.

A system is context-aware if it can acquire, interpret, use context information, and adapt its behavior to the current context of use. As shown in Fig. 1, the context-aware system is logically divided into three layers:

Fig. 1
figure 1

Hierarchical model of the context-aware system

  • Context awareness layer: It is mainly used to obtain context information through user inputs or sensors.

  • Context processing layer: This layer, which reflects the intelligence of the context-aware system, uses the acquired context information to reason and compute, and get the appropriate processing results.

  • Context application layer: According to the context processing results, it will dynamically call the corresponding services, and adjust the device behaviors.

3 Context Model

3.1 Ontology-Based Model

An ontology may be defined as a formal, explicit specification of a shared conceptualization [7]. It helps modeling a world phenomenon by strictly defining its relevant concepts and relationships between the concepts. The ontology-based model has its advantages in: (1) facilitating knowledge sharing by providing a formal specification of the semantics for context information; (2) supporting for logic reasoning, referring to the capability of inferring new context information based on the defined classes and properties; (3) enabling knowledge reuse by use of existing and mature ontology libraries without starting from scratch; (4) having the stronger ability for expressing complex context information.

The Web ontology language (OWL) [8] has become the widely used ontology language for its benefits of the well-defined syntax, efficient reasoning support, formal semantics and the full expression ability, and so on. It can provide more semantic descriptions than XML, RDF, and RDFS through the increase of some modeling primitives (e.g., owl:Class, owl:DatatypeProperty, and owl:ObjectProperty), greatly improving the expressive ability of the model.

3.2 Ontology Model Based on Certainty Factor

Certainty factor (CF) denotes the degree that people believe that a thing or a phenomenon is true according to historical experiences [9]. It is a subjective and empirical concept and therefore it is difficult to grasp its accuracy. However, for a specific domain, experts have abundant professional knowledge and practical experiences, so it is not difficult to give the certainty factor of domain knowledge. Its value varies from −1 to 1.

The uncertainties of evidences and knowledge are both measured by certainty factor. CF(E) shows the credibility of the evidence E. CF(E) > 0 represents a degree of belief for the evidence E, and CF(E) < 0 represents a degree of disbelief for it. CF(H, E) means the support degree of the evidence E for the conclusion H. Its definition is given as follows [10]:

$$ {\text{CF}}(H,E) = \left\{ {\begin{array}{*{20}c} {\frac{{P({H \mathord{\left/ {\vphantom {H E}} \right. \kern-0pt} E}) - P(H)}}{1 - P(H)}} & {P({H \mathord{\left/ {\vphantom {H E}} \right. \kern-0pt} E}) \ge P(H)} \\ { - \frac{{P(H) - P({H \mathord{\left/ {\vphantom {H E}} \right. \kern-0pt} E})}}{P(H)}} & {P({H \mathord{\left/ {\vphantom {H E}} \right. \kern-0pt} E}) < P(H)} \\ \end{array} } \right. $$
(1)

According to (1), we can draw that when CF(H, E) > 0, there is P(H/E)−P(H) > 0, which means the probability that the conclusion H is true increases because of the presence of the evidence E, and when CF(H, E) = 0, there is P(H/E) = P(H), which shows the evidence E has no effects on the conclusion H, and when CF(H, E) < 0, there is P(H/E)−P(H) < 0, which indicates the probability that the conclusion H is false increases due to the impacts of the evidence E.

Considering advantages of the ontology in context modeling and supports for uncertain reasoning, this paper proposes an ontology conceptual model based on certainty factor, as is shown in Fig. 2. The context model adopts the hierarchical structure that defines the upper general ontology and the domain-specific ontology. The upper general ontology is composed of abstract concepts of various entities related to context information, in order to achieve ontology sharing in different application environments. The domain-specific ontology defines concept classes closely associated with the specific environments and their concrete subclasses in each sub-domain. The two-tier structure ontology model establishes a loosely coupled relationship between sharing knowledge and specific knowledge, and thus has a certain degree of commonality and expansibility.

Fig. 2
figure 2

Ontology conceptual model based on certainty factor

In Fig. 2, we have introduced Evidences class and Conclusions class in the upper general ontology, which are used to respectively express the underlying context information obtained from sensors and high-level context information derived by inference. Meanwhile, Certainty Factor class is added to describe the support degree of the evidence for the conclusion. The object properties, FromEvis and ToCons, show relations between the classes, i.e., the interdependencies between conclusions and evidences. In the domain-specific ontology, ConcreteEvidences class, ConcreteConclusions class, and ConcreteCF class, which are subclasses derived through inheritance, are used to denote all possible values involved in a specific domain. The new data type properties, hasCF and hasWeight, are added to these subclasses to express the credibilities and weights of evidences or conclusions, so that the model can support the dynamic nature and uncertainty of context information, and different importance of evidences on conclusions in the context-aware environments. Among them, the weights of evidences are directly given by domain experts. If the conclusion is the final result of reasoning, its weight is set to 1; if the conclusion is the intermediate result of reasoning, it needs to be assigned to the corresponding weight by domain experts in order to continue to serve as the evidence for the upper reasoning.

As the reasoning model of uncertain information, the model not only realizes the precise expression of context information and knowledge sharing, but also supports the uncertain reasoning by the uncertainty representation for the domain knowledge.

4 Context Reasoning

In the context-aware system, information from physical sensors, called low-level context and acquired without any further interpretation, may be meaningless, trivial, vulnerable to small changes, or uncertain [11]. A way to alleviate these problems is the derivation of higher level context information from raw sensor values, which is called context reasoning. The modeling of context information is directly related to the concrete realization of context reasoning. Because the ontology model based on certainty factor proposed above has introduced the certainty factors and weights as entities’ property information, the paper gives a certainty factor reasoning approach based on weights. It makes reasoning results more consistent with the real world by considering the influences of the importance and independence of evidences on conclusions.

4.1 Setting of Weights

When multiple evidences support the same conclusion, there may exist interdependencies between them, i.e., they are not mutually independent. What’s more, each evidence may contain a different amount of information and thus has different degrees of importance on the corresponding conclusion. Therefore, the weighting factors are introduced to represent the importance and independence of evidences. Usually, the weighting factors of evidences are directly given by domain experts based on the following two factors:

  • Importance of evidences on conclusions: the more important the evidence is, the greater the corresponding weight is.

  • Independence of evidences: the more reliance the evidence has on other evidences, the smaller weight it has.

4.2 Uncertain Reasoning Process Description

Let’s introduce a definition first: the certainty factor of the weighted evidence is called the absolute certainty factor of the evidence. In the uncertain reasoning process, the absolute certainty factor of the evidence is made use of to participate in the synthesis of conclusion uncertainty. In the following, we have three steps to show the process of uncertain reasoning.

  1. Step 1

    We use (2) to get the absolute certainty factor of the evidence:

$$ {\text{CF}}^{\prime } (E_{i} ) = \frac{{w_{i} }}{{\mathop {\text{Max}}\limits_{i} (w_{i} )}} \cdot {\text{CF}}(E_{i} ) $$
(2)

For this, \( {\text{CF}}(E_{i} ) \) is the certainty factor of the evidence E i ; w i is the weight factor of the evidence E i ; \( \mathop {\text{Max}}\limits_{i} (w_{i} ) \) is the maximum value of w i , i = 1, 2, …, n.

  1. Step 2

    The certainty factor of the conclusion for each evidence is obtained as follows:

$$ {\text{CF}}_{i} (H) = {\text{CF}}^{\prime } (E_{i} ) \cdot {\text{CF}}(H,E_{i} ) = \frac{{w_{i} }}{{\mathop {\text{Max}}\limits_{i} (w_{i} )}} \cdot {\text{CF}}(E_{i} ) \cdot {\text{CF}}(H,E_{i} ) $$
(3)

where \( {\text{CF}}(H,E_{i} ) \) is the certainty factor of knowledge corresponding to each evidence and \( {\text{CF}}^{\prime } (E_{i} ) \) is the absolute certainty factor of the evidence E i computed above.

  1. Step 3

    The synthesis of \( {\text{CF}}_{i} (H) \) is calculated as follows:

Suppose there are two evidences E 1 and E 2 reasoning out the same conclusion. The synthesis formula for the conclusion is shown by

$$ {\text{CF}}(H) = \left\{ {\begin{array}{*{20}c} {{\text{CF}}_{1} (H) + {\text{CF}}_{2} (H) - {\text{CF}}_{1} (H) \cdot {\text{CF}}_{2} (H) \, } & {{\text{CF}}_{1} (H),{\text{ CF}}_{2} (H) \ge 0 \, } \\ {{\text{CF}}_{1} (H) + {\text{CF}}_{2} (H) + {\text{CF}}_{1} (H) \cdot {\text{CF}}_{2} (H) \, } & {{\text{CF}}_{1} (H),{\text{ CF}}_{2} (H) < 0} \\ {\frac{{{\text{CF}}_{1} (H) + {\text{CF}}_{2} (H)}}{{1 - \hbox{min} \{ \left| {{\text{CF}}_{1} (H)} \right|,\left| {{\text{CF}}_{2} (H)} \right|\} }} \, } & {{\text{ CF}}_{1} (H) \cdot {\text{CF}}_{2} (H) < 0} \\ \end{array} } \right. $$
(4)

If there are more evidences E 3, E 4, and so on, we will still follow the steps above. First, \( {\text{CF}}_{i} (H) \) of each evidence is acquired according to (3), and then \( {\text{CF}}_{1,2} (H) \) is calculated for the first two evidences by using (4). Next, we still use (4) for the synthesis of \( {\text{CF}}_{3} (H) \) and \( {\text{CF}}_{1,2} (H) \), then the fourth, and so on. Finally, the synthetic certainty factor \( {\text{CF}}(H) \) is obtained after the combination of all the evidences.

5 Case Study

As an important application field of context-aware computing, the home health telemonitoring system has achieved rapid developments and integrated into our lives. In this application scenario, we assume that the biomedical parameters (e.g., blood pressure, body temperature, and heart rate) of the elderly are monitored via a variety of sensors (e.g., embedded sensors and wearable sensors) deployed in the room, and then the sensed context information is automatically analyzed and processed. Eventually, the conclusion related to the physical condition of the elderly is drawn, and moreover, the monitoring system will call the executive equipment to provide appropriate services (for instance, alarm services, E-mail, and SMS) for critical situations. According to this application case, we show how to construct the ontology model based on certainty factor and apply the uncertain reasoning approach.

5.1 Reasoning Model of Uncertain Context

We use the ontology editor tool Protégé 4.1 to construct the reasoning model of the home health telemonitoring process described above, i.e., the ontology model based on certainty factor. Its class diagram appears in Fig. 3.

Fig. 3
figure 3

Class diagram of the ontology model

In this model, it is assumed that there are three evidences: blood pressure (E1), body temperature (E2), and heart rate (E3), which are respectively expressed as the three subclasses of Evidences class. Abnormal class, the subclass of Conclusions class, is added to represent the reasoning conclusion, i.e., it means that the old people are critically ill. The three subclasses, CF_1, CF_2, and CF_3, are also added to describe the support degree of each evidence for the conclusion. The object properties, FromEvis and ToCons, are used to show the interdependencies between each evidence and the conclusion. And the certainty factors and weights of evidences or conclusions are realized by data type properties hasCF and hasWeight. The partial OWL descriptions for the model are illustrated in Fig. 4.

Fig. 4
figure 4

The partial OWL descriptions for the model

We can read the OWL ontology via Jena [12] and extract the reasoning-related information from the above OWL ontology model, so as to get prepared for the implementation of the uncertain reasoning.

5.2 Application of Uncertain Reasoning

According to expert experiences, we can always get the mapping function from the raw context data to CF (H, E). Based on the mapping function curves, we acquire the CF (H, E) corresponding to each biomedical parameter. As the information obtained from sensors is certainty information, the certainty factors of evidences are all endowed with 1, i.e., \( {\text{CF}}(E) = 1 \). Table 1 gives weights of evidences set by experts and the certainty factors of knowledge at some point.

Table 1 Weights and certainty factors of knowledge

The uncertain reasoning process is as follows:

$$ \begin{aligned} {\text{CF}}_{1} (H) & = {\text{CF}}^{\prime } (E_{1} ) \cdot {\text{CF}}(H,E_{1} ) \\ & = \frac{{w_{1} }}{{\mathop {\text{Max}}\limits_{i} (w_{i} )}} \cdot {\text{CF}}(E_{1} ) \cdot {\text{CF}}(H,E_{1} ) \\ & = 0.6 \\ \end{aligned} $$

Similarly, we get \( {\text{CF}}_{2} (H) = 0.9 \) and \( {\text{CF}}_{3} (H) = - 0.49 \). And thus the synthesis results are:

$$ \begin{aligned} {\text{CF}}_{1,2} (H) & = {\text{CF}}_{1} (H) + {\text{CF}}_{2} (H) - {\text{CF}}_{1} (H) \cdot {\text{CF}}_{2} (H) \\ & = 0.6 + 0.9 - 0.6 \times 0.9 \\ & = 0.96 \\ \end{aligned} $$
$$ \begin{aligned} {\text{CF}}_{1,2,3} (H) & = \frac{{{\text{CF}}_{1,2} (H) + {\text{CF}}_{3} (H)}}{{1 - \hbox{min} \{ \left| {{\text{CF}}_{1,2} (H)} \right|,\left| {{\text{CF}}_{3} (H)} \right|\} }} \\ & = \frac{0.96 - 0.49 \, }{{1 - \hbox{min} \{ 0.96,0.49\} }} \\ \, & = 0. 9 2 { } \\ \end{aligned} $$

The system credibility threshold \( \lambda \) is introduced to determine whether the conclusion will happen. If the synthetic certainty factor of the conclusion is greater than it, then the conclusion is true. For the case, we set \( \lambda = 0.9 \). As \( {\text{CF}}_{1,2,3} (H) = 0.92 > \lambda \), it is believed that the conclusion is true, i.e., the old people are in a critical condition. The monitoring system needs to make the real-time response to the critical situation, such as triggering an alarm, and notifying family members or the emergency center, etc.

6 Conclusion

Context modeling and reasoning are the key problems of realizing context-aware computing. In this paper, we put forward the ontology model based on certainty factor. On this basis, a certainty factor reasoning approach based on weights is presented to deal with the uncertain context. The advantages of the proposed approach lie in: (1) realizing the precise expression of context information and knowledge sharing; (2) extending the representation of ontology for the uncertain context and thus supporting the uncertain reasoning; (3) making reasoning results more consistent with the real world by taking into consideration the influences of the importance and independence of evidence sources on conclusions. Finally the feasibility and validity of the proposed approach are illustrated through the case study and analysis.