A Smart Tourism Recommendation Algorithm Based on Cellular Geospatial Clustering and Multivariate Weighted Collaborative Filtering

: Tourist attraction and tour route recommendation are the key research highlights in the ﬁeld of smart tourism. Currently, the existing recommendation algorithms encounter certain problems when making decisions regarding tourist attractions and tour routes. This paper presents a smart tourism recommendation algorithm based on a cellular geospatial clustering and weighted collaborative ﬁltering. The problems are analyzed and concluded, and then the research ideas and methods to solve the problems are introduced. Aimed at solving the problems, the tourist attraction recommendation model is set up based on a cellular geographic space generating model and a weighted collaborative ﬁltering model. According to the matching degree between the tourists’ interest needs and tourist attraction feature attributes, a precise tourist attraction recommendation is obtained. In combination with the geospatial attributes of the tourist destination, the spatial adjacency clustering model based on the cellular space generating algorithm is set up, and then the weighted model is introduced for the collaborative ﬁltering recommendation algorithm, which ensures that the recommendation result precisely matches the tourists’ needs. Providing precise results, the optimal tour route recommendation model based on the precise tourist attraction approach vector algorithm is set up. The approach vector algorithm is used to search the optimal route between two POIs under the condition of multivariate trafﬁc modes to provide the tourists with the best motive beneﬁts. To verify the feasibility and advantages of the algorithm, this paper designs a sample experiment and analyzes the resulting data to obtain the relevant conclusion.


Introduction
A smart recommendation system that provides suitable tourist attraction and route recommendations for tourists is a research highlight in the field of smart tourism [1]. It can automatically provide potentially interesting tourist attractions for tourists and offer them a convenient service. The current recommendation methods include the user-based method, the content-based method, the knowledge-based method, the user characteristics-based method, and the association rules-based method, etc. Each method has its advantages and disadvantages, and the user-based method and content-based method are frequently used [2,3].
Mou [4] used the collaborative filtering method to forecast tourists' evaluation scores on tourist attractions in accordance with similar tourist attraction scores. Filipe Santos [5] proposed a recommendation system that considers users' functionality levels. Yanqing Cui [6] designed a kind of tourist attraction label system. According to the association model among the tourist, tourist attraction and tourism label, the user interest model was set up to recommend tourist attractions. Choi Il Young [7] proposed a travel recommendation system based on collaborative filtering and constraint satisfaction filtering. Li Guangli [8] used a questionnaire survey and the crawler algorithm to obtain the tourist and tourist attraction data. The collaborative filtering method was used to calculate the textual similarity between the target user and each cluster center and finally obtain the recommendation list. Ya Zhou [9] presented a kind of collaborative filtering recommendation method based on tourists' location labels and preferences. Mehrbakhsh Nilashi [10] presented a hybrid collaborative filtering recommendation method based on dimension reduction and prediction technology. Shi [11] designed a tourism collaborative filtering recommendation model that incorporates tourist attraction attributes. Chen [12] used the collaborative filtering algorithm to recommend the tourist attractions. Zhu [13] used a stratified sampling statistical model to obtain users' preferences. Furthermore, the improved Bayes individualized sequencing method was used to optimize the recommendation system. Li [14] presented a collaborative filtering algorithm. It used the clustering method DBSCAN to set up a user consumption model and obtain a the recommendation system for the WeChat applet. Liu [15] studied the tourism recommendation systems based on a clustering algorithm, stratified sampling statistical model and SVD++ algorithm, respectively. Chen [16] presented a tourism group recommendation method combined with collaborative filtering and user preferences. Leila Esmaeili [17] set up a tourism recommendation system under the condition of social commerce. Shen [18] obtained massive historical tour data and sets up the personalized attraction similarity (PAS) model to recommend tourist attractions.
Analyzing the related work, it can be seen that the tourism recommendation method has the following problems. Problem (1): Previous studies mainly focus on the principle and theory of the collaborative filtering algorithm in terms of the aspects of algorithm efficiency, accuracy, data sparsity, and the cold start problem. Problem (2): The collaborative filtering algorithm is still a fuzzy recommendation mode without high accuracy. It only relies on the historical tour data and comment data to determine the current tourist's interests and needs. Problem (3): The research on the precise matching degree between the tourist attraction feature attributes and tourist interest feature attributes is not sufficient. Problem (4): The collaborative filtering algorithm directly uses the historical tour route, neglecting the current tourist's interest needs and the real-world geographic conditions for the tourist. The traditional route planning algorithm uses the main roads and avenues, while it neglects the secondary roads. It may not identify the optimal route. Figure 1 shows the sequence of the paper. Aimed at addressing these problems, this paper presents a tourism recommendation model based on cellular automata geographic space clustering and a weighted collaborative filtering algorithm. This algorithm could be used as an embedded algorithm for a smart tourism recommendation system developed, managed, and operated by the tourism sectors. Moreover, the system is ultimately used by tourists on the website. This model is able to solve the analyzed problems. The first is the problem in the precise tourist attraction recommendation mechanism of the collaborative filtering algorithm. The second is the matching mechanism between the tourist attraction and tourist in the collaborative filtering algorithm. The third is the problem of optimal tour route planning based on the precise recommendation result.

Tourist Attraction Recommendation Model Based on Cellular Geospatial Generating and Weighted Collaborative Filtering
First, it is necessary to cluster the tourist attractions. A tourist usually takes a certain tourism city as their destination. The typical tourist attractions are the places that tourists

Tourist Attraction Recommendation Model Based on Cellular Geospatial Generating and Weighted Collaborative Filtering
First, it is necessary to cluster the tourist attractions. A tourist usually takes a certain tourism city as their destination. The typical tourist attractions are the places that tourists will visit [19][20][21][22]. This paper takes the urban area as the research range to set up the algorithm. The tourist attractions in the urban area have the discrete characteristics within the geospatial range. Each tourist attraction is connected by an urban road network, and tourists can freely travel between tourist attractions by different transportation methods. The recommendation should combine feature attributes and its matching with tourists' interest needs. Here, the first group of definitions and tourist attraction clustering are presented. Def 1.1 Tourist attraction research domain X. The n number of urban tourist attractions that possess geospatial attributes and feature attributes are grouped into one set, and this set is defined as tourist attraction research domain X.
Def 1. 2 The element x (k) of X. Tourist attraction in the domain X is the element x (k) of X, k ∈ (0, n] ⊂ Z + . Def 1. 3 The feature attribute vector x (k) for the element x (k) of X. As to one element x (k) of X, its attributes can be quantified into a one-dimensional feature vector, defined as the feature attribute vector x(k) for the element x (k) of X.
Def 1.4 Tourist attraction cluster X (j) . Divide the n number of tourist attractions into c number of subsets X (j) and ensure that the tourist attributions of different subsets have a low intimacy degree while tourist attributions in the same subset have a high intimacy degree. The subset is defined as the tourist attraction cluster X (j) , j ∈ (0, c] ⊂ Z + .

The Spatial Adjacency Tourist Attraction Clustering Model Based on the Cellular Space Generating Algorithm
Tourist attractions, urban roads and their intersections are the basic environment for tourism activities. The clustering of the tourist attractions is necessary to ensure the matching degree between the tourist attraction and tourist [23][24][25][26]. The tourist attraction clustering model based on the cellular space generating algorithm is set up.

Tourist Attraction Cellular Space Generating Algorithm
The cellular generating algorithm is set up to generate the optimized space structure of the tourist attraction element x (k) . It realizes the optimal clustering of domain X. The second group of definitions and the algorithm process are presented below. Def 2.1 Tourist attraction cellular core O (k) . The element x (k) of X is defined as the tourist attraction cellular core O (k) . It is the generating root of the tourist attraction cellular generating unit C (k) . Def 2.2 Tourist attraction cellular space anchor point P (v) . In a random and uniform manner, w number of intersections P (v) of the main roads are defined as the tourist attraction cellular space anchor point. Def 2.3 Cellular generating unit C (k) . The irregular closed polygon C (k) , which is formed by points P (v) and contains the cellular core O (k) , is defined as the tourist cellular generating unit C (k) . It is the basic unit to generate the cellular space, and it is the minimum unit that contains the cellular core O (k) . Def 2.4 Tourist attraction cellular space C. Expand the unit to form the neighborhood cellular core C (k)nei , which contains the neighborhood core O (k)nei . Starting from C (k) , perform the directional expansion. When all the points O (k)nei converge and all C (k) are formed, the space C is generated. The cellular generating unit C (k) and cellular space C generating algorithm based on the core O (k) and points P (v) is set up, and it is defined as Algorithm 1. Below is the Algorithm 1 flow pseudo-code. Figure 2 is an example to form the space C. Figure 2a-f illustrate the process of forming the cellular unit C (1) , and Figure 2g-h illustrate the topological process of forming the cellular space C based on the cellular unit C (1) .

Algorithm 1
The cellular generating unit C (k) and cellular space C generating algorithm 1: Step 1: Generate and confirm the O (k) set for the tourist attraction cellular cores O (k) and the set P (v) for the cellular geospatial anchor points P (v) .

5:
Sub-step 4: Confirm the coordinate O (k) as y (1,O (k) ) and y (2,O (k) ) , P (v) as y (1,P (v) ) and y (2,P (v) ) . 6: Step 2: Generate the initial cellular generating unit C (1) . 7: Sub-step 1: Generate one ray lO (k) to the north direction starting from the cellular core O (k) . 8: Sub-step 2: Set up the open list O (k) and closed list C l(i) for P (v) . 9: Sub-step 3: Turn lo (k) and search the neighborhood points P (v) nei. 10: Step 3: Generate the unit C (2) of the initial cellular generating unit C (1) . 11: Step 4: Generate all the unit C (1)nei of the cellular generating unit C (1) . 12: Step 5: Continue generating neighborhood units until all the points converge. Def 2.4 Tourist attraction cellular space C . Expand the unit to form the neighborhood cellular core ( ) Step 3: Generate the unit (2) C of the initial cellular generating unit (1) C .

11:
Step 4: Generate all the unit (1)nei C of the cellular generating unit (1) C .

12:
Step 5: Continue generating neighborhood units until all the points converge. Figure 2 is an example to form the space C. Figure 2a-f illustrate the process of forming the cellular unit (1) C , and Figure 2g-h illustrate the topological process of forming the cellular space C based on the cellular unit (1) C . (a-f) illustrate the process of forming the cellular unit (1) C , and (g,h) illustrate the topological process of forming the cellular space C based on the cellular unit (1) C .

Tourist Attraction Clustering Algorithm Based on Geospatial Feature Attribute
In the process of clustering, to generate the cluster ( ) u l C , the cellular core ( ) k O is defined as the dynamic clustering center e C . The e C will change with the spatial geometric topology of the cluster in the process of multiple iterations and form the steady-state clustering center. The tourist attraction clustering algorithm based on the geospatial feature attribute is set up, and it is defined as Algorithm 2, and the Algorithm 2 pseudo-code is as follows. After the search, the tourist attraction space C forms the cluster  (a-f) illustrate the process of forming the cellular unit C (1) , and (g,h) illustrate the topological process of forming the cellular space C based on the cellular unit C (1) .

Tourist Attraction Clustering Algorithm Based on Geospatial Feature Attribute
In the process of clustering, to generate the cluster C l(u) , the cellular core O (k) is defined as the dynamic clustering center C e . The C e will change with the spatial geometric topology of the cluster C l(u) in the process of multiple iterations and form the steady-state clustering center. The tourist attraction clustering algorithm based on the geospatial feature attribute is set up, and it is defined as Algorithm 2, and the Algorithm 2 pseudo-code is as follows. After the search, the tourist attraction space C forms the cluster C l(u) distribution state with the core of the steady-state clustering centers C e(v) .

Algorithm 2
The tourist attraction clustering algorithm based on the geospatial feature attribute 1: Step 1: Randomly and uniformly choose k number of dynamic clustering centers C e (v) . v ∈ (0, k] ⊂ Z + , noted C e+ .

7:
Step 3: Calculate d (K (2,2) ,K(1,1v)) , v 1 ∈ (0, k] ⊂ Z + . Take the minimum element ∼ K (1) of K (2,2) as the nearest O (k) for O (v1) and absorb in C l(k(1,v1)) . 8: Step 4: Converse to calculate d (K (2,v2) ,K(1,1v)) , take the minimum element ∼ K(1) of K (2,v2) as the nearest O (k) for O (v1) and absorb in C l(k(1,v1)) . Figure 3 is an example for Algorithm 2. Four centers (red points) are chosen; see Figure 3a. For one point out of the center (blue point), calculate the value d between the blue point and all the red points and determine the minimum value; see Figure 3b. The blue point with the minimum value belongs to the red point cluster (with square); see Figure 3c. Perform the process on all the blue points and determine which blue point belongs to which red point cluster.

6:
Sub-step 4: Take the minimum element

Tourist Attraction Recommendation Model Based on Weighted Collaborative Filterin
Note the tourist attractions' m dimension feature attributes and the topolog tributes as the keywords for the text mining. By mining the tourist attraction fea tribute labels, tourists' preferences regarding the tourist attraction classification obtained from the statistical data [27][28][29]. The K-neighborhood algorithm is used to the historical tourists who best match the current tourists' feature attributes so as ommend the best-matching tourist attraction classification for the current tourists they choose a certain quantity of tourist attractions in each classification accordin time schedule. Below is the third group of definitions and the tourist attraction mendation model based on the weighted collaborative filtering algorithm.

Tourist Attraction Recommendation Model Based on Weighted Collaborative Filtering
Note the tourist attractions' m dimension feature attributes and the topological attributes as the keywords for the text mining. By mining the tourist attraction feature attribute labels, tourists' preferences regarding the tourist attraction classification can be obtained from the statistical data [27][28][29]. The K-neighborhood algorithm is used to obtain the historical tourists who best match the current tourists' feature attributes so as to recommend the best-matching tourist attraction classification for the current tourists. Then, they choose a certain quantity of tourist attractions in each classification according to the time schedule. Below is the third group of definitions and the tourist attraction recommendation model based on the weighted collaborative filtering algorithm.
Def 3.1 Tourist attraction feature classification T (i) . Urban tourist attractions could be classified into c classifications T (i) . Its tourist attraction is noted as T (i,j) . The T (i) divides the domain X into n classifications. The tourist attractions T (i,j) of the same feature classification T (i) have similar feature attributes.
Tourist attractions T (i,j) in the two different T (i) and T (¬i) have different feature attributes. The domain X is divided into n classifications in order to divide the set T = T (i) |0 < i ≤ n into certain finite classifications T (i) . The classification meets the condition: . It is called feature attribute label meta vector L (i) . Based on the single label element L (i) in the vector L (i) , expand n number of keyword labels L (i,j) with the same or similar semantics to the label L (i) and absorb them into the 1 × n dimension vector L (i)to with the initial element L (i) . This vector is defined as feature attribute label topological vector L (i)to , noted as L (i)to = L (i,1) , L (i,2) , . . . , L (i,n) . The m number of vectors L (i)to are arranged in the sequence of the feature attribute label L (i) sign to form the m × n dimension matrix, defined as the feature attribute label matrix L M , noted as L M = L (1)to , L (2)to , . . . , L (m)to T . The topological vector L (i)to and label L (i,j) in the matrix L M meet the conditions: Def 3.3 Feature attribute label word frequency matrix F q(L M ) . In the process of text mining, the appearance time for the label ∀L (i) or ∀L (i,j) of the matrix L M is defined as the feature attribute label word frequency F q(L (i) ) or Fq(L (i,j) ). As to the element mark i and j of the attribute label in the matrix L M , the m × n dimension matrix F q(L M ) with the feature attribute label word frequency Fq(L (i) ) or Fq(L (i,j) ) is defined as the feature attribute label word frequency matrix F q(L M ) . Def 3.4 Tourist feature attribute factor f (k)to , feature attribute vector F (i,j)to , feature attribute matrix F Mto and feature attribute factor weighted parameter δ (k)to . Tourists usually predetermine certain conditions, such as the budget and cost, the traveling time, tourist attraction hot index, tour purpose, and transportation mode. Define the preset conditions as the tourist feature attribute factor f (k)to . Set up a maxk × 1 dimension matrix F (i,j)to . According to the code sequence k of the feature attribute factor f (k)to , store the factor f (k)to into the element f (i)to of the vector F (i,j)to , and the vector F (i,j)to is defined as the tourist feature attribute vector. Of all the factors f (k)to , the budget and cost factor is defined as the weighted expense for the tourists (Unit: yuan). The traveling time factor is defined as the weighted traveling time for the tourists (Unit: hour). The tourist attraction hot index is defined as the weighted capability of the tourist attraction to attract tourists. The tour purpose factor is defined as the purpose for which the tourists visit the tourism city [30][31][32][33]. The transportation mode factor is defined as the transportation method that the tourists tend to use. For convenience of calculation, quantify the textual tourist feature attribute factor f (k)to into numerical data. In order to ensure that the impact of each tourist feature attribute factor on the modeling is in the same order of magnitude, the normalization is performed on the factors by the weighted parameter, defined as the feature attribute factor weighted parameter δ (k)to . Perform topology on each element F (i)to of the vector F (i,j)to and form the topology vector F (i)to ; all the vectors F (i)to form the matrix F Mto , defined as the feature attribute matrix. The matrix F Mto is the topological matrix that contains the tourists' alternative needs and requirements. Define the vector F (i,j)to and its factor f (i,j)to as follows.

•
Tourist feature attribute vector F (i,j)to : {F (1) Set up the matrix F Mto . Tourists confirm their interests by the matrix F Mto . The intelligent system confirms the nearest neighborhood historical tourists and then recommends the preferred tourist attraction classifications. Equation (1) is the founded 5 × 4 dimension matrix F Mto ; and each row of the matrix represents one vector F (i)to , and its elements are the specific quantified values of f (k)to . (1,4)to F (2,1)to F (2,2)to F (2,3)to F (2,4)to F (3,1)to F (3,2)to F (3,3)to F (3,4)to F (4,1)to F (4,2)to F (4,3)to F (4,4)to F (5,1)to F (5,2)to F (5,3)to F (5,4)to Def 3.5 Neighborhood tourist searching objective function G (T(hi),T(cu)) . According to the definition of the Euclidean distance, the neighborhood relationship model between the historical tourists and current tourists is set up, shown as Equation (2). The weighted parameter δ (i)to is brought into the objective function G (T(hi),T(cu)) as the regulatory factor, i ∈ (0, maxk] ⊂ Z + , δ (i)to ∈ (0, 1] ⊂ R + . Function G (T(hi),T(cu)) represents the close relationship between the current tourists and historical tourists.
The tourist attraction recommendation model based on the weighted collaborative filtering is set up, and it is defined as Algorithm 3. Below is the Algorithm 3 pseudo-code.

Algorithm 3
Tourist attraction recommendation algorithm based on the weighted collaborative filtering 1: Step 1: Set up tourist attraction feature attribute label word frequency matrix F q(LM) and word frequency storage vector TN (F q(LM) ) .

3:
Sub-step 2: Set up the evaluation data set F text for the historical tourists T (hi) .

4:
Sub-step 3: Search word frequency F q(LM)ro1~Fq(L(i,j)) of each row's vector L (i)to in the matrix F q(LM) . Define the total number of each label L(i, j) word frequency F q(L(i,j)) in the no. i vector L (i)to as TN (F q(LM) roi) .

5:
Sub-step 4: Form matrix F q(LM) via L (i)to . Output the vector TN (F q(LM) ) containing each row's vector L (i)to total word frequency.

6:
Step 2: Set up the tourist attraction classification interest degree set T (hi)(u) ∼ TN (F q(LM) )(u) of the historical tourists. The number of historical tourists: σ; the no. u historical tourists: T (hi)(u) .

7:
Step 3: Set up the tourist sight classification recommendation model based on the interest degree vector TN (F q(LM) )(u) of the nearest neighborhood historical tourists. 8: Sub-step 1: Confirm each interest degree vector TN (F q(LM) )(vi) and its elements of the historical tourists related to the no. v 1~vn(Lo) location points.
Sub-step 2: Set up the tourist attraction classification recommendation vector R. Sub-step 3: Define the recommendation degree function R (j) . The no.j element of vector TN (F q(LM) )(vi) relates to one kind of tourist attraction classification word frequency. The average value of the no. j element word frequencies calculated by the v n(Lo) number of neighborhood historical tourists T (hi)(vi) is defined as the recommendation function.

Sub-step 4:
Calculate R (j) value for the n (Lo) number of location points Lo(T (hi)(vi) ). Store the values in the descending order in vector R.
Step 5: Set up the precise tourist attraction recommendation algorithm based on the tourist attraction search-optimized generating space.
Sub-step 1: Confirm the starting point S t of the tour route and the tourist attraction number n (i) for the tourists. Sub-step 2: Confirm the cellular generating unit C (k) containing the starting point S t . Sub-step 3: Set up the Open list O (k) and the Closed list C (k) for the tourist attraction. Sub-step 4: Confirm the number of common edges of C (k) nei(s) containing S t(cu) and its related unit C (k) 2nei(s) and the cellular core O (k) 2nei(s) . Search O (k) 2nei(s) and store the feasible ones in R to . Delete it from the list O (k) , and store it in the list C (k) . The current tourist attraction C (k) 2nei(s) is searched and stored in the vector R to . Figure 4 is an example for Algorithm 3. Calculate the R (j) value for the historical tourists. Then, determine the closest ones for the current tourist by G (T(hi),T(cu)) . From the closest historical tourists' choice (average value), search the nearby cluster from the starting point (green point). If the nearest point a in cluster C 1 meets the needs, choose it (with square); see Figure 4a. Continue searching-if the next nearest point b in cluster C 4 meets the needs, choose it (with square); see Figure 4b. Continue searching-if the next nearest point c in cluster C 3 meets the needs, choose it (with square); see Figure 4c. If the quantity is sufficient, stop searching and obtain the precise points a, b, and c.
The above steps are modeled to form the vector R to and finally output the precise tourist attractions for the tourists. Based on the precise tourist attractions, proper tour routes should be recommended to the tourists.
ing point (green point). If the nearest point a in cluster C1 meets the needs, c square); see Figure 4a. Continue searching-if the next nearest point b in clu the needs, choose it (with square); see Figure 4b. Continue searching-if the point c in cluster C3 meets the needs, choose it (with square); see Figure 4c. I is sufficient, stop searching and obtain the precise points a, b, and c. The above steps are modeled to form the vector to R and finally outp tourist attractions for the tourists. Based on the precise tourist attractions routes should be recommended to the tourists.

The Optimal Tour Route Recommendation Model Based on Precise Tou Attraction Approach Vector Algorithm
In an optimal tour route, tourist attractions all satisfy tourists' interests. cost should be the lowest [34][35][36][37]. The total cost of visiting tourist attraction as a fixed value. Thus, the travel cost should be considered; it is determined portation mode, traveling distance, road congestion, and the traveling fee, et ists choose one transportation mode, the connecting route, traveling distan gestion condition, and the traveling fee are all different. Thus, the lowest roa index and the smallest traveling fee would be ideal [38][39][40]. Below is the fo definitions and the modeling process of the optimal tour route recommenda the precise tourist attraction approach vector algorithm.

The Optimal Tour Route Recommendation Model Based on Precise Tourist Attraction Approach Vector Algorithm
In an optimal tour route, tourist attractions all satisfy tourists' interests. The traveling cost should be the lowest [34][35][36][37]. The total cost of visiting tourist attractions can be seen as a fixed value. Thus, the travel cost should be considered; it is determined by the transportation mode, traveling distance, road congestion, and the traveling fee, etc. When tourists choose one transportation mode, the connecting route, traveling distance, road congestion condition, and the traveling fee are all different. Thus, the lowest road congestion index and the smallest traveling fee would be ideal [38][39][40]. Below is the fourth group of definitions and the modeling process of the optimal tour route recommendation based on the precise tourist attraction approach vector algorithm. Def 4.1 Tourist attraction neighborhood section Zo (R to(i), R to(j) ) . Two arbitrary tourist attractions R to(i) and R to(j) form a road section, defined as Zo (R to(i), R to(j) ) . Def 4.2 Neighborhood section edge weight model g(Zo (R to(i), R to(j) ) ) and the global tour route weight iteration model G(Zo (R to(i), R to(j) ) ). The model formed by the three constraint factors of the shortest travel distance ξ 1(R to(i) ,R to(j) ) (Unit: km), the road congestion index ξ 2(R to(i) ,R to(j) ) and the traveling fee ξ 3(R to(i) ,R to(j) ) (Unit: Ұyuan) to determine the neighborhood edge weight value is defined as the neighborhood section edge weight model. Usually, the factors are normalized into (0, 1). Set the amended parameter of the constraint factor ξ (i)(R to(i) ,R to(j) ) as ε (i)(R to(i) ,R to(j) ) . Then, Equation (3) shows the neighborhood section weighted edge weight model g(Zo (R to(i), R to(j) ) ).
In Equation (3), the factor ξ 1(R to(i) ,R to(j) ) is determined by the approaching vector algorithm. The factor ξ 2(R to(i) ,R to(j) ) is obtained from the city statistical transportation information data. The traveling fee factor ξ 3(R to(i) ,R to(j) ) is determined by the chosen transportation mode τ (R to(i) ,R to(j) ) and the actual cost generated by the travel process in the neighborhood section Zo (R to(i), R to(j) ) . If one tour route is formed by the z number of neighborhood sections Zo (R to(i), R to(j) ) connected by the starting point R to(0) and each terminal point R to(i) ,i ∈ (0, n] ⊂ Z + , the integral route model formed by the connecting z number of neighborhood sections Zo (R to(i), R to(j) ) is defined as the global tour route weight iteration model G(Zo (R to(i), R to(j) ) ), shown in Equation (4). The optimal solution of the model G(Zo (R to(i), R to(j) ) ) is the global minimum value minG(Zo (R to(i), R to(j) ) ).
Def 4.3 Tourist attraction geospatial directed weighted graph D. Take all the element tourist attractions R to(i) in the vector R to as the vertexes of the graph. Take the neighborhood section Zo (R to(i), R to(j) ) between two tourist attractions as the directed edge, and each edge's weight value is set as g(Zo (R to(i), R to(j) ) ). The closed graph D =< V, A > that is formed by the vertex set V = R to and weight edge set A = Zo (R to(i), R to(j) ) is defined as the tourist attraction geospatial directed weighted graph D.
Def 4.4 The approaching model f (Zo (R to(i), R to(j) ) ) of the tourist attraction neighborhood section Zo (R to(i), R to(j) ) . When the tourists travel between R to(i) and R to(j) , the shortest path is the road section combination that most closely approaches one certain fitting function curve in the trend between two points [41][42][43]. The R to(i) and R to(j) are set as the terminal points to fit the approaching function f (Zo (R to(i), R to(j) ) ), defined as the approaching model of the section Zo (R to(i), R to(j) ) . The order of the function is determined by the algorithm complexity and the actual geospatial data. It intersects with certain city roads between the points R to(i) and R to(j) . Equation (5) is the approaching model of the tourist attraction neighborhood section Zo (R to(i), R to(j) ) , in which p is the function order, a (p) and b are the function coefficients, and the footnote R to is the selected point set.
Def 4.5 The access road set L and the road intersect point set K. Divide the city roads into the horizontal road and the vertical road. The horizontal road set is confirmed as L (ro) , and its element is the road l (ro,i) . The vertical road set is confirmed as L (co) , and its element is the road l (co,j) . The intersection point is noted as K (i,j) , in which the i is the mark for the horizontal road l (ro,i) , and the j is the mark for the vertical road l (co,j) . If the two roads are both horizontal or vertical, the intersection point is noted as K s(i,j) . Def 4.6 The approaching point set P. The function curve f (Z o(R to(i) ,R to(j) ) ) on the tourist attraction neighborhood section Z o(R to(i) ,R to(j) ) intersects with certain horizontal roads l (ro,i) or l (co,j) to form intersection points P ( f ,l)(i) , defined as the approaching point set P. The shortest route is searched using the method.
Set up f (Z o(R to(i) ,R to(j) ) ). Quantify set L, including the elements l (ro,i) and l (co,j) . The quantify function of the horizontal and vertical road element is f (l(ro,i)) and f (2) (l(co,j)) . The intersection points between ∇ f (Z o(R to(i) ,R to(j) ) ) and f (1) (l(ro,i)) or ∇ f (Z o(R to(i) ,R to(j) ) ) and f (2) (l(co,j)) form the set P(Z o(R to(i) ,R to(j) ) ) of the shortest route. The intersection points of the function f (1) (l(ro,i)) and f (2) (l(co,j)) form the set K(Z o(R to(i) ,R to(j) ) ), satisfying Equation (6).
Visualize all the elements in Figure 5. Figure 5a shows the relationship between the connecting lines formed by certain tourist attractions and the city roads. Figure 5b shows the intersection point set. Figure 5c is the abstracted intersection point set's geospatial distribution of the approaching algorithm between two tourist attractions. Figure 5d shows the searching direction of the approaching vector.
Visualize all the elements in Figure 5. Figure 5a shows the relationship between the connecting lines formed by certain tourist attractions and the city roads. Figure 5b shows the intersection point set. Figure 5c is the abstracted intersection point set's geospatial distribution of the approaching algorithm between two tourist attractions. Figure 5d shows the searching direction of the approaching vector. Set up the closest approach vector algorithm.
Step 1 Take the closest neighborhood approach points ( , )(1)  Set up the closest approach vector algorithm.
Step 1 Take the closest neighborhood approach points P ( f ,l) (1) and P ( f ,l)(maxi) for the terminal points R to(i) and R to(j) in the set P(Z o(R to(i) ,R to(j) ) ).
(i) If the S (3,1) is the minimum one, retain the access road of the S (3,1) and its approach vector A (3,1) . (ii) If the S (3,2) is the minimum one, retain the access road of the S (3,2) and its approach vector A (3,2) . (iii) If the S (3,3) is the minimum one, retain the access road of the S (3,3) and its approach vector A (3,3) . 4 Continue searching: (i) If searching is complete, return to step 1 ~3 and continue searching the route S (i−1,u) between the point P ( f ,l) (1) and P ( f ,l)(i) . Choose the access road of the minS (i−1,u) and A (i−1,u) . (ii) If searching is not complete, continue searching the route S (maxi−1,u) between the point P ( f ,l) (1) and P ( f ,l)(maxi) . Choose the access road of the minS (maxi−1,u) and A (maxi−1,u) . Output minS (maxi−1,u) as the shortest access road. 5 Confirm the set ∇P (Z o (R to(i) ,R to(j) )) according to the route minS (maxi−1,u) .
Due to the constraints on the traveling time, physical condition and traveling cost, the number of tourist attractions is no more than 10. When the node number is n = 10, the maximum operation time complexity O(n) is 3.62 s. Thus, the algorithm time is feasible, and the exhaustive method on the heap sort is used to search the global optimal solution minG(Z o(R to(i) ,R to(j) ) ). The minG(Z o(R to(i) ,R to(j) ) ) is stored in the last element of the last level in the maximum heap.

Experimental Results and Data Analysis
For the experiment, 20 typical tourist attractions in Zhengzhou city's downtown area are selected. They are divided into four categories: T (1) : Venue and memorial; T (2) : Park and greenland; T (3) : Amusement park; T (4) : Leisure shopping. The experiment is performed on a real-world environment; the original basic data such as longitude and latitude data, the data of road distance, travel time, traveling fee, and road congestion index, etc., are obtained from the Zhengzhou city's geospatial database, the GIS website and electronic maps [44][45][46]. Thus, the final results are obtained based on real-world data.

The Basic Information Data of the Tourist Attractions and Location Points
The latitude and longitude website GPSspg is used to obtain the coordinates of the tourist attractions and location points, shown in Table 1.

The Basic Information Data of the Tourist Attractions and Location Points
The latitude and longitude website GPSspg is used to obtain the coordinates of the tourist attractions and location points, shown in Table 1.

Data and Result Analysis
The tourist attractions are all the typical ones in Zhengzhou city. They are distributed discretely and connected by the city roads. The selection process is fair and balanced in that the quantity of each classification is commensurate. The tourist attractions are all surrounded by different levels of roads; thus, there are sufficient location points. The latitude and longitude of all the points are collected to quantify their locations. The coordinates cause the points to have spatial attributes. They are used in the model to generate the cellular space. In regard to data collection and point confirmation, the original data set selected in the experiment is accurate and feasible and contains real-world data. Therefore, this experiment is a real-world-based experiment and not a simulation experiment, and its output result could be directly used for tourist attraction and tour route recommendation.

The Output Result and Analysis of the Tourist Attraction Spatial Clusters
The tourist attraction spatial cluster C l(u) has the basic structural set-up, with a cellular core O (k) , cellular unit C (k) and the formed cellular space C. It is obtained by multiple searching processes. The spatial cluster C l(u) is generated to search the optimal tourist attractions in terms of spatial distance.

The Output Result of the Tourist Attraction Cluster
According to the tourist attraction cellular unit set O (k) and the location point set P (v) , the tourist attraction cellular space generating algorithm is performed and the Closed list C l(i) that is used to store the structural location point P (v)C(k) of the unit C (k) with the cellular core O (k)m in the form of level storage is confirmed, shown as the Table 2. The tourist attraction cellular space C is generated, as shown in Figure 7a, in which the number represents the tourist attraction's code. The tourist attraction clustering algorithm based on geospatial feature attributes is set up and forms the clusters on the space C. After n = 8 iterations, the tourist attraction space cluster C l(u) are output, as shown in Figure 7b. The generated clusters are: , O (9) , O (16) , O (20) ; (10) , O (11) , O (17) . Table 2. The Closed list C l(i) , which stores the structural location point P (v)C(k) of the unit C (k) with the cellular core O (k)m .

The Data Result Analysis
When the starting point is confirmed, the nearest tourist attractions that conform to the tourists' interests are searched. The tourist attraction cellular units that have a common edge have two common location points. The space C and clusters are generated, and there are four spatially adjacent clusters, in which the cluster

The Data Result Analysis
When the starting point is confirmed, the nearest tourist attractions that conform to the tourists' interests are searched. The tourist attraction cellular units that have a common edge have two common location points. The space C and clusters are generated, and there are four spatially adjacent clusters, in which the cluster C l(1) includes 4 tourist attractions, the cluster C l(2) includes 7 tourist attractions, the cluster C l(3) includes 6 tourist attractions, the cluster C l(4) includes 3 tourist attractions. As shown in the figures, the tourist attractions in the same cluster have a close spatial relationship and high intimacy; conversely, the attractions that are far apart have a poor spatial relationship and low intimacy. The adjacency relationship between the tourist attractions within one cluster or in different clusters has no correlation to the clusters, and tourist attractions in the same cluster might be adjacent or might not be adjacent; in addition, the tourist attractions in different clusters might be adjacent or might not be adjacent.

The Output Result and Analysis of the Tourist Attraction Recommendation Based on Weighted Collaborative Filtering Algorithm
The nearest historical tourists for the current tourist are searched. By calculating the recommendation degree of the nearest historical tourists, the algorithm outputs the priority vector of the tourist attraction classification and then confirms the precise tourist attraction according to the tourists' needs and interests.

The Tourist Attraction Recommendation Result Based on the Weighted Collaborative Filtering Algorithm
Baidu is used to obtain the textual data of the 20 tourist attractions and the crawler technique is used to obtain the evaluation data, including the historical tourists' feature attributes f (k)to and the tourist attraction classification feature labels L (i,j) . The list of f (k)to is used to set up the feature attribute matrix F Mto . The objective function G (T (hi) ,T (cu) ) values are calculated between the current tourist and historical tourists. The weighted coefficients are δ (1)to = 0.01, δ (2)to = 0.1, δ (3)to = 1.0, δ (4)to = 1.0, δ (5)to = 1.0. The data of the 10 nearest neighborhood historical tourists are selected, as shown in Table 3, including the feature attribute factors of the historical tourists and the current tourist, as well as the searching objective function G (T (hi) ,T (cu) ) values. Figure 8a-e show the fluctuating curves of the five factors f (k)to confirmed by the current tourist T (cu)to and the 10 nearest neighborhood historical tourists T (hi)to . Figure 8f shows the fluctuating curve of the searching objective function G (T (hi) ,T (cu) ) in the code sequence by the current tourist T (cu)to and the 10 nearest neighborhood historical tourists T (hi)to . Table 3. The feature attribute factors f (k)to of the historical tourists T(hi) and the current tourist T(cu), as well as the searching objective function G (T (hi) ,T (cu) ) values.   Table 4.     Table 5. (e) shows the four curves together. (f) shows the comparison of ( ) j R .

The Analysis of the Data Results
The generated nearest neighborhood historical tourists have feature attribute factors that have a small discrepancy. As shown in Figure 8, the traveling costs of the neighborhood tourists have a very tiny discrepancy, and it is displayed as a fluctuating curve with waved weighted values between 0.9 and 1.1. This illustrates that the tendency value for the tour process in the tourist attributes ranges between CNY 90 yuan and 110 yuan.(CNY: Chinese monetary unit) Regarding the attribute of traveling time, the weighted values of the traveling time requirement for the neighborhood historical tourists vary from 0.12 to 0.18. This illustrates that the preferred traveling time of the neighborhood historical tour-  Table 4. Table 4. The statistical data and R (j) of tourist attraction classification topological label vector for neighborhood historical tourists.

n(TN(Fq(L M ) (vi,1) )) n(TN(Fq(L M ) (vi,2) )) n(TN(Fq(L M ) (vi,3) )) n(TN(Fq(L M ) (vi,4) ))
T The recommended tourist attraction classification is determined by the output recommendation degree function R (j) based on the selected tourist attraction classification feature labels L (i,j) of multiple historical tourists. The experiment chooses the topological vector of each tourist attraction classification word frequency L (1)to : history, science, venue, memorial, museum; L (2)to : sightseeing, flower, park, reenland, scenery; L (3)to : swim, sports, playground, theme park, children animation; L (4)to : shop, commercial complex, leisure, restaurant. The tourist attraction feature attribute label matrix L M is set up. Via the matrix L M , the tourist attraction feature attribute label word frequency matrix F q (L M ) of the nearest neighborhood historical tourists is formed. Then, the recommendation degree R (j) is output, as shown in Table 4. Figure 9a-d show an example of tourist attraction classification label word frequency and its related recommendation degree R (j) in the nearest neighborhood historical tourists' evaluation data. In each figure, the last red point of the curve represents the degree R (j) . Figure 9e presents a comparison of the different tourist attraction classification word frequencies and the degrees R (j) of the historical tourists. Figure 9f shows a comparison of each tourist attraction classification recommendation degree R (j) . The priority vector R = T (2) , T (4) , T (1) , T (3) is obtained. Regarding the sample tourist, when he obtains the vector R, he makes a decision that, in one day, he will visit two tourist attractions of the cluster T (2) , one tourist attraction of the cluster T (4) , and one tourist attraction of the cluster T (1) . The coordinates of the starting point St are (113.658,34.774), shown as the white circle with the letter S in Figure 7b. The vector R to = O (2) , O (7) , O (16) , O (20) is output.   Table 5. (e) shows the four curves together. (f) shows the comparison of ( ) j R .

The Analysis of the Data Results
The generated nearest neighborhood historical tourists have feature attribute factors that have a small discrepancy. As shown in Figure 8, the traveling costs of the neighborhood tourists have a very tiny discrepancy, and it is displayed as a fluctuating curve with waved weighted values between 0.9 and 1.1. This illustrates that the tendency value for the tour process in the tourist attributes ranges between CNY 90 yuan and 110 yuan.   Table 5. (e) shows the four curves together. (f) shows the comparison of R (j) . Table 5. The constraint factor ζ (i)(R to(i) ,R to(j) ) , correction parameter ε (i)(R to(i) ,R to(j) ) , and weight value g(Z o (R to(i) , R to(j) )) of each tourist attraction adjacency section Z o (R to(i) , R to(j) ) in different transportation modes τ(R to(i) , R to(j) ).

The Analysis of the Data Results
The generated nearest neighborhood historical tourists have feature attribute factors that have a small discrepancy. As shown in Figure 8, the traveling costs of the neighborhood tourists have a very tiny discrepancy, and it is displayed as a fluctuating curve with waved weighted values between 0.9 and 1.1. This illustrates that the tendency value for the tour process in the tourist attributes ranges between CNY 90 yuan and 110 yuan.(CNY: Chinese monetary unit) Regarding the attribute of traveling time, the weighted values of the traveling time requirement for the neighborhood historical tourists vary from 0.12 to 0.18. This illustrates that the preferred traveling time of the neighborhood historical tourists is 1.2-1.8 h within 2 h. The preferred tourist attraction hot indexes of the neighborhood historical tourist vary from 0.36 to 0.65, centering at 0.50. This illustrates that the historical tourists' preference for the popular tourist attractions is average, and the tourist attraction hot index is not the determined factor in choosing a tourist attractions. Regarding the selection of a tourist attraction destination, the values 0.50 and 0.75 appear frequently, i.e., the main purpose of traveling tends to be health care or vacation. Regarding the selection of the transportation mode, the current tourist and historical tourists all choose cycling, and the weighted value is 0.50. The searching objective function values calculated by the feature attribute factor range from 0.054 to 0.287, and the values are all relatively small. This illustrates that the attributes of the current tourist and historical tourists are similar. These historical tourists' interests can reflect the current tourist's interests.
The tourist attraction classification label word frequency of each neighborhood historical tourist fluctuates with different values, but they are generally close. The word label frequency for the first, the second and the fourth classification is relatively high; the average value is 20.9, 29.2, and 23.1, respectively. This illustrates that the neighborhood tourists' preferences regarding these classifications are high. Thus, the preferred tourist attraction classifications of the neighborhood historical tourists are the park and greenland, venue and memorial, and leisure shopping, which will be recommended.

The Recommendation Result and Analysis on the Optimal Tour Route Based on the Precise Tourist Attraction Approach Vector Algorithm
The tourist attraction geospatial directed weighted graph D is output, as shown in Figure 10. The edges' weight values are calculated and the global route weight iteration value G(Z o(R to(i) ,R to(j) ) ) of each tour route and the optimal tour route are output.
The tourist attraction classification label word frequency of each torical tourist fluctuates with different values, but they are generally c frequency for the first, the second and the fourth classification is relat age value is 20.9, 29.2, and 23.1, respectively. This illustrates that the ists' preferences regarding these classifications are high. Thus, the pre tion classifications of the neighborhood historical tourists are the p venue and memorial, and leisure shopping, which will be recommen

The Recommendation Result and Analysis on the Optimal Tour Route Tourist Attraction Approach Vector Algorithm
The tourist attraction geospatial directed weighted graph D is Figure 10. The edges' weight values are calculated and the global ro value  are output. The five valu sections' weight for one tour route, shown in Table 6. Each tour route terminal point are both the t S . The representation method for each to representing the tour route Figures 11-13 shows dency of the weight value

The Output Result of the Optimal Tour Route Recommendation Based on the Precise Tourist Attraction Approach Vector Algorithm
The constraint factors ζ (i)(R to(i) ,R to(j) ) and parameters ε (i)(R to(i) ,R to(j) ) of each section Z o(R to(i) ,R to(j) ) in different transportation modes ζ (3)(R to(i) ,R to(j) ) , and the weight value g(Z o(R to(i) ,R to(j) ) ) for each section Z o(R to(i) ,R to(j) ) , are calculated, as shown in Table 5. The τ (R to(i) ,R to(j) ) = 1 represents cycling, the τ (R to(i) ,R to(j) ) = 2 represents the use of a taxi and the τ (R to(i) ,R to(j) ) = 3 represents the use of the public bus. The weight value g(Z o(R to(i) ,R to(j) ) ) for each section Z o(R to(i) ,R to(j) ) of each tour route in different transportation modes, as well as the global weight iteration value G(Z o(R to(i) ,R to(j) ) ) are output. The five values represent the five sections' weight for one tour route, shown in Table 6. Each tour route's starting point and terminal point are both the S t . The representation method for each tour route is O (1,2,3,4) , representing the tour route Figures 11-13 shows the fluctuating tendency of the weight value g(Z o(R to(i) ,R to(j) ) ) for each section Z o(R to(i) ,R to(j) ) . According to the searching process of the global optimal solution minG(Z o(R to(i) ,R to(j) ) ) and the difference value minG(Z o(R to(i) ,R to(j) ) ), the formed maximum heap T is output, as shown in Figure 14. According to the result of Table 6 and Figure 14, the global optimal solution minG(Z o(R to(i) ,R to(j) ) ) and the difference value minG(Z o(R to(i) ,R to(j) ) ) and the optimal tour route are output.

The Data Result Analysis
In Figure 10, the edge weight reflects the generated motive benefit value when the tourists travel between two points. The smaller the edge weight is, the lower the traveling cost and the higher the tourists' motive benefit values will be. The positive and the negative direction of the edge represents the travel direction. Since the geographic information and traffic information are not influenced by the direction, the weight values will not be influenced by the direction. Table 6. Tour route section weight and global weight iteration value in different transportation modes.   Table 6 under the condition of transportation mode of cycling 1   . Figure 11. The increasing tendency of the weight g(Z o(R to(i) ,R to(j) ) ) of each tour route tourist attraction adjacency section Z o(R to(i) ,R to(j) ) under the condition of transportation mode of cycling. The figure (a-x) represent the No.1~No.24 tour routes shown in the Table 6 under the condition of transportation mode of cycling τ = 1.   Table 6 under the condition of transportation mode of using a taxi 2   . Figure 12. The increasing tendency of the weight g(Z o(R to(i) ,R to(j) ) ) of each tour route tourist attraction adjacency section Z o(R to(i) ,R to(j) ) under the condition of transportation mode of using a taxi. The figure (a-x) represent the No.1~No.24 tour routes shown in the Table 6 under the condition of transportation mode of using a taxi τ = 2.   Table 6 under the condition of transportation mode of using the public bus 3   . Figure 13. The increasing tendency of the weight g(Z o(R to(i) ,R to(j) ) ) of each tour route tourist attraction adjacency section Z o(R to(i) ,R to(j) ) under the condition of transportation mode of using the public bus. The figure (a-x) represent the No.1~No.24 tour routes shown in the Table 6 under the condition of transportation mode of using the public bus τ = 3.  Table 6 under the condition of transportation mode of using the public bus

The Data Result Analysis
In Figure 10, the edge weight reflects the generated motive benefit value when the tourists travel between two points. The smaller the edge weight is, the lower the traveling cost and the higher the tourists' motive benefit values will be. The positive and the negative direction of the edge represents the travel direction. Since the geographic information and traffic information are not influenced by the direction, the weight values will not be influenced by the direction.
According to the calculation result, when the tourists choose cycling, the optimal tour routes are  Figures 11-13 show that, for different transportation modes, each tour route's output neighborhood section weight fluctuates throughout the entire traveling process and reaches the maximum value at the terminal point. The fluctuating waves for each tour route have different shapes. When cycling, the weight value ranges from 0 to 3.5. When taking a taxi, the weight value ranges from 0 to 12.0. When using the public bus, the weight value ranges from 0 to 6.0.
In the maximum heap, the global weight iteration values appear at the last two elements in the last level. In Figure 14, the elements storing the global weight iteration values are shown in red and relate to the optimal tour routes under the related transportation modes.

The Comparison of the Algorithms
Three electronic maps are chosen as the control group. The electronic maps include the Baidu map, Gaode map and Tengxun map. The embedded algorithms are defined as the Baidu Algorithm (BA), Gaode Algorithm (GA), and Sougou Algorithm (SA), and the proposed algorithm is referred to as PA.

The Comparison Result of the Algorithm Data
The searching methods of the algorithms are different. The proposed algorithm searches for the shortest path by using the approach function points, while the traditional maps frequently search the main roads. Therefore, when generating the directed weighted graph, the weight g(Z o(R to(i) ,R to(j) ) ) of the section Z o(R to(i) ,R to(j) ) differs from each other since the shortest distance factor ζ (1)(R to(i) ,R to(j) ) , road congestion index ζ (2)(R to(i) ,R to(j) ) , and the traveling fee ζ (3)(R to(i) ,R to(j) ) are different; thus, the same section Z o(R to(i) ,R to(j) ) will generate different weight values. This will cause a difference in the optimal tour route.

The Data Result Analysis
For the three transportation modes, the neighborhood section weights of the optimal route in each algorithm fluctuate to different degrees. When the tourists choose cycling, the BA experiences the largest fluctuation, followed by the GA and SA; the PA has the smallest fluctuation. The weights vary from 0 to 3.5. When the tourists choose to use a taxi, the fluctuation is roughly the same, and the weights vary from 0 to 12.0. When the tourists choose to use the public bus, the BA and GA have relatively large fluctuations, followed by the SA; the PA has the smallest fluctuation. The weights vary from 0 to 6.0. In this aspect, the PA has better stability than the control group algorithms.
When the tourists choose cycling, the global optimal solutions of BA, GA, and SA are larger than the PA, in which the BA, GA, and SA are larger than the PA for 0.148, 0.218, and 0.178, respectively. When the tourists choose to use a taxi, the global optimal solutions of BA, GA, and SA are larger than the PA, in which the BA, GA, and SA are larger than the PA for 0.655, 0.430, and 0.530, respectively. When the tourists choose to use the public bus, the global optimal solutions of BA, GA, and SA are larger than the PA, in which the BA, GA, and SA are larger than the PA for 0.370, 0.400, and 0.280, respectively. Regarding the comparison data, the control group algorithms' global optimal solution values are all larger than that of the proposed algorithm, which illustrates that the output global optimal solution value of the proposed algorithm is the smallest, and the tourists will spend the least traveling time and money to achieve the best motive benefit satisfaction.
When the tourists choose cycling, the GA requires the most traveling time, followed by the SA and BA; the lowest time is needed for the PA. When the tourists choose to use a taxi, the BA requires the most traveling time, followed by the GA and SA; the least time is required for the PA. When the tourists choose to use the public bus, the SA requires the most traveling time, followed by the GA; the least time is needed for the PA and BA. The PA is the least time-consuming, except when the tourist chooses to use the public bus, for which the PA is equally as time-consuming as the BA. On the whole, the proposed algorithm is the optimal one.

The Data Result Analysis
For the three transportation modes, the neighborhood section weights of the optimal route in each algorithm fluctuate to different degrees. When the tourists choose cycling, the BA experiences the largest fluctuation, followed by the GA and SA; the PA has the smallest fluctuation. The weights vary from 0 to 3.5. When the tourists choose to use a taxi, the fluctuation is roughly the same, and the weights vary from 0 to 12.0. When the tourists choose to use the public bus, the BA and GA have relatively large fluctuations, followed by the SA; the PA has the smallest fluctuation. The weights vary from 0 to 6.0. In this aspect, the PA has better stability than the control group algorithms.
When the tourists choose cycling, the global optimal solutions of BA, GA, and SA are larger than the PA, in which the BA, GA, and SA are larger than the PA for 0.148, 0.218, and 0.178, respectively. When the tourists choose to use a taxi, the global optimal solutions of BA, GA, and SA are larger than the PA, in which the BA, GA, and SA are larger than the PA for 0.655, 0.430, and 0.530, respectively. When the tourists choose to use the public bus, the global optimal solutions of BA, GA, and SA are larger than the PA, in which the BA, GA, and SA are larger than the PA for 0.370, 0.400, and 0.280, respectively. Regarding the comparison data, the control group algorithms' global optimal solution values are all larger than that of the proposed algorithm, which illustrates that the output global optimal solution value of the proposed algorithm is the smallest, and the tourists will spend the least traveling time and money to achieve the best motive benefit satisfaction.
When the tourists choose cycling, the GA requires the most traveling time, followed by the SA and BA; the lowest time is needed for the PA. When the tourists choose to use a taxi, the BA requires the most traveling time, followed by the GA and SA; the least time is required for the PA. When the tourists choose to use the public bus, the SA requires the most traveling time, followed by the GA; the least time is needed for the PA and BA. The PA is the least time-consuming, except when the tourist chooses to use the public bus, for which the PA is equally as time-consuming as the BA. On the whole, the proposed algorithm is the optimal one.

The Proposed Algorithm and Other Recommendation Algorithms' Difference Analysis
The proposed recommendation algorithm (PRA) and other recommendation algorithms (ORA) display great discrepancies.
The first discrepancy is the different algorithm essence. The PRA's essence is to search the tourist attractions that best match tourists' interests, and then to search the optimal tour route, which is different from ORA. The ORA's essence is to make a fuzzy recommendation based on historical data-for instance, recommendations based on users, based on objects, based on content, and based on association rules. Recommendations based on users recommend related users' favorite objects. Recommendations based on objects recommend the user's previous favorite objects. Recommendations based on content are based on users' evaluation data. Recommendations based on association rules use probability to recommend objects. Different in essence, the PRA directly obtains tourists' precise interest data and searches tourist attractions one by one; it then searches the tour route along the road; The second discrepancy is the different objective. In order to increase the accuracy, the ORA needs to solve the problems associated with cold start, data sparsity, etc. However, the PRA does not aim to solve these problems. Its aim is to obtain the best match between tourists' interests and the tourist attraction attributes, as well as to search the optimal tour route; The third discrepancy is the different accuracy degree. The PRA is based on the interest data directly generated by the tourists; thus, the recommended tourist attractions are guaranteed to satisfy their interests. This is the advantage of the PRA. The ORA is still a fuzzy recommendation in essence, which can only increase the accuracy, but it is unable to thoroughly match tourists' precise interests; The fourth discrepancy is the different principles and algorithm process. Due to the differences in essence and objectives, the realization process of the PRA is different from that of the ORA. Its main steps include the searching of precise tourist attractions and the searching of the optimal tour route, which is more accurate than the ORA, since the ORA usually directly recommends a tour route previously visited by historical tourists. The mode has relatively low accuracy and cannot meet the individualized needs.

The Discussion on the Method Execution and Other Use Cases
The aim of this study is to propose an intelligent algorithm for a smart tourism recommendation system; thus, the proposed algorithm can automatically realize tourist attraction and tour route recommendations. Regarding the data required to execute the algorithm, the tourist attraction data, attribute data, city geospatial information data, traffic information data, and the website evaluation data are fixed, and they form the algorithm's underlying database. Meanwhile, the tourists' interest data and the starting point of the tour are two variables, and they are key factors to determine the recommended results. When an arbitrary variable changes, the recommended results will alter accordingly because, under the control of the inner algorithm, the initial variable changes will cause different intermediate results in the searching process. Based on the experiment's basic data, other use cases are discussed as follows.
The first use case is the condition that the tourist's interest data change, but the starting location does not change. A tourist tends to choose labels from the word frequency vectors L (3)to : swim, sports, playground, theme park, children animation and L (4)to : shop, commercial complex, leisure, restaurant. He chooses two tourist attractions from each classification, while the other two vectors L (1)to and L (2)to are labeled 0. Additionally, the starting location (113.658, 34.774) does not change. The final recommended tourist attractions and tour routes for the different transportation modes are S t O (12) O (20) O (17) O (18) S t and S t O (18) O (17) O (20) O (12) S t ; The second use case is the condition that the tourist's interest data do not change, but the starting location changes. Under this condition, the recommendation system outputs R = T (2) , T (4) , T (1) , T (3) , while the tourist's interest data do not change; two tourist attractions of the cluster T (2) , one tourist attraction of the cluster T (4) and one tourist attraction of the cluster T (1) . If the starting point changes to location (113.644, 34.699), the recommended tourist attractions and tour routes for the different transportation modes are S t O (13)  The third use case is the condition that both the tourists' interest data and starting point change. A tourist tends to choose labels from the word frequency vectors L (1)to : history, science, venue, memorial, museum; L (2)to : sightseeing, flower, park, greenland, scenery. He chooses two tourist attractions from each classification, while the other two vectors L (3)to and L (4) From the use cases, it can be concluded that when one variable changes, the finally output tourist attraction and tour route will change accordingly. This confirms that the proposed algorithm is feasible and practical for a smart recommendation system.

Conclusions on the Problems Solved by the Proposed Algorithm
As to Problem (1), previous research focused on the algorithm itself, such as the algorithm efficiency, but the aim of the proposed method is different. It focuses on searching the very tourist attractions and optimal tour route that best match tourists' interests, and this is the key aspect when setting up the algorithm process; in addition, its essence is different from that of other recommendation methods. In Section 4.6, a comparison between the proposed method and other recommendation methods is presented based on the entire research. As to Problem (2) and Problem (3), Algorithm 1 is set up in Section 2.1.1, the Algorithm 2 in Section 2.1.2, Algorithm 3 in Section 2.2, and the searching algorithm in Section 3 to solve the problems of precisely matching the tourist attractions to the tourists' interests, searching the tourist attractions and searching the tour routes. The experiment chooses the city of Zhengzhou as an example and extracts the basic data of its tourist attractions, traffic information data, and geospatial data. In Section 4.3, the recommendation degree is calculated from the chosen interest labels and the tourist attraction classification priority sequence is recommended. According to the tour starting point, the four optimal tourist attractions that best match tourists' interests are obtained. This experiment proves that the tourist attractions recommended by the proposed algorithm completely match tourists' interests with optimal feature attributes, matching degree, and locations. In Sections 4.4 and 4.5, the optimal tour routes for different transportation modes are output, which proves that they have advantages regarding the motive benefit, time consumption, etc. Moreover, Problem (2) and Problem (3) are well solved. Regarding the Problem (4), the recommended tour routes are based on the searching algorithm developed in Section 3, and through Sections 4.4 and 4.5, this method is proven to have high accuracy, as it is directly based on tourists' individualized interest data, contrasting the traditional recommendation mode with the fuzzy method in which historical tour routes are recommended to the tourists. Problem (4) is also well solved.

Conclusions
The current tourist attraction and tour route recommendation system experiences problems. Aimed at addressing these problems, this paper proposes an algorithm. The tourist attraction cellular generating space and the tourist attraction clustering model are set up. The aim is to recommend the optimal tourist attractions for the tourists. This paper also proposes a tourist attraction recommendation algorithm based on the weighted collaborative filtering algorithm. It also involves an optimal tour route recommendation model based on the precise tourist attractions using different transportation modes. This model uses the function approach to search for the shortest path. The proposed algorithm can reduce the tourists' traveling time and costs. When the tourists choose certain modes, the output optimal routes will be different. An experiment is performed to verify the feasibility and advantages of the proposed algorithm.
This paper does not focus on the problem of cold start, data sparsity, etc. The main purpose is to study the precise matching and precise recommendations rather than to improve the algorithm's efficiency. Another innovation of the paper is the proposed function vector approach algorithm, which is used to search for the shortest path and finally reduce the tourists' traveling time and costs.
This algorithm could be used as an embedded algorithm for smart tourism recommendation system that is developed, managed, and operated by the tourism sectors and government. Then, the system is ultimately used by tourists on the website. When tourists use the system website, they can input the basic interests and needs to the system, and then it will directly recommends optimal tourist attractions and tour routes for tourists, which is automatic and intelligent. Though the proposed algorithm has advantages, it still has some limitations, which should be further studied in the future. First, the proposed algorithm is based on website big data: the accuracy of the big data mining should be improved, which will help to make the labels more accurate and better match the tourists' interests, improving the recommendation accuracy. Second, the study area of the proposed algorithm is the downtown area of the city, and the transportation modes are limited. In a future study, the study area could be expanded to the subordinate counties and districts of the city, and the transportation modes could be diversified.

Data Availability Statement:
The data presented in this study are available from the author upon reasonable request.