P78 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Effective Visiting Schedule Generation

in a Tourist Recommender System


Using Hadoop

T. Ragunathan, Sudheer Kumar Battula, Jorika Vedika and M. NagaRatna

Abstract E-commerce has changed the way which the users select and purchase
items. Most of the e-commerce applications deployed in the Web today use rec-
ommender systems to recommend items to the online users based on their ear-
lier purchases. The tourist recommender systems discussed in the literature, so far,
cover, regarding the best routes from one city to another city by including the tourist
spots and beautiful scenery-based sites and the destination tourist spots by accepting
images or description of the tourist spots as input. In this paper, we have proposed the
architecture for a tourist recommender system and then a novel scheduling algorithm
for preparing the visit schedules in a city for the tourists based on user requirements
and we have implemented the same using Hadoop framework.

Keywords MapReduce ⋅ HDFS ⋅ Tourist recommender system

1 Introduction

E-commerce has changed the way which the users select and purchase items. Most
of the e-commerce applications [1] deployed in the Web today use recommender
systems to recommend items to the online users based on their earlier purchases.
Collaborative filtering techniques are discussed in the literature [2] to recommend

T. Ragunathan (✉) ⋅ S.K. Battula ⋅ J. Vedika


Department of Computer Science and Engineering, ACE Engineering College,
Hyderabad, India
e-mail: deanresearch@aceec.ac.in
S.K. Battula
e-mail: sudheer.itdict@gmail.com
J. Vedika
e-mail: v.jorika@gmail.com
M. NagaRatna
Department of Computer Science and Engineering, JNTUCEH, Hyderabad, India
e-mail: mratnajntu@gmail.com

© Springer Science+Business Media Singapore 2017 615


S.C. Satapathy et al. (eds.), Proceedings of the First International Conference
on Computational Intelligence and Informatics, Advances in Intelligent Systems
and Computing 507, DOI 10.1007/978-981-10-2471-9_59
616 T. Ragunathan et al.

items to the users based on their purchase behaviour. Content-based filtering tech-
niques [3] are also discussed in the literature which uses user profiles to recommend
items. Both collaborative- and content-based filtering techniques are combined to
form hybrid techniques and these technique improve the quality of recommenda-
tions by combining the best features of both the recommendation techniques.
The tourist recommender systems discussed in the literature, so far, cover, regard-
ing the best routes from one city to another city by including the tourist spots and
beautiful scenery-based sites and the destination tourist spots by accepting images or
description of the tourist spots as input. To the best of our knowledge, these systems
were not implemented using any distributed computing technique, and also, we did
not find any recommender system for recommending places of visit in a city, visit
schedules, and the mode of transport for optimizing the expenditure of the tourists.
In this paper, we have proposed the architecture for a tourist recommender system
and then a novel distributed algorithm for preparing the visit schedules in a city for
the tourists based on user requirements by following parallel and distributed comput-
ing techniques. The proposed system, namely tourist recommender system (TRS),
recommends efficient tour schedules for the tourists, so that more places can be vis-
ited in a city by the tourists within the stipulated number of days stay planned by
them. We have developed a distance matrix based on the place of stay in the city and
then generated efficient tour schedules to the users by considering different modes
of transport.
We have implemented our algorithm using Hadoop framework (distributed com-
puting framework) in a ten-node Hadoop cluster. We generated tour schedules for the
users based on their constraints given as input to the system. TRS is a novel system
and is very useful for the tourists who are planning to visit various places of cities by
optimizing number of days of their stay in those cities. This system also recommends
effective schedules, so that more places will be covered in a day based on the user
requirements.
This paper is divided into five sections: Sect. 2 covers the related work. Section 3
discusses the proposed system architecture and algorithms. Section 4 discusses the
prototype system that we developed at our research center and results. Section 5 cov-
ers the conclusion and future works.

2 Related Work

In the literature, many techniques are discussed for recommender systems to improve
the quality of recommendations.
Next, we discuss the techniques which are discussed in the literature.
A content-based filtering technique was discussed in [4] which maintains the pro-
files of the users for recommending items. In these techniques, for new users, items
are recommended based on their interests which can be found through their profiles.
For the old users, items are recommended based on their previous purchase pattern.
Effective Visiting Schedule Generation in a Tourist Recommender System . . . 617

Collaborative filtering techniques are discussed in [5, 6]. The idea of collabo-
rative filtering is to recommend items based on the similarity between users and
their purchased items. In user-based collaborative filtering techniques, similar users
are identified based on their common interests, and then, items purchased by a user
are recommended to similar users. In item-based collaborative filtering techniques
[7–9], based on the items purchased by the users, similar users are found and then
items are recommended. In hybrid filtering technique discussed in [10], both content-
based and collaborative filtering techniques are combined to recommend items to the
users.
Context-aware [11], semantic-based [12], and peer-to-peer [13] approaches are
also proposed in the literature for effective recommendation of items to the users.
In [14], the authors propose an intelligent route recommender system. In this paper,
the route which is having more sceneries is recommended to the users. The main
criteria used to select a route is the visibility of scenic sights between one tourist
spot and another. In this system, the authors did not consider the cost effectiveness
for proposing the routes.
In the paper [15], tourist sites are recommended to the users based on the text or
images provided by them. The text or images about the tourist site given by the users
are compared with already available text and images of tourist sites in the system
and similar tourist sites are recommended to the users. The system proposed in [16]
recommends the tourist places to the users based on the log data maintained in the
system and the feedback given by the users of the system, and also, the authors pro-
pose to collect information, regarding tour packages from various tour agencies and
recommend the best available tour package to the users based on their requirement.
This system did not consider the tourist sites which are not included by the agencies
and did not discuss, regarding multi-mode transport facility, which are used by the
users to visit various places in a cost effective manner.

3 Proposed System Architecture and Algorithms

In this section, first, we discuss regarding the architecture of the proposed system.
Next, we discuss the algorithm that we propose for generating schedules.

3.1 The Architecture of the Proposed System

The main goal of TRS is to recommend effective visiting schedules to the tourists by
obtaining their requirements. We have considered the hadoop distributed file sys-
tem (HDFS) and map reduce programming paradigm supported in Hadoop [17]
for proposing the architecture. The architecture of the proposed system is shown
in Fig. 1. This system consists of five important components which are as follows.
618 T. Ragunathan et al.

Fig. 1 Architecture of tourist recommender system

1. Schedule Reader
2. Schedule Dispatcher
3. Distance Matrix Generator
4. Fully Automatic Schedule Generator
5. Semi-automatic Schedule Generator
Schedule Reader: Manual as well as system generated visiting schedules are stored
in the HDFS which can be read by the Schedule Reader (SR) and then delivered to
the Schedule Dispatcher (SD) if the user has opted for “static” mode of scheduling.
Schedule Dispatcher: The SD dispatches the generated schedules to the users. This
component stores the generated schedule to the HDFS if that schedule is not already
there.
Distance Matrix Generator: A distance matrix is maintained for each city and is a
two-dimensional array which stores the distance from the source given by the user to
all famous places in city. This matrix can be generated manually and the system can
also generate this automatically using the distance matrix generator (DMG) com-
ponent. Note that by passing source place and destination place to the Google Maps
API which return the distance between the source and destination, this detail is stored
in the form of matrix (distance matrix) to the HDFS. The DMG passes this distance
information to the fully automatic scheduler or semi-automatic scheduler based on
the option given by the user.
Fully Automatic Schedule Generator: Once the source and destination places are
given as input by the users, this scheduler generates the schedules automatically by
reading the distance matrix values and items available in various places of the city.
The generated schedule is then passed to the SD.
Effective Visiting Schedule Generation in a Tourist Recommender System . . . 619

Semi-automatic Schedule Generator: Once the source and destination places are
given as input by the users, this scheduler generates the schedules by reading the
distance matrix values and items available in various places of the city and by con-
sidering the feedback given by the users. The generated schedule is then passed to
the SD.

3.2 Proposed Algorithm

We have developed the algorithm by considering two modes, namely (i) Static (ii)
Dynamic. In the static mode, the schedules already available in the HDFS and the
schedules which satisfy the user requirements will be delivered to the users. In the
dynamic mode, the schedules can be generated without the user intervention (fully
automatic schedule) or by obtaining the feedback from the users (semi-automatic
schedule).
Assumptions and Abbreviations

(i) Google API is used to find distance between two places and for displaying the
maps.
(ii) Src-Source Place of tourist.
(iii) Atime-Arrival time of tourist on the first day.
(iv) Fplaces—It is an array to store famous places of the given city.
(v) length—It gives the length of the array Fplaces and this denotes the number
of places to be visited by the users
(vi) Distancematrix—It is a two-dimensional array to store distance of all famous
places of the city

(vii) Ctime-Current time


(viii) Etime-Estimated Time.
(ix) Dtime—The maximum time up to the user prefers to visit the places in a day
(x) n—number of days of visit in the city.
(xi) Schedule—it is the list which consists of places of visit and the estimated vis-
iting time for the corresponding places
1: procedure S CHEDULER (Src, Atime, Dtime, n)
2: Read famous places of the city (Src) from HDFS and store the same in the
array Fplaces
3: r←0
4: s←0
5: Fplaces(0) ← Src
6: mode ← selectmode
7: /*select mode is the input given by the user*/
8: if mode = static then
9: return Matched schedule from HDFS
620 T. Ragunathan et al.

10: else
11: if mode = semiautomatic then
12: Fplaces(0) ← UserSelectedPlaces
13: /* user has to manually select the places of visit which is given as
User Selected Places*/
14: end if
15: while n! = 0 do
16: while r <=Fplaces.length do
17: while s <=Fplaces.length do
18: Distancematrix(r)(s)=distance(Fplaces(r), Fplaces(s))
19: /* distance function interacts with Google Maps to give the
distance between two places*/
20: s←s+1
21: end while
22: r ←r+1
23: end while
24: while Ctime <= Dtime do
25: places ← least distance from the source using distance matrix.
26: Etime ← calculate estimated time from
27: the source to destination
28: if Schedule! = places not in Schedule then
29: Schedule ← add places and Etime
30: Ctime ← Ctime + Etime
31: end if
32: end while
33: n←n−1
34: end while
35: end if
36: Display the contents of the schedule to the user.
37: end procedure

The scheduler takes source, destination, arrival time, maximum time up to which
scheduling can be done in a day, and number of days of visit in the city. After this,
the user has to select “Static” or “Dynamic” mode for preparing schedules. If the
user has selected “static mode”, then already existing schedules stored in the HDFS
which meet the criteria of the user will be selected and displayed. If user has selected
“dynamic mode” and “semi-automatic” option, then based on the visiting places
available and distance matrix values, schedules are selected and shown to the user for
selection. Note that, only user selected places are included in the schedule. If the user
selected “dynamic mode” and “fully automatic” option, then based on the visiting
places available and distance matrix values, schedules are automatically generated
and shown to the user for selection. Note that, in dynamic mode (both for semi- or
fully automatic options), the following method is used for generating the schedule.
Initially, current time (Ctime) will be the starting time and it is checked with destina-
tion time (Dtime). If Ctime is less than Dtime, a visiting place (p) which is very near
Effective Visiting Schedule Generation in a Tourist Recommender System . . . 621

to the source is found and this place will be added into the Schedule provided that it
is not already there. Next, p becomes the source place. After this, estimated visiting
time to visit p is added to the Ctime, and then, next nearest place (np) to p will be
found by going through the details in the distance matrix. Next, np will be added into
the Schedule provided that it is not already there. This step is repeated until Ctime
becomes greater than or equal to Dtime. Note that, these steps are repeated for all n
days for preparing the complete schedule.

4 Prototype System and Results

Prototype Environment We developed the prototype of the TRS in a Hadoop Clus-


ter which consists of 10 Datanodes and 1 Namenode and Secondary NameNode.
Each node has got one Intel(R) Core(TM) i3-2120 CPU @ 3.30 GHz with 2 GB
RAM, and ubuntu 14.0.4 64-bit operating System with Hadoop 1.0.4. We used Java
8 to develop this application. For designing front-end Web pages, we used HTML,
CSS, and JS. For the server-side programming, we used Java Servlets.
In this system the input data given by the user is submitted to TRS. Figure 2 shows
the input form used by the user for entering input details. In static mode, for the given

Fig. 2 User input form


622 T. Ragunathan et al.

Fig. 3 Semi-automated mode schedule

user input, already existing schedules from the HDFS are chosen and displayed to
the user. Figure 3 shows the schedule generated in dynamic semi-automatic mode.
In Fig. 4 shows the schedule generated in dynamic fully automatic mode.

5 Conclusion

In this paper, we have proposed the architecture for a tourist schedule recommender
system and then a novel distributed algorithm for preparing the visit schedules in a
city for the tourists based on user requirements. We have implemented this algorithm
using map reduce paradigm of Hadoop framework for generating visiting schedules.
Note that the map reduce programs that we developed in the prototype system per-
form parallel and distributed processing of information, regarding the cities stored
in the HDFS for generating visiting schedules.
Effective Visiting Schedule Generation in a Tourist Recommender System . . . 623

Fig. 4 Fully automated schedule generation

References

1. J. B. Schafer, J. A. Konstan, and J. Riedl, E-Commerce recommendation applications, Data


Mining and Knowledge Discovery, vol. 5, no. 1, pp. 115–153, Janaury 2001.
2. Ying-Wei Chen; Xin Xia; Yong-Ge Shi, “A collaborative filtering recommendation algorithm
based on contents’ genome,” in Information Science and Control Engineering 2012 (ICISCE
2012), IET International Conference on, vol., no., pp.1–4, 7–9 Dec. 2012
3. Iwahama, K.; Hijikata, Y.; Nishida, S., “Content-based filtering system for music data,” in
Applications and the Internet Workshops, 2004. SAINT 2004 Workshops. 2004 International
Symposium on, vol., no., pp.480–487, 26–30 Jan. 2004
4. M. Balabanovic, Y. Shoham, “Content-based, collaborative recommendation”, Communica-
tions of the ACM 40 (3) (1997) 66–72.
5. Adomavicius, G.; Tuzhilin, A., “Toward the next generation of recommender systems: a sur-
vey of the stateof-the-art and possible extensions,” Knowledge and Data Engineering, IEEE
Transactions on, vol.17, no.6, pp.734,749, June 2005
6. D. M. Pennock, E. Horvitz, S. Lawrence, and C. L. Giles, Collaborative filtering by personality
diagnosis: a hybrid memory- and model-based approach, in Proceedings of the 16th Conference
on Uncertainty in Artificial Intelligence (UAI ’00), pp. 473–480, 2000.
7. M. Sarwar, G. Karypis, J. A. Konstan, and J. Reidl, Item-based collaborative filtering recom-
mendation algorithms, in ACM www 01, pp. 285–295, ACM, 2001.
8. M. Deshpande and G. Karypis, Item-based top-N recommendation algorithms, ACM Trans-
actions on Information Systems, vol. 22, no. 1, pp. 143–177, 2004.
9. G. Linden, B. Smith, and J. York, Amazon.com recommendations: item-to-item collaborative
filtering, IEEE Internet Computing, vol. 7, no. 1, pp. 76–80, 2003.
624 T. Ragunathan et al.

10. “Hybrid Collaborative Filtering and Content-Based Filtering for Improved Recommender Sys-
tem” by Kyung-Yong Jung, Dong-Hyun Park and Jung-Hyun Lee in Lecture Notes in Computer
Science, 2004, Volume 3036/2004, Springer, pp. 295–302
11. Kumara, B.T.G.S.; Incheon Paik; Ohashi, H.; Yaguchi, Y.; Wuhui Chen, “Context-Aware Fil-
tering and Visualization of Web Service Clusters,” in Web Services (ICWS), 2014 IEEE Inter-
national Conference on, vol., no., pp.89–96, June 27 2014–July 2 2014
12. Lecue, F., “Combining Collaborative Filtering and Semantic Content-Based Approaches to
Recommend Web Services,” in Semantic Computing (ICSC), 2010 IEEE Fourth International
Conference on, vol., no., pp.200–205, 22–24 Sept. 2010
13. SongJie Gong; HongWu Ye; Ping Su, “A Peer-to-Peer Based Distributed Collaborative Filter-
ing Architecture,” in Artificial Intelligence, 2009. JCAI ’09. International Joint Conference on,
vol., no., pp.305–307, 25–26 April 2009
14. Kawai, Y.; Zhang, J.; Kawasaki, H., “Tour recommendation system based on web information
and GIS,” in Multimedia and Expo, 2009. ICME 2009. IEEE International Conference on, vol.,
no., pp.990–993, June 28 2009–July 3 2009
15. Liangliang Cao; Jiebo Luo; Gallagher, A.; Xin Jin; Jiawei Han; Huang, T.S., “Aworldwide
tourism recommendation system based on geotaggedweb photos,” in Acoustics Speech and
Signal Processing (ICASSP), 2010 IEEE International Conference on, vol., no., pp.2274–2277,
14–19 March 2010
16. Xinyu Li; Zhongchun Mi; Zhenmei Zhang; Jiani Wu, “A location-aware recommender system
for Tourism mobile commerce,” in Information Science and Engineering (ICISE), 2010 2nd
International Conference on, vol., no., pp.1709–1711, 4–6 Dec. 2010
17. M. Bhandarkar, “MapReduce programming with apache Hadoop,” Parallel and Distributed
Processing (IPDPS), 2010 IEEE International Symposium on, Atlanta, GA, 2010,

You might also like