# Personalized Recommendation Algorithm of Tourist Attractions Based on Transfer Learning

Authors: Liu Xueting
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

With the development of information technology and the popularity of the Internet, the data on the network is growing exponentially. Information overload has become a significant issue for consumers seeking information. A recommendation system was created to detect users’ interests from huge amounts of data and to suit users’ specific information needs. Traditional collaborative filtering recommendation mostly uses scoring data for a recommendation, which has the problem of sparse data, which limits the performance of the recommendation system. On this basis, this paper studies the personalized recommendation algorithm of scenic spots with deep migration. Through the analysis of collaborative filtering recommendation methods, it is found that the traditional collaborative filtering methods only use scoring data for a recommendation, which has the problem of sparse data. Based on the vectorization of user interest, the similarity of user preference is calculated, and the matrix decomposition is carried out in cooperation with user implicit feedback, to integrate the knowledge transfer information into the matrix decomposition model, and make up for the lack of considering the attribute information of scenic spots in the matrix decomposition algorithm, and alleviate the problem of data sparsity. The findings of comparative trials suggest that the personalized scenic location recommendation approach proposed in this study, which is based on the depth migration algorithm, is effective. Compared with the benchmark recommendation method, the recommendation accuracy and recall rate has been improved to a certain extent.


---

## Body

## 1. Introduction

In recent years, the rapid development of cloud computing, the Internet of things, mobile Internet, artificial intelligence, and other technologies has brought a lot of convenience to people’s work and life. In terms of tourism and leisure, users can easily search for tourism information through the Internet, purchase tourism products and services, and enjoy the convenience brought by information technology. However, when facing the explosive growth of network information, it is difficult for users to make efficient choices. The emergence of a recommendation system provides an effective way to solve information overload. The recommendation system is a subset of the information filtering system. It aims to predict users’ preferences for goods according to users’ preferences, habits, personalized needs, and characteristics of goods, recommend the most appropriate goods for users, help users make decisions quickly, and improve user satisfaction. The value of a recommendation system is that it can provide as appropriate choices and recommendations as possible without requiring users to provide the content they want.With the rapid development of the national economy, tourism shows a prosperous trend. Tourism information is an important factor for people to determine the destination of tourism, so it is very important to obtain tourism data. The Internet provides a large amount of tourism information. People are used to understanding scenic spot information from the Internet before traveling. At present, tourism websites mainly display information on tourist attractions, and there is no personalized information customization service. Therefore, it is necessary to organize, process, and analyze these data and mine useful information. On the tourism website, the detailed information page of scenic spots contains a large amount of scenic spot attribute information, such as location, type, and tickets. Using the information about scenic spots, we can construct a knowledge map of scenic spots and show the relationship between scenic spots and attributes. When selecting tourist attractions, users are filtering scenic spots with specific attributes. Introducing the knowledge map into the recommendation system can mine the potential information that users pay attention to the attributes of scenic spots, and then establish a user interest model based on the attributes of scenic spots to obtain more personalized scenic spot recommendations, that is, customize the scenic spots that each target user may be interested in. Since the recommendation system was proposed, it has been well applied in various fields. The application in e-commerce and other fields has not only improved the user experience but also increased the number of users and sales volume of the platform. A good recommendation system is beneficial to users and businesses.As a result, how to create a high-accuracy, high-performance recommendation system remains a research hotspot in academia and industry. Scholars have been studying the recommendation system based on a knowledge map in recent years. Extract the semantic information of entities from the knowledge map, find the semantic association between entities, and then introduce it into the recommendation system to seek more accurate recommendations, which can improve the performance of the recommendation system.Given the poor recommendation effect caused by the shortage of data in collaborative filtering in the field of scenic site recommendation, a small number of studies have added external data, such as the use of auxiliary information and scoring data to recommend scenic spots. The literature recommends scenic sites based on demographic information such as age, gender, and occupation, classifies users based on demographic factors, and suggests scenic spots chosen by similar users to target users. The literature integrates social factors and geographical factors into user-based collaborative filtering recommendations. The literature collects the location information of scenic spots from the perspective of scenic spots and recommends scenic spots by using regional influence combined with matrix decomposition. However, these recommendation algorithms mainly use user data and geographic data as auxiliary data and do not fully study the impact of scenic spot attribute information on recommendation results. In China, since the e-commerce system has entered the stage of prosperity and development, personalized recommendation technology has also been developed accordingly. Nowadays, personalized recommendation system has penetrated all aspects of people’s life. Taobao, jd.com, and other online shopping malls are the most typical application examples of recommendation systems. In addition, Netease cloud’s music recommendation system and today’s headline news recommendation system have achieved good results. These mature recommendation system application software show that great progress has been made in domestic recommendation technology.Content-based recommendation systems, collaborative filtering-based recommendation systems, knowledge-based recommendation systems, demographic-based recommendation systems, and hybrid recommendation systems are the different types of traditional recommendation systems. These recommendation systems have made numerous advancements in the vertical field, achieving excellent results in the suggestion of news and web pages, as well as traditional commodities such as books and films, but they still face numerous obstacles when it comes to tourism recommendations. The cold start problem of tourism products is more serious. Without any browsing or purchase records for new users in the system, they cannot characterize their characteristics and then cannot match the recommended items.This work will investigate the recommendation approach based on transfer learning in relation to scenic site suggestion. The introduction of transfer learning in the recommendation system can mine useful information and understand users’ more fine-grained interests, to provide users with more accurate scenic spot recommendations.The paper’s organization paragraph is as follows: the related work is presented in Section2. Section 3 presents the algorithm design of the proposed work. Section 4 discusses the experiments and results. Finally, in Section 5, the research work is concluded.


## 2. Related Work

Many existing itinerary recommendation algorithms do not automatically identify and account queuing times at attractions in the recommended itinerary, which vary depending on the time of visit to the attraction, for example, longer queues during peak hours. To solve these challenges, [1] propose the PersQ algorithm for recommending personalized itineraries that take into consideration attraction popularity, user interests, and queuing times. [2] contribute to the innovative idea of using seasonal contextual information to refine the characteristics of tourist attractions. [3] propose an optimal travel route recommender system by analyzing the data history of previous users. User choice, social relationship, location distance, and place popularity are all aspects that go into creating a tailored tourist attraction suggestion process [4]. [5] focus on (1) the detection of the spatiotemporal context of the tourist to filter the POIs and (2) the use of the previous notations of the places. A novel, hybrid recommender system for cultural places is proposed that combines user preference with cultural tourist typologies [6]. For this purpose [7] propose an enhanced user profile that uses User-Location Vector with LDA and Jaccard Coefficients. [8] propose an algorithm that can generate recommendations of tourist attractions to the user using a case-based reasoning approach. [9] aim to improve the diversity and efficiency of TRSs by utilizing the power-law distribution of long-tail data. Design/methodology/approaching Sina Weibo check-in data for example [9] demonstrates that the long-tail phenomenon exists in user travel behaviors and fits the long-tail travel data with the power-law distribution. Other influential work includes [10].


## 3. Personalized Recommendation Algorithm of Tourist Attractions Based on Transfer Learning

### 3.1. Transfer Learning

Firstly, in transfer learning, we mainly study the relationship between different samples [11–13], so we call these two different data sets domains, and the work of migrating from one domain to another domain is called a task, which is the most basic concept to explore this problem. The source domain and target domain are the terms used to describe these two distinct realms. The data set including example labels is referred to as the source domain. Generally speaking, we have obtained the knowledge contained in the data; the target domain describes a small number of calibrated or even completely unknown data sets, which is the field we want to predict or infer from samples. With the above two data sets, the next step is to set corresponding learning objectives and transfer the information from one domain to another, which is the task of migration learning. Based on these two definitions, it can be formally described [14]:Given a marked source domainDs=xi,yii=1n and an unmarked target Dt=xi,yij=n+1n+m, it is assumed that the feature space is the same, that is Xs=Xt, and the category space is the same, that is Ys=Yt. But the distribution of characteristics is different, that is PXs=PXt.Our goal is to make the best use of the labeled source domain information to help learn the problems in the target domain, that is, to train a classifier to classify the target domain data. However, not all data in different fields can be transferred for learning [15]. Only within a certain error range can we learn in different fields. The learning error is expressed as:(1)d^HDs,Dt=2supμ∈HPX∈Dsμx=1−PX∈Dtμx=1,where H is a hypothetical category, and the formula is expressed as the category difference between the two fields. Therefore, the different result of the above formula depends on the field of category data. If it is a symmetrical class, it can be calculated in the following way:(2)d^HDs,Dt=21−minμ∈H1n1∑i=1n1Iμxi=0+1n2∑i=1n2Iμxi=0,where I[a] is the indicator function. The next step is to calculate the maximum error of the above two functions. The smaller the error, the better the mobility.In the generalization boundary of the target domain: it is also assumed thatH has d multi-dimensional hypothesis classes, and the probability of inequality 1−δ is(3)RDt≤Rsμ+4ndlog2end+log4δ+d^HDs,Dt+4ndlog2nd+log4δ+β,where β≥infμ∈HRDsμ+RDtμ.Through the above theoretical proof, we can calculate the migration feasibility error between domains, to determine that the two domains can be migrated. We often call this method domain adaptation.


### 3.2. Algorithm Design

This method is based on unsupervised transfer learning, so the target data does not contain labels. The classification of target data mainly depends on the distribution difference of data between different working conditions. Therefore, given the source domainDs and target domain Dt:(4)Ds=xis,yisi=1n,Dt=xiti=1m,where Ds represents the working condition data of the source domain, Dt represents the working condition data of the target domain, xis and xit are samples under different working conditions, yis is the corresponding label, and the sample size is m≪n. In the tourism recommendation algorithm, when the feature space and category space of the recommendation algorithm we collected are the same, only the data distribution is different, that is PXs≠PXt. A large number of calibration data Ds need to be used to give a model f:Xt⟶Yt to predict the label Yt of the target domain DT. This classifier can be modeled with two functions. These two functions are used to extract the mapping of input data features and the mapping from feature subspace to category space, respectively. To reduce the difference between the edge distribution PXs and PXt of the two domain data, their data are mapped to a common subspace. Then, the distance is calculated through the above adaptive optimization algorithm to obtain the classification of target domain data. The network structure is shown in Figure 1.Figure 1
Structure diagram of transfer learning adaptive model.To increase classification accuracy [16–18], the classification output is compared to the category label during the training phase, and the classification loss is measured similarly to a traditional classification network. In addition, to reduce the distribution difference between data, two adaptive layers are added based on the previous single adaptive layer, and the distance is calculated on these three layers to minimize the distribution loss, to obtain the model.The algorithm flow is shown in Algorithm 1.Algorithm 1: Classification algorithm.
Input: motor bearing data collection with labeled source domain samples and unmarked target domain samples that has been preprocessed. Diagnostic accuracy of target domain data samples as an output.Initialization: initialize the network weight and set the required network parameters and super parametersStep 1: extract the sample features of the source domain and target domain.Step 2: map the features of the two domains to the high-dimensional space.Step 3: calculate the feature distribution difference in the adaptive layer of the later layers.Step 4: calculate the entropy of the two fields.Step 5: keep an eye on the entropy value as it changes. Adjust the balancing coefficient if the minimal value is not met. The coefficient remains identical in all other respects.Step 6: back propagation updates the network weight.Step 7: calculate whether the joint loss converges to the minimum.Step 8: if the algorithm converges, output the classification result of the target domain and end.


## 3.1. Transfer Learning

Firstly, in transfer learning, we mainly study the relationship between different samples [11–13], so we call these two different data sets domains, and the work of migrating from one domain to another domain is called a task, which is the most basic concept to explore this problem. The source domain and target domain are the terms used to describe these two distinct realms. The data set including example labels is referred to as the source domain. Generally speaking, we have obtained the knowledge contained in the data; the target domain describes a small number of calibrated or even completely unknown data sets, which is the field we want to predict or infer from samples. With the above two data sets, the next step is to set corresponding learning objectives and transfer the information from one domain to another, which is the task of migration learning. Based on these two definitions, it can be formally described [14]:Given a marked source domainDs=xi,yii=1n and an unmarked target Dt=xi,yij=n+1n+m, it is assumed that the feature space is the same, that is Xs=Xt, and the category space is the same, that is Ys=Yt. But the distribution of characteristics is different, that is PXs=PXt.Our goal is to make the best use of the labeled source domain information to help learn the problems in the target domain, that is, to train a classifier to classify the target domain data. However, not all data in different fields can be transferred for learning [15]. Only within a certain error range can we learn in different fields. The learning error is expressed as:(1)d^HDs,Dt=2supμ∈HPX∈Dsμx=1−PX∈Dtμx=1,where H is a hypothetical category, and the formula is expressed as the category difference between the two fields. Therefore, the different result of the above formula depends on the field of category data. If it is a symmetrical class, it can be calculated in the following way:(2)d^HDs,Dt=21−minμ∈H1n1∑i=1n1Iμxi=0+1n2∑i=1n2Iμxi=0,where I[a] is the indicator function. The next step is to calculate the maximum error of the above two functions. The smaller the error, the better the mobility.In the generalization boundary of the target domain: it is also assumed thatH has d multi-dimensional hypothesis classes, and the probability of inequality 1−δ is(3)RDt≤Rsμ+4ndlog2end+log4δ+d^HDs,Dt+4ndlog2nd+log4δ+β,where β≥infμ∈HRDsμ+RDtμ.Through the above theoretical proof, we can calculate the migration feasibility error between domains, to determine that the two domains can be migrated. We often call this method domain adaptation.


## 3.2. Algorithm Design

This method is based on unsupervised transfer learning, so the target data does not contain labels. The classification of target data mainly depends on the distribution difference of data between different working conditions. Therefore, given the source domainDs and target domain Dt:(4)Ds=xis,yisi=1n,Dt=xiti=1m,where Ds represents the working condition data of the source domain, Dt represents the working condition data of the target domain, xis and xit are samples under different working conditions, yis is the corresponding label, and the sample size is m≪n. In the tourism recommendation algorithm, when the feature space and category space of the recommendation algorithm we collected are the same, only the data distribution is different, that is PXs≠PXt. A large number of calibration data Ds need to be used to give a model f:Xt⟶Yt to predict the label Yt of the target domain DT. This classifier can be modeled with two functions. These two functions are used to extract the mapping of input data features and the mapping from feature subspace to category space, respectively. To reduce the difference between the edge distribution PXs and PXt of the two domain data, their data are mapped to a common subspace. Then, the distance is calculated through the above adaptive optimization algorithm to obtain the classification of target domain data. The network structure is shown in Figure 1.Figure 1
Structure diagram of transfer learning adaptive model.To increase classification accuracy [16–18], the classification output is compared to the category label during the training phase, and the classification loss is measured similarly to a traditional classification network. In addition, to reduce the distribution difference between data, two adaptive layers are added based on the previous single adaptive layer, and the distance is calculated on these three layers to minimize the distribution loss, to obtain the model.The algorithm flow is shown in Algorithm 1.Algorithm 1: Classification algorithm.
Input: motor bearing data collection with labeled source domain samples and unmarked target domain samples that has been preprocessed. Diagnostic accuracy of target domain data samples as an output.Initialization: initialize the network weight and set the required network parameters and super parametersStep 1: extract the sample features of the source domain and target domain.Step 2: map the features of the two domains to the high-dimensional space.Step 3: calculate the feature distribution difference in the adaptive layer of the later layers.Step 4: calculate the entropy of the two fields.Step 5: keep an eye on the entropy value as it changes. Adjust the balancing coefficient if the minimal value is not met. The coefficient remains identical in all other respects.Step 6: back propagation updates the network weight.Step 7: calculate whether the joint loss converges to the minimum.Step 8: if the algorithm converges, output the classification result of the target domain and end.


## 4. Experimental Research and Results

To verify the effectiveness of this method, this experiment selects the monitoring data under different load conditions as the data of the source domain and target domain for the migration experiment.Firstly, the hardware and software environment configuration for completing the experimental research are introduced: the experimental operating system adopts UBUNTU of Linux, equipped with an NVIDIA GTX-1080TI, the CPU is INTEL-CORE-i7-8700, and the depth framework uses PyTorch.In this experiment, the Flickr user album is used as the target domain data set, and the scenic spot-style album crawled on the network is used as the source domain data set. With the help of the source domain data set, the target domain data set is classified. The experiment uses the cross-validation approach, selecting 80% of the data as training data and 20% of the data as test data at random, classifying the target domain data using the domain adaption and comparison algorithms, and running five cross-validation experiments. Finally, the average value of the precision and recall of the five cross-validation classification experiments are taken as the result, and the classification accuracy of various types of scenic spots is calculated as shown in Table1.Table 1
The result of classification on spot-style.
AlgorithmBeijingShanghaiTianjinShenzhenGuangzhouP%R%P%R%P%R%P%R%P%R%SVM44.142.342.142.043.644.042.542.342.142.4CDSVM61.062.161.261.561.862.163.064.062.561.8MKL65.364.963.664.465.264.265.164.165.264.2DA65.864.265.264.866.368.766.564.267.266.8Adopted accuracy (Pre@k) and recall rate (Rec@k) as an evaluation index, K refers to the top k scenic spots recommended by the users. Accuracy rate refers to the proportion of correctly recommended scenic spots in the actual recommended scenic spots; the Recall rate refers to the proportion of correctly recommended scenic spots in visited scenic spots. The higher the accuracy and recall, the better the performance of the recommendation algorithm.Lu represents the list of scenic spots visited by the user, and Lr represents the list of scenic spots recommended by the system. Accuracy and recall are defined as follows:(5)Pre@k=Lu∩Lrk,Rec@k=Lu∩LrLu.The evaluation indexes in Table1 are used to verify the personalized scenic spot recommendation method proposed in this paper. Several benchmark algorithms are selected and compared with the proposed algorithm to discuss the influence of parameters on the experimental results. All the algorithms in this paper and the comparative experiment are implemented in Python language. The following is a brief introduction to each algorithm:


### 4.1. Popularity-Based Recommendation

The algorithm calculates the popularity ranking of scenic spots according to the number of comments of each scenic spot, and recommends the top k scenic spots with the highest popularity to the target user. This algorithm does not consider the preferences of users and is not personalized. There are popular scenic spot recommendations on tourism websites such as Ma honeycomb and Baidu tourism.


### 4.2. User-Based Collaborative Filtering (USERCF)

The algorithm finds similar user groups according to the user’s scoring data, and then recommends the items liked by similar user groups to the target user.


### 4.3. Probability Matrix Decomposition (PMF)

PMF is a classical matrix decomposition algorithm. It extends the probability of the SVD model and only uses user-scoring data for a recommendation.


### 4.4. Bayesian Matrix Decomposition (BPR-MF)

The algorithm uses the user’s paired preference and Bayesian sorting matrix decomposition. Paired preferences indicate that the users prefer observed items to unobserved items.The parameters are set according to the literature on the comparative algorithm, and the parameters with the best algorithm performance are taken as the experimental parameters.The parameter settings of all algorithms are shown in Table2.Table 2
The parameter settings of all algorithms.
AlgorithmParameter settingUSERCFThe similar neighborhood is set to 20PMFλu=λv=0.002,α=0.004BPR-MFλu=0.002,α=0.002Proposed algorithm in this paperλp=λq=λw=0.02,α=0.005,δ=0.5Set the potential feature dimension of the matrix decomposition method asf = 10, and the similarity threshold of the algorithm in this paper is δ=0.5. Observe the influence of the number of recommended scenic spots K value on the experimental results, and conduct five experiments on the data set. The experimental results of all algorithms on the data set are shown in Figure 2.Figure 2
Algorithm performance comparison (a) Accuracy ratio (b) recall radio.
(a)(b)In Figure2, the abscissa represents the number k of recommended scenic spots, and the ordinate represents the accuracy and recall rate, respectively. As can be seen from Figure 2, among all baseline algorithms, popularity has the lowest accuracy and recall rate and the worst performance. The reason is that its recommendation does not have personalized characteristics and recommends the same scenic spots to all users. The result of USERCF is slightly better than the popularity algorithm, but the effect is worse than PMF and BPR-MF, which shows that the performance of the matrix decomposition model is generally better than the memory-based collaborative filtering recommendation algorithm in the case of sparse data. In the matrix decomposition model, the effect of BPR-MF is slightly better than PMF. It is speculated that BPR-MF may recommend scenic spots through paired preferences, which has more advantages when using user implicit feedback as recommendation data. The accuracy and recall rate of the recommendation algorithm in this paper are slightly improved when compared to other algorithms because the user preference data is added to the recommendation system, whereas other methods only use implicit feedback data for a recommendation, and the addition of auxiliary data improves the recommendation system’s performance. Therefore, it can be seen that this paper uses the deep transfer learning algorithm to calculate user preferences and apply them to scenic spot recommendations. The algorithm is effective.


## 4.1. Popularity-Based Recommendation

The algorithm calculates the popularity ranking of scenic spots according to the number of comments of each scenic spot, and recommends the top k scenic spots with the highest popularity to the target user. This algorithm does not consider the preferences of users and is not personalized. There are popular scenic spot recommendations on tourism websites such as Ma honeycomb and Baidu tourism.


## 4.2. User-Based Collaborative Filtering (USERCF)

The algorithm finds similar user groups according to the user’s scoring data, and then recommends the items liked by similar user groups to the target user.


## 4.3. Probability Matrix Decomposition (PMF)

PMF is a classical matrix decomposition algorithm. It extends the probability of the SVD model and only uses user-scoring data for a recommendation.


## 4.4. Bayesian Matrix Decomposition (BPR-MF)

The algorithm uses the user’s paired preference and Bayesian sorting matrix decomposition. Paired preferences indicate that the users prefer observed items to unobserved items.The parameters are set according to the literature on the comparative algorithm, and the parameters with the best algorithm performance are taken as the experimental parameters.The parameter settings of all algorithms are shown in Table2.Table 2
The parameter settings of all algorithms.
AlgorithmParameter settingUSERCFThe similar neighborhood is set to 20PMFλu=λv=0.002,α=0.004BPR-MFλu=0.002,α=0.002Proposed algorithm in this paperλp=λq=λw=0.02,α=0.005,δ=0.5Set the potential feature dimension of the matrix decomposition method asf = 10, and the similarity threshold of the algorithm in this paper is δ=0.5. Observe the influence of the number of recommended scenic spots K value on the experimental results, and conduct five experiments on the data set. The experimental results of all algorithms on the data set are shown in Figure 2.Figure 2
Algorithm performance comparison (a) Accuracy ratio (b) recall radio.
(a)(b)In Figure2, the abscissa represents the number k of recommended scenic spots, and the ordinate represents the accuracy and recall rate, respectively. As can be seen from Figure 2, among all baseline algorithms, popularity has the lowest accuracy and recall rate and the worst performance. The reason is that its recommendation does not have personalized characteristics and recommends the same scenic spots to all users. The result of USERCF is slightly better than the popularity algorithm, but the effect is worse than PMF and BPR-MF, which shows that the performance of the matrix decomposition model is generally better than the memory-based collaborative filtering recommendation algorithm in the case of sparse data. In the matrix decomposition model, the effect of BPR-MF is slightly better than PMF. It is speculated that BPR-MF may recommend scenic spots through paired preferences, which has more advantages when using user implicit feedback as recommendation data. The accuracy and recall rate of the recommendation algorithm in this paper are slightly improved when compared to other algorithms because the user preference data is added to the recommendation system, whereas other methods only use implicit feedback data for a recommendation, and the addition of auxiliary data improves the recommendation system’s performance. Therefore, it can be seen that this paper uses the deep transfer learning algorithm to calculate user preferences and apply them to scenic spot recommendations. The algorithm is effective.


## 5. Conclusions

Experiments are used in this chapter to validate the scenic site suggestion system provided in this research. The experimental design is introduced as the evaluation index of training in deep transfer learning training. The deep transfer training of scenic spot knowledge constructed in this paper is carried out with the TRANCE model and TRANSFER model, which shows that the effect of TRANSFER model training is good and lays a foundation for scenic spot recommendation. In the experiment of the recommendation algorithm, the source of the experimental data set is introduced and the data is preprocessed. The performance of the algorithm is evaluated by two indexes: accuracy and recall. Then, the advantages of the proposed recommendation algorithm are illustrated by comparative experiments; the similarity threshold, preference control parameters, and potential feature dimension of the algorithm are analyzed, and the role of the parameters is discussed.



---

*Source: 2520140-2022-07-07.xml*