Tourist route planning method and system based on intelligent optimization algorithm
By obtaining road network data from OSM, extracting user data and rating POI, calculating POI values based on the probability of visits, characteristic similarity, seasonal frequency and activity impact, the Q-learning model is used to dynamically adjust the travel route based on user satisfaction and POI values, solving the problem of difficult to comprehensively consider a variety of real-time changes in the existing technology, realizing personalized and dynamic travel route planning, and improving tourists' experience and satisfaction.
Patent Information
- Application Number
- CN202411813519.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-05-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing tourism route planning methods are difficult to comprehensively consider a variety of real-time changes, such as traffic conditions, user feedback and seasonal changes, which leads to insufficient route planning to meet tourists' personalized needs and dynamic changes.
By obtaining road network data from OSM, extracting user data and rating POI, calculating POI values based on the probability of visits, feature similarity, seasonal frequency and activity impact, the Q-learning model is used to dynamically adjust the travel route based on user satisfaction and POI values.
Personalized tourism path planning is realized, which can dynamically respond to real-time changes and improve tourists' overall experience and satisfaction.
Smart Images

Figure CN119962773A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of route planning, and in particular to a method and system for planning a tourist route based on an intelligent optimization algorithm. Background Art
[0002] With the rapid development of tourism, more and more tourists want to plan their travel routes easily and conveniently. Many existing route planning methods use static strategies, such as manually selecting attractions and determining the order of routes. This method is relatively mechanical and cannot flexibly respond to real-time changing information such as travel time restrictions, traffic conditions, and user instant feedback, making it difficult to dynamically adjust routes, resulting in limited user experience. Therefore, there is a lack of an intelligent travel route planning solution that can comprehensively consider multiple factors, dynamically optimize, and improve the quality of the itinerary.
[0003] To address these issues, some intelligent route planning solutions have been proposed, using multi-objective optimization methods and systems to take into account factors such as user and traffic information, thereby improving the personalization and optimization level of planning. However, existing tourism route planning systems still have shortcomings. Although some solutions use historical data for planning, they lack in-depth analysis of users' multi-dimensional characteristics, such as instant feedback, interests, and travel methods. In addition, existing systems usually have difficulty adjusting itineraries in real time to adapt to changes that may occur to tourists during their journey, such as seasonal changes or temporary changes in activities. Therefore, these solutions cannot provide sufficiently efficient route planning, which limits the improvement of tourists' overall experience and satisfaction.
[0004] Therefore, a tourist route planning method and system based on intelligent optimization algorithm is proposed. Summary of the invention
[0005] The purpose of the present invention is to provide a travel route planning method and system based on an intelligent optimization algorithm, which obtains POI by obtaining road network data from OSM and performing preprocessing; obtains historical tourist travel data, extracts user data and scores POI, and calculates user satisfaction based on the score and user data; calculates the co-visit probability, feature similarity, seasonal frequency and activity impact between POIs according to historical data, and obtains the POI value by weighted summation; obtains the user's travel needs, establishes a Q learning model, inputs the user needs and environmental data into the model, selects a travel route based on user satisfaction and POI value, and dynamically adjusts the route planning by updating the environmental data until the number of days and the daily play time are reached, then the planning is terminated. The present invention can provide sufficiently efficient route planning, thereby improving the overall experience and satisfaction of tourists.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A travel route planning method based on an intelligent optimization algorithm, comprising:
[0008] Acquire road network data from OSM and pre-process the road network data to obtain POIs;
[0009] Obtain historical tourist travel data of the POI, and extract the historical tourist travel data to obtain user data;
[0010] Scoring the POI according to the historical tourist travel data to obtain a POI score value, and calculating user satisfaction according to the user data and the POI score value;
[0011] Calculate the co-visit probability, feature similarity, seasonal frequency and activity impact between POIs according to the historical tourist travel data; perform weighted summation of the co-visit probability, feature similarity, seasonal frequency and activity impact to obtain the POI value;
[0012] Acquire user travel needs, wherein the user travel needs include travel starting point, travel destination, number of days for travel, travel time per day and the user data;
[0013] Establishing a Q learning model, the Q learning model is used to plan a travel route; inputting the user's travel needs and environmental data into the Q learning model, and according to the user satisfaction and the POI value, the Q learning model calculates the overall travel score of the POI according to the travel starting point; if the number of travel days and the daily travel time return to zero, then selecting the travel end point and ending the planning of the travel route, otherwise selecting the POI with the highest overall travel score as the next POI;
[0014] Acquire updated environmental data, input the updated environmental data into the Q learning model and update the travel route.
[0015] Furthermore, the POI acquisition process includes:
[0016] Cleaning the road network data, wherein the data cleaning includes deleting duplicate nodes and repairing path errors, to obtain a first road network data set;
[0017] The first road network data set is marked with POI tags, and data with irrelevant tags are filtered according to the POI tags, and data with tags of hotels and scenic spots are retained to obtain the POI.
[0018] Furthermore, the user data includes:
[0019] Basic user information includes user ID, age, gender, user geographic location and travel mode;
[0020] User behavior data includes historical POI visits, visit dates, visit duration, and visit frequency;
[0021] The user preference data includes the historically visited POIs, user ratings, and text comments.
[0022] Furthermore, the user satisfaction acquisition process includes:
[0023] The user ratings are calculated using the Bayesian average method to obtain the POI basic rating;
[0024] Use natural language processing tools to analyze text comments and obtain POI sentiment scores;
[0025] If the POI is a scenic spot, the matching degree between the user and the POI is calculated based on the user data and the POI features; otherwise, the matching degree is directly assigned to 0;
[0026] Performing a weighted summation of the POI basic score, the POI sentiment score and the matching degree to obtain the user satisfaction;
[0027] The user's real-time feedback POI score and the user satisfaction are weighted and summed again, and the user satisfaction is updated.
[0028] Furthermore, the matching degree calculation process includes:
[0029] Extracting user features from the user data, the user features including preference categories, user geographic locations, and interest tags;
[0030] Extracting POI features in the historical tourist travel data, wherein the POI features include POI type, POI geographic location and POI tag;
[0031] Digitally represent the user features and the POI features to obtain a user feature vector and a POI feature vector;
[0032] The user feature vector and the POI feature vector are calculated using cosine similarity to obtain the matching degree.
[0033] Furthermore, the calculation of the POI value includes:
[0034] Extracting the number of visits to the POI and the number of co-visits of each pair of POIs in the historical tourist travel data, and calculating the co-visit probability according to the number of visits to the POI and the number of co-visits of each pair of POIs;
[0035] Extracting POI features in the historical tourist travel data, and calculating the feature similarity using cosine similarity based on the POI features;
[0036] The number of visits to the POI is subdivided according to different seasons to obtain a seasonal number, and the ratio of the seasonal number to the number of visits to the POI is the seasonal frequency;
[0037] If the POI has an activity, the activity impact is an activity value with time decay; otherwise, the activity impact is directly assigned a value of 0;
[0038] The co-visit probability, the feature similarity, the seasonal frequency and the activity impact are weightedly summed to obtain the POI value.
[0039] Furthermore, the calculation of the overall tourism score of the POI includes:
[0040] The map service API is used to obtain the path time from the current POI to the reachable POI, and the path time, the user satisfaction and the POI value are weightedly summed to obtain the overall tourism score of the POI.
[0041] Furthermore, the training steps of the Q learning model include:
[0042] Step S1: Initialize the Q table, which is an N×M empty table, where N is the number of environmental data sets and M is the number of POIs;
[0043] Step S2: Acquire tourism training data, wherein the tourism training data includes the environmental data and the user's tourism needs;
[0044] Step S3: inputting the tourism training data into the Q learning model;
[0045] Step S4: selecting the next POI using the ε-greedy strategy according to the tourism training data; wherein, if the remaining travel time is 0, the next POI is selected as a hotel, otherwise the next POI is selected as a scenic spot;
[0046] Step S5: calculating the overall tourism score of the POI, calculating a Q value using the Bellman formula according to the overall tourism score, updating the Q value into the Q table, and updating the environmental data;
[0047] Step S6: When the number of iterations reaches a predetermined number, the training is terminated, otherwise, steps S2 to S6 are repeated.
[0048] Furthermore, the environmental data includes: current POI, remaining playing days, remaining playing time, a list of visited POIs, POI data and user feedback data.
[0049] A travel route planning system based on intelligent optimization algorithm, comprising:
[0050] The tourism data acquisition module is used to obtain road network data from OSM and pre-process the road network data to obtain POI; obtain historical tourist travel data of POI, and extract the historical tourist travel data to obtain user data; obtain user travel needs, and the user travel needs include travel starting point, travel end point, number of days for travel, daily travel time and the user data;
[0051] A user satisfaction calculation module is used to score the POI according to the historical tourist travel data to obtain a POI score value, and calculate the user satisfaction according to the user data and the POI score value;
[0052] A POI value assessment module is used to calculate the co-visit probability, feature similarity, seasonal frequency and activity impact between POIs based on the historical tourist travel data; and perform weighted summation of the co-visit probability, feature similarity, seasonal frequency and activity impact to obtain the POI value;
[0053] A travel route planning module is used to establish a Q learning model, and the Q learning model is used to plan a travel route; the user's travel needs and environmental data are input into the Q learning model, and according to the user satisfaction and the POI value, the Q learning model calculates the overall travel score of the POI according to the travel starting point; if the number of travel days and the daily travel time return to zero, the travel end point is selected and the planning of the travel route is terminated, otherwise the POI with the highest overall travel score is selected as the next POI;
[0054] The travel route optimization module is used to obtain updated environmental data, input the updated environmental data into the Q learning model and update the travel route.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] 1. Personalized travel route planning is the core of improving user travel experience. By analyzing historical tourists' travel data and extracting user data, combined with the matching degree of POI, the system can accurately match the personalized needs of users. In addition, analyzing users' numerical ratings and text comments can more accurately evaluate users' preferences for POIs. Combined with users' real-time feedback, it can more comprehensively evaluate users' satisfaction with POIs, thereby improving the overall experience of tourists.
[0057] 2. In travel route planning, it is difficult to accurately reflect the dynamic characteristics and attractiveness of scenic spots by relying on simple scoring. By comprehensively considering multiple dimensions such as co-visit probability, feature similarity, seasonal frequency, and activity impact, and then weighting and summing these dimensions based on expert experience, a more accurate POI value can be obtained, which not only helps users select new POIs, but also ensures that the selected POIs are in line with real-time travel trends and user preferences, thereby improving the overall experience and satisfaction of tourists.
[0058] 3. When tourism faces time constraints, reasonable route design is particularly important. By using the Q learning model for dynamic travel route planning, combined with the user's travel needs and real-time environmental data, it is possible to select the optimal path and automatically end the planning when the travel time reaches the limit. In addition, after obtaining updated environmental data, the model can quickly adjust the route and respond to real-time user feedback and scene changes, thereby improving the overall experience and satisfaction of tourists. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A schematic diagram of a travel route planning method based on an intelligent optimization algorithm provided in an embodiment of the present invention;
[0060] Figure 2 A schematic diagram of a Q learning model training process provided by an embodiment of the present invention;
[0061] Figure 3 A schematic diagram of a travel route planning system based on an intelligent optimization algorithm provided by an embodiment of the present invention;
[0062] Figure 4 A schematic diagram of a travel route planning for user A provided in an embodiment of the present invention;
[0063] Figure 5 A schematic diagram of travel route planning for user B provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] With the rapid development of the tourism industry, tourism has become a lifestyle for more and more people, and it has also brought huge market demand. For many tourists, travel route planning is the key to improving the travel experience, but traditional travel route planning schemes often rely on static scores and suggestions, which are difficult to meet the personalized and dynamic needs of tourists. Although existing planning schemes use intelligent algorithms to make route planning more flexible, they usually fail to fully consider factors such as tourists' specific interests, time constraints, and real-time environmental changes. Therefore, a more comprehensive travel route planning method and system is needed, which can adjust and plan the optimal travel route in real time through intelligent optimization algorithms, thereby improving the overall experience and satisfaction of tourists.
[0066] See also Figures 1 to 5 The present invention provides a travel route planning method and system based on intelligent optimization algorithm, and the technical solution is as follows:
[0067] Embodiment 1
[0068] The current route planning of a travel company is mostly based on fixed route arrangements, lacking dynamic response to real-time data and user feedback, making it difficult to optimize the user's travel experience. The practice is based on the travel route planning software of the travel company, aiming to improve the overall experience and satisfaction of tourists.
[0069] like Figure 1 As shown, a travel route planning method based on an intelligent optimization algorithm includes:
[0070] The road network data is obtained from OSM and pre-processed to obtain POIs.
[0071] Among them, OSM (OpenStreetMap) refers to the open street map, which can obtain geographic information data of roads, streets, paths and their connections; POI (Points of Interest) refers to places that have specific interest and attraction to users, including hotels, restaurants and shopping malls.
[0072] Furthermore, the POI acquisition process includes:
[0073] Cleaning the road network data, wherein the data cleaning includes deleting duplicate nodes and repairing path errors, to obtain a first road network data set;
[0074] Specifically, if the coordinates of two nodes are the same or extremely close, they can be considered duplicates. For example, the geographic coordinates of a shopping mall have node A (latitude 39.9163, longitude: 116.3972) and node B (latitude: 39.9159, longitude: 116.3985), then delete one duplicate node to avoid redundancy in subsequent processing. In addition, the derived path may have broken roads, unreasonable connections, and wrong direction marks, which need to be checked and corrected according to the actual road structure. For example, if there is a break in the road from node C to node D, the road segment between node C and node D needs to be connected to ensure the connectivity of the road.
[0075] The first road network data set is marked with POI tags, and data with irrelevant tags are filtered according to the POI tags, and data with tags of hotels and scenic spots are retained to obtain the POI.
[0076] Specifically, the OSM tagging system is used to identify and mark hotels and attractions. Regional places such as shopping malls, towns and schools can also be marked as attractions, and parking lots, private residences, factories and featureless service areas are filtered out. The road network data provides basic geographic and traffic information for POI, and the POI data can ensure the accuracy and practicality of the final data. The effective combination of road network data and POI can enhance the user experience, allowing users to reach the right place within a reasonable time, thereby improving the overall experience and satisfaction of tourists.
[0077] The historical tourist travel data of the POI is obtained, and the historical tourist travel data is extracted to obtain user data.
[0078] Specifically, historical tourist travel data is extracted through platforms such as travel websites, social media and forums. The historical tourist travel data includes user data and POI data. The POI data includes POI type, POI geographic location, POI opening hours, POI tags, visits, number of ratings, number of comments, travel season, weather and special events, etc.
[0079] Furthermore, the user data includes:
[0080] Basic user information includes user ID, age, gender, user geographic location and travel mode;
[0081] User behavior data includes historical POI visits, visit dates, visit duration, and visit frequency;
[0082] The user preference data includes the historically visited POIs, user ratings (usually 1-5 points) and text comments.
[0083] Table 1. Basic information of users
[0084] User ID age gender User geographic location Travel u12345 28 male J Province N City Self-driving tours
[0085] Table 2. User behavior data
[0086] Historically visited POIs Visit date Visit duration Frequency of visit Monument A 2024-09-15 4 hours 1 time Monument B 2024-09-16 3 hours 1 time Monument C 2024-09-20 5 hours 1 time
[0087] Specifically, as shown in Table 1, a user's basic information is described, as shown in Table 2, the user's travel behavior data is described, and as shown in Table 3, the user's preference data is described. Combining these three tables, it can be seen that the user gave high scores to most of the POIs visited, especially preferring monuments A and C, showing his strong interest in history and culture. By providing such user data, data preparation is made for subsequent analysis of user satisfaction, and more accurate travel route planning can be carried out based on the user's historical behavior and preferences, thereby improving the overall experience and satisfaction of tourists.
[0088] Table 3. User preference data
[0089] Historically visited POIs Users' Rating Text Comments Monument A 5 Very spectacular, full of historical atmosphere, worth a visit! Monument B 4 The scenery is beautiful and suitable for taking photos, but there are many tourists. Monument C 5 An unforgettable experience, it felt great to climb up to Monument C.
[0090] The POI is scored according to the historical tourist travel data to obtain a POI score value, and user satisfaction is calculated according to the user data and the POI score value.
[0091] Furthermore, the user satisfaction acquisition process includes:
[0092] The Bayesian average method is used to calculate the user ratings to obtain the POI basic rating. The formula is:
[0093]
[0094] Among them, R j is the basic score of POI number j; is the average score of all POIs; C is a constant that can be set to 10; N j is the number of ratings for POI j; R ij is the i-th rating of attraction j.
[0095] Specifically, assuming that the POI is "Historic Site A", there are three scores of 4, 5 and 5, and the average score of all POIs is 4, then R can be calculated j The Bayesian average method combines the quantity and quality of ratings to avoid extreme ratings that may occur when the number of rating samples is small.
[0096] Use natural language processing (NLP) tools to perform sentiment analysis on text comments and obtain the POI sentiment score. The formula is:
[0097]
[0098] Among them, I j is the sentiment score of POI number j; I ij is the i-th sentiment score of POI number j; k j is the number of text comments for POI j.
[0099] Specifically, I ij The value is usually between 0 and 1. Assuming that the number of text reviews for POI "Historic Site A" is 2, the first review "What a spectacular view, really shocking!" is scored 0.9 points, and "Too many people, average experience." is scored 0.5 points. NLP tools can identify positive, negative, and neutral emotions in reviews and obtain digital emotional scores for POIs.
[0100] If the POI is a scenic spot, the matching degree between the user and the POI is calculated according to the user data and the POI features; otherwise, the matching degree is directly assigned to 0;
[0101] The POI basic score, the POI sentiment score and the matching degree are weighted and summed to obtain the user satisfaction, which is expressed as:
[0102] S jk =R j ×w1+I j ×w2+M jk ×w3;
[0103] Among them, S jk is the satisfaction of user k with POI number j, M jk is the matching degree between user k and POI number j, w1, w2 and w3 are weight factors, and their sum is 1, which can be set to 0.3, 0.3 and 0.4 respectively;
[0104] The user's real-time feedback POI score and the user satisfaction are weighted and summed again, and the user satisfaction is updated, which is expressed as:
[0105] S jk =S jk ×w4+F jk ×(1-w4);
[0106] Among them, F jk is the real-time feedback score of user K on POI j, w4 is the weight factor, which can be set to 0.5.
[0107] Specifically, F jk It can also take a value between 0 and 5. Assuming that S is obtained through historical data jk 4 points, but F through real-time datajk The final satisfaction score is 4.5 points if the basic score, sentiment score and matching degree are combined, so the user K's satisfaction with POI can be evaluated more comprehensively, and more personalized travel route planning can be provided. In addition, through the introduction of real-time feedback, user satisfaction is continuously optimized, ensuring the efficiency of travel route planning and the improvement of user experience.
[0108] Furthermore, the matching degree calculation process includes:
[0109] Extracting user features from the user data, the user features including preference categories, user geographic locations, and interest tags;
[0110] Extracting POI features in the historical tourist travel data, wherein the POI features include POI type, POI geographic location and POI tag;
[0111] Specifically, POI types include historical attractions, natural scenic spots, museums, and amusement parks, etc. POI tags can be subdivided into cultural, natural, and entertainment categories according to attraction tags.
[0112] Digitally represent the user features and the POI features to obtain a user feature vector and a POI feature vector;
[0113] Specifically, preference categories, interest tags, POI types, POI tags, etc. can be represented using one-hot encoding, and geographic locations can be represented using regional encoding.
[0114] The user feature vector and the POI feature vector are calculated using cosine similarity to obtain the matching degree, which is expressed as:
[0115]
[0116] Among them, M is the matching degree, h is the angle between vectors, U and P are user feature vector and POI feature vector respectively, ||U|| and ||P|| are the modulus lengths of user vector and POI vector respectively.
[0117] Specifically, assuming the user characteristics (preference category: historical attractions, geographical location: City B; interest tags: history, culture, nature), the characteristics of POI "Historical Monument A" (POI type: historical attractions; POI geographical location: City B; POI tags: history, culture), after digitization, can be expressed as U = [1, 1, 1, 1, 1], P = [1, 1, 1, 1, 0], the calculated matching degree is 0.894, which is close to 1, indicating that the user and POI "Historical Monument A" have a high degree of matching. Through the calculation of cosine similarity, POIs with high and low correlation can be effectively distinguished, and irrelevant locations can be avoided from being planned, so that user needs can be met more accurately, and the overall experience and satisfaction of tourists can be improved.
[0118] The co-visit probability, feature similarity, seasonal frequency and activity impact between POIs are calculated according to the historical tourist travel data, and the co-visit probability, feature similarity, seasonal frequency and activity impact are weightedly summed to obtain the POI value.
[0119] Furthermore, the calculation of the POI value includes:
[0120] The number of visits to the POI and the number of co-visits of each pair of POIs in the historical tourist travel data are extracted, and the co-visit probability is calculated based on the number of visits to the POI and the number of co-visits of each pair of POIs, which is expressed as:
[0121]
[0122] Among them, P(POI i ,POI j ) is when visiting POI i In the case of j The probability of T(POI i ) to access POI i Times, T(POI i ,POI j ) is when visiting POI i In the case of j The number of times.
[0123] Specifically, assuming that the access data of POIs in the historical tourist travel data are as shown in Table 4, the number of visits to "Historic Monument A" is 3, the number of visits to "Historic Monument B" is 2, the number of visits to "Historic Monument C" is 1, and the number of visits to "Historic Monument D" is 1, then it can be calculated that the probability of continuing to visit "Historic Monument B" after visiting "Historic Monument A" is 67%.
[0124] Table 4. POI access data
[0125] User ID POI List u12345 [Historic Site A, Historic Site B, Historic Site C] u12346 [Historic Monument A, Historic Monument D] u12347 [Historic Site B, Historic Site A]
[0126] The POI features in the historical tourist travel data are extracted, and the feature similarity is calculated using cosine similarity based on the POI features, which is expressed as:
[0127]
[0128] Among them, M_POI(POI i ,POI j ) is POI i With POI j The feature similarity, P i For POI i The characteristic vector, P j For POI j The feature vector of .
[0129] Specifically, POI features include POI type, POI geographic location and POI tag. The POI features are converted into one-hot encoding representation, as shown in Table 5, which shows the encoding results of POI features. It can be calculated that the similarity between "Historic Monument A" and "Historic Monument B" is 1.
[0130] Table 5. Encoding results of POI features
[0131] POI POI type = "Historical attractions" Geographical location = "City B" history culture nature Monument A 1 1 1 1 0 Monument B 1 1 1 1 0 Monument C 1 1 1 0 1
[0132] The number of visits to the POI is subdivided according to different seasons to obtain a seasonal number, and the ratio of the seasonal number to the number of visits to the POI is the seasonal frequency.
[0133] Specifically, assuming that "Historic Monument A" is visited once in spring, once in summer, once in autumn, and once in winter, it can be concluded that the visit frequency in spring is 25%.
[0134] If the POI has activity, the activity impact is an activity value with time decay; otherwise, the activity impact is directly assigned a value of 0, expressed as:
[0135]
[0136] Among them, IMP is the activity impact value, E is the activity constant, which can be set to 1, e -at is the attenuation value, a is the attenuation coefficient, which can be set to 0.1, and t is the time interval from the start of the activity to the current time.
[0137] The co-visit probability, the feature similarity, the seasonal frequency and the activity impact are weighted and summed to obtain the POI value, which is expressed as:
[0138] d(POIj )=P(POI i ,POI j )×v1+M_POI(POI i ,POI j )×v2+season i,j ×v3+IMP j ×v4;
[0139] Among them, d(POI j ) is the POI value of POI number j, season j is the frequency of POI number j in the i-th season, IMP j is the activity impact value of POI number j, v1, v2, v3 and v4 are weight factors, and the sum is 1, which can be set to 0.3, 0.3, 0.2 and 0.2 respectively. By comprehensively considering multiple factors such as co-visit probability, feature similarity, seasonal frequency and activity impact, and calculating the POI value through weighted summation, it can not only accurately evaluate the value of each POI, but also enhance the dynamic adaptability of the system, respond to seasonal factors and activity factors, thereby improving the user's travel experience and satisfaction.
[0140] Acquire user travel needs, including travel starting point, travel destination, number of days, daily travel time and user data. According to user needs, personalized travel route planning can be carried out.
[0141] A Q learning model is established, and the Q learning model is used to plan a travel route; the user's travel needs and environmental data are input into the Q learning model, and according to the user satisfaction and the POI value, the Q learning model calculates the overall travel score of the POI according to the travel starting point; if the number of travel days and the daily travel time are zero, the travel end point is selected and the planning of the travel route is ended, otherwise the POI with the highest overall travel score is selected as the next POI; the updated environmental data is obtained, the updated environmental data is input into the Q learning model, and the travel route is updated and planned.
[0142] Among them, Q-learning is a model-independent reinforcement learning algorithm that does not require prior knowledge of the dynamic model of the environment. It only needs to update the Q value through user satisfaction and POI value, and can flexibly adapt to changes in time and traffic.
[0143] Furthermore, the calculation of the overall tourism score of the POI includes:
[0144] Use the map service API to obtain the path time from the current POI to the reachable POI, and perform weighted summation of the path time, the user satisfaction, and the POI value to obtain the overall tourism score of the POI, which is expressed as:
[0145] R j =S j ×u1+d(POI j )×u2+traf i,j ×u3;
[0146] Among them, the map service API can use existing map software; j is the overall tourism score of POI j, traf i,j is the path time from POI number i to POI number j; u1, u2 and u3 are weight factors, which can be set to 0.5, 0.3 and 0.2. By using the map service API to obtain the path time from the current POI to other reachable POIs, the path planning can be adjusted in real time to adapt to changes in traffic conditions. By weighted summation of path time, user satisfaction and POI value, the system can generate a score that better meets the user's personalized needs, helping users find the POI that best suits their preferences, thereby improving the efficiency of travel planning and user satisfaction.
[0147] Furthermore, the environmental data includes: current POI, remaining playing days, remaining playing time, a list of visited POIs, POI data and user feedback data.
[0148] Specifically, if the user has just visited "Historic Monument A", the current POI is "Historic Monument A", and the system will plan according to the POIs near "Historic Monument A" (such as "Historic Monument B" and "Historic Monument D"); if the daily play time is zero, the remaining play days will be reduced by 1; the required time is calculated based on the average play time of each POI to get the remaining play time, and 2 to 5 POIs are recommended every day to ensure that the user can cover as many attractions of interest as possible within a limited time; the list of visited POIs records all POIs that the user has visited, avoiding recommending places that have been visited to ensure the novelty and diversity of the recommendations; user feedback data includes information such as user ratings, comments, and preference adjustments for visited POIs. For example, if the user wants to visit "Scenic Spot F", the user can customize the input of the attraction, and the system will re-plan the tour route according to this preference. By using environmental data to calculate the overall tourism score of POIs, and combining real-time environmental data, it is ensured that the planned POIs not only meet the user's preferences, but also can be visited within a reasonable time, thereby improving the efficiency of tourism planning and user satisfaction.
[0149] Furthermore, if Figure 2 As shown, the training steps of the Q learning model include:
[0150] Step S1: Initialize the Q table, which is an N×M empty table; wherein N is the number of the environmental data sets, and M is the number of POIs;
[0151] Step S2: Acquire tourism training data, wherein the tourism training data includes the environmental data and the user's tourism needs;
[0152] Step S3: inputting the tourism training data into the Q learning model;
[0153] Step S4: selecting the next POI using an ε-greedy strategy according to the tourism training data;
[0154] Among them, the ε-greedy strategy is to randomly select a POI with a probability of ε, and select the POI with the highest Q value in the current Q table with a probability of 1-ε. ε can be set to 0.003;
[0155] If the remaining playing time is 0, the next POI is selected as a hotel, otherwise the next POI is selected as a scenic spot;
[0156] Step S5: calculating the overall tourism score of the POI, calculating a Q value using the Bellman formula according to the overall tourism score, updating the Q value into the Q table, and updating the environmental data;
[0157] The Q value calculation formula is:
[0158] Q(s,a)=Q(s,a)+b×[r+c×max a Q(s',a)-Q(s,a)];
[0159] Among them, Q(s,a) is the Q value of taking action a (selecting a POI) under the current environment data s, r is the immediate reward after taking this action, that is, the overall tourism score of the POI, c is the discount factor, set to 0.001, and b is the learning rate, set to 0.9.
[0160] Step S6: When the number of iterations reaches a predetermined number, the training is terminated, otherwise, steps S2 to S6 are repeated.
[0161] The number of iterations can be set to 100 times. Through continuous iterative training, the Q learning model can accumulate experience and gradually optimize the recommendation strategy. For example, the initial travel route planning for a certain day is "Historic Site A→Historic Site B→Historic Site C". After the training is completed, the optimized travel route planning can be "Historic Site A→Historic Site C→Historic Site D", which takes less time and is more in line with user preferences. According to the user's specific needs and real-time environmental data, the Q learning model can dynamically select the most suitable POI, ensuring that users can efficiently visit more POIs within a limited time, and provide personalized travel routes, thereby improving the efficiency of travel planning and user satisfaction.
[0162] In summary, this method obtains road network data from OSM, historical tourist data, extracts user data and scores POIs, thereby improving the accuracy of travel route planning; by calculating the co-visit probability, feature similarity, seasonal frequency and activity impact between POIs, and weighted summing these factors, the selection of POIs is further optimized; based on user travel needs and environmental data, the Q learning model is used for dynamic adjustment, so that the travel route not only meets personalized needs, but also can be optimized and updated according to the real-time environment, ultimately improving user satisfaction and providing a more reasonable travel planning solution.
[0163] Embodiment 2
[0164] Similarly, a travel recommendation software of a travel company is used as a practice object to plan travel routes for users A and B respectively, aiming to optimize according to the personalized characteristics of different users, thereby improving the overall experience and satisfaction of tourists. Figure 3 As shown, a travel route planning system based on intelligent optimization algorithm includes:
[0165] The tourism data acquisition module is used to obtain road network data from OSM and pre-process the road network data to obtain POI; obtain historical tourist travel data of POI, and extract the historical tourist travel data to obtain user data; obtain user travel needs, and the user travel needs include travel starting point, travel end point, number of days for travel, daily travel time and the user data;
[0166] A user satisfaction calculation module is used to score the POI according to the historical tourist travel data to obtain a POI score value, and calculate the user satisfaction according to the user data and the POI score value;
[0167] A POI value assessment module, used to calculate the co-visit probability, feature similarity, seasonal frequency and activity impact between POIs according to the historical tourist travel data, and perform weighted summation of the co-visit probability, feature similarity, seasonal frequency and activity impact to obtain the POI value;
[0168] A travel route planning module is used to establish a Q learning model, and the Q learning model is used to plan a travel route; the user's travel needs and environmental data are input into the Q learning model, and according to the user satisfaction and the POI value, the Q learning model calculates the overall travel score of the POI according to the travel starting point; if the number of travel days and the daily travel time return to zero, the travel end point is selected and the planning of the travel route is terminated, otherwise the POI with the highest overall travel score is selected as the next POI;
[0169] The travel route optimization module is used to obtain updated environmental data, input the updated environmental data into the Q learning model and update the travel route.
[0170] Furthermore, the POI acquisition process includes:
[0171] Cleaning the road network data, wherein the data cleaning includes deleting duplicate nodes and repairing path errors, to obtain a first road network data set;
[0172] The first road network data set is marked with POI tags, and data with irrelevant tags are filtered according to the POI tags, and data with tags of hotels and scenic spots are retained to obtain the POI.
[0173] Specifically, for example, the POIs of city N are hotel A, hotel B, scenic spot A, scenic spot and scenic spot C, etc.
[0174] Furthermore, the travel data of historical tourists on travel websites, social media and other platforms are captured, and the extracted user data includes:
[0175] Basic user information includes user ID, age, gender, user geographic location and travel mode;
[0176] User behavior data includes historical POI visits, visit dates, visit duration, and visit frequency;
[0177] The user preference data includes the historically visited POIs, user ratings, and text comments.
[0178] Furthermore, the user satisfaction acquisition process includes:
[0179] The user ratings are calculated using the Bayesian average method to obtain the POI basic rating; the prior constant in the Bayesian average method can be set to 2;
[0180] Use natural language processing tools to analyze text comments and obtain POI sentiment scores;
[0181] If the POI is a scenic spot, the matching degree between the user and the POI is calculated based on the user data and the POI features; otherwise, the matching degree is directly assigned to 0;
[0182] The POI basic score, the POI sentiment score and the matching degree are weighted and summed to obtain the user satisfaction; wherein the allocated weights are set to 0.4, 0.3 and 0.3.
[0183] The user's real-time feedback POI score and the user satisfaction are weighted and summed again, and the user satisfaction is updated.
[0184] Specifically, assuming that there is no review record for attraction C, the default POI basic score is 4 points and the sentiment score is 4 points.
[0185] Furthermore, the matching degree calculation process includes:
[0186] Extracting user features from the user data, the user features including preference categories, user geographic locations, and interest tags;
[0187] Extracting POI features in the historical tourist travel data, wherein the POI features include POI type, POI geographic location and POI tag;
[0188] Digitally represent the user features and the POI features to obtain a user feature vector and a POI feature vector;
[0189] The user feature vector and the POI feature vector are calculated using cosine similarity to obtain the matching degree.
[0190] Specifically, user features and POI features can be added or deleted as needed to meet user travel needs.
[0191] Furthermore, the calculation of the POI value includes:
[0192] Extracting the number of visits to the POI and the number of co-visits of each pair of POIs in the historical tourist travel data, and calculating the co-visit probability according to the number of visits to the POI and the number of co-visits of each pair of POIs;
[0193] Extracting POI features in the historical tourist travel data, and calculating the feature similarity using cosine similarity based on the POI features;
[0194] The number of visits to the POI is subdivided according to different seasons to obtain a seasonal number, and the ratio of the seasonal number to the number of visits to the POI is the seasonal frequency;
[0195] If the POI has an activity, the activity impact is an activity value with time decay; otherwise, the activity impact is directly assigned a value of 0;
[0196] The co-visit probability, the feature similarity, the seasonal frequency and the activity impact are weightedly summed to obtain the POI value.
[0197] Among them, the weights are all set to 0.25.
[0198] Furthermore, the calculation of the overall tourism score of the POI includes:
[0199] The map service API is used to obtain the path time from the current POI to the reachable POI, and the path time, the user satisfaction and the POI value are weightedly summed to obtain the overall tourism score of the POI.
[0200] Among them, the weights are set to 0.3, 0.3 and 0.4.
[0201] Furthermore, the environmental data includes: current POI, remaining playing days, remaining playing time, a list of visited POIs, POI data and user feedback data.
[0202] Furthermore, the training steps of the Q learning model include:
[0203] Step S1: Initialize the Q table, which is an N×M empty table; wherein N is the number of the environmental data sets, and M is the number of POIs;
[0204] Step S2: Acquire tourism training data, wherein the tourism training data includes the environmental data and the user's tourism needs;
[0205] Step S3: inputting the tourism training data into the Q learning model;
[0206] Specifically, the POIs are initialized in the form of a list, such as [Scenic Spot A; Scenic Spot B; Scenic Spot C; Hotel B], and the POI list is input into the Q learning model together with tourism training; the Q value from the scenic spot to itself is assigned a large negative value, for example, the Q value from scenic spot A to scenic spot A is assigned to -100.
[0207] Step S4: selecting the next POI using the ε-greedy strategy according to the tourism training data; wherein, if the remaining travel time is 0, the next POI is selected as a hotel, otherwise the next POI is selected as a scenic spot;
[0208] Among them, ε is set to 0.1. If all values in the current Q table are 0, a random POI is selected for exploration;
[0209] Step S5: calculating the overall tourism score of the POI, calculating a Q value using the Bellman formula according to the overall tourism score, updating the Q value into the Q table, and updating the environmental data;
[0210] Specifically, assuming that the current location is scenic spot A, the overall tourism score from scenic spot A to scenic spot B is calculated to be 4.8737, and the Bellman formula is used to calculate the best path value from scenic spot B and then update the Q value. Since the Q values in the table are all 0, the best path value from scenic spot B is 0, and the updated Q value from scenic spot A to scenic spot B is 4.3863, then the Q value is updated to the Q table.
[0211] Step S6: When the number of iterations reaches a predetermined number, the training is terminated, otherwise, steps S2 to S6 are repeated.
[0212] Specifically, suppose that in the user travel demand, the starting point of user A and user B is hotel A, the destination is hotel B, the number of days of travel is 2 days, and the travel time is 8 hours per day. Figure 4 and Figure 5 As shown in the figure, the final travel route planning result is given. Among them, the circle represents the POI as a scenic spot, and the box represents the POI as a hotel. According to the different preferences of users, user A prefers natural POIs, and the route on the first day is "Hotel A→Scenic Spot A→Scenic Spot B→Scenic Spot E→Hotel D", and the route on the second day is "Hotel D→Scenic Spot F→Scenic Spot H→Scenic Spot L→Hotel B". User B prefers commercial POIs, and the route on the first day is "Hotel A→Scenic Spot C→Scenic Spot D→Hotel C", and the route on the second day is "Hotel C→Scenic Spot F→Scenic Spot G→Scenic Spot L→Hotel B".
[0213] The system uses OSM to collect road networks and historical tourist data through the tourism data acquisition module, generates user data and identifies POIs; the user satisfaction calculation module combines POI scores and user data to provide personalized user satisfaction evaluation; the POI value assessment module conducts a comprehensive evaluation of POIs through factors such as co-visit probability, feature similarity, seasonal frequency and activity impact; the travel route planning module implements optimal route planning based on the Q learning model to ensure that the user's travel needs are met; the route optimization module updates the plan in real time according to environmental changes to ensure that the plan dynamically adapts to user needs and actual conditions; ultimately, through the collaborative work of multiple modules, the overall experience and satisfaction of tourists are improved.
[0214] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A travel route planning method based on intelligent optimization algorithm, characterized in that: include: Acquire road network data from OSM and pre-process the road network data to obtain POIs; Obtain historical tourist travel data of the POI, and extract the historical tourist travel data to obtain user data; Scoring the POI according to the historical tourist travel data to obtain a POI score value, and calculating user satisfaction according to the user data and the POI score value; Calculate the co-visit probability, feature similarity, seasonal frequency and activity impact between POIs according to the historical tourist travel data; perform weighted summation of the co-visit probability, feature similarity, seasonal frequency and activity impact to obtain a POI value; Acquire user travel needs, wherein the user travel needs include travel starting point, travel destination, number of days for travel, travel time per day and the user data; Establishing a Q learning model, the Q learning model is used to plan a travel route; inputting the user's travel needs and environmental data into the Q learning model, and according to the user satisfaction and the POI value, the Q learning model calculates the overall travel score of the POI according to the travel starting point; if the number of travel days and the daily travel time return to zero, then selecting the travel end point and ending the planning of the travel route, otherwise selecting the POI with the highest overall travel score as the next POI; Acquire updated environmental data, input the updated environmental data into the Q learning model and update the travel route.
2. A travel route planning method based on intelligent optimization algorithm according to claim 1, characterized in that: The POI acquisition process includes: Cleaning the road network data, wherein the data cleaning includes deleting duplicate nodes and repairing path errors, to obtain a first road network data set; The first road network data set is marked with POI tags, and data with irrelevant tags are filtered according to the POI tags, and data with tags of hotels and scenic spots are retained to obtain the POI.
3. A travel route planning method based on intelligent optimization algorithm according to claim 1, characterized in that: The user data includes: Basic user information includes user ID, age, gender, user geographic location and travel mode; User behavior data includes historical POI visits, visit dates, visit duration, and visit frequency; The user preference data includes the historically visited POIs, user ratings, and text comments.
4. A travel route planning method based on intelligent optimization algorithm according to claim 1, characterized in that: The user satisfaction acquisition process includes: The user ratings are calculated using the Bayesian average method to obtain the POI basic rating; Use natural language processing tools to analyze text comments and obtain POI sentiment scores; If the POI is a scenic spot, the matching degree between the user and the POI is calculated according to the user data and the POI features; otherwise, the matching degree is directly assigned to 0; Performing a weighted summation of the POI basic score, the POI sentiment score and the matching degree to obtain the user satisfaction; The user's real-time feedback POI score and the user satisfaction are weighted and summed again, and the user satisfaction is updated.
5. A travel route planning method based on intelligent optimization algorithm according to claim 4, characterized in that: The matching degree calculation process includes: Extracting user features from the user data, the user features including preference categories, user geographic locations, and interest tags; Extracting POI features in the historical tourist travel data, wherein the POI features include POI type, POI geographic location and POI tag; Digitally represent the user features and the POI features to obtain a user feature vector and a POI feature vector; The user feature vector and the POI feature vector are calculated using cosine similarity to obtain the matching degree.
6. A travel route planning method based on intelligent optimization algorithm according to claim 1, characterized in that: The calculation of the POI value includes: Extracting the number of visits to the POI and the number of co-visits of each pair of POIs in the historical tourist travel data, and calculating the co-visit probability according to the number of visits to the POI and the number of co-visits of each pair of POIs; Extracting POI features in the historical tourist travel data, and calculating the feature similarity using cosine similarity based on the POI features; The number of visits to the POI is subdivided according to different seasons to obtain a seasonal number, and the ratio of the seasonal number to the number of visits to the POI is the seasonal frequency; If the POI has an activity, the activity impact is an activity value with time decay, otherwise the activity impact is directly assigned a value of 0; The co-visit probability, the feature similarity, the seasonal frequency and the activity impact are weightedly summed to obtain the POI value.
7. A travel route planning method based on intelligent optimization algorithm according to claim 1, characterized in that: The calculation of the overall tourism score of the POI includes: The map service API is used to obtain the path time from the current POI to the reachable POI, and the path time, the user satisfaction and the POI value are weightedly summed to obtain the overall tourism score of the POI.
8. A travel route planning method based on intelligent optimization algorithm according to claim 1, characterized in that: The training steps of the Q learning model include: Step S1: Initialize the Q table, which is an N×M empty table, where N is the number of environmental data sets and M is the number of POIs; Step S2: Acquire tourism training data, wherein the tourism training data includes the environmental data and the user's tourism needs; Step S3: inputting the tourism training data into the Q learning model; Step S4: selecting the next POI using the ε-greedy strategy according to the tourism training data; wherein, if the remaining travel time is 0, the next POI is selected as a hotel, otherwise the next POI is selected as a scenic spot; Step S5: calculating the overall tourism score of the POI, calculating a Q value using the Bellman formula according to the overall tourism score, updating the Q value into the Q table, and updating the environmental data; Step S6: When the number of iterations reaches a predetermined number, the training is terminated, otherwise, steps S2 to S6 are repeated.
9. A travel route planning method based on intelligent optimization algorithm according to claim 1, characterized in that: The environmental data includes: current POI, remaining play days, remaining play time, visited POI list, POI data and user feedback data.
10. A travel route planning system based on intelligent optimization algorithm, characterized in that: include: A tourism data acquisition module is used to acquire road network data from OSM and pre-process the road network data to obtain POIs; Obtain historical tourist travel data of the POI, and extract the historical tourist travel data to obtain user data; Acquire user travel needs, wherein the user travel needs include travel starting point, travel destination, number of days for travel, travel time per day and the user data; A user satisfaction calculation module is used to score the POI according to the historical tourist travel data to obtain a POI score value, and calculate the user satisfaction according to the user data and the POI score value; A POI value assessment module is used to calculate the co-visit probability, feature similarity, seasonal frequency and activity impact between POIs based on the historical tourist travel data; and perform weighted summation of the co-visit probability, feature similarity, seasonal frequency and activity impact to obtain the POI value; A travel route planning module is used to establish a Q learning model, and the Q learning model is used to plan a travel route; the user's travel needs and environmental data are input into the Q learning model, and according to the user satisfaction and the POI value, the Q learning model calculates the overall travel score of the POI according to the travel starting point; if the number of travel days and the daily travel time return to zero, the travel end point is selected and the planning of the travel route is terminated, otherwise the POI with the highest overall travel score is selected as the next POI; The travel route optimization module is used to obtain updated environmental data, input the updated environmental data into the Q learning model and update the travel route.
Citation Information
Cited By
Travel itinerary planning method based on artificial intelligence
CN121599260A