Sie sind auf Seite 1von 61

ADVANCED TRAVEL ROUTE RECOMMENDATION

SYSTEM

A PROJECT REPORT

Submitted by

PARTH SUHANE [Reg No: RA1411003010456]


SHUBHAM AGRAWAL [Reg No: RA1411003010458]

Under the guidance of


Ms. D. Viji
(Asst Professor, Department of Computer Science & Engineering)

in partial fulfillment for the award of the degree


of

BACHELOR OF TECHNOLOGY
in

COMPUTER SCIENCE & ENGINEERING


of

FACULTY OF ENGINEERING AND TECHNOLOGY

S.R.M. Nagar, Kattankulathur, Kancheepuram District


MAY 2018
SRM Institute of Science and Technology
(Under Section 3 of UGC Act, 1956)

BONAFIDE CERTIFICATE

Certified that this project report titled “ADVANCED TRAVEL ROUTE


RECOMMENDATION SYSTEM” is the bonafide work of “PARTH
SUHANE [Reg No: RA1411003010456], SHUBHAM AGRAWAL [Reg
No: RA1411003010458]”, who carried out the project work under my
supervision. Certified further, that to the best of my knowledge the work
reported herein does not form any other project report or dissertation on
the basis of which a degree or award was conferred on an earlier occasion
on this or any other candidate.

SIGNATURE SIGNATURE

Ms. D. Viji Dr. B. Amutha


GUIDE HEAD OF THE DEPARTMENT
Asst Professor Dept. of Computer Science & Engi-
Dept. of Computer Science & Engi- neering
neering

Signature of the Internal Examiner Signature of the External Examiner


ABSTRACT

With the increasing popularity of social media it is of utter importance


that this platforms must be use in correct directions and we must infer
more and more information from this platforms.Travel can be catego-
rized into various parts such as going to office(which needs to be fast),
going for a picnic(which must have good hotels and restaurants), going
for a long drive with your friends or better half(which needs to be with
good scenic beauty) etc. And this can be best described by your friends
who are on the social media platform and who had already visited the
place. So we combined both this feature and brought you the all new ad-
vanced version of recommending the route. Recommendation of route is
being done as the people who are on these social media platforms when
post something regarding to travelling we extract that part from the post
with the help of keyword extraction system. Keyword extraction is the
method in which keyword is being categorized into various types this
can be geographical keywords or temporal keywords or anything which
would better describe the post and can provide us with the relevant data
by which we can make some use. So simultaneously taking the post and
taking the reviews and recommendation from friends and mining that re-
views helped us a lot in recommending the route.The system also is better
than the existing system because it is more efficient than the prior work
as we know the prior works recommends the particular locations while
our system deals with route. We have used very efficient algorithms such
as routing algorithm which helps in finding the shortest point from one
node to another.All our application programming interfaces are working
with real time database. As we can say that our database is dynamically
prepared so it is useful and more accurate because it is less time consum-
ing as queries need not to be called again and again.
ACKNOWLEDGEMENTS

We would take this opportunity to thank the Director of Engineering and Technology,
Dr. C .Muthamizhchelvan and Head of Computer Science and Engineering, Dr. B.
Amutha , for their support and contribution towards the successful completion of our
project. We would like to thank Mrs. M. Uma Devi, Project Coordinator for her valu-
able support and guidance. We would like to express our deepest gratitude to our guide
Ms D. Viji for her valuable guidance, timely help consistent support and encourage-
ment, which greatly contributed towards the successful completion of project. She has
been a pillar of support to us throughout.
We would also like to thank Mrs. A. Meena Priyadharsini, Class-In-Charge who has
been a supporting pillar throughout. She was very encouraging and has been a great
mentor to us. Lastly, We would like to thank the entire Department of Computer Sci-
ence and Engineering for the constant support. We would also like to extend our grati-
tude to our parents for their continuous support, encouragement and motivation without
which the completion of project would be impossible.

Authors

iv
TABLE OF CONTENTS

ABSTRACT iii

ACKNOWLEDGEMENTS iv

1 INTRODUCTION 2
1.1 About Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 LITERATURE SURVEY 5
2.1 Searching Trajectories by Locations- An Efficient Study . . . . . . 5
2.2 Collective Spatial Keyword Querying . . . . . . . . . . . . . . . . 7
2.3 Best Keyword Cover Search . . . . . . . . . . . . . . . . . . . . . 9
2.4 Efficient Processing of Top-k Spatial Keyword Queries . . . . . . . 11
2.5 LCARS- A Location-Content-Aware Recommender System . . . . 13
2.6 Selecting Stars: The k Most Representative Skyline Operator . . . . 15

3 EXISTING SYSTEM 17
3.1 About Existing System . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 Contibutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.4 Issues of existing System . . . . . . . . . . . . . . . . . . . . . . . 19

4 PROPOSED SYSTEM 20
4.1 Advantages of Proposed System . . . . . . . . . . . . . . . . . . . 21
4.2 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . 21
4.3 Software Requiremnets . . . . . . . . . . . . . . . . . . . . . . . . 22
4.4 Algorithm Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4.1 Spatial Keyword . . . . . . . . . . . . . . . . . . . . . . . 23
4.4.2 Routing Algorithm . . . . . . . . . . . . . . . . . . . . . . 24

v
5 SYSTEM ANALYSIS 25
5.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2 Requirement Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.3 Security Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6 SYSTEM DESIGN 27
6.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.2 Architechture Design . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.2.1 Explaination . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.3 Proposed Modules . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.3.1 Authority User Identification . . . . . . . . . . . . . . . . . 29
6.3.2 Post on Social Media . . . . . . . . . . . . . . . . . . . . . 30
6.3.3 Extraction of post . . . . . . . . . . . . . . . . . . . . . . . 30
6.3.4 Number of hotels and scenic beauty . . . . . . . . . . . . . 30
6.3.5 Hotels and their ratings . . . . . . . . . . . . . . . . . . . . 31
6.3.6 Recommendation of route: . . . . . . . . . . . . . . . . . . 31
6.4 Usecase Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.5 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.6 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.7 Collaborative Diagram . . . . . . . . . . . . . . . . . . . . . . . . 35

7 SAMPLE CODING 36
7.1 review.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.2 search.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.3 Review.jsp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

8 RESULT AND DISCUSSIONS 45


8.1 Accuracy and Improvements . . . . . . . . . . . . . . . . . . . . . 45
8.2 Screenshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
8.2.1 Social Networking Site Login . . . . . . . . . . . . . . . . 46
8.2.2 Social Networking Site . . . . . . . . . . . . . . . . . . . . 46
8.2.3 Website Login . . . . . . . . . . . . . . . . . . . . . . . . 47
8.2.4 Welcome Page . . . . . . . . . . . . . . . . . . . . . . . . 47

vi
8.2.5 Displaying Review . . . . . . . . . . . . . . . . . . . . . . 48
8.2.6 Displaying Multiple Routes and Distance . . . . . . . . . . 48
8.2.7 Displaying Hotels . . . . . . . . . . . . . . . . . . . . . . 49

9 CONCLUSION AND FUTURE WORK 50


LIST OF FIGURES

6.1 Architecture Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 28

6.2 Usecase Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.3 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.4 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.5 Collaborative Diagram . . . . . . . . . . . . . . . . . . . . . . . . 35

8.1 Social Networking Site Login . . . . . . . . . . . . . . . . . . . . 46

8.2 Social Networking Site . . . . . . . . . . . . . . . . . . . . . . . . 46

8.3 Website Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

8.4 Welcome Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

8.5 Displaying Review . . . . . . . . . . . . . . . . . . . . . . . . . . 48

8.6 Displaying Multiple Routes . . . . . . . . . . . . . . . . . . . . . . 48

8.7 Displaying Hotels . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

1
CHAPTER 1

INTRODUCTION

1.1 About Project

The world is moving very fast today and the to compete with these new
era, the system has to be more efficient and accurate so we thought to
redefine one of the most important thing in daily life that is "TRAVEL".
Travelling is passion for someone but for some it is compulsion.Travelling
is of utmost important and if a person travel from a route which he wants,
it would be a additional point. So to facilitate trip planning in most effi-
cient way our system takes the help of social media because social media
is the best platform to change the world and to provide a better direction.
a good trip planning can lead to good travelling and the route enhances
the beauty of travelling.

So for now we have categorize this travelling into mainly 3 parts or


we can say we have consider 3 attributes in this which are mainly shortest
distance, hotels, scenic beauty. The main reason we have considered this
main attributes because the people in this world revolve around this only.
We can take example of this such as if a person wants to go office he will
automatically choose shortest distance. If he/she is foodie then he/she
will choose the path where maximum restaurants will come else the next
case will be if a person wants a relaxation drive then he will take the path
which would contain a good scenic beauty. This scenic beauty can be on
the basis of waterfalls , number of parks or any other thing which would
increase the beauty of route.

Travelling can be categorize into many parts but approximately 99


percent of people comes under above mentioned category. If we come to
technical side than we have used data mining concepts such as keyword
extraction which benefitted us a lot in extracting the post from social
media and providing the reviews. Our system does not only provide rec-
ommendation of route but also will helps in controlling traffic congestion
and hence would help to build the smart city concepts which would be
helpful. We can also promote public transport by this and this would also
help in reducing pollution and can bring awareness among people.

We are taking reviews from the people who have already visited the
place and then we will be mining it and then producing the result. We are
also providing the the name and other personal information of the hotels
and their specialized rating this can help our user to locate the distance
and food of their choice. We are taking number of hotels from the user
such that it would be helpful for other user who want to travel. This will
be in ranges because no one knows how many exact number of hotels
will be there in the route.

We have also taken care of security because security is of utmost im-


portance as it is the matter of social media. Social networking website is
very delicate place as it contains feelings of people. We cant let it go as

3
it is. So we are doing user identification in both the cases whether it is on
social media platform or if the user just wants the route information.Our
system is the complete package of a perfect travel route recommendation
and hence it helps in recommending route instead of location which all
other do. Hence this project is one of its kind.

Travelling is of utmost importance and fun, to save the sacredness of


this we have built the system which helps all kinds of people instead for
a particular society of people. Hence we wish that this would be even
better if it must be applied by social networking giants such as Facebook
and Twitter.

4
CHAPTER 2

LITERATURE SURVEY

2.1 Searching Trajectories by Locations- An Efficient


Study

In 2017 Wu You and Xu Fangyuan made a project on educational data


mining. Their project was divided into three different layers:
• Extraction Layer
• Analysis Layer
• Prediction Layer

In extraction layer the data was derived based on the users’ demands
and the data was depicted in a user-friendly manner. In analysis layer,
once the extraction of data was done various methods were proposed to
perform analysis and to determine patterns in the data. In this layer vari-
ous data mining algorithms were executed like Decision Tree algorithm,
Association Rule algorithm and Logistic Regression. In prediction layer
depending on the pattern found in student data, their tool developed a
classifier to process the data and the students were grouped into different
categories.

Approach
The project consisted of a front-end and the back-end part. Python was
used as the programming language which is used to connect with the
database. Scikit-learn was used to execute various data mining algo-
rithms.

Advantages
• Python was used as a programming language over R because python
has a very simple syntax which is very easy to understand.
• R has a very steep learning curve whereas python has a low learning
curve.
• In this project existing libraries were used to execute data mining al-
gorithm as a result a lot of time is saved and we can examine various
algorithms.

Disadvantages
• The only problem in this project was the inadequacy of the available
data. As the dataset used was the limited HKUCS admission data of
2016.

6
2.2 Collective Spatial Keyword Querying

This paper involves the defining the problem of retrieval of group of spa-
tial web objects. Here the spatial web objects are defined as a group
of keywords that covers the query keywords and objects nearest to the
query location has lowest inter-object distance. The study involves two
variants, both of which are NP complete. The exact solution and approx-
imate solutions are devised

Objective
• To find the collection of objects that cover the keywords such that the
sum of the spatial distance is diminished.
• To find the collection of objects that cover the keywords such that the
sum of maximum distance between the object and the query and the max-
imum diatance between two objects is diminished.

Algorithm Used
The algorithm used here is collective spatial keyword querying. This al-
gorithm finds group of objects that collectively satisfy a query. Also in
this paper, the properties of the paper’s proposal based on prototype im-
plementation of proposals are studied.
Spatial keyword queries have been widely studied recently, along with
the emergence of large amount of geo-textual data with nearest neighbor.,
e.g., computing, accounting. Its advantage over the previous algorithm is
that it can handle large datasets.

7
Advantages
• The two problems of NP complete are studied
• The efficiency of approximation algorithm is increased.
• The accuracy is more in approximation algorithm as compared to pre-
vious papers.
• The efficiency of exact algorithm is increased.

Challenges
• The extent upto which the overlapping among top-k groups is allowed.
• The type of cost function to be used to improve efficiency.
• The problem of partial coverage of query keyword.

8
2.3 Best Keyword Cover Search

After the introduction of spatial database, a common problem known as


Closest Keyword search is identified. In Closest Keyword search, the
particular objects are queried which altogether encompass a collection
of query keywords and also have the lowest inter-object distance. Here,
the objects from different query keywords are merged and are used to
produce candidate keyword covers. As the amount of query keyword in-
creases, the performance of the algorithm decreases. So to overcome this
problem, a new algorithm known as keyword-NNE algorithm is intro-
duced. In this paper, instead of mCK (m Closest Keyword) query, BKC
(Best Keyword Cover) is used which examine the inter-objects distance
as well.

Indexing Keyword Ratings


The BKC query is processed by enhancing R* tree with an extra dimen-
sion to keyword rating. Here the 3-dimention R* tree is adopted. It is
known as keyword rating-R* tree (or KRR* tree). The range of these di-
mensions lies between 0 and 1. Here, for each keyword, multiple KRR*
trees are used.

Algorithm Used
The algorithm used in this paper is keyword-Nearest Neighbor Expan-
sion algorithm. The k-NNE algorithm is used to generate the keywords
based on the ratings. It substantially diminishes the amount of candidate
keyword covers produced, thus decreasing the time complexity. As com-

9
pared to baseline algorithm, the memory usage is reduced thus improving
the space complexity.

Advantages
• BKC query provides an extra dimension as compared to mCK query.
• The amount of candidate keyword covers generated is reduced.
• Time complexity is improved as the amount of keywords generated is
reduced.
• Space complexity is improved due to reduction in number of keywords
generated.

Results
• The BKC query used in place of mCK query has provided an extra di-
mension for more logical decision making.
• The newly proposed k-NNE algorithm is used to diminish the amount
of candidate keyword covers generated thus improving the performance.

10
2.4 Efficient Processing of Top-k Spatial Keyword Queries

In this paper, a new novel index known as Spatial Inverted Index(S2I) is


proposed which is used to enhance the efficiency of top-k spatial keyword
queries. In this query, the best k objects known as spatio-textual objects,
which are ranked according to the adjacency to the location of the query
and applicability to keywords, are returned by the top-k spatial keyword
query. This new novel index that is proposed processes the top-k spatial
keywords more accurately as compared to the previous algorithm. The
new index called as Spatial Inverted Index (S2I) is proposed instead of
applying the single R tree embedded with inverted indexes. The Spatial
Inverted Index maps the keyword with a separate aggregated R-tree (aR
tree) that accumulates the object with the given term.

Contributions
• The S2I index is presented that maps the word in the vocabulary with a
distinct a R tree and blocks that store the given terms.
• A new algorithm is proposed that outperforms S2I in terms of efficiency
while processing top k spatial queries.
• The approach outperforms the state of the art algorithm in terms of cost,
update time and response time.

Spatial Inverted Index


The S2I has the following properties:
• The words with distinct document frequency are stored separately. The
frequent words should be stored differently from the infrequent words.

11
• For the scaling applications that benefit from top-k spatial queries, it is
important to have a good support of distributions so as to reduce the load.
• It needs less disk space.
• The queries are performed efficiently.

Single Keyword Queries


The keywords with single keyword can be processed efficiently as only
a single block or tree that possess the term is accessed. After storing the
item in the block, the query is processed. The processing steps are:
• Extract all the objects in block.
• Enter the items in decreasing order
• Show the top-k best objects.

Multiple Keyword Algorithm (MKA)


The items related to the given term are extracted in decreasing order of
partial scores from aR tree. The SKA algorithm is applied to extract the
items in decreasing order by replacing the score with the partial score.

RESULT
Here, two algorithms Single Keyword Algorithm and Multiple Keyword
Algorithm and a new index called Spatial Inverted Index are presented.
The SKA process the single keyword queries while MKA process the
multiple keyword queries efficiently. This outperforms the state-of-the-
art approach in terms of both query and update cost.

12
2.5 LCARS- A Location-Content-Aware Recommender
System

By taking both personal interest and local preference, LCARS provides


user with set of venues or events. LCARS not only provides the user with
the venues near their city, but it also provides them with the interesting
locations that are in the new city even if the person hasn’t been to that
city before.
It consists of two components
• Course-Specific Regression
It is designed to take in consideration the interests of the user and the
selection of each town/city by taking object patterns and contents.
• Online Recommendation
This part combines the interest of the user with the local preference of the
city in order to produce top recommendations. By extending the Thresh-
old Algorithm, a scalable query processing technique is developed to
speed up the process.

Contributions
• LCA-LDA model is introduced that evaluate and merge both local pref-
erence and item content data as these both are important for modeling
user preference and handling of data sparsity problem.
• Scalable query processing technique is designed to improve the effi-
ciency of recommendation.
• Experiments were conducted on large-scale real data sets to evaluate
the performance. According to the results obtained, the effectiveness and

13
efficiency of recommendation have increased especially when the user
travels to new cities.

Advantages
• It facilitates people travelling not only in their native location but also
new location.
• The data sparsity problem is overcome by taking content and location
information.
• The effectiveness of the system has increased.
• According to the results, the efficiency of the system has also been im-
proved.

Disdvantages
• It only shows the performance where the k is in range [1-20].
• Performance disparity in top k call.

14
2.6 Selecting Stars: The k Most Representative Skyline
Operator

This paper is about the study of the problem of selecting k skyline points
such that the amount of points which are led by one of these k skyline
points is maximized. Initially the problem is shown in 2-d space. When
the dimensionality of the problem is increased to 3 or more, it became a
NP hard problem which can be solved by a polynomial time algorithm
with the ratio

Contributions
• A novel skyline operator, k representative skyline, is proposed to pro-
duce the k skyline points having maximum number of dominated points
that are produced to facilitate queries provided by the user
• An efficient dynamic programming based algorithm is developed in 2-d
space to solve the problems.
• Since greedy heuristic is not efficient, a new algorithm is developed
which is novel, efficient and scalable. It is index-based randomized algo-
rithm.

BBS Algorithm
BBS algorithm is a traversal algorithm used to traverse the trees. BBS
traverse the trees in such an order in which it always checks and expands
the tree node nearest to the origin of all the nodes that are not visited.
There are certain properties of BBS:
• Any progressively generated skyline point is guaranteed to be in the

15
dataset.
• It is input/output optimal.
• A node entry is read by input/output disk only once.

FM Algorithm
It is a bitmap based algorithm which can efficiently conclude the number
of different elements (data points). The important feature of FM algo-
rithm is that the bitwise-or operator provides an identical way to produce
a set of FM sketches.

Advantages
• FMG is more accurate
• The efficiency is more.
• It is time efficient.
• The scalability is more.

Disdvantages
When the dimensionality is 3 or more, it becomes NP hard problem. It
can be solved but with the approximation ratio of 1-1/e.

Results
After the performance evaluation it is found that the FMG (FM based
Greedy algorithm) is quite accurate, efficient and scalable in terms of
data size.

16
CHAPTER 3

EXISTING SYSTEM

3.1 About Existing System

In the existing system, the new framework is produced known as Effi-


cient Keyword-aware Representative Travel Route framework. It uses
knowledge extraction from users’ mobility records and social interac-
tions. The LBSN (Location Based Social Network) is used in existing
system which allows the user to perform check ins and share their data
with their friends. If the user travels, the check in data is extracted based
on photos and tagged information. Due to this a large number of routes
can be generated. This generation of large number of routes helps in
mobility prediction, urban planning and traffic management. This paper
helps the user with the trip planning and also determines the travel experi-
ences from the shared data. The paper convincingly improves the KSTR
(Keyword aware Skyline Travel Route) framework of recommending dif-
ferent routes based on some features mined from social media.

In the KSTR framework, there are two modules-


a. Offline Pattern Discovery and Scoring Module
From the dataset, the tags of each Place of Interest is analyzed and the
meaning of keyword is determined which are classified as-
• Temporal Keywords
• Geo Specific Keywords
• Attribute Keywords

b. Online Travel Route Exploration Module


In this module, the users are provided with an interface to specify query
ranges and preference-related keywords.

The travel routes are recommended based on-


1. The attractiveness of the Place of Interest it passes.
2. Visiting the Place of Interests at proper visiting time.
3. The routes generated by influential users.

3.2 Contibutions

• KRTR framework is proposed in which the users can get the different
routes based on the keywords and query region issued by them.
• To improve the input data, the check-in information is mined from the
passive check-ins.
• A route reconstruction method is proposed to divide the routes into seg-
ments by taking spatial and temporal features.
• To increase the diversity of the recommended results, Representative
Skyline query is adopted.
• A greedy algorithm is designed for the efficiency of online application.

18
3.3 Advantages

• KRTR outperforms the baseline algorithm in terms of effectiveness.


• To improve the input data, the check-in information is mined from the
passive check-ins.
• The efficiency is more as compare to baseline algorithm.
• To increase the diversity of the recommended results, Representative
Skyline query is adopted.
• The computation cost is reduced as the repeated queries are recorded.

3.4 Issues of existing System

• Real time data is not been used


• Query Repetition on every cycle
• High Computation Cost
• More Space complexity

19
CHAPTER 4

PROPOSED SYSTEM

These days social networking websites have become a daily routine. Peo-
ple update their day to day activities on these websites which includes
places they have been to, things they do , places where they ate etc.
Our project focuses on these social networking websites and peoples’
day to day comments, especially the ones which involve travelling from
one place to another. Our system has combined social media websites
to route recommendation system and then recommending routes on the
basis of the people who are on these websites. In our system we catego-
rized the travelling into three major parts such as hotels(the people who
are fond of eating), shortest path(people who want to travel faster in life),
scenic beauty (people who want to go with friends and enjoy the beauty
of nature). Our project propose simplify travelling on basis of different
moods and choices. As we know today social media platform are very
specific regarding security so we were not able to get data from facebook
and twitter so we decided to make our own social media platform. In
this platform when people travel from one place to another they post a
specific location on their timeline we extract these post from the social
networking platform and then use it in our second website where we rec-
ommend route. As compared to existing system our system is different in
form that the existing system recommends specific locations but our pro-
posed system recommends a route on basis of keyword extraction from
the post which they added on their timeline and on the basis of ratings
of route which they have given when they post side by side. Our sys-
tem takes the input of number of hotels and number of number of scenic
beauty from the user and then conclude it accordingly.

4.1 Advantages of Proposed System

There are many advantages of our proposed system when we compared


to existing system:
• As the existing system comes with the sample database while our sys-
tem deals with real time database.
• As well as our system has less time complexity as compared to existing
system
• In our system queries does not repeat again and again as compared to
others while in existing system queries repeat again and again every time.

4.2 Hardware Requirements

Hardware Requirments are:


• System : Pentium IV 2.4 GHz.
• Hard Disk : 500 GB.
• Floppy Drive : 1.44 Mb.
• Monitor : 15 VGA Colour.
• Mouse : Logitech.
• Ram : 4 Gb.

21
4.3 Software Requiremnets

Software Requirements are:


• Operating system : Windows 10.
• Coding Language : java
• Data Base : SQL Server 2013

22
4.4 Algorithm Used

4.4.1 Spatial Keyword

The spatial-keyword search is one of the most considerable and famous


algorithms by the research community. Some prior works determines
about extracting keywords and ranking them as based on the below given
example.
Spatial keywords can be categorized into many types and this can be
keywords which describe sadness, angriness, happiness and many other
emotions. The similarities between documents are measured and applied
to the two sets of keywords.
Different varieties of spatial algorithm are being suggested by researchers
but here spatial keyword optimizes the construction and increase the ef-
ficiency of indexes used in keyword queries.
The content used for querying takes the form of spatial database. For
example, hotels or restaurants stationary shops etc.
Suppose if we take an example of a database P which consists of the set
of keywords. It extracts the spatial-keyword such as "good", "better",
"best" and then uses the keyword accordingly. It generally ranks the key-
word and accordingly it is being used in our project. Spatial keyword
algorithm plays a major role in our project as the reviews are taken on
basis of extraction of keywords only. We also ranked keyword such as
"good=1", "better=2", "best=3" and as per it marks get improved.

23
4.4.2 Routing Algorithm

Routing algorithm has become the most inevitable part of our daily life.
There are many sets of algorithms and these comprise of the set of opti-
mal routes from all routes. Routing algorithm can mainly be categorized
into to two types static routing and dynamic routing. Both the algorithms
work in a different manner because of the difference in the rules. For eg.
static routing algorithm comprise the shortest path between the pair of
nodes.
The various algorithms which help in finding the shortest path as follows
• Shortest Path Routing
• Dijkstra Algorithm
• Uses topology
• Greedy approach
• Possible shorter path of equal length [1, 3, 8, 9]
Routing Algorithm is very efficient and is used to pinpoint the location.
It is used in Google maps and also helps in finding the current location
and helps in finding the shortest path from source to destination. Routing
algorithm generally takes 2 attributes such as latitude and longitude.

24
CHAPTER 5

SYSTEM ANALYSIS

5.1 General

System analysis is the procedure of collecting and depicting the facts,


analyzing the problems and disintegration of the system into its compo-
nents. It is a problem solving technique which improves the performance
of the system and also improves its efficiency.
System Analysis is the most important thing because to bring some trans-
formation it is of utter importance that system analysis to be done in cor-
rect manner.As we know in today’s world time and space complexity is
must and to reduce it we must analyze our system in more efficient and
in more accurate way. To make our system it is of importance that it
must be different from previous or existing and we have analysed it very
efficiently that’s why we have we are deleting the reviews from the sys-
tem after a certain period of time because a route changes after a certain
period of time.

5.2 Requirement Analysis

A system to be differ from existing system the main thing is the require-
ment must change and if the requirement are changed then it can be con-
sidered as a correct step towards a correct project. So we decided to move
on and focused on requirement analysis. Requirement analysis contain
Hardware, Software, Functional, Non functional Requirement. To make
a good and efficient System hardware must be transformed and if the lat-
est technology is used it would provide a better result hence that’s why
we made our project in such a way that it can be run on minimal require-
ments.Our Software is the most updated version for using java and is the
most used IDE.
Hence this is how we made the requirement which is the latest and which
can be performed on minimal usage.

5.3 Security Analysis

Today the most important thing prevailing is security. We have taken


care for security and hence our system has Authenticate user Verification
System. This system helps in authenticating user if and only if he is a
previous user of our system. In other cases he has to Signup to our sys-
tem.

26
CHAPTER 6

SYSTEM DESIGN

6.1 General

System design is the process that defines the basic architecture of the
application. In this part the developer decides the various modules that
will be there in the application. This tells the developer the basic behavior
of each and every module and the interfaces. Along with the architectural
design, the logical design of the system is also prepared in this part of
the development lifecycle. The logical design includes various UML
diagrams (i.e. Use-Case Diagram, Activity Diagram, Sequence Diagram,
Collaborative Diagram, Class Diagram) and also the E-R relationship
diagram. The physical design of the system is also the part of system
design. In this part the basic input, output and the process undergone on
input is also designed. The basic need for the system design is to make
the job of the developer easy. The system design is like a blueprint to the
application that is about to be developed. That is the reason why it has to
be given utmost importance.
6.2 Architechture Design

Figure 6.1: Architecture Diagram

6.2.1 Explaination

Firstly the Social network will come into the picture where many peo-
ple come and share their opinion on places they visit or food they eat or
things they do in their daily routine.The person will login to our database
if he is already registered or will sign up if he is not registered.
If he has travelled some place he will be sharing the location which will
be extracted by our system. Now according to keyword extraction pro-
cess this reviews are then mined accordingly and then helped us in pro-
viding the reviews. Now the person who want to travel the places will
visit our website it means the user will go to user information handler
and then he will be searching for the route.Accordingly he will be taking
he route as per the requirements. He will be getting the rating from the

28
people who has already visited the place. Now as per the system archi-
tecture if the route doesnot have any reviews then we will be counting
the number of hotels in that route and amusement parks and green belts
in that route and accordingly give the recommendation of the route.

6.3 Proposed Modules

Modularity of system is very compulsory when a software is been made.


This also helps in dividing the software into various modules and schemas
which would help in understanding the project easily and flexibly.

Our proposed system is divided into following modules:


• Authority User Identification
• Post on Social Media
• Extraction of post
• Number of hotels and scenic beauty
• Hotels and their ratings

6.3.1 Authority User Identification

Authority user verification is done at two places:


The first place is at social networking platform. Here the user can sign
up by giving minimal personal details. They can later sign in for posting
various things on this social media platform.
The second place is when user wants the rating of route and recommen-
dation of route, number of hotels, names of hotels and their ratings while

29
the number of scenic beauty which enhances the route. This were the
two places where user can verify himself if there is any unregistered user
he/she may not be able to sign in to the system.

6.3.2 Post on Social Media

The user who are on social media can post anything same as what other
social media website do. This is simple post as with respect to number
of routes . Suppose if there are 3 routes from a source to destination the
user can select one of the route and can post the recommendation and
rating of a particular route. The post will contain the exact location of
source and destination . This is first converted into latitude and longitude
and then passed to the next module which is extraction.

6.3.3 Extraction of post

Extraction of related data from the post is done in this module. The
users who have posted routes from the places they have travelled is being
extracted in the form of latitude and longitude and then stored in the
database. While the comments which is being given by the user who
have already visited the place has been extracted and mined . The ratings
which are being given is mined and then at last is recommended to the
user who need it.

6.3.4 Number of hotels and scenic beauty

We also provide a drop down list of number of hotels and scenic beauty.
We have given a range in it . If the number of hotels approximately lie

30
between these dropdowns then the user will select and our system will
extract it and it will be shown accordingly.

6.3.5 Hotels and their ratings

We have provided ratings of hotels and their addresses as well as other


basic details. Our main focus was on recommending route so this was one
of the attribute we have considered which can benefit maximum number
of people. We provide name of hotel and other basic details of a particular
locations and this will help in recommending routes accordingly.

6.3.6 Recommendation of route:

Recommendation of route is the main module in our system. We are


recommending route on the basis of mainly 3 attributes that is shortest
distance, hotels and scenic beauty. Recommendation is also on the basis
of reviews of people who have already visited the place. Recommenda-
tion is started from the module 2 where the extraction process has taken
place.
After this extraction of keywords from the post leads to recommending
the route. We are also providing all the comments which are given by
the specific user to that route.As we know there are multiple routes from
a specific source to destination but taking all the routes is difficult so
we have decided to take only three routes and accordingly displaying it
whether it is a shortest path or the route is good for scenic beauty or
whether it is good for hotels(people who are fond of food).

31
6.4 Usecase Diagram

Figure 6.2: Usecase Diagram

32
6.5 Class Diagram

Figure 6.3: Class Diagram

33
6.6 Sequence Diagram

Figure 6.4: Sequence Diagram

34
6.7 Collaborative Diagram

Figure 6.5: Collaborative Diagram

35
CHAPTER 7

SAMPLE CODING

7.1 review.java

public review() {
super(); }
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
response.getWriter().append("Served at: ").append(request.getContextPath());
}
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
doGet(request, response);
String name=request.getParameter("user");
String comment=request.getParameter("comment");
String rating=request.getParameter("rating");
String from=request.getParameter("from");
String to=request.getParameter("to");
String type=request.getParameter("dest");
String dest=from.concat(to);
System.out.println(name);
System.out.println(comment);
System.out.println(rating);
System.out.println(from);
System.out.println(to);
System.out.println(type);
System.out.println(dest);
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con1=
DriverManager.getConnection("jdbc:mysql://localhost:3306/first","root",
"password");
String sql1 = "select * from first.place where route=’"+dest+"’ and sta-
tus=’YES’";
Statement stmt1 = con1.createStatement();
ResultSet rs1 =stmt1.executeQuery(sql1);
HttpSession session=request.getSession();
if(rs1.next()) {
int i=stmt1.executeUpdate("insert into first.‘"+dest+"‘ (name,mode,comment,rating)
values(’"+name+"’,’"+type+"’,’"+comment+"’,’"+rating+"’)");
System.out.println("ROUTE UPDATED1");
String a=type;
String b=dest;
session.setAttribute("type", a);
session.setAttribute("dest", b);
RequestDispatcher rd=request.getRequestDispatcher("search2.jsp");
rd.forward(request,response);
}
else {
int i=stmt1.executeUpdate("insert into first.place(route,status)

37
values(’"+dest+"’,’YES’)");
System.out.println("ROUTE INSERTED");
if(i>0) {
int j=stmt1.executeUpdate("CREATE TABLE ‘"+dest+"‘ (‘name‘
varchar(100) NOT NULL,‘mode‘ varchar(100) NOT NULL,‘comment‘
varchar(500) NOT NULL,‘rating‘ decimal(10,0) NOT NULL)");
System.out.println("TABLE CREATED");
String a="yes";
if(a=="yes") {
int k=stmt1.executeUpdate("insert into first.‘"+dest+"‘ (name,mode,comment,rating)
values(’"+name+"’,’"+type+"’,’"+comment+"’,’"+rating+"’)");
System.out.println("ROUTE UPDATED2");
String c=type;
String d=dest;
session.setAttribute("type", c);
session.setAttribute("dest", d);
RequestDispatcher rd=request.getRequestDispatcher("search2.jsp");
rd.forward(request,response);
} } }
con1.close();
stmt1.close();
rs1.close(); }
catch (Exception e)
{
System.out.println(e.getMessage());
} } }

38
7.2 search.java

public class search extends HttpServlet {


private static final long serialVersionUID = 1L;
public search() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
response.getWriter().append("Served at: ").append(request.getContextPath());
}
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
doGet(request, response);
String name=request.getParameter("user");
String from=request.getParameter("from");
String to=request.getParameter("to");
String type1=request.getParameter("dest");
String dest1=from.concat(to);
System.out.println(from);
System.out.println(to);
System.out.println(type1);
System.out.println(dest1);
}
}

39
7.3 Review.jsp

<!DOCTYPE html>
<%@ page import="java.sql.*" %>
<html>
<head>
<title>Sitemap</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<link href="defaults.css" rel="stylesheet" type="text/css"/>
<div id="ratingss">
<form action="review.jsp" method="get">
<input type="hidden" name="user" value="<%=ad %>" required>
<input type="hidden" name="from" id="from" value="" required>
<input type="hidden" name="to" id="to" value="" required>
<input type="hidden" name="dest" id="dest_i" value="" required>
<button class="button" style="vertical-align:middle"><span>Review
</span></button>
</form>
</div>
<input id="origin-input" class="controls" type="text" placeholder="Enter
an origin location" required>
<input id="destination-input" class="controls" type="text" placeholder="Enter
a destination location" required>
<div id="mode-selector" class="controls">
<input type="radio" name="type" id="changemode-walking" checked="checked">

40
<label for="changemode-walking">SHORT</label>
<input type="radio" name="type" id="changemode-transit">
<label for="changemode-transit">ROUTE 1</label>
<input type="radio" name="type" id="changemode-driving">
<label for="changemode-driving">ROUTE 2</label>
</div>
<div id="map"></div>
<script>
function initMap() {
var map = new google.maps.Map(document.getElementById(’map’), {
mapTypeControl: false,
center: {lat: 20.5, lng: 78.9},
zoom: 6
});
new AutocompleteDirectionsHandler(map);
}
function AutocompleteDirectionsHandler(map) {
this.map = map;
this.originPlaceId = null;
this.destinationPlaceId = null;
this.travelMode = ’WALKING’;
var originInput = document.getElementById(’origin-input’);
var destinationInput = document.getElementById(’destination-input’);
var modeSelector = document.getElementById(’mode-selector’);
this.directionsService = new google.maps.DirectionsService;
this.directionsDisplay = new google.maps.DirectionsRenderer;

41
this.directionsDisplay.setMap(map);
var originAutocomplete = new google.maps.places.Autocomplete( orig-
inInput, {placeIdOnly: true});
var destinationAutocomplete = new google.maps.places.Autocomplete(
destinationInput, {placeIdOnly: true});
this.setupClickListener(’changemode-walking’, ’WALKING’);
this.setupClickListener(’changemode-transit’, ’TRANSIT’);
this.setupClickListener(’changemode-driving’, ’DRIVING’);
this.setupPlaceChangedListener(originAutocomplete, ’ORIG’);
this.setupPlaceChangedListener(destinationAutocomplete, ’DEST’);
this.map.controls[google.maps.ControlPosition.TOP_LEFT].push(originInput);
this.map.controls[google.maps.ControlPosition.TOP_LEFT].push(destinationInput);
this.map.controls[google.maps.ControlPosition.TOP_LEFT].push(modeSelector);
}
AutocompleteDirectionsHandler.prototype.setupClickListener = function(id,
mode) { var radioButton = document.getElementById(id);
var me = this;
radioButton.addEventListener(’click’, function() {
me.travelMode = mode;
me.route();
document.getElementById("dest_i").value =mode;
});
};
AutocompleteDirectionsHandler.prototype.setupPlaceChangedListener =
function(autocomplete, mode) {
var me = this;

42
autocomplete.bindTo(’bounds’, this.map);
autocomplete.addListener(’place_changed’, function()
var place = autocomplete.getPlace();
if (!place.place_id) {
window.alert("Please select an option from the dropdown list.");
return;
}
if (mode === ’ORIG’) {
me.originPlaceId = place.place_id;
document.getElementById("from").value =place.place_id;
}
else {
me.destinationPlaceId = place.place_id;
document.getElementById("to").value =place.place_id;
}
me.route();
});
};
AutocompleteDirectionsHandler.prototype.route = function() {
if (!this.originPlaceId || !this.destinationPlaceId) {
return;
}
var me = this;
this.directionsService.route({
origin: {’placeId’: this.originPlaceId},
destination: {’placeId’: this.destinationPlaceId},

43
travelMode: this.travelMode
}, function(response, status) {
if (status === ’OK’) {
me.directionsDisplay.setDirections(response);
}
else {
window.alert(’Directions request failed due to ’ + status);
}
});
};
</script>
</body> </html>

44
CHAPTER 8

RESULT AND DISCUSSIONS

8.1 Accuracy and Improvements

Our route recommendation is an advanced version because the accuracy


is improved as we will be deleting post automatically after a period of
time and hence this is different from the other route recommendation as
all the websites/systems generally work on old data. As a route is dy-
namic so a route changes every day so we decided to update it again and
again after certain period of time.
Time and space complexity is improved as in our case repetition of queries
does not happen as because once the user uses our system, our system
saves the queries of and dynamically saves the location in the form of
latitudes and longitudes.
We also used efficient algorithm such as routing algorithm which helps in
saving the time as it is the most efficient algorithm for finding the shortest
path.We also used keyword extraction method for extracting keywords
and recommending the routes.
8.2 Screenshots

8.2.1 Social Networking Site Login

Figure 8.1: Social Networking Site Login

8.2.2 Social Networking Site

Figure 8.2: Social Networking Site

46
8.2.3 Website Login

Figure 8.3: Website Login

8.2.4 Welcome Page

Figure 8.4: Welcome Page

47
8.2.5 Displaying Review

Figure 8.5: Displaying Review

8.2.6 Displaying Multiple Routes and Distance

Figure 8.6: Displaying Multiple Routes

48
8.2.7 Displaying Hotels

Figure 8.7: Displaying Hotels

49
CHAPTER 9

CONCLUSION AND FUTURE WORK

Our paper briefs and provides a recommendation on the basis of reviews.


We used efficient algorithms, application programming interfaces and
other data mining concepts to provide more efficiency as compared to
prior works undertaken. The efficiency is also improved with respect to
time and space complexity. Hereby social media platform helps a lot in
recommending routes. The reviews taken by the already visited user are
first extracted and then mined accordingly. Due to real time data sets the
computation cost is reduced.

As we know that new technologies are emerging day by day hence this
can surpass our system in many ways such as keyword extraction, ef-
ficiency, accuracy etc. The future work can be elaborated as the larger
social media can infuse the idea of taking the concept which would help
larger number of people because this platforms already consist of larger
number people. Extraction from social networking site can be simpler
and accurate. Future work can include more attributes and would recom-
mend all routes.
REFERENCES

1. Cao, X., Cong, G., Jensen, C. S., and Ooi, B. C. (2011). “Collective
spatial keyword querying.” Proceedings of the 2011 ACM SIGMOD In-
ternational Conference on Management of data, ACM. 373–384.

2. Chen, D., Ong, C. S., and Xie, L. (2016). “Learning points and routes to
recommend trajectories.” Proceedings of the 25th ACM International on
Conference on Information and Knowledge Management, ACM. 2227–
2232.

3. Chen, Z., Shen, H. T., Zhou, X., Zheng, Y., and Xie, X. (2010). “Search-
ing trajectories by locations: an efficiency study.” Proceedings of the
2010 ACM SIGMOD International Conference on Management of data,
ACM. 255–266.

4. Deng, K., Li, X., Lu, J., and Zhou, X. (2015). “Best keyword cover
search.” IEEE Transactions on Knowledge and Data Engineering, 27(1),
61–73.

5. Fagin, R., Lotem, A., and Naor, M. (2003). “Optimal aggregation algo-
rithms for middleware.” Journal of computer and system sciences, 66(4),
614–656.

6. Hjaltason, G. R. and Samet, H. (1999). “Distance browsing in spa-


tial databases.” ACM Transactions on Database Systems (TODS), 24(2),
265–318.

51
7. Hsieh, H.-P. and Li, C.-T. (2014). “Mining and planning time-aware
routes from check-in data.” Proceedings of the 23rd ACM International
Conference on Conference on Information and Knowledge Management,
ACM. 481–490.

8. Hsieh, H.-P., Li, C.-T., and Lin, S.-D. (2012). “Exploiting large-scale
check-in data to recommend time-sensitive routes.” Proceedings of the
ACM SIGKDD International Workshop on Urban Computing, ACM. 55–
62.

9. Hsu, W. T., Wen, Y. T., Wei, L. Y., and Peng, W. C. (2014). “Skyline
travel routes: Exploring skyline for trip planning.” Mobile Data Man-
agement (MDM), 2014 IEEE 15th International Conference on, Vol. 2,
IEEE. 31–36.

10. Kurashima, T., Iwata, T., Irie, G., and Fujimura, K. (2010). “Travel route
recommendation using geotags in photo sharing sites.” Proceedings of
the 19th ACM international conference on Information and knowledge
management, ACM. 579–588.

11. Lin, X., Yuan, Y., Zhang, Q., and Zhang, Y. (2007). “Selecting stars: The
k most representative skyline operator.” Data Engineering, 2007. ICDE
2007. IEEE 23rd International Conference on, IEEE. 86–95.

12. Lu, E. H.-C., Tseng, V. S., and Philip, S. Y. (2011). “Mining cluster-
based temporal mobile sequential patterns in location-based service en-
vironments.” IEEE transactions on knowledge and data engineering,
23(6), 914–927.

13. Papadias, D., Tao, Y., Fu, G., and Seeger, B. (2003). “An optimal and

52
progressive algorithm for skyline queries.” Proceedings of the 2003 ACM
SIGMOD international conference on Management of data, ACM. 467–
478.

14. Rocha-Junior, J. B., Gkorgkas, O., Jonassen, S., and Nørvåg, K. (2011).
“Efficient processing of top-k spatial keyword queries.” International
Symposium on Spatial and Temporal Databases, Springer. 205–222.

15. Tseng, V. S., Lu, E. H.-C., and Huang, C.-H. (2007). “Mining temporal
mobile sequential patterns in location-based service environments.” Par-
allel and Distributed Systems, 2007 International Conference on, Vol. 2,
IEEE. 1–8.

16. Wang, W., Yin, H., Chen, L., Sun, Y., Sadiq, S., and Zhou, X. (2015).
“Geo-sage: A geographical sparse additive generative model for spatial
item recommendation.” Proceedings of the 21th ACM SIGKDD Inter-
national Conference on Knowledge Discovery and Data Mining, ACM.
1255–1264.

17. Wen, Y.-T., Yeo, J., Peng, W.-C., and Hwang, S.-w. (2017). “Effi-
cient keyword-aware representative travel route recommendation.” IEEE
Transactions on Knowledge and Data Engineering, 29(8), 1639–1652.

18. Ye, M., Liu, X., and Lee, W.-C. (2012). “Exploring social influence for
recommendation: a generative model approach.” Proceedings of the 35th
international ACM SIGIR conference on Research and development in
information retrieval, ACM. 671–680.

19. Ye, M., Yin, P., Lee, W.-C., and Lee, D.-L. (2011). “Exploiting geograph-
ical influence for collaborative point-of-interest recommendation.” Pro-

53
ceedings of the 34th international ACM SIGIR conference on Research
and development in Information Retrieval, ACM. 325–334.

20. Yin, H., Cui, B., Sun, Y., Hu, Z., and Chen, L. (2014). “Lcars: A spatial
item recommender system.” ACM Transactions on Information Systems
(TOIS), 32(3), 11.

21. Yin, H., Zhou, X., Shao, Y., Wang, H., and Sadiq, S. (2015). “Joint mod-
eling of user check-in behaviors for point-of-interest recommendation.”
Proceedings of the 24th ACM International on Conference on Informa-
tion and Knowledge Management, ACM. 1631–1640.

22. Yin, Z., Cao, L., Han, J., Luo, J., and Huang, T. (2011). “Diversified
trajectory pattern ranking in geo-tagged social media.” Proceedings of
the 2011 SIAM International Conference on Data Mining, SIAM. 980–
991.

23. Zheng, K., Shang, S., Yuan, N. J., and Yang, Y. (2013). “Towards ef-
ficient search for activity trajectories.” Data Engineering (ICDE), 2013
IEEE 29th International Conference on, IEEE. 230–241.

24. Zheng, Y., Zhang, L., Xie, X., and Ma, W.-Y. (2009). “Mining interesting
locations and travel sequences from gps trajectories.” Proceedings of the
18th international conference on World wide web, ACM. 791–800.

54

Das könnte Ihnen auch gefallen