A tourist route planning method and system based on data analysis

Through data analysis and machine learning algorithms, combined with multi-source data and real-time feedback, personalized tourism path planning is generated, which solves the problem of predicting tourist flows of attractions under the traditional system under multi-person travel and diversified preferences, and improves tourism experience and path efficiency.

CN118779540BActive Publication Date: 2025-01-03SUZHOU HANYUN KELING NETWORK INFORMATION SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411238645.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-01-03
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

It is difficult for traditional tourism path planning systems to accurately predict and avoid peak traffic at scenic spots while taking into account multi-person travel and diversified preferences, resulting in tourists who may encounter congestion during peak hours, affecting their tourism experience.

Method used

Using a data analysis-based method, by collecting and preprocessing tourist attractions data from multiple data sources, key factors such as the number of tourists and the number of people can be collected and preprocessed, the Transformer model is used to analyze the busyness and tourist flow trends, and CNN-LSTM-Attention The model and improved ant colony algorithm generate personalized path planning information and adjust it in real time to deal with scenic spots and user feedback.

Benefits of technology

It improves the accuracy of scenic spot data and personalized tourism path planning, improves tourist experience satisfaction and itinerary efficiency, and realizes real-time optimization and flexible adjustment of multi-person tourist paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779540B_ABST
    Figure CN118779540B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a method and system for planning a tourist route based on data analysis. The method collects initial tourist attraction data of various places from multiple data sources, performs data preprocessing on the collected initial tourist attraction data, performs clustering processing on the preprocessed tourist attraction data, extracts scenic spot feature data containing key factors from the preprocessed tourist attraction data, wherein the key factors at least include the number of tourists at the scenic spot and the number of people that the scenic spot can accommodate; obtains tourist demand data and tourist preference data, and generates tourist route planning information by adopting a path optimization model and an improved ant colony algorithm in combination with the data analysis result; visually recommends tourist route planning information to tourists, obtains user feedback information and real-time information of scenic spots in real time, and can customize tourist routes for tourists according to personalized information such as the number of tourists and preferences, combined with historical travel data and real-time data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a travel route planning method and system based on data analysis. Background Art

[0002] With the booming tourism industry and the full penetration of Internet technology, the public's pursuit of the quality of travel experience is increasing at an unprecedented rate. Traditional travel route planning is often limited by manual experience and established guidelines. It lacks accurate data support and is difficult to achieve personalized customization, which greatly limits its ability to meet the increasingly diverse needs of tourists. Driven by the wave of big data, although many tourist attraction recommendation systems have begun to use data analysis to optimize recommendation strategies and route planning, there are still significant shortcomings in this field. At present, most systems focus on making recommendations based on user personal preferences, but rarely consider the number of tourists and diversified preferences. Especially when it comes to multi-person scenarios such as family travel, the complexity of preferences and the increase in the number of people put forward higher requirements for algorithms, and traditional algorithms seem to be unable to cope with this situation. More importantly, when making recommendations and planning, traditional algorithms often ignore the dynamic changes in the real-time flow of people at attractions. This neglect may cause tourists to encounter congestion during peak hours and affect the overall travel experience. Therefore, how to accurately predict and avoid peak flow of people at attractions while taking into account multi-person travel and diverse preferences has become a technical bottleneck that needs to be broken through in the current field of travel route planning. Summary of the invention

[0003] The purpose of the present invention is to solve the above problems and to design a travel route planning method and system based on data analysis.

[0004] A first aspect of the present invention provides a method for planning a travel route based on data analysis, the method comprising the following steps:

[0005] Collecting initial tourist attraction data from various places from multiple data sources, performing data preprocessing on the collected initial tourist attraction data, and completing the data preprocessing by deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing in sequence to obtain preprocessed tourist attraction data;

[0006] Performing clustering processing on the preprocessed tourist attraction data, extracting the tourist attraction feature data containing key factors from the preprocessed tourist attraction data, wherein the key factors at least include the number of tourists at the tourist attraction and the number of people that the tourist attraction can accommodate;

[0007] Using the Transformer model to perform data analysis on the busyness of the scenic spot and the flow trend of tourists according to the characteristic data of the scenic spot, and obtaining data analysis results;

[0008] Acquire tourist demand data and tourist preference data, and combine the data analysis results to generate tourist route planning information using a path optimization model and an improved ant colony algorithm, wherein the path optimization model is a CNN-LSTM-Attention model;

[0009] The travel route planning information is visually recommended to tourists, and user feedback information and real-time information of scenic spots are obtained in real time, and an improved ant colony algorithm is used to provide real-time adjustments and suggestions.

[0010] Optionally, in a first implementation of the first aspect of the present invention, the initial tourist attraction data of various places are collected from multiple data sources, and the collected initial tourist attraction data are preprocessed, and the data preprocessing is completed by deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing in sequence to obtain the preprocessed tourist attraction data, including:

[0011] Capture data from multiple data sources and obtain data by calling an API interface to obtain initial tourist attraction data of various places, wherein the data sources at least include online travel platforms, official travel websites, and geographic information systems;

[0012] Using a hash algorithm to perform deduplication processing on the collected initial tourist attraction data, and performing outlier removal processing and missing value processing on the deduplication data to obtain first tourist attraction data;

[0013] The first tourist attraction data is standardized, the standardized data is read and parsed, and the standardized data is decomposed into independent data values. The corresponding data set Q is:

[0014] ;

[0015] In the formula, q represents the data in the data set Q, Represents the nth data value of the mth channel;

[0016] Based on the Softmax classifier, data fusion processing is performed on the data in the data set Q to fuse the data from multiple data sources to obtain pre-processed tourist attraction data.

[0017] Optionally, in a second implementation of the first aspect of the present invention, clustering the preprocessed tourist attraction data to extract the tourist attraction feature data containing key factors from the preprocessed tourist attraction data includes:

[0018] The data in each time period of the preprocessed tourist attraction data is represented in the form of a window. Let the size of the window be w, and the data matrix of the time period be for: ,in Indicates Data points for a time period, Indicates Data points for a time period;

[0019] Cluster each data matrix into K categories, assume that the data in each data segment obeys a zero-mean Gaussian distribution, and obtain the corresponding inverse covariance matrix ;

[0020] For K inverse covariance matrices To solve the problem, the data segments are assigned to K categories and each data point has only one category. The objective function is:

[0021] ;

[0022] In the formula, represents the regularization parameter, Indicates The model parameter vector of the category, represents the 1-norm penalty of the Hadamard product, express The log-likelihood value from cluster i, Represents the loss function, which is used to measure the gap between the model prediction results and the true label. express The input feature vector of time steps, Indicates The predicted probability distribution corresponding to the category, represents the parameter for enforcing temporal consistency, represents an indicator function that checks whether adjacent points are assigned to the same cluster, Indicates that the value of the objective function is the minimum;

[0023] Iterations are repeated until the clustering results converge and clustering set parameters and inverse covariance matrix parameters are output to obtain a distribution set, from which scenic spot feature data containing key factors are screened.

[0024] Optionally, in a third implementation of the first aspect of the present invention, a Transformer model is used to perform data analysis on the busyness of the scenic spot and the flow trend of tourists according to the scenic spot feature data to obtain data analysis results, including:

[0025] Converting the scenic spot feature data into time series data, wherein each time step contains one or more feature data;

[0026] The time series data is input into the Transformer model. After passing through the time embedding layer, the position encoding layer adds position information to the data and inputs it into the encoder-decoder.

[0027] The encoder-decoder is used for feature extraction and prediction. The encoder encodes the input time series data and captures the long-distance dependencies and global features in the data through the multi-head self-attention mechanism. The decoder generates predictions of the busyness of scenic spots and the flow trend of tourists based on the output of the encoder to obtain data analysis results. The encoder-decoder consists of a multi-head self-attention mechanism and a feedforward neural network:

[0028] ;

[0029] In the formula, and Represents two different fully connected layers, and RELU represents the activation function.

[0030] Optionally, in a fourth implementation of the first aspect of the present invention, the obtaining of tourist demand data and tourist preference data, and combining the data analysis results, using a path optimization model and an improved ant colony algorithm to generate tourist path planning information includes:

[0031] Acquire tourist demand data, tourist preference data and data analysis results, integrate them to obtain input data, and input the input data into a path optimization model;

[0032] The features of the tourist data consisting of tourist demand data and tourism preference data are extracted through the superposition of the convolution layer, batch normalization layer and activation layer of the CNN network:

[0033] ;

[0034] In the formula, represents the tourist data sequence, where n represents the number of features of the tourist sequence, represents the convolution kernel, represents the length of the convolution kernel, Represents the position index of the convolution kernel, represents the batch normalization operation, Indicates activation operation. represents the pooling operation in the subsequence, Represents the feature sequence output by the CNN network;

[0035] The interdependence between the feature sequence output by the CNN network and the sequence data of the data analysis result is analyzed by the LSTM network, wherein each unit structure of the LSTM network includes a cell state, a forget gate, an input gate and an output gate:

[0036] The mathematical expression of the forget gate is as follows:

[0037] ;

[0038] In the formula, represents the forget gate; Represents the Sigmoid function; and Represent the forget gate weight and bias coefficient respectively; Represents the unit output at time t-1; Represents information input at time t;

[0039] The mathematical expression of the input gate is as follows:

[0040] ;

[0041] In the formula, Represents the input gate, which determines how many new candidate values will be added to the cell state, represents the new candidate value for the current time step, represents the cell state at the current time step, represents the weight matrix of candidate values, represents the bias term of the candidate value, represents the weight matrix of the input gate, represents the bias term of the input gate, represents the hyperbolic tangent activation function, which compresses any real value to the interval [-1, 1], represents the output of the forget gate;

[0042] The mathematical expression of the output gate is as follows:

[0043] ;

[0044] In the formula, represents the output of the output gate; Represents the weight matrix of the output gate; represents the bias term of the output gate, The hidden state vector at the current time step;

[0045] The output of the LSTM network is normalized by the softmax function to generate weights, and the Attention mechanism is introduced for weighted aggregation to obtain the weighted average result:

[0046] ;

[0047] In the formula, Represents that by applying the attention score The weights obtained by the function; Represents the output of the last hidden layer of the LSTM network. Indicates passing The score of each hidden layer output after function processing; Represents the value after weighted average summation; is the bias term, represents the weight matrix, represents the sequence length, Represents the position index in the sequence;

[0048] Based on the weighted average result, multiple preliminary path planning results are obtained, and the improved ant colony algorithm is used to optimize the path planning of the multiple preliminary path planning results to seek the optimal solution to generate travel path planning information, wherein the improved ant colony algorithm is obtained by combining the GA algorithm, the ACA algorithm and the SA algorithm.

[0049] Optionally, in a fifth implementation of the first aspect of the present invention, the step of obtaining multiple preliminary path planning results based on the weighted average result, and optimizing the multiple preliminary path planning results by using an improved ant colony algorithm to seek an optimal solution to generate travel path planning information includes:

[0050] Get multiple preliminary path planning results and initialize the data of each scenic spot in each preliminary path planning result:

[0051] ;

[0052] In the formula, Indicates attractions, Indicates Attractions , Indicates attractions, represents the aggregate quantity of route relationships between scenic spots, express indivual The corresponding path length, Indicates The adaptability of each attraction;

[0053] Calculating selection probabilities using the roulette wheel method :

[0054] ;

[0055] Select from the set of route relationships between attractions The scenic spots are cross-arranged, and the arranged scenic spots are taken as the new scenic spot sequence. The scenic spots in the new scenic spot sequence are randomly changed and mutated. After repeated selection, cross-arrangement and mutation of each scenic spot sequence, the optimal solution for planning the scenic spot route is obtained, and the optimal solution is used as the initial value of pheromone in the ACA-SA algorithm.

[0056] Using the initial value of pheromone, the ACA algorithm continuously updates the number of tourists on the path, determines the number of tourists on each path, and seeks the optimal solution after multiple cycles to generate tourism path planning information.

[0057] Optionally, in a sixth implementation of the first aspect of the present invention, the initial value of the pheromone is used to continuously update the number of tourists on the path through the ACA-SA algorithm, the number of tourists on each path is determined, and the optimal solution is sought after multiple cycles to generate travel path planning information, including:

[0058] Initialize the number and position of ants. During the search process, ants will choose the next position based on pheromones and heuristic information. Each time after passing a path, the ants will release a certain amount of pheromones. When the ants complete the iteration, they will update the residual pheromones on the path. After the pheromones are updated, the ants will choose the next position based on the updated pheromones through the state transition probability. for:

[0059] ;

[0060] In the formula, Indicates that tourists k from scenic spots To the attractions The probability of express The pheromone concentration on each path at the moment, that is, the pheromone concentration represents the number of tourists passing through each path, express Attractions along each route at the time To the attractions Quality of service, indicates that tourist k expects to select a set of attractions next. express Attractions along each route at the time To the destination The pheromone concentration, express Attractions along each route at the time To the destination Quality of service, represents the heuristic function, represents the number of tourists visiting two attractions. represents the length of the path constructed by tourists, represents the pheromone concentration, Indicates the service quality of scenic spots. Indicates the desired target attraction;

[0061] During the search process, if the ant's search enters a local optimal point and no better path is found, the SA algorithm is used to find the global optimal solution. The optimal path of the current ant colony algorithm is received as the initial solution, and a new solution is generated by perturbation. The difference in the objective function between the new solution and the old solution is calculated:

[0062] ;

[0063] In the formula, represents the function value of the new solution, represents the function value of the old solution;

[0064] Based on the Metropolis criterion, determine whether to accept the new solution. Then accept the new solution, if Then the new solution is based on probability Acceptance is performed, T represents the annealing temperature;

[0065] At temperature T, repeat the perturbation and acceptance process and slowly lower the temperature until convergence, compare the results and update the pheromone. When the result obtained by the SA algorithm is better than the optimal solution of the ACA algorithm, the result obtained by the SA algorithm is converted into the pheromone of the ACA algorithm and the optimal solution is updated. When the result obtained by the SA algorithm is worse than the current optimal solution, continue to use the ACA algorithm for calculation until the maximum number of iterations is reached to seek the optimal solution to generate travel path planning information.

[0066] The second aspect of the present invention provides a travel route planning system based on data analysis, the travel route planning system based on data analysis comprises a data acquisition module, a data extraction module, a data analysis module, a route planning module and a real-time adjustment module, wherein:

[0067] The data collection module is used to collect initial tourist attraction data from multiple data sources in various places, and perform data preprocessing on the collected initial tourist attraction data, and complete the data preprocessing by deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing in sequence to obtain the preprocessed tourist attraction data;

[0068] A data extraction module is used to perform clustering processing on the pre-processed tourist attraction data, and extract the tourist attraction feature data containing key factors from the pre-processed tourist attraction data, wherein the key factors at least include the number of tourists at the tourist attraction and the number of people that the tourist attraction can accommodate;

[0069] A data analysis module, used to perform data analysis on the busyness of the scenic spot and the flow trend of tourists using a Transformer model according to the characteristic data of the scenic spot, and obtain data analysis results;

[0070] A route planning module is used to obtain tourists' travel demand data and travel preference data, and combine the data analysis results to generate travel route planning information using a route optimization model and an improved ant colony algorithm, wherein the route optimization model is a CNN-LSTM-Attention model;

[0071] The real-time adjustment module is used to visually recommend the travel route planning information to tourists, obtain user feedback information and real-time information of scenic spots in real time, and use the improved ant colony algorithm to provide real-time adjustments and suggestions.

[0072] Optionally, in a first implementation of the second aspect of the present invention, the data acquisition module includes a data capture submodule, a deduplication processing submodule, a standardization processing submodule and a data fusion submodule, wherein:

[0073] The data capture submodule is used to collect data from multiple data sources and obtain data by calling an API interface to obtain initial tourist attraction data of various places, wherein the data sources at least include online travel platforms, official travel websites and geographic information systems;

[0074] A deduplication processing submodule is used to perform deduplication processing on the collected initial tourist attraction data using a hash algorithm, and to remove outliers and missing values ​​from the deduplication data to obtain first tourist attraction data;

[0075] The standardization processing submodule is used to perform standardization processing on the first tourist attraction data, read and parse the standardized data, and decompose the standardized data into independent data values. The corresponding data set Q is:

[0076] ;

[0077] In the formula, q represents the data in the data set Q, Represents the nth data value of the mth channel;

[0078] The data fusion submodule is used to perform data fusion processing on the data in the data set Q based on the Softmax classifier, so as to fuse the data from multiple data sources to obtain the pre-processed tourist attraction data.

[0079] Optionally, in a second implementation of the second aspect of the present invention, the data extraction module includes a representation submodule, a Gaussian distribution submodule, a distribution submodule and a screening submodule, wherein:

[0080] The representation submodule is used to represent the data in each time period of the preprocessed tourist attraction data in the form of a window. Let the size of the window be w, and the data matrix of the time period be for: ,in Indicates Data points for a time period, Indicates Data points for a time period;

[0081] Gaussian distribution submodule is used to cluster each data matrix into K categories, assuming that the data in each data segment obeys a zero-mean Gaussian distribution, and obtain the corresponding inverse covariance matrix ;

[0082] Assignment submodule for inverse covariance matrices of K To solve the problem, the data segments are assigned to K categories and each data point has only one category. The objective function is:

[0083] ;

[0084] In the formula, represents the regularization parameter, Indicates The model parameter vector of the category, represents the 1-norm penalty of the Hadamard product, express The log-likelihood value from cluster i, Represents the loss function, which is used to measure the gap between the model prediction results and the true label. express The input feature vector of time steps, Indicates The predicted probability distribution corresponding to the category, represents the parameter for enforcing temporal consistency, represents an indicator function that checks whether adjacent points are assigned to the same cluster, Indicates that the value of the objective function is the minimum;

[0085] The screening submodule is used to repeat iterations until the clustering results converge and output clustering set parameters and inverse covariance matrix parameters to obtain a distribution set, and screen out scenic spot feature data containing key factors from the distribution set.

[0086] Its beneficial effects are that, in the technical solution of the present invention, 1. Data quality and reliability can be improved: by collecting initial tourist attraction data from multiple data sources, and performing pre-processing steps such as deduplication, outlier processing, missing value filling, standardization and data fusion, the integrity and accuracy of the tourist attraction data are improved. 2. The characteristics of the scenic spot can be accurately identified: through the application of clustering processing technology, the characteristic data of the scenic spot including key factors such as the number of tourists and the number of people that the scenic spot can accommodate are effectively extracted, making the analysis of the busyness of the scenic spot and the flow trend of tourists more accurate and detailed, which helps to understand the dynamics of the tourism market more comprehensively. 3. Intelligent prediction and analysis: using the Transformer model to analyze the busyness of the scenic spot and the flow trend of tourists, not only improves the accuracy of the prediction, but also can quickly respond to market changes and provide forward-looking guidance for tourism planning. 4. It can carry out personalized route planning for multiple tourists: combining the tourist number demand, preferences and data analysis results of tourists, through the advanced CNN-LSTM-Attention path optimization model and improved ant colony algorithm, personalized tourism route planning information is generated, which greatly improves the tourists' travel experience satisfaction and itinerary efficiency. 5. Real-time adjustment and optimization of the routes of multiple tourists: Through visual recommendation of travel route planning information, real-time collection of user feedback and real-time information of scenic spots, and dynamic adjustment of route planning using improved ant colony algorithm, it ensures that the planning scheme is always close to the actual needs of tourists and the actual situation of scenic spots, and realizes the flexibility and real-time nature of tourism planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the following detailed description of the preferred embodiment.The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting the invention.

[0088] Figure 1 A schematic diagram of a first embodiment of a travel route planning method based on data analysis provided by an embodiment of the present invention;

[0089] Figure 2 A schematic diagram of a second embodiment of a travel route planning method based on data analysis provided by an embodiment of the present invention;

[0090] Figure 3 A structural schematic diagram of a travel route planning system based on data analysis provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0091] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0092] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 A first embodiment schematic diagram of a travel route planning method based on data analysis provided by an embodiment of the present invention, the method specifically comprises the following steps:

[0093] Step 101, collecting initial tourist attraction data of various places from multiple data sources, performing data preprocessing on the collected initial tourist attraction data, and completing the data preprocessing by deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing in sequence to obtain preprocessed tourist attraction data;

[0094] Specifically, in this embodiment, the initial tourist attraction data includes at least the location, name, description, photo, opening hours, ticket price, number of visitors, etc. of the attraction.

[0095] Specifically, in this embodiment, data is captured from multiple data sources, and the data is obtained by calling an API interface to obtain initial tourist attraction data of various places, wherein the data sources at least include online travel platforms, official travel websites, and geographic information systems;

[0096] The collected initial tourist attraction data is deduplicated using a hash algorithm, and outlier and missing value processing is performed on the deduplicated data to obtain the first tourist attraction data;

[0097] The first tourist attraction data is standardized, the standardized data is read and parsed, and the standardized data is decomposed into independent data values. The corresponding data set Q is:

[0098] ;

[0099] In the formula, q represents the data in the data set Q, Represents the nth data value of the mth channel;

[0100] Based on the Softmax classifier, data fusion processing is performed on the data in the data set Q to fuse the data from multiple data sources to obtain pre-processed tourist attraction data.

[0101] Step 102: clustering the preprocessed tourist attraction data, extracting the tourist attraction feature data containing key factors from the preprocessed tourist attraction data, wherein the key factors at least include the number of tourists at the tourist attraction and the number of people that the tourist attraction can accommodate;

[0102] Specifically, in this embodiment, the scenic spot characteristic data at least includes data such as popularity, geographical location, type, and area size of the scenic spot.

[0103] Specifically, in this embodiment, the data in each time period of the preprocessed tourist attraction data is represented in the form of a window, and the size of the window is set to w, and the data matrix of the time period is for: ,in Indicates Data points for a time period, Indicates Data points for a time period;

[0104] Cluster each data matrix into K categories, assume that the data in each data segment obeys a zero-mean Gaussian distribution, and obtain the corresponding inverse covariance matrix ;

[0105] For K inverse covariance matrices To solve the problem, the data segments are assigned to K categories and each data point has only one category. The objective function is:

[0106] ;

[0107] In the formula, represents the regularization parameter, Indicates The model parameter vector of the category, represents the 1-norm penalty of the Hadamard product, express The log-likelihood value from cluster i, Represents the loss function, which is used to measure the gap between the model prediction results and the true label. express The input feature vector of time steps, Indicates The predicted probability distribution corresponding to the category, represents the parameter for enforcing temporal consistency, represents an indicator function that checks whether adjacent points are assigned to the same cluster, Indicates that the value of the objective function is the minimum;

[0108] Repeat the iteration until the clustering results converge and output the clustering set parameters and inverse covariance matrix parameters to obtain the allocation set, and filter out the scenic spot feature data containing key factors from the allocation set.

[0109] Step 103: using the Transformer model to perform data analysis on the busyness of the scenic spot and the flow trend of tourists based on the characteristic data of the scenic spot, and obtaining data analysis results;

[0110] Specifically, in this embodiment, the scenic spot feature data is converted into time series data, where each time step contains one or more feature data;

[0111] The time series data is input into the Transformer model. After passing through the time embedding layer, the position encoding layer will add position information to the data and input it into the encoder-decoder.

[0112] The encoder-decoder is used for feature extraction and prediction. The encoder encodes the input time series data and captures the long-distance dependencies and global features in the data through the multi-head self-attention mechanism. The decoder generates predictions of the busyness of scenic spots and tourist flow trends based on the output of the encoder to obtain data analysis results. The encoder-decoder consists of a multi-head self-attention mechanism and a feedforward neural network:

[0113] ;

[0114] In the formula, and Represents two different fully connected layers, and RELU represents the activation function.

[0115] The data analysis results include at least information such as the number of people that the attraction can accommodate, the number of parking spaces available at the attraction, and the time available for travel at the attraction.

[0116] Step 104: Acquire tourist demand data and tourist preference data, and combine the data analysis results to generate tourist route planning information using a path optimization model and an improved ant colony algorithm, wherein the path optimization model is a CNN-LSTM-Attention model;

[0117] Specifically, in this embodiment, tourist demand data, tourist preference data and data analysis results are obtained, integrated to obtain input data, and the input data is input into the path optimization model;

[0118] The features of the tourist data consisting of tourist demand data and tourism preference data are extracted through the superposition of the convolution layer, batch normalization layer and activation layer of the CNN network:

[0119] ;

[0120] In the formula, represents the tourist data sequence, where n represents the number of features of the tourist sequence, represents the convolution kernel, represents the length of the convolution kernel, Represents the position index of the convolution kernel, represents the batch normalization operation, Indicates activation operation. represents the pooling operation in the subsequence, Represents the feature sequence output by the CNN network;

[0121] The interdependence between the feature sequence output by the CNN network and the sequence data of the data analysis results is analyzed through the LSTM network, where each unit structure of the LSTM network includes a cell state, a forget gate, an input gate, and an output gate:

[0122] The mathematical expression of the forget gate is as follows:

[0123] ;

[0124] In the formula, represents the forget gate; Represents the Sigmoid function; and Represent the forget gate weight and bias coefficient respectively; Represents the unit output at time t-1; Represents information input at time t;

[0125] The mathematical expression of the input gate is as follows:

[0126] ;

[0127] In the formula, Represents the input gate, which determines how many new candidate values will be added to the cell state, represents the new candidate value for the current time step, represents the cell state at the current time step, represents the weight matrix of candidate values, represents the bias term of the candidate value, represents the weight matrix of the input gate, represents the bias term of the input gate, represents the hyperbolic tangent activation function, which compresses any real value to the interval [-1, 1], represents the output of the forget gate;

[0128] The mathematical expression of the output gate is as follows:

[0129] ;

[0130] In the formula, represents the output of the output gate; Represents the weight matrix of the output gate; represents the bias term of the output gate, The hidden state vector at the current time step;

[0131] The output of the LSTM network is normalized by the softmax function to generate weights, and the Attention mechanism is introduced for weighted aggregation to obtain the weighted average result:

[0132] ;

[0133] In the formula, Represents that by applying the attention score The weights obtained by the function; Represents the output of the last hidden layer of the LSTM network. Indicates passing The score of each hidden layer output after function processing; Represents the value after weighted average summation; is the bias term, represents the weight matrix, represents the sequence length, Represents the position index in the sequence;

[0134] Based on the weighted average results, multiple preliminary path planning results are obtained. The improved ant colony algorithm is used to optimize the path planning of the multiple preliminary path planning results to seek the optimal solution to generate travel path planning information. The improved ant colony algorithm is obtained by combining the GA algorithm, the ACA algorithm and the SA algorithm.

[0135] Specifically, in this embodiment, “obtaining multiple preliminary path planning results based on the weighted average result, optimizing the path planning of the multiple preliminary path planning results using the improved ant colony algorithm, and seeking the optimal solution to generate travel path planning information” includes:

[0136] Get multiple preliminary path planning results and initialize the data of each scenic spot in each preliminary path planning result:

[0137] ;

[0138] In the formula, Indicates attractions, Indicates Attractions , Indicates attractions, represents the aggregate quantity of route relationships between scenic spots, express indivual The corresponding path length, Indicates The adaptability of each attraction;

[0139] Calculating selection probabilities using the roulette wheel method :

[0140] Select from the set of route relationships between attractions The scenic spots are cross-arranged, and the arranged scenic spots are taken as the new scenic spot sequence. The scenic spots in the new scenic spot sequence are randomly changed and mutated. After repeated selection, cross-arrangement and mutation of each scenic spot sequence, the optimal solution for planning the scenic spot route is obtained, and the optimal solution is used as the initial value of pheromone in the ACA-SA algorithm.

[0141] Using the initial value of pheromone, the ACA algorithm continuously updates the number of tourists on the path, determines the number of tourists on each path, and seeks the optimal solution after multiple cycles to generate tourism path planning information.

[0142] Specifically, in this embodiment, “using the initial value of pheromone, continuously updating the number of tourists on the path through the ACA-SA algorithm, judging the number of tourists on each path, and seeking the optimal solution through multiple cycles to generate travel path planning information” includes:

[0143] Initialize the number and position of ants. During the search process, ants will choose the next position based on pheromones and heuristic information. Each time after passing a path, the ants will release a certain amount of pheromones. When the ants complete the iteration, they will update the residual pheromones on the path. After the pheromones are updated, the ants will choose the next position based on the updated pheromones through the state transition probability. for:

[0144] ;

[0145] In the formula, Indicates that tourists k from scenic spots To the attractions The probability of express The pheromone concentration on each path at the moment, that is, the pheromone concentration represents the number of tourists passing through each path, express Attractions along each route at the time To the attractions Quality of service, indicates that tourist k expects to select a set of attractions next. Indicates the attractions on each route at the time To the destination The pheromone concentration, express Attractions along each route at the time To the destination Quality of service, represents the heuristic function, represents the number of tourists visiting two attractions. represents the length of the path constructed by tourists, represents the pheromone concentration, Indicates the service quality of scenic spots. Indicates the desired target attraction;

[0146] During the search process, if the ant's search enters a local optimal point and no better path is found, the SA algorithm is used to find the global optimal solution. The optimal path of the current ant colony algorithm is received as the initial solution, and a new solution is generated by perturbation. The difference in the objective function between the new solution and the old solution is calculated:

[0147] ;

[0148] In the formula, represents the function value of the new solution, represents the function value of the old solution;

[0149] Based on the Metropolis criterion, determine whether to accept the new solution. Then accept the new solution, if Then the new solution is based on probability Acceptance is performed, T represents the annealing temperature;

[0150] At temperature T, repeat the perturbation and acceptance process and slowly lower the temperature until convergence, compare the results and update the pheromone. When the result obtained by the SA algorithm is better than the optimal solution of the ACA algorithm, the result obtained by the SA algorithm is converted into the pheromone of the ACA algorithm and the optimal solution is updated. When the result obtained by the SA algorithm is worse than the current optimal solution, continue to use the ACA algorithm for calculation until the maximum number of iterations is reached to seek the optimal solution to generate travel path planning information.

[0151] Step 105: Visually recommend travel route planning information to tourists, obtain user feedback information and real-time information of scenic spots in real time, and use the improved ant colony algorithm to provide real-time adjustments and suggestions.

[0152] Specifically, in this embodiment, a user interaction interface is established to display the travel route planning information in the form of a map. The interface can intuitively display the travel route planning information, including the departure location, the location of the business district, the location of the tourist attractions, the recommended route, the estimated travel time and other information. According to the tourist's travel demand data and travel preference data, the travel route planning information is generated. For example, if the tourist likes historical sites and prefers a shorter walking distance, a route containing nearby historical attractions and a shorter walking distance will be recommended. Tourists can interact with the planning information on the interface, such as viewing the details of the attractions, adjusting the order of the route, or adding / deleting attractions. User feedback information is collected in real time, including satisfaction, suggestions and improvement suggestions for the recommended route. User feedback information can be obtained through questionnaires, rating systems or direct user comments. Real-time information of each attraction is continuously monitored, such as whether the attraction is open, the current flow of people, whether special events are held, etc. The improved ant colony algorithm is used to provide real-time adjustments and suggestions; the improved ant colony algorithm is an improved ant colony algorithm obtained by combining the GA algorithm, the ACA algorithm and the SA algorithm. In addition to automatically adjusting the route, the system also provides intelligent suggestions, such as recommending nearby restaurants, rest spots or other interesting activities, thereby enriching the overall experience of tourists.

[0153] Specifically, in this embodiment, user feedback information also includes information such as satisfaction evaluation of the recommended route, improvement suggestions, and user route selection, and real-time scenic spot information also includes current status information of the scenic spot, such as whether it is open, the flow of people, etc. Real-time adjustments and suggestions also include suggestions such as route rectification and recommended vehicles for the route, and whether the scenic spot is suitable for multiple people to travel.

[0154] The beneficial effect lies in that, by collecting initial tourist attraction data of various places from multiple data sources, the collected initial tourist attraction data is preprocessed, and the data preprocessing is completed in sequence through deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing to obtain preprocessed tourist attraction data; clustering processing is performed on the preprocessed tourist attraction data, and scenic spot feature data containing key factors are extracted from the preprocessed tourist attraction data, wherein the key factors at least include the number of tourists at the scenic spot and the number of people that the scenic spot can accommodate; according to the scenic spot feature data, the Transformer model is used to perform data analysis on the busyness of the scenic spot and the flow trend of tourists to obtain data analysis results; the tourist demand data and tourist preference data are obtained, and combined with the data analysis results, the path optimization model and the improved ant colony algorithm are used to generate tourist route planning information, wherein the path optimization model is the CNN-LSTM-Attention model; the tourist route planning information is visually recommended to tourists, and user feedback information and real-time information of scenic spots are obtained in real time, and the improved ant colony algorithm is used to provide real-time adjustments and suggestions. Multi-source data fusion can be performed: by collecting and integrating multi-source data such as user data, tourist destination data, and traffic data, comprehensive data support is provided for route planning. Personalized customization: based on the number of tourists, preferences, budget and other personalized information, combined with historical travel data and real-time data, the tourist route is customized for the tourists. Intelligent algorithm optimization: using machine learning algorithms and complex network theory to intelligently optimize the tourist route to ensure the accuracy and rationality of the planning results.

[0155] See also Figure 2 , a schematic diagram of a second embodiment of a travel route planning method based on data analysis provided by an embodiment of the present invention, the method comprising:

[0156] Step 1011: collect data from multiple data sources, and obtain data by calling an API interface to obtain initial tourist attraction data of various places, wherein the data sources at least include online travel platforms, official travel websites, and geographic information systems;

[0157] Step 1012: Use a hash algorithm to perform deduplication processing on the collected initial tourist attraction data, and perform outlier removal processing and missing value processing on the deduplication data to obtain first tourist attraction data;

[0158] Step 1013: Standardize the first tourist attraction data, read and parse the standardized data, and decompose the standardized data into independent data values. The corresponding data set Q is:

[0159] ;

[0160] In the formula, q represents the data in the data set Q, Represents the nth data value of the mth channel;

[0161] Step 1014: Perform data fusion processing on the data in the data set Q based on the Softmax classifier to fuse the data from multiple data sources to obtain pre-processed tourist attraction data.

[0162] The beneficial effect is that by collecting data from multiple data sources (including online travel platforms, official travel websites and geographic information systems), the extensiveness and diversity of data sources are ensured, so that tourist attraction information from different angles and dimensions can be more comprehensively covered, and the comprehensiveness and richness of the data are improved. The data is further purified, the accuracy and reliability of the data are ensured, and a solid foundation is laid for subsequent analysis. The compatibility of data between different systems and platforms is enhanced, which facilitates subsequent data sharing, integration and cross-platform applications. The Softmax classifier is used to fuse data from multiple data sources, which can intelligently integrate complementary information from different data sources, eliminate conflicts and contradictions between data, and form a more comprehensive, accurate and insightful tourist attraction data set.

[0163] See also Figure 3 , a structural diagram of a travel route planning system based on data analysis provided by an embodiment of the present invention, the system includes a data acquisition module, a data extraction module, a data analysis module, a route planning module and a real-time adjustment module, wherein,

[0164] The data collection module is used to collect initial tourist attraction data from multiple data sources, and perform data preprocessing on the collected initial tourist attraction data, and complete the data preprocessing through deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing in sequence to obtain the preprocessed tourist attraction data;

[0165] Specifically, this embodiment also includes:

[0166] The data capture submodule is used to collect data from multiple data sources and obtain data by calling API interfaces to obtain initial tourist attraction data of various places, where the data sources at least include online travel platforms, official travel websites and geographic information systems;

[0167] A deduplication processing submodule is used to perform deduplication processing on the collected initial tourist attraction data using a hash algorithm, and to remove outliers and missing values ​​from the deduplication data to obtain first tourist attraction data;

[0168] The standardization processing submodule is used to perform standardization processing on the first tourist attraction data, read and parse the standardized data, and decompose the standardized data into independent data values. The corresponding data set Q is:

[0169] ;

[0170] In the formula, q represents the data in the data set Q, Represents the nth data value of the mth channel;

[0171] The data fusion submodule is used to perform data fusion processing on the data in the data set Q based on the Softmax classifier, so as to fuse the data from multiple data sources to obtain the pre-processed tourist attraction data.

[0172] A data extraction module is used to perform clustering processing on the pre-processed tourist attraction data, and extract the tourist attraction feature data containing key factors from the pre-processed tourist attraction data, wherein the key factors at least include the number of tourists at the tourist attraction and the number of people that the tourist attraction can accommodate;

[0173] Specifically, this embodiment also includes:

[0174] The representation submodule is used to represent the data in each time period of the preprocessed tourist attraction data in the form of a window. Let the size of the window be w, and the data matrix of the time period be for: ,in Indicates Data points for a time period, Indicates Data points for a time period;

[0175] Gaussian distribution submodule is used to cluster each data matrix into K categories, assuming that the data in each data segment obeys a zero-mean Gaussian distribution, and obtain the corresponding inverse covariance matrix ;

[0176] Assignment submodule for inverse covariance matrices of K To solve the problem, the data segments are assigned to K categories and each data point has only one category. The objective function is:

[0177] ;

[0178] In the formula, represents the regularization parameter, Indicates The model parameter vector of the category, represents the 1-norm penalty of the Hadamard product, express The log-likelihood value from cluster i, Represents the loss function, which is used to measure the gap between the model prediction results and the true label. express The input feature vector at each time step, Indicates The predicted probability distribution corresponding to the category, represents the parameter for enforcing temporal consistency, represents an indicator function that checks whether adjacent points are assigned to the same cluster, Indicates that the value of the objective function is the minimum;

[0179] The screening submodule is used to repeat iterations until the clustering results converge and output clustering set parameters and inverse covariance matrix parameters to obtain a distribution set, and screen out scenic spot feature data containing key factors from the distribution set.

[0180] The data analysis module is used to use the Transformer model to analyze the busyness of the scenic spot and the flow trend of tourists based on the characteristic data of the scenic spot, and obtain the data analysis results;

[0181] Specifically, this embodiment also includes:

[0182] A conversion submodule, used to convert scenic spot feature data into time series data, where each time step contains one or more feature data;

[0183] The input submodule is used to input time series data into the Transformer model. After passing through the time embedding layer, the position encoding layer will add position information to the data and input it into the encoder-decoder;

[0184] The feature extraction submodule is used to extract and predict features using the encoder-decoder. The encoder encodes the input time series data and captures the long-distance dependencies and global features in the data through the multi-head self-attention mechanism. The decoder generates predictions of the busyness of scenic spots and the flow trend of tourists based on the output of the encoder to obtain data analysis results. The encoder-decoder consists of a multi-head self-attention mechanism and a feedforward neural network:

[0185] ;

[0186] In the formula, and Represents two different fully connected layers, and RELU represents the activation function.

[0187] The route planning module is used to obtain tourists' travel demand data and travel preference data, and combine the data analysis results to generate travel route planning information using the route optimization model and improved ant colony algorithm. The route optimization model is the CNN-LSTM-Attention model.

[0188] Specifically, this embodiment also includes:

[0189] The acquisition submodule is used to obtain tourists' travel demand data, travel preference data and data analysis results, integrate them to obtain input data, and input the input data into the path optimization model;

[0190] The extraction submodule is used to extract features from tourist data consisting of tourist demand data and tourism preference data through the superposition of the convolution layer, batch normalization layer and activation layer of the CNN network:

[0191] ;

[0192] In the formula, represents the tourist data sequence, where n represents the number of features of the tourist sequence, represents the convolution kernel, represents the length of the convolution kernel, Represents the position index of the convolution kernel, represents the batch normalization operation, Indicates activation operation. represents the pooling operation in the subsequence, Represents the feature sequence output by the CNN network;

[0193] The parsing submodule is used to parse the interdependence between the feature sequence output by the CNN network and the sequence data of the data analysis results through the LSTM network. Each unit structure of the LSTM network includes a cell state, a forget gate, an input gate, and an output gate:

[0194] The mathematical expression of the forget gate is as follows:

[0195] ;

[0196] In the formula, represents the forget gate; Represents the Sigmoid function; and Represent the forget gate weight and bias coefficient respectively; Represents the unit output at time t-1; Represents information input at time t;

[0197] The mathematical expression of the input gate is as follows:

[0198] ;

[0199] In the formula, Represents the input gate, which determines how many new candidate values will be added to the cell state, represents the new candidate value for the current time step, represents the cell state at the current time step, represents the weight matrix of candidate values, represents the bias term of the candidate value, represents the weight matrix of the input gate, represents the bias term of the input gate, represents the hyperbolic tangent activation function, which compresses any real value to the interval [-1, 1], represents the output of the forget gate;

[0200] The mathematical expression of the output gate is as follows:

[0201] ;

[0202] In the formula, represents the output of the output gate; Represents the weight matrix of the output gate; represents the bias term of the output gate, The hidden state vector at the current time step;

[0203] The normalization submodule is used to normalize the output of the LSTM network through the softmax function to generate weights, introduce the Attention mechanism for weighted aggregation, and obtain the weighted average result:

[0204] ;

[0205] In the formula, Represents that by applying the attention score The weights obtained by the function; Represents the output of the last hidden layer of the LSTM network. Indicates passing The score of each hidden layer output after function processing; Represents the value after weighted average summation; is the bias term, represents the weight matrix, represents the sequence length, Represents the position index in the sequence;

[0206] The optimization submodule is used to obtain multiple preliminary path planning results based on the weighted average results, and use the improved ant colony algorithm to optimize the path planning of the multiple preliminary path planning results to seek the optimal solution to generate travel path planning information. The improved ant colony algorithm is obtained by combining the GA algorithm, the ACA algorithm and the SA algorithm.

[0207] Specifically, the optimization submodule in this embodiment includes the following units:

[0208] The initialization unit is used to obtain multiple preliminary path planning results and initialize the data of each scenic spot in each preliminary path planning result:

[0209] ;

[0210] In the formula, Indicates attractions, Indicates Attractions , Indicates attractions, represents the aggregate quantity of route relationships between scenic spots, express indivual The corresponding path length, Indicates The adaptability of each attraction;

[0211] Probability calculation unit, used to calculate the selection probability using the roulette method :

[0212] ;

[0213] Select from the set of route relationships between attractions The scenic spots are cross-arranged, and the arranged scenic spots are taken as the new scenic spot sequence. The scenic spots in the new scenic spot sequence are randomly changed and mutated. After repeated selection, cross-arrangement and mutation of each scenic spot sequence, the optimal solution for planning the scenic spot route is obtained, and the optimal solution is used as the initial value of pheromone in the ACA-SA algorithm.

[0214] The optimal solution acquisition unit is used to utilize the initial value of the pheromone, continuously update the number of tourists visiting the path through the ACA algorithm, determine the number of tourists visiting each path, and seek the optimal solution after multiple cycles to generate tourism path planning information.

[0215] Specifically, the optimal solution acquisition unit in this embodiment includes the following units:

[0216] Update unit, used to initialize the number and position of ants. During the search process, ants will choose the next position based on pheromones and heuristic information. Each time after passing a path, the ants will release a certain amount of pheromones. When the ants complete the iteration, they will update the residual pheromones on the path. After the pheromones are updated, the ants will choose the next position based on the updated pheromones through the state transition probability. for:

[0217] ;

[0218] In the formula, Indicates that tourists k from scenic spots To the attractions The probability of express The pheromone concentration on each path at the moment, that is, the pheromone concentration represents the number of tourists passing through each path, express Attractions along each route at the time To the attractions Quality of service, indicates that tourist k expects to select a set of attractions next. Indicates the attractions on each route at the time To the destination The pheromone concentration, express Attractions along each route at the time To the destination Quality of service, represents the heuristic function, represents the number of tourists visiting two attractions. represents the length of the path constructed by tourists, represents the pheromone concentration, Indicates the service quality of scenic spots. Indicates the desired target attraction;

[0219] During the search process, if the ant's search enters a local optimal point and no better path is found, the SA algorithm is used to find the global optimal solution. The optimal path of the current ant colony algorithm is received as the initial solution, and a new solution is generated by perturbation. The difference in the objective function between the new solution and the old solution is calculated:

[0220] ;

[0221] In the formula, represents the function value of the new solution, represents the function value of the old solution;

[0222] The judgment unit is used to judge whether to accept the new solution based on the Metropolis criterion. Then accept the new solution, if Then the new solution is based on probability Acceptance is performed, T represents the annealing temperature;

[0223] At temperature T, repeat the perturbation and acceptance process and slowly lower the temperature until convergence, compare the results and update the pheromone. When the result obtained by the SA algorithm is better than the optimal solution of the ACA algorithm, the result obtained by the SA algorithm is converted into the pheromone of the ACA algorithm and the optimal solution is updated. When the result obtained by the SA algorithm is worse than the current optimal solution, continue to use the ACA algorithm for calculation until the maximum number of iterations is reached to seek the optimal solution to generate travel path planning information.

[0224] The real-time adjustment module is used to visually recommend travel route planning information to tourists, obtain user feedback information and real-time information of scenic spots in real time, and use the improved ant colony algorithm to provide real-time adjustments and suggestions.

[0225] Specifically, in this embodiment, user feedback information includes satisfaction evaluation of the recommended route, improvement suggestions, and user route selection information, and real-time scenic spot information includes current status information of the scenic spot, such as whether it is open, the flow of people, etc. Real-time adjustments and suggestions at least include suggestions on route rectification and recommended vehicles for the route, whether the scenic spot is suitable for multiple people to travel, etc.

[0226] The beneficial effects are that, through the implementation of the above scheme, 1. Data quality and reliability can be improved: by collecting initial tourist attraction data from multiple data sources, and performing pre-processing steps such as deduplication, outlier processing, missing value filling, standardization and data fusion, the integrity and accuracy of the attraction data can be improved. 2. Accurately identify the characteristics of attractions: through the application of clustering processing technology, the characteristic data of attractions including key factors such as the number of tourists and the number of people that the attractions can accommodate are effectively extracted, making the analysis of the busyness of attractions and the flow trend of tourists more accurate and detailed, which helps to understand the dynamics of the tourism market more comprehensively. 3. Intelligent prediction and analysis: using the Transformer model to analyze the busyness of attractions and the flow trend of tourists, not only improves the accuracy of prediction, but also can quickly respond to market changes and provide forward-looking guidance for tourism planning. 4. Ability to carry out personalized route planning for multiple tourists: combining the number of tourists' needs, preferences and data analysis results, through the advanced CNN-LSTM-Attention path optimization model and improved ant colony algorithm, personalized tourism route planning information is generated, which greatly improves the tourists' travel experience satisfaction and itinerary efficiency. 5. Real-time adjustment and optimization of the routes of multiple tourists: Through visual recommendation of travel route planning information, real-time collection of user feedback and real-time information of scenic spots, and dynamic adjustment of route planning using improved ant colony algorithm, it ensures that the planning scheme is always close to the actual needs of tourists and the actual situation of scenic spots, and realizes the flexibility and real-time nature of tourism planning.

[0227] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A travel route planning method based on data analysis, characterized in that: The travel route planning method based on data analysis comprises the following steps: Collecting initial tourist attraction data from various places from multiple data sources, performing data preprocessing on the collected initial tourist attraction data, and completing the data preprocessing by deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing in sequence to obtain preprocessed tourist attraction data; Performing clustering processing on the preprocessed tourist attraction data, extracting the tourist attraction feature data containing key factors from the preprocessed tourist attraction data, wherein the key factors at least include the number of tourists at the tourist attraction and the number of people that the tourist attraction can accommodate; Using the Transformer model to perform data analysis on the busyness of the scenic spot and the flow trend of tourists according to the characteristic data of the scenic spot, and obtaining data analysis results; Acquire tourist demand data and tourist preference data, and combine the data analysis results to generate tourist route planning information using a path optimization model and an improved ant colony algorithm, wherein the path optimization model is a CNN-LSTM-Attention model; Visually recommend the travel route planning information to tourists, obtain user feedback information and real-time information of scenic spots in real time, and use improved ant colony algorithm to provide real-time adjustments and suggestions; The tourist demand data and tourist preference data are obtained, and combined with the data analysis results, a path optimization model and an improved ant colony algorithm are used to generate tourist path planning information, including: Acquire tourist demand data, tourist preference data and data analysis results, integrate them to obtain input data, and input the input data into a path optimization model; The features of the tourist data consisting of tourist demand data and tourism preference data are extracted through the superposition of the convolution layer, batch normalization layer and activation layer of the CNN network: ; In the formula, represents the tourist data sequence, where n represents the number of features of the tourist sequence, represents the convolution kernel, represents the length of the convolution kernel, Represents the position index of the convolution kernel, represents the batch normalization operation, Indicates activation operation. represents the pooling operation in the subsequence, Represents the feature sequence output by the CNN network; The interdependence between the feature sequence output by the CNN network and the sequence data of the data analysis result is analyzed by the LSTM network, wherein each unit structure of the LSTM network includes a cell state, a forget gate, an input gate and an output gate: The mathematical expression of the forget gate is as follows: ; In the formula, represents the forget gate; Represents the Sigmoid function; and Represent the forget gate weight and bias coefficient respectively; Represents the unit output at time t-1; Represents information input at time t; The mathematical expression of the input gate is as follows: ; In the formula, Represents the input gate, which determines how many new candidate values will be added to the cell state, represents the new candidate value for the current time step, represents the cell state at the current time step, represents the weight matrix of candidate values, represents the bias term of the candidate value, represents the weight matrix of the input gate, represents the bias term of the input gate, represents the hyperbolic tangent activation function, which compresses any real value to the interval [-1, 1], represents the output of the forget gate; The mathematical expression of the output gate is as follows: ; In the formula, represents the output of the output gate; Represents the weight matrix of the output gate; represents the bias term of the output gate, The hidden state vector at the current time step; The output of the LSTM network is normalized by the softmax function to generate weights, and the Attention mechanism is introduced for weighted aggregation to obtain the weighted average result: ; In the formula, Represents that by applying the attention score The weights obtained by the function; Represents the output of the last hidden layer of the LSTM network. Indicates passing The score of each hidden layer output after function processing; Represents the value after weighted average summation; is the bias term, represents the weight matrix, represents the sequence length, Represents the position index in the sequence; Based on the weighted average result, multiple preliminary path planning results are obtained, and the improved ant colony algorithm is used to optimize the path planning of the multiple preliminary path planning results to seek the optimal solution to generate travel path planning information, wherein the improved ant colony algorithm is obtained by combining the GA algorithm, the ACA algorithm and the SA algorithm.

2. A travel route planning method based on data analysis as claimed in claim 1, characterized in that: The initial tourist attraction data of various places are collected from multiple data sources, and data preprocessing is performed on the collected initial tourist attraction data, and the data preprocessing is completed by deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing in sequence to obtain the preprocessed tourist attraction data, including: Capture data from multiple data sources and obtain data by calling an API interface to obtain initial tourist attraction data of various places, wherein the data sources at least include online travel platforms, official travel websites, and geographic information systems; Using a hash algorithm to perform deduplication processing on the collected initial tourist attraction data, and performing outlier removal processing and missing value processing on the deduplication data to obtain first tourist attraction data; The first tourist attraction data is standardized, the standardized data is read and parsed, and the standardized data is decomposed into independent data values. The corresponding data set Q is: ; In the formula, q represents the data in the data set Q, Represents the nth data value of the mth channel; Based on the Softmax classifier, data fusion processing is performed on the data in the data set Q to fuse the data from multiple data sources to obtain pre-processed tourist attraction data.

3. A travel route planning method based on data analysis as claimed in claim 1, characterized in that: The clustering process is performed on the pre-processed tourist attraction data to extract the tourist attraction feature data containing key factors from the pre-processed tourist attraction data, including: The data in each time period of the preprocessed tourist attraction data is represented in the form of a window. Let the size of the window be w, and the data matrix of the time period be for: ,in Indicates Data points for a time period, Indicates Data points for a time period; Cluster each data matrix into K categories, assume that the data in each data segment obeys a zero-mean Gaussian distribution, and obtain the corresponding inverse covariance matrix ; For K inverse covariance matrices To solve the problem, the data segments are assigned to K categories and each data point has only one category. The objective function is: ; In the formula, represents the regularization parameter, Indicates The model parameter vector of the category, represents the 1-norm penalty of the Hadamard product, express The log-likelihood value from cluster i, Represents the loss function, which is used to measure the gap between the model prediction results and the true label. express The input feature vector at each time step, Indicates The predicted probability distribution corresponding to the category, represents the parameter for enforcing temporal consistency, represents an indicator function that checks whether adjacent points are assigned to the same cluster, Indicates that the value of the objective function is the minimum; Iterations are repeated until the clustering results converge and clustering set parameters and inverse covariance matrix parameters are output to obtain a distribution set, from which scenic spot feature data containing key factors are screened.

4. A travel route planning method based on data analysis as claimed in claim 1, characterized in that: According to the characteristic data of the scenic spot, the Transformer model is used to perform data analysis on the busyness of the scenic spot and the flow trend of tourists, and the data analysis results are obtained, including: Converting the scenic spot feature data into time series data, wherein each time step contains one or more feature data; The time series data is input into the Transformer model. After passing through the time embedding layer, the position encoding layer adds position information to the data and inputs it into the encoder-decoder. The encoder-decoder is used for feature extraction and prediction. The encoder encodes the input time series data and captures the long-distance dependencies and global features in the data through the multi-head self-attention mechanism. The decoder generates predictions of the busyness of scenic spots and tourist flow trends based on the output of the encoder to obtain data analysis results. The encoder-decoder consists of a multi-head self-attention mechanism and a feedforward neural network: ; In the formula, and Represents two different fully connected layers, and RELU represents the activation function.

5. A travel route planning method based on data analysis as claimed in claim 1, characterized in that: The method of obtaining a plurality of preliminary path planning results based on the weighted average result and optimizing the path planning of the plurality of preliminary path planning results by using an improved ant colony algorithm to seek an optimal solution to generate travel path planning information includes: Get multiple preliminary path planning results and initialize the data of each scenic spot in each preliminary path planning result: ; In the formula, Indicates attractions, Indicates Attractions , Indicates attractions, represents the aggregate quantity of route relationships between scenic spots, express indivual The corresponding path length, Indicates The adaptability of each attraction; Using the roulette method to calculate the selection probability p( ): ; Select from the set of route relationships between attractions The scenic spots are cross-arranged, and the arranged scenic spot set is used as a new scenic spot sequence. The scenic spots in the new scenic spot sequence are randomly changed and mutated. After repeated selection, cross-arrangement and mutation of each scenic spot sequence, the optimal solution of the planned scenic spot route is obtained, and the optimal solution is used as the initial value of pheromone in the ACA-SA algorithm. Using the initial value of pheromone, the ACA algorithm continuously updates the number of tourists on the path, determines the number of tourists on each path, and seeks the optimal solution after multiple cycles to generate tourism path planning information.

6. A method for planning a travel route based on data analysis as claimed in claim 5, characterized in that: The initial value of the pheromone is used to continuously update the number of tourists on the path through the ACA-SA algorithm, and the number of tourists on each path is determined. After multiple cycles, the optimal solution is sought to generate travel path planning information, including: Initialize the number and position of ants. During the search process, ants will choose the next position based on pheromones and heuristic information. Each time after passing a path, the ants will release a certain amount of pheromones. When the ants complete the iteration, they will update the residual pheromones on the path. After the pheromones are updated, the ants will choose the next position based on the updated pheromones through the state transition probability. for: ; In the formula, Indicates that tourists k from scenic spots To the attractions The probability of express The pheromone concentration on each path at the moment, that is, the pheromone concentration represents the number of tourists passing through each path, express Attractions along each route at the time To the attractions Quality of service, indicates that tourist k expects to select a set of attractions next. express Attractions along each route at the time To the destination The pheromone concentration, express Attractions along each route at the time To the destination Quality of service, represents the heuristic function, represents the number of tourists visiting two attractions. represents the length of the path constructed by tourists, represents the pheromone concentration, Indicates the service quality of scenic spots. Indicates the desired target attraction; During the search process, if the ant's search enters a local optimal point and no better path is found, the SA algorithm is used to find the global optimal solution. The optimal path of the current ant colony algorithm is received as the initial solution, and a new solution is generated by perturbation. The difference in the objective function between the new solution and the old solution is calculated: ; In the formula, represents the function value of the new solution, represents the function value of the old solution; Based on the Metropolis criterion, determine whether to accept the new solution. Then accept the new solution, if Then the new solution is based on probability Acceptance is performed, T represents the annealing temperature; At temperature T, repeat the perturbation and acceptance process and slowly lower the temperature until convergence, compare the results and update the pheromone. When the result obtained by the SA algorithm is better than the optimal solution of the ACA algorithm, the result obtained by the SA algorithm is converted into the pheromone of the ACA algorithm and the optimal solution is updated. When the result obtained by the SA algorithm is worse than the current optimal solution, continue to use the ACA algorithm for calculation until the maximum number of iterations is reached to seek the optimal solution to generate travel path planning information.

7. A travel route planning system based on data analysis, characterized in that: The travel route planning system based on data analysis includes a data acquisition module, a data extraction module, a data analysis module, a route planning module and a real-time adjustment module, wherein: The data collection module is used to collect initial tourist attraction data from multiple data sources in various places, and perform data preprocessing on the collected initial tourist attraction data, and complete the data preprocessing by deduplication processing, outlier removal processing, missing value processing, standardization processing and data fusion processing in sequence to obtain the preprocessed tourist attraction data; A data extraction module is used to perform clustering processing on the pre-processed tourist attraction data, and extract the tourist attraction feature data containing key factors from the pre-processed tourist attraction data, wherein the key factors at least include the number of tourists at the tourist attraction and the number of people that the tourist attraction can accommodate; A data analysis module, used to perform data analysis on the busyness of the scenic spot and the flow trend of tourists using a Transformer model according to the characteristic data of the scenic spot, and obtain data analysis results; A route planning module is used to obtain tourists' travel demand data and travel preference data, and combine the data analysis results to generate travel route planning information using a route optimization model and an improved ant colony algorithm, wherein the route optimization model is a CNN-LSTM-Attention model; A real-time adjustment module is used to visually recommend the travel route planning information to tourists, obtain user feedback information and real-time information of scenic spots in real time, and use an improved ant colony algorithm to provide real-time adjustments and suggestions; The acquisition submodule is used to obtain tourists' travel demand data, travel preference data and data analysis results, integrate them to obtain input data, and input the input data into the path optimization model; The extraction submodule is used to extract features from tourist data consisting of tourist demand data and tourism preference data through the superposition of the convolution layer, batch normalization layer and activation layer of the CNN network: ; In the formula, represents the tourist data sequence, where n represents the number of features of the tourist sequence, represents the convolution kernel, represents the length of the convolution kernel, Represents the position index of the convolution kernel, represents the batch normalization operation, Indicates activation operation. represents the pooling operation in the subsequence, Represents the feature sequence output by the CNN network; The parsing submodule is used to parse the interdependence between the feature sequence output by the CNN network and the sequence data of the data analysis results through the LSTM network. Each unit structure of the LSTM network includes a cell state, a forget gate, an input gate, and an output gate: The mathematical expression of the forget gate is as follows: ; In the formula, represents the forget gate; Represents the Sigmoid function; and Represent the forget gate weight and bias coefficient respectively; Represents the unit output at time t-1; Represents information input at time t; The mathematical expression of the input gate is as follows: ; In the formula, Represents the input gate, which determines how many new candidate values will be added to the cell state, represents the new candidate value for the current time step, represents the cell state at the current time step, represents the weight matrix of candidate values, represents the bias term of the candidate value, represents the weight matrix of the input gate, represents the bias term of the input gate, represents the hyperbolic tangent activation function, which compresses any real value to the interval [-1, 1], represents the output of the forget gate; The mathematical expression of the output gate is as follows: ; In the formula, represents the output of the output gate; Represents the weight matrix of the output gate; represents the bias term of the output gate, The hidden state vector at the current time step; The normalization submodule is used to normalize the output of the LSTM network through the softmax function to generate weights, introduce the Attention mechanism for weighted aggregation, and obtain the weighted average result: ; In the formula, Represents that by applying the attention score The weights obtained by the function; Represents the output of the last hidden layer of the LSTM network. Indicates passing The score of each hidden layer output after function processing; Represents the value after weighted average summation; is the bias term, represents the weight matrix, represents the sequence length, Represents the position index in the sequence; The optimization submodule is used to obtain multiple preliminary path planning results based on the weighted average results, and use the improved ant colony algorithm to optimize the path planning of the multiple preliminary path planning results to seek the optimal solution to generate travel path planning information. The improved ant colony algorithm is obtained by combining the GA algorithm, the ACA algorithm and the SA algorithm.

8. A travel route planning system based on data analysis as claimed in claim 7, characterized in that: The data acquisition module includes a data capture submodule, a deduplication processing submodule, a standardization processing submodule and a data fusion submodule, wherein: The data capture submodule is used to collect data from multiple data sources and obtain data by calling an API interface to obtain initial tourist attraction data of various places, wherein the data sources at least include online travel platforms, official travel websites and geographic information systems; A deduplication processing submodule is used to perform deduplication processing on the collected initial tourist attraction data using a hash algorithm, and to remove outliers and missing values ​​from the deduplication data to obtain first tourist attraction data; The standardization processing submodule is used to perform standardization processing on the first tourist attraction data, read and parse the standardized data, and decompose the standardized data into independent data values. The corresponding data set Q is: ; In the formula, q represents the data in the data set Q, Represents the nth data value of the mth channel; The data fusion submodule is used to perform data fusion processing on the data in the data set Q based on the Softmax classifier, so as to fuse the data from multiple data sources to obtain the pre-processed tourist attraction data.

9. A travel route planning system based on data analysis as claimed in claim 7, characterized in that: The data extraction module includes a representation submodule, a Gaussian distribution submodule, a distribution submodule and a screening submodule, wherein: The representation submodule is used to represent the data in each time period of the preprocessed tourist attraction data in the form of a window. Let the size of the window be w, and the data matrix of the time period be for: ,in Indicates Data points for a time period, Indicates Data points for a time period; Gaussian distribution submodule is used to cluster each data matrix into K categories, assuming that the data in each data segment obeys a zero-mean Gaussian distribution, and obtain the corresponding inverse covariance matrix ; Assignment submodule for inverse covariance matrices of K To solve the problem, the data segments are assigned to K categories and each data point has only one category. The objective function is: ; In the formula, represents the regularization parameter, Indicates The model parameter vector of the category, represents the 1-norm penalty of the Hadamard product, express The log-likelihood value from cluster i, Represents the loss function, which is used to measure the gap between the model prediction results and the true label. express The input feature vector at each time step, Indicates The predicted probability distribution corresponding to the category, represents the parameter for enforcing temporal consistency, represents an indicator function that checks whether adjacent points are assigned to the same cluster, Indicates that the value of the objective function is the minimum; The screening submodule is used to repeat iterations until the clustering results converge and output clustering set parameters and inverse covariance matrix parameters to obtain a distribution set, and screen out scenic spot feature data containing key factors from the distribution set.