Tourism route generation method, device and equipment based on enhanced whale optimization algorithm and medium
By obtaining tourist and attraction characteristic data, building interest and satisfaction models, and using enhanced whale optimization algorithm to optimize tourism routes, solving the problems of data sparseness and insufficient optimization, improving the personalization and optimization effects of tourism routes, and providing an efficient and satisfactory travel experience.
Patent Information
- Application Number
- CN202510861238.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-25
AI Technical Summary
The existing tourism route planning system has insufficient data sparsity and optimization algorithms, which leads to insufficient accuracy and personalization of recommended attractions, making it difficult to meet the diverse needs of tourists.
By obtaining tourist feature data and scenic spot feature data, a tourist interest and satisfaction model is constructed, and multi-objective optimization is used to optimize tourism routes with the enhanced whale optimization algorithm (EWOA), and a BERT-BiGRU sentiment analysis network is combined with the BERT-BiGRU emotion analysis network, and a nonlinear convergence factor, adaptive weight strategy and pooling mechanism are introduced to improve the algorithm's global search capabilities.
It improves the personalization and optimization effect of the travel route, ensures the efficiency and satisfaction of the travel process, and provides personalized travel solutions that meet tourists' interests and preferences.
Smart Images

Figure CN120373601A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tourism management, and in particular to a method, device, equipment and medium for generating a tourism route based on an enhanced whale optimization algorithm. Background Art
[0002] With the popularization of the Internet and mobile devices, the tourism industry has ushered in new opportunities for digital transformation. Tourists generate massive amounts of data when booking travel, browsing travel information, and evaluating attractions online. These data not only record tourists' behaviors and preferences, but also provide tourism service providers with the possibility of gaining a deeper understanding of tourists' needs. Through technologies such as big data analysis, machine learning and artificial intelligence, cloud computing, location-based services (LBS), mobile Internet, and social networks, the tourism industry can gain a more accurate insight into tourists' interests and preferences, thereby improving the quality and efficiency of tourism services and providing tourists with more comfortable and personalized travel advice and experiences.
[0003] In the field of travel route planning, current technology has made some progress. For example, intelligent optimization algorithms (such as genetic algorithms, ant colony algorithms, etc.) are widely used to solve complex path planning problems, which can effectively optimize travel time and cost. At the same time, neural networks and personalized recommendation technologies are also used to provide customized suggestions that meet user interests. In addition, augmented reality and virtual reality technologies enhance the user's immersive experience, while location-based services and smart guide systems improve the convenience of travel through real-time navigation and personalized recommendations. Cloud computing and big data analysis support large-scale data processing, ensuring fast response and efficient service, and social network analysis further optimizes itinerary planning by mining user-generated content.
[0004] Although existing technologies have achieved certain results in tourist route planning, there are still some challenges in practical applications. First, the sparsity of tourism data is a prominent problem. Since tourists travel less frequently and their preferences may vary greatly for each trip, the interaction data between users and tourist attractions is very limited. This makes it difficult for the system to accumulate enough data to accurately analyze and predict users' travel preferences, which affects the accuracy and personalization of recommended attractions. Secondly, traditional intelligent optimization algorithms are insufficient in global and local search capabilities, have low population diversity, and are prone to falling into local optimal solutions, resulting in poor solution results. Therefore, there is an urgent need for a more accurate and personalized tourist route planning to improve user experience and satisfaction. Summary of the invention
[0005] The main purpose of this application is to provide a method, device, equipment and medium for generating a tourist route based on an enhanced whale optimization algorithm, aiming to solve the technical problem of how to improve the accuracy and personalization of tourist route planning.
[0006] To achieve the above object, the present application proposes a method for generating a travel route based on an enhanced whale optimization algorithm, and the method includes: Obtain tourist characteristic data and scenic spot characteristic data; Input the tourist characteristic data and the scenic spot characteristic data into a preset multi-objective travel route planning model to obtain a travel route; Optimize the travel route through an enhanced whale optimization algorithm model to obtain a target travel route; Before the step of inputting the tourist characteristic data and the scenic spot characteristic data into a preset multi-objective travel route planning model to obtain a travel route, it further includes: Analyze the tourist characteristic data and the scenic spot characteristic data to construct a scenic spot interest model; Analyze the scenic spot characteristic data through a BERT-BiGRU sentiment analysis network to obtain a sentiment analysis result; Construct a scenic spot satisfaction model according to the sentiment analysis result; Construct a preset multi-objective travel route planning model according to the scenic spot interest model and the scenic spot satisfaction model.
[0007] In one embodiment, before the step of optimizing the travel route through an enhanced whale optimization algorithm model to obtain a target travel route, it includes: Generate an initial population, and set the whale population size and the maximum number of iterations; Calculate the individuals in the whale population according to a multi-objective function to obtain the fitness of the individuals and the best position of the population; Obtain the search range of the whale population by introducing a non-linear convergence factor and an adaptive weight strategy; Based on the search range, mix the solutions around the best position of the population through a pooling mechanism to obtain multiple whale populations and the corresponding individual fitness; Compare the multiple individual fitnesses through a Cauchy distribution search strategy to obtain the global optimal solution of the whale population; Update the positions of the individuals in the whale population according to the best position of the population and the global optimal solution; If the number of iterations is reached, output the preset whale individual corresponding to the final individual position; Construct an enhanced whale optimization algorithm model according to the preset whale individual and then predict the target travel route.
[0008] In one embodiment, the step of analyzing the tourist characteristic data and the scenic spot characteristic data to construct a scenic spot interest model includes: Statistically analyze the tourist characteristic data to obtain tourist preference characteristics. The tourist characteristic data includes gender, age, time preference for appearance, and budget constraints; Analyze the scenic spot characteristic data to obtain scenic spot cost parameters. The scenic spot characteristic data includes scenic spot ticket price, transportation cost, opening hours, and geographical relevance to other scenic spots; Construct a scenic spot interest model based on the tourist preference characteristics and the scenic spot cost parameters.
[0009] In one embodiment, the step of constructing a scenic spot interest model based on the tourist preference characteristics and the scenic spot cost parameters includes: Construct a rating matrix for tourists and scenic spots through a collaborative filtering method for the tourist preference characteristics and the scenic spot cost parameters. The rating matrix is expressed as: where the rating matrix , each element represents the rating of tourist for scenic spot ; Use the Pearson correlation coefficient to calculate based on the rating matrix to obtain the similarity between tourists. The specific formula is: where represents the set of scenic spots that both tourist and tourist have ratings for, and are the average ratings of tourist and tourist respectively, represents the rating of tourist for scenic spot , represents the rating of tourist for scenic spot ; Select a preset number of groups with high similarity to the target tourist as the neighbor set. The specific formula is: where, is the set of tourists, is the preset number, represents the similarity between tourist and tourist ; Predict the interest rating of the scenic spots not visited by the target tourist through the neighbor set to obtain the interest intensity. The specific formula is: Among them, represents the target tourist 's interest intensity in unvisited scenic spots ; represents the predicted score of the target tourist for unvisited scenic spots ; represents the minimum score of a tourist for a scenic spot ; represents the maximum score of a tourist for a scenic spot ; represents the actual score of a neighbor tourist for unvisited scenic spots ; represents the neighbor set; Construct a scenic spot interest model according to the interest intensity.
[0010] In one embodiment, the step of analyzing the scenic spot feature data through a BERT - BiGRU sentiment analysis network to obtain a sentiment analysis result includes: Preprocess the comment data in the scenic spot feature data to obtain scenic spot text data; Use the Glove method to vectorize the scenic spot text data to obtain text feature vectors; Input the text feature vectors into the BERT - BiGRU sentiment analysis network to obtain comment types. The BERT - BiGRU sentiment analysis network includes an input layer, a fully - connected layer, and an output layer; Take the comment types as the sentiment analysis result.
[0011] In one embodiment, the step of inputting the text feature vectors into the BERT - BiGRU sentiment analysis network to obtain comment types includes: Input the text feature vectors into the input layer of the BERT - BiGRU sentiment analysis network for encoding to obtain the context relationship and semantic features of the text; Classify the sentiment task according to the context relationship and semantic features of the text and input them into the fully - connected layer to obtain an output value; Compare the output value input into the output layer with a preset threshold to obtain comment types.
[0012] In one embodiment, the step of constructing a preset multi - objective tourism route planning model according to the scenic spot interest model and the scenic spot satisfaction model includes: The attraction degree of a scenic spot is obtained through the scenic spot interest degree model, and the satisfaction degree of the scenic spot is obtained through the scenic spot satisfaction degree model; According to the attraction degree of the scenic spot and the satisfaction degree of the scenic spot, an objective function of scenic spot attraction is constructed; According to the scenic spot attraction function, a multi-objective tourism route planning model is constructed.
[0013] In addition, the present application also proposes a tourism route generation device based on an enhanced whale optimization algorithm, and the device includes: An acquisition module, configured to acquire tourist feature data and scenic spot feature data; A processing module, configured to input the tourist feature data and the scenic spot feature data into a preset multi-objective tourism route planning model to obtain a tourism route; An optimization module, configured to optimize the tourism route through an enhanced whale optimization algorithm model to obtain a target tourism route; A construction module, configured to analyze the tourist feature data and the scenic spot feature data to construct a scenic spot interest degree model; analyze the scenic spot feature data through a BERT-BiGRU sentiment analysis network to obtain a sentiment analysis result; construct a scenic spot satisfaction degree model according to the sentiment analysis result; construct a preset multi-objective tourism route planning model according to the scenic spot interest degree model and the scenic spot satisfaction degree model.
[0014] In addition, to achieve the above object, the present application also proposes a medium, the medium is a computer-readable medium, and a computer program is stored on the medium, and when the computer program is executed by a processor, the steps of the tourism route generation method based on the enhanced whale optimization algorithm as described above are implemented.
[0015] In addition, to achieve the above object, the present application also provides a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the tourism route generation method based on the enhanced whale optimization algorithm as described above are implemented.
[0016] The present application obtains tourist feature data and scenic spot feature data, inputs the tourist feature data and the scenic spot feature data into a preset multi-objective tourism route planning model to obtain a tourism route, and optimizes the tourism route through an enhanced whale optimization algorithm model to obtain a target tourism route. By obtaining tourist feature data and scenic spot feature data, inputting them into a preset multi-objective tourism route planning model to generate a tourism route, and using an enhanced whale optimization algorithm for optimization, a target tourism route is finally obtained, effectively solving the problems of data sparsity and insufficient optimization algorithm, and improving the personalization and optimization effect of the tourism route. Description of the Drawings
[0017] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0018] Figure 1 It is a schematic flowchart of the first embodiment of the travel route generation method based on the enhanced whale optimization algorithm of the present application; Figure 2 It is a schematic flowchart of the second embodiment of the travel route generation method based on the enhanced whale optimization algorithm of the present application; Figure 3 It is a schematic flowchart of the third embodiment of the travel route generation method based on the enhanced whale optimization algorithm of the present application; Figure 4 It is a schematic module structure diagram of the travel route generation device based on the enhanced whale optimization algorithm in the first embodiment of the travel route generation method based on the enhanced whale optimization algorithm of the present application; Figure 5 It is a schematic device structure diagram of the hardware operating environment involved in the travel route generation method based on the enhanced whale optimization algorithm in the embodiments of the present application.
[0019] The implementation, functional features, and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments
[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0021] To better understand the technical solutions of the present application, the following will be described in detail in combination with the accompanying drawings of the specification and the specific embodiments.
[0022] With the rapid development of information technology, the widespread application of the Internet and mobile devices is profoundly changing people's travel patterns. When planning a journey, modern tourists increasingly rely on online platforms to obtain information, book services, and share experiences. This trend has generated a vast amount of data, including but not limited to user preferences, reviews, ratings, etc., laying the foundation for the development of personalized travel services. At the same time, tourists' requirements for travel experiences are also increasing day by day. They not only focus on the attractiveness of the scenic spots themselves but also expect the entire journey to achieve an optimal state in terms of time arrangement, budget control, and personal interest matching. Traditional travel route planning methods often struggle to meet this requirement because they usually cannot fully consider the diverse needs and personal preferences of tourists.
[0023] Therefore, this application proposes a method to improve the accuracy and personalization of travel route planning. The main solution of the embodiments of this application is: obtain tourist characteristic data and scenic spot characteristic data, input the tourist characteristic data and scenic spot characteristic data into a preset multi-objective travel route planning model to obtain a travel route, and optimize the travel route through an enhanced whale optimization algorithm model to obtain a target travel route.
[0024] Based on the above, the embodiments of this application also provide a travel route generation method based on an enhanced whale optimization algorithm. Refer to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the travel route generation method based on the enhanced whale optimization algorithm of this application.
[0025] In this embodiment, the travel route generation method based on the enhanced whale optimization algorithm includes steps S10 to S30: Step S10, obtain tourist characteristic data and scenic spot characteristic data.
[0026] It should be noted that tourist characteristic data includes basic information such as gender, age, time preference for travel, and budget constraints. These data can help understand the preferences and needs of different tourist groups. For example, young tourists may be more inclined to adventure activities and cultural experiences, while family outings may pay more attention to safety and child-friendly facilities. In addition, understanding the travel patterns of tourists (such as self-driving, public transportation, or walking) is crucial for optimizing traffic arrangements.
[0027] On the other hand, scenic spot characteristic data includes multi-dimensional information such as scenic spot ticket prices, transportation costs, opening hours, and geographical relevance to other scenic spots. By analyzing these data, the attractiveness of each scenic spot and its value to different tourist groups can be evaluated. For example, some scenic spots may be favored by older tourists due to their historical value, while other scenic spots attract young people because of their unique natural scenery or interactive experiences. It is worth noting that the real-time evaluations and ratings of scenic spots are also important reference factors, which reflect the true feelings of current tourists and help discover potential problems or popular trends.
[0028] Meanwhile, in order to collect this data, web scraping technology is usually adopted to crawl relevant information from major travel websites, social media platforms and user review areas, and first-hand information is directly obtained from tourists by combining methods such as questionnaires and user registration materials. After the data is collected, strict preprocessing steps are required, including data cleaning, deduplication, outlier processing, etc., to ensure the quality and reliability of the data. On this basis, using machine learning algorithms and big data analysis tools, the potential connections between tourists and scenic spots can be deeply explored, providing solid data support for the subsequent construction of an accurate travel route planning model. This process not only improves the intelligent level of tourism services, but also brings a more personalized and satisfactory travel experience to tourists.
[0029] Step S20, input the tourist feature data and scenic spot feature data into a preset multi-objective travel route planning model to obtain a travel route.
[0030] It should be noted that the preset multi-objective travel route planning model is to balance multiple conflicting goals, such as minimizing travel time and cost, while maximizing tourists' satisfaction with scenic spots. First, based on the basic information of tourists (such as gender, age, travel preferences, etc.) and scenic spot cost parameters, a preliminary optimization objective function for the tourist group is constructed. This process fully considers the interest differences of tourists of different ages and genders in scenic spots, as well as their preferences for different types of activities. Specifically, represents the set of scenic spot features, represents the number of scenic spots, and the contained vector information is , is the ticket price of the scenic spot, and respectively represent the longitude and latitude information of the scenic area. Then, the ticket cost for each scenic spot selected in the route during the trip is: , Then, the time tour cost required for the route selected during the trip is obtained. The specific formula is: Among them, represents the travel mode, such as driving, cycling, bus and sightseeing bus, is the time spent on choosing the travel mode between two tourist attractions, is the speed of choosing the travel mode, is the distance between any two scenic spots. In this embodiment, taking choosing taxi, bus and subway as travel modes, the cost of choosing the travel mode can be expressed as: Among them, is the number of corresponding travel modes, is the total travel cost, is the cost of taking a taxi, is the number of times taking the bus, represents the cost of taking the bus once, is the cost of each subway ride.
[0031] Next, use the BERT - BiGRU network to perform sentiment analysis on scenic spot reviews to distinguish positive and negative evaluations, and build an optimized model for scenic spot satisfaction based on this. Through this method, the actual attractiveness and tourist satisfaction of each scenic spot can be evaluated more accurately, providing a basis for the selection of tourist routes. On this basis, combined with factors such as the location information and ticket price of the scenic spot, further optimize the cost - benefit ratio of each potential route. Based on the above - mentioned analysis results, build the final multi - objective optimized model for tourist route planning. This model not only takes into account the interests and preferences of tourists, but also takes into account the time and cost issues that may be encountered during the actual tour.
[0032] Step S30, optimize according to the tourist route through the enhanced whale optimization algorithm model to obtain the target tourist route.
[0033] It should be noted that in order to further optimize this route to meet the diverse needs of tourists, it is particularly important to use the Enhanced Whale Optimization Algorithm (EWOA) for in - depth optimization. EWOA is an intelligent optimization algorithm inspired by the hunting behavior of humpback whales in nature. It explores the solution space by simulating behaviors such as whales surrounding prey, bubble - net attacks, and random searches to find the optimal solution. For tourist route planning, this means not only finding the best path covering all selected scenic spots, but also minimizing travel time and cost and maximizing tourist satisfaction during this process.
[0034] First, when applying EWOA, a non - linear convergence factor is introduced. This factor shows a non - linear decreasing trend as the number of iterations increases, thus gradually narrowing the search range, helping the algorithm to shift from global search to local fine - tuning to ensure the accuracy of the final solution. In addition, to avoid the algorithm falling into local optimal solutions, an adaptive weight strategy based on exponential change is adopted to dynamically adjust the weight distribution during the search process, improve population diversity, and strengthen the global search ability.
[0035] Secondly, the pooling mechanism is used to mix the poor solutions with the solutions near the optimal solution, increasing the diversity of the population, which helps to jump out of the local minimum and find a better solution. At the end of each iteration, the members in the pool are updated, and the newly discovered better solutions are added to the next iteration to continuously improve the quality of the solutions. For the process of searching for prey under specific conditions, a Cauchy distribution priority selection search strategy is also adopted, enhancing the exploration ability of the algorithm so that it can search for possible optimal solutions in a wider area.
[0036] Finally, through the above series of optimization measures, EWOA can effectively optimize the initial travel route and output the final travel route plan that meets the needs of the target group. This optimized route not only takes into account the time and budget constraints of tourists, but also fully reflects their interest preferences for different scenic spots, ensuring the efficiency and satisfaction of the journey, and providing tourists with an unforgettable and personalized travel experience. This method demonstrates the great potential of modern technology in improving the quality of tourism services.
[0037] In this embodiment, by obtaining tourist feature data and scenic spot feature data, inputting the tourist feature data and scenic spot feature data into a preset multi-objective travel route planning model to obtain a travel route, and optimizing the travel route through an enhanced whale optimization algorithm model to obtain a target travel route. By obtaining tourist feature data and scenic spot feature data, inputting them into a preset multi-objective travel route planning model to generate a travel route, and using an enhanced whale optimization algorithm for optimization, a target travel route is finally obtained, effectively solving the problems of data sparsity and insufficient optimization algorithm, and improving the personalization and optimization effect of the travel route.
[0038] Based on this, the embodiment of the present application provides a travel route generation method based on an enhanced whale optimization algorithm, referring to Figure 2 , Figure 2 is a schematic flowchart of the second embodiment of the travel route generation method based on the enhanced whale optimization algorithm of the present application.
[0039] In this embodiment, the travel route generation method based on the enhanced whale optimization algorithm includes steps S201 to S208: Step S201, generate an initial population and set the size of the whale population and the maximum number of iterations.
[0040] It should be noted that the size of the initial population directly affects the exploration ability and computational efficiency of the algorithm. Generally, a larger population can provide a wider search space coverage, which helps to find the global optimal solution, but at the same time it will increase the computational burden. Therefore, in practical applications, it is necessary to reasonably set the population size according to the complexity of the specific problem and the computational resources. For multi-objective optimization problems such as travel route planning, a reasonable initial population size may be between 50 and 100, expressed as , where . In addition, the number of iterations determines the running time of the algorithm and the fineness of the search process. Too few iterations may cause the algorithm to fail to converge sufficiently to the optimal solution, while too many iterations may result in unnecessary computational overhead. Generally, the maximum number of iterations can be adjusted according to the results of preliminary experiments. For the travel route optimization problem, this value can start from 100 times and be adjusted gradually according to the actual situation. During the initialization process, each whale individual represents a potential travel route plan, and its position vector represents the visiting order of each scenic spot in this plan. In this way, EWOA can continuously explore and optimize these plans during the process of simulating the foraging behavior of whales, in order to find the best travel route that meets the needs of tourists. This process not only takes into account the minimization of time and cost, but also maximizes the satisfaction of tourists with the travel experience.
[0041] Step S202: Calculate the individuals in the whale population according to the multi-objective function to obtain the fitness of the individuals and the best position of the population.
[0042] It should be noted that each whale individual represents a potential travel route plan, and its position vector represents the visiting order of each scenic spot in this plan. By evaluating these individuals through the multi-objective function, the quality of each travel route can be quantified.
[0043] First, for each whale individual, it is calculated based on the multi-objective function constructed by combining the tourist characteristic data and the scenic spot characteristic data in multiple dimensions such as time, cost, and satisfaction. For example, a typical multi-objective function may include minimizing the total travel time, minimizing the total consumption cost, while maximizing the scenic spot attractiveness and tourist satisfaction. Specifically, the scenic spot attractiveness can be measured by calculating the sum of the scores of each scenic spot in each route; and the tourist satisfaction can be determined according to the sentiment analysis results of the scenic spot reviews. After calculating through the above multi-objective function, the fitness value of each individual can be obtained, and this value reflects the superiority degree of this travel route plan relative to other plans. Then, in the entire whale population, the individual with the highest fitness is selected as the current best position . This process not only helps to identify the optimal or near-optimal travel route plan, but also provides a direction for subsequent iterations. As the number of iterations increases, by continuously updating the individual positions and exploring new solution spaces, the algorithm gradually approaches the global optimal solution, ensuring that the finally output travel route not only meets the user's needs but also has high efficiency and economy.
[0044] Step S203: Obtain the search range of the whale population by introducing a non-linear convergence factor and an adaptive weight strategy.
[0045] It should be noted that the non - linear convergence factor is mainly used to control the balance between exploration and exploitation in the search process. The non - linear convergence factor is specifically expressed as: Wherein, is the maximum number of iterations, is the phase offset. As the number of iterations increases, this factor shows a non - linear decreasing trend, which gradually narrows the search range. This helps the algorithm shift from extensive exploration in the initial stage to fine exploitation of potential optimal solutions in the later stage, thereby improving the convergence speed and accuracy.
[0046] At the same time, the adaptive weight strategy is used to further optimize the search process. This strategy enhances the ability of the algorithm to jump out of local optima by dynamically adjusting the weights of each whale individual during position update. The specific formula is: Wherein, represents the learning factor, represents the current iteration number, represents the maximum number of iterations. Specifically, during each iteration, the weight value is automatically adjusted according to the quality of the current solution: when approaching the optimal solution, the weight tends to be stable for fine - grained search; while when far from the optimal solution, the weight is increased to expand the search range and avoid falling into local minima. In the position update function, the weight is adjusted according to the current iteration number and the maximum number of iterations to achieve a smooth transition from exploration to exploitation. The update function is: In the formula, When, the whale surrounds the prey, When, the whale searches for prey, When, the whale performs a spiral bubble - net attack, is the number of iterations, is the th position vector of the and are coefficient vectors, is the th position vector of a randomly selected whale in the iteration, 、 and are the distance vectors between the whale and the prey, is the shape parameter of the logarithmic spiral, which is a key parameter describing the shape of the movement path when the whale performs the spiral bubble - net attack behavior, is in the range of random numbers is the maximum number of iterations. These strategies work together to not only effectively reduce the dependence on the search range of the whale population but also improve the overall performance of the algorithm, especially when solving complex multi-objective tourist route planning problems.
[0047] Step S204, based on the search range, mix the solutions around the best position of the population through a pooling mechanism to obtain multiple whale populations and corresponding individual fitness values.
[0048] It should be noted that to increase population diversity and avoid the algorithm falling into local optimal solutions, a pooling mechanism is adopted to mix the solutions around the best position. This mechanism generates new whale individuals by combining the poorer solutions in the current population with the high-quality solutions near the best position, thus forming multiple whale populations. Specifically, the pooling operation selects a part of the poorly performing solutions and mixes them with the solutions near the currently found best position. This not only introduces new solution spaces but also helps to explore a wider range of possible solutions.
[0049] In this process, the fitness value of each newly generated whale individual is recalculated according to the multi-objective function, which reflects the superiority degree of the tourist route plan compared to other plans. For example, when calculating the fitness, multiple factors such as travel time, consumption cost, scenic spot attractiveness, and tourist satisfaction may be considered. In this way, the algorithm can explore new solutions that may be overlooked but have potential while maintaining high-quality solutions. The specific formula is: In the above formula, is a binary random vector, is the inverse vector of the solutions in the current generation that are worse than the previous generation, is the optimal solution the solutions near and are the upper and lower bounds of the optimal solution.
[0050] This strategy significantly improves the global search ability of the algorithm, enabling EWOA to not only effectively find the optimal solutions within the existing solution space but also explore new solution space regions to find potential better solutions.
[0051] Step S205, compare the multiple individual fitness values through the Cauchy distribution search strategy to obtain the global optimal solution of the whale population.
[0052] It should be noted that in order to improve the global search ability and avoid falling into local optima, the Cauchy distribution search strategy is adopted to compare the fitness of multiple individuals, so as to discover and update the global optimum of the whale population. The Cauchy distribution is a probability distribution with heavy-tailed characteristics, and its feature is that it can generate random numbers in a wide range, which is very beneficial for jumping out of local minima and exploring a wider solution space.
[0053] Specifically, in each iteration process, a set of random numbers is generated through the Cauchy distribution, and these random numbers are used to adjust the positions of some whale individuals. The specific formula is: where, is the Cauchy distribution, represents the coefficient vector, usually randomly generated from the interval [0, 1], and are randomly selected from the matrix pool at the t-th iteration. This process allows the algorithm to explore those areas that have not been fully explored on the basis of the current population, thus increasing the possibility of finding a better solution. For each whale individual whose position is adjusted by the Cauchy distribution, its fitness is recalculated according to the multi-objective function and compared with the best individual in the current population. If the fitness corresponding to the new position is higher, then update this individual as the new global optimum.
[0054] This search strategy based on the Cauchy distribution not only enhances the exploration ability of the algorithm, but also promotes the maintenance of population diversity, ensuring that when solving complex multi-objective tourist route planning problems, the algorithm can effectively balance global search and local fine search.
[0055] Step S206, update the positions of individuals in the whale population according to the best position of the population and the global optimum.
[0056] It should be noted that this process is mainly based on the information of the best position of the current population and the global optimum. Specifically, each whale individual adjusts its position according to the distance between its current position and the global optimum using a specific search strategy.
[0057] First, determine the best position of the population and the global optimum. These information provide the direction and goal for individuals to explore. Then, different mathematical models are used to simulate the predation behavior of whales, such as surrounding prey, bubble net attack, etc., to guide the update of individual positions. For example, in the process of position update, non-linear convergence factors and adaptive weight strategies may be used to dynamically adjust the search range and direction to ensure that both new areas can be effectively explored and the potential near known high-quality solutions can be carefully developed.
[0058] For each individual whale, calculate the new position according to the updated formula and evaluate its fitness based on the multi-objective function. If the new position can bring higher fitness, update the position and fitness value of this individual. In this way, not only the quality of the individual is improved, but also the entire population is promoted to approach the global optimal solution, ultimately providing an efficient and personalized solution for the tourism route planning problem. This process reflects the importance of the algorithm in balancing exploration and exploitation, ensuring the ability of continuous optimization.
[0059] Step S207, if the iteration number is reached, output the preset whale individual corresponding to the final individual position.
[0060] It should be noted that at the end of the iteration, the algorithm first determines the global optimal solution in the current population. The preset whale individual corresponding to the individual position of this global optimal solution is the whale individual with the highest fitness value. This optimal solution not only represents the optimized tourism route but also contains the key parameters and strategies in the solution, such as scenic spot attractiveness, tourist satisfaction, travel time, and cost, etc.
[0061] Step S208, construct an enhanced whale optimization algorithm model according to the preset whale individual and then predict the target tourism route.
[0062] It should be noted that use the position information of the optimal whale individual to initialize the EWOA model, which includes but is not limited to the scenic spot sequence on the best path, the best transportation method between each scenic spot and its time arrangement, etc. Then, according to the specific needs of tourists (such as preferences, budget constraints, etc.), adjust the model parameters to ensure personalized services. Then, adopt the unique mechanisms of EWOA, such as non-linear convergence factor, adaptive weight adjustment, and pooling mechanism, etc., to fine-tune the model so as to more accurately simulate the tourism route planning problem in different situations. On this basis, the EWOA model can be used for prediction under new datasets or changing conditions. For example, if the tourist's interest points change or new scenic spots are added, the algorithm can quickly respond and recalculate the optimal route. By inputting different scenario assumptions, such as weather changes, traffic condition updates, etc., the model can output a series of alternative tourism routes, and each route is optimized to meet the best experience and efficiency requirements under specific conditions. Finally, these prediction results not only provide tourists with diverse choices but also demonstrate how to use advanced intelligent optimization algorithms to dynamically respond to the changes in the complex real world, improving the overall quality and personalization level of the tourism experience.
[0063] In this embodiment, the search process of the whale population is optimized by generating an initial population and combining a non-linear convergence factor, an adaptive weight strategy, a pooling mechanism, and a Cauchy distribution search strategy. After reaching the maximum number of iterations, the optimal individual is output, and an enhanced whale optimization algorithm model is constructed based on this to predict the travel route, improving the efficiency and accuracy of solving the multi-objective travel route planning problem, providing a more personalized, economical and efficient travel plan, and enhancing the user experience and satisfaction.
[0064] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar content as in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 3 , before step S20 of the travel route generation method based on the enhanced whale optimization algorithm, there are also steps S301 to S304: Step S301, analyze the tourist feature data and the scenic spot feature data, and construct a scenic spot interest model.
[0065] It should be noted that the tourist feature data, including gender, age, travel mode, preferences, etc., and the tourist feature data, such as location, ticket price, comments and ratings, are collected and processed. After these data are cleaned, standardized and necessary preprocessing steps, they can provide high-quality input for subsequent analysis. Based on the tourist feature data, the collaborative filtering method can be used to describe the interest distribution of different tourist groups, measure the similarity between tourists by calculating the Pearson correlation coefficient, and predict the interest score of individuals for unvisited scenic spots accordingly.
[0066] Specifically, statistically analyze the tourist feature data to obtain the tourist preference features. The above tourist feature data includes gender, age, time preference for travel and budget limit. Analyze the scenic spot feature data to obtain the scenic spot cost parameters. The above scenic spot feature data includes scenic spot ticket price, transportation cost, opening hours and geographical relevance with other scenic spots. Based on the tourist preference features and the scenic spot cost parameters, construct a scenic spot interest model. Further, a scoring matrix of tourists and scenic spots is constructed for the tourist preference features and the scenic spot cost parameters through the collaborative filtering method. The scoring matrix is expressed as: Among them, the scoring matrix , each element represents the score of tourist for scenic spot ; Use the Pearson correlation coefficient to calculate according to the scoring matrix to obtain the similarity between tourists. The specific formula is: Among them represents tourist and tourists The set of scenic spots with ratings from both and are the average ratings of tourists and tourists respectively. represents the rating of tourist for scenic spot ; represents the rating of tourist for scenic spot ; Filter out a preset number of groups with high similarity to the target tourist as the neighbor set. The specific formula is: Among them, is the set of tourists, is the preset number, represents the similarity between tourist and tourist ; Predict the interest rating of the scenic spots not visited by the target tourist through the neighbor set to obtain the interest intensity. The specific formula is: Among them, represents the interest intensity of the target tourist for the unvisited scenic spot , represents the predicted rating of the target tourist for the unvisited scenic spot , represents the lowest rating of tourist for scenic spot , represents the highest rating of tourist for scenic spot , represents the actual rating of the neighbor tourist for the unvisited scenic spot , represents the neighbor set; Construct a scenic spot interest model based on the interest intensity. The specific formula is: Among them, is the number of scenic spots, is the decision variable indicating whether to select the scenic spot.
[0067] Step S302: Analyze the scenic spot feature data through the BERT - BiGRU sentiment analysis network to obtain the sentiment analysis result.
[0068] It should be noted that the scenic spot feature data will undergo a series of preprocessing operations, including outlier removal, data normalization, duplicate text filtering, word segmentation, and stop word removal, to ensure the accuracy and consistency of the data. Subsequently, the Glove method is used to vectorize the text, converting the text into a numerical form that the model can process. Next, the BERT pre-trained model is used to capture the context relationships and complex semantic patterns in the review text. The core of BERT is the multi-layer Transformer encoder, which can fully understand the relationships and semantic differences between words in the text through the multi-head attention mechanism and the feed-forward network. On this basis, the BiGRU module further extracts the long-term dependencies of the text and maintains the stable flow of gradients during the training of the deep network, so as to more comprehensively understand the sentiment tendency of the review. Finally, the output result of the BERT-BiGRU sentiment analysis network is input into the fully connected layer for the sentiment classification task. Through the activation function and threshold judgment, it is determined whether the sentiment tendency of the review is positive or negative.
[0069] Specifically, the review data in the scenic spot feature data is preprocessed to obtain the scenic spot text data; the Glove method is used to vectorize the scenic spot text data to obtain the text feature vectors; the text feature vectors are input into the BERT-BiGRU sentiment analysis network to obtain the review type. The above BERT-BiGRU sentiment analysis network includes an input layer, a fully connected layer, and an output layer. Further, the text feature vectors are input into the input layer of the BERT-BiGRU sentiment analysis network for encoding to obtain the context relationships and semantic features of the text. According to the context relationships and semantic features of the text, they are input into the fully connected layer for sentiment task classification to obtain the output value; according to the output value, it is input into the output layer and compared with the preset threshold to obtain the review type. Specifically, after the original review text is preprocessed (such as stop word removal, word segmentation, etc.), the Glove method is used to convert it into a vector form. Then, these vectors are input into the BERT pre-trained model for encoding, and this step can capture the context relationships and complex semantic patterns in the text. The core of BERT lies in its use of the Transformer encoder to model the relationships between words in different positions through the multi-head attention mechanism and the feed-forward network. Next, the encoded features are passed to the BiGRU module to further extract the long-term dependencies. The BiGRU consists of a forward and a backward GRU, which process the sequence data from the front and back directions respectively, and the results are concatenated to obtain a more comprehensive hidden state representation. The specific processing process is as follows: First, update the gate, , where is the weight matrix, is the Sigmoid activation function, then reset the gate, , where is the weight matrix, and then the candidate hidden state is obtained according to the following formula: , where represents element-wise multiplication, is the weight matrix, and then the final hidden state is obtained. The formula is: , through the forward GRU, the forward state of each time step is calculated in sequence. The specific formula is: , and then through the backward GRU, the backward hidden state of each time step is calculated in reverse order. The formula is: , and finally the forward hidden state and the backward hidden state are concatenated to obtain the final hidden representation . This process not only helps to capture the temporal dynamics within the sequence but also effectively maintains the stable flow of gradients, which is particularly important for long sequences. Subsequently, the context and semantic features obtained after BERT-BiGRU processing are fed into the fully connected layer to perform the final sentiment classification task. The fully connected layer calculates the output value through a series of weight calculations, representing the probability that the comment belongs to a certain sentiment category. The specific formula is: where is the output of the fully connected layer, is the activation function, is the vector composed of weights in the fully connected layer, is the feature vector, is the bias term. If the output value exceeds the preset threshold, the comment is determined to be a positive evaluation, indicating that the tourist has a positive attitude and a satisfactory experience towards the scenic spot; otherwise, it is a negative evaluation, meaning that the tourist may be dissatisfied with the scenic spot or has put forward criticism. Finally, the comment type is used as the sentiment analysis result.
[0070] Step S303, construct a scenic spot satisfaction model according to the sentiment analysis result.
[0071] It should be noted that through the BERT-BiGRU network, in-depth sentiment analysis is performed on the tourist comments of the scenic spot to distinguish positive and negative evaluations. This process not only depends on the word selection in the text but also considers the sentence structure and context information, so as to more accurately capture the true feelings of tourists.
[0072] Based on the results of these sentiment analyses, a scenic spot satisfaction model can be constructed. This model comprehensively considers information from multiple dimensions, including but not limited to the sentiment tendency of comments, the rating level, and the specific feedback content of tourists. Specifically, for each scenic spot, all relevant comments are collected, and the ratio of positive to negative comments is calculated through sentiment analysis algorithms to obtain the overall satisfaction index of the scenic spot. In addition, rating data can be combined and different weights can be assigned to more comprehensively reflect the actual popularity and service quality of the scenic spot. When constructing the model, the weighted average method or other appropriate statistical methods are used to integrate the above multi-source data to form a quantified satisfaction score. For example, if a scenic spot receives a large number of high ratings and most of the comments are positive, the satisfaction index of this scenic spot is relatively high; on the contrary, if the proportion of negative comments is relatively large, even if the rating is acceptable, its satisfaction index will be correspondingly reduced. If the tourist rating on the website is not full marks (the full mark is 5 points) and the sentiment analysis result is a negative sample, it is identified as a negative semantic comment, and the tourist rating is -1 point; if the tourist rating is between 3-5 points and the sentiment analysis result is a positive sample, it is identified as a positive semantic comment, and the tourist rating is +1 point. Ultimately, this scenic spot satisfaction model can not only help potential tourists make more informed choices, but also provide an important reference basis for travel route planning, ensuring that each route recommended to users includes scenic spots with high satisfaction, thereby improving the quality of the overall travel experience and user satisfaction. At the same time, this also helps scenic spot management parties identify service shortcomings and make targeted improvements.
[0073] Step S304, construct a preset multi-objective tourism route planning model according to the scenic spot interest model and the scenic spot satisfaction model.
[0074] It should be noted that the scenic spot interest model identifies the set of scenic spots that are most attractive to a specific group of tourists by analyzing the characteristics of tourists (such as gender, age, preferences, etc.) and the characteristics of scenic spots (such as location, ticket price, comments, etc.). At the same time, the scenic spot satisfaction model uses sentiment analysis results and rating data to evaluate the service quality and tourist satisfaction of each scenic spot, ensuring that the recommended scenic spots not only meet the interests of tourists but also provide a high-quality tour experience. When constructing the multi-objective tourism route planning model, multiple optimization objectives such as scenic spot attractiveness, tourist satisfaction, travel costs (including time and expenses) are comprehensively considered.
[0075] Furthermore, step S304 includes: obtaining the attraction degree of scenic spots through the scenic spot interest model and the satisfaction degree of scenic spots through the scenic spot satisfaction model; constructing an objective function for the attraction of scenic spots based on the attraction degree and satisfaction degree of scenic spots. Specifically, through the scenic spot interest model, we can quantify the attraction degree of each scenic spot to a specific group of tourists. This model is based on the basic information of tourists (such as age, gender, travel preferences, etc.) and the characteristics of scenic spots (such as location, ticket price, review content, etc.), and uses collaborative filtering methods and sentiment analysis techniques to evaluate the matching degree between scenic spots and tourists' interests. At the same time, the scenic spot satisfaction model conducts sentiment analysis using the BERT-BiGRU network based on the evaluation and scoring data of tourists on scenic spots, calculates the satisfaction degree of each scenic spot, and reflects the actual experience of tourists on scenic spots. Then, based on the results of the above two models, an objective function for the attraction of scenic spots can be constructed, comprehensively considering the two factors of the attraction degree and satisfaction degree of scenic spots. Specifically, the objective function for the attraction of scenic spots can be defined as the weighted sum of the attraction degree score and the satisfaction degree score of scenic spots, where the weight can be adjusted according to the actual application scenario to emphasize the importance of a certain factor. The formula is: where, is the number of people who have given scores obtained, represents the attraction score of the scenic spot to gender, represents the attraction score to age, represents the satisfaction degree of the scenic spot, represents the minimum satisfaction degree of the scenic spot, represents the maximum satisfaction degree of the scenic spot. For example, in some scenarios, if we hope to focus more on tourists' interest preferences, we can appropriately increase the weight of the attraction degree score; conversely, if we pay more attention to service quality, we can increase the weight of the satisfaction degree score. Then, based on the scenic spot attraction function, a multi-objective tourism route planning model is constructed. When constructing the target tourism route planning model, the primary goal is to maximize the total attraction score of all selected scenic spots in the entire itinerary. This means not only selecting high-attraction scenic spots but also reasonably arranging their visiting order to enhance the overall experience. In addition, the model also needs to minimize travel time and cost, which involves optimizing the choice of transportation methods and route planning to ensure the most efficient itinerary arrangement within the budget.
[0076] In this embodiment, by analyzing tourist and scenic spot data, a scenic spot interest degree and satisfaction model is constructed using the BERT-BiGRU network. Based on these two models, an enhanced whale optimization algorithm is used to construct a multi-objective tourism route planning model, improving the accuracy of personalized recommendations, optimizing the travel experience, ensuring that the recommended route meets the tourists' interests and has a high satisfaction level, while taking into account costs and time efficiency.
[0077] Based on the first embodiment of this application, this application also provides a tourism route generation device based on the enhanced whale optimization algorithm. Please refer to Figure 4 , the device includes: An acquisition module 10, configured to acquire tourist feature data and scenic spot feature data; A processing module 20, configured to input the tourist feature data and the scenic spot feature data into a preset multi-objective tourism route planning model to obtain a tourism route; An optimization module 30, configured to optimize the tourism route through an enhanced whale optimization algorithm model to obtain a target tourism route; A construction module 40, configured to analyze the tourist feature data and the scenic spot feature data to construct a scenic spot interest degree model; analyze the scenic spot feature data through a BERT-BiGRU sentiment analysis network to obtain a sentiment analysis result; construct a scenic spot satisfaction model according to the sentiment analysis result; and construct a preset multi-objective tourism route planning model according to the scenic spot interest degree model and the scenic spot satisfaction model.
[0078] The tourism route generation device based on the enhanced whale optimization algorithm provided by this application adopts the tourism route generation method based on the enhanced whale optimization algorithm in the above embodiment, and can solve the technical problem of how to improve the accuracy and personalization degree of tourism route planning. Compared with the prior art, the beneficial effects of the tourism route generation device based on the enhanced whale optimization algorithm provided by this application are the same as those of the tourism route generation method based on the enhanced whale optimization algorithm provided in the above embodiment, and other technical features in the tourism route generation device based on the enhanced whale optimization algorithm are the same as the features disclosed in the above embodiment method, and will not be elaborated here.
[0079] In one embodiment, the optimization module 30 is further configured to generate an initial population, set the size of the whale population and the maximum number of iterations; calculate the individuals in the whale population according to the multi-objective function to obtain the fitness of the individuals and the best position of the population; obtain the search range of the whale population by introducing a non-linear convergence factor and an adaptive weight strategy; mix the solutions around the best position of the population through a pooling mechanism based on the search range to obtain multiple whale populations and the corresponding individual fitnesses; compare the multiple individual fitnesses through a Cauchy distribution search strategy to obtain the global optimal solution of the whale population; update the positions of the individuals in the whale population according to the best position of the population and the global optimal solution; if the number of iterations is reached, output the preset whale individual corresponding to the final individual position; construct an enhanced whale optimization algorithm model according to the preset whale individual and then predict the target tourist route.
[0080] In one embodiment, the construction module 40 is further configured to perform statistical analysis on the tourist characteristic data to obtain the tourist preference characteristics. The tourist characteristic data includes gender, age, appearance time preference, and budget limit; analyze the scenic spot characteristic data to obtain the scenic spot cost parameters. The scenic spot characteristic data includes scenic spot ticket price, transportation cost, opening time, and geographical relevance to other scenic spots; construct a scenic spot interest model according to the tourist preference characteristics and the scenic spot cost parameters.
[0081] In one embodiment, the construction module 40 is further configured to construct a rating matrix of tourists and scenic spots for the tourist preference characteristics and the scenic spot cost parameters through a collaborative filtering method; calculate according to the rating matrix using the Pearson correlation coefficient to obtain the similarity between tourists; screen out a preset number of groups with high similarity to the target tourist as the neighbor set; predict the interest rating of the scenic spots not visited by the target tourist through the neighbor set to obtain the interest intensity; construct a scenic spot interest model according to the interest intensity.
[0082] In one embodiment, the construction module 40 is further configured to preprocess the comment data in the scenic spot characteristic data to obtain the scenic spot text data; perform vectorization processing on the scenic spot text data using the Glove method to obtain text feature vectors; input the text feature vectors into the BERT-BiGRU sentiment analysis network to obtain the comment type. The BERT-BiGRU sentiment analysis network includes an input layer, a fully connected layer, and an output layer; use the comment type as the sentiment analysis result.
[0083] In one embodiment, the construction module 40 is further configured to input the text feature vectors into the input layer of the BERT-BiGRU sentiment analysis network for encoding to obtain the context relationship and semantic features of the text; input the context relationship and semantic features of the text into the fully connected layer for sentiment task classification to obtain an output value; input the output value into the output layer and compare it with a preset threshold to obtain the comment type.
[0084] In one embodiment, the building block 40 is further configured to obtain the attraction degree of a scenic spot through a scenic spot interest degree model, and obtain the satisfaction degree of the scenic spot through a scenic spot satisfaction model; construct an objective function of scenic spot attraction according to the attraction degree of the scenic spot and the satisfaction degree of the scenic spot; and construct a multi-objective tourism route planning model according to the scenic spot attraction function.
[0085] The present application provides a tourism route generation device based on an enhanced whale optimization algorithm. The tourism route generation device based on the enhanced whale optimization algorithm includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the tourism route generation method based on the enhanced whale optimization algorithm in the first embodiment above.
[0086] Reference is made below to Figure 5 , which shows a schematic structural diagram of a tourism route generation device suitable for implementing the tourism route generation device based on the enhanced whale optimization algorithm in the embodiments of the present application. The tourism route generation device based on the enhanced whale optimization algorithm in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The shown tourism route generation device based on the enhanced whale optimization algorithm is only an example, and should not impose any limitations on the functions and usage scopes of the embodiments of the present application.
[0087] As Figure 5As shown, the tourist route generation device based on the enhanced whale optimization algorithm may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the tourist route generation device based on the enhanced whale optimization algorithm are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the tourist route generation device based on the enhanced whale optimization algorithm to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a tourist route generation device based on the enhanced whale optimization algorithm with various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.
[0088] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0089] The tourism route generation device based on the enhanced whale optimization algorithm provided by this application adopts the tourism route generation method based on the enhanced whale optimization algorithm in the above-mentioned embodiment, and can solve the technical problem of how to improve the accuracy and personalization degree of tourism route planning. Compared with the prior art, the beneficial effects of the tourism route generation device based on the enhanced whale optimization algorithm provided by this application are the same as those of the tourism route generation method based on the enhanced whale optimization algorithm provided in the above-mentioned embodiment, and other technical features in the tourism route generation device based on the enhanced whale optimization algorithm are the same as the features disclosed in the method of the previous embodiment, which will not be elaborated here.
[0090] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0091] As mentioned above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0092] This application provides a computer-readable medium with computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the tourism route generation method based on the enhanced whale optimization algorithm in the above-mentioned embodiment.
[0093] The computer-readable medium provided by the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0094] The above computer-readable medium may be included in a travel route generation device based on an enhanced whale optimization algorithm; or it may exist separately and not be assembled into a travel route generation device based on an enhanced whale optimization algorithm.
[0095] The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a travel route generation device based on an enhanced whale optimization algorithm, the travel route generation device based on the enhanced whale optimization algorithm can write computer program code for performing the operations of the present application in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0097] The modules described in the embodiments of the present application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0098] The readable medium provided by the present application is a computer-readable medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned travel route generation method based on the enhanced whale optimization algorithm, and can solve the technical problem of how to improve the accuracy and personalization of travel route planning. Compared with the prior art, the beneficial effects of the computer-readable medium provided by the present application are the same as those of the travel route generation method based on the enhanced whale optimization algorithm provided in the above embodiments, and will not be elaborated here.
[0099] The present application also provides a computer program product, including a computer program, which when executed by a processor, implements the steps of the above-mentioned travel route generation method based on the enhanced whale optimization algorithm.
[0100] The computer program product provided by the present application can solve the technical problem of how to improve the accuracy and personalization of travel route planning. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the travel route generation method based on the enhanced whale optimization algorithm provided in the above embodiments, and will not be elaborated here.
[0101] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made using the specification and drawings of the present application under the technical concept of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A method for generating a travel route based on an enhanced whale optimization algorithm, characterized in that The method includes: Obtaining tourist feature data and scenic spot feature data; Inputting the tourist feature data and the scenic spot feature data into a preset multi-objective tourism route planning model to obtain a tourism route; Optimizing the tourism route through an enhanced whale optimization algorithm model to obtain a target tourism route; Before the step of inputting the tourist feature data and the scenic spot feature data into a preset multi-objective tourism route planning model to obtain a tourism route, it further includes: Analyzing the tourist feature data and the scenic spot feature data to construct a scenic spot interest model; Analyzing the scenic spot feature data through a BERT-BiGRU sentiment analysis network to obtain a sentiment analysis result; Constructing a scenic spot satisfaction model according to the sentiment analysis result; Constructing a preset multi-objective tourism route planning model according to the scenic spot interest model and the scenic spot satisfaction model.
2. The method according to claim 1, wherein Before the step of optimizing the tourism route through an enhanced whale optimization algorithm model to obtain a target tourism route, it includes: Generating an initial population and setting the size of the whale population and the maximum number of iterations; Calculating individuals in the whale population according to a multi-objective function to obtain the fitness of the individuals and the best position of the population; Obtaining the search range of the whale population by introducing a non-linear convergence factor and an adaptive weight strategy; Based on the search range, mixing the solutions around the best position of the population through a pooling mechanism to obtain multiple whale populations and the corresponding individual fitness; Comparing the multiple individual fitnesses through a Cauchy distribution search strategy to obtain the global optimal solution of the whale population; Updating the positions of individuals in the whale population according to the best position of the population and the global optimal solution; If the number of iterations is reached, outputting the preset whale individual corresponding to the final individual position; Constructing an enhanced whale optimization algorithm model according to the preset whale individual and then predicting the target tourism route.
3. The method according to claim 1, wherein The step of analyzing the tourist feature data and the scenic spot feature data to construct a scenic spot interest model includes: Conducting statistical analysis on the tourist feature data to obtain tourist preference features, where the tourist feature data includes gender, age, time preference for appearance, and budget constraints; Analyzing the scenic spot feature data to obtain scenic spot cost parameters, where the scenic spot feature data includes scenic spot ticket prices, transportation costs, opening hours, and geographical relevance to other scenic spots; Constructing a scenic spot interest model according to the tourist preference features and the scenic spot cost parameters.
4. The method according to claim 3, characterized in that The step of constructing a scenic spot interest model according to the tourist preference features and the scenic spot cost parameters includes: Constructing a rating matrix of tourists and scenic spots for the tourist preference features and the scenic spot cost parameters through a collaborative filtering method, and the rating matrix is expressed as: Among them, the scoring matrix , each element represents the score given by a tourist to a scenic spot; Calculating the similarity between tourists according to the rating matrix using the Pearson correlation coefficient, and the specific formula is: Among them represents the set of scenic spots that both tourists and tourists have rated, and are the average ratings of tourists and tourists respectively, represents the rating of tourist for scenic spot ; represents the rating of tourist for scenic spot ; Selecting a preset number of groups with high similarity to the target tourist as a neighbor set, and the specific formula is: Among them, is the set of tourists, is the preset quantity, represents tourist and tourist the similarity between them; Predicting the interest rating of scenic spots not visited by the target tourist through the neighbor set to obtain the interest intensity, and the specific formula is: Among them, represents the interest intensity of the target tourist in unvisited attractions ; represents the predicted score of the target tourist for unvisited attractions ; represents the minimum score of a tourist for an attraction ; represents the maximum score of a tourist for an attraction ; represents the actual score of a neighbor tourist for unvisited attractions ; represents the neighbor set; Construct an attraction interest model based on the intensity of interest.
5. The method according to claim 1, wherein The step of analyzing the attraction feature data through the BERT-BiGRU sentiment analysis network to obtain the sentiment analysis result includes: Preprocess the comment data in the attraction feature data to obtain attraction text data; Use the Glove method to vectorize the attraction text data to obtain text feature vectors; Input the text feature vectors into the BERT-BiGRU sentiment analysis network to obtain comment types. The BERT-BiGRU sentiment analysis network includes an input layer, a fully connected layer, and an output layer; Use the comment types as the sentiment analysis result.
6. The method according to claim 5, wherein The step of inputting the text feature vectors into the BERT-BiGRU sentiment analysis network to obtain comment types includes: Input the text feature vectors into the input layer of the BERT-BiGRU sentiment analysis network for encoding to obtain the context relationship and semantic features of the text; Input the context relationship and semantic features of the text into the fully connected layer for sentiment task classification to obtain output values; Input the output values into the output layer and compare them with a preset threshold to obtain comment types.
7. The method according to claim 1, characterized in that, The step of constructing a preset multi-objective tourism route planning model according to the attraction interest model and the attraction satisfaction model includes: Obtain the attraction degree through the attraction interest model and obtain the attraction satisfaction through the attraction satisfaction model; Construct an attraction attraction objective function according to the attraction degree and the attraction satisfaction; Construct a multi-objective tourism route planning model according to the attraction attraction function.
8. A tourist route generation device based on an enhanced whale optimization algorithm, characterized in that, The device includes: An acquisition module for acquiring tourist feature data and attraction feature data; A processing module for inputting the tourist feature data and the attraction feature data into a preset multi-objective tourism route planning model to obtain a tourism route; An optimization module for optimizing the tourism route through an enhanced whale optimization algorithm model to obtain a target tourism route; A construction module for analyzing the tourist feature data and the attraction feature data to construct an attraction interest model; analyzing the attraction feature data through a BERT-BiGRU sentiment analysis network to obtain a sentiment analysis result; constructing an attraction satisfaction model according to the sentiment analysis result; and constructing a preset multi-objective tourism route planning model according to the attraction interest model and the attraction satisfaction model.
9. A travel route generation device based on an enhanced whale optimization algorithm, characterized in that, The device includes: a memory, a processor, and a tourism route generation program based on an enhanced whale optimization algorithm stored on the memory and running on the processor. The tourism route generation program based on the enhanced whale optimization algorithm is configured to implement the steps of the tourism route generation method based on the enhanced whale optimization algorithm according to any one of claims 1-7.
10. A medium, characterized in that, A travel route generation program based on an enhanced whale optimization algorithm is stored on the medium. When the travel route generation program based on the enhanced whale optimization algorithm is executed by a processor, the steps of the travel route generation method based on the enhanced whale optimization algorithm according to any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Line customization method and line customization system based on travel planning
CN106096785A
Tourism route planning method based on whale optimization algorithm and artificial fish swarm algorithm
CN113420938A
Tourist route customization method and system based on deep reinforcement learning
CN114254837A
Genetic algorithm-based travel itinerary planning system
CN119359494A
Predicted travel intent
US20150168150A1
Cited By
Scenic spot flow prediction method, device, equipment, medium and program product
CN120633956A
Self-adaptive cascade controller parameter self-tuning method, medium and computer equipment
CN121209257A