Keywords

1 Introduction

Currently, smartphone has become a kind of common portable intelligent terminal for people. Due to the fact that smartphone owns a variety of highly integrated sensors with mature technology, it has become the most suitable mobile platform for the development of context-aware applications. The combination of intelligent communication technology and sensor technology has driven the demand for the development of context-aware adaptive services on the mobile terminal, which collects the user’s contexts and their changes, initiatively provides the user personalized information and services, so as to satisfy his needs. For example, the smartphone plays the user’s favorite songs automatically when he takes the subway.

Applications of Context-aware system involve e-learning [1, 2], tourism [3, 4], transportation [5], health care [6, 7], entertainment [8] and so on. Recently, many system frameworks have been proposed. Context toolkit [9] which provides support for acquiring the context data from the heterogeneous sensors, but does not support fusion that is essential for context-aware system. Context-aware middleware [10, 11], serves as a software layer to abstract the heterogeneity of the lower layer and ease the complexity of developing a higher layer, but it ignores preservation of historical context data for further use or queries. Context agent architecture [12, 13], which usually requires multiple agents as well as a mediator to negotiate with them. Cloud-based context-aware infrastructure [14,15,16], relaxes the memory by making the cloud responsible for the storage and recognition of context, but it may consume more resources than is expected to save. As for existing frameworks of mobile context-aware application [17,18,19], left a lot of context management and computational burden on smart phones, such as, neither taking into account of the limited computing resources, storage space nor considering smart phone as the main context information provider.

Hence, this paper aims to propose a new mobile context-aware framework for providing the user of smart phone with personalized services, which is based on the user’s behavior pattern and the current context. The contributions of this paper are listed as follows:

  1. (1)

    We propose the definition of mobile context-aware computing, which identifies the difference among raw data, low level context and high level context, and then we divide the mobile context into four categories, it specifies our work.

  2. (2)

    We present a general framework of mobile context-aware recommendation system, which can make the intelligent mobile terminal not only collect all kinds of sensor data, but also reason and apply contexts under complex context-aware conditions.

  3. (3)

    We construct a non-relational data description model based on nested key-value, which is applicable to mobile intelligent terminal where multi-source and heterogeneous data grows rapidly while the storage capacity is limited.

  4. (4)

    We design a sequential pattern mining algorithm, which incorporates the new concepts, classification and non-relational model to discover user’s consistent behavior pattern and their recent changes from the multidimensional context and behavior information, it offers efficient and flexible instance of framework.

The rest of paper is organized as follows: Sect. 2 introduces the theory of context awareness and discusses the context-aware definition, classification and context-aware computing in the mobile terminal; Sect. 3 puts forward our new framework and key technologies of a mobile context-aware system, such as model and algorithm; In Sect. 4, two case studies are demonstrated so as to illustrate the usefulness and applicability of the proposed system framework, the effectiveness and the efficiency of the improved algorithm and mode; Sect. 5 concludes the research and discusses future research direction.

2 Definition and Classification of Mobile Context-Awareness

Context-aware, firstly proposed by Schilit et al. [20] in 1994, originates from pervasive computing. Many definitions of context have been proposed in various research fields according to the corresponding application [21]. The common definition, proposed by Dey [22], describes the state of an entity’s information. An entity can be a person, a place, or an object that is related to the interaction between the user and the application. Context-aware computing [23] is defined as automatic adjusting or adapting to the system application according to the user’s contexts; context-aware system [24] is a system that utilizes context information to provide users with information or services.

This paper argues that mobile context-aware computing actively apperceives information of entity and changes of the information through built-in sensors of the mobile terminal, and then provides user services relate to the current context based on information management and processing. For instance, the smart phone detects ambient noise levels and automatically adjusts the volume of the ring when the user takes the subway.

Researchers had proposed different context classification based on different perspectives [25, 26]. We suggest that data obtained directly from the sensor is raw data and information obtained through processing is low level context, such as location, time and behavior, the information found in the low level context is high level context. For example, readings of GPS sensor are regarded as the raw data, and the location expressed from readings is low level context, and the user’s behavior reasoned by the geographical position is high level context.

In this paper, the mobile context is divided into four categories: time, location, physics and behavior, each of them can be further classified according to its specific characteristics, as shown in Fig. 1.

Fig. 1.
figure 1

Classification of mobile context.

A detailed description is listed as follows:

  1. (1)

    Time, description about the temporal information;

  2. (2)

    Location, description about the user’s location;

  3. (3)

    Physics, description about the natural environment characteristics of the user;

  4. (4)

    Behavior, description about the user’s complete information of the service state or the activity concerning the current task.

3 Framework of Mobile Context-Aware Recommendation System

In this section, we analyze the basic concepts and requirements of context-aware framework, and then design a general framework for context-aware system that conforms to the mobile environment.

The main challenges of mobile context-aware recommendation system contain three points: firstly, original sensor signal without preprocessing and interpretation is usually useless, therefore, it is necessary to carry out cleaning, fusion and interpretation for sensor data; secondly, the data description model needs a strong expression ability considering multi-source heterogeneity and the spatiotemporal characteristics of mobile context-aware data; thirdly, mobile context is rich in attributes and the corresponding reasoning process is very complex.

The mobile context-aware recommendation system which we construct here is a human centered computing system, it automatically senses the user’s environment information and its variation through the sensor technology and mobile technology, infers the high level context information from the low level context, predicts the user’s intention by matching the user’s current context, it initiatively provides services related with the current context and improves the quality of user’s experience. The framework of mobile context-aware recommendation system is shown in Fig. 2.

Fig. 2.
figure 2

Framework of mobile context-aware recommendation system.

The mobile context-aware recommendation system mainly includes four modules: context acquisition, context modeling, context reasoning and context application. The functions of each module are listed as follows:

  1. (1)

    Context acquisition module: It collects original data through mobile intelligent devices of various embedded sensors, including physical sensors and virtual sensors. Data processing includes cleaning, feature fusion, aggregation and so on.

  2. (2)

    Context modeling module: It expresses the context information in an unified and proper format which can be identified by the computer, and describes semantic meaning of the data.

  3. (3)

    Context reasoning module: It learns modeled context in order to obtain the implicit semantics hidden behind the relevant features of the context, including user’s services and behavior prediction, eventually, we can obtain high level context information from the low.

  4. (4)

    Context application module: It adopts adaptive action by a combination of high level context information and the user’s current context.

In addition, the sensing system should also have the functions of transmission control, access control and security privacy protection. However, these are not related to our research, therefore we will not pay attention to those.

3.1 Context Acquisition

The way of context acquisition can be divided into three types: explicit, implicit and reasoning.

  1. (1)

    The explicit acquisition: It obtains the user’s data through direct inquiry, special system setting and web survey. This method is simple and direct, it can exactly reflect the information and relatively obtain accurate and reliable result; but this method needs users take time to express their contexts which are heterogeneous, so it is invasive and inflexible.

  2. (2)

    The implicit acquisition: It automatically tracks the physical or virtual sensing devices, perceives the user’s related data, and then obtains the user’s information. This method does not require users to participate in the interaction process. However, the data may not correctly reflect the true context, because the user may be disgusted with automatic tracking, sensing and reject to use current mobile context-aware recommendation systems.

  3. (3)

    The inference acquisition: It obtains information commonly by data mining and statistical techniques and conducts data analysis, acquires information which is based on constructing prediction model, training dataset and others. For example, the user does not want to be disturbed by the news notification between 10 p.m. and 6 a.m. because of sleeping.

For the context-aware system on a mobile terminal, the information acquisition adopts an implicit way to record journey between home and workplace. In this process, the sensors record the acceleration, atmospheric pressure, temperature, humidity, the sound of the surroundings and others. GSM network cell identification code (Cell ID) and location area code (LAC) records the user’s location, all data is collected once a second, the low level context information is obtained by processing the raw sensor data as shown in Fig. 3.

Fig. 3.
figure 3

The low level context information.

The advantage of using the built-in sensors to obtain the information is that it does not require the user to spend time in answering the question, however, the disadvantage is that the data may not be accurate, and there are missing values. Therefore, the collection of context information needs data cleaning, interpretation, description and other data processing techniques to carry out storage, reasoning and other operations.

3.2 Context Model

Mobile intelligent devices generate and accumulate a large amount of dynamic and heterogeneous data, which has obvious spatiotemporal characteristics. How to establish an unified abstract logic model, in order to deal with and store the context information of heterogeneous source, is one of the hotspot in the study of context-aware computing. Existing models of context information mainly contain key-value, markup scheme, graphical, object based, logic based, ontology based and so on.

Key-value model is the most basic data description model of computer software design, simple but very practical. In the key-value model, a global and unique identifier is assigned to all entities. The key is the information in the current environment of these entities, while the values are the entity and the information.

The context data of mobile context-aware recommendation system is continuous and real-time, various in attribute and abundant in temporal properties; but the behavior is occasional and very sparse by comparison, results in the data amount of context data and behavior is not balanced. In addition, with the development of context-aware applications, the database server of the context-aware system not only operates and manages database, but also responds to the high concurrent requests of the client.

Traditional database system mainly uses the relational model to store formatted data table, assigns all fields for each tuple, such a structure is easy to operate with multiple tables, but cannot support high concurrent access, which limits the whole system scalability. It will cause the system slow and instable when the amount of data increases exponentially. The structure of key-value model, as the representative of non-relational database, is not fixed. There is no need to associate tables with a relational database as multi-table query, just take the corresponding value out of the key even if getting the user’s different information. In the key-value model, all entities and information of those entities in the current environment is assigned a globally unique identifier, known as key, entities and information such as the data itself is known as value, the key and the value must be one-to-one. Generally, type of the key is unified, it may be an integer or a character, and types of the value can be diverse according to the actual application, even empty.

We propose an improved data storage model based on nested key-value in the context modeling module, it collects the context-aware data and user’s behavior as the key from smart phones, the corresponding value is another key-value pairs whose key is the sequence number and the value is the timestamp of context data in that sequence. A relational table such as Fig. 4(a) shows is converted to nested key-value storage model as shown in the Fig. 4(b). Multidimensional item described by location, day and period is the parent key, the value corresponding to the key is another pair of key-value, the sub key is the sequence number, and the sub value is the time information. The key-value stored in the serialization forms in the file can quickly query the key and its value.

Fig. 4.
figure 4

Comparision between relational table and nested key-value storage.

Temporal features, which are obvious in the mobile context-aware system, can be stored by combining with the timestamp in key-value. In addition, key-value can be stored based on the column to compress the input volume due to a lot of data (such as air pressure, humidity, etc.) stays stable or changes a little over a period of time, it just needs to record one value on continuous time point, thus effectively reducing the space overhead.

3.3 Context Reasoning

Context reasoning is a method of deriving high level new knowledge from the existing low level context. Existing reasoning techniques can be divided into six categories: supervised learning, unsupervised learning, rule based reasoning, fuzzy logic, ontology based and probability logic. Due to the limits of mobile intelligent terminal in memory, power and other fields, a concise and powerful reasoning technology is needed to find user’s consistent behavior habits and their recent trends. The Rule based method has become the most popular technology for its straightforward and understandability in knowledge reasoning, it is very suitable for the generation of high level information from the low level [27]. However, the traditional mining methods only attach importance to the order without considering the location, time, weather and other attributes, so it is not suitable for the mobile context-aware recommendation system to mine user’s behavior pattern. In reasoning module, we construct a multidimensional sequential pattern mining algorithm UTDMSP (Up-to-Date multidimensional sequential pattern) to learn context information and user’s behavior sequential pattern, it can not only discover the user’s long-term behavior habits, but also capture the new trends of user’s behavior or habits. In this algorithm, the maximal time interval between two adjacent items of sequence is termed as gap and the maximal time interval of the first item and the last item is termed as the width.

The algorithm UTDMSP is described as follows:

  • Step 1: We map the sequence database into nested key-value storage model after scanning it once, the key of the parent model is the sequence descripted by multidimensional context data, the value corresponding to the key is another key-value pair whose sub-key is the serial numbers of sequence and sub-value is the temporal information corresponding to the sequence.

  • Step 2: We join sequence Seq1 with Seq2 only if the subsequence obtained by dropping the first item of Seq1 is the same as the subsequence obtained by dropping the last item of Seq2. The candidate sequence is generated by extending the sequence Seq1 with the last item of Seq2, its serial number set is the intersection of Seq1’s and Seq2’s.

  • Step 3: We remove the candidate sequence which has a non-frequent subsequence, because it could not be frequent according to downward closure property of Apriori algorithm. We compute global support of each candidate sequence under both gap and width constraints in the sequence database SeqDB = {Seq1, Seq2,…, SeqN}, if it is greater than or equal to the minimum support threshold, join it in frequent itemsets; otherwise, validate whether the support is frequent in a recent period, if true, we also join it in the frequent itemsets and record the serial numbers of sequences which it belongs.

  • Step 4: Repeat step 2–3 until the candidate item is not produced.

  • Step 5: We calculate the confidence of frequent sequences, if it meets the minimum confidence threshold and the last item of the sequence is one of user’s behavior, then generate a rule and put it into the rule set R.

After that, we store the user’s behavior sequence rules that are mined by the multidimensional sequential pattern mining algorithm UTDMSP from the knowledge base, wait for the context application module to trigger behavior prediction by matching user’s current context with his behavior sequence rules.

3.4 Context Application

Häkkilä and Mäntyjärvi [28] divided the context application into two classes: the first is information retrieval by utilizing acquired data, and the second is device adjustment so as to respond to user’ needs. Dey et al. [25, 29] assorted context application for three groups: active perception, passive perception, and personalization. Gu et al. [30] distributed context application into two kinds: the first focuses on physical perception, such as the location-based services, and the second concentrates on more abstract context application based on user-oriented behavior, and social, organizational environment, such as information retrieval.

In the context-aware system framework of this paper, the context application module constantly detects the user’s context information, and compares the acquired information with user’s behavior sequence rules of context reasoning module. When user’s current context information matches the antecedent of the behavior rules on the condition of time interval and duration thresholds, we make the subsequent of the rules as the predication of user’s next behavior, then the mobile context-aware recommendation system can initiatively provide services to user. In the process of matching the rules, the rule matching is failed whether the gap or the width exceeds a threshold.

4 Application of Mobile Context-Aware Recommendation System

In this section, we will illustrate how to use the framework of mobile context-aware recommendation system and related methods to recommend services in some fields such as smart phone service and user’s behavior recognition.

Mobile context can be represented on different granularity according to the number of attributes contained in the mobile context, such as location, noise level, time and so on. Generally speaking, the more attributes in context, the more specific the context information. In this paper, we use four dimensional data with location, day, period and behavior, as shown in Table 1.

Table 1. Data description

The sequence rules obtained using the nested key-value model and the multidimensional context-aware sequential pattern mining algorithm are shown in Table 2. Rule 1 represents a user attends academic discussion activities in the teaching building on Tuesday morning; Rule 3 represents a user often browses a website after visiting canteen and laboratory on Friday morning.

Table 2. Multidimensional sequence rules

The results are evaluated by precision, recall and F1. The precision illustrates the probability that the predicted interactive behavior happened actually, the recall presents the probability that the interactive behavior can be predicted, and the F1 reflects the overall index of two previous methods. All experiments were set minimum support MinSupp = 0.09, minimum confidence MinConf = 0.7.

4.1 Forecast of User’s Activity

Activity Log Dataset [31], which is collected by the pervasive computing group of Northwestern Polytechnical University, records user’s daily social activities by mobile phone and online blog. This dataset includes: type of activity (such as meeting, running, shopping, etc.), activity location (such as conference rooms, stadiums, shops, etc.), and activity time. We look for frequent subsequences from mobile context data and user’s daily social activities based on the framework and algorithm UTDMSP proposed in this paper, then we can discovery useful behavior pattern of the user. For example, the user usually has a discussion with his teacher and schoolfellows on Monday’s morning and takes a walk in the playground after dinner almost every day.

In the course of experiment, we maintain minimum support and minimum confidence unchanged, then we change gap and width thresholds: gap = 7200 s, width = 18000 s; gap = 10800 s, width = 36000 s; gap = 18000 s, width = 36000 s; gap = 36000 s, width = 72000 s, the result is presented in Fig. 5. The social activity prediction accuracy rate decreased, which lead to the decrease of the F1 value. The reason for the decline of accuracy was that the system reasoning module found more rules since we gradually relaxed two kinds of time thresholds, but some predictions of social activities did not happen.

Fig. 5.
figure 5

Forecast of user’s activities.

4.2 Forecast of Smart Phone Service

Nokia Context Data [32], which is collected by NOKIA Research Center, records the user’s environment and smart phone services. For example, application program, communication service, and web browsing. The interaction behavior between the user and the mobile phone, such as web browsing, music listening, etc., can be captured and collected by the smart phone. The user’s interaction information can be used to learn the user’s behavior pattern, understand the user’s preferences and change the passive waiting into the active recommendation.

In the course of experiment, we maintain minimum support and minimum confidence unchanged and set gap = 180 s and width = 300 s during the rule generation phase, but modify gap = 180 s and width = 300 s, gap = 300 s and width = 600, gap = 900 s and width = 1200 s, gap = 1800 s and width = 3600 s during the matching phase, the result is presented in Fig. 6. The accuracy, recall and F1 value increased gradually with the increase of the gap and width. Multidimensional sensing data can be used to accurately obtain the user’s behavior habits because of the use of a variety of sources of context data. However, the more specific of the users’ behavior pattern, the lower probability of the reemergence. Therefore, the rule matching will be restricted. In other words, some of the sequence rules will be temporarily shelved because there is no corresponding matching, and it is hard to prove the validity of the rule. So if we relax time constraints, we can achieve better evaluation results.

Fig. 6.
figure 6

Forecast of smart phone services.

4.3 Performance Comparison

In order to examine the ability of the proposed framework, we apply mining algorithm with the existing work in literature, namely MSP [33], All the experiments are implemented on Activity Log Dataset, in the case of varying gap and width thresholds. The experimental results show that the UTDMSP algorithm always finds more multidimensional sequence rules than the MSP algorithm, as shown in Fig. 7. The same is true with respect to precision, as shown in Fig. 8.

Fig. 7.
figure 7

Numbers of sequential rules.

Fig. 8.
figure 8

Precision under different thresholds.

5 Summary and Challenges

Firstly, our research analyzed the status of acquisition, modeling and reasoning of the context-aware computing, and then put forward a new framework of mobile context-aware recommendation system; secondly, our research carried on a thorough discussion about each function module of the framework, and then proposed a nested key-value storage model so as to construct a multidimensional sequential pattern mining algorithm UTDMSP; finally, our research mined user’s behavior pattern in mobile environment according to our proposed framework and improved technology, triggered services and pushed information combining in the light of the user’s current context. The framework of mobile context-aware recommendation system we proposed is efficient in terms of scalability, reliability, flexibility and repeatability.

Mobile context-aware services, which integrate universality, flexibility and personalization, have received an increasing number of attentions from industry and research institutions. Especially in recent years, mobile context-aware services have pioneered tremendous business opportunities, and have been successfully applied to the fields of navigation, tourism, e-commerce, healthcare and others; context-aware services will also become a new and important growth point of profit in mobile commerce industry.

As a new research field, there are many research directions which can be further studied, which mainly includes:

  1. (1)

    Data accuracy

Intelligent terminal collects the original data and the user’s interactive information through the built-in sensors. Though the user’s behavior is sparse, the collected context data is continuous. Sometimes the user appears in a scene just in a short time, such as the position a car passed by, but the smartphone’s sensors have no time to collect corresponding information [34]. Besides, there may be some other conditions, temperature difference between the mobile phone and the external environment. For example, temperature is higher when the phone in the bag. Therefore, the accuracy of the information under complex conditions is the basic problem of context-aware computing.

  1. (2)

    Service startup

Mobile terminal context-aware system emphasizes the timeliness of service. In case of less collected data, it is bound to be invalid if we carry out data mining and behavior’s prediction, which will interfere with the user’s normal behavior; If we start after collecting a huge amount of data, the overhead produced by computing will greatly affect the efficiency of the system; Besides, waiting too long will affect the user’s experience feelings. Then, what is the right time to carry out the user behavior’s prediction is a very practical problem in the application of mobile context-aware recommendation system.

  1. (3)

    Attribute selection

There are different degrees of impact on user’s preference for mobile environment. In the absence of explicit rules, we should use as little properties as possible to describe as much information as possible in order to reduce the computational complexity [35, 36]. The accuracy of the inference result is not necessarily improved with much more context. How to choose the most representative attribute is also need to study.

  1. (4)

    Group recommendation

Services of the mobile context-aware recommendation system constructed in our research are for individuals. If you want to recommend a restaurant for a group of friends, you need to consider a group of people’s preferences for recommendation, rather than just considering one personal preference [37, 38]. However, how to deal with the conflicts among the group members’ preferences so as to obtain the accurate group preference and to complete the services recommendation for a group of users, is a very meaningful research direction.

  1. (5)

    Negative sequential pattern

Negative sequential pattern (NSP) (such as missing medical treatments) are critical and sometimes much more informative than positive sequential pattern (PSP) (e.g. using a medical service) in many intelligent systems and applications such as intelligent transport systems, healthcare and risk management, as they often involve non-occurring but interesting behavior [39, 40]. However, discovering NSP is much more difficult than PSP due to the significant problem complexity caused by non-occurring elements, it is thus important to develop efficient framework and approaches.