Keywords

1 Introduction

Tour planning is a challenging task for tourists. They need to gather massive information and design routes under realistic constraints. Nowadays tour recommendation aims to offer tour plan advice for tourists. Current studies usually focus on data analysis on POIs’ attributes mined from social networks [3, 4]. Then, Tourist Trip Design Problem (TTDP) [2] is proposed to design the route. In these works, each POI is treated just as a vertice, where detailed information is ignored and the scenery during the tour is rarely considered.

However, with higher demand in tour planning, new challenges are brought to current recommendations. POIs have different covering areas and it seems no longer appropriate to treat all the POIs, whatever a small restaurant or a huge scenic park, as equal. It would be ambiguous to recommend a one-day tour in Shanghai, China as shown Fig. 1(a) because what tourists actually prefer is a detailed route in the Bund rather than just reaching it. Hence, sightseeing routes inside the large-scale POIs, which we call them “Super-POIs" in this paper, are required to consider and we go through a toy example to illustrate it.

Fig. 1.
figure 1

Inner route examples

Example 1: John is going on a long vacation in America and one of the POIs recommended is the Yellowstone Park. However, he would get disappointed if a rough tour was offered only telling him to visit it. With five entrances existing, the Yellowstone Park has a complicated road network and plenty of interesting spots inside it. Under this circumstance, John would be forced to select the entrances, interesting spots and scenic routes by himself. In contrary, if a detailed tour plan is given as noted in Fig. 1(b), John would go on this travel happily.

The above example shows the significance of inner route consideration in Super-POIs. Hence, we propose a two-layer framework, Embedded Tour (eTOUR) to better satisfy tourists’ demands. We first divide it into Outer Model and Inner Model, considering the visiting sequence of POIs as well as inner routes inside the Super-POIs respectively. Then, to combine these two models, we compare three strategies. Firstly, simply splitting a Super-POI into several ones and merging them into the Outer Graph, as shown in Fig. 2(a), is unsuitable. Sometimes only a few Inner-POIs are selected in tour plans, resulting in a non-full content trip inside the Super-POI. Another strategy in Fig. 2(b) is first to obtain several “good” routes in each Super-POIs and then derives trips including choosing the best inner routes. However, in this case, each Super-POI is required to calculate the inner top k routes initially. Moreover, both two strategies will lead to a size growth in Outer Graph. Differently, in Fig. 2(c), Super-POI is first treated as a “meta-node” during the insertion-based route construction and in the late period, inner route is revised dynamically to adapt to the outer route. This is because two models are dependent with each other. In addition, only selected Super-POIs are supposed to be considered. Hence, we choose the third strategy.

Fig. 2.
figure 2

Combination strategies

To achieve this strategy, an Embedded GRASP-VNS Algorithm is correspondingly introduced. Moreover, two methods are developed for Inner Model. Finally, experiments based on real datasets demonstrate the effectiveness of our proposal. In the rest of this paper, related work is discussed in Sect. 2. Section 3 describes the framework and Sects. 4, 5 present the algorithms. Section 6 discusses the experiments while conclusions are drawn in Sect. 7.

2 Related Work

Tour Recommendation: Framework of current tour recommendations contains two sections, i.e. offline and online section. Offline focuses on the acquirements of POI information and users’ profiles based on photos and contexts shared on the social networks [6, 7]. With the attributes of POIs, online section is to select POIs and design routes. A “filter-first, tour-second” framework was proposed in [3]. With pre-selected mandatory POIs, collaborative filtering is applied to identify a subset of optional POIs. Then, trip design is solved via an Iterated Tabu Search algorithm. [1] proposed a global k-means clustering algorithm and POIs are replaced by clusters to decrease the complexity.

Tourist Trip Design Problem: The basic model of TTDP is Orienteering Problem (OP). Its extensions are developed in a various way, taking more realistic constraints into account such as Team OP and OPTW [2]. Among kinds of extensions, TOPTW is the suitable basic problem in tour planning. Vansteenwegen et al. proposed an iterated local search heuristic in [10], which consists of an insertion and a shake step. MC-TOP-MTW [8], taking multi-constraints and multiple time windows into account, is achieved by GRASP and ILS, while in [5] Lin et al. proposed a simulated annealing (SA) algorithm for it.

3 A Two-Layer Framework for Tour Recommendation

The eTOUR framework is shown in Fig. 3. We divide our model into Outer Model and Inner Model, which respectively recommends outer routes and inner routes inside the large-scale POIs.

Fig. 3.
figure 3

eTOUR framework overview

Definition 1

(Outer-POI). Point of Interest that tourists may choose. For each Outer-POI \(V^O_i\), it has several properties: visit duration \(d^O_i\), popularity \(Pop^O_i\), budget cost \(b^O_i\), time windows \(TW^O_{i} = [Open_{i}, Close_{i}]\) and category \(C^O_i\).

Outer Model aims at the design of POIs’ visiting sequences. Super-POI is a special kind of Outer-POI with a large area covered. We treat each POI as a vertice and convert an Outer Graph \(G^O=(V^O,E^O)\). Note that the transport time \(t_{ij}\) between each pair of vertices are known by offline section. To recommend a trip plan for user, the profit of each Outer-POI is first predicted. The profit reflects user’s likelihood to visit the POI and is often measured by the combination of POI’s popularity and user’s preference. Then, with user’s query for the trip includes the start and terminal POI, maximum time budget and cost budget, the route planning is referred to Team Orienteering Problem with Time Windows (TOPTW) [10]. Its goal is to obtain a route that maximizes the total collected profits which represents user’s satisfaction to the route plan.

Definition 2

(Inner-POI). Important spots inside the Super-POI. It has two types namely interesting spots and entrances or exports. Interesting spot in Super-POI \(V_i^O\) has properties: visit duration \(d^i_j\), popularity \(Pop^i_j\), profit \(p_j^i\) and category \(C^i_j\) while the visit durations and profits of entrances or exports are set to zero.

Definition 3

(Scenic-Path). Beautiful path between Inner-POIs \(V_j^i\) and \(V_k^i\), which has properties: travel duration \(t^i_{jk}\), popularity and category.

Inner Model focuses on the inner route design in the Super-POI. Similarly, the profits of both Inner-POI \(p_j^i\) and Scenic-Path \(s_{jk}^i\) are first calculated. In this problem, the goal is to obtain an optimal route that maximizes the collected profits both in vertices and edges under the constraints of maximal time \(T^i_{max}\) and entrance selection. Note that vertices can be reached more than once but the profit and duration time are only collected at the first reach.

4 An Embedded GRASP-VNS Algorithm

An Embedded GRASP-VNS Algorithm in Algorithm 1 is proposed to combine the Inner and Outer Model. As for Outer Model, there are two steps, i.e., route construction and local search. The route construction is usually insertion-based, which means that route is constructed by inserting the most suitable vertice one by one until no feasible vertice exists. After this, local search is applied to escape from a local optimal solution. During the construction of Outer Model, Super-POIs are first viewed as “meta-nodes” and they can be inserted as the common POI does. In late period, the inner routes of the selected Super-POIs are considered and revised intermittently to adapt to the constructing routes.

GRASP: Insertion-Based Construction. Greedy Randomized Adaptive Search Procedure is often applied for construction [3]. At each insertion iteration, promising vertices are picked into a Candidate List according to Eq. (1) and then randomly select one to insert, which guarantees the route to be greedily and randomly combined. Here, the conception of slack is detailed discussed in [10].

$$\begin{aligned} Ratio_i = \frac{p_i^2}{Slack_{avg}^i};~~Slack^i_{avg} = \frac{\sum _{V^O_j\in R}Slack_j^i}{n}~~(n=|V^O_j|\in Route) \end{aligned}$$
(1)

To determine when to adjust the inner route, we define two criterions in Eq. (2). Tightness is measured by the average slackness of the route R while Neighbor Uncertainty signifies the proportion of wait time in Super-POI’s neighbors among the total wait time, denoting the change possibility of its neighbors.

$$\begin{aligned} Tightness = \frac{Slack_{avg}}{T_{max}^O} \le \alpha ;~{Neighbor Uncertainty } = \frac{W_i+W_{latter(i)}}{\sum _j{W_j}} \le \beta \end{aligned}$$
(2)

VNS: Local Search. Four neighborhood structures [9] are applied, (1) 2-Opt: remove and replace two arcs in a sub-route. (2) Replace: remove one vertice and replace it with an unvisited one. (3) 2-Opt*: remove and replace two arcs between two sub-routes in a solution. (4) Insert: insert one available vertice.

figure a

5 Solution of Inner Model

5.1 DFS-Based Tree Search with Pruning

Due to the small size of Inner Graph, DFS-based Tree Search is applied for exact solutions and several pruning methods are proposed. The DFS-Based tree search systematically constructs path begin with the starting node. Current node will deeper search for its connected nodes as childnodes and backtrack to its parentnode if the time constraint breaks or the pruning rule meets.

Rule 1. Due to the multi-allowed reach at each node, blindly searching back and forth between two or several nodes or rounding in cycle is only time consuming with no profit collected, which could be skipped.

Rule 2. Further search can stop if the left time in current searching path less than the Quick-Out Time. Quick-Out Time is defined as the least transport time from present node to the terminal nodes regardless of node visit and is apparently the shortest path to the terminal node, which can be easily derived by Dijkstra Algorithm in \(O(|V^i|log|V^i| + |E^i|)\).

5.2 Modified Chinese Postman Solution

Here, we discuss a special case of Inner Model. Under many circumstances, Super-POIs usually have one entrance and the routes traveled by users are similar. To simplify this condition, we define a Key Sub-Graph \(H^i \subseteq G^i\), which is a connected graph with one entrance and assumed to be mandatorily visited. Moreover, rest of the interesting spots and edges in \(G^i\) is set to be optional.

To traverse the Key Sub-Graph \(H^i\), the Chinese Postman Problem (CPP) is referred. In our problem, a modified method of CPP is developed. The fundamental method to solve CPP is to convert the graph into an Euler Graph by adding the least-weighted edges. These edges are derived by calculating the minimum weighted matching of the graph constructed by Singular Points and their pairwise shortest paths. Note that Singular Points refer to the vertice V that \(d(V)=2k-1, k \in \mathcal {N}^*\). The only step we have modified is to derive the shortest path from Graph \(G^i\) rather than the Key Sub-Graph \(H^i\). This is motivated by adding a possible lower-weighted edge between two Singular Points and making the optional paths promising to be added. The algorithm can be solved in polynomial time with \(O(|V^i|^2log|V^i|+|V^i||E^i|+|V^i|^3+|E^i|^2)\).

6 Experiments and Results

Tourism Real Dataset. we crawled POIs information on Baidu MapFootnote 1, which includes 82 POIs in Beijing and 50 POIs in Hangzhou. Among these POIs, there are five Super-POIs in Beijing dataset and three in Hangzhou dataset. The attributes of POIs, such as time windows, cost, visit duration location and popularity, can be obtained from crawler data. Besides, we only consider POIs’ popularity for profit value while ignoring the user preference discussed in Sect. 3, which will not influence the demonstration of our strategy and algorithm.

The experiments are tested on a Intel Core i5 server with 3.20 GHZ processor and 8 GB RAM. The programs are coded in Python.

Strategy for Combination of Inner and Outer Model. Here we make comparisons between Node-splitting, Route-choosing and eTOUR Strategy as discussed in Fig. 2. As is shown in Fig. 4, eTOUR Strategy has an apparent advantage over two other strategies on CPU time and is slightly superior in profit, especially when the graph scales out. This is for the reason that the inner route in eTOUR Strategy is calculated during the outer route construction, meanwhile, the outer route will be slightly adjusted according to the latest inner route, which contributes to be closer to the optimum value. In addition, with only selected Super-POIs required to be considered, the time cost is reduced markedly. Moreover, Fig. 4(a) and (c) show that Node-splitting Strategy costs less CPU time than Route-choosing Strategy while the latter gains slightly better profit value. This is because Route-choosing strategy selects more valuable routes, yet it costs much more CPU time.

Fig. 4.
figure 4

Strategy comparison for combination of two models

Fig. 5.
figure 5

Performance under different solutions of Inner Model

Performance Under Different Solutions of Inner Model. As shown in Fig. 5(a) and (b), Modified Chinese Postman method is a little inferior to DFS-based Tree Search method in both the average profit value and the best profit value. However, as is depicted in Fig. 5(c), DFS-based Tree Search method costs much more CPU time than Modified Chinese Postman method due to the reason that the latter owns the polynomial complexity.

7 Conclusion

In this paper, we introduce eTOUR, a novel two-layer framework for tour recommendation, taking Super-POIs into account. We believe that the framework can absorb interest of the current recommendations and the application of CPP for a special case may inspire the further data mining of Interesting Patterns.