# Digital Transformation of Tourism Industry and Smart Tourism Recommendation Algorithm Based on 5G Background

Authors: Wenting Xia
Journal: Mobile Information Systems
 (2022)

---

## Abstract

As a hot issue of current research, tourism information service has higher and higher requirements for intelligent construction. Tourism service recommendation is the embodiment of smart tourism. However, there are still obvious deficiencies in solving the problem of Internet information load and improving user experience. Through functional analysis, architecture design, selection of relevant development frameworks, and improvement of collaborative filtering algorithms, a stable, reliable, high-performance, multi-functional intelligent travel recommendation system can be developed that can complete personalized recommendations. It can achieve the purpose of improving the efficiency and accuracy of recommendation and recommending tourism-related information to users in a targeted manner. Analyze the test plan and test the recommended algorithm module. In the case of different concurrency and database levels, the system response time is 0.9 s and 1 s, respectively. And in the case of high throughput, the system response time is 1.5 s, indicating that the system is running stably. It not only tested the storage and calculation of big data but also improved the usability of the travel information service recommendation system and the user experience of the system.


---

## Body

## 1. Introduction

With the advent of the era of mass tourism and the rapid development of information technologies such as cloud computing, the Internet of Things, and 5G mobile communications, the development of smart tourism, the improvement of scenic spot management, meeting the individual needs of tourists and improving the management efficiency of tourism management departments have become a major revolution in tourism. In terms of tourism, my country's tourism industry has developed well, and the construction of tourism informatization has developed rapidly. However, in the face of big data, many problems immediately emerge, such as high maintenance costs, poor service experience, and insufficient mining of specific information. The emergence of big data brings both challenges and opportunities. Making full use of the original massive tourism data, mining massive tourism data quickly, conveniently, and accurately, and providing tourists with good tourism information services, has become a new direction of tourism big data research. With the macro environment faced by the tourism industry, the opportunities and challenges brought about by digitalization, and the changing trend of customer needs, most companies in the tourism industry take digital transformation as the core of their strategy and in the digital transformation of enterprise systems and operations. As the digital economy will become a new driving force for the future development of enterprises, more and more enterprises have also started a new wave of digital transformation. Nowadays, when tourists obtain the demand for related tourism services, the existing information-based tourism services cannot bring a good experience to users. However, in the face of massive tourism data, it is necessary to combine new platforms and effective data mining algorithms for management.The leisure, travel, tourism, and hospitality industry have been one of the largest contributors to the global economy and workforce deployment from the past to the present. The hospitality industry is already starting to feel the impact of digital transformation. Buyukzkan et al.’s research is based on a strategic analysis of service quality in the digital hospitality industry. By rearranging from the perspective of digital transformation, a new service quality model is proposed for the digital hotel industry [1]. The problem of Nikitenko’s research is the distribution of new trends in communication in tourism development, and the use of information technology and digital tourism economy as the new driving force of the information society to promote tourism products to foreign markets through the Internet [2]. Tourism plays an important role in the development of the national economy. Marynyak and Stetsko found that, in the practice of statistical accounting in Ukraine, there is a lack of a common method for collecting data on the operating results of the main body of the tourism sector [3]. This complicates the objective analysis of the parameters used to estimate the true state of tourism. The digital transformation of society affects socio-economic relationships in all areas of life. The purpose of Stryzhak et al. is to determine the dependence of human capital in tourism on the level of digitization of the economy. Data normalization, cluster analysis, ANOVA, K-means, and SWOT analysis were used to analyze the indicators for different countries [4]. Digital well-being has become a hot topic in public discourse, increasingly appealing to consumers, businesses, government agencies, and technology providers. Starting from understanding digital well-being and its related applications in tourism, Stankov and Gretzer developed new policies and designed new services and experiences based on three new groups of roles and responsibilities in tourism and grouped the concept of well-being in tourism to the adoption of digitization [5]. Modern travel businesses are forced to increasingly use information and communication tools to compete for customers. Baranova A's research shows that simply creating tourism and entertainment infrastructure is not enough. It is important to create unforgettable positive emotions, and atmospheres and to demonstrate this not only in the traditional form but also using digital technology [6].Travel itinerary planning is an important part of travel itinerary planning, which can improve the satisfaction and well-being of tourists. Du et al. propose a new method of tourism path mining, which considers both the thematic level of the scenic spots and the characteristics of the scenic spots. Experimental results show that this method can effectively extract travel notes from massive travel notes [7]. Wei et al. explored the use of genetic algorithms and other big data technologies to mine massive tourism data and proposed the overall design of an industrial information service platform based on tourism big data [8]. Nilashi et al. proposed a new recommendation method based on multi-criteria CF, through clustering, dimensionality reduction, and prediction methods [9] to improve the prediction accuracy of recommendation systems in the tourism field. In the era of big data, with the development of computer technology, the application of the Internet of Things in the tourism industry is inevitable for the development, transformation, and upgrading of the tourism industry. Wu introduced the Internet of Things, smart tourism, and its architecture, and proposed the existing problems and development strategies of the smart tourism information service function [10]. Joeng and Kim measured and analyzed the importance and satisfaction of IT services to smart tourism from the perspective of the tourism life cycle and proposed strategies to provide IT services for promoting smart tourism [11]. With the continuous accumulation of network resources, tourists face the problem of information overload when planning travel routes.This study conducts system testing by developing a set of personalized recommendations for intelligent travel recommendations and takes the system login page as an example to test its performance. 10 test users will be added in each stage, the interval between each stage is 30 s, and the current maximum is 200. When the number of concurrency is 100, the server processing time is 34.45 ms, the throughput rate is 75.23 req/s, and the user waiting time is the shortest, which is 45.39 ms. For the test of the recommended module, the request increased from 10 to 200, and the TPS reached the maximum value of 500/s and stabilized at around 421/s. The average transaction response time is 236.15 ms, and the maximum response time is 7.5 s, but the proportion is small. For the security module test, when the number of users is 10, the processing time of security events is 10 s, which is the minimum value. When the number of users reaches 200, the security processing time reaches the maximum value, and the processing time is 85 s, which basically meets the needs of users. The novelty of this study is that based on the existing recommendation algorithms, it provides a theoretical basis for the research of collaborative filtering algorithms. At the same time, the in-depth research on collaborative filtering recommendation algorithms is completed. And complete the improvement of the collaborative filtering algorithm, and complete the construction of a personalized smart tourism system on this basis.


## 2. Digital Transformation of Tourism Industry and Smart Tourism Recommendation Algorithm

### 2.1. Digital Transformation of Tourism Industry

With the advent of the digital age, the tourism market environment has undergone earth-shaking changes, which has also brought huge opportunities and challenges to tourism companies. At this stage, under the impact of the digital background on the tourism industry, more and more tourism companies are undergoing digital transformation to adapt to market changes. The digital transformation of traditional travel agencies is the inevitable result of the development of the times [12]. The digital transformation and upgrading of China's digital economy on the basis of network development and informatization development is an inevitable result of conforming to the development of the times. The digital transformation of tourism is also inseparable from the influence of the national macro policy environment and industry environment [13]. The service industry digital economy represented by tourism accounts for the highest proportion of the added value of China's industrial digital economy, the highest level of digitalization, and the fastest transformation speed. Compared with other industries, the tourism industry pays more attention to innovative behavior and the application of big data and networking in the process of digital transformation. Through the application of big data, cloud computing, and other technologies, relying on the data advantages of the industrial chain, we can realize digital marketing and provide customers with value-added services. However, in order to adapt to market changes and industry competition, enterprises in the traditional tourism industry are also in urgent need of self-adjustment, transformation, and upgrading to adapt to changes in the market environment and the trend of the times., so as to maintain healthy development [14].


### 2.2. Ecology of Smart Tourism Platform

In order to better connect various parts of the scenic smart tourism platform and improve the data sharing ability of each functional module, this study also designs the smart tourism platform ecosystem, so that the various functions of the scenic smart tourism platform can be integrated into a complete application platform. The cloud platform has secure data storage and strong computing power, and can perform big data operations in real time. Portable terminal equipment is suitable for travel service and management. The advantages of the two are combined into one, to create the core content of smart tourism integrated applications, competence centers, IoT platforms, monitoring platforms, network data centers, and terminal equipment. The combination of the advantages of the two realizes the integration of the functions of the scenic smart tourism platform and provides users with more intelligent and convenient decision-making, knowledge, and services, as shown in Figure1.Figure 1
Smart tourism platform ecosystem.Figure1 shows the smart tourism platform ecosystem. In the process of tourism, it provides tourists with comprehensive tourism services such as attractions, information release, tourism social interaction services, intelligent tour guides, tourism route planning, marketing recommendations, tourism tickets, and preferential recommendations, and call centers [15]. A comprehensive management application of smart scenic spots that integrates comprehensive security, data mining, passenger flow management, information release, vehicle and parking lot management, statistical analysis of advertising marketing recommendation business, tourism e-commerce, and other services. The effective integration of tourist-oriented applications and scenic spots and management departments has greatly improved the sharing of information, resource services, and applications between the two.


### 2.3. Collaborative Filtering Algorithm and Improvement Method

The development of a smart tourism recommendation system is inseparable from the support of recommendation algorithms. In order to meet the personalized needs of users and provide users with accurate recommendations, it is necessary to have a deep understanding of recommendation algorithms. The relationship between users and product recommendations is shown in Figure2.Figure 2
User and product recommendation relationship.As shown in Figure2, the current recommendation algorithms mainly used for system recommendation are as follows: content-based recommendation, association rule-based recommendation, knowledge-based recommendation, collaborative filtering algorithm, and hybrid recommendation.


#### 2.3.1. Content-Based Recommendation

Content-based recommendation recommends item content information, takes the content as the starting point, finds the correlation between items, analyzes the user's history, finds the item that the user is more interested in, and finally recommends it to the user [16]. The schematic diagram of the content-based recommendation mechanism is shown in Figure 3.Figure 3
Schematic diagram of content-based recommendation mechanism.As shown in Figure3, a content-based recommendation is to calculate the similarity of different items based on the correlation between items and different attributes of the items [17]. Content-based algorithms typically use the term frequency-inverse document frequency (TF-IDF) method to compute the component values for each attribute.(1)TF−IDFtk,dk=TFtk,dj∗logNnk.Among them,TFtk,dj represents the number of times the jth attribute appears in item j, and nkrepresents the number of all items including the kth attribute. The weight formula of the kth attribute in the jth item is shown in formula (2).(2)wk,j=TFtk,dj∑s=1TTF−IDFts,dj2.The advantages of content-based recommendation algorithms are: better recommendation accuracy can be obtained; recommendation results are intuitive and easy to interpret [18]. The disadvantage of this algorithm is that the properties of items are very limited, and it is not easy to obtain more data. When multiple attributes are used for recommendation, the recommendation speed is greatly reduced. The measure of item similarity is one sided and requires enough data to build a classifier. User historical data are required and there is a cold start problem [19].


#### 2.3.2. Recommendation Based on Association Rules

Association rule-based recommendation is a recommendation based on correlation rules. Association rules are actually in a large database that counts the collection of items purchased by users, and these items are the rule headers of the algorithm. The relationship between users is shown in formula (3):(3)Fa=U1,U2,…,Un.The formula for calculating the similarity between user groups and association rules is shown in formula (4):(4)Sa=∑a∈FaSUaga∑a∈Faga,where Fa represents the set of relationships between gausers and represents the similarity between users.The advantages of associative recommendation algorithms are: new points of interest of users can be discovered; less specialized domain knowledge is required; recommendation results are highly accurate and easy to interpret. The disadvantage of this algorithm is that it is time consuming and labor intensive to extract information through association rules, and the degree of personalization is low.User-based collaborative filtering finds users with high similarity by calculating distances and uses the ratings of other users to predict and recommend target users [20]. The schematic diagram of the user-based collaborative filtering recommendation mechanism is shown in Figure 4.Figure 4
Schematic diagram of user-based collaborative filtering recommendation mechanism.As shown in Figure4, there are 3 users and 4 projects in the graph. In order to recommend potentially favorite items to user3, it is first necessary to find user1 with the highest similarity to user3 according to the similarity formula. Then you need to calculate the interest value of item1 and item3 and user3 has no purchase history in user1. Finally, it is necessary to sort and push according to the interest value of these two items. The user's interest similarity is calculated according to the similarity formula to derive a recommendation formula that can recommend content to different users. It is assumed here that two items, item1 and item3, are to be pushed to user3. The calculation formula of the user-based collaborative filtering algorithm is shown in formula (5).(5)simm,n=∑x∈ImnSm,x−S¯nSm,x−S¯n∑x∈ImnSm,x−S¯m2∑x∈ImnSn,x−S¯n2.Among them, sim (m, n) calculates the similarity between user m and user nImn represents the item jointly evaluated by user m and user n and represents Sm,xthe rating of item x by user m. The formula of item-based collaborative filtering algorithm is shown in formula (6).(6)simm,n=∑x∈UmnWm,x−W¯nWn,x−W¯n∑x∈UmnWm,x−W¯m2∑x∈UmnWn,x−W¯n2For large recommender systems, model-based collaborative filtering is more suitable. As the current mainstream collaborative filtering type, model-based collaborative filtering has a wide range of applications, many advantages, and a lot of knowledge involved in the algorithm. For the whole system, there will be cases where some users and some items have rating data, while others are blank [21, 22]. This is a more common problem in real systems. Only by making full use of these scoring data and combining methods such as association algorithm, classification algorithm, matrix factorization, and neural network can we solve this problem well.This study adopts the user-based collaborative filtering algorithm as the basis. In order to better meet the application requirements of the recommendation algorithm in the intelligent tourism recommendation system, in view of the above problems, this study improves the user-based collaborative filtering algorithm to improve the problems existing in the traditional collaborative filtering algorithm.(7)qy,i=Ni∩Uy.Equation (7) is a calculation formula for predicting recommendation information based on user information, where q(y, i) is defined as the popularity of recommendation information i among system users with characteristic attribute y.


#### 2.3.3. Multilayer Perceptron

Multilayer perceptrons replace the inner product operation in traditional matrix factorization to learn the interaction between user and visual embedding representations. The specific process is as follows: first, connect the updated embedding representation of users and attractions, then input the multi-layer perceptron, and finally get the link probability between a user and attractions [23, 24]. The input vector x0represents the connection between the user and the embedded representation of the sights, and the formula is shown in (8).(8)x0=Euil⊕Eajl.Among them,⊕ represents the embedded connection operation, and x0 is the output value through the first layer which is expressed as a formula (9).(9)x1=hw1x0+b1′,where w1is the weight matrix, b1′ is the bias vector, and h( ) is the Leaky ReLU activation function x0. The output value passing through the lth layer is expressed as (10).(10)xl=hw1xl−1+bl′.The final link probability isui,aj shown in (11).(11)y⌢uiaj=σxl.Among them, it represents they⌢uiaj possibility of user interaction uiwith scenic spots aj. To give such a probabilistic interpretation, the output of the model should be restricted to the range [0, 1], so σ( ) is defined as a sigmoid probability function.


### 2.4. Tourism Seasonal Statistics

Tourism seasonality is mainly manifested in the unbalanced distribution of tourism reception time. According to the tourism information obtained in this study, taking Xi'an inbound tourism as an example, the statistical analysis of tourism seasonality and the temporal distribution characteristics of Xi'an inbound tourism flow can be carried out on the data: a conducted research using the number of tourists as an indicator. It mainly discusses three aspects: the change of the number of tourists with the month, the change in the number of tourists and the length of stay, and the change in the number of tourists and the number of accompanying persons. The seasonal intensity index and tourist characteristics are also analyzed.The calculation formula of the seasonal intensity index is formula (12):(12)R=∑i=112xi−8.33212,xi is the ratio of the number of tourists per month to the whole year. The closer the R value which is equal to zero, the more uniform the time distribution of tourism demand; the greater the R value, the greater the time change. Using social network analysis theory to study tourism, the research focuses on the following aspects.


#### 2.4.1. Scale of Tourism Traffic Network

In the whole tourism flow network, the scale of the tourism network refers to the number of tourism network nodes (tourist attractions), the number of all possible relationships in the directed network graph is (12), and k represents the number of tourism nodes.(13)k∗k−1.The number of possible relations in an undirected network graph is (14), where k represents the number of traveling nodes.(14)k∗k−12.


#### 2.4.2. Tourism Network Density

Its value is the ratio of the actual total number of connections to the theoretical total number of connections, reflecting the tightness of connections between all nodes. The tourism network density formulas (15) and (16) are given.(15)D=2∑i=1kdinik∗k−1,And in:(16)dini=∑j=1kdini,nj,where k is the number of nodes, D is the density of the tourism network, and the value ranges from 0 to 1.0 mean that there is no connection between nodes at all, and 1 means that under ideal conditions, all attractions are closely connected.The user visits the scenic spot set 1 browsed by the travel website. ForL1=I1,I2,…,Im any scenic spot in L1, there are three ways to access information: video, picture, and text, and the visit time is Tv,Tp,Ttrespectively set as. During a visit, users may visit the same attraction multiple times. If the time of each browsing is Tvi,Tpi,Tti, then the browsing time of the user for the three types of scenic spots information is the sum of the single browsing, and the calculation formula is as follows.(17)Tv=∑i=1nTvi;Tt=∑i=1nTti;Tp=∑i=1nTpi.Among them,n is the number of times the user browses the same scenic spot in one visit. In order to understand the user's interest in scenic spots, the interest degree R is introduced:(18)r=fTv,Tt,Tp.Taking the weighted average of the interest degree function,Tv,Tp,Ttthe amount of information people get through video is 2–3 times that of pictures and texts per unit time. Here, the weighted value of the video is set to 1/2. The weights of pictures and text are set to 1/4 respectively, so there is formula (19):(19)r=12Tv+14Tt+14Tp.Among them,Tvrepresents the weighted value of the video, Tt represents the weight of the picture, and Tp represents the weight of the text. Among all the scenic spots visited by the user at one time, the scenic spots with too low interest (less than 5 s) are excluded, and the remaining scenic spots sequence is L1=I1,I2,…,Im stored in the transaction database D.


## 2.1. Digital Transformation of Tourism Industry

With the advent of the digital age, the tourism market environment has undergone earth-shaking changes, which has also brought huge opportunities and challenges to tourism companies. At this stage, under the impact of the digital background on the tourism industry, more and more tourism companies are undergoing digital transformation to adapt to market changes. The digital transformation of traditional travel agencies is the inevitable result of the development of the times [12]. The digital transformation and upgrading of China's digital economy on the basis of network development and informatization development is an inevitable result of conforming to the development of the times. The digital transformation of tourism is also inseparable from the influence of the national macro policy environment and industry environment [13]. The service industry digital economy represented by tourism accounts for the highest proportion of the added value of China's industrial digital economy, the highest level of digitalization, and the fastest transformation speed. Compared with other industries, the tourism industry pays more attention to innovative behavior and the application of big data and networking in the process of digital transformation. Through the application of big data, cloud computing, and other technologies, relying on the data advantages of the industrial chain, we can realize digital marketing and provide customers with value-added services. However, in order to adapt to market changes and industry competition, enterprises in the traditional tourism industry are also in urgent need of self-adjustment, transformation, and upgrading to adapt to changes in the market environment and the trend of the times., so as to maintain healthy development [14].


## 2.2. Ecology of Smart Tourism Platform

In order to better connect various parts of the scenic smart tourism platform and improve the data sharing ability of each functional module, this study also designs the smart tourism platform ecosystem, so that the various functions of the scenic smart tourism platform can be integrated into a complete application platform. The cloud platform has secure data storage and strong computing power, and can perform big data operations in real time. Portable terminal equipment is suitable for travel service and management. The advantages of the two are combined into one, to create the core content of smart tourism integrated applications, competence centers, IoT platforms, monitoring platforms, network data centers, and terminal equipment. The combination of the advantages of the two realizes the integration of the functions of the scenic smart tourism platform and provides users with more intelligent and convenient decision-making, knowledge, and services, as shown in Figure1.Figure 1
Smart tourism platform ecosystem.Figure1 shows the smart tourism platform ecosystem. In the process of tourism, it provides tourists with comprehensive tourism services such as attractions, information release, tourism social interaction services, intelligent tour guides, tourism route planning, marketing recommendations, tourism tickets, and preferential recommendations, and call centers [15]. A comprehensive management application of smart scenic spots that integrates comprehensive security, data mining, passenger flow management, information release, vehicle and parking lot management, statistical analysis of advertising marketing recommendation business, tourism e-commerce, and other services. The effective integration of tourist-oriented applications and scenic spots and management departments has greatly improved the sharing of information, resource services, and applications between the two.


## 2.3. Collaborative Filtering Algorithm and Improvement Method

The development of a smart tourism recommendation system is inseparable from the support of recommendation algorithms. In order to meet the personalized needs of users and provide users with accurate recommendations, it is necessary to have a deep understanding of recommendation algorithms. The relationship between users and product recommendations is shown in Figure2.Figure 2
User and product recommendation relationship.As shown in Figure2, the current recommendation algorithms mainly used for system recommendation are as follows: content-based recommendation, association rule-based recommendation, knowledge-based recommendation, collaborative filtering algorithm, and hybrid recommendation.


### 2.3.1. Content-Based Recommendation

Content-based recommendation recommends item content information, takes the content as the starting point, finds the correlation between items, analyzes the user's history, finds the item that the user is more interested in, and finally recommends it to the user [16]. The schematic diagram of the content-based recommendation mechanism is shown in Figure 3.Figure 3
Schematic diagram of content-based recommendation mechanism.As shown in Figure3, a content-based recommendation is to calculate the similarity of different items based on the correlation between items and different attributes of the items [17]. Content-based algorithms typically use the term frequency-inverse document frequency (TF-IDF) method to compute the component values for each attribute.(1)TF−IDFtk,dk=TFtk,dj∗logNnk.Among them,TFtk,dj represents the number of times the jth attribute appears in item j, and nkrepresents the number of all items including the kth attribute. The weight formula of the kth attribute in the jth item is shown in formula (2).(2)wk,j=TFtk,dj∑s=1TTF−IDFts,dj2.The advantages of content-based recommendation algorithms are: better recommendation accuracy can be obtained; recommendation results are intuitive and easy to interpret [18]. The disadvantage of this algorithm is that the properties of items are very limited, and it is not easy to obtain more data. When multiple attributes are used for recommendation, the recommendation speed is greatly reduced. The measure of item similarity is one sided and requires enough data to build a classifier. User historical data are required and there is a cold start problem [19].


### 2.3.2. Recommendation Based on Association Rules

Association rule-based recommendation is a recommendation based on correlation rules. Association rules are actually in a large database that counts the collection of items purchased by users, and these items are the rule headers of the algorithm. The relationship between users is shown in formula (3):(3)Fa=U1,U2,…,Un.The formula for calculating the similarity between user groups and association rules is shown in formula (4):(4)Sa=∑a∈FaSUaga∑a∈Faga,where Fa represents the set of relationships between gausers and represents the similarity between users.The advantages of associative recommendation algorithms are: new points of interest of users can be discovered; less specialized domain knowledge is required; recommendation results are highly accurate and easy to interpret. The disadvantage of this algorithm is that it is time consuming and labor intensive to extract information through association rules, and the degree of personalization is low.User-based collaborative filtering finds users with high similarity by calculating distances and uses the ratings of other users to predict and recommend target users [20]. The schematic diagram of the user-based collaborative filtering recommendation mechanism is shown in Figure 4.Figure 4
Schematic diagram of user-based collaborative filtering recommendation mechanism.As shown in Figure4, there are 3 users and 4 projects in the graph. In order to recommend potentially favorite items to user3, it is first necessary to find user1 with the highest similarity to user3 according to the similarity formula. Then you need to calculate the interest value of item1 and item3 and user3 has no purchase history in user1. Finally, it is necessary to sort and push according to the interest value of these two items. The user's interest similarity is calculated according to the similarity formula to derive a recommendation formula that can recommend content to different users. It is assumed here that two items, item1 and item3, are to be pushed to user3. The calculation formula of the user-based collaborative filtering algorithm is shown in formula (5).(5)simm,n=∑x∈ImnSm,x−S¯nSm,x−S¯n∑x∈ImnSm,x−S¯m2∑x∈ImnSn,x−S¯n2.Among them, sim (m, n) calculates the similarity between user m and user nImn represents the item jointly evaluated by user m and user n and represents Sm,xthe rating of item x by user m. The formula of item-based collaborative filtering algorithm is shown in formula (6).(6)simm,n=∑x∈UmnWm,x−W¯nWn,x−W¯n∑x∈UmnWm,x−W¯m2∑x∈UmnWn,x−W¯n2For large recommender systems, model-based collaborative filtering is more suitable. As the current mainstream collaborative filtering type, model-based collaborative filtering has a wide range of applications, many advantages, and a lot of knowledge involved in the algorithm. For the whole system, there will be cases where some users and some items have rating data, while others are blank [21, 22]. This is a more common problem in real systems. Only by making full use of these scoring data and combining methods such as association algorithm, classification algorithm, matrix factorization, and neural network can we solve this problem well.This study adopts the user-based collaborative filtering algorithm as the basis. In order to better meet the application requirements of the recommendation algorithm in the intelligent tourism recommendation system, in view of the above problems, this study improves the user-based collaborative filtering algorithm to improve the problems existing in the traditional collaborative filtering algorithm.(7)qy,i=Ni∩Uy.Equation (7) is a calculation formula for predicting recommendation information based on user information, where q(y, i) is defined as the popularity of recommendation information i among system users with characteristic attribute y.


### 2.3.3. Multilayer Perceptron

Multilayer perceptrons replace the inner product operation in traditional matrix factorization to learn the interaction between user and visual embedding representations. The specific process is as follows: first, connect the updated embedding representation of users and attractions, then input the multi-layer perceptron, and finally get the link probability between a user and attractions [23, 24]. The input vector x0represents the connection between the user and the embedded representation of the sights, and the formula is shown in (8).(8)x0=Euil⊕Eajl.Among them,⊕ represents the embedded connection operation, and x0 is the output value through the first layer which is expressed as a formula (9).(9)x1=hw1x0+b1′,where w1is the weight matrix, b1′ is the bias vector, and h( ) is the Leaky ReLU activation function x0. The output value passing through the lth layer is expressed as (10).(10)xl=hw1xl−1+bl′.The final link probability isui,aj shown in (11).(11)y⌢uiaj=σxl.Among them, it represents they⌢uiaj possibility of user interaction uiwith scenic spots aj. To give such a probabilistic interpretation, the output of the model should be restricted to the range [0, 1], so σ( ) is defined as a sigmoid probability function.


## 2.3.1. Content-Based Recommendation

Content-based recommendation recommends item content information, takes the content as the starting point, finds the correlation between items, analyzes the user's history, finds the item that the user is more interested in, and finally recommends it to the user [16]. The schematic diagram of the content-based recommendation mechanism is shown in Figure 3.Figure 3
Schematic diagram of content-based recommendation mechanism.As shown in Figure3, a content-based recommendation is to calculate the similarity of different items based on the correlation between items and different attributes of the items [17]. Content-based algorithms typically use the term frequency-inverse document frequency (TF-IDF) method to compute the component values for each attribute.(1)TF−IDFtk,dk=TFtk,dj∗logNnk.Among them,TFtk,dj represents the number of times the jth attribute appears in item j, and nkrepresents the number of all items including the kth attribute. The weight formula of the kth attribute in the jth item is shown in formula (2).(2)wk,j=TFtk,dj∑s=1TTF−IDFts,dj2.The advantages of content-based recommendation algorithms are: better recommendation accuracy can be obtained; recommendation results are intuitive and easy to interpret [18]. The disadvantage of this algorithm is that the properties of items are very limited, and it is not easy to obtain more data. When multiple attributes are used for recommendation, the recommendation speed is greatly reduced. The measure of item similarity is one sided and requires enough data to build a classifier. User historical data are required and there is a cold start problem [19].


## 2.3.2. Recommendation Based on Association Rules

Association rule-based recommendation is a recommendation based on correlation rules. Association rules are actually in a large database that counts the collection of items purchased by users, and these items are the rule headers of the algorithm. The relationship between users is shown in formula (3):(3)Fa=U1,U2,…,Un.The formula for calculating the similarity between user groups and association rules is shown in formula (4):(4)Sa=∑a∈FaSUaga∑a∈Faga,where Fa represents the set of relationships between gausers and represents the similarity between users.The advantages of associative recommendation algorithms are: new points of interest of users can be discovered; less specialized domain knowledge is required; recommendation results are highly accurate and easy to interpret. The disadvantage of this algorithm is that it is time consuming and labor intensive to extract information through association rules, and the degree of personalization is low.User-based collaborative filtering finds users with high similarity by calculating distances and uses the ratings of other users to predict and recommend target users [20]. The schematic diagram of the user-based collaborative filtering recommendation mechanism is shown in Figure 4.Figure 4
Schematic diagram of user-based collaborative filtering recommendation mechanism.As shown in Figure4, there are 3 users and 4 projects in the graph. In order to recommend potentially favorite items to user3, it is first necessary to find user1 with the highest similarity to user3 according to the similarity formula. Then you need to calculate the interest value of item1 and item3 and user3 has no purchase history in user1. Finally, it is necessary to sort and push according to the interest value of these two items. The user's interest similarity is calculated according to the similarity formula to derive a recommendation formula that can recommend content to different users. It is assumed here that two items, item1 and item3, are to be pushed to user3. The calculation formula of the user-based collaborative filtering algorithm is shown in formula (5).(5)simm,n=∑x∈ImnSm,x−S¯nSm,x−S¯n∑x∈ImnSm,x−S¯m2∑x∈ImnSn,x−S¯n2.Among them, sim (m, n) calculates the similarity between user m and user nImn represents the item jointly evaluated by user m and user n and represents Sm,xthe rating of item x by user m. The formula of item-based collaborative filtering algorithm is shown in formula (6).(6)simm,n=∑x∈UmnWm,x−W¯nWn,x−W¯n∑x∈UmnWm,x−W¯m2∑x∈UmnWn,x−W¯n2For large recommender systems, model-based collaborative filtering is more suitable. As the current mainstream collaborative filtering type, model-based collaborative filtering has a wide range of applications, many advantages, and a lot of knowledge involved in the algorithm. For the whole system, there will be cases where some users and some items have rating data, while others are blank [21, 22]. This is a more common problem in real systems. Only by making full use of these scoring data and combining methods such as association algorithm, classification algorithm, matrix factorization, and neural network can we solve this problem well.This study adopts the user-based collaborative filtering algorithm as the basis. In order to better meet the application requirements of the recommendation algorithm in the intelligent tourism recommendation system, in view of the above problems, this study improves the user-based collaborative filtering algorithm to improve the problems existing in the traditional collaborative filtering algorithm.(7)qy,i=Ni∩Uy.Equation (7) is a calculation formula for predicting recommendation information based on user information, where q(y, i) is defined as the popularity of recommendation information i among system users with characteristic attribute y.


## 2.3.3. Multilayer Perceptron

Multilayer perceptrons replace the inner product operation in traditional matrix factorization to learn the interaction between user and visual embedding representations. The specific process is as follows: first, connect the updated embedding representation of users and attractions, then input the multi-layer perceptron, and finally get the link probability between a user and attractions [23, 24]. The input vector x0represents the connection between the user and the embedded representation of the sights, and the formula is shown in (8).(8)x0=Euil⊕Eajl.Among them,⊕ represents the embedded connection operation, and x0 is the output value through the first layer which is expressed as a formula (9).(9)x1=hw1x0+b1′,where w1is the weight matrix, b1′ is the bias vector, and h( ) is the Leaky ReLU activation function x0. The output value passing through the lth layer is expressed as (10).(10)xl=hw1xl−1+bl′.The final link probability isui,aj shown in (11).(11)y⌢uiaj=σxl.Among them, it represents they⌢uiaj possibility of user interaction uiwith scenic spots aj. To give such a probabilistic interpretation, the output of the model should be restricted to the range [0, 1], so σ( ) is defined as a sigmoid probability function.


## 2.4. Tourism Seasonal Statistics

Tourism seasonality is mainly manifested in the unbalanced distribution of tourism reception time. According to the tourism information obtained in this study, taking Xi'an inbound tourism as an example, the statistical analysis of tourism seasonality and the temporal distribution characteristics of Xi'an inbound tourism flow can be carried out on the data: a conducted research using the number of tourists as an indicator. It mainly discusses three aspects: the change of the number of tourists with the month, the change in the number of tourists and the length of stay, and the change in the number of tourists and the number of accompanying persons. The seasonal intensity index and tourist characteristics are also analyzed.The calculation formula of the seasonal intensity index is formula (12):(12)R=∑i=112xi−8.33212,xi is the ratio of the number of tourists per month to the whole year. The closer the R value which is equal to zero, the more uniform the time distribution of tourism demand; the greater the R value, the greater the time change. Using social network analysis theory to study tourism, the research focuses on the following aspects.


### 2.4.1. Scale of Tourism Traffic Network

In the whole tourism flow network, the scale of the tourism network refers to the number of tourism network nodes (tourist attractions), the number of all possible relationships in the directed network graph is (12), and k represents the number of tourism nodes.(13)k∗k−1.The number of possible relations in an undirected network graph is (14), where k represents the number of traveling nodes.(14)k∗k−12.


### 2.4.2. Tourism Network Density

Its value is the ratio of the actual total number of connections to the theoretical total number of connections, reflecting the tightness of connections between all nodes. The tourism network density formulas (15) and (16) are given.(15)D=2∑i=1kdinik∗k−1,And in:(16)dini=∑j=1kdini,nj,where k is the number of nodes, D is the density of the tourism network, and the value ranges from 0 to 1.0 mean that there is no connection between nodes at all, and 1 means that under ideal conditions, all attractions are closely connected.The user visits the scenic spot set 1 browsed by the travel website. ForL1=I1,I2,…,Im any scenic spot in L1, there are three ways to access information: video, picture, and text, and the visit time is Tv,Tp,Ttrespectively set as. During a visit, users may visit the same attraction multiple times. If the time of each browsing is Tvi,Tpi,Tti, then the browsing time of the user for the three types of scenic spots information is the sum of the single browsing, and the calculation formula is as follows.(17)Tv=∑i=1nTvi;Tt=∑i=1nTti;Tp=∑i=1nTpi.Among them,n is the number of times the user browses the same scenic spot in one visit. In order to understand the user's interest in scenic spots, the interest degree R is introduced:(18)r=fTv,Tt,Tp.Taking the weighted average of the interest degree function,Tv,Tp,Ttthe amount of information people get through video is 2–3 times that of pictures and texts per unit time. Here, the weighted value of the video is set to 1/2. The weights of pictures and text are set to 1/4 respectively, so there is formula (19):(19)r=12Tv+14Tt+14Tp.Among them,Tvrepresents the weighted value of the video, Tt represents the weight of the picture, and Tp represents the weight of the text. Among all the scenic spots visited by the user at one time, the scenic spots with too low interest (less than 5 s) are excluded, and the remaining scenic spots sequence is L1=I1,I2,…,Im stored in the transaction database D.


## 2.4.1. Scale of Tourism Traffic Network

In the whole tourism flow network, the scale of the tourism network refers to the number of tourism network nodes (tourist attractions), the number of all possible relationships in the directed network graph is (12), and k represents the number of tourism nodes.(13)k∗k−1.The number of possible relations in an undirected network graph is (14), where k represents the number of traveling nodes.(14)k∗k−12.


## 2.4.2. Tourism Network Density

Its value is the ratio of the actual total number of connections to the theoretical total number of connections, reflecting the tightness of connections between all nodes. The tourism network density formulas (15) and (16) are given.(15)D=2∑i=1kdinik∗k−1,And in:(16)dini=∑j=1kdini,nj,where k is the number of nodes, D is the density of the tourism network, and the value ranges from 0 to 1.0 mean that there is no connection between nodes at all, and 1 means that under ideal conditions, all attractions are closely connected.The user visits the scenic spot set 1 browsed by the travel website. ForL1=I1,I2,…,Im any scenic spot in L1, there are three ways to access information: video, picture, and text, and the visit time is Tv,Tp,Ttrespectively set as. During a visit, users may visit the same attraction multiple times. If the time of each browsing is Tvi,Tpi,Tti, then the browsing time of the user for the three types of scenic spots information is the sum of the single browsing, and the calculation formula is as follows.(17)Tv=∑i=1nTvi;Tt=∑i=1nTti;Tp=∑i=1nTpi.Among them,n is the number of times the user browses the same scenic spot in one visit. In order to understand the user's interest in scenic spots, the interest degree R is introduced:(18)r=fTv,Tt,Tp.Taking the weighted average of the interest degree function,Tv,Tp,Ttthe amount of information people get through video is 2–3 times that of pictures and texts per unit time. Here, the weighted value of the video is set to 1/2. The weights of pictures and text are set to 1/4 respectively, so there is formula (19):(19)r=12Tv+14Tt+14Tp.Among them,Tvrepresents the weighted value of the video, Tt represents the weight of the picture, and Tp represents the weight of the text. Among all the scenic spots visited by the user at one time, the scenic spots with too low interest (less than 5 s) are excluded, and the remaining scenic spots sequence is L1=I1,I2,…,Im stored in the transaction database D.


## 3. Construction and Testing of Recommendation System for Smart Tourism Service

### 3.1. Framework Design of Tourism Service Recommendation System in Cloud Computing Environment

The tourism service recommendation system is implemented on the Hadoop platform, which can not only solve the storage problem of massive tourism data but also solve the complex computing problem. Cloud service is not only a kind of distributed computing but also the result of the hybrid evolution and jump of computer technologies such as distributed computing, utility computing, load balancing, parallel computing, network storage, hot backup redundancy, and virtualization. The system adopts BS architecture design, and the system architecture is shown in Figure5.Figure 5
Framework design of tourism service recommendation system in cloud computing environment.As shown in Figure5, the core of the whole system is to implement the recommendation algorithm on the cloud computing platform. In general, the system needs to complete four aspects of work: data collection, data analysis, recommendation algorithm parallelization, and service recommendation implementation.


#### 3.1.1. Service Recommendation Module

The service recommendation module is mainly composed of a data mining engine, the core of which is the M_CF algorithm. In addition to the offline algorithm part, the online recommendation service adopts the classic MVC development mode and finally presents the recommendation results to the user through the browser.


#### 3.1.2. Recommendation Service Modeling

In the system modeling, the whole recommendation service is divided into two parts: one is offline part and the other is online part. The offline part is used to generate association rules, and the online part is used to recommend results.In the offline part, two factors should be considered: the model design of the recommendation service and the rationality of the parameter setting of the association rules. The core of the offline part of the recommendation service model design is to implement the M_CF algorithm in a cloud environment. For the prepared data, it must be preprocessed and converted into transaction data that can be calculated by the M_CF algorithm. There are four steps to the completion of the algorithm. These four steps include setting the minimum support, generating frequent itemsets, filtering the generated itemsets with minimum confidence, and finally generating association rules. The offline part of the recommendation service is modeled as shown in Figure6.Figure 6
Offline rule base design model.As shown in Figure6, association rule mining needs to focus on two parameters: support and confidence. In this system, the selection of support parameter values needs to be determined according to the total transaction volume and should not be too high or too low. If the parameter value is set too high, the number of mining results will be too low. If the parameter value is set too low, it will result in too many mining results and poor experience. For the confidence, the algorithm can directly calculate, and the system can select the top N results with the highest confidence (N can be set by yourself) to generate the final association rule. The online portion of the model design is shown in Figure 7.Figure 7
Online part of model design.As shown in Figure7, the model design of the online part adopts the classic MVC development mode, and the system architecture includes the view layer (or presentation layer), business logic layer, and storage layer. Each layer of the three-tier architecture depends on each other: the view layer depends on the business logic layer, and the business logic layer depends on the storage layer, reflecting the idea of “high cohesion, low coupling”. The online part mainly completes the recommendation service. According to the user's usage of the system, the system will provide users with popular and personalized travel service recommendations.


#### 3.1.3. Service Recommendation Process

The whole system adopts BS architecture, and users access server resources through browsers. The execution process for the user to obtain the relevant recommendation information is that the user needs to log in to the system first. By browsing the resources on the website, the generated association rule set, browsing records, and records of the user's scenic spots can be matched according to the user's interest records. If the corresponding result set is queried, the server will return it, and the user can view it through the browser.


#### 3.1.4. Recommendation Center

The recommendation center is the key module of the smart tourism recommendation system. According to the calculation formula of tourism statistics in the previous part, calculate the actual data in the system, and then combine the test cases with these actual data, as well as the analysis and data sorting of the system database, to complete the functional test of the recommendation center. The results of the dataset ranking part in the recommender system are shown in Table1.Table 1
System dataset information record table.
UserUser weightBannerNumber of hotelsNumber of attractions0012120950800281233120003813986320048117845300531503330006304595007508366008607641As shown in Table1, the test data come from the real data of users in the intelligent travel recommendation system. The dataset contains 5000 related ratings of 1082 hotels and attractions by 443 users, as well as users' initial weight information and user tagging information. When the flag is 0, it means a new user, and when the value is 1, it means an old user. The data information record table lists the number of specific attractions and hotels corresponding to each user. The scenic spot recommendation and hotel recommendation data are stored in the server database cqtour, the biz_spots_xu table stores the scenic spot recommendation data, and the biz_hotelxu table stores the hotel recommendation data.By sorting out the database information, the test information sorting table of the itinerary module is completed. In the table, the priorities of randomly selected different users, whether the line details function is passed, the number of recommendations, and whether the recommendations are accurate are sorted. The results are shown in Table2.Table 2
Trip module test information schedule.
UserPriorityLine detailsRecommended number of tripsIs it accurateuser_ _ _OneGo through15Yesuser bSecondGo through20Yesuser cCGo through20Yesuser dDGo through20YesAs shown in Table2, different users correspond to different priorities. Combined with the improved algorithm, the system recommends itineraries that meet the basic needs of users, and the recommendation results are accurate. The system can recommend 15–20 itineraries, which basically meet the requirements. The system provides the user with the specific line situation of the starting point and passes the test.


### 3.2. System Performance Test

The concurrency of the intelligent travel recommendation system needs to be tested. Using the stress test master to simulate, as long as simple parameter configuration, the system can be tested under high concurrency. By completing the configuration work such as the number of test users, the number of new users in the same time period, and adding server monitoring, the test can be performed.Take the system login page as an example for performance testing. 10 test users are added in each stage, the interval between each stage is 30 s, and the current maximum is 200. After the current test task is completed, increase or decrease the concurrent number according to the performance test requirements, and calculate all test results. The obtained test results are shown in Table3.Table 3
Test results under different concurrency.
ConcurrencyAverage server processing time (ms)Throughput (requests/sec)User wait time (ms)10034.4575.2345.3920045.3474.2899.8330044.8176.59205.7840043.3378.523049.8250050.4876.658946.2360048.2177.2310668.79As can be seen from Table3, when the number of concurrency is 100, the processing time of the server is 34.45 ms, the throughput rate is 75.23 req/s, and the user waiting time is the least, which is 45.39 ms. As the concurrency increased from 100 to 600, the throughput and average server processing time fluctuated up and down, and eventually stabilized. However, the user's wait time gradually increases as the concurrency increases. Through comprehensive analysis, it can be seen that all data have reached the expected target of software performance.After completing the system performance test, the performance of the key modules involved in the study needs to be tested. In this study, the relevant performance tests of the recommendation module and the security module are carried out.


#### 3.2.1. Recommended Modules

The traditional algorithm and the M_CF algorithm are respectively applied to the recommendation system. Collect and sort the real data of system users, get the recommended information amount under different algorithm results, and sort the data of the algorithm recommended information amount. The abscissa is the number of days for the user to make system recommendations, and the ordinate is the number of recommended information. In different time periods, the recommended information amounts of the original recommendation algorithm and the M_CF algorithm for different types of users are compared, and the results are shown in Figure8.Figure 8
The amount of information recommended by the algorithm. (a) New user. (b) Old user.As shown in Figure8, by analyzing the actual data of users in the system, the amount of information recommended by the M_CF algorithm to users at each time point is greater than that recommended by the CF algorithm. By comparing the amount of information recommended by new users and old users, it can be seen that the amount of information recommended by old users is generally greater than the amount of information recommended by new users. During the initial testing period, the amount of recommended information for old users was much larger than that for new users, but after a period of time, the gap became smaller and smaller.It can be seen from the comparison that the M_CF algorithm recommends more items at the same time than the traditional algorithm. In the time period before 10 days, it can be understood that a new user entered the system. The number of new users recommended by the M_CF algorithm is larger than that of the traditional algorithm, and the growth rate of the recommended number per unit time is higher than that of the traditional algorithm. The number of recommendations for the M_CF algorithm stabilizes over time. To sum up, the improved algorithm has better and more stable performance than the traditional algorithm when dealing with different types of users, especially new users. According to the interests of different users, the improved algorithm can accurately and appropriately recommend some options that meet their interests for users to make decisions.The stress test main software is used to simulate the scenario of the recommended module. The initial number of people is set to 10, the new number of people at the same time interval is 10, each time period is 30 s, the packet sending interval is 1 ms, and the maximum number of people is 200. After completing the relevant configuration, select the single-scenario mode, add server monitoring, and test. Figures9 and 10 show the results of the number of people online and trend graphs of instantaneous TPS and transaction processing time.Figure 9
Online population results and instantaneous TPS trend graph (a) Number of people online (b) Instantaneous TPS trend.
(a)(b)Figure 10
Trading hours.As can be seen from Figures9 and 10, when the request increases from 10 to 200, the TPS reaches the maximum value of 500/s and stabilizes at around 421/s. The average transaction response time is 236.15 ms, and the maximum response time is 7.5 s, but the proportion is small. Through comprehensive analysis, it can be seen that all data have reached the expected target of software performance. The stress test master is also used to test the system response time of the recommendation center module under different user numbers, different concurrency, and different database levels. The test results are shown in Table 4.Table 4
Recommended module information collation.
User IDConcurrencyDatabase levelResponse time (seconds)50210000.6200250001.350250000.9200210000.950510000.8200510001.050550001.1200550001.5As shown in Table4, the test system is repeatedly tested by switching the number of users, the number of concurrent users, and the database level. When the number of users is 50, the system response times are 0.9 s and 1 s respectively under different concurrency and database levels, especially in the case of high throughput, indicating that the system runs stably. When the number of users is 200, the number of concurrent users is 5 and the throughput is high, the system response time is 1.5 s. In summary, the recommended system in this study has high stability and basically meets the system performance requirements.


#### 3.2.2. Security Module

The special landform leads to the occurrence of safety situations and the problem of untimely safety treatment. This study designs a security module. After the functional test of the security module is completed, the performance test of the security module is required. The single-mode performance test of the security module is carried out through the main control of the pressure measurement, and the configuration of relevant parameters is completed. Through the network column in the Google Chrome developer tools, you can view the response time of each process, and use the browser developer tools to debug and test. The stress test master has completed the test of the positioning and reflection time, alarm time, and transaction processing time of the security module under different user numbers. The information arrangement of the security module is shown in Table5.Table 5
Security module information organization.
User IDPositioning time (s)One-keyalarm time (s)Processingtime (s)100.05L10500.11The 501000.11.5702000.11.585As can be seen from Table5, with the continuous increase in the number of users, the positioning time of the security module has also increased, but it tends to be stable, and the time of the system's one-key alarm is also fixed at a stable value. When the number of users is 10, the security event processing time is 10 s, which is the minimum value; when the number of users reaches 200, the security processing time reaches the maximum value, and the processing time is 85 s, which basically meets the needs of users. In summary, the security module basically meets the system performance requirements.


## 3.1. Framework Design of Tourism Service Recommendation System in Cloud Computing Environment

The tourism service recommendation system is implemented on the Hadoop platform, which can not only solve the storage problem of massive tourism data but also solve the complex computing problem. Cloud service is not only a kind of distributed computing but also the result of the hybrid evolution and jump of computer technologies such as distributed computing, utility computing, load balancing, parallel computing, network storage, hot backup redundancy, and virtualization. The system adopts BS architecture design, and the system architecture is shown in Figure5.Figure 5
Framework design of tourism service recommendation system in cloud computing environment.As shown in Figure5, the core of the whole system is to implement the recommendation algorithm on the cloud computing platform. In general, the system needs to complete four aspects of work: data collection, data analysis, recommendation algorithm parallelization, and service recommendation implementation.


### 3.1.1. Service Recommendation Module

The service recommendation module is mainly composed of a data mining engine, the core of which is the M_CF algorithm. In addition to the offline algorithm part, the online recommendation service adopts the classic MVC development mode and finally presents the recommendation results to the user through the browser.


### 3.1.2. Recommendation Service Modeling

In the system modeling, the whole recommendation service is divided into two parts: one is offline part and the other is online part. The offline part is used to generate association rules, and the online part is used to recommend results.In the offline part, two factors should be considered: the model design of the recommendation service and the rationality of the parameter setting of the association rules. The core of the offline part of the recommendation service model design is to implement the M_CF algorithm in a cloud environment. For the prepared data, it must be preprocessed and converted into transaction data that can be calculated by the M_CF algorithm. There are four steps to the completion of the algorithm. These four steps include setting the minimum support, generating frequent itemsets, filtering the generated itemsets with minimum confidence, and finally generating association rules. The offline part of the recommendation service is modeled as shown in Figure6.Figure 6
Offline rule base design model.As shown in Figure6, association rule mining needs to focus on two parameters: support and confidence. In this system, the selection of support parameter values needs to be determined according to the total transaction volume and should not be too high or too low. If the parameter value is set too high, the number of mining results will be too low. If the parameter value is set too low, it will result in too many mining results and poor experience. For the confidence, the algorithm can directly calculate, and the system can select the top N results with the highest confidence (N can be set by yourself) to generate the final association rule. The online portion of the model design is shown in Figure 7.Figure 7
Online part of model design.As shown in Figure7, the model design of the online part adopts the classic MVC development mode, and the system architecture includes the view layer (or presentation layer), business logic layer, and storage layer. Each layer of the three-tier architecture depends on each other: the view layer depends on the business logic layer, and the business logic layer depends on the storage layer, reflecting the idea of “high cohesion, low coupling”. The online part mainly completes the recommendation service. According to the user's usage of the system, the system will provide users with popular and personalized travel service recommendations.


### 3.1.3. Service Recommendation Process

The whole system adopts BS architecture, and users access server resources through browsers. The execution process for the user to obtain the relevant recommendation information is that the user needs to log in to the system first. By browsing the resources on the website, the generated association rule set, browsing records, and records of the user's scenic spots can be matched according to the user's interest records. If the corresponding result set is queried, the server will return it, and the user can view it through the browser.


### 3.1.4. Recommendation Center

The recommendation center is the key module of the smart tourism recommendation system. According to the calculation formula of tourism statistics in the previous part, calculate the actual data in the system, and then combine the test cases with these actual data, as well as the analysis and data sorting of the system database, to complete the functional test of the recommendation center. The results of the dataset ranking part in the recommender system are shown in Table1.Table 1
System dataset information record table.
UserUser weightBannerNumber of hotelsNumber of attractions0012120950800281233120003813986320048117845300531503330006304595007508366008607641As shown in Table1, the test data come from the real data of users in the intelligent travel recommendation system. The dataset contains 5000 related ratings of 1082 hotels and attractions by 443 users, as well as users' initial weight information and user tagging information. When the flag is 0, it means a new user, and when the value is 1, it means an old user. The data information record table lists the number of specific attractions and hotels corresponding to each user. The scenic spot recommendation and hotel recommendation data are stored in the server database cqtour, the biz_spots_xu table stores the scenic spot recommendation data, and the biz_hotelxu table stores the hotel recommendation data.By sorting out the database information, the test information sorting table of the itinerary module is completed. In the table, the priorities of randomly selected different users, whether the line details function is passed, the number of recommendations, and whether the recommendations are accurate are sorted. The results are shown in Table2.Table 2
Trip module test information schedule.
UserPriorityLine detailsRecommended number of tripsIs it accurateuser_ _ _OneGo through15Yesuser bSecondGo through20Yesuser cCGo through20Yesuser dDGo through20YesAs shown in Table2, different users correspond to different priorities. Combined with the improved algorithm, the system recommends itineraries that meet the basic needs of users, and the recommendation results are accurate. The system can recommend 15–20 itineraries, which basically meet the requirements. The system provides the user with the specific line situation of the starting point and passes the test.


## 3.1.1. Service Recommendation Module

The service recommendation module is mainly composed of a data mining engine, the core of which is the M_CF algorithm. In addition to the offline algorithm part, the online recommendation service adopts the classic MVC development mode and finally presents the recommendation results to the user through the browser.


## 3.1.2. Recommendation Service Modeling

In the system modeling, the whole recommendation service is divided into two parts: one is offline part and the other is online part. The offline part is used to generate association rules, and the online part is used to recommend results.In the offline part, two factors should be considered: the model design of the recommendation service and the rationality of the parameter setting of the association rules. The core of the offline part of the recommendation service model design is to implement the M_CF algorithm in a cloud environment. For the prepared data, it must be preprocessed and converted into transaction data that can be calculated by the M_CF algorithm. There are four steps to the completion of the algorithm. These four steps include setting the minimum support, generating frequent itemsets, filtering the generated itemsets with minimum confidence, and finally generating association rules. The offline part of the recommendation service is modeled as shown in Figure6.Figure 6
Offline rule base design model.As shown in Figure6, association rule mining needs to focus on two parameters: support and confidence. In this system, the selection of support parameter values needs to be determined according to the total transaction volume and should not be too high or too low. If the parameter value is set too high, the number of mining results will be too low. If the parameter value is set too low, it will result in too many mining results and poor experience. For the confidence, the algorithm can directly calculate, and the system can select the top N results with the highest confidence (N can be set by yourself) to generate the final association rule. The online portion of the model design is shown in Figure 7.Figure 7
Online part of model design.As shown in Figure7, the model design of the online part adopts the classic MVC development mode, and the system architecture includes the view layer (or presentation layer), business logic layer, and storage layer. Each layer of the three-tier architecture depends on each other: the view layer depends on the business logic layer, and the business logic layer depends on the storage layer, reflecting the idea of “high cohesion, low coupling”. The online part mainly completes the recommendation service. According to the user's usage of the system, the system will provide users with popular and personalized travel service recommendations.


## 3.1.3. Service Recommendation Process

The whole system adopts BS architecture, and users access server resources through browsers. The execution process for the user to obtain the relevant recommendation information is that the user needs to log in to the system first. By browsing the resources on the website, the generated association rule set, browsing records, and records of the user's scenic spots can be matched according to the user's interest records. If the corresponding result set is queried, the server will return it, and the user can view it through the browser.


## 3.1.4. Recommendation Center

The recommendation center is the key module of the smart tourism recommendation system. According to the calculation formula of tourism statistics in the previous part, calculate the actual data in the system, and then combine the test cases with these actual data, as well as the analysis and data sorting of the system database, to complete the functional test of the recommendation center. The results of the dataset ranking part in the recommender system are shown in Table1.Table 1
System dataset information record table.
UserUser weightBannerNumber of hotelsNumber of attractions0012120950800281233120003813986320048117845300531503330006304595007508366008607641As shown in Table1, the test data come from the real data of users in the intelligent travel recommendation system. The dataset contains 5000 related ratings of 1082 hotels and attractions by 443 users, as well as users' initial weight information and user tagging information. When the flag is 0, it means a new user, and when the value is 1, it means an old user. The data information record table lists the number of specific attractions and hotels corresponding to each user. The scenic spot recommendation and hotel recommendation data are stored in the server database cqtour, the biz_spots_xu table stores the scenic spot recommendation data, and the biz_hotelxu table stores the hotel recommendation data.By sorting out the database information, the test information sorting table of the itinerary module is completed. In the table, the priorities of randomly selected different users, whether the line details function is passed, the number of recommendations, and whether the recommendations are accurate are sorted. The results are shown in Table2.Table 2
Trip module test information schedule.
UserPriorityLine detailsRecommended number of tripsIs it accurateuser_ _ _OneGo through15Yesuser bSecondGo through20Yesuser cCGo through20Yesuser dDGo through20YesAs shown in Table2, different users correspond to different priorities. Combined with the improved algorithm, the system recommends itineraries that meet the basic needs of users, and the recommendation results are accurate. The system can recommend 15–20 itineraries, which basically meet the requirements. The system provides the user with the specific line situation of the starting point and passes the test.


## 3.2. System Performance Test

The concurrency of the intelligent travel recommendation system needs to be tested. Using the stress test master to simulate, as long as simple parameter configuration, the system can be tested under high concurrency. By completing the configuration work such as the number of test users, the number of new users in the same time period, and adding server monitoring, the test can be performed.Take the system login page as an example for performance testing. 10 test users are added in each stage, the interval between each stage is 30 s, and the current maximum is 200. After the current test task is completed, increase or decrease the concurrent number according to the performance test requirements, and calculate all test results. The obtained test results are shown in Table3.Table 3
Test results under different concurrency.
ConcurrencyAverage server processing time (ms)Throughput (requests/sec)User wait time (ms)10034.4575.2345.3920045.3474.2899.8330044.8176.59205.7840043.3378.523049.8250050.4876.658946.2360048.2177.2310668.79As can be seen from Table3, when the number of concurrency is 100, the processing time of the server is 34.45 ms, the throughput rate is 75.23 req/s, and the user waiting time is the least, which is 45.39 ms. As the concurrency increased from 100 to 600, the throughput and average server processing time fluctuated up and down, and eventually stabilized. However, the user's wait time gradually increases as the concurrency increases. Through comprehensive analysis, it can be seen that all data have reached the expected target of software performance.After completing the system performance test, the performance of the key modules involved in the study needs to be tested. In this study, the relevant performance tests of the recommendation module and the security module are carried out.


### 3.2.1. Recommended Modules

The traditional algorithm and the M_CF algorithm are respectively applied to the recommendation system. Collect and sort the real data of system users, get the recommended information amount under different algorithm results, and sort the data of the algorithm recommended information amount. The abscissa is the number of days for the user to make system recommendations, and the ordinate is the number of recommended information. In different time periods, the recommended information amounts of the original recommendation algorithm and the M_CF algorithm for different types of users are compared, and the results are shown in Figure8.Figure 8
The amount of information recommended by the algorithm. (a) New user. (b) Old user.As shown in Figure8, by analyzing the actual data of users in the system, the amount of information recommended by the M_CF algorithm to users at each time point is greater than that recommended by the CF algorithm. By comparing the amount of information recommended by new users and old users, it can be seen that the amount of information recommended by old users is generally greater than the amount of information recommended by new users. During the initial testing period, the amount of recommended information for old users was much larger than that for new users, but after a period of time, the gap became smaller and smaller.It can be seen from the comparison that the M_CF algorithm recommends more items at the same time than the traditional algorithm. In the time period before 10 days, it can be understood that a new user entered the system. The number of new users recommended by the M_CF algorithm is larger than that of the traditional algorithm, and the growth rate of the recommended number per unit time is higher than that of the traditional algorithm. The number of recommendations for the M_CF algorithm stabilizes over time. To sum up, the improved algorithm has better and more stable performance than the traditional algorithm when dealing with different types of users, especially new users. According to the interests of different users, the improved algorithm can accurately and appropriately recommend some options that meet their interests for users to make decisions.The stress test main software is used to simulate the scenario of the recommended module. The initial number of people is set to 10, the new number of people at the same time interval is 10, each time period is 30 s, the packet sending interval is 1 ms, and the maximum number of people is 200. After completing the relevant configuration, select the single-scenario mode, add server monitoring, and test. Figures9 and 10 show the results of the number of people online and trend graphs of instantaneous TPS and transaction processing time.Figure 9
Online population results and instantaneous TPS trend graph (a) Number of people online (b) Instantaneous TPS trend.
(a)(b)Figure 10
Trading hours.As can be seen from Figures9 and 10, when the request increases from 10 to 200, the TPS reaches the maximum value of 500/s and stabilizes at around 421/s. The average transaction response time is 236.15 ms, and the maximum response time is 7.5 s, but the proportion is small. Through comprehensive analysis, it can be seen that all data have reached the expected target of software performance. The stress test master is also used to test the system response time of the recommendation center module under different user numbers, different concurrency, and different database levels. The test results are shown in Table 4.Table 4
Recommended module information collation.
User IDConcurrencyDatabase levelResponse time (seconds)50210000.6200250001.350250000.9200210000.950510000.8200510001.050550001.1200550001.5As shown in Table4, the test system is repeatedly tested by switching the number of users, the number of concurrent users, and the database level. When the number of users is 50, the system response times are 0.9 s and 1 s respectively under different concurrency and database levels, especially in the case of high throughput, indicating that the system runs stably. When the number of users is 200, the number of concurrent users is 5 and the throughput is high, the system response time is 1.5 s. In summary, the recommended system in this study has high stability and basically meets the system performance requirements.


### 3.2.2. Security Module

The special landform leads to the occurrence of safety situations and the problem of untimely safety treatment. This study designs a security module. After the functional test of the security module is completed, the performance test of the security module is required. The single-mode performance test of the security module is carried out through the main control of the pressure measurement, and the configuration of relevant parameters is completed. Through the network column in the Google Chrome developer tools, you can view the response time of each process, and use the browser developer tools to debug and test. The stress test master has completed the test of the positioning and reflection time, alarm time, and transaction processing time of the security module under different user numbers. The information arrangement of the security module is shown in Table5.Table 5
Security module information organization.
User IDPositioning time (s)One-keyalarm time (s)Processingtime (s)100.05L10500.11The 501000.11.5702000.11.585As can be seen from Table5, with the continuous increase in the number of users, the positioning time of the security module has also increased, but it tends to be stable, and the time of the system's one-key alarm is also fixed at a stable value. When the number of users is 10, the security event processing time is 10 s, which is the minimum value; when the number of users reaches 200, the security processing time reaches the maximum value, and the processing time is 85 s, which basically meets the needs of users. In summary, the security module basically meets the system performance requirements.


## 3.2.1. Recommended Modules

The traditional algorithm and the M_CF algorithm are respectively applied to the recommendation system. Collect and sort the real data of system users, get the recommended information amount under different algorithm results, and sort the data of the algorithm recommended information amount. The abscissa is the number of days for the user to make system recommendations, and the ordinate is the number of recommended information. In different time periods, the recommended information amounts of the original recommendation algorithm and the M_CF algorithm for different types of users are compared, and the results are shown in Figure8.Figure 8
The amount of information recommended by the algorithm. (a) New user. (b) Old user.As shown in Figure8, by analyzing the actual data of users in the system, the amount of information recommended by the M_CF algorithm to users at each time point is greater than that recommended by the CF algorithm. By comparing the amount of information recommended by new users and old users, it can be seen that the amount of information recommended by old users is generally greater than the amount of information recommended by new users. During the initial testing period, the amount of recommended information for old users was much larger than that for new users, but after a period of time, the gap became smaller and smaller.It can be seen from the comparison that the M_CF algorithm recommends more items at the same time than the traditional algorithm. In the time period before 10 days, it can be understood that a new user entered the system. The number of new users recommended by the M_CF algorithm is larger than that of the traditional algorithm, and the growth rate of the recommended number per unit time is higher than that of the traditional algorithm. The number of recommendations for the M_CF algorithm stabilizes over time. To sum up, the improved algorithm has better and more stable performance than the traditional algorithm when dealing with different types of users, especially new users. According to the interests of different users, the improved algorithm can accurately and appropriately recommend some options that meet their interests for users to make decisions.The stress test main software is used to simulate the scenario of the recommended module. The initial number of people is set to 10, the new number of people at the same time interval is 10, each time period is 30 s, the packet sending interval is 1 ms, and the maximum number of people is 200. After completing the relevant configuration, select the single-scenario mode, add server monitoring, and test. Figures9 and 10 show the results of the number of people online and trend graphs of instantaneous TPS and transaction processing time.Figure 9
Online population results and instantaneous TPS trend graph (a) Number of people online (b) Instantaneous TPS trend.
(a)(b)Figure 10
Trading hours.As can be seen from Figures9 and 10, when the request increases from 10 to 200, the TPS reaches the maximum value of 500/s and stabilizes at around 421/s. The average transaction response time is 236.15 ms, and the maximum response time is 7.5 s, but the proportion is small. Through comprehensive analysis, it can be seen that all data have reached the expected target of software performance. The stress test master is also used to test the system response time of the recommendation center module under different user numbers, different concurrency, and different database levels. The test results are shown in Table 4.Table 4
Recommended module information collation.
User IDConcurrencyDatabase levelResponse time (seconds)50210000.6200250001.350250000.9200210000.950510000.8200510001.050550001.1200550001.5As shown in Table4, the test system is repeatedly tested by switching the number of users, the number of concurrent users, and the database level. When the number of users is 50, the system response times are 0.9 s and 1 s respectively under different concurrency and database levels, especially in the case of high throughput, indicating that the system runs stably. When the number of users is 200, the number of concurrent users is 5 and the throughput is high, the system response time is 1.5 s. In summary, the recommended system in this study has high stability and basically meets the system performance requirements.


## 3.2.2. Security Module

The special landform leads to the occurrence of safety situations and the problem of untimely safety treatment. This study designs a security module. After the functional test of the security module is completed, the performance test of the security module is required. The single-mode performance test of the security module is carried out through the main control of the pressure measurement, and the configuration of relevant parameters is completed. Through the network column in the Google Chrome developer tools, you can view the response time of each process, and use the browser developer tools to debug and test. The stress test master has completed the test of the positioning and reflection time, alarm time, and transaction processing time of the security module under different user numbers. The information arrangement of the security module is shown in Table5.Table 5
Security module information organization.
User IDPositioning time (s)One-keyalarm time (s)Processingtime (s)100.05L10500.11The 501000.11.5702000.11.585As can be seen from Table5, with the continuous increase in the number of users, the positioning time of the security module has also increased, but it tends to be stable, and the time of the system's one-key alarm is also fixed at a stable value. When the number of users is 10, the security event processing time is 10 s, which is the minimum value; when the number of users reaches 200, the security processing time reaches the maximum value, and the processing time is 85 s, which basically meets the needs of users. In summary, the security module basically meets the system performance requirements.


## 4. Conclusion

Writing data mining algorithms to solve big data problems in cloud environments is an important and meaningful task. In practice, it tries to solve practical application problems. The overall architecture design of the smart tourism recommendation system is introduced, and the function and performance requirements of the smart tourism recommendation system are analyzed. Finally, through the selection of the architecture and the related requirements of the system, the development plan, and architecture of the system are clarified. The existing recommendation algorithms are studied, including the relevant background of the algorithm, specific application scenarios, and the advantages and disadvantages of the algorithm, which provides a theoretical basis for the research of collaborative filtering algorithms. Then, after completing the in-depth research on the collaborative filtering recommendation algorithm, the problems existing in the algorithm are sorted out, and the relevant materials are consulted. Finally, the improvement of the collaborative filtering algorithm is completed. According to the demand analysis and development plan of the recommendation system, the functional module design of the smart tourism recommendation system is completed. Through the analysis of the test plan, the design of the system test plan is completed. The construction of the system test environment and the design of each test case were completed, and the functional test and performance test of the intelligent travel recommendation system were carried out. The test results show that the operation of the smart tourism recommendation system basically achieves the expected goals and the effect is good. The data source of this study is relatively simple, and it is necessary to collect more abundant data in future research work, comprehensively consider the problem, and avoid chance and one-sidedness.



---

*Source: 4021706-2022-09-13.xml*