Personalized Recommendation Algorithm of Tourist Attractions
Personalized Recommendation Algorithm of Tourist Attractions
Research Article
Personalized Recommendation Algorithm of Tourist Attractions
Based on Transfer Learning
Liu Xueting
Xi’an Peihua University, Xi’an 710100, China
Received 18 May 2022; Revised 16 June 2022; Accepted 20 June 2022; Published 7 July 2022
Copyright © 2022 Liu Xueting. This is an open access article distributed under the Creative Commons Attribution License, which
permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
With the development of information technology and the popularity of the Internet, the data on the network is growing ex-
ponentially. 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 de-
composition 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 per-
sonalized 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.
scenic spots contains a large amount of scenic spot attribute Content-based recommendation systems, collaborative
information, such as location, type, and tickets. Using the filtering-based recommendation systems, knowledge-based
information about scenic spots, we can construct a recommendation systems, demographic-based recommen-
knowledge map of scenic spots and show the relationship dation systems, and hybrid recommendation systems are the
between scenic spots and attributes. When selecting tourist different types of traditional recommendation systems.
attractions, users are filtering scenic spots with specific at- These recommendation systems have made numerous ad-
tributes. Introducing the knowledge map into the recom- vancements in the vertical field, achieving excellent results in
mendation system can mine the potential information that the suggestion of news and web pages, as well as traditional
users pay attention to the attributes of scenic spots, and then commodities such as books and films, but they still face
establish a user interest model based on the attributes of numerous obstacles when it comes to tourism recommen-
scenic spots to obtain more personalized scenic spot rec- dations. The cold start problem of tourism products is more
ommendations, that is, customize the scenic spots that each serious. Without any browsing or purchase records for new
target user may be interested in. Since the recommendation users in the system, they cannot characterize their charac-
system was proposed, it has been well applied in various teristics and then cannot match the recommended items.
fields. The application in e-commerce and other fields has This work will investigate the recommendation approach
not only improved the user experience but also increased the based on transfer learning in relation to scenic site sug-
number of users and sales volume of the platform. A good gestion. The introduction of transfer learning in the rec-
recommendation system is beneficial to users and ommendation system can mine useful information and
businesses. understand users’ more fine-grained interests, to provide
As a result, how to create a high-accuracy, high-per- users with more accurate scenic spot recommendations.
formance recommendation system remains a research The paper’s organization paragraph is as follows: the
hotspot in academia and industry. Scholars have been related work is presented in Section 2. Section 3 presents the
studying the recommendation system based on a knowledge algorithm design of the proposed work. Section 4 discusses
map in recent years. Extract the semantic information of the experiments and results. Finally, in Section 5, the re-
entities from the knowledge map, find the semantic asso- search work is concluded.
ciation between entities, and then introduce it into the
recommendation system to seek more accurate recom-
mendations, which can improve the performance of the 2. Related Work
recommendation system.
Given the poor recommendation effect caused by the Many existing itinerary recommendation algorithms do not
shortage of data in collaborative filtering in the field of scenic automatically identify and account queuing times at at-
site recommendation, a small number of studies have added tractions in the recommended itinerary, which vary
external data, such as the use of auxiliary information and depending on the time of visit to the attraction, for example,
scoring data to recommend scenic spots. The literature longer queues during peak hours. To solve these challenges,
recommends scenic sites based on demographic information [1] propose the PersQ algorithm for recommending per-
such as age, gender, and occupation, classifies users based on sonalized itineraries that take into consideration attraction
demographic factors, and suggests scenic spots chosen by popularity, user interests, and queuing times. [2] contribute
similar users to target users. The literature integrates social to the innovative idea of using seasonal contextual infor-
factors and geographical factors into user-based collabora- mation to refine the characteristics of tourist attractions. [3]
tive filtering recommendations. The literature collects the propose an optimal travel route recommender system by
location information of scenic spots from the perspective of analyzing the data history of previous users. User choice,
scenic spots and recommends scenic spots by using regional social relationship, location distance, and place popularity
influence combined with matrix decomposition. However, are all aspects that go into creating a tailored tourist at-
these recommendation algorithms mainly use user data and traction suggestion process [4]. [5] focus on (1) the detection
geographic data as auxiliary data and do not fully study the of the spatiotemporal context of the tourist to filter the POIs
impact of scenic spot attribute information on recom- and (2) the use of the previous notations of the places. A
mendation results. In China, since the e-commerce system novel, hybrid recommender system for cultural places is
has entered the stage of prosperity and development, per- proposed that combines user preference with cultural tourist
sonalized recommendation technology has also been de- typologies [6]. For this purpose [7] propose an enhanced
veloped accordingly. Nowadays, personalized user profile that uses User-Location Vector with LDA and
recommendation system has penetrated all aspects of peo- Jaccard Coefficients. [8] propose an algorithm that can
ple’s life. Taobao, jd.com, and other online shopping malls generate recommendations of tourist attractions to the user
are the most typical application examples of recommen- using a case-based reasoning approach. [9] aim to improve
dation systems. In addition, Netease cloud’s music recom- the diversity and efficiency of TRSs by utilizing the power-
mendation system and today’s headline news law distribution of long-tail data. Design/methodology/
recommendation system have achieved good results. These approaching Sina Weibo check-in data for example [9]
mature recommendation system application software show demonstrates that the long-tail phenomenon exists in user
that great progress has been made in domestic recom- travel behaviors and fits the long-tail travel data with the
mendation technology. power-law distribution. Other influential work includes [10].
Mathematical Problems in Engineering 3
3. Personalized Recommendation Algorithm of where β ≥ inf μ∈H [RDs (μ) + RDt (μ)].
Tourist Attractions Based on Through the above theoretical proof, we can calculate the
Transfer Learning migration feasibility error between domains, to determine
that the two domains can be migrated. We often call this
3.1. Transfer Learning. Firstly, in transfer learning, we mainly method domain adaptation.
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 3.2. Algorithm Design. This method is based on unsuper-
task, which is the most basic concept to explore this problem. vised transfer learning, so the target data does not contain
The source domain and target domain are the terms used to labels. The classification of target data mainly depends on the
describe these two distinct realms. The data set including distribution difference of data between different working
example labels is referred to as the source domain. Generally conditions. Therefore, given the source domain Ds and target
speaking, we have obtained the knowledge contained in the domain Dt:
data; the target domain describes a small number of calibrated n
Ds � xsi , ysi i�1 ,
or even completely unknown data sets, which is the field we m (4)
want to predict or infer from samples. With the above two Dt � xti i�1 ,
data sets, the next step is to set corresponding learning ob-
jectives and transfer the information from one domain to where Ds represents the working condition data of the
another, which is the task of migration learning. Based on source domain, Dt represents the working condition data of
these two definitions, it can be formally described [14]: the target domain, xsi and xti are samples under different
n
Given a marked source domain Ds � xi , yi i�1 and an working conditions, ysi is the corresponding label, and the
n+m sample size is m ≪ n. In the tourism recommendation al-
unmarked target Dt � xi , yi j�n+1 , it is assumed that the
feature space is the same, that is Xs � Xt , and the category gorithm, when the feature space and category space of the
space is the same, that is Ys � Yt . But the distribution of recommendation algorithm we collected are the same, only
characteristics is different, that is PXs � PXt . the data distribution is different, that is P(Xs ) ≠ P(Xt ). A
Our goal is to make the best use of the labeled source large number of calibration data Ds need to be used to give a
domain information to help learn the problems in the target model f: Xt ⟶ Yt to predict the label Yt of the target
domain, that is, to train a classifier to classify the target domain domain DT. This classifier can be modeled with two
data. However, not all data in different fields can be transferred functions. These two functions are used to extract the
for learning [15]. Only within a certain error range can we mapping of input data features and the mapping from
learn in different fields. The learning error is expressed as: feature subspace to category space, respectively. To reduce
the difference between the edge distribution P(Xs ) and
dH Ds , Dt � 2 sup P [μ(x) � 1] − P [μ(x) � 1], (1) P(Xt ) of the two domain data, their data are mapped to a
μ∈H X∈Ds X∈D t common subspace. Then, the distance is calculated through
the above adaptive optimization algorithm to obtain the
where H is a hypothetical category, and the formula is classification of target domain data. The network structure is
expressed as the category difference between the two fields. shown in Figure 1.
Therefore, the different result of the above formula depends To increase classification accuracy [16–18], the classifi-
on the field of category data. If it is a symmetrical class, it can cation output is compared to the category label during the
be calculated in the following way: training phase, and the classification loss is measured
n1 similarly to a traditional classification network. In addition,
D , D � 2⎛
d H s t
⎣ 1 Iμ xi � 0
⎝1 − min⎡ to reduce the distribution difference between data, two
μ∈H n1
i�1 adaptive layers are added based on the previous single
(2) adaptive layer, and the distance is calculated on these three
n
1 2 ⎠, layers to minimize the distribution loss, to obtain the model.
+ Iμ xi � 0⎞
n2 i�1 The algorithm flow is shown in Algorithm 1.
where I[a] is the indicator function. The next step is to 4. Experimental Research and Results
calculate the maximum error of the above two functions. The
smaller the error, the better the mobility. To verify the effectiveness of this method, this experiment
In the generalization boundary of the target domain: it is selects the monitoring data under different load conditions
also assumed that H has d multi-dimensional hypothesis as the data of the source domain and target domain for the
classes, and the probability of inequality 1 − δ is migration experiment.
�����������������
4 2en 4 Firstly, the hardware and software environment con-
RDt ≤ Rs (μ) + d log + log + d D ,D figuration for completing the experimental research are
H s t
n d δ
(3) introduced: the experimental operating system adopts
����������������
4 2n 4 UBUNTU of Linux, equipped with an NVIDIA GTX-
+ d log + log + β, 1080TI, the CPU is INTEL-CORE-i7-8700, and the depth
n d δ
framework uses PyTorch.
4 Mathematical Problems in Engineering
Max pooling
7*7 Conv
3*3 Conv
3*3 Conv
3*3 Conv
3*3 Conv
1*1 Conv
Average
pooling
Input
FC
FC
FC
Classification
loss
Softmax
Parameter
Fc_adapt Domain loss
sharing
Max pooling
7*7 Conv
3*3 Conv
3*3 Conv
3*3 Conv
3*3 Conv
1*1 Conv
Average
pooling
Input
FC
FC
FC
Figure 1: Structure diagram of transfer learning adaptive model.
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 parameters
Step 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.
In this experiment, the Flickr user album is used as the represents the list of scenic spots recommended by the
target domain data set, and the scenic spot-style album system. Accuracy and recall are defined as follows:
crawled on the network is used as the source domain data Lu ∩ Lr
set. With the help of the source domain data set, the target Pre@k ,
domain data set is classified. The experiment uses the cross- k
(5)
Lu ∩ Lr
validation approach, selecting 80% of the data as training
data and 20% of the data as test data at random, classifying Rec@k .
the target domain data using the domain adaption and Lu
comparison algorithms, and running five cross-validation
The evaluation indexes in Table 1 are used to verify the
experiments. Finally, the average value of the precision and
personalized scenic spot recommendation method proposed
recall of the five cross-validation classification experiments
in this paper. Several benchmark algorithms are selected and
are taken as the result, and the classification accuracy of
compared with the proposed algorithm to discuss the in-
various types of scenic spots is calculated as shown in
fluence of parameters on the experimental results. All the
Table 1.
algorithms in this paper and the comparative experiment are
Adopted accuracy (Pre@k) and recall rate (Rec@k) as an
implemented in Python language. The following is a brief
evaluation index, K refers to the top k scenic spots rec-
introduction to each algorithm:
ommended by the users. Accuracy rate refers to the pro-
portion of correctly recommended scenic spots in the actual
recommended scenic spots; the Recall rate refers to the 4.1. Popularity-Based Recommendation. The algorithm cal-
proportion of correctly recommended scenic spots in visited culates the popularity ranking of scenic spots according to
scenic spots. The higher the accuracy and recall, the better the number of comments of each scenic spot, and recom-
the performance of the recommendation algorithm. Lu mends the top k scenic spots with the highest popularity to
represents the list of scenic spots visited by the user, and Lr the target user. This algorithm does not consider the
Mathematical Problems in Engineering 5
0.13 0.29
0.115 0.24
0.1
0.19
Pre@5
0.085 Pec@5
0.14
0.07
0.055 0.09
0.04 0.04
5 10 15 20 5 10 15 20
Popularity 0.06755 0.06133 0.05704 0.05233 Popularity 0.07755 0.13607 0.19267 0.2323
UserCF 0.08409 0.06917 0.06351 0.05824 UserCF 0.09793 0.15846 0.20662 0.25438
PMF 0.10329 0.08907 0.07764 0.06997 PMF 0.10637 0.17625 0.23021 0.27316
BPR-MF 0.11346 0.09528 0.08172 0.06953 BPR-MF 0.11233 0.18357 0.24379 0.27417
Proposed 0.12624 0.10289 0.08504 0.07339 Proposed 0.12551 0.20102 0.24741 0.2842
k k
Figure 2: Algorithm performance comparison (a) Accuracy ratio (b) recall radio.
preferences of users and is not personalized. There are 4.4. Bayesian Matrix Decomposition (BPR-MF). The algo-
popular scenic spot recommendations on tourism websites rithm uses the user’s paired preference and Bayesian sorting
such as Ma honeycomb and Baidu tourism. matrix decomposition. Paired preferences indicate that the
users prefer observed items to unobserved items.
The parameters are set according to the literature on the
4.2. User-Based Collaborative Filtering (USERCF). The al- comparative algorithm, and the parameters with the best
gorithm finds similar user groups according to the user’s algorithm performance are taken as the experimental
scoring data, and then recommends the items liked by parameters.
similar user groups to the target user. The parameter settings of all algorithms are shown in
Table 2.
Set the potential feature dimension of the matrix de-
4.3. Probability Matrix Decomposition (PMF). PMF is a composition method as f 10, and the similarity threshold of
classical matrix decomposition algorithm. It extends the the algorithm in this paper is δ 0.5. Observe the influence
probability of the SVD model and only uses user-scoring of the number of recommended scenic spots K value on the
data for a recommendation. experimental results, and conduct five experiments on the
6 Mathematical Problems in Engineering