# Tourist Behavior Pattern Mining Model Based on Context

Authors: Dong-sheng Liu; Shu-jiang Fan
Journal: Discrete Dynamics in Nature and Society
 (2013)

---

## Abstract

Personalized travel experience and service of tourist has been a hot topic research in the tourism service supply chain. In this paper, we take the context into consideration and propose an analyzed method to the tourist based on the context: firstly, we analyze the context which influences the tourist behavior patterns, select the main context factors, and construct the tourist behavior pattern model based on it; then, we calculate the interest degree of the tourist behavior pattern and mine out the rules with high interest degree with the association rule algorithm; we can make some recommendations to the tourist with better personalized travelling experience and services. At last, we make an experiment to show the feasibility and effectiveness of our method.


---

## Body

## 1. Introduction

With the development of economy and the improvement of people’s living standard, more and more people pay more attention to the quality of personalized travelling experience and service. In recent years, there has emerged more and more personalized ways to travel in tourism, such as FIT travel and independent travel. The traditional mode of travel service limits the diversity of service options, and it cannot fully meet the personalized needs of tourists. How to find the laws and the features of the tourist behavior through mining tourist behavior patterns and offer them better services has been a problem in the tourism service supply chain.There are many researches concentrating on the tourist behavior pattern. Qing analyzed the characteristics of tourism services and the structural properties, constituent elements, and operation mechanism of tourism service supply chain in the context of modern information technology, and he put forward a new tourism service supply chain conceptual model based on tourist personalized demand [1]. Farmaki took the Troodos (Cyprus) as a case to research on the tourist motivation [2]; Martin and Witt proposed tourism demand forecasting model to represent tourists’ cost of living [3]; Smallman and Moore studied on the tourists’ decision making [4]; Kim et al. has worked on the Japanese tourists’ shopping preference with the decision tree analysis method [5].These studies only analyzed the tourist from the view point of the psychology and behavioral science of the tourist and have not considered the context set which will influence the tourist behavior patterns. So, in this paper, we take the context into consideration and propose an analyzed method to the tourist based on context to find out the relationship between services in the travel and the context and analyse the important contexts which will influence the tourist behavior. To mine out rules with high interest degree with the association rule algorithm and do some recommendations to the tourist with better personalized travelling experience and services, we propose a method based on network diagram, and it can reflect the relationship of the contexts which influence the tourist behaviour clearly. Through this method, we can delete the low interest degree of tourist behavior patterns; then, we use the Apriori algorithm to mine the association rules of tourist behavior which have high interest degree. Finally, we take an experiment to show the feasibility and effectiveness of our method.


## 2. Related Works

### 2.1.  Context

There are many definitions on the context and many researchers work on it. Schilit et al. defined the context as identifications and change of location, people, and objects around them [6]. Brown et al. thought that the context should be defined as the symbols around people or other objects such as location, time, season, temperature, and so on [7]. In paper [8], the definition of context would be extended to the feature information of some objects’ situation, such as people, location, and so on. Snowdon and Grasso defined the context as the multilevel structure, mainly including the individual layer, the project layer, the group layer, and the organization layer [9]; Gu thought that the context would respond to the transformation based on the computers which are used as the centers to the people; in fact, he defined the context as a spectrum in his paper, as shown in Figure 1. He divided the context into computing context (such as communication bandwidth), user context (such as location), physical context (such as weather, temperature), time context (such as hour), and social context (such as law) [10].Figure 1
Context spectrum.In this paper, we think that the context is the influence factors of the tourist behavior pattern; different contexts will lead the tourist to different behavior patterns. We may take the following contexts into consideration: user, location, time, and device, and service type.


### 2.2. Association Rule and Apriori Algorithm

There are many association rule algorithms, and these algorithms can be divided into two classes: the first one is mainly focused on improving the analytical efficiency of the association rules; the other one pays more attention to the application of association rule algorithm and how to deal with value type variables and promotes the association of the single concept layer to multiple concept layers  include and further reveals the inner structure of objects.Apriori algorithm is one of the classical association rule algorithms; the earliest Apriori algorithm was proposed by Agrawal et al. [11]. The algorithm mainly including two parts: producing frequent item sets and producing association rules according to the frequent item sets. The algorithm scans data base, accumulates each item count, collects the items which meet the minimum support (min_sup), finds out the frequent 1-itemsets, and named it L1. Then, the algorithm uses L1 to find out the frequent 2-item sets L2 and uses L2 to find out the frequent 2-item sets L3 and so on and keeps doing these until it cannot find out the frequent k-item sets. In these frequent item sets, it will be defined as a strong-association rule if it reaches the minimum confidence [12]. Since the association rule algorithm was proposed, it has been improved and applied in many fields. For example, Kang et al. applied the association rule algorithm in the Smart home [13], and Zhang et al. used the improved association rule algorithm in the university teaching managements [14].


## 2.1.  Context

There are many definitions on the context and many researchers work on it. Schilit et al. defined the context as identifications and change of location, people, and objects around them [6]. Brown et al. thought that the context should be defined as the symbols around people or other objects such as location, time, season, temperature, and so on [7]. In paper [8], the definition of context would be extended to the feature information of some objects’ situation, such as people, location, and so on. Snowdon and Grasso defined the context as the multilevel structure, mainly including the individual layer, the project layer, the group layer, and the organization layer [9]; Gu thought that the context would respond to the transformation based on the computers which are used as the centers to the people; in fact, he defined the context as a spectrum in his paper, as shown in Figure 1. He divided the context into computing context (such as communication bandwidth), user context (such as location), physical context (such as weather, temperature), time context (such as hour), and social context (such as law) [10].Figure 1
Context spectrum.In this paper, we think that the context is the influence factors of the tourist behavior pattern; different contexts will lead the tourist to different behavior patterns. We may take the following contexts into consideration: user, location, time, and device, and service type.


## 2.2. Association Rule and Apriori Algorithm

There are many association rule algorithms, and these algorithms can be divided into two classes: the first one is mainly focused on improving the analytical efficiency of the association rules; the other one pays more attention to the application of association rule algorithm and how to deal with value type variables and promotes the association of the single concept layer to multiple concept layers  include and further reveals the inner structure of objects.Apriori algorithm is one of the classical association rule algorithms; the earliest Apriori algorithm was proposed by Agrawal et al. [11]. The algorithm mainly including two parts: producing frequent item sets and producing association rules according to the frequent item sets. The algorithm scans data base, accumulates each item count, collects the items which meet the minimum support (min_sup), finds out the frequent 1-itemsets, and named it L1. Then, the algorithm uses L1 to find out the frequent 2-item sets L2 and uses L2 to find out the frequent 2-item sets L3 and so on and keeps doing these until it cannot find out the frequent k-item sets. In these frequent item sets, it will be defined as a strong-association rule if it reaches the minimum confidence [12]. Since the association rule algorithm was proposed, it has been improved and applied in many fields. For example, Kang et al. applied the association rule algorithm in the Smart home [13], and Zhang et al. used the improved association rule algorithm in the university teaching managements [14].


## 3. Modeling and Mining Method for Tourist Behavior Pattern Based on Context

### 3.1. The Context Influence Factors Analysis of  Tourist Behavior Pattern

We can consider a tourist as a mobile customer because the tourist moved anytime and anywhere. Presently, there are only a few researchers who work on the mobile customer behavior pattern. Tseng and Lin thought that the service and location are the influence factors of customer behavior in mobile service environment; they proposed a method named SMAP-Mine to mine customer behaviors [15]. Ma et al. took the time context into consideration and constructed a temporal sequence mobile access patterns mining model based on context awareness [16]. Chen et al. studied in the terms of the problem of mining matching mobile access patterns based on joining the following four kinds of characteristics: user, location, time, and service [17]. So in this paper, we think that the context influence factors of mobile customer behavior pattern includes mobile user, location, time, and service type.At the same time, we take different capabilities of the mobile devices that the customer use, such as screen size, battery durability, and access bandwidth, into consideration. We consider that these capabilities will influence the mobile customer behavior pattern directly or indirectly. To prove that, we make an experiment as as follows. In the particular context, we observed behavior patterns of three customers who used different equipments and recorded the service types, the trajectory at which they moved, and time and type of service. Finally we got the customer movement trajectories as shown in Figure2 and the service request information table as shown in Table 1. We can conclude from Figure 2 that customers have different behavior patterns when they use different mobile devices. For example, when the user u1  used the device d1, his movement trajectory was l2→l6→l8→l9; when he used the device d2, his movement trajectory changed to l2→l6→l9. Then, we can conclude form Table 1 that the customer requested different services when he used different devices in the same time or requested the same service in different times. For example, when the user u1 used device d1 at time t3; he requested the service s3; when he used device d2 at time t3, he requested the service s4; the user u3 requested the service s2 at the location l4 when he used device d1; he requested the service s2  at the location l3 when he used device d2. Through these analyses, we can conclude that the mobile customer has different movement trajectories, request different services at the same times and requests the same service in different places when he or she uses different devices. So we take the mobile device as a context influence factor of mobile customer behavior pattern.Table 1
Customer service information table.
Time instances
Users and devices
(u1, d1)
(u2,d1)
(u3, d1)
(u1, d2)
(u2, d2)
(u3, d2)
TI
1
(l2, t1, s1)
(l9, t5, s1)
(l5, t13, s1)
(l2, t1, s1)
(l9, t1, s1)
(l5, t1, s1)
TI
2
(l6,t2, s2)
(l4, t6, s2)
(l6, t14, s3)
(l6, t2, s3)
(l4, t4, s2)
(l6, t4, s3)
TI
3
(l8, t3, s3)
(l1, t8, s2)
(l4, t15, s2)
(l9, t3, s4)
(l7, t5, s4)
(l3, t5, s2)
TI
4
(l9, t4, s4)
(l9, t9, s3)
(l3, t16, s4)
(l1, t6, s5)
(l9, t7, s6)
TI
5
(l7, t10, s4)
(l9, t17, s6)
(l3, t8, s6)
TI
6
(l1, t11, s5)
TI
7
(l3, t12, s6)Figure 2
Movement trajectories of customers when they use different devices.There are other context factors which influence the mobile customer behavior pattern, such as the physically environmental condition in which the customer stays, including weather, temperature, humidity, and so on; and the social situations in which the customer is involved (e.g., manners and customs and laws) will influence the mobile customer behavior pattern.We use the form of the questionnaire to determine the main context factors. In this questionnaire, we design nine questions. Each of the nine questions involves a context factor which will influence the tourist behavior pattern. From these questions, we can study which contexts will influence the tourist behavior pattern most. A total of 102 individuals participate in the survey; they are all tourists. After stating these questionnaires, we use SPSS to analyze the results. We set that different option to different weight (1–5), and then statistically averaging, what are the context weights influence the behavior. We can get the results as shown in Figure3. So in this paper, we choose the following five context factors as the main context factors: tourist (user), device, location, time, and service.Figure 3
The results of the questionnaire.


### 3.2. Modeling the Tourist Behavior Pattern Based on Context

The preceding part of this paper has a brief analysis on the context factors which influence the tourist behavior pattern, and then we will build a model based on these context factors. In the following part of this paper, we will give relational definitions about the tourist behavior patterns firstly and construct a model of the tourist behavior pattern based on context latterly.Definition 1 (tourist user).
U
=
{
u
1
,
u
2
,
u
3
,
…
,
u
i
} is the set of all the users; every user denotes a person who uses the mobile device to request mobile service messages from the mobile service supplier when he or she was travelling.Definition 2 (devices of the tourist use).
The device of the user use is a set of the devices of the user use to request mobile services and can be defined asD={d1,d2,d3,…,dh}.Definition 3 (location).
Location denotes a set of places in which the tourist moves some times, and we use the setL={l1,l2,l3,…,lj} to represent it.Definition 4 (service).
Service is a set of messages in which the tourist requests tourism services from the suppliers, and we use the setS={s1,s2,s3,…,sn} to represent it.Definition 5 (timestamp, sojourn time and service request time).
To represent the time quantum of the forming of the tourist behavior pattern approximately, this paper divides a day’s 24 hours into 24 time intervals simply, as shown in Table2; every time interval denotes one hour, and the hour denotes one timestamp; sojourn time ts denotes the time in which the user sojourns at somewhere; service request time tr denotes the time in which the tourist requests some tourism services.Table 2
Timestamp table.
Timestamps
Time intervals
t
1
0:00–1:00
t
2
1:00–2:00
t
3
2:00–3:00
⋮
⋮
t
2
2
21:00–22:00
t
23
22:00–23:00
t
24
23:00–24:00According to the previous definitions, this paper assumesp={u,d,t,l,ts,s,tr} as one tourist behavior, where u is an element of the tourist user set U, d is an element of the device of the user use set D, t is an element of the time set T, l is an element of the location set L, ts is the time in which the tourist sojourns at location l, s denotes an element of service messages set S, and tr denotes the time in which the tourist requests for tourism services.In the graph theory, there is a structure called network whose structure is composed of nodes and edges. Every edge has its quantitative index related to the nodes or edges; this quantitative index is normally called weight which could denote distance, expenses, carrying capacity, and so on [18]. Namely, the structure of the network is composed of nodes and edges involving weight; taking this advantage of the network, this paper makes the context factors which influence the tourist behavior pattern as the nodes of the network, the connected relationship among the context factors as the edge of the network, and the connect coefficient among different context factors as the weight of the edge (the specific connect relationship and the connect coefficient will be demonstrated in detail in the following part of this paper). Like this, the behavior pattern of a tourist can be clearly portrayed in the network. Figure 4 illustrates the network structure of the behavior patterns of two different mobile users; we use p1={u1,d2,t1,l2,5,s2,2} and p2={u2,d1,t2,l1,4,s1,3} to represent their behavior patterns, respectively.Figure 4
The network model of the tourist behavior pattern.


### 3.3. Tourist Behavior Pattern Mining Method Based on the Network

The preceding part of this paper has a model analysis on the structure of the network of the tourist behavior; in the following part of this paper, we will give out the related definitions firstly and the specific procedures of the tourist behavior mining pattern based on the network latterly.


#### 3.3.1. Basic Definitions

To explain the content of the mining method more clearly, we will give relational definitions firstly.Definition 6 (connect coefficient).
Connect coefficient denotes the connection relationship between two different attributes; the specific connect coefficients areU⋈D, D⋈L, L⋈T, and T⋈S. The connect coefficient of U⋈D denotes the connection times between a mobile user u and a device d. The connect coefficient of D⋈L is LCnu which denotes the connection times of a device d with a location l. The connect coefficient of L⋈T is ts which denotes the time in which a user sojourns at location l. The connect coefficient of T⋈S is tr which denotes the time in which a mobile user requests for services.Definition 7 (interesting locations and interesting services).
When the length of time in which a tourist sojourns somewhere is larger than the threshold value we set, we think that the tourist is interested in this place. Similarly, when the length of time in which a mobile user requests for a servicesj is larger than the threshold value or the connection times is larger than a threshold value, we think that the mobile user is interested in this service. Usually the length of time will be set up to 30 minutes and the connection times will be set up to 10 times.Definition 8 (repeated edge).
For a tourist, he may have the same connection edge in two different behavior patterns; such edge will be called repeated edges in this paper. For example, in the following behavior patternsp1={u1,d1,l3,t17,s3} and p2={u1,d2,l3,t17,s3}, they have two repeated edges, namely,l3t17 and t17s3.Definition 9 (connect edge value).
Connect edge value is a standard value obtained with standardizing the connect coefficient (Definition6) in the case where the different quantity levels of input variables affect the final mining result. In this paper we use “⋈” to present the connect relationship between different attributes, and specific weights are U⋈D, D⋈L, L⋈T, and T⋈S; the computational formulas of every edge weight are as follows.Connect Edge Value of
U
⋈
D
. The connect edge value of mobile user ui and device dj equals the ratio of the connect times between user ui and device dj to the sum times between user ui and device set; the specific formula is
(1)wij=count(uidj)∑j=1ncount(uidj),
where n denotes the amount of devices. Similarly, the connect edge value of D⋈L is as follows:
(2)wjk=LCnu(jk)∑k=1mLCnu(jk),
where m denotes the amount of locations and LCnu(jk) and ∑k=1mLCnu(jk) denote the connect times between devices and locations in the same behavior pattern of a mobile user.The Connect Edge Value of
L
⋈
T
(3)
w
k
h
=
t
s
(
k
h
)
∑
h
=
1
24
t
s
(
k
h
)
,
where ts(kh) and ∑h=124ts(kh) denote the time in which a mobile user requests services at somewhere in his behavior pattern.The Connect Edge Value of
T
⋈
S
(4)
w
h
z
=
t
r
(
h
z
)
∑
z
=
1
n
t
r
(
h
z
)
,
where n denotes the amount of the connect service set and tr(hz) and ∑z=1ntr(hz) denote the time in which a mobile user requests for services in his behavior pattern. An edge will be deleted if its connection edge value is smaller than a threshold value. A behavior pattern will not be involved in the calculation of the connect edge value if it contains interesting locations or interesting services.Definition 10 (connect edge coefficiente).
When a repeated edge appears, this edge value constitutes of several behavior patterns; connection edge coefficiente denotes the incidence a behavior pattern has on this edge. Its value equals ratio of the connect edge coefficient of this behavior pattern to the sum of all the connect edge coefficients of the same mobile user at this edge.Definition 11 (interesting degree id).
Interesting degree id is an index to reflect the degrees of interests of the mobile user behavior pattern. Specifically, it equals the value that the sum of all the tuple (u, d, t, l, s) weight, the formula of interesting degree id=eij*wij+ejk*wjk+ekh*wkh+ehz*whz. If the value of interesting degree id is smaller than a threshold value th1, we will regard the degree of interests of this mobile user pattern as low interest level and delete this pattern from the network. If the value of interesting degree id is larger than another threshold value th2, we will regard the degree of interests of this mobile user pattern as high interest level. Like this, we divide mobile user behavior patterns into three parts, namely, low level of interest, common level of interest, and high level of interest. We can set them by our need; the larger the value is, the higher degree of interest the rules of the results will have. As is illustrated in Figure 5, we can use it as a behavior prediction model to predict the behavior pattern of a mobile user in the future. If a behavior pattern contains interesting locations or interesting services, we will regard it as the high interesting level behavior pattern without calculating the specific value of its interestingness.Figure 5
Two thresholds and three degrees.


#### 3.3.2. Mining Steps

First Step (collecting data). To mine tourist behavior pattern, we must collect data about the tourist. We can get the information table as is shown in Table 3 through collecting user data, mainly including tourist information (Ui), mobile device (dh), location (Lj), collecting times (LCnu), time (Tm), time of the user stay the location (Ts), the service type the user request (Sn), and time of the user request the service (Tr).Table 3
Tourist information.
U
i
d
h
L
j
L
C
n
u
T
m
T
s
S
n
T
r
u
1
d
1
l
1
1
t
15
8
s
4
6
u
1
d
2
l
1
1
t
15
8
s
2
2
u
2
d
1
l
4
2
t
1
6
9
s
3
9
u
2
d
2
l
3
2
t
1
7
9
s
3
9
u
3
d
1
l
5
6
t
1
7
5
s
5
5
u
3
d
2
l
5
6
t
1
8
12
s
5
8
u
4
d
3
l
7
5
t
1
4
8
s
6
7
u
5
d
2
l
6
3
t
1
6
10
s
8
9
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮Second Step. Extracting context attribute number of the context set which influences the mobile customer behavior pattern and design corresponding layers of the network diagram; in this paper, we should design a network diagram with five layers, each layer corresponds to all nodes of Ui, Dh, Lj, Tm, and Sn, respectively, and the number of the layer nodes corresponds to each attribute value number, as shown in Figure 6.Figure 6
Network diagram model.Third Step. Collecting the adjacent nodes, each connection coefficient should be marked as Definition 7; we need to add the connection coefficient of the side when it repeats several times. For example, there are two situations when the device d1 collects the location l3: one is 4 and the other is 2, so the connection coefficient of d1l3 equals 4+2=6.Forth Step. Considering different customers have different behavior patterns, we classify each user into a group and calculate the collection weight according to Definition 8; when the collection weight is lesser than the threshold, the edge will be deleted.Fifth Step. Calculating the remaining customer interest degree according to Definition 11 and set the low interest degree th1 and the high interest degree th2 value. When the customer interest degree is lesser than the low interest degree th1, this customer behavior pattern will be unconcerned, and the general interest degree and the high interest degree pattern will be conducted in the next step.Sixth Step. Using Apriori algorithm to mine the frequent pattern to the general interest degree and the high interest degree pattern, mine out the association rules with higher degree value on support and confidence; we can use these rules to forecast the customer’ behaviors in future or recommend some services to mobile customers.In order to show the availability of our method, we propose the concept of “coverage,” which means the ratio of the number of the same rules that are produced by our model to the number of rules that produced directly. If the coverage is larger than a threshold, we say that the method we proposed is available. Generally, the larger the threshold is, the more the availability of the method is.  In this paper, we set the threshold to be equal to 80%.


## 3.1. The Context Influence Factors Analysis of  Tourist Behavior Pattern

We can consider a tourist as a mobile customer because the tourist moved anytime and anywhere. Presently, there are only a few researchers who work on the mobile customer behavior pattern. Tseng and Lin thought that the service and location are the influence factors of customer behavior in mobile service environment; they proposed a method named SMAP-Mine to mine customer behaviors [15]. Ma et al. took the time context into consideration and constructed a temporal sequence mobile access patterns mining model based on context awareness [16]. Chen et al. studied in the terms of the problem of mining matching mobile access patterns based on joining the following four kinds of characteristics: user, location, time, and service [17]. So in this paper, we think that the context influence factors of mobile customer behavior pattern includes mobile user, location, time, and service type.At the same time, we take different capabilities of the mobile devices that the customer use, such as screen size, battery durability, and access bandwidth, into consideration. We consider that these capabilities will influence the mobile customer behavior pattern directly or indirectly. To prove that, we make an experiment as as follows. In the particular context, we observed behavior patterns of three customers who used different equipments and recorded the service types, the trajectory at which they moved, and time and type of service. Finally we got the customer movement trajectories as shown in Figure2 and the service request information table as shown in Table 1. We can conclude from Figure 2 that customers have different behavior patterns when they use different mobile devices. For example, when the user u1  used the device d1, his movement trajectory was l2→l6→l8→l9; when he used the device d2, his movement trajectory changed to l2→l6→l9. Then, we can conclude form Table 1 that the customer requested different services when he used different devices in the same time or requested the same service in different times. For example, when the user u1 used device d1 at time t3; he requested the service s3; when he used device d2 at time t3, he requested the service s4; the user u3 requested the service s2 at the location l4 when he used device d1; he requested the service s2  at the location l3 when he used device d2. Through these analyses, we can conclude that the mobile customer has different movement trajectories, request different services at the same times and requests the same service in different places when he or she uses different devices. So we take the mobile device as a context influence factor of mobile customer behavior pattern.Table 1
Customer service information table.
Time instances
Users and devices
(u1, d1)
(u2,d1)
(u3, d1)
(u1, d2)
(u2, d2)
(u3, d2)
TI
1
(l2, t1, s1)
(l9, t5, s1)
(l5, t13, s1)
(l2, t1, s1)
(l9, t1, s1)
(l5, t1, s1)
TI
2
(l6,t2, s2)
(l4, t6, s2)
(l6, t14, s3)
(l6, t2, s3)
(l4, t4, s2)
(l6, t4, s3)
TI
3
(l8, t3, s3)
(l1, t8, s2)
(l4, t15, s2)
(l9, t3, s4)
(l7, t5, s4)
(l3, t5, s2)
TI
4
(l9, t4, s4)
(l9, t9, s3)
(l3, t16, s4)
(l1, t6, s5)
(l9, t7, s6)
TI
5
(l7, t10, s4)
(l9, t17, s6)
(l3, t8, s6)
TI
6
(l1, t11, s5)
TI
7
(l3, t12, s6)Figure 2
Movement trajectories of customers when they use different devices.There are other context factors which influence the mobile customer behavior pattern, such as the physically environmental condition in which the customer stays, including weather, temperature, humidity, and so on; and the social situations in which the customer is involved (e.g., manners and customs and laws) will influence the mobile customer behavior pattern.We use the form of the questionnaire to determine the main context factors. In this questionnaire, we design nine questions. Each of the nine questions involves a context factor which will influence the tourist behavior pattern. From these questions, we can study which contexts will influence the tourist behavior pattern most. A total of 102 individuals participate in the survey; they are all tourists. After stating these questionnaires, we use SPSS to analyze the results. We set that different option to different weight (1–5), and then statistically averaging, what are the context weights influence the behavior. We can get the results as shown in Figure3. So in this paper, we choose the following five context factors as the main context factors: tourist (user), device, location, time, and service.Figure 3
The results of the questionnaire.


## 3.2. Modeling the Tourist Behavior Pattern Based on Context

The preceding part of this paper has a brief analysis on the context factors which influence the tourist behavior pattern, and then we will build a model based on these context factors. In the following part of this paper, we will give relational definitions about the tourist behavior patterns firstly and construct a model of the tourist behavior pattern based on context latterly.Definition 1 (tourist user).
U
=
{
u
1
,
u
2
,
u
3
,
…
,
u
i
} is the set of all the users; every user denotes a person who uses the mobile device to request mobile service messages from the mobile service supplier when he or she was travelling.Definition 2 (devices of the tourist use).
The device of the user use is a set of the devices of the user use to request mobile services and can be defined asD={d1,d2,d3,…,dh}.Definition 3 (location).
Location denotes a set of places in which the tourist moves some times, and we use the setL={l1,l2,l3,…,lj} to represent it.Definition 4 (service).
Service is a set of messages in which the tourist requests tourism services from the suppliers, and we use the setS={s1,s2,s3,…,sn} to represent it.Definition 5 (timestamp, sojourn time and service request time).
To represent the time quantum of the forming of the tourist behavior pattern approximately, this paper divides a day’s 24 hours into 24 time intervals simply, as shown in Table2; every time interval denotes one hour, and the hour denotes one timestamp; sojourn time ts denotes the time in which the user sojourns at somewhere; service request time tr denotes the time in which the tourist requests some tourism services.Table 2
Timestamp table.
Timestamps
Time intervals
t
1
0:00–1:00
t
2
1:00–2:00
t
3
2:00–3:00
⋮
⋮
t
2
2
21:00–22:00
t
23
22:00–23:00
t
24
23:00–24:00According to the previous definitions, this paper assumesp={u,d,t,l,ts,s,tr} as one tourist behavior, where u is an element of the tourist user set U, d is an element of the device of the user use set D, t is an element of the time set T, l is an element of the location set L, ts is the time in which the tourist sojourns at location l, s denotes an element of service messages set S, and tr denotes the time in which the tourist requests for tourism services.In the graph theory, there is a structure called network whose structure is composed of nodes and edges. Every edge has its quantitative index related to the nodes or edges; this quantitative index is normally called weight which could denote distance, expenses, carrying capacity, and so on [18]. Namely, the structure of the network is composed of nodes and edges involving weight; taking this advantage of the network, this paper makes the context factors which influence the tourist behavior pattern as the nodes of the network, the connected relationship among the context factors as the edge of the network, and the connect coefficient among different context factors as the weight of the edge (the specific connect relationship and the connect coefficient will be demonstrated in detail in the following part of this paper). Like this, the behavior pattern of a tourist can be clearly portrayed in the network. Figure 4 illustrates the network structure of the behavior patterns of two different mobile users; we use p1={u1,d2,t1,l2,5,s2,2} and p2={u2,d1,t2,l1,4,s1,3} to represent their behavior patterns, respectively.Figure 4
The network model of the tourist behavior pattern.


## 3.3. Tourist Behavior Pattern Mining Method Based on the Network

The preceding part of this paper has a model analysis on the structure of the network of the tourist behavior; in the following part of this paper, we will give out the related definitions firstly and the specific procedures of the tourist behavior mining pattern based on the network latterly.


### 3.3.1. Basic Definitions

To explain the content of the mining method more clearly, we will give relational definitions firstly.Definition 6 (connect coefficient).
Connect coefficient denotes the connection relationship between two different attributes; the specific connect coefficients areU⋈D, D⋈L, L⋈T, and T⋈S. The connect coefficient of U⋈D denotes the connection times between a mobile user u and a device d. The connect coefficient of D⋈L is LCnu which denotes the connection times of a device d with a location l. The connect coefficient of L⋈T is ts which denotes the time in which a user sojourns at location l. The connect coefficient of T⋈S is tr which denotes the time in which a mobile user requests for services.Definition 7 (interesting locations and interesting services).
When the length of time in which a tourist sojourns somewhere is larger than the threshold value we set, we think that the tourist is interested in this place. Similarly, when the length of time in which a mobile user requests for a servicesj is larger than the threshold value or the connection times is larger than a threshold value, we think that the mobile user is interested in this service. Usually the length of time will be set up to 30 minutes and the connection times will be set up to 10 times.Definition 8 (repeated edge).
For a tourist, he may have the same connection edge in two different behavior patterns; such edge will be called repeated edges in this paper. For example, in the following behavior patternsp1={u1,d1,l3,t17,s3} and p2={u1,d2,l3,t17,s3}, they have two repeated edges, namely,l3t17 and t17s3.Definition 9 (connect edge value).
Connect edge value is a standard value obtained with standardizing the connect coefficient (Definition6) in the case where the different quantity levels of input variables affect the final mining result. In this paper we use “⋈” to present the connect relationship between different attributes, and specific weights are U⋈D, D⋈L, L⋈T, and T⋈S; the computational formulas of every edge weight are as follows.Connect Edge Value of
U
⋈
D
. The connect edge value of mobile user ui and device dj equals the ratio of the connect times between user ui and device dj to the sum times between user ui and device set; the specific formula is
(1)wij=count(uidj)∑j=1ncount(uidj),
where n denotes the amount of devices. Similarly, the connect edge value of D⋈L is as follows:
(2)wjk=LCnu(jk)∑k=1mLCnu(jk),
where m denotes the amount of locations and LCnu(jk) and ∑k=1mLCnu(jk) denote the connect times between devices and locations in the same behavior pattern of a mobile user.The Connect Edge Value of
L
⋈
T
(3)
w
k
h
=
t
s
(
k
h
)
∑
h
=
1
24
t
s
(
k
h
)
,
where ts(kh) and ∑h=124ts(kh) denote the time in which a mobile user requests services at somewhere in his behavior pattern.The Connect Edge Value of
T
⋈
S
(4)
w
h
z
=
t
r
(
h
z
)
∑
z
=
1
n
t
r
(
h
z
)
,
where n denotes the amount of the connect service set and tr(hz) and ∑z=1ntr(hz) denote the time in which a mobile user requests for services in his behavior pattern. An edge will be deleted if its connection edge value is smaller than a threshold value. A behavior pattern will not be involved in the calculation of the connect edge value if it contains interesting locations or interesting services.Definition 10 (connect edge coefficiente).
When a repeated edge appears, this edge value constitutes of several behavior patterns; connection edge coefficiente denotes the incidence a behavior pattern has on this edge. Its value equals ratio of the connect edge coefficient of this behavior pattern to the sum of all the connect edge coefficients of the same mobile user at this edge.Definition 11 (interesting degree id).
Interesting degree id is an index to reflect the degrees of interests of the mobile user behavior pattern. Specifically, it equals the value that the sum of all the tuple (u, d, t, l, s) weight, the formula of interesting degree id=eij*wij+ejk*wjk+ekh*wkh+ehz*whz. If the value of interesting degree id is smaller than a threshold value th1, we will regard the degree of interests of this mobile user pattern as low interest level and delete this pattern from the network. If the value of interesting degree id is larger than another threshold value th2, we will regard the degree of interests of this mobile user pattern as high interest level. Like this, we divide mobile user behavior patterns into three parts, namely, low level of interest, common level of interest, and high level of interest. We can set them by our need; the larger the value is, the higher degree of interest the rules of the results will have. As is illustrated in Figure 5, we can use it as a behavior prediction model to predict the behavior pattern of a mobile user in the future. If a behavior pattern contains interesting locations or interesting services, we will regard it as the high interesting level behavior pattern without calculating the specific value of its interestingness.Figure 5
Two thresholds and three degrees.


### 3.3.2. Mining Steps

First Step (collecting data). To mine tourist behavior pattern, we must collect data about the tourist. We can get the information table as is shown in Table 3 through collecting user data, mainly including tourist information (Ui), mobile device (dh), location (Lj), collecting times (LCnu), time (Tm), time of the user stay the location (Ts), the service type the user request (Sn), and time of the user request the service (Tr).Table 3
Tourist information.
U
i
d
h
L
j
L
C
n
u
T
m
T
s
S
n
T
r
u
1
d
1
l
1
1
t
15
8
s
4
6
u
1
d
2
l
1
1
t
15
8
s
2
2
u
2
d
1
l
4
2
t
1
6
9
s
3
9
u
2
d
2
l
3
2
t
1
7
9
s
3
9
u
3
d
1
l
5
6
t
1
7
5
s
5
5
u
3
d
2
l
5
6
t
1
8
12
s
5
8
u
4
d
3
l
7
5
t
1
4
8
s
6
7
u
5
d
2
l
6
3
t
1
6
10
s
8
9
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮Second Step. Extracting context attribute number of the context set which influences the mobile customer behavior pattern and design corresponding layers of the network diagram; in this paper, we should design a network diagram with five layers, each layer corresponds to all nodes of Ui, Dh, Lj, Tm, and Sn, respectively, and the number of the layer nodes corresponds to each attribute value number, as shown in Figure 6.Figure 6
Network diagram model.Third Step. Collecting the adjacent nodes, each connection coefficient should be marked as Definition 7; we need to add the connection coefficient of the side when it repeats several times. For example, there are two situations when the device d1 collects the location l3: one is 4 and the other is 2, so the connection coefficient of d1l3 equals 4+2=6.Forth Step. Considering different customers have different behavior patterns, we classify each user into a group and calculate the collection weight according to Definition 8; when the collection weight is lesser than the threshold, the edge will be deleted.Fifth Step. Calculating the remaining customer interest degree according to Definition 11 and set the low interest degree th1 and the high interest degree th2 value. When the customer interest degree is lesser than the low interest degree th1, this customer behavior pattern will be unconcerned, and the general interest degree and the high interest degree pattern will be conducted in the next step.Sixth Step. Using Apriori algorithm to mine the frequent pattern to the general interest degree and the high interest degree pattern, mine out the association rules with higher degree value on support and confidence; we can use these rules to forecast the customer’ behaviors in future or recommend some services to mobile customers.In order to show the availability of our method, we propose the concept of “coverage,” which means the ratio of the number of the same rules that are produced by our model to the number of rules that produced directly. If the coverage is larger than a threshold, we say that the method we proposed is available. Generally, the larger the threshold is, the more the availability of the method is.  In this paper, we set the threshold to be equal to 80%.


## 3.3.1. Basic Definitions

To explain the content of the mining method more clearly, we will give relational definitions firstly.Definition 6 (connect coefficient).
Connect coefficient denotes the connection relationship between two different attributes; the specific connect coefficients areU⋈D, D⋈L, L⋈T, and T⋈S. The connect coefficient of U⋈D denotes the connection times between a mobile user u and a device d. The connect coefficient of D⋈L is LCnu which denotes the connection times of a device d with a location l. The connect coefficient of L⋈T is ts which denotes the time in which a user sojourns at location l. The connect coefficient of T⋈S is tr which denotes the time in which a mobile user requests for services.Definition 7 (interesting locations and interesting services).
When the length of time in which a tourist sojourns somewhere is larger than the threshold value we set, we think that the tourist is interested in this place. Similarly, when the length of time in which a mobile user requests for a servicesj is larger than the threshold value or the connection times is larger than a threshold value, we think that the mobile user is interested in this service. Usually the length of time will be set up to 30 minutes and the connection times will be set up to 10 times.Definition 8 (repeated edge).
For a tourist, he may have the same connection edge in two different behavior patterns; such edge will be called repeated edges in this paper. For example, in the following behavior patternsp1={u1,d1,l3,t17,s3} and p2={u1,d2,l3,t17,s3}, they have two repeated edges, namely,l3t17 and t17s3.Definition 9 (connect edge value).
Connect edge value is a standard value obtained with standardizing the connect coefficient (Definition6) in the case where the different quantity levels of input variables affect the final mining result. In this paper we use “⋈” to present the connect relationship between different attributes, and specific weights are U⋈D, D⋈L, L⋈T, and T⋈S; the computational formulas of every edge weight are as follows.Connect Edge Value of
U
⋈
D
. The connect edge value of mobile user ui and device dj equals the ratio of the connect times between user ui and device dj to the sum times between user ui and device set; the specific formula is
(1)wij=count(uidj)∑j=1ncount(uidj),
where n denotes the amount of devices. Similarly, the connect edge value of D⋈L is as follows:
(2)wjk=LCnu(jk)∑k=1mLCnu(jk),
where m denotes the amount of locations and LCnu(jk) and ∑k=1mLCnu(jk) denote the connect times between devices and locations in the same behavior pattern of a mobile user.The Connect Edge Value of
L
⋈
T
(3)
w
k
h
=
t
s
(
k
h
)
∑
h
=
1
24
t
s
(
k
h
)
,
where ts(kh) and ∑h=124ts(kh) denote the time in which a mobile user requests services at somewhere in his behavior pattern.The Connect Edge Value of
T
⋈
S
(4)
w
h
z
=
t
r
(
h
z
)
∑
z
=
1
n
t
r
(
h
z
)
,
where n denotes the amount of the connect service set and tr(hz) and ∑z=1ntr(hz) denote the time in which a mobile user requests for services in his behavior pattern. An edge will be deleted if its connection edge value is smaller than a threshold value. A behavior pattern will not be involved in the calculation of the connect edge value if it contains interesting locations or interesting services.Definition 10 (connect edge coefficiente).
When a repeated edge appears, this edge value constitutes of several behavior patterns; connection edge coefficiente denotes the incidence a behavior pattern has on this edge. Its value equals ratio of the connect edge coefficient of this behavior pattern to the sum of all the connect edge coefficients of the same mobile user at this edge.Definition 11 (interesting degree id).
Interesting degree id is an index to reflect the degrees of interests of the mobile user behavior pattern. Specifically, it equals the value that the sum of all the tuple (u, d, t, l, s) weight, the formula of interesting degree id=eij*wij+ejk*wjk+ekh*wkh+ehz*whz. If the value of interesting degree id is smaller than a threshold value th1, we will regard the degree of interests of this mobile user pattern as low interest level and delete this pattern from the network. If the value of interesting degree id is larger than another threshold value th2, we will regard the degree of interests of this mobile user pattern as high interest level. Like this, we divide mobile user behavior patterns into three parts, namely, low level of interest, common level of interest, and high level of interest. We can set them by our need; the larger the value is, the higher degree of interest the rules of the results will have. As is illustrated in Figure 5, we can use it as a behavior prediction model to predict the behavior pattern of a mobile user in the future. If a behavior pattern contains interesting locations or interesting services, we will regard it as the high interesting level behavior pattern without calculating the specific value of its interestingness.Figure 5
Two thresholds and three degrees.


## 3.3.2. Mining Steps

First Step (collecting data). To mine tourist behavior pattern, we must collect data about the tourist. We can get the information table as is shown in Table 3 through collecting user data, mainly including tourist information (Ui), mobile device (dh), location (Lj), collecting times (LCnu), time (Tm), time of the user stay the location (Ts), the service type the user request (Sn), and time of the user request the service (Tr).Table 3
Tourist information.
U
i
d
h
L
j
L
C
n
u
T
m
T
s
S
n
T
r
u
1
d
1
l
1
1
t
15
8
s
4
6
u
1
d
2
l
1
1
t
15
8
s
2
2
u
2
d
1
l
4
2
t
1
6
9
s
3
9
u
2
d
2
l
3
2
t
1
7
9
s
3
9
u
3
d
1
l
5
6
t
1
7
5
s
5
5
u
3
d
2
l
5
6
t
1
8
12
s
5
8
u
4
d
3
l
7
5
t
1
4
8
s
6
7
u
5
d
2
l
6
3
t
1
6
10
s
8
9
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮Second Step. Extracting context attribute number of the context set which influences the mobile customer behavior pattern and design corresponding layers of the network diagram; in this paper, we should design a network diagram with five layers, each layer corresponds to all nodes of Ui, Dh, Lj, Tm, and Sn, respectively, and the number of the layer nodes corresponds to each attribute value number, as shown in Figure 6.Figure 6
Network diagram model.Third Step. Collecting the adjacent nodes, each connection coefficient should be marked as Definition 7; we need to add the connection coefficient of the side when it repeats several times. For example, there are two situations when the device d1 collects the location l3: one is 4 and the other is 2, so the connection coefficient of d1l3 equals 4+2=6.Forth Step. Considering different customers have different behavior patterns, we classify each user into a group and calculate the collection weight according to Definition 8; when the collection weight is lesser than the threshold, the edge will be deleted.Fifth Step. Calculating the remaining customer interest degree according to Definition 11 and set the low interest degree th1 and the high interest degree th2 value. When the customer interest degree is lesser than the low interest degree th1, this customer behavior pattern will be unconcerned, and the general interest degree and the high interest degree pattern will be conducted in the next step.Sixth Step. Using Apriori algorithm to mine the frequent pattern to the general interest degree and the high interest degree pattern, mine out the association rules with higher degree value on support and confidence; we can use these rules to forecast the customer’ behaviors in future or recommend some services to mobile customers.In order to show the availability of our method, we propose the concept of “coverage,” which means the ratio of the number of the same rules that are produced by our model to the number of rules that produced directly. If the coverage is larger than a threshold, we say that the method we proposed is available. Generally, the larger the threshold is, the more the availability of the method is.  In this paper, we set the threshold to be equal to 80%.


## 4. Experiment and Analysis

### 4.1. Example and Analysis

We take the West Lake of Hangzhou, for example, to illustrate the application of the model, via GPS and RFID provide personalized services to users combined with requirements and preference of the user. So we select part of the information data about tourist behavior from West Lake of Hangzhou Scenic Area Management Committee as is shown in Table4.Table 4
Tourist behavior information table.
P
U
i
d
h
L
j
L
C
n
u
T
m
T
s
S
n
T
r
p
1
u
1
d
1
l
1
1
t
15
8
s
4
6
p
2
u
1
d
2
l
1
1
t
15
8
s
2
2
p
3
u
1
d
1
l
1
1
t
1
6
11
s
2
3
p
4
u
1
d
2
l
1
1
t
1
6
11
s
2
4
p
5
u
1
d
1
l
3
4
t
1
7
21
s
3
17
p
6
u
1
d
2
l
3
4
t
1
7
4
s
3
3
p
7
u
1
d
1
l
2
11
t
1
6
35
s
4
30
p
8
u
2
d
1
l
4
2
t
1
6
9
s
3
9
p
9
u
2
d
2
l
3
2
t
1
7
9
s
3
9
p
10
u
2
d
1
l
3
2
t
1
7
2
s
3
1
p
11
u
2
d
2
l
2
2
t
1
7
28
s
5
15
p
12
u
2
d
2
l
2
8
t
16
38
s
4
31
p
13
u
3
d
1
l
5
6
t
1
7
5
s
5
5
p
14
u
3
d
2
l
5
6
t
1
8
12
s
5
8
p
15
u
3
d
1
l
5
6
t
1
8
12
s
4
4
p
16
u
3
d
1
l
5
6
t
1
8
18
s
3
13
p
17
u
3
d
2
l
5
6
t
1
8
18
s
3
5
p
18
u
3
d
2
l
5
10
t
1
6
32
s
4
30
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮To verify the effects of the proposed method, we use two standard metrics: interest degree and coverage.We can conclude from Table4 that the patterns p7, p12, and p18 are the patterns with interested locations or interested services, and we think that these patterns are the behavior patterns with high interest degree patterns. To show the processes of our method, we choose three users’ patterns in this paper and design a network diagram with five layers and collect the adjacent layers and then calculate the connection coefficients according to Definition 7, as shown in Figure 7.Figure 7
The network we constructed.Then, we divide each user into a group and calculate the collection weight according to Definition8; we set that the edges whose weight is lesser than 0.2 would be deleted, so the edges d1l1, d2l1, t15s2, t15s2, t15s4, l4t15, l5t17, t17s5, and t18s4 will be deleted and the patterns with edges d1l1, d2l1, t15s2, t15s2, t15s4, l4t15, l5t17, t17s5, and t18s4 will be deleted too, as shown in Figures 8, 9, 10.Figure 8
Calculate the touristu1 collection weight.Figure 9
Calculate the touristu2 collection weight.Figure 10
Calculate the touristu3 collection weight.So remain following patterns:p5={u1,d1,l3,t17,s3}, p6={u1,d2,l3,t17,s3}, p10={u2,d1,l3,t17,s3}, p11={u2,d2,l2,t17,s5}, p14={u3,d2,l5,t18,s5}, p16={u3,d1,l5,t18,s3}, p17={u3,d1,l5,t18,s3}; then we calculate the interesting degree of these patterns according to Definition 11, as is shown in the following expressions:
(5)idp5=e11*wu1d1+e13*wd1l3GGGG+e3-17*wl1t17+e17-3*wt17s3idp15=13*0.5+1*0.333+2125*0.397GGGG+1720*0.571≈1.305;idp6=e12*wu1d2+e23*wd2l3GGGG+e3-17*wl3t17+e17-3*wt17s3idp1=13*0.5+1*0.333+425*0.397GGGG+320*0.571≈0.647;idp9=e22*wu2d2+e23*wd2l3GGGG+e3-17*wl3t17+e17-3*wt17s3idp1=0.5*12+1*0.25+0.229*911GGGG+0.294*910≈0.952;idp10=e21*wu2d1+e13*wd1l3GGGG+e3-17*wl3t17+e17-3*wt17s3idp11=0.5*12+1*0.25+0.229*211GGGG+0.294*110≈0.571;idp11=e22*wu2d2+e22*wd2l2GGGG+e2-17*wl2t17+e17-5*wt17s5idp11=0.5*12+1*0.25+1*0.583GGGG+1*0.441≈1.524;idp14=e3-2*wu3d2+e25*wd2l5GGGG+e5-18*wl5t18+e18-5*wt18s5idp11=0.4*12+0.4*12+0.923*1260GGGG+1*0.229≈0.815;idp16=e31*wu3d1+e15*wd1l5GGGG+e5-18*wl5t18+e18-3*wt18s3idp11=0.6*13+0.6*13+0.923*1860GGGG+0.514*1318≈1.05;idp17=e31*wu3d1+e15*wd1l5GGGG+e5-18*wl5t18+e18-3*wt18s3idp11=0.4*12+0.4*12+0.923*1860GGGG+0.514*518≈0.820.In this paper, we set the low interesting degree th1 value to be equal to 0.8 and the high interesting degree th2 value to be equal to 1. So the patterns whose interesting degrees are lesser than 0.8 interesting degree are the low interesting patterns, the patterns whose interesting degrees are higher than 1 interesting degree are the high interesting patterns, and the patterns whose interesting degree between 0.8 and 1 are the common patterns. So p6={u1,d2,l3,t17,s3} and p10={u2,d1,l3,t17,s3} are the low interesting degree patterns, p9={u2,d2,l3,t17,s3}, p14={u3,d2,l5,t18,s5}, and p17={u3,d1,l5,t18,s3} are the common interesting degree patterns, and p5={u1,d1,l3,t17,s3}, p11={u2,d2,l2,t17,s5}, and p16={u3,d1,l5,t18,s3} are the high interesting degree patterns. We delete the low interesting degree patterns and get the patterns with high interesting degree as is shown in Table 5.Table 5
Patterns with high interesting degree.
P
i
U
i
d
h
L
j
T
m
S
n
p
5
u
1
d
1
l
3
t
17
s
3
p
7
u
1
d
1
l
2
t
16
s
4
p
9
u
2
d
2
l
3
t
17
s
3
p
11
u
2
d
2
l
2
t
17
s
5
p
12
u
2
d
2
l
2
t
16
s
4
p
14
u
3
d
2
l
5
t
18
s
5
p
16
u
3
d
1
l
5
t
18
s
3
p
17
u
3
d
2
l
5
t
18
s
3
p
18
u
3
d
2
l
5
t
16
s
4Then, we use the Apriori algorithm to mine rules on the high interesting degree patterns; we set the minimum support to 20% and the minimum confidence to 80%, then we can get the results as follows.The lift denotes the ratio of the confidence to the support of the consequent item; the computational formula is followed:Lx→y=Cx→y/Sy. The lift reacts the influence degree of the antecedent item X to the consequent item Y appears. Generally, the lift value should be larger than 1, and it means that the antecedent item X has a positive influence on the consequent item Y appears. The larger the life value is, the better the rule is.From Table6, we can conclude that we can get 39 association rules when we use the method we proposed in this paper. These rules were obtained from the high interesting pattern; we thought that these rules were interesting rules. Then we observe the rule with the maximum lift, time = t17, and service = s3→ location = l3. The value is 4.5. It means that this association rule has the highest realistic guidance. So this rule will be firstly considered when we use the rules of the result. We can use these association rules to recommend some services to tourist to offer them better services; for example, using the rule location =l2 and time = t16→ service = s4, we can recommend the s4 to the tourist when the tourist stays in the context with location = l2 and time = t16. In this paper, the service s4 is the tourism route guide, so we can send the tourism route guide to the tourist as is shown in Figure 11.Table 6
Mining results.
ID
Rules
Count
Lift
1
User =u1→device = d1
2
3
2
Location =l3→time = t17
2
3
3
Location =l3→service = s3
2
2.25
4
Service =s5→device = d2
2
1.5
5
User =u2→device = d2
3
1.5
6
Time =t16→service = s4
3
3
7
Service =s4→time = t16
3
3
8
Time =t18→user = u3
3
2.25
9
Time =t18→location = l5
3
2.25
10
User =u3→location = l5
4
2.25
11
Location =l5→user = u3
4
2.25
12
Location =l3 and time = t17→service = s3
2
2.25
13
Location =l3 and service = s3→time = t17
2
3
14
Time =t17 and service = s3→location = l3
2
4.5
15
User =u2 and location = l2→device = d2
2
1.5
16
Location =l2 and device = d2→user = u2
2
3
17
User =u2 and time = t17→device = d2
2
1.5
18
Time =t17 and device = d2→user = u2
2
3
19
Location =l2 and time = t16→service = s4
2
3
20
Location =l2 and service = s4→time = t16
2
3
21
Time =t16 and device = d2→service = s4
2
3
22
Service =s4 and device = d2→time = t16
2
3
23
Time =t18 and user = u3→location = l5
3
2.25
24
Time =t18 and location = l5→user = u3
3
2.25
25
Time =t18 and service = s3→user = u3
2
2.25
26
User =u3 and service = s3→time = t18
2
3
27
Time =t18 and device = d2→user = u3
2
2.25
28
Time =t18 and service = s3→location = l5
2
2.25
29
Location =l5 and service = s3→time = t18
2
3
30
Time =t18 and device = d2→location = l5
2
2.25
31
User =u3 and service = s3→location = l5
2
2.25
32
Location =l5 and service = s3→user = u3
2
2.25
33
User =u3 and device = d2→location = l5
3
2.25
34
Location =l5 and device = d2→user = u3
3
2.25
35
Time =t18, user = u3 and service = s3→location = l5
2
2.25
36
Time =t18, location = l5 and service = s3→user = u3
2
2.25
37
User =u3, location = l5 and service = s3→time = t18
2
3
38
Time =t18, user = u3 and device = d2→location = l5
2
2.25
39
Time =t18, location = l5 and device = d2→user = u3
2
2.25Figure 11
Tourism route guide.


### 4.2. Comparison and Discussion

To verity the effects of the method we proposed in this paper, we use the Apriori algorithm, the GRI algorithm, the CARAMA algorithm and Predictive-Apriori algorithm on the original data (here we set the minimum support equals to 20% and the minimum confidence equals to 80%; too), and we get following rules as is shown in Tables7, 8, 9, and 10.Table 7
The results based on Apriori algorithm.
ID
Rules
Count
Lift
1
Location =l1→user = u1
4
2.57
2
Time =t18→user = u3
4
3.00
3
Time =t18→location = l5
4
3.00
4
Location =l3→time = t17
4
3.00
5
Location =l3→service = s3
4
2.57
6
User =u3→location = l5
6
3.00
7
Location =l5→user = u3
6
3.00
8
Time =t18 and user = u3→location = l5
4
3.00
9
Time =t18 and location = l5→user = u3
4
3.00
10
Location =l3 and time = t17→service = s3
4
2.57
11
Location =l3 and service = s3→time = t17
4
3.00
12
Time =t17 and service = s3→location = l3
4
4.50Table 8
The results based on GRI algorithm.
ID
Rules
Count
Lift
1
Location =l1→user = u1
4
2.5
2
Location =l3→service = s3
4
2.5
3
User =u3→location = u3
6
3
4
Location =l5→user = u3
6
3
5
Location =l3→time = t17
4
3
6
Time =t17 and service = s3→location = l3
4
4.5Table 9
The results based on CARMA algorithm.
ID
Rules
Count
Lift
1
User =u3→location = l5
6
3
2
Location =l5→user = u3
6
3
3
Location =l1→user = u1
4
2.5
4
Location =l3→time = t17
4
3
5
Location =l3→service = s3
4
2.5
6
Location =l3→time = t17 and service = s3
4
4.5
7
Time =t18→user = u3
4
3
8
Time =t18→location = l5
4
3
9
Location =l3 and time = t17→service = s3
4
2.5
10
Location =l3 and service = s3→time = t17
4
3
11
Time =t17 and service = s3→location = l3
4
4.5Table 10
The results based on Predictive-Apriori algorithm.
ID
Rules
1
User =u3→location = l5
2
Location =l5→user = u3
3
Location =l1→user = u1
4
Location =l3→time = t17 and service = s3
5
Time =t18→user = u3 and location = l5
6
Time =t17 and service = s3→location = l3
7
Service =s2→user = u1 and location = l1
8
Time =t15→user = u1
9
User =u1 and service = s3→location = l3
10
User =u2 and device = d1→service = s3
11
User =u3 and service = s3→location = l5 and time = t18
12
Location =l2 and time = t16→service = s4
13
Location =l2 and service = s4→time = t16
14
Location =l5 and service = s3→user = u3 time = t18
15
User =u1 and device = d2 and location = l1→service = s2Comparing Table6 with Tables 7 and 8, there are 11 rules from Table 7 which have been emerged in Table 6 (the rules marked with yellow as is shown in Table 6), and all rules are in Table 8 have been emerged in Table 6. So we think that the method we proposed to mine the mobile customer behavior pattern has the merit of effectiveness; in this experiment the validity of the method is about 91.67% (11/12) to the Apriori algorithm and 100% (6/6) to the GRI algorithm, which means the coverage values are 91.67% and 100%, which are larger than the threshold we set before. It means that the method we proposed is feasibile and effective. Excluding the 11 rules in Table 7, Table 6 has other 28 rules and these rules have the feature of high interest, so they will provide more choices to the service provider and more services to the mobile customer. Then we observe the rule which has the maximum value of lift from Tables 6 and 7, the rule is time = t17 and service = s3→ location = l3; it means that the method we proposed is similar to the classical Apriori algorithm. At last, the rule whose ID = 1 in Table 7: location = l1→ user = u1,It is the only rule that is not included in Table 6, although this rule meets the minimum support and the minimum confidence; the pattern with {l1,u1} is a low interesting pattern as we definite before, and the rule location = l1→ user = u1 is an uninteresting rule. In our method, we can reject uninteresting rules like this. Through the analysis, the method we proposed in this paper is more feasible and advanced when being compared with the Apriori algorithm.


## 4.1. Example and Analysis

We take the West Lake of Hangzhou, for example, to illustrate the application of the model, via GPS and RFID provide personalized services to users combined with requirements and preference of the user. So we select part of the information data about tourist behavior from West Lake of Hangzhou Scenic Area Management Committee as is shown in Table4.Table 4
Tourist behavior information table.
P
U
i
d
h
L
j
L
C
n
u
T
m
T
s
S
n
T
r
p
1
u
1
d
1
l
1
1
t
15
8
s
4
6
p
2
u
1
d
2
l
1
1
t
15
8
s
2
2
p
3
u
1
d
1
l
1
1
t
1
6
11
s
2
3
p
4
u
1
d
2
l
1
1
t
1
6
11
s
2
4
p
5
u
1
d
1
l
3
4
t
1
7
21
s
3
17
p
6
u
1
d
2
l
3
4
t
1
7
4
s
3
3
p
7
u
1
d
1
l
2
11
t
1
6
35
s
4
30
p
8
u
2
d
1
l
4
2
t
1
6
9
s
3
9
p
9
u
2
d
2
l
3
2
t
1
7
9
s
3
9
p
10
u
2
d
1
l
3
2
t
1
7
2
s
3
1
p
11
u
2
d
2
l
2
2
t
1
7
28
s
5
15
p
12
u
2
d
2
l
2
8
t
16
38
s
4
31
p
13
u
3
d
1
l
5
6
t
1
7
5
s
5
5
p
14
u
3
d
2
l
5
6
t
1
8
12
s
5
8
p
15
u
3
d
1
l
5
6
t
1
8
12
s
4
4
p
16
u
3
d
1
l
5
6
t
1
8
18
s
3
13
p
17
u
3
d
2
l
5
6
t
1
8
18
s
3
5
p
18
u
3
d
2
l
5
10
t
1
6
32
s
4
30
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮
⋮To verify the effects of the proposed method, we use two standard metrics: interest degree and coverage.We can conclude from Table4 that the patterns p7, p12, and p18 are the patterns with interested locations or interested services, and we think that these patterns are the behavior patterns with high interest degree patterns. To show the processes of our method, we choose three users’ patterns in this paper and design a network diagram with five layers and collect the adjacent layers and then calculate the connection coefficients according to Definition 7, as shown in Figure 7.Figure 7
The network we constructed.Then, we divide each user into a group and calculate the collection weight according to Definition8; we set that the edges whose weight is lesser than 0.2 would be deleted, so the edges d1l1, d2l1, t15s2, t15s2, t15s4, l4t15, l5t17, t17s5, and t18s4 will be deleted and the patterns with edges d1l1, d2l1, t15s2, t15s2, t15s4, l4t15, l5t17, t17s5, and t18s4 will be deleted too, as shown in Figures 8, 9, 10.Figure 8
Calculate the touristu1 collection weight.Figure 9
Calculate the touristu2 collection weight.Figure 10
Calculate the touristu3 collection weight.So remain following patterns:p5={u1,d1,l3,t17,s3}, p6={u1,d2,l3,t17,s3}, p10={u2,d1,l3,t17,s3}, p11={u2,d2,l2,t17,s5}, p14={u3,d2,l5,t18,s5}, p16={u3,d1,l5,t18,s3}, p17={u3,d1,l5,t18,s3}; then we calculate the interesting degree of these patterns according to Definition 11, as is shown in the following expressions:
(5)idp5=e11*wu1d1+e13*wd1l3GGGG+e3-17*wl1t17+e17-3*wt17s3idp15=13*0.5+1*0.333+2125*0.397GGGG+1720*0.571≈1.305;idp6=e12*wu1d2+e23*wd2l3GGGG+e3-17*wl3t17+e17-3*wt17s3idp1=13*0.5+1*0.333+425*0.397GGGG+320*0.571≈0.647;idp9=e22*wu2d2+e23*wd2l3GGGG+e3-17*wl3t17+e17-3*wt17s3idp1=0.5*12+1*0.25+0.229*911GGGG+0.294*910≈0.952;idp10=e21*wu2d1+e13*wd1l3GGGG+e3-17*wl3t17+e17-3*wt17s3idp11=0.5*12+1*0.25+0.229*211GGGG+0.294*110≈0.571;idp11=e22*wu2d2+e22*wd2l2GGGG+e2-17*wl2t17+e17-5*wt17s5idp11=0.5*12+1*0.25+1*0.583GGGG+1*0.441≈1.524;idp14=e3-2*wu3d2+e25*wd2l5GGGG+e5-18*wl5t18+e18-5*wt18s5idp11=0.4*12+0.4*12+0.923*1260GGGG+1*0.229≈0.815;idp16=e31*wu3d1+e15*wd1l5GGGG+e5-18*wl5t18+e18-3*wt18s3idp11=0.6*13+0.6*13+0.923*1860GGGG+0.514*1318≈1.05;idp17=e31*wu3d1+e15*wd1l5GGGG+e5-18*wl5t18+e18-3*wt18s3idp11=0.4*12+0.4*12+0.923*1860GGGG+0.514*518≈0.820.In this paper, we set the low interesting degree th1 value to be equal to 0.8 and the high interesting degree th2 value to be equal to 1. So the patterns whose interesting degrees are lesser than 0.8 interesting degree are the low interesting patterns, the patterns whose interesting degrees are higher than 1 interesting degree are the high interesting patterns, and the patterns whose interesting degree between 0.8 and 1 are the common patterns. So p6={u1,d2,l3,t17,s3} and p10={u2,d1,l3,t17,s3} are the low interesting degree patterns, p9={u2,d2,l3,t17,s3}, p14={u3,d2,l5,t18,s5}, and p17={u3,d1,l5,t18,s3} are the common interesting degree patterns, and p5={u1,d1,l3,t17,s3}, p11={u2,d2,l2,t17,s5}, and p16={u3,d1,l5,t18,s3} are the high interesting degree patterns. We delete the low interesting degree patterns and get the patterns with high interesting degree as is shown in Table 5.Table 5
Patterns with high interesting degree.
P
i
U
i
d
h
L
j
T
m
S
n
p
5
u
1
d
1
l
3
t
17
s
3
p
7
u
1
d
1
l
2
t
16
s
4
p
9
u
2
d
2
l
3
t
17
s
3
p
11
u
2
d
2
l
2
t
17
s
5
p
12
u
2
d
2
l
2
t
16
s
4
p
14
u
3
d
2
l
5
t
18
s
5
p
16
u
3
d
1
l
5
t
18
s
3
p
17
u
3
d
2
l
5
t
18
s
3
p
18
u
3
d
2
l
5
t
16
s
4Then, we use the Apriori algorithm to mine rules on the high interesting degree patterns; we set the minimum support to 20% and the minimum confidence to 80%, then we can get the results as follows.The lift denotes the ratio of the confidence to the support of the consequent item; the computational formula is followed:Lx→y=Cx→y/Sy. The lift reacts the influence degree of the antecedent item X to the consequent item Y appears. Generally, the lift value should be larger than 1, and it means that the antecedent item X has a positive influence on the consequent item Y appears. The larger the life value is, the better the rule is.From Table6, we can conclude that we can get 39 association rules when we use the method we proposed in this paper. These rules were obtained from the high interesting pattern; we thought that these rules were interesting rules. Then we observe the rule with the maximum lift, time = t17, and service = s3→ location = l3. The value is 4.5. It means that this association rule has the highest realistic guidance. So this rule will be firstly considered when we use the rules of the result. We can use these association rules to recommend some services to tourist to offer them better services; for example, using the rule location =l2 and time = t16→ service = s4, we can recommend the s4 to the tourist when the tourist stays in the context with location = l2 and time = t16. In this paper, the service s4 is the tourism route guide, so we can send the tourism route guide to the tourist as is shown in Figure 11.Table 6
Mining results.
ID
Rules
Count
Lift
1
User =u1→device = d1
2
3
2
Location =l3→time = t17
2
3
3
Location =l3→service = s3
2
2.25
4
Service =s5→device = d2
2
1.5
5
User =u2→device = d2
3
1.5
6
Time =t16→service = s4
3
3
7
Service =s4→time = t16
3
3
8
Time =t18→user = u3
3
2.25
9
Time =t18→location = l5
3
2.25
10
User =u3→location = l5
4
2.25
11
Location =l5→user = u3
4
2.25
12
Location =l3 and time = t17→service = s3
2
2.25
13
Location =l3 and service = s3→time = t17
2
3
14
Time =t17 and service = s3→location = l3
2
4.5
15
User =u2 and location = l2→device = d2
2
1.5
16
Location =l2 and device = d2→user = u2
2
3
17
User =u2 and time = t17→device = d2
2
1.5
18
Time =t17 and device = d2→user = u2
2
3
19
Location =l2 and time = t16→service = s4
2
3
20
Location =l2 and service = s4→time = t16
2
3
21
Time =t16 and device = d2→service = s4
2
3
22
Service =s4 and device = d2→time = t16
2
3
23
Time =t18 and user = u3→location = l5
3
2.25
24
Time =t18 and location = l5→user = u3
3
2.25
25
Time =t18 and service = s3→user = u3
2
2.25
26
User =u3 and service = s3→time = t18
2
3
27
Time =t18 and device = d2→user = u3
2
2.25
28
Time =t18 and service = s3→location = l5
2
2.25
29
Location =l5 and service = s3→time = t18
2
3
30
Time =t18 and device = d2→location = l5
2
2.25
31
User =u3 and service = s3→location = l5
2
2.25
32
Location =l5 and service = s3→user = u3
2
2.25
33
User =u3 and device = d2→location = l5
3
2.25
34
Location =l5 and device = d2→user = u3
3
2.25
35
Time =t18, user = u3 and service = s3→location = l5
2
2.25
36
Time =t18, location = l5 and service = s3→user = u3
2
2.25
37
User =u3, location = l5 and service = s3→time = t18
2
3
38
Time =t18, user = u3 and device = d2→location = l5
2
2.25
39
Time =t18, location = l5 and device = d2→user = u3
2
2.25Figure 11
Tourism route guide.


## 4.2. Comparison and Discussion

To verity the effects of the method we proposed in this paper, we use the Apriori algorithm, the GRI algorithm, the CARAMA algorithm and Predictive-Apriori algorithm on the original data (here we set the minimum support equals to 20% and the minimum confidence equals to 80%; too), and we get following rules as is shown in Tables7, 8, 9, and 10.Table 7
The results based on Apriori algorithm.
ID
Rules
Count
Lift
1
Location =l1→user = u1
4
2.57
2
Time =t18→user = u3
4
3.00
3
Time =t18→location = l5
4
3.00
4
Location =l3→time = t17
4
3.00
5
Location =l3→service = s3
4
2.57
6
User =u3→location = l5
6
3.00
7
Location =l5→user = u3
6
3.00
8
Time =t18 and user = u3→location = l5
4
3.00
9
Time =t18 and location = l5→user = u3
4
3.00
10
Location =l3 and time = t17→service = s3
4
2.57
11
Location =l3 and service = s3→time = t17
4
3.00
12
Time =t17 and service = s3→location = l3
4
4.50Table 8
The results based on GRI algorithm.
ID
Rules
Count
Lift
1
Location =l1→user = u1
4
2.5
2
Location =l3→service = s3
4
2.5
3
User =u3→location = u3
6
3
4
Location =l5→user = u3
6
3
5
Location =l3→time = t17
4
3
6
Time =t17 and service = s3→location = l3
4
4.5Table 9
The results based on CARMA algorithm.
ID
Rules
Count
Lift
1
User =u3→location = l5
6
3
2
Location =l5→user = u3
6
3
3
Location =l1→user = u1
4
2.5
4
Location =l3→time = t17
4
3
5
Location =l3→service = s3
4
2.5
6
Location =l3→time = t17 and service = s3
4
4.5
7
Time =t18→user = u3
4
3
8
Time =t18→location = l5
4
3
9
Location =l3 and time = t17→service = s3
4
2.5
10
Location =l3 and service = s3→time = t17
4
3
11
Time =t17 and service = s3→location = l3
4
4.5Table 10
The results based on Predictive-Apriori algorithm.
ID
Rules
1
User =u3→location = l5
2
Location =l5→user = u3
3
Location =l1→user = u1
4
Location =l3→time = t17 and service = s3
5
Time =t18→user = u3 and location = l5
6
Time =t17 and service = s3→location = l3
7
Service =s2→user = u1 and location = l1
8
Time =t15→user = u1
9
User =u1 and service = s3→location = l3
10
User =u2 and device = d1→service = s3
11
User =u3 and service = s3→location = l5 and time = t18
12
Location =l2 and time = t16→service = s4
13
Location =l2 and service = s4→time = t16
14
Location =l5 and service = s3→user = u3 time = t18
15
User =u1 and device = d2 and location = l1→service = s2Comparing Table6 with Tables 7 and 8, there are 11 rules from Table 7 which have been emerged in Table 6 (the rules marked with yellow as is shown in Table 6), and all rules are in Table 8 have been emerged in Table 6. So we think that the method we proposed to mine the mobile customer behavior pattern has the merit of effectiveness; in this experiment the validity of the method is about 91.67% (11/12) to the Apriori algorithm and 100% (6/6) to the GRI algorithm, which means the coverage values are 91.67% and 100%, which are larger than the threshold we set before. It means that the method we proposed is feasibile and effective. Excluding the 11 rules in Table 7, Table 6 has other 28 rules and these rules have the feature of high interest, so they will provide more choices to the service provider and more services to the mobile customer. Then we observe the rule which has the maximum value of lift from Tables 6 and 7, the rule is time = t17 and service = s3→ location = l3; it means that the method we proposed is similar to the classical Apriori algorithm. At last, the rule whose ID = 1 in Table 7: location = l1→ user = u1,It is the only rule that is not included in Table 6, although this rule meets the minimum support and the minimum confidence; the pattern with {l1,u1} is a low interesting pattern as we definite before, and the rule location = l1→ user = u1 is an uninteresting rule. In our method, we can reject uninteresting rules like this. Through the analysis, the method we proposed in this paper is more feasible and advanced when being compared with the Apriori algorithm.


## 5. Conclusion

In this paper we considered the context factors which influence the tourist behavior pattern comprehensively, such as the device the tourist use, time, location, and service types, and got the context set which influences the tourist behavior pattern. Then we proposed a method to mine tourist behavior patterns based on the network diagram; this method constructed a network diagram firstly. Then, we got the behavior patterns with high interesting degree and did association rule mining in the patterns and got the rules; at last, we made an experiment to show the feasibility and effectiveness of our method. In our experiment, we set the low interest degree th1 value to be equal to 0.8 and the high interest degree th2 value to be equal to 1 and deleted the low interest pattern; then we did association mining with Apriori algorithm to the remainder of the patterns and got 39 rules; we can do some recommendations to the tourist with these high interest rules. Compared to the results which do not use this method, it has the following advantages: (1) it can keep the interest rules and delete the uninterested rules in the results; (2) it can produce many other interest rules, which we can use them to make more recommendations for the tourist; (3) it can produce the same rule which has the highest lift compared to the result that does not use this method. That is, the method we used in this paper is feasible and superior.The future work will be further researching on the context factors which influence the tourist behavior pattern and expanding the context set; also we will analyze the performance of the method we proposed and optimize the method and so on.



---

*Source: 108062-2013-11-14.xml*