Phone-Based Restaurant Recommendation System by Using Position Information and Association Rules

With the rapid development of smart-phone applications, how to make the ordering process via smart-phones more convenient and intelligent has become a hotspot. This paper puts forward a method of restaurant dish recommendation relying on position information and association rules. In addition, this paper has designed and developed a restaurant recommendation system based on mobile phone. The system would fetch the real-time location information via smart-phones, and provide customers personalized restaurant and dish recommendation service. According to the related applications, this system can successfully recommend the related restaurants and food information to customers.


Introduction
With the increasing of catering industry, the competition between restaurants is getting more and more intense.How to attract customers and how to provide better service becomes an important question which probably would decide who would take a lead in the competition.Along with the high speed development of smart-phone applications, the restaurant reservation system has appeared on mainstream cell phones platforms.Compared with the traditional way of reservation, phone-based restaurant system enable customers to browse the menu and make an order without leaving their homes.However, facing with a superb collection of beautiful things of restaurants and dishes, sometimes customers find it really hard to select exactly what they want.Traditional search algorithms can present the same results to all customers, but they can't provide the customers with personal results to meet their individual preferences.
In recent years, with the emergence of electronic commerce, information overload [1] is a serious problem, and the personalized recommendation system is a powerful tool to solve this problems.It has been absorbing much attention from the researchers.There are many applications involving intelligent recommendation of products or books, which offer a great convenience to the customers.In the field of electronic commerce, recommendation system is the driving force.With its growing maturity, the recommendation system has been used in the mobile space recently, such as recommendation of mobile advertising [2].Moreover, providing personalized service based on real-time location information of the user is a trend of the current development of information services.
In this paper, the data mining technology is used for the phone-based reservation system and a method of restaurant and dish recommendation based on position information and association rules is proposed.At the same time, this paper has designed and developed a recommendation system of reservation on the phone.This system deploys AGPS to obtain location information of the customers.Combining with customers' reservation records, the system recommend appropriate restaurants.Furthermore, the system mines the ordering history to find the customers' preferences and establish the relevant models.It can play a guide and recommendation role in customer personalized service.In addition, this article has verified feasibility of this system through the related applications.

Recommendation methods based on the position information and association rules
Restaurant recommendation.Restaurant recommendation deploys the AGPS technology to obtain the position information of customer.The reason for choosing AGPS is that it needs only a few seconds to initially locate.Besides, it can also get positioning information indoors with higher accuracy.
The system can obtain latitude and longitude of the mobile terminal through the AGPS, and the server-side database stored the latitude and longitude of all restaurants.Therefore, the system can calculate the distance between the two point only need their coordinates.
Suppose that there are two dots (A(x 1 , y 1 ), B (x 2 , y 2 )) on the ground.Assume that x is the latitude and y is the longitude and set a=cos (x 1 -x 2 ), b=cos (y 1 -y 2 ), cx 12 =cos x 1 *cos x 2 , R is radius of earth, the distance D between two dots is calculated by the Eq. 1 [3]: Restaurant recommendation recommends a nearby restaurant to the customer according to the position information.This system is applied in Hangzhou.Firstly we divided the map of Hangzhou into a grid to ensure length of a region is ten km.And then we select a part for analysis, each region has a number as shown in Fig. 1, such as A restaurant is located in Region 1.

Fig. 1 Block grid
The process of restaurant recommendation is shown in Fig. 2.

Fig. 2 Flow chart of restaurant recommendation
Recommended restaurants choose from the customer's area firstly.If the number of restaurants is less than 10, the system continue to search from the region around A until the number of matched restaurant is greater than 10 (For example, if customer A logined in Region 5, the system only get 3

784
Information Technology for Manufacturing Systems III matched restaurants, then search from the region of 1, 2, 3, 6, 9, 8, and 4. When the number of the matched restaurants is less than 10, the system continues to search outer, and so on.).
In this paper we introduce how to select 10 recommended restaurants from the restaurant set.After getting the candidated restaurants, the system compare with the user information (Customer class has an attribute of preference restaurant.This value is an average of per restaurant's star numbers, and these restaurants were ordered by this customer.If no reservation record, this value is 0. ).When the user preferences value between 3 and 4, the system select the restaurants which is three stars or four stars, pushing these restaurants into the queue.Next, push the remaining restaurants into the restaurant queue in order from small to large distance.Finally, recommend the restaurants which are at top ten places among restaurant set to the customer.Dishes Recommendation.Dishes Recommendation adopts the association rules algorithm.This algorithm helps to discover the relationship between different commodities in transaction database, so as to obtain the model of customer's purchasing behavior.The mission of association rule mining is that given a transaction database D, to find the interesting associate or correlation among a large quantity of data based on support degree --reliability framework, generating association rules which support and confidence are all higher than the user given minimum support and confidence [4].
While using the association rules to recommend, we regard the dish which customer has been ordered or being browsed as "rule head", and regard recommend dishes as "rule body".The advantage of the Association Rules algorithm is simplicity while its disadvantage is time-consuming, but the use of off-line operation can solve this problem.
In order to select the association rules which conform to the user-given minimum support and confidence from the reservation transaction database, Agrawal and his colleagues came up with a basic Apriori algorithm [5], and proposed an important method of the association rule, which is divided into the following two steps: 1) Generate all frequent itemsets.Scan the transaction databases, then set the corresponding minimum support, find out all itemsets which are greater or equal to the minimum support.The itemsets conform to minimum support called the frequent itemsets.
2) Extraction of association rules.Using the found frequent itemset from database to generate association rules, these rules must meet the minimum support and confidence (this system sets the minimum support and confidence are respective 0.5 and 0.7.).
This system gets the set of association rule by mining the customer's reservation records, and each restaurant has an association rule set.According to the method above, we make an example of how to get the association rule set of restaurant A. Firstly, get all dish IDs which support is greater than the minimum support from the reservation record of restaurant A, then obtained set is frequent itemset.Gain confidence from these orders which contain any dish from frequent itemset.For example, there are 500 customers who ordered dish A, in which there are 400 customers ordered dish B, then the confidence P (X=>Y)=80%.When the confidence is greater than the minimum confidence, add the restaurant ID, dish A, dish B into the database's set of association rules.
There are two scenarios of the system recommending dishes to the customers.The first is when the customer is browsing dishes; the second is the customer put dishes into the shopping cart.How to obtain the association dishes from the association set.If the customer put the dishes B of restaurant A into the shopping cart, then the system scans the association rules set in the database.Above all, the system select all the association rules of restaurant A, and then select the tuples which before-dishes ID is dish B from the selected result.Finally, put the after-dishes ID of obtained tuple into the set of recommended dishes.The all dishes in the set of recommended dishes are dish B's associated dishes.The dishes which are recommended to the customer must be unvisited by this customer.Every time when customers browse different dishes or order a dish, the system recommends all the dishes of recommended set to the customer first, and then clears the set of recommended dishes.The specific process of recommend appropriate dishes to customers is shown in Fig. 3.

Development of restaurant recommendation system based on phone
Framework of the system.Framework of this system consists of off-line service and online service.Refer to the framework design for book intelligent recommendation system [6], we have designed the framework as shown in Fig. 4.This shows that our system adopts the online operation, but dishes recommendation is composed by off-line services and online services.In order to improve the efficiency, the system adopts the off-line processing to acquire the association rules.Off-line part is composed by data preparation and mining the association rules.Data preparation is access to all historical reservation information from database so as to generate the responsed file, the method of mining the association rule is described in Section 2.2.
The online part is divided into two blocks.The first piece synchronously check and record the customers' browsing behavior in order to dynamically recommended the corresponding dishes or link to the customers according to the association rules from off-line part; In the second pieces, according to the request information of mobile terminal and AGPS, the system access latitude and longitude of the customer's location.According to the algorithm of Section 2.1, the system chooses the ten matched restaurant, then recommended to the customers dynamically.Analysis and design of the system.The recommendation system of reservation on the phone has 8 main classes, respectively is the User, Restaurant manager, Order, Orderitem, Dishes, Restaurants, Association rule set, Rules statistics.E-R Diagram of this system as shown in Fig. 5.

Fig. 5 E-R Diagram of the system
The association rule set is regards as the guide to dishes reservation, and the generated association rules are stored in this table.When the customer makes reservation, the system will scan the table, and it recommends the dishes which customers may be of interest to the customers dynamically.The table of association rules recorded the times of each rule recommended to the customers, successful recommended times and the success rate.On the basis of success rates, we can reset the minimum support and confidence of system in order to improve the accuracy of recommendation.Implementation and application of the system.This system adopts the Eclipse3.5 and SQL Server 2008 in development.Beside, the system based on Android platform, especially applying some of the key technology, such as mapping, SQLite embedded database etc. Phone-side is a user interfaces that used jQuery Mobile framework to develop application based on the Android platform.Server-side brings in SSH, Struts2 that has collect the JSON plug-in through which the server and client can get interactive information transmitted, thus the information can be sent easily from the server-side to mobile terminal.
Advanced Engineering Forum Vols.6-7 Fig. 6 Main interface of the system Fig. 7 Interface of dishes recommendation The application's main interface is shown in Fig. 6.There are mainly six blocks in this system: reservation, searching, making an order, mapping booking and individual centre.The module of reservation and mapping booking has gained the function of recommending restaurant and dishes.
The module of restaurant recommendation will show the login location of the customer before entering the interface of making restaurant reservation.Based on the algorithm in Section 2.1, the system will recommend 10 restaurants, showing the level of the restaurant, average consume, the distance to the spot, the label of the restaurant and so on.
The interface of dishes recommendation is shown in Fig. 7. Fig. 7 shows the ordering interface of "Farmhouse Restaurant".There are two sorting ways, sorting by price or by popularity.Customers can choose some dishes, and then click the button "Add" to add to the shopping cart.At last, they can click the button "Order" to make a reservation.On the bottom of the interface are some recommended dishes you might be interested.

Conclusions
The system feedback 10 restaurants to the customer application interface so as to recommend appropriate restaurants to the customers combined with information of customer's ordering history and restaurant location information, in which the mobile terminal equipment system obtain the position information via AGPS technology.Using the algorithm of association rules, the system recommends strong associated dishes to customers according to the records of customers' browsing history and orders.The system not only makes it more convenient for customers to make a reservation, but also promotes the development of catering industry.This system provides personalized service combined with the user's real-time location information.This system is consistent with the trend of the development of information service and has good application prospects.But the system also has some deficiencies, such as calculation of the distance between the two points, which only take the straight line into account.In order to improve the accuracy of recommendation, we may add some more new algorithms into this project in the future, such as collaborative filtering algorithm.

Fig. 4
Fig. 4 Mobile phone reservation recommend framework diagram