Abstract

The key technology of online travel recommendation system has been widely concerned by many Internet experts. This paper studies and designs a scenario aware service model in online travel planning system and proposes an online travel planning recommendation model which integrates collaborative filtering and clustering personalized recommendation algorithm. At the same time, the algorithm performance test method and model evaluation index are given. The results show that CTTCF algorithm can find more neighbor users than UCF algorithm, and the smaller the search space is, the more significant the advantage is. The number of neighbors is 5, 10, 15, 20, and 25, respectively, and the corresponding average absolute error values are about 0.815, 0.785, 0.765, 0.758, and 0.755, respectively. The scores of the six emotional travel itinerary recommendation schemes are all higher than 142 points. Only the two schemes have no obvious rendering effect. The proposed online travel itinerary planning scheme has potential value and important significance in the application of follow-up recommendation system. It solves the problem of low scene perception satisfaction in the key technologies of online tourism planning system.

1. Introduction

With the continuous development of Internet technology and mobile device positioning technology, online travel planning system provides more and more travel convenience opportunities for customers [1]. The common recommendation system can be used as a way of information filtering, and it is an effective means to deal with the phenomenon of information overload. The system is based on the project model and user model, and its purpose is to find the project needed by the target user [2]. At present, context aware service is a key element in online travel planning system. The most widely used emotion analysis methods are machine learning and dictionary. Sentiment analysis through dictionaries is to determine the sentiment tendency of the text according to the integration of text vocabulary. According to different sources of sentiment dictionaries, it is divided into dynamic dictionary analysis method and existing dictionary analysis method [3]. Through machine learning, sentiment analysis methods are divided into naive Bayes, neural network, support vector machine, and other text sentiment analysis methods.

In order to solve the heavy task of maintaining and regularly updating the transit information of the transit travel planner’s proprietary system and the problem that it is difficult to take advantage of the rapid development of geospatial information and network technology, Daniel et al. adopted an open and interoperable transit travel planning system with a service-oriented architecture, reused the existing modular resources, and integrated them in a loosely coupled way. Finally, it is found that this method makes the system more stable and can effectively use the discovery of network technology [4]. In order to study a set of online tourism planning system, which can meet the more needs of self-help tourists and provide high-quality tourism services, Dong et al. conducted in-depth research on self-help tourism route planning through genetic algorithm. Taking into account the distance of scenic spots, travel time, geographical location, temperature, and other factors, team successfully designed a more reasonable, humanized, and intelligent tourism route planning system and travel recommendation system and can meet the needs of free tourists in the urban area independent planning of tourism routes [5]. In order to support the collaborative search system of tourists’ online information search activities and tourism planning, Arif et al. conducted a survey on 18 pairs of participants’ users. The questionnaire, online search log, and chat record before and after the search were statistically analyzed by SPSS software. The results showed that the formulation of collaborative query, the division of search tasks, chat, and result sharing were the key factors of tourists’ collaborative search. Search is an important means [6]. Choi et al. studied the technical attributes of the number and types of visual cues related to the source of online travel media by analyzing the source of online travel information; we can test the relationship between visual cues related to the source, perception induced by cues, information credibility and destination map image from the aspects of specialization, endorsement, and star rating of other users, so as to reflect the technical function and psychological effect. The results show that tourists’ data hints about source correlation are closely related [7]. In order to understand the effectiveness of the multistate hypernetwork method for travelers in studying the impact of land use and transportation scenarios on individual travel modes, the multistate hypernetwork can represent the activity travel mode at a higher level of detail, including the choice of mode, route, parking, and activity location. Finally, it is found that various activity travel preferences can be adapted in the super network [8].

Long et al. studied the optimal pricing strategy when the travel operator and online travel agency realized o2o model through online sales and offline service cooperation. By constructing a competition model, this paper analyzes and compares the cooperation conditions, pricing strategies, and revenue in Stackelberg and Bertrand games. The results show that service level, unit sales commission, service cost coefficient, and unit service compensation coefficient have different effects on the pricing decisions of tourism operators and online travel agencies [9]. In order to find out the topic and compare different online travel reviews, Hou et al. used semantic association analysis method to extract the topic words from the reviews of three domestic online travel agencies and build a semantic association network. It is found that there are obvious differences in these structural attribute platforms, theme distribution, and community relations, which provides new insights for the development of new hotels, tourists, tourism enterprises, and online travel agencies [10]. In order to investigate the direct impact of brand trust on brand personality, the team of Hahy demonstrated the relationship between brand development process and carry forward effect and time effect through a longitudinal study of online tourism consumers. The results show that when the change of consumer perception involves brand evaluation, the three dimensions of brand personality will be reevaluated [11]. In order to evaluate the implementation of soft transportation policies and measures of voluntary travel behavior to reduce automobile dependence, Melloni et al. conducted analysis after the implementation of soft sensor survey. The results showed that different behavior policy measures would have an impact on people’s self-travel plans, and positive policies were more conducive to reducing automobile dependence in travel plans [12]. In order to understand the understanding of Asian residents on cruise tourism, Kang et al. selected two major daily newspapers in Jeju Island to analyze the contents of editorials and columns. The results show that local residents believe that cruise tourism has a greater impact on the local economy, and they generally believe that cruise tourism should be promoted [13]. In order to build a travel itinerary planning system, which is more conducive for travelers to provide as many tourist attractions as possible in limited time, Nopasit team proposed a routing algorithm to find candidate itinerary. By measuring seven travel situations under different time related factors, the performance of the developed travel itinerary planning system was evaluated, and the results show that the total efficiency of the new system is high. The volume availability is at a very satisfactory level [14].

To sum up, the key technologies of online travel planning system have made some achievements, such as data preprocessing technology, emotion analysis method, recommendation algorithm, and recommendation system evaluation. This paper studies the key technologies of online travel planning system for context aware service, which is composed of four parts. The second part mainly introduces the design of context aware service model in online travel planning system. The third part focuses on the analysis of online travel planning recommendation model. The fourth part focuses on the online travel planning system situational awareness service effect analysis. The fifth part summarizes the research results and points out the shortcomings and prospects of the research.

3. Design of Context Aware Service Model in Online Travel Planning System

Perfect online travel planning system includes user and server access and response, data mining and processing, and personalized travel recommendation. The recommendation function can complete the collation and mining of data according to the user’s search records and then provide users with courses of interest. Generally, the recommendation degree of the project is evaluated by the scoring information of the project. The structure of personalized online travel planning recommendation system is shown in Figure 1. First, users access the front-end web server, including user registration, search, purchase, evaluation, and other operations in the client. Then, the information is sent to the transaction processor for encoding and obtaining structured information. After that, data processing and mining are completed by data mining engine, and user interest model is created. The model has two functions: one is to store the information in the model library to prepare for the retrieval of personalized recommendation engine at any time; the other is to store the information in the database to facilitate the retrieval of data processor. Finally, the personalized engine completes the calculation of the data obtained by data processing according to the algorithm and then recommends the journey that the user really needs to realize the personalized recommendation [15]. Personalized recommendation engine includes personalized recommendation technology and corresponding algorithm. The efficient use of technology and algorithm can ensure the efficiency and accuracy of recommendation.

The schematic diagram of online travel itinerary planning is shown in Figure 2. The result of planning recommendation is a process from starting point to dark circle. The arrow represents the travel plan based on the selection transfer rate higher than the threshold. According to customers’ travel time and space, select any location in the favorite location list and generate multiple travel routes at the same time. The nodes in the graph are set as location point mapping, and the path between nodes in the graph is path planning. In the process of mobile node, the transition probability between two points is . The node with higher probability is selected from the range of candidate nodes, and then a threshold point is set to select multiple transferable location points. When the transition probability of all candidate nodes is 0, the route planning is finished.

This paper studies the construction of emotional analysis model, analyzes human emotions through digital and modeling methods, obtains analysis results by combining external factors and emotional characteristics, and obtains emotional state changes in the form of hierarchical or quantitative. Emotional analysis includes extraction, classification, retrieval, and inclusion of emotional information [16]. The vocabulary of afinn emotion model is much lower than sentiwordnet. The latest edition of afinn includes 2477 phrases and words. The polarity of affective words is divided into negative affective words and positive affective words, the number of which is 1598 and 879, respectively, the corresponding score is 2.07 and 2.11, respectively, and the score of combining the two words is 0.26. The frequency of negative and positive emotion words was 1.12 and 1.6, respectively. The formula for calculating the score of the whole sentence is

In formula (1), refers to the initial emotional tendency score of the whole sentence, refers to the number of words containing afinn in the whole sentence, and the contextual emotional score of each emotional word ranges within [−5, 5].

4. Online Travel Planning Recommendation Model

The tourism records on the Internet are growing exponentially, and the tourism recommendation model has become an important reference for tourists to select scenic spots and routes. The traditional tourism recommendation model has various formats and uneven quality, which often makes travelers deeply involved, and it is difficult to get useful information efficiently, quickly, and accurately. At the same time, the existing scenic spot recommendation algorithms and tourism route planning methods consider a single factor, and it is difficult to be directly applied to a large number of tourism records.

In collaborative filtering algorithm (CF algorithm), users’ interests and ratings need to be considered when they are interested in resources. This paper studies the use of collaborative filtering based on time and trust (TTCF). The user similarity calculation method adopts the modified cosine similarity calculation. This method can get the similarity with time effect and can reflect the similarity of users’ current interests:

In formula (2), refers to the item set scored by two users, and and refer to the item set scored by user and user , respectively. After time decay, the score of of two users is denoted by and , respectively, and the average score of two users after time decay is denoted by and , respectively. User trust modeling includes direct trust and indirect trust. The direct trust degree optimizes the calculation formula of t-adoption rate combined with the change of user interest and then evaluates the trust relationship between users through the credibility index [17]. The credibility index fully considers the number of evaluation items of each user and the common scoring items of two users. The more common the scoring items among users, the higher the usability between users. Assuming that the scoring item sets of two users are denoted by and , respectively, the user with the most common scoring items is represented by , and the corresponding scoring item set is represented by ; then the calculation formula of the user’s credibility relative to the user is

In (3), and . Therefore, the calculation formula of direct trust is

In (4), refers to the t-adoption rate, and and represent the items recommended and adopted by users, respectively. It is necessary to set the difference threshold of prediction and real score. If it is greater than the threshold, it indicates that the user does not adopt the item; otherwise, it adopts the item. User indirect trust is calculated according to different trust transfer rules and different paths. The calculation process of user trust matrix is shown in Figure 3. The combined weight of trust and similarity is

In (5), the similarity of time-based users is represented by , the direct trust of two users is represented by , and the indirect trust of two users is represented by .

Personalized recommender integrated clustering with collaborative filtering based on time and trust is studied. The flow chart of CTTCF algorithm is shown in Figure 4. The similarity of feature attributes is calculated according to the user feature attribute matrix. Users with similar feature attributes are classified into the same cluster by K-means algorithm, and user clusters are obtained. Then, we calculate the similarity between the cluster centers and the target user to obtain the cluster to which the user belongs, build a user interest transfer model, and then attenuate the original score matrix to get the score similarity value of the same cluster of users [18]. We build user trust model and calculate direct trust or indirect trust. Then, the nearest neighbor group is determined according to the trust value and similarity value, and the score of the project is completed. Finally, the recommended items are obtained according to the predicted score.

The average absolute error (MAE) is used to evaluate the accuracy of recommendation algorithm. The original score set and the predicted score set are referred to, respectively, and the calculation formula is

In (6), the total number of items in the test set is denoted by . The smaller the MAE value is, the higher the prediction accuracy is, and the more accurate the result of the recommendation algorithm is. In view of the fact that the trust relationship between users does not have mutual symmetry, sparsity is used to evaluate the data sparsity, and the calculation formula is shown in

In (7), the total number of users is denoted by . Whether the trust degree between two users can be calculated is expressed by . If the trust degree between two users can be calculated, the value is defined as 1; otherwise, it is 0. The real-time performance of CTTCF algorithm is evaluated by nearest neighbor search efficiency index. This indicator indicates the level of finding real nearest neighbor users in a certain percentage of users [19]. Taking the nearest neighbor of UCF algorithm as the reference benchmark, the nearest neighbor search efficiency is the ratio of the accuracy of CTTCF algorithm in finding the nearest neighbor users and the proportion of the searched user group in all users . The larger the value is, the higher the search efficiency of the algorithm is, and the higher the real-time performance is. The calculation formula is and refer to CTTCF algorithm and UCF algorithm to find the nearest neighbor group, respectively. , ,..., are the number of users in the user set, is the number of clusters, and is the number of clusters, . This paper quantifies the “satisfaction” and “consensus” of online tourism itinerary planning by statistical scoring, and the value of evaluation indicates the satisfaction of users [20]. The user’s score is divided into three levels, which are satisfied (3 points), average (2 points), and dissatisfied (1 point). At the same time, it is necessary to assign the corresponding weight to the satisfaction and consensus degree, so as to avoid the difficulty in the correct selection of the scheme under the condition of the same satisfaction score [8, 9]. Suppose the user evaluation score is , , and . and represent the maximum and minimum values in the scoring sequence respectively. is normalized by [0,1] and is shown in

In (9), in the expression. Suppose that the consensus degree is , and the standard deviation is expressed as

In (10), refers to the average of all scores, and the fitness function based on consensus satisfaction is and represent the weight of consensus and satisfaction, respectively.

5. Analysis of the Service Effect of Scene Awareness in Online Travel Planning System

5.1. Analysis of Online Travel Itinerary Planning Algorithm

In the experiment, the number of nearest neighbors is 5, 10, 15, 20, and 25, the length of transmission path is 2, and the trust weight is 0.4. The average absolute error under different clustering numbers is compared, and the results are shown in Figure 5. On the whole, with the increase of the number of clusters, the average absolute error line becomes smaller and larger. This is because after clustering the attributes of users, the attributes of users in the same cluster have certain similarity, so it is more reliable to get the nearest neighbor group from users with similar characteristics. But when the number of clusters increases to a certain extent, the probability of users with the same hobby being divided into different clusters will be greatly increased, which reduces the accuracy of the nearest neighbor selection process. On the whole, the best cluster number is 7, and the number of neighbors is 5, 10, 15, 20, and 25, respectively. The corresponding average absolute error is the smallest, which is about 0.815, 0.785, 0.765, 0.758, and 0.755 in turn.

Set the number of nearest neighbors as 5, the length of delivery path as 2, the weight of trust degree as 0.4, and the best clustering number as 7. Compare the nearest neighbor search efficiency of UCF algorithm and CTTCF algorithm, and the results are shown in Figure 6(a). Under the same user ratio, the of CTTCF algorithm is higher than that of UCF algorithm. With the increase of user ratio, the value of UCF algorithm is close to that of CTTCF algorithm. Therefore, in the same user search space, CTTCF algorithm can find more neighbor users than UCF algorithm, and the smaller the search space, the more significant the advantage. The experiment compares the average absolute error under different nearest neighbor number conditions, and the results are shown in Figure 6(b). On the whole, the number of nearest neighbors affects the performance of personalized recommendation. With the increase of the nearest neighbor number, the average absolute error decreases. But when the number of nearest neighbors increases to a certain number, the recommendation accuracy of the algorithm will not change. Considering the calculation time and recommendation accuracy, the nearest neighbor number is 20. At the same time, the average absolute error of TTCF algorithm and CTTCF algorithm is lower than that of UCF algorithm, and the improved algorithm significantly improves the recommendation accuracy. When the number of nearest neighbors is 20, the average absolute errors of UCF algorithm, TTCF algorithm, and CTTCF algorithm are about 0.78, 0.76, and 0.755 respectively.

800 pieces of location information evaluation data were randomly selected, including 400 pieces of negative evaluation data and 400 pieces of positive evaluation data. The positive and negative accuracies of afinn are 92% and 90%, respectively, while the positive and negative accuracies of sentiwordnet are 49% and 42%, respectively. The accuracy of afinn dictionary sentiment analysis model is significantly higher than that of afinn. Therefore, afinn dictionary sentiment analysis model has a very good emotional scoring effect. The accuracy comparison of afinn and sentiwordnet is shown in Figure 7.

5.2. Analysis on the Effect of Scene Awareness Service in Online Travel Planning System

Fashion, elegance, clarity, freshness, and emotional semantic genes are combined in pairs. There are a total of 10 design schemes, which are, respectively, high efficiency and comfortable, efficient and convenient, efficient and fun, efficient and high-quality, comfortable and convenient, comfortable and fun, comfortable and high-quality, convenient and fun, convenient and high-quality, and fun and high-quality. The evaluators were 20 scholars and researchers, the evaluation value was within [1,10], and the consensus satisfaction was more than 0.8. The results of average consensus satisfaction CTTCF algorithm iterations of 10 schemes are shown in Figure 8. It can be seen from the figure that the iteration times of efficient and comfortable solutions are in the 4th and 9th generations, efficient and convenient solutions are in the 3rd and 11th generations, efficient and fun solutions are in the 5th and 10th generations, efficient and high-quality solutions are in the 6th and 8th generations, comfortable and convenient solutions are in the 4th and 10th generations, comfortable and fun solutions are in the 5th and 9th generations, comfortable and high-quality solutions are in the 4th and 10th generations, and convenient and fun solutions are in the 4th and 10th generations. In the 5th and 11th generations, convenient high-quality solutions are in the 7th and 10th generations, fun high-quality solutions are in the 5th and 7th generations, and individual consensus satisfaction is the highest.

The results of 20 evaluators’ affective semantic evaluation of 10 schemes are shown in Figure 9, with a score of 142 or above, which has obvious optimization effect. Combining with Figure 7, we can see that the proposed online tourism itinerary planning system for context aware service has the most obvious optimization effect in terms of emotional semantic genes. It has obvious optimization effect on six emotional semantic genes: efficient and comfortable, comfortable and convenient, comfortable and high-quality, convenient and interesting, convenient and high-quality, and fun and high-quality. However, there is no obvious optimization effect in efficient and convenient and efficient and fun.

Furthermore, fuzzy evaluation method is used to verify the feasibility of the proposed design schemes. Aiming at the soft indexes such as color and safety in the evaluation process, linguistic variables are introduced to make the fuzzy information numerical, which is helpful for reasonable and fair quantitative evaluation. The membership degree is represented by any real number between 0 and 1. The closer the value is to 1, the higher the membership degree is. Among the 20 scholars and researchers, each evaluator’s score is 1–10, with a score between [1,6], indicating that the cultural and creative products designed do not meet the design conditions, with a score within [6,8], indicating that the scheme basically meets the design requirements, and with a score within [8,10], indicating that the scheme meets the design requirements. In order to improve the accuracy of the results, the average score of the scheme was calculated after a minimum score and a maximum score were omitted. The average score of 10 schemes was about 8.20, of which the comfortable and convenient scheme had the lowest score of 8.16, and the degree of satisfaction, basic satisfaction, and dissatisfaction were 0.009, 0.991, and 0, respectively. The highest score of fun quality program was 8.23, and the degree of satisfaction, basic satisfaction, and dissatisfaction were 0.123, 0.877, and 0. The statistical results of the proposed 10 schemes are shown in Figure 10. Therefore, the designed path planning scheme can meet the needs of customers.

6. Conclusion

This paper proposes a tourism planning model based on collaborative filtering and clustering personalized recommendation algorithm, in order to improve the customer satisfaction of online tourism planning system. Compared with UCF algorithm, cttcf algorithm can find more neighbor users. The smaller the search space, the more obvious the advantage. The results show that the emotional semantic gene scoring results of the 10 schemes show that the 8 schemes with high efficiency and comfort, high efficiency and high quality, comfort and convenience, comfort and interest, comfort and high quality, convenience and interest, convenience and high quality, convenience and high quality, and interesting and high quality have obvious optimization effects. Due to the limited time and energy, the multipath situation is not analyzed in the indirect trust calculation method, which needs to be further improved in the follow-up research.

Data Availability

The experimental data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The author declare that they have no conflicts of interest regarding this work.

Acknowledgments

This work was supported by 2021 Research Project on the Development of Social Sciences in Hebei Province, “Research on the Action Mechanism of Tourism Network Public Opinion Influencing Factors in the Postepidemic Era” (project no. 202102012162020); 2021 Research Project on the Development of Social Sciences in Hebei Province, “Research on Supply and Demand Matching and Guarantee Mechanism of Ice and Snow Industry Development in Hebei Province,” (subject no. 20210201229); and 2020 Qinhuangdao Science and Technology Research and Development Plan, “Research on Regional Cooperation Mechanism of Ice and Snow Tourism in Qinhuangdao from the Perspective of Space Network” (subject no. 202004A146).