Travel route optimization method and system based on traffic condition measurement and calculation
By constructing traffic situation fields and attraction attraction fields, and combining user intent and pace preferences, tourism routes are optimized, solving the problem of insufficient traffic situation reflection in traditional route planning. This achieves personalized and intelligent tourism route planning and enhances the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-20
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional tourist route planning cannot reflect the congestion of the urban road network in real time, and it is difficult to take into account the crowding of attractions, changes in travel time, and the personalized itinerary pace needs of tourists. As a result, the planned tourist routes have problems such as long trips, delays, and fatigue in actual implementation.
The tourism route optimization method based on traffic condition calculation obtains traffic condition data through a multi-source traffic monitoring network, constructs a traffic situation field and a scenic spot attraction potential field, and combines user intent and pace preference to optimize and rearrange routes, generating personalized tourism routes.
It improves the personalization and intelligence of travel routes, enhances the user experience, optimizes traffic efficiency and attraction visit timing, and meets users' personalized and real-time transportation needs.
Smart Images

Figure CN121661837A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tourism route optimization technology, and in particular to a tourism route optimization method and system based on traffic condition calculation. Background Technology
[0002] With the continuous expansion of urban transportation networks and the increasing complexity of the number and distribution of scenic spots, tourists face more and more dynamic traffic conditions, scenic spot opening hours, fluctuations in crowds and congestion, and changes in route accessibility during their travels. Traditional tourist routes that rely on static maps or are generated based on experience-weighted scoring often fail to reflect the congestion situation of urban road networks in real time, and are also difficult to take into account the degree of crowding at scenic spots, changes in travel time, and the personalized itinerary pace needs of tourists. As a result, the planned tourist routes often have problems in actual implementation, such as long itineraries, delays in congested sections, mismatch between arrival time and opening hours of scenic spots, and fatigue caused by long-term continuous walking or movement.
[0003] Existing route planning methods often employ fixed-cost shortest path calculations, treating the road network as a static graph structure. This lacks a comprehensive portrayal of the time-varying characteristics of traffic conditions, the impact of traffic fluctuations on route accessibility, and the overall costs of switching between different transportation modes. Furthermore, it fails to effectively establish dynamic models of how attraction appeal changes over time, resulting in route planning that is ill-suited to real-world travel environments and visitor experience conditions. Simultaneously, when sudden localized congestion occurs along the route during peak hours, traditional methods cannot provide fine-grained spatiotemporal adjustments, leading to a significant decrease in overall route efficiency.
[0004] Therefore, there is an urgent need for a tourism route optimization method that can be based on traffic conditions and jointly analyzed with the characteristics of scenic spots and the rhythm needs of users. This method can solve the problems of existing technical routes lacking dynamism, rhythm adaptability, and the ability to handle random traffic disturbances, thereby improving the personalization and intelligence of tourism routes and enhancing the user experience. Summary of the Invention
[0005] This invention overcomes the shortcomings of the prior art and provides a method and system for optimizing tourist routes based on traffic condition calculations. Its main purpose is to improve the personalization and intelligence of tourist routes and enhance the user experience.
[0006] To achieve the above objectives, the first aspect of this invention provides a method for optimizing tourist routes based on traffic condition calculations, comprising: Traffic state data sequences are acquired from a multi-source traffic monitoring network in the target area. Traffic phases are divided using the traffic state data sequences to generate a traffic phase structure. A traffic situation field is then constructed based on the traffic phase structure. Acquire all tourist attractions and their attribute data within the target area, score the potential attractiveness of each tourist attraction as a potential source of attraction, and construct an attraction attraction potential field in a preset geographic space based on the potential attractiveness score results. The travel expectation information of the target user is obtained and the intent is analyzed. The traffic situation field and the attraction potential field of the attraction are superimposed to generate the attraction-path space. The initial travel route is generated by combining the attraction-path space. Based on the opening time window and peak and valley periods of visitor flow of the scenic spot, visit time sequence constraints are constructed. The attraction potential field of the scenic spot is time-varyingly modulated according to the visit time sequence constraints to optimize the initial tourist route and generate candidate optimized tourist routes. A travel rhythm assessment system is constructed based on users' travel rhythm preferences, trip density thresholds, and the congestion sensitivity of routes in local traffic changes. The system performs rhythmic rearrangement of the stop segments, movement segments, and cross-regional segments of candidate tourism optimization routes, and outputs tourism route optimization reports for distribution.
[0007] In this scheme, the step of acquiring traffic state data sequences from a multi-source traffic monitoring network in the target area, using the traffic state data sequences to perform traffic phase segmentation to generate a traffic phase structure, and constructing a traffic situation field based on the traffic phase structure specifically includes: A multi-source traffic monitoring network is deployed in the target area to acquire traffic status data through a distributed data acquisition interface. After spatiotemporal alignment and data cleaning, a traffic status data sequence is formed. The traffic status data sequence is based on road segments as the basic unit, and each unit contains a time series of three attributes: vehicle speed, road flow, and road occupancy. Multi-stage feature extraction and pattern recognition are performed on the traffic state data sequence. The original speed sequence of each road segment is scanned using a sliding time window. During each sliding, the sum of the absolute values of the speed differences between all continuous sampling points within the window is calculated and defined as the speed gradient change of that time window. The product sequence of traffic flow and road occupancy is calculated synchronously, and the coefficient of variation of the product sequence is obtained, which is the ratio of the standard deviation to the mean, and is defined as the flow density mutation rate. The event disturbance intensity is analyzed based on vehicle speed and road occupancy within a preset time window using a dual threshold judgment method to obtain the event disturbance intensity. Based on the velocity gradient change, flow density mutation rate and event disturbance intensity, a multi-dimensional feature description vector describing the local traffic behavior of the current road segment is constructed and used as input to perform unsupervised traffic phase division. The feature space is divided into four traffic behavior modes by probability density clustering method: free flow, synchronous flow, wide moving congestion and recovery period, generating discrete traffic phase structure. Historical road traffic data is used to set a traffic impedance coefficient for each traffic phase. The traffic impedance coefficient is determined by statistically analyzing the ratio of the actual travel time per unit road segment to the free-flow reference time under the corresponding phase, thus obtaining a phase-impedance mapping table. Based on the impedance mapping table, with geographic space as a two-dimensional plane and time as a third-dimensional axis, the spatial coordinates, time points, and corresponding phase impedance coefficients of each road segment are used as three-dimensional discrete sample points. The spatiotemporal kriging interpolation algorithm is used for three-dimensional reconstruction, and finally a traffic situation field is generated.
[0008] In this solution, the steps of acquiring all tourist attractions and their attribute data within the target area, assigning a potential attraction score to each tourist attraction as a potential attraction source, and constructing an attraction attraction potential field in a preset geographic space based on the potential attraction score results specifically include: Obtain multi-source heterogeneous data of all registered attractions within the target area. After data fusion and entity alignment, establish an attraction attribute dataset that includes latitude and longitude coordinates, multi-level theme classification labels, physical space area, historical visitor flow statistics, real-time user evaluation data, and periodic opening schedule. Based on the aforementioned scenic spot attribute dataset, semantic analysis of text-based topic classification labels is performed using natural language processing technology to obtain cultural value coefficients. Logarithmic normalization is performed on physical space area data to obtain spatial scale coefficients. For historical visitor flow statistics, time series decomposition technology is used to extract long-term trend components as steady-state visitor flow bases. For real-time user review data, a weighted sentiment score is calculated using sentiment analysis algorithms as a reputation score. Based on the cultural value coefficient, spatial scale coefficient, steady-state visitor flow base and reputation score, a scenic spot description feature vector is constructed for each scenic spot. A multi-dimensional weighted scoring method is used to map it to a potential attraction value, thereby obtaining a quantitative potential attraction score for each scenic spot and generating a scenic spot attraction vector set. The target geographic area is divided into a regular grid system. For the center point of each grid cell, the Gaussian kernel function is used to calculate the attractive radiation value of all attractions. The potential attractiveness score of each attraction is used as the amplitude parameter of the kernel function, and the Euclidean distance from the attraction to the grid point is used as the width parameter of the kernel function. The effective range of the attractiveness is controlled by adjusting the attenuation coefficient of the kernel function. The Gaussian kernel function values generated by all attractions at each grid point are linearly superimposed to transform the discrete attraction rating distribution into a static attraction potential energy surface that changes continuously and smoothly in two-dimensional geographic space. A time-series modulation factor based on the opening time window is introduced, and a periodic modulation function is generated according to the operating schedule of each attraction. This function is then multiplied element-wise with the static attraction potential energy surface to obtain the final dynamic attraction potential field.
[0009] In this solution, the steps of obtaining the target user's travel expectation information and performing intent analysis, superimposing the traffic situation field and the attraction potential field to generate an attraction-path space, and combining the attraction-path space to generate an initial travel route, specifically include: The system obtains user-inputted travel expectation information through a natural language interaction interface, converts natural language descriptions into high-dimensional semantic vectors through word embedding technology, extracts context-related semantic features using a bidirectional long short-term memory network, and focuses key intent words through a self-attention layer to generate user intent feature vectors containing user preference topics, activity intensity expectations, and time budget constraints. Based on the user intent feature vector, the constructed attraction potential field of the scenic spot is personalized and modulated. The personalized matching coefficient is obtained by calculating the cosine similarity between the user intent feature vector and the multimodal feature vector of each scenic spot. The coefficient is then weighted and fused with the original potential field value of the scenic spot to generate a personalized attraction potential field that reflects the user's individual preferences. The potential field value of each grid point represents the degree of fit between the location and the user's travel expectations. A field superposition algorithm based on dynamic weights is used to couple the personalized attraction potential field with the traffic situation field in multiple fields. The traffic impedance value of the traffic situation field is converted into the traffic convenience index through the sigmoid function and linearly combined with the intensity value of the personalized attraction potential field. The combination weight is obtained by regression analysis of user selection preferences in historical travel data. Finally, a attraction-path space that integrates traffic conditions and attraction attraction is generated. An adaptive potential energy gradient tracking algorithm is executed in the scenic spot-path decision field. Starting from the user-specified starting position, the local gradient direction of the scenic spot-path space is calculated at each grid point. A gradient ascent strategy with a variable step size is adopted for path exploration. At the same time, a dynamic potential energy decay mechanism is introduced to exponentially decay the potential field value of the visited area. The search terminates when the cumulative exploration time reaches the user's time budget or the potential energy growth rate remains below a preset threshold, forming the optimal energy path composed of continuous spatial coordinates. The generated optimal energy path is then extended in the time dimension, and the travel time is estimated by combining the length of each segment of the path with the traffic situation field value at the corresponding time, resulting in an initial travel route containing a complete spatial trajectory and time series.
[0010] In this scheme, the access time constraints are constructed based on the opening time window and peak and valley periods of tourist flow at the scenic spots. The initial tourist route is optimized and candidate optimized tourist routes are generated by time-varying modulation of the attraction potential field of the scenic spots according to these access time constraints. Specifically, this includes: After obtaining the initial tourist route, the opening schedule and historical visitor flow distribution patterns of each attraction are obtained. A continuous visitor flow density curve is generated through the historical visitor flow distribution patterns, and the peak and valley factors in each time period are extracted. Combined with the opening schedule, a time-series constraint feature vector for each attraction is generated. The time-series constraint feature vector is used as a dynamic modulation factor and is subjected to time-slice adaptive multiplication with the original attraction potential field value of the scenic spot to generate a time-varying attraction potential field that reflects the accessibility and comfort of the scenic spot. The time-varying attraction potential field is then spatiotemporally coupled with the traffic situation field to generate a time-varying modulated scenic spot-path space. Input the initial tourist route into the time-varying modulated scenic spot-path space. Starting from the initial route, construct the objective function based on the total attraction potential energy accumulation of the route, travel time efficiency, and temporal constraint satisfaction. Then, use a time-varying optimization based on an improved non-dominated sorting genetic algorithm. During the optimization process, a tabu search local optimization strategy is introduced to deeply mine the non-dominated solutions in each generation. The search range is expanded by exchanging the visit order of adjacent attractions, adjusting the stay time of attractions, and replacing the neighboring operations of similar attractions. At the same time, the degree of matching between the planned arrival time of each attraction and the accessibility of the corresponding time period is detected by time axis conflict detection. After iterative optimization until a preset stopping criterion is met, the final Pareto front solution set is obtained. The spatiotemporal feasibility of the tourism path in the final Pareto front solution set is then verified, and candidate tourism optimization routes are finally output.
[0011] In this solution, a travel rhythm evaluation system is constructed based on users' travel rhythm preferences, trip density thresholds, and the congestion sensitivity of routes to local traffic changes. This system performs rhythmic rearrangement of the stop segments, movement segments, and cross-regional segments of candidate optimized tourist routes, and outputs a tourist route optimization report for distribution. Specifically, this includes: The user interaction interface collects user-defined travel rhythm preference parameters, including the maximum tolerable duration of a single continuous movement, the preference for alternating frequency of activities and rest, the activity intensity tendency at different times, and the personal preferred trip density level. Based on the impedance value variation characteristics of each road segment in the traffic situation field, the congestion sensitivity index of the path is calculated. The travel rhythm evaluation system is constructed by combining the analytic hierarchy process. The route segment feature description set is input into the k-means clustering algorithm to identify the travel rhythm pattern using the travel rhythm assessment system. The optimal number of clusters is determined by the elbow rule, and the route is divided into three types of basic units: stop segments, moving segments, and cross-section segments. For each unit, time consumption features, spatial distribution features, and activity intensity features are extracted, and the rhythm coordination score of each unit is calculated. Segments with scores below a preset threshold are designated as segments to be optimized, thus forming a route rhythm feature map. An optimization model is established with rhythm coordination and user satisfaction as objective functions and the total travel time remaining constant as a hard constraint. Based on the dynamic programming algorithm, the optimal time allocation of the segments to be optimized in the rhythm feature map of the route is solved, and the candidate optimized tourist routes after time redistribution are output. After completing the time redistribution, the simulated annealing algorithm is used to perform spatial path local optimization on the candidate tourism optimization routes after time redistribution. The time-varying modulated scenic spot-path space is used as the solution space for initial temperature initialization and the cooling rate and termination conditions are set for iterative path optimization. In each iteration, the decision to accept a new solution is based on the changes in rhythm coordination, path attraction potential energy, and spatial offset. Thus, the final optimized tourism route is obtained after adjustments in both the time and spatial dimensions, and a tourism route optimization report containing rhythm optimization analysis is generated and pushed out.
[0012] A second aspect of the present invention provides a tourist route optimization system based on traffic condition calculation. The system includes a memory, a processor, and a communication interface. The memory contains a tourist route optimization method program based on traffic condition calculation. When executed by the processor, the tourist route optimization method program based on traffic condition calculation performs the following steps: Traffic state data sequences are acquired from a multi-source traffic monitoring network in the target area. Traffic phases are divided using the traffic state data sequences to generate a traffic phase structure. A traffic situation field is then constructed based on the traffic phase structure. Acquire all tourist attractions and their attribute data within the target area, score the potential attractiveness of each tourist attraction as a potential source of attraction, and construct an attraction attraction potential field in a preset geographic space based on the potential attractiveness score results. The travel expectation information of the target user is obtained and the intent is analyzed. The traffic situation field and the attraction potential field of the attraction are superimposed to generate the attraction-path space. The initial travel route is generated by combining the attraction-path space. Based on the opening time window and peak and valley periods of visitor flow of the scenic spot, visit time sequence constraints are constructed. The attraction potential field of the scenic spot is time-varyingly modulated according to the visit time sequence constraints to optimize the initial tourist route and generate candidate optimized tourist routes. A travel rhythm assessment system is constructed based on users' travel rhythm preferences, trip density thresholds, and the congestion sensitivity of routes in local traffic changes. The system performs rhythmic rearrangement of the stop segments, movement segments, and cross-regional segments of candidate tourism optimization routes, and outputs tourism route optimization reports for distribution.
[0013] A third aspect of the present invention provides a computer-readable storage medium comprising a tourism route optimization method program based on traffic condition calculation, wherein when the tourism route optimization method program based on traffic condition calculation is executed by a processor, it implements the steps of the tourism route optimization method based on traffic condition calculation as described in any of the preceding claims. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments or examples of the present invention, the drawings used in the embodiments or examples will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained according to these drawings without creative effort.
[0015] Figure 1 A flowchart of a first method for optimizing tourist routes based on traffic condition calculation, provided in an embodiment of the present invention; Figure 2 A flowchart of a second method for optimizing tourist routes based on traffic condition calculation, provided as an embodiment of the present invention; Figure 3 A block diagram of a tourism route optimization system based on traffic condition calculation is provided in one embodiment of the present invention; The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0016] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0017] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0018] Figure 1 A flowchart of a first method for optimizing tourist routes based on traffic condition calculation, provided in an embodiment of the present invention; like Figure 1 As shown, the present invention provides a first method flowchart for optimizing tourist routes based on traffic condition calculation, including: S102, acquire traffic state data sequences from the multi-source traffic monitoring network in the target area, use the traffic state data sequences to divide traffic phases to generate a traffic phase structure, and construct a traffic situation field based on the traffic phase structure; S104: Obtain all tourist attractions and their attribute data within the target area; score the potential attraction of each tourist attraction as a potential attraction source; and construct an attraction attraction potential field in a preset geographic space based on the potential attraction score results. S106, Obtain the target user's travel expectation information and perform intent analysis, superimpose the traffic situation field and the attraction potential field of the scenic spot to generate a scenic spot-path space, and combine the scenic spot-path space to generate an initial travel route to obtain the initial travel route. S108, construct visit time constraints based on the opening time window and peak and valley periods of tourist flow of the scenic spot, optimize the initial tourist route and generate candidate optimized tourist routes according to the time-varying modulation of the attraction potential field of the scenic spot based on the visit time constraints. S110 constructs a travel rhythm assessment system based on users' travel rhythm preferences, trip density thresholds, and the congestion sensitivity of routes in local traffic changes. It performs rhythmic rearrangement of the stop segments, movement segments, and cross-regional segments of candidate tourism optimization routes and outputs tourism route optimization reports for push.
[0019] Furthermore, in a preferred embodiment of the present invention, the step of acquiring traffic state data sequences from a multi-source traffic monitoring network in the target area, using the traffic state data sequences to perform traffic phase segmentation to generate a traffic phase structure, and constructing a traffic situation field based on the traffic phase structure specifically includes: A multi-source traffic monitoring network is deployed in the target area to acquire traffic status data through a distributed data acquisition interface. After spatiotemporal alignment and data cleaning, a traffic status data sequence is formed. The traffic status data sequence is based on road segments as the basic unit, and each unit contains a time series of three attributes: vehicle speed, road flow, and road occupancy. Multi-stage feature extraction and pattern recognition are performed on the traffic state data sequence. The original speed sequence of each road segment is scanned using a sliding time window. During each sliding, the sum of the absolute values of the speed differences between all continuous sampling points within the window is calculated and defined as the speed gradient change of that time window. The product sequence of traffic flow and road occupancy is calculated synchronously, and the coefficient of variation of the product sequence is obtained, which is the ratio of the standard deviation to the mean, and is defined as the flow density mutation rate. The event disturbance intensity is analyzed based on vehicle speed and road occupancy within a preset time window using a dual threshold judgment method to obtain the event disturbance intensity. Based on the velocity gradient change, flow density mutation rate and event disturbance intensity, a multi-dimensional feature description vector describing the local traffic behavior of the current road segment is constructed and used as input to perform unsupervised traffic phase division. The feature space is divided into four traffic behavior modes by probability density clustering method: free flow, synchronous flow, wide moving congestion and recovery period, generating discrete traffic phase structure. Historical road traffic data is used to set a traffic impedance coefficient for each traffic phase. The traffic impedance coefficient is determined by statistically analyzing the ratio of the actual travel time per unit road segment to the free-flow reference time under the corresponding phase, thus obtaining a phase-impedance mapping table. Based on the impedance mapping table, with geographic space as a two-dimensional plane and time as a third-dimensional axis, the spatial coordinates, time points, and corresponding phase impedance coefficients of each road segment are used as three-dimensional discrete sample points. The spatiotemporal kriging interpolation algorithm is used for three-dimensional reconstruction, and finally a traffic situation field is generated.
[0020] It should be noted that, firstly, by deploying a multi-source traffic monitoring network within the target area, the system can simultaneously collect raw traffic state data from multiple data sources, including fixed detectors, floating car GPS devices, and internet traffic data platforms. These multi-source heterogeneous data undergo spatiotemporal alignment and data cleaning processes to integrate into a standardized traffic state data sequence. This data sequence uses independent road segments within the urban road network as basic storage units. Each unit contains a sequence of observations of three key parameters—vehicle speed, road flow, and road occupancy—arranged in chronological order, forming the raw data foundation for subsequent analysis. In the feature extraction stage, a multi-stage feature extraction strategy is employed to characterize the dynamic behavior of traffic flow. For the speed sequence, a sliding time window is used for scanning analysis, calculating the sum of the absolute values of the speed differences between consecutive sampling points within the window. This speed gradient change effectively characterizes the degree of fluctuation in traffic flow speed, thereby identifying acceleration, deceleration, or stable operating states. Simultaneously, by calculating the coefficient of variation of the flow and occupancy product sequence—that is, the ratio of the standard deviation to the mean—the flow density mutation rate is obtained. This indicator reflects the stability of the relationship between traffic flow density and flow rate; abnormal mutations often indicate a phase change in traffic state. Furthermore, by establishing a dual-threshold judgment method based on historical statistical data, speed and occupancy are jointly analyzed. When the speed is lower than the threshold and the occupancy is higher than the threshold, it is determined that there is an event disturbance. The intensity of the event disturbance is quantified according to the degree of deviation, thus forming a stable, sensitive and comprehensive multi-dimensional feature vector describing local traffic behavior.
[0021] Subsequently, unsupervised learning-based probability density clustering methods, such as Gaussian mixture models, are used to perform cluster analysis on massive multidimensional feature vectors. This algorithm can automatically discover the natural distribution patterns of data points in the feature space without pre-setting strict classification boundaries, thus discretizing continuous traffic states into four typical phases with clear traffic flow theoretical significance: free flow, synchronous flow, wide-moving congestion, and recovery period. This more accurately represents the evolution of traffic states and lays the foundation for subsequent impedance quantification. After phase division, historical road traffic data is used for statistical analysis to calculate a standardized traffic impedance coefficient for each traffic phase. This coefficient is determined by statistically comparing the actual average travel time of vehicles traversing a unit length of road segment under that specific phase with the baseline travel time under free flow conditions. This ratio has a clear physical meaning: the baseline coefficient for free flow phases is 1, while the coefficient for congested phases is greater than 1, and the value directly reflects the degree of decline in traffic efficiency, thus obtaining the phase-impedance mapping relationship. Finally, a spatiotemporal kriging interpolation algorithm is employed to treat the spatial coordinates, timestamps, and corresponding phase impedance coefficients of each road segment in the road network at a specific time point as discrete sample points in the three-dimensional spatiotemporal domain. The spatiotemporal kriging method quantifies the spatiotemporal dependencies between sample points by constructing a variogram model that simultaneously considers spatial correlation and temporal autocorrelation. By performing optimal unbiased estimation on any unsampled spatiotemporal point across the entire domain, a three-dimensional continuous traffic situation field is generated that spatially continuously covers all roads and evolves smoothly in time. The scalar value of each point in this field represents the traffic impedance at that point at that moment, providing a precise and dynamic environmental cost basis for subsequent route optimization.
[0022] Furthermore, in a preferred embodiment of the present invention, the step of acquiring all tourist attractions and their attribute data within the target area, scoring the potential attractiveness of each tourist attraction as a potential attraction source, and constructing an attraction attraction potential field in a preset geographical space based on the potential attractiveness score results specifically includes: Obtain multi-source heterogeneous data of all registered attractions within the target area. After data fusion and entity alignment, establish an attraction attribute dataset that includes latitude and longitude coordinates, multi-level theme classification labels, physical space area, historical visitor flow statistics, real-time user evaluation data, and periodic opening schedule. Based on the aforementioned scenic spot attribute dataset, semantic analysis of text-based topic classification labels is performed using natural language processing technology to obtain cultural value coefficients. Logarithmic normalization is performed on physical space area data to obtain spatial scale coefficients. For historical visitor flow statistics, time series decomposition technology is used to extract long-term trend components as steady-state visitor flow bases. For real-time user review data, a weighted sentiment score is calculated using sentiment analysis algorithms as a reputation score. Based on the cultural value coefficient, spatial scale coefficient, steady-state visitor flow base and reputation score, a scenic spot description feature vector is constructed for each scenic spot. A multi-dimensional weighted scoring method is used to map it to a potential attraction value, thereby obtaining a quantitative potential attraction score for each scenic spot and generating a scenic spot attraction vector set. The target geographic area is divided into a regular grid system. For the center point of each grid cell, the Gaussian kernel function is used to calculate the attractive radiation value of all attractions. The potential attractiveness score of each attraction is used as the amplitude parameter of the kernel function, and the Euclidean distance from the attraction to the grid point is used as the width parameter of the kernel function. The effective range of the attractiveness is controlled by adjusting the attenuation coefficient of the kernel function. The Gaussian kernel function values generated by all attractions at each grid point are linearly superimposed to transform the discrete attraction rating distribution into a static attraction potential energy surface that changes continuously and smoothly in two-dimensional geographic space. A time-series modulation factor based on the opening time window is introduced, and a periodic modulation function is generated according to the operating schedule of each attraction. This function is then multiplied element-wise with the static attraction potential energy surface to obtain the final dynamic attraction potential field.
[0023] It's important to note that constructing the attraction potential field for scenic spots is a core step in achieving personalized and intelligent route recommendations. This involves collecting data from all registered scenic spots within the target area, including latitude and longitude coordinates from a geographic information system, multi-level thematic classification tags provided by tourism platforms (such as "historical sites," "natural scenery," and "museums"), physical spatial areas from publicly available government data, historical visitor flow statistics from operators, real-time user reviews on social media, and official periodic opening schedules. These data vary in format, granularity, and timeliness, necessitating data fusion and entity alignment to eliminate ambiguity and contradictions, ultimately forming a standardized, high-quality dataset of scenic spot attributes. After obtaining the standardized dataset, the next step is to quantify these heterogeneous attributes, transforming them into computable feature indicators. For text-based thematic classification tags, natural language processing techniques are used for semantic analysis. For example, word vector models are used to convert tags into numerical vectors and calculate their similarity to a standard cultural value lexicon, resulting in a quantified "cultural value coefficient." This helps in understanding the cultural connotations of the scenic spots. Physical space area data typically has a large numerical range, and direct use would dominate the model. Therefore, logarithmic normalization is used to obtain a "spatial scale coefficient," making its distribution more stable and facilitating subsequent calculations. Historical visitor flow statistics contain long-term trends, seasonal fluctuations, and random noise. Time series decomposition techniques (such as STL decomposition) are used to extract its long-term trend components as a "steady-state visitor flow base," which can more robustly reflect the popularity of attractions. Real-time user review data is used to calculate a weighted sentiment score through sentiment analysis algorithms, serving as a dynamic "reputation score" to capture recent public opinion trends.
[0024] Subsequently, these characteristic indicators are combined into a comprehensive score. Based on the cultural value coefficient, spatial scale coefficient, steady-state visitor flow base, and reputation score, a feature vector for each attraction is constructed, and a multi-dimensional weighted scoring method (such as linear weighted summation) is used to map it into a comprehensive "potential attractiveness score," thereby generating an attractiveness vector set for all attractions. The purpose of this is to condense information from multiple dimensions into a single but rich scalar value. This score comprehensively reflects the intrinsic value, scale effect, historical popularity, and current reputation of an attraction, providing a holistic, ranking, and quantitative assessment of its attractiveness.
[0025] However, the attractiveness of a scenic spot is not limited to its latitude and longitude coordinates, but rather radiates outwards into the surrounding space. To characterize this radiating effect in continuous geographic space, this invention employs a spatial interpolation method based on Gaussian kernel functions. The target geographic area is divided into a regular, fine grid system. For the center point of each grid cell, the radiating attractiveness value generated by all scenic spots is calculated. The potential attractiveness score of each scenic spot serves as the amplitude parameter (i.e., peak height) of the Gaussian kernel function, and the Euclidean distance from the scenic spot to the grid point is used as the input variable of the kernel function. By adjusting the bandwidth parameter (or attenuation coefficient) of the Gaussian kernel function, the rate at which the attractiveness decays with distance, i.e., the effective range of influence, can be controlled. For example, the attractiveness of a large theme park can radiate to a distant area, while the attractiveness of a small café may be limited to a few hundred meters around it. Linearly superimposing the Gaussian function values generated by all scenic spots at the same grid point is like converging the beams of multiple lighthouses at a single point, ultimately transforming a discrete score distribution existing only on the coordinates of the scenic spots into a continuous, smoothly varying static attractive potential energy surface in two-dimensional geographic space. In this surface, high-attraction attractions form "potential energy depressions" (low-value areas in the minimization problem), with attraction smoothly decreasing outwards. The significance of this method lies in its alignment with real-world perception—attraction decays with distance, and the influence ranges of different attractions can overlap and interact. Finally, to reflect the dynamic changes in attraction attraction, particularly the periodic changes constrained by opening hours, a temporal modulation factor is introduced. A periodic modulation function is generated based on each attraction's opening schedule, with a value of 1 during opening hours and 0 (or a very small value) during non-open hours. This modulation function is then multiplied element-wise (i.e., per grid point, per time slice) with the aforementioned static attraction potential energy surface. The effect is that during non-open hours, the attraction's attraction potential energy field "extinguishes," while during opening hours it "lights up" normally. Ultimately, a dynamic attraction potential energy field is generated that changes continuously with space and fluctuates periodically with time, accurately reflecting the actual situation of "when attractions are open to visitors and when their attraction is effective."
[0026] Furthermore, in a preferred embodiment of the present invention, the step of obtaining the target user's travel expectation information and performing intent analysis, superimposing the traffic situation field and the attraction potential field to generate an attraction-path space, and combining the attraction-path space to generate an initial travel route, specifically includes: The system obtains user-inputted travel expectation information through a natural language interaction interface, converts natural language descriptions into high-dimensional semantic vectors through word embedding technology, extracts context-related semantic features using a bidirectional long short-term memory network, and focuses key intent words through a self-attention layer to generate user intent feature vectors containing user preference topics, activity intensity expectations, and time budget constraints. Based on the user intent feature vector, the constructed attraction potential field of the scenic spot is personalized and modulated. The personalized matching coefficient is obtained by calculating the cosine similarity between the user intent feature vector and the multimodal feature vector of each scenic spot. The coefficient is then weighted and fused with the original potential field value of the scenic spot to generate a personalized attraction potential field that reflects the user's individual preferences. The potential field value of each grid point represents the degree of fit between the location and the user's travel expectations. A field superposition algorithm based on dynamic weights is used to couple the personalized attraction potential field with the traffic situation field in multiple fields. The traffic impedance value of the traffic situation field is converted into the traffic convenience index through the sigmoid function and linearly combined with the intensity value of the personalized attraction potential field. The combination weight is obtained by regression analysis of user selection preferences in historical travel data. Finally, a attraction-path space that integrates traffic conditions and attraction attraction is generated. An adaptive potential energy gradient tracking algorithm is executed in the scenic spot-path decision field. Starting from the user-specified starting position, the local gradient direction of the scenic spot-path space is calculated at each grid point. A gradient ascent strategy with a variable step size is adopted for path exploration. At the same time, a dynamic potential energy decay mechanism is introduced to exponentially decay the potential field value of the visited area. The search terminates when the cumulative exploration time reaches the user's time budget or the potential energy growth rate remains below a preset threshold, forming the optimal energy path composed of continuous spatial coordinates. The generated optimal energy path is then extended in the time dimension, and the travel time is estimated by combining the length of each segment of the path with the traffic situation field value at the corresponding time, resulting in an initial travel route containing a complete spatial trajectory and time series.
[0027] It's important to note that the system obtains users' travel expectations in free-text form through a natural language interaction interface, such as "I hope to have a relaxing cultural and historical tour, avoiding crowds and having ample time for taking photos." To understand this unstructured text, word embedding techniques (such as Word2Vec or BERT) are first used to convert each word in the sentence into a high-dimensional numerical vector (i.e., a semantic vector), enabling the computer to process the semantic information of the words. A Bidirectional Long Short-Term Memory (Bi-LSTM) model is then used to encode the sequence of these word vectors. This model can understand the sentence context in both forward and backward directions, accurately grasping the complex semantic relationship where "relaxed" modifies "cultural and historical tour." Key intent words in the sentence (such as "cultural and historical," "relaxed," and "avoiding crowds") are identified and focused on, while the influence of secondary words is weakened. Finally, the output is a structured user intent feature vector containing preferred themes (e.g., high weight for cultural and historical), expected activity intensity (e.g., low intensity corresponding to "relaxed"), and implicit time budget constraints. This transforms vague, subjective descriptions from users into precise, computable data objects, laying the foundation for subsequent personalized calculations.
[0028] After obtaining quantified user intent, the next step is to personalize the attraction potential field of attractions. This involves calculating the cosine similarity between the user intent feature vector and the multimodal feature vector of each attraction in the attraction potential field. Cosine similarity measures the directional proximity of two vectors; a higher value indicates a better match between the user's preferences and the attraction's attributes. The calculated similarity value is the personalized matching coefficient (a value between 0 and 1). This matching coefficient is then used as a weight to weightedly fuse with the attraction's original attraction potential field value, which is based on objective data. For example, a highly popular theme park might have a low personalized matching coefficient for a user who explicitly states a preference for "quiet and natural" environments, significantly reducing its attractiveness from that user's perspective after modulation. Through this calculation, a unique personalized attraction attraction potential field is generated for each user. In this field, the potential field value of each location no longer merely represents the objective attractiveness of the attraction but profoundly reflects the degree to which that location aligns with the specific user's expectations. The significance lies in upgrading route planning from "recommending what others think is good" to "recommending what suits you," achieving truly personalized recommendations.
[0029] However, an ideal route not only needs to reach the user's desired destination but also needs to consider the smoothness of the journey. Therefore, it is necessary to merge the personalized attraction potential field representing "where the user wants to go" with the traffic situation field representing "ease of travel." Directly superimposing the two fields is unreasonable because their physical meanings and dimensions are different (one is attraction, the other is impedance). Therefore, the sigmoid function is used to map the traffic impedance value of the traffic situation field to a traffic convenience index between 0 and 1, so that high impedance (congestion) is converted into low convenience, and low impedance (smoothness) is converted into high convenience. Then, the traffic convenience index is linearly combined with the intensity value of the personalized attraction potential field to finally generate the attraction-path space. Based on the attraction-path space, the path planning problem is transformed into finding the path with the maximum cumulative "value" in this field. This invention uses an adaptive potential gradient tracking algorithm to simulate this process. The algorithm starts from the user-specified starting point, like an agent placed in the field. At each current position, it calculates the local gradient direction of the attraction-path space at that point, i.e., the direction in which the field value increases the fastest. Moving in this direction means that each step attempts to make the best local decision between "going to a more attractive location" and "choosing a smoother path." To balance exploration efficiency and accuracy, a variable step size strategy is adopted: large step sizes are used for rapid advancement in flat terrain, while small step sizes are used for fine-tuning in complex areas. Simultaneously, a dynamic potential energy decay mechanism is introduced, whereby the field value of a region decays exponentially after the agent visits it. This simulates the psychological expectation that "the attractiveness of places already visited decreases," effectively preventing the path from oscillating back and forth at local high points, encouraging the agent to explore new areas, and ensuring that the route covers multiple points of interest.
[0030] The path search process terminates in two situations: first, the accumulated exploration time reaches the user-defined total time budget; second, the potential energy growth rate from consecutive moves consistently falls below a preset threshold, indicating that it is difficult to find a significantly better subsequent path. At this point, the search stops, forming a path with optimal potential energy composed of continuous spatial coordinates. However, this path currently only has spatial information and lacks temporal information. Therefore, the final step is to expand the temporal dimension. Based on the length of each segment of the path and the travel time indicated by traffic conditions at the corresponding moment when passing through that segment, the specific time point for passing through each segment is estimated. Ultimately, what we obtain is no longer an abstract line, but an initial travel route containing a complete spatial trajectory and time sequence. It clearly indicates "when to arrive at which location, how long to stay, and where to go next," making it a directly executable, personalized, and intelligent itinerary plan that comprehensively considers the attractiveness of attractions and traffic conditions.
[0031] Furthermore, in a preferred embodiment of the present invention, the step of constructing access time constraints based on the opening time window and peak and valley periods of tourist flow for scenic spots, and optimizing the initial tourist route by time-varying modulation of the attraction potential field of the scenic spots according to the access time constraints, and generating candidate optimized tourist routes, specifically includes: After obtaining the initial tourist route, the opening schedule and historical visitor flow distribution patterns of each attraction are obtained. A continuous visitor flow density curve is generated through the historical visitor flow distribution patterns, and the peak and valley factors in each time period are extracted. Combined with the opening schedule, a time-series constraint feature vector for each attraction is generated. The time-series constraint feature vector is used as a dynamic modulation factor and is subjected to time-slice adaptive multiplication with the original attraction potential field value of the scenic spot to generate a time-varying attraction potential field that reflects the accessibility and comfort of the scenic spot. The time-varying attraction potential field is then spatiotemporally coupled with the traffic situation field to generate a time-varying modulated scenic spot-path space. Input the initial tourist route into the time-varying modulated scenic spot-path space. Starting from the initial route, construct the objective function based on the total attraction potential energy accumulation of the route, travel time efficiency, and temporal constraint satisfaction. Then, use a time-varying optimization based on an improved non-dominated sorting genetic algorithm. During the optimization process, a tabu search local optimization strategy is introduced to deeply mine the non-dominated solutions in each generation. The search range is expanded by exchanging the visit order of adjacent attractions, adjusting the stay time of attractions, and replacing the neighboring operations of similar attractions. At the same time, the degree of matching between the planned arrival time of each attraction and the accessibility of the corresponding time period is detected by time axis conflict detection. After iterative optimization until a preset stopping criterion is met, the final Pareto front solution set is obtained. The spatiotemporal feasibility of the tourism path in the final Pareto front solution set is then verified, and candidate tourism optimization routes are finally output.
[0032] It should be noted that the core objective of this step is to deeply integrate the objective time constraints of attractions (such as opening hours) with subjective tour comfort (such as the degree of crowds) into the route, so as to ensure that the generated plan is not only reasonable in space, but also feasible in time and provides a good experience.
[0033] First, an accurate temporal constraint model needs to be constructed for each attraction. This process begins with two key data points: a detailed opening schedule for each attraction, including daily operating hours, weekly closing days, and special arrangements for holidays; and historical visitor flow distribution patterns for that attraction. For the latter, statistical methods such as kernel density estimation are used to fit discrete historical visitor flow data points into a continuous visitor flow density curve. From this curve, quantitative indicators such as peak, trough, and average visitor flow can be extracted, known as "peak-trough factors." For example, a museum might experience peak visitor flow at 10:00 AM and 2:00 PM, while being relatively quiet one hour after opening or one hour before closing. Subsequently, the opening schedule is combined with the peak-trough factor to generate a temporal constraint feature vector for each attraction. This vector is essentially a time function, defined within the attraction's opening hours, and its value reflects the recommendation level for visiting during that time period—typically, higher values are assigned during low-flow periods (recommended to visit), and lower values are assigned during peak periods (suggested to avoid). The purpose of this step is to transform the empirical knowledge of "when is the best time to visit" into quantitative indicators that can be processed and optimized by computers.
[0034] Next, the previously generated personalized attraction potential field is dynamically modulated using the time-series constrained feature vector. The modulation method involves using the feature vector as a dynamic modulation factor and performing an adaptive multiplication operation on a time-slice basis with the original attraction potential field value of the attraction. The effect is that during off-peak hours, the attraction's attractiveness is modulated to zero or extremely low values, and the system will not plan visits; during open hours, its attractiveness intensity is dynamically scaled according to the level of crowds. For example, a popular attraction may have high attractiveness on weekdays, but its attractiveness value will be significantly reduced during peak hours on weekend afternoons to guide visitors to schedule more comfortable off-peak visits. After this modulation, the originally static attraction potential field is transformed into a time-varying attraction potential field, which truly reflects the characteristics of attraction attractiveness fluctuating over time. This dynamic potential field is then re-coupled spatiotemporally with the traffic situation field to generate a time-varying modulated attraction-path space. This new decision space comprehensively embodies the "comprehensive value and cost of going to a specific place at a specific time," forming the basis for time-series optimization.
[0035] Having established a spatiotemporal decision space, the initial route is then optimized. The optimization process begins with the initial route, defining a multi-objective function. This function includes three aspects: first, the accumulation of total attractive potential energy along the route, aiming to maximize the overall value of the visit; second, travel time efficiency, aiming to minimize total travel time or transportation time; and third, the satisfaction of temporal constraints, aiming to encourage attractions to be visited during optimal times. Since these objectives often conflict (for example, visiting an attraction at the optimal time may require a detour, increasing transportation time), directly finding a unique optimal solution is difficult. Therefore, this invention employs an improved Non-Dominated Sorting Genetic Algorithm (NSGA-II) for optimization. This algorithm can handle multiple objectives simultaneously. By creating a set of route solutions (population) and continuously evolving through genetic operations such as selection, crossover, and mutation, it ultimately finds a set of "Pareto optimal solutions," that is, a set of routes that achieve the best balance among these objectives, rather than a single solution. To improve optimization quality and prevent the algorithm from getting trapped in local optima, a tabu search local optimization strategy is introduced. Specifically, in each generation of evolution, the algorithm selects the currently better "non-dominated solutions" and performs a deep neighborhood search on them. This includes several key operations: swapping the order of visits to adjacent attractions (exploring whether different tour sequences are better), adjusting the duration of stay at attractions (increasing the stay time at preferred attractions or shortening the stay time at less important attractions), and replacing similar attractions (if the originally planned attractions have time conflicts, replacing them with nearby attractions of the same type and with suitable times). While performing these operations, the algorithm uses a timeline conflict detection mechanism to verify in real time whether the planned arrival times of each attraction are still within their opening time windows and whether they are outside of peak visitor periods. The significance of this hybrid strategy is that the genetic algorithm ensures global search capabilities, while tabu search enhances the ability to mine local solutions near high-quality solutions, thus enabling a more effective exploration of the complex solution space. Through iterative optimization, the algorithm continues until a preset stopping criterion is met, such as reaching the maximum number of iterations or the quality of the solution set not significantly improving over multiple iterations. The algorithm then outputs a final Pareto front solution set, containing several excellent routes with different focuses (e.g., one route offers the best experience but is slightly more time-consuming, while another is the most efficient but offers a slightly less pleasant experience). Finally, each route in the solution set undergoes rigorous spatiotemporal feasibility verification, including checking whether the transfer time between attractions is sufficient and whether there are any unreasonable time arrangements. The final output is a set of candidate optimized tourist routes. Figure 2 A flowchart of a second method for optimizing tourist routes based on traffic condition calculation, provided as an embodiment of the present invention; like Figure 2 As shown, the present invention provides a second method flowchart for optimizing tourist routes based on traffic condition calculation, including: S202 collects user-defined travel rhythm preference parameters through the user interface, including the maximum tolerable duration of a single continuous movement, preference for alternating frequency of activities and rest, activity intensity tendencies at different times, and personal preferred trip density levels. Based on the impedance value variation characteristics of each road segment in the traffic situation field, the congestion sensitivity index of the path is calculated, and a travel rhythm evaluation system is constructed by combining the analytic hierarchy process. S204, the route segment feature description set is input into the k-means clustering algorithm to identify the travel rhythm pattern using the travel rhythm evaluation system. The optimal number of clusters is determined by the elbow rule. The route is divided into three types of basic units: stop segments, moving segments, and cross-section segments. For each unit, time consumption features, spatial distribution features, and activity intensity features are extracted, and the rhythm coordination score of each unit is calculated. Segments with scores lower than a preset threshold are designated as segments to be optimized, thus forming a route rhythm feature map. S206. Establish an optimization model with rhythm coordination and user satisfaction as objective functions and total travel time as a hard constraint. Solve the optimal time allocation for the unoptimized sections in the route rhythm feature map based on the dynamic programming algorithm, and output the candidate optimized tourist route after time redistribution. S208. After completing the time redistribution, the simulated annealing algorithm is used to perform spatial path local optimization on the candidate tourism optimization routes after time redistribution. The time-varying modulated scenic spot-path space is used as the solution space for initial temperature initialization and the cooling rate and termination conditions are set for iterative path optimization. S210 determines whether to accept a new solution in each iteration based on the change in rhythm coordination, the change in path attraction potential energy, and the spatial offset. This results in the final optimized tourism route after adjustments in both the time and spatial dimensions, and generates a tourism route optimization report containing rhythm optimization analysis for submission.
[0036] It's important to note that this step is crucial because even if a route is nearly perfect in its selection of attractions and timing, if the travel pace doesn't match the user's tolerance, habits, and expectations, the actual experience can still be significantly diminished. For example, a user who prefers a leisurely pace of travel is likely to experience fatigue and lose interest if they are scheduled to spend long periods of time traveling continuously between attractions.
[0037] Therefore, through an interactive interface, users are guided to set parameters such as "ideally, how long should a single trip be?", "prefer a compact tour or a relaxed itinerary?", and "what intensity of activity do you prefer in the morning and afternoon?". These qualitative descriptions are translated into specific numerical values, such as setting the "maximum tolerable duration" to 90 minutes and the "activity intensity preference" to indicate a preference for high intensity in the morning and low intensity in the afternoon. Simultaneously, the historical fluctuations (e.g., standard deviation) of impedance values for each road segment are analyzed from the constructed traffic situation field to calculate a congestion sensitivity index—a high index indicates greater uncertainty in travel time, easily disrupting the rhythm. Subsequently, the analytic hierarchy process (AHP) is used to assign weights to "tolerance duration," "alternation frequency," "activity intensity," "trip density," and "congestion sensitivity," constructing a travel rhythm evaluation system that can quantify the "comfort" of any trip segment. Next, the candidate routes undergo a "health check." The entire route is divided into multiple continuous segments along the time axis, each segment potentially lasting only a few minutes to tens of minutes. For each small road segment, three features are extracted: time consumption (how long it took), spatial distribution (whether it was moving or stopping, and how far it was traveled), and activity intensity (whether the segment was a strenuous journey or a leisurely stroll). Then, using the classic unsupervised machine learning method of k-means clustering, these numerous small road segments are automatically categorized into several classes based on feature similarity. The elbow rule is used to determine the optimal number of clusters, dividing the route into three basic units: stopping segments (e.g., sightseeing), moving segments (e.g., city traffic), and cross-regional segments (e.g., long-distance intercity travel). After classification, a rhythm coordination score is calculated for each unit using the previously established evaluation system. For example, a continuous moving segment lasting 120 minutes will have a low coordination score for a user with a maximum tolerance of 90 minutes and will be marked as a segment requiring optimization. This ultimately creates a clear route rhythm feature map, visually identifying the rhythm "weak points."
[0038] Based on this diagnostic map, with the goal of improving overall rhythm coordination and user satisfaction, and adhering to the hard constraint of keeping the total trip duration constant, rhythm optimization is performed. Dynamic programming is used to solve this problem. This algorithm treats the route as a multi-stage decision-making process, with the core idea that "the global optimal solution contains the optimal solutions to its subproblems." The algorithm reallocates time for each stage; for example, it "borrows" 15 minutes from a very long, poorly coordinated movement segment and allocates it to a rest segment with acceptable coordination but still room for improvement, or it splits a movement segment into two, inserting a short stop at a viewpoint in between. Through this "peak-shaving and valley-filling" optimization, the rhythm is smoothed while keeping the total time constant, outputting candidate routes after time reallocation. After adjusting the time dimension, simulated annealing is used for local path optimization, inspired by the metal annealing process: first, high temperature activates atoms, then slow cooling leads to stable order. The algorithm uses a time-varying modulated attraction-path space as its search range, setting an initial temperature (indicating a higher initial probability of accepting a suboptimal solution), a cooling rate (gradually reducing the probability of accepting a suboptimal solution), and a termination condition (such as the temperature dropping to a certain value or the number of iterations reaching a certain threshold). In each iteration, the algorithm may fine-tune the path, for example, by taking a slightly longer but less congestion-sensitive and smoother route. At this point, a decision needs to be made on whether to accept this new path. The decision is based on a comprehensive evaluation of the change in rhythm coordination (whether the new path improves the rhythm), the change in path attraction potential (whether the new path passes through more interesting areas), and the spatial offset (whether the path modification is within a reasonable range). Even if the new path temporarily seems slightly worse, the algorithm will accept it with a certain probability. This strategy helps to escape local optima, thus having the opportunity to find a globally better route. Finally, after dual fine-tuning in time and space, a highly personalized optimized travel route is obtained in terms of attraction content, time arrangement, travel rhythm, and route selection. A detailed optimization report is generated, which not only provides the route but also includes rhythm optimization analysis. For example, it clearly explains that "to avoid long journeys, the original itinerary has been split into two segments and rest stops have been added along the way," making the recommendation results clear, credible, and easy for users to understand. Finally, the report is pushed to the user to complete the entire personalized route optimization process.
[0039] Furthermore, the tourist route optimization method based on traffic condition calculation provided by this invention also includes the following steps: After obtaining the final optimized travel route, based on the route timeline and the corresponding traffic situation field data, identify non-tourist idle periods and corresponding geographical nodes in the route caused by actively avoiding traffic congestion or peak tourist flow at attractions, including planned mandatory rest points, traffic transfer waiting points, and gap periods caused by itinerary buffer design, to obtain potential supplementary time windows for the tourist experience. Based on the time and geographical attributes corresponding to the potential tourism experience supplement time window, candidate attractions falling within the time and space window range are selected from the full range of attraction data in the target area. By extracting the target category label, activity intensity level, walking or vehicle accessibility, historical flow density curve and actual opening time of the candidate attractions, feature description vectors of the candidate attractions are generated. The feature description vectors of candidate attractions obtained from the user's travel rhythm preference are weighted and redistributed to obtain the anti-consensus fit of candidate attractions, which represents the match between the attractions and the user's rest rhythm and experience preference without increasing the risk of congestion in the overall trip. After completing the anti-consensus adaptation calculation, the traffic situation field is called to calculate the shortest spatiotemporal path between the candidate scenic spot and the rest node. By querying the traffic phase impedance coefficient of the corresponding time period, predicting the range of travel time fluctuation, and combining the future peak and valley positions of the candidate scenic spot in the crowd density curve, the spatiotemporal feasibility factor of the candidate scenic spot is generated. The anti-consensus adaptability and spatiotemporal feasibility factors are jointly ranked, and candidate attractions with scores reaching a preset insertion threshold are selected as the anti-consensus attraction set. For each rest node, based on its expandable range, the temporal continuity constraints of the preceding and following journeys on the route segment, and the shortest travel loop of the candidate attractions, a local insertion path reconstruction method is used to insert the anti-consensus attractions into the original route. After each insertion attempt, the overall route continuity, user rhythm coordination, and cumulative changes in traffic impedance are recalculated. Insertion schemes that meet the preset optimization goals are retained, while those that disrupt the route rhythm or increase the risk of congestion are eliminated. A counter-consensus travel plan, which includes new attraction access nodes, updated travel time distribution, and corresponding traffic avoidance paths, is generated and pushed out.
[0040] It's worth noting that a counter-consensus travel plan generation mechanism has been introduced. The core objective is to fully utilize unavoidable or proactively designed "idle windows" within the itinerary, without disrupting the already optimized main route structure, to uncover potential high-value attractions, thereby enhancing the overall experience density and uniqueness of the trip. Its significance lies in overturning the traditional route planning mindset that "rest equals stagnation," transforming non-sightseeing time into opportunities to discover unexpected delights, achieving a dual improvement in travel efficiency and experience depth.
[0041] By deeply analyzing the route timeline and combining it with traffic situation data, we can identify time slots not reserved for core attractions. These time slots mainly fall into three categories: first, planned mandatory rest points, such as lunch or coffee breaks, with fixed geographical locations; second, waiting gaps during transportation transfers, such as half an hour waiting at a high-speed rail station; and third, proactively set buffer times to cope with uncertainties. After identifying available spatiotemporal resources, we match them with the most suitable "fillers." We filter all candidate attractions from the comprehensive attraction database whose geographical locations fall within the effective spatial radius and whose suggested visit duration matches the idle window duration. Next, we perform feature analysis on each candidate attraction to generate a structured feature description vector. This vector covers the attraction's type label (e.g., "niche art museum," "viewing platform"), activity intensity level (low-intensity rest or high-intensity exploration), mode of transportation, historical visitor flow patterns, and actual opening hours. Subsequently, we obtain users' pre-set travel rhythm preferences (e.g., preference for quiet rest or short-distance exploration) and use these preferences to redistribute weights and calculate matching degrees for the feature vectors of candidate attractions. For example, during a lunch break, the system might assign higher weights to the characteristics of "low intensity" and "low crowds" to a user who prefers quiet, thereby calculating the match between the attraction and the user's need for rest and relaxation at that moment, i.e., "anti-consensus fit." This quantifies whether adding the attraction would disrupt the user's current rest rhythm and whether it aligns with their deeper preferences.
[0042] To ensure the feasibility of the recommendations, the shortest path from the rest stop to the candidate attraction is calculated in real time using the traffic situation field, along with the required time. The traffic impedance coefficient and time fluctuation range of this path are also assessed during the planned time period. Simultaneously, the crowd density at the candidate attraction during that time period is predicted. These traffic and pedestrian flow data are combined to generate a spatiotemporal feasibility factor. This avoids recommending an attraction that, while highly relevant, requires a rushed journey or is overcrowded, ensuring that the new experience is easy and comfortable. Finally, the "anti-consensus fit" (experience value) and the "spatiotemporal feasibility factor" (implementation cost) are weighted and combined to rank the candidate attractions. Only those high-quality attractions with a total score exceeding a preset threshold are adopted. For each selected attraction, a local insertion route reconstruction algorithm is used to embed it into the original route. The minimum time loop required to access the attraction is calculated, and the cumulative time impact of this insertion on all subsequent trips is evaluated. After each insertion attempt, the overall route's rhythmic coherence and time feasibility are reassessed, retaining only those optimized solutions that significantly improve the experience without causing stress or congestion in subsequent trips. The final anti-consensus travel plan retains all the advantages of the original plan while cleverly adding several carefully selected "Easter egg" attractions and providing an updated timetable and transportation guide, pushing a truly personalized and surprising travel plan to users.
[0043] Figure 3 A tourism route optimization system 3 based on traffic condition calculation is provided in one embodiment of the present invention. The system includes: a memory 301, a processor 302, and a communication interface 303. The memory 301 contains a tourism route optimization method program based on traffic condition calculation. When the tourism route optimization method program based on traffic condition calculation is executed by the processor 302, it performs the following steps: Traffic state data sequences are acquired from a multi-source traffic monitoring network in the target area. Traffic phases are divided using the traffic state data sequences to generate a traffic phase structure. A traffic situation field is then constructed based on the traffic phase structure. Acquire all tourist attractions and their attribute data within the target area, score the potential attractiveness of each tourist attraction as a potential source of attraction, and construct an attraction attraction potential field in a preset geographic space based on the potential attractiveness score results. The travel expectation information of the target user is obtained and the intent is analyzed. The traffic situation field and the attraction potential field of the attraction are superimposed to generate the attraction-path space. The initial travel route is generated by combining the attraction-path space. Based on the opening time window and peak and valley periods of visitor flow of the scenic spot, visit time sequence constraints are constructed. The attraction potential field of the scenic spot is time-varyingly modulated according to the visit time sequence constraints to optimize the initial tourist route and generate candidate optimized tourist routes. A travel rhythm assessment system is constructed based on users' travel rhythm preferences, trip density thresholds, and the congestion sensitivity of routes in local traffic changes. The system performs rhythmic rearrangement of the stop segments, movement segments, and cross-regional segments of candidate tourism optimization routes, and outputs tourism route optimization reports for distribution.
[0044] In another aspect, the present invention provides a computer-readable storage medium including a tourism route optimization method program based on traffic condition calculation. When the tourism route optimization method program based on traffic condition calculation is executed by a processor, it implements the steps of the tourism route optimization method based on traffic condition calculation as described in any of the preceding claims.
[0045] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for optimizing tourist routes based on traffic condition calculations, characterized in that, include: Traffic state data sequences are acquired from a multi-source traffic monitoring network in the target area. Traffic phases are divided using the traffic state data sequences to generate a traffic phase structure. A traffic situation field is then constructed based on the traffic phase structure. Acquire all tourist attractions and their attribute data within the target area, score the potential attractiveness of each tourist attraction as a potential source of attraction, and construct an attraction attraction potential field in a preset geographic space based on the potential attractiveness score results. The travel expectation information of the target user is obtained and the intent is analyzed. The traffic situation field and the attraction potential field of the attraction are superimposed to generate the attraction-path space. The initial travel route is generated by combining the attraction-path space. Based on the opening time window and peak and valley periods of visitor flow of the scenic spot, visit time sequence constraints are constructed. The attraction potential field of the scenic spot is time-varyingly modulated according to the visit time sequence constraints to optimize the initial tourist route and generate candidate optimized tourist routes. A travel rhythm assessment system is constructed based on users' travel rhythm preferences, trip density thresholds, and the congestion sensitivity of routes in local traffic changes. The system performs rhythmic rearrangement of the stop segments, movement segments, and cross-regional segments of candidate tourism optimization routes, and outputs tourism route optimization reports for distribution.
2. The method for optimizing tourist routes based on traffic condition calculation according to claim 1, characterized in that, The process of acquiring traffic state data sequences from a multi-source traffic monitoring network in the target area, using these sequences to perform traffic phase segmentation to generate a traffic phase structure, and constructing a traffic situation field based on the traffic phase structure specifically includes: A multi-source traffic monitoring network is deployed in the target area to acquire traffic status data through a distributed data acquisition interface. After spatiotemporal alignment and data cleaning, a traffic status data sequence is formed. The traffic status data sequence is based on road segments as the basic unit, and each unit contains a time series of three attributes: vehicle speed, road flow, and road occupancy. Multi-stage feature extraction and pattern recognition are performed on the traffic state data sequence. The original speed sequence of each road segment is scanned using a sliding time window. During each sliding, the sum of the absolute values of the speed differences between all continuous sampling points within the window is calculated and defined as the speed gradient change of that time window. The product sequence of traffic flow and road occupancy is calculated synchronously, and the coefficient of variation of the product sequence is obtained, which is the ratio of the standard deviation to the mean, and is defined as the flow density mutation rate. The event disturbance intensity is analyzed based on vehicle speed and road occupancy within a preset time window using a dual threshold judgment method to obtain the event disturbance intensity. Based on the velocity gradient change, flow density mutation rate and event disturbance intensity, a multi-dimensional feature description vector describing the local traffic behavior of the current road segment is constructed and used as input to perform unsupervised traffic phase division. The feature space is divided into four traffic behavior modes by probability density clustering method: free flow, synchronous flow, wide moving congestion and recovery period, generating discrete traffic phase structure. Historical road traffic data is used to set a traffic impedance coefficient for each traffic phase. The traffic impedance coefficient is determined by statistically analyzing the ratio of the actual travel time per unit road segment to the free-flow reference time under the corresponding phase, thus obtaining a phase-impedance mapping table. Based on the impedance mapping table, with geographic space as a two-dimensional plane and time as a third-dimensional axis, the spatial coordinates, time points, and corresponding phase impedance coefficients of each road segment are used as three-dimensional discrete sample points. The spatiotemporal kriging interpolation algorithm is used for three-dimensional reconstruction, and finally a traffic situation field is generated.
3. The method for optimizing tourist routes based on traffic condition calculation according to claim 1, characterized in that, The process of acquiring all tourist attractions and their attribute data within the target area, assigning a potential attraction score to each attraction as a potential attraction source, and constructing an attraction attraction potential field in a preset geographic space based on the potential attraction score results specifically includes: Obtain multi-source heterogeneous data of all registered attractions within the target area. After data fusion and entity alignment, establish an attraction attribute dataset that includes latitude and longitude coordinates, multi-level theme classification labels, physical space area, historical visitor flow statistics, real-time user evaluation data, and periodic opening schedule. Based on the aforementioned scenic spot attribute dataset, semantic analysis of text-based topic classification labels is performed using natural language processing technology to obtain cultural value coefficients. Logarithmic normalization is performed on physical space area data to obtain spatial scale coefficients. For historical visitor flow statistics, time series decomposition technology is used to extract long-term trend components as steady-state visitor flow bases. For real-time user review data, a weighted sentiment score is calculated using sentiment analysis algorithms as a reputation score. Based on the cultural value coefficient, spatial scale coefficient, steady-state visitor flow base and reputation score, a scenic spot description feature vector is constructed for each scenic spot. A multi-dimensional weighted scoring method is used to map it to a potential attraction value, thereby obtaining a quantitative potential attraction score for each scenic spot and generating a scenic spot attraction vector set. The target geographic area is divided into a regular grid system. For the center point of each grid cell, the Gaussian kernel function is used to calculate the attractive radiation value of all attractions. The potential attractiveness score of each attraction is used as the amplitude parameter of the kernel function, and the Euclidean distance from the attraction to the grid point is used as the width parameter of the kernel function. The effective range of the attractiveness is controlled by adjusting the attenuation coefficient of the kernel function. The Gaussian kernel function values generated by all attractions at each grid point are linearly superimposed to transform the discrete attraction rating distribution into a static attraction potential energy surface that changes continuously and smoothly in two-dimensional geographic space. A time-series modulation factor based on the opening time window is introduced, and a periodic modulation function is generated according to the operating schedule of each attraction. This function is then multiplied element-wise with the static attraction potential energy surface to obtain the final dynamic attraction potential field.
4. The method for optimizing tourist routes based on traffic condition calculation according to claim 1, characterized in that, The process involves acquiring the target user's travel expectation information and performing intent analysis, superimposing the traffic situation field and the attraction attraction field to generate an attraction-path space, and then using this attraction-path space to generate an initial travel route. Specifically, this includes: The system obtains user-inputted travel expectation information through a natural language interaction interface, converts natural language descriptions into high-dimensional semantic vectors through word embedding technology, extracts context-related semantic features using a bidirectional long short-term memory network, and focuses key intent words through a self-attention layer to generate user intent feature vectors containing user preference topics, activity intensity expectations, and time budget constraints. Based on the user intent feature vector, the constructed attraction potential field of the scenic spot is personalized and modulated. The personalized matching coefficient is obtained by calculating the cosine similarity between the user intent feature vector and the multimodal feature vector of each scenic spot. The coefficient is then weighted and fused with the original potential field value of the scenic spot to generate a personalized attraction potential field that reflects the user's individual preferences. The potential field value of each grid point represents the degree of fit between the location and the user's travel expectations. A field superposition algorithm based on dynamic weights is used to couple the personalized attraction potential field with the traffic situation field in multiple fields. The traffic impedance value of the traffic situation field is converted into the traffic convenience index through the sigmoid function and linearly combined with the intensity value of the personalized attraction potential field. The combination weight is obtained by regression analysis of user selection preferences in historical travel data. Finally, a attraction-path space that integrates traffic conditions and attraction attraction is generated. An adaptive potential energy gradient tracking algorithm is executed in the scenic spot-path decision field. Starting from the user-specified starting position, the local gradient direction of the scenic spot-path space is calculated at each grid point. A gradient ascent strategy with a variable step size is adopted for path exploration. At the same time, a dynamic potential energy decay mechanism is introduced to exponentially decay the potential field value of the visited area. The search terminates when the cumulative exploration time reaches the user's time budget or the potential energy growth rate remains below a preset threshold, forming the optimal energy path composed of continuous spatial coordinates. The generated optimal energy path is then extended in the time dimension, and the travel time is estimated by combining the length of each segment of the path with the traffic situation field value at the corresponding time, resulting in an initial travel route containing a complete spatial trajectory and time series.
5. The method for optimizing tourist routes based on traffic condition calculation according to claim 1, characterized in that, The process involves constructing access time constraints based on the opening time windows and peak and off-peak periods of tourist attractions, and then optimizing the initial tourist route by time-varying modulation of the attraction potential field of the attractions according to these constraints, thereby generating candidate optimized tourist routes. Specifically, this includes: After obtaining the initial tourist route, the opening schedule and historical visitor flow distribution patterns of each attraction are obtained. A continuous visitor flow density curve is generated through the historical visitor flow distribution patterns, and the peak and valley factors in each time period are extracted. Combined with the opening schedule, a time-series constraint feature vector for each attraction is generated. The time-series constraint feature vector is used as a dynamic modulation factor and is subjected to time-slice adaptive multiplication with the original attraction potential field value of the scenic spot to generate a time-varying attraction potential field that reflects the accessibility and comfort of the scenic spot. The time-varying attraction potential field is then spatiotemporally coupled with the traffic situation field to generate a time-varying modulated scenic spot-path space. Input the initial tourist route into the time-varying modulated scenic spot-path space. Starting from the initial route, construct the objective function based on the total attraction potential energy accumulation of the route, travel time efficiency, and temporal constraint satisfaction. Then, use a time-varying optimization based on an improved non-dominated sorting genetic algorithm. During the optimization process, a tabu search local optimization strategy is introduced to deeply mine the non-dominated solutions in each generation. The search range is expanded by exchanging the visit order of adjacent attractions, adjusting the stay time of attractions, and replacing the neighboring operations of similar attractions. At the same time, the degree of matching between the planned arrival time of each attraction and the accessibility of the corresponding time period is detected by time axis conflict detection. After iterative optimization until a preset stopping criterion is met, the final Pareto front solution set is obtained. The spatiotemporal feasibility of the tourism path in the final Pareto front solution set is then verified, and candidate tourism optimization routes are finally output.
6. The method for optimizing tourist routes based on traffic condition calculation according to claim 1, characterized in that, The system constructs a travel rhythm evaluation system based on users' travel rhythm preferences, trip density thresholds, and the congestion sensitivity of routes to local traffic changes. It then performs rhythmic rearrangement of the stop segments, movement segments, and cross-regional segments of candidate optimized tourist routes, outputting a tourist route optimization report for distribution. Specifically, this includes: The user interaction interface collects user-defined travel rhythm preference parameters, including the maximum tolerable duration of a single continuous movement, the preference for alternating frequency of activities and rest, the activity intensity tendency at different times, and the personal preferred trip density level. Based on the impedance value variation characteristics of each road segment in the traffic situation field, the congestion sensitivity index of the path is calculated. The travel rhythm evaluation system is constructed by combining the analytic hierarchy process. The route segment feature description set is input into the k-means clustering algorithm to identify the travel rhythm pattern using the travel rhythm assessment system. The optimal number of clusters is determined by the elbow rule, and the route is divided into three types of basic units: stop segments, moving segments, and cross-section segments. For each unit, time consumption features, spatial distribution features, and activity intensity features are extracted, and the rhythm coordination score of each unit is calculated. Segments with scores below a preset threshold are designated as segments to be optimized, thus forming a route rhythm feature map. An optimization model is established with rhythm coordination and user satisfaction as objective functions and the total travel time remaining constant as a hard constraint. Based on the dynamic programming algorithm, the optimal time allocation of the segments to be optimized in the rhythm feature map of the route is solved, and the candidate optimized tourist routes after time redistribution are output. After completing the time redistribution, the simulated annealing algorithm is used to perform spatial path local optimization on the candidate tourism optimization routes after time redistribution. The time-varying modulated scenic spot-path space is used as the solution space for initial temperature initialization and the cooling rate and termination conditions are set for iterative path optimization. In each iteration, the decision to accept a new solution is based on the changes in rhythm coordination, path attraction potential energy, and spatial offset. Thus, the final optimized tourism route is obtained after adjustments in both the time and spatial dimensions, and a tourism route optimization report containing rhythm optimization analysis is generated and pushed out.
7. A tourism route optimization system based on traffic condition calculation, characterized in that, The system includes: a memory, a processor, and a communication interface. The memory contains a program for optimizing tourist routes based on traffic conditions. When the processor executes the program for optimizing tourist routes based on traffic conditions, it performs the following steps: Traffic state data sequences are acquired from a multi-source traffic monitoring network in the target area. Traffic phases are divided using the traffic state data sequences to generate a traffic phase structure. A traffic situation field is then constructed based on the traffic phase structure. Acquire all tourist attractions and their attribute data within the target area, score the potential attractiveness of each tourist attraction as a potential source of attraction, and construct an attraction attraction potential field in a preset geographic space based on the potential attractiveness score results. The travel expectation information of the target user is obtained and the intent is analyzed. The traffic situation field and the attraction potential field of the attraction are superimposed to generate the attraction-path space. The initial travel route is generated by combining the attraction-path space. Based on the opening time window and peak and valley periods of visitor flow of the scenic spot, visit time sequence constraints are constructed. The attraction potential field of the scenic spot is time-varyingly modulated according to the visit time sequence constraints to optimize the initial tourist route and generate candidate optimized tourist routes. A travel rhythm assessment system is constructed based on users' travel rhythm preferences, trip density thresholds, and the congestion sensitivity of routes in local traffic changes. The system performs rhythmic rearrangement of the stop segments, movement segments, and cross-regional segments of candidate tourism optimization routes, and outputs tourism route optimization reports for distribution.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a tourism route optimization method program based on traffic condition calculation. When the tourism route optimization method program based on traffic condition calculation is executed by a processor, it implements the steps of the tourism route optimization method based on traffic condition calculation as described in any one of claims 1 to 6.