A tourist hotspot city prediction method and system
By using multi-source data fusion and multi-scale dynamic city relationship graphs, the problems of single data and model lag in the prediction of popular tourist cities are solved, and highly accurate and interpretable prediction results are achieved, which can meet the needs of tourism popularity prediction in multiple scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TOURISM COLLEGE OF ZHEJIANG
- Filing Date
- 2026-03-30
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies for predicting popular tourist cities suffer from problems such as a single data source, insufficient modeling of inter-city relationships, lack of interpretability of prediction results, and lagging model updates, resulting in insufficient prediction accuracy and real-time performance.
We employ multi-source data fusion modeling, combining multi-scale urban relationship dynamic graphs and multi-task prediction networks. By collecting data from social media, online tourism, transportation, and meteorology, we construct multimodal feature vectors, utilize graph convolution and hybrid attention mechanisms to represent cities, and perform multi-task prediction and visualization interpretation.
It improves the accuracy and foresight of tourism hotspot city forecasts, realizes unified modeling of multi-source data and online model updates, and enhances the interpretability and stability of forecast results.
Smart Images

Figure CN122334579A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, particularly to the field of big data analysis and machine learning technology, and more specifically, to a method and system for predicting popular tourist cities. Background Technology
[0002] With the rapid development of short video platforms, social media, and online travel platforms, some cities have quickly become so-called "tourist hotspots" thanks to online dissemination, characterized by rapid growth in tourist numbers and a rapid increase in city awareness within a short period. Existing technologies for analyzing and predicting urban tourism popularity mainly include the following categories: 1. Trend forecasting methods based on a single indicator This type of research primarily uses single time-series data such as historical tourist volume, hotel occupancy rates, or search indices to predict urban tourism popularity using traditional time-series models such as linear regression, ARIMA, and autoregressive moving average. While these methods are simple to implement and computationally inexpensive, they are less robust to non-stationary, high-noise data environments, sensitive to noise, and cannot characterize the impact of unstructured content on potential tourists' travel decisions.
[0003] 2. Hotspot Analysis Methods Based on Social Media This approach uses interactive metrics such as views, likes, comments, and shares from short video platforms or social networks to construct an evaluation system that quantifies and ranks the "online popularity" of cities or attractions, thereby identifying popular destinations. However, this method has significant data limitations: firstly, it relies solely on internal platform data and does not comprehensively consider external information such as flight and hotel booking data, transportation data, and weather data; secondly, this method is mostly limited to static descriptive analysis of current popularity and lacks predictive modeling of a city's potential for future "viral" growth and its future trends.
[0004] 3. Machine Learning-Based Tourism Demand Forecasting Methods Existing technologies also employ machine learning models such as neural networks, support vector machines, and random forests to predict tourism demand or visitor flow in specific cities or scenic areas. These methods are generally aimed at a single city or scenic area, focusing on predicting visitor flow figures. They have certain advantages in handling nonlinear relationships; however, their application scenarios are mostly limited to single spatial nodes, and they do not adequately consider the mutual influence between cities. They fail to effectively model the complex interactions between cities in terms of tourism flow migration, geographical relationships, and brand linkages, making it difficult to identify potentially explosive "emerging tourism hotspot cities" in advance.
[0005] In summary, existing technologies generally have the following shortcomings and deficiencies in predicting popular tourist cities: Limited data sources and limited information dimensions: Most solutions rely on only single-dimensional data (such as historical visitor flow or behavioral data from a single platform), failing to achieve deep integration of heterogeneous data across platforms and modalities, resulting in an incomplete portrayal of the city's tourism attractiveness.
[0006] Insufficient modeling of inter-city relationships and propagation effects: Cities are strongly coupled in terms of geographical location, transportation network, and tourist migration paths. Current technology often treats cities as spatially independent individuals for prediction, failing to utilize the urban network structure to explore the regional linkage effect and spatial spillover effect of heat between cities.
[0007] Lack of model interpretability: Although some deep learning methods can improve prediction accuracy to a certain extent, the feature weights inside their models are not transparent, and they cannot provide a clear explanation of "why the city is predicted to become a tourist hotspot", which is not conducive to targeted resource allocation and operation strategy optimization in relevant application scenarios.
[0008] Lagging response to trend changes: Existing methods lack a mechanism to promptly incorporate new data and quickly update models in response to sudden surges in urban activity caused by emergencies or major events, resulting in predictions that lag significantly behind actual trends over time.
[0009] Therefore, there is an urgent need to propose a method and system for predicting tourism hotspot cities that can integrate multi-source heterogeneous data, deeply characterize the relationships between cities, be interpretable, and support online data updates, so as to improve the accuracy, real-time performance, and foresight of predictions of future tourism hotspot cities. Summary of the Invention
[0010] This invention addresses the technical problems of existing technologies, such as single data sources, insufficient modeling of inter-city relationships, lack of interpretability of prediction results, and lagging model updates. It proposes a method and system for predicting tourism hotspot cities. By fusing and modeling multi-source data related to urban tourism, and combining multi-scale dynamic maps of urban relationships and multi-task prediction networks, it can predict potential tourism hotspot cities within a preset time window and output the key factors affecting the prediction results, providing technical support based on the prediction results for related applications.
[0011] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for predicting popular tourist cities, comprising the following steps: S1: Collect multi-source data, including social media behavior data, search popularity data, online travel booking data, transportation passenger data, and external environmental data such as weather, holidays, and events; S2: By performing deduplication, outlier detection and correction, missing value filling, temporal resampling and spatial aggregation on the multi-source data, city-time window level standardized data can be obtained; S3: Construct multimodal features based on the city-time window level standardized data. Specifically, the construction of multimodal features involves first extracting single modal features separately, and then concatenating and standardizing the single modal features into a multimodal feature vector of a unified dimension. S4: Using cities as nodes, construct a weighted directed graph based on the multimodal feature vectors, calculate the dynamic edge weights of the fusion feature similarity to obtain the final edge weights, and construct a multi-scale dynamic graph of city relationships and the corresponding dynamic edge weights based on the weighted directed graph and the final edge weights. S5: The multimodal feature vector is used as node input and the multi-scale urban relationship dynamic graph is used as structural input. The basic graph convolution node is updated, and a hybrid attention mechanism is introduced to obtain modal attention weights and spatial attention weights, as well as node representations based on spatial attention. Then, the node representations of the multi-scale subgraphs are fused to obtain the final urban representation that integrates its own features and neighboring urban information. S6: Perform multi-task joint prediction on the final city representation to obtain the predicted value of tourism popularity index, the result of the determination of tourism hot cities, and the prediction result of the popularity change trend. Complete the model training through the weighted loss function, estimate the uncertainty of the prediction results, and output the prediction confidence. S7: Visualize the predicted value of the tourism popularity index, the results of the determination of tourism hotspot cities, the predicted results of the trend of popularity change, the prediction confidence, the modal attention weight, and the spatial attention weight, and finally obtain the tourism hotspot city prediction visualization results with explanatory information. S8: Calculate the gradient of the current model parameters based on the weighted loss function, and then perform incremental training and update of the model parameters using the gradient descent method. The updated model parameters are then used for the next prediction process.
[0012] Furthermore, the extraction of single-modal features in step S3 includes: text feature extraction, time series feature extraction, and spatial and structured feature extraction, resulting in aggregated text feature vectors, time series feature vectors, spatial feature vectors, and structured feature vectors; the standardization specifically refers to linear transformation and layer normalization.
[0013] Furthermore, in step S4, The mathematical expression for the weighted directed graph is: ;in, Let V be a weighted directed graph corresponding to time t, and let V be the set of city nodes. Let be the set of edges at time t. Let be the set of edge weights at time t; The dynamic edge weights for calculating the fusion feature similarity are obtained by first calculating the basic edge weights. : Where α, β, γ, and δ are adjustable weighting coefficients. Let be the geographical distance between cities i and j; Let be the frequency of transportation services in cities i and j within time t; The historical proportion of tourist flows from city i to city j within time t; e is a natural constant; Then, the cosine similarity of multimodal features between cities is calculated to obtain the cosine similarity calculation function. : ;in, The dot product of the multimodal feature vectors of the two cities; , These are the magnitudes of the two eigenvectors, respectively. Then the basic edge weights With the cosine similarity calculation function The fusion is performed to obtain the final edge weights of cities i and j at time t based on their fusion feature similarity. : The multi-scale urban relationship dynamic graph specifically includes: a short-term subgraph based on data from the past week, a medium-term subgraph based on data from the past month, and a long-term subgraph based on data from the past three months.
[0014] Furthermore, in step S5, the node update formula for updating the convolutional nodes of the base graph is: ;in, For city i at time t, the first +1 layer node representation; For city i at time t, the first The node representation of the layer; σ is the non-linear activation function; , For the first The learnable parameter matrix of the layer; Let i be the set of neighboring cities; For city i, the neighboring city j at time t, the Layer node representation; The hybrid attention mechanism includes modal attention and spatial attention. Modal attention weights are used to calculate weight coefficients for four types of features: text, time series, spatial, and structured features. Spatial attention weights are used to calculate weight coefficients for edges between different neighboring cities.
[0015] Furthermore, the uncertainty estimation in step S6 specifically involves: calculating the prediction variance using the Monte Carlo Dropout method, and outputting the prediction confidence level based on the prediction variance.
[0016] Furthermore, in step S6, the weighted loss function is the weighted sum of the losses from the three tasks, and the formula is: ;in, For weighted loss functions; , , The loss weights for each task; This is the mean squared error loss function, used for regression tasks; This is the cross-entropy loss function, used for classification tasks; , , These are the real labels corresponding to the three tasks.
[0017] Secondly, the present invention provides a tourism hotspot city prediction system, comprising: (1) Data collection module, used to collect social media behavior data, search popularity data, online travel booking data, transportation passenger data, and external environmental data such as weather, holidays, and events related to the city; (2) Data preprocessing module, used to perform deduplication, cleaning, missing value filling, time resampling and city aggregation on the collected data; (3) Multimodal feature extraction module, used to extract corresponding features from text data, time series data, spatial data and structured data, and to perform splicing, linear transformation and normalization on the extracted multimodal features to obtain the multimodal feature vectors of each city in each time window; (4) Multi-scale city relationship graph construction module, which is used to establish edge connections between city pairs that meet preset conditions based on the geographical proximity, traffic connectivity and historical tourist flow ratio between cities, and to calculate edge weights according to preset formulas to construct a dynamic city relationship graph. (5) Prediction model module, which is used to input multimodal feature vectors and urban relationship dynamic graphs into dynamic graph neural network and multi-task prediction network, generate urban tourism popularity prediction results and / or tourism hot spot city determination results within the target time window, and perform uncertainty estimation; (6) Results interpretation and display module, used to display the city heat prediction results and the key influencing factors and neighboring city interpretation information based on attention weight in a visual manner; (7) Model update module, used to perform periodic incremental training or parameter fine-tuning of the prediction model based on newly collected data.
[0018] Furthermore, the prediction model module adopts a graph attention network structure and also includes a fusion module for multi-scale subgraphs to enhance the modeling ability of inter-city propagation effects.
[0019] Thirdly, the present invention also provides an electronic device, including a memory and a processor, characterized in that the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the tourism hotspot city prediction method.
[0020] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the method for predicting popular tourist cities.
[0021] Compared with the prior art, the beneficial effects of the present invention are reflected in the following aspects: (1) To realize unified modeling of multi-source heterogeneous data, improve the completeness and robustness of urban feature representation, and solve the problem of incomplete characterization by a single data source; (2) Use multi-scale urban relationship dynamic maps to depict the spatial and propagation relationships between cities, thereby improving the accuracy of hotspot city identification and the lead time for prediction; (3) By using modal attention and spatial attention mechanisms, the contribution of different features and neighboring cities is quantified to improve the interpretability of model prediction results; (4) By using multi-task joint learning and uncertainty estimation, the prediction error of a single task is reduced, and the stability and reliability of the prediction results are improved. (5) By using a sliding time window and incremental training mechanism, the model can be updated online, thereby improving the model's response speed to new data and sudden events; (6) Compared with traditional time series and static machine learning models, it has significantly improved the accuracy and recall of predicting popular tourist cities, and is suitable for predicting the popularity of tourism in multiple scenarios. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the overall architecture of the tourism hotspot city prediction system; Figure 2 This is a flowchart illustrating the method for predicting popular tourist cities; Figure 3 It is a schematic diagram of the structure for constructing a multi-scale dynamic map of urban relationships; Figure 4 This is a schematic diagram of a prediction model structure that integrates multimodal features and dynamic graph neural networks; Figure 5 This is a diagram illustrating the visualization of attention weights and the interpretation of the results; Figure 6 This is a schematic diagram of the structure of the electronic device of the present invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] It should be noted that, unless otherwise specified, the features in the following embodiments and implementations can be combined with each other. The following embodiments are used to further illustrate the present invention, but should not be construed as limiting the scope of protection of the present invention.
[0025] Firstly, this invention provides a method for predicting popular tourist cities. Figure 1 This is a schematic diagram of the overall architecture of the tourism hotspot city prediction system, illustrating the overall system support architecture for the implementation of the method. Figure 2 This is a flowchart illustrating a method for predicting popular tourist cities. This method is implemented with a weekly time window granularity, denoted as week t as time step t. The specific steps include: S1: Acquisition and storage of multi-source heterogeneous data This step directly collects raw data from various data source interfaces to build a comprehensive urban tourism data pool, solving the problems of scattered multi-source data and lack of unified indexing, and providing raw data support for subsequent data processing and model training.
[0026] Within a preset time range (set to the past 24 months in this embodiment), raw data is collected using "city-time window" as the basic granularity and various numerical indicators such as social media data, search popularity data, online travel platform data, traffic data, and external environment data. The raw data specifically includes: (1) Social media data: Weekly interaction metrics of short video or text content related to the city, including weekly aggregated data such as play count, like count, comment count, share count, and topic participation; (2) Search popularity data: Search engine retrieval index related to city name and core scenic spot keywords; (3) Data from online travel platforms: number of views, orders, and transactions for city-related travel products such as air tickets, train tickets, and hotels; (4) Traffic data: weekly passenger volume and frequency of trains at transportation hubs such as the city's airports and high-speed rail stations; (5) External environment data: city weather conditions (temperature, rainfall), holiday information, major event information.
[0027] The above multi-source raw data will be identified by city identifiers. A joint index is created with time step t to obtain the index. The multi-source heterogeneous original time-series data, indexed together with time step t, are stored in the time-series database.
[0028] S2: Data Cleaning and Spatiotemporal Alignment To address the issues of heterogeneous multi-source data, inconsistent spatiotemporal granularity, noise, and missing values, this step focuses on... The multi-source heterogeneous raw time-series data, indexed together with time step t, is executed sequentially according to the following steps. Subsequent steps can only be executed after the preceding steps are completed, ultimately yielding standardized city-time window level data. The specific steps include: (1) Deduplication: based on Delete duplicate data records at time step t; (2) Outlier detection and correction: The 3σ principle is used to detect and identify outliers in numerical data, and values that exceed the 3σ range are smoothed by using the mean of adjacent time steps; (3) Missing value filling: Numerical data is filled using linear interpolation, categorical data is filled using the mode, and text data is filled by directly deleting empty records; (4) Time resampling: The original daily / hourly data are uniformly resampled to the weekly scale, and the weekly mean or weekly sum is taken for the daily data; (5) Spatial aggregation: Attraction-level and business district-level data are aggregated to the city level through administrative division coding.
[0029] The above processing yields cleaned and aligned city-time window-level standardized data.
[0030] S3: Multimodal Feature Construction and Fusion This step extracts city tourism-related features from multiple dimensions, solving the problem that a single feature cannot fully characterize the city, and maps city tourism information from different dimensions to the same vector space, providing standardized high-dimensional features for subsequent city node representation.
[0031] For the cleaned and aligned city-time window-level standardized data, single-modal features are first extracted separately, and then all modal features are concatenated and standardized into a feature vector of a uniform dimension, as follows: S3.1: Extracting Single-Modal Features (1) Text feature extraction Let the set of texts collected by city c in week t be... The text feature vector is extracted for each text using a pre-trained language model (BERT in this embodiment). :
[0032] in, This represents the i-th text data entry for city c within time window t, including comment text, travel guide text, and short video title; A fixed dimension for the output vector of the pre-trained language model; The dimension is The real vector space.
[0033] Then, for all text feature vectors Perform average pooling to obtain the aggregated text feature vector of city c within time window t. :
[0034] Where n is the total number of valid text data for city c within the time window t.
[0035] (2) Time series feature extraction For time series data of various numerical indicators collected by S1, such as social media data, search popularity data, online travel platform data, and traffic data, let the time series of a certain indicator be... Statistical features are extracted within a sliding window of length N (N=4 in this example), and the average value of the indicator within the sliding window is... :
[0036] in, This represents the value of a certain indicator for city c at the k-th time step k within the sliding window; N is the length of the sliding time window; and t is the current baseline time window.
[0037] Then, the standard deviation of this indicator within the sliding window is extracted for city c over time window t. This is used to reflect the degree of fluctuation of the indicator, and its mathematical expression is:
[0038] Next, calculate the relative growth rate of this indicator for city c within the time window t, within the sliding window. ;
[0039] Where ε is a minimal constant to prevent division by zero errors, and in this embodiment, ε is taken as 1e-6; max() is the function to take the maximum value.
[0040] The statistical characteristics of multiple indicators are concatenated to form the time series feature vector of city c within time window t. :
[0041] Where M is the total number of time series indicators included in the statistics; , , These represent the mean, standard deviation, and growth rate of the sliding window corresponding to the m-th indicator. .
[0042] (3) Spatial and structured feature extraction Let the latitude and longitude coordinates of city c be... The set of cities that have direct high-speed rail or flight connections with it is For any adjacent city pair Define the straight-line geographical distance between city c and city j. :
[0043] GeoDistance() is a standard function for calculating the distance between two points on the Earth's surface based on latitude and longitude. , Let C be the latitude and longitude of city C. , Let J be the latitude and longitude of city J.
[0044] set up This represents the frequency of round-trip transportation between city c and city j per unit of time. For historical tourist flow ratio data, i.e., the proportion of tourists flowing from city c to city j in historical data; construct a spatial feature vector for city c. : Where Σ is the summation function; min(·) and max(·) are the minimum and maximum value functions, respectively.
[0045] Structured features include basic urban statistical indicators such as permanent resident population, annual GDP, number of A-level scenic spots, and historical annual tourist volume. The structured feature vector is denoted as... .
[0046] S3.2 Multimodal Feature Fusion The above , , , By concatenating the vectors, we obtain the initial multimodal concatenation vector of city c within time window t. :
[0047] The spliced vector is obtained through linear transformation and layer normalization. Mapping to a feature space of uniform dimension d, we obtain the final multimodal feature vector of city c within time window t. :
[0048] in, ( ) is the layer normalization function, used to improve the stability of model training; Let be the linear transformation weight matrix, and D be the total dimension of the concatenated vector; This is the bias term for the linear transformation.
[0049] S4: Construction of Multi-Scale Urban Relationship Dynamic Map This step, to characterize the spatial connections between cities and the propagation effects at different time scales, is based on the multimodal feature vectors output by S3. The output of S3 includes data on intercity round-trip transportation frequency and historical tourist flow ratios, as well as the city geographic straight-line distances collected by S1 and preprocessed by S2; a graph structure reflecting the dynamic relationships between cities is constructed to provide structural input for subsequent graph neural network training; including the following steps: S4.1: Construct a weighted directed graph Using the city set V as the node set, construct a weighted directed graph that changes over time. :
[0050] Where V is the set of city nodes. Let be the set of edges at time t. Let be the set of edge weights at time t.
[0051] For any pair of cities (i, j), if any of the following conditions are satisfied, then a directed edge (i, j) ∈ [the city pair] is constructed in the graph at time t. : Condition 1: There is a direct high-speed rail or flight between the two cities, and the weekly frequency of service is [high / frequent]. Greater than the first threshold This embodiment Once per week; Condition 2: Proportion of historical tourist flows Greater than the second threshold This embodiment .
[0052] S4.2: Calculate the dynamic edge weights for fusion feature similarity First, calculate the basic edge weights of cities i and j at time t. :
[0053] Wherein, α, β, γ, and δ are adjustable weighting coefficients, and in this embodiment, α=0.3, β=0.001, γ=0.4, and δ=0.3, respectively; Let be the geographical distance between cities i and j; Let be the frequency of transportation services in cities i and j within time t; Let be the proportion of historical tourist flows from city i to city j within time t; e is a natural constant.
[0054] Then, the cosine similarity of multimodal features between cities is calculated to obtain the cosine similarity calculation function. :
[0055] in, The dot product of the multimodal feature vectors of the two cities; , These are the magnitudes of the two eigenvectors.
[0056] Then the basic edge weights With the cosine similarity calculation function The fusion is performed to obtain the final edge weights of cities i and j at time t based on their fusion feature similarity. :
[0057] It integrates geographical, transportation, tourist flow, and feature similarity information.
[0058] S4.3: Constructing Multi-Scale Subgraphs Weighted directed graph built on S4.1 The basic framework and the final dynamic edge weights calculated by S4.2 are used to construct short-term subgraphs using corresponding data from the past week, the past month, and the past three months, respectively. Mid-term subgraph Long-term subgraph The specific construction method is as follows: 1. Short-term subgraph Based on the frequency of transportation services, the proportion of tourist flows, and the similarity of multimodal features over the past week, edges are established according to the edge connection rules in S4.1, and the weights of the corresponding edges are calculated according to the formula in S4.2 to capture the rapid spread effect of recent popularity between cities. 2. Mid-term subgraph Based on the corresponding data from the past month, the same rules were used to construct a system that balances the impact of recent fluctuations and historical correlations between cities. 3. Long-term subgraph Based on the corresponding data from the past three months, and constructed according to the same rules, stable long-term structural relationships between cities are captured.
[0059] Figure 3 It is a structural diagram of the construction of a multi-scale urban relationship dynamic map, in which the short-term subgraph emphasizes the rapid spread effect of recent popularity, the medium-term subgraph balances the influence of recent fluctuations and historical connections, and the long-term subgraph captures the stable long-term structural connections between cities.
[0060] This step ultimately yields a multi-scale dynamic graph of urban relationships (including short-term, medium-term, and long-term subgraphs) and corresponding dynamic edge weights. .
[0061] S5: City Representation Learning Based on Multi-Scale Dynamic Graph Neural Network This step is based on the multimodal feature vector output by S3. S4 outputs a multi-scale dynamic graph of urban relationships and dynamic edge weights. This study utilizes graph neural networks to achieve multi-layered aggregation of city-specific features and features from neighboring cities. A hybrid attention mechanism is introduced to provide learnable weights for subsequent result interpretation, ultimately yielding a city node representation that integrates multi-dimensional information. The specific steps include: S5.1: Basic Graph Convolution Node Update An L-layer graph neural network is used to update the features of city nodes (L=3 in this embodiment). The update formula for the node representation of city i at time t is:
[0062] in, For city i at time t, the first +1 layer node representation; For city i at time t, the first The node representation of the layer; σ is a non-linear activation function, and the ReLU function is used in this embodiment; , For the first The learnable parameter matrix of the layer; Let i be the set of neighboring cities; The dynamic edge weights calculated for S4; For city i, the neighboring city j at time t, the Layer node representation.
[0063] S5.2: Introducing a hybrid attention mechanism Modal attention: This approach assigns learnable attention weights to four types of features: text, time series, spatial, and structured features. It addresses the issue of different modalities contributing differently to the prediction results. The calculation formula is as follows:
[0064] Where the superscript ⊤ denotes the transpose operation of a vector, q is the learnable query column vector, and q⊤ is its row vector transpose. Let be the attention weight for the m-th modality feature; Let be the global feature vector of the m-th modality; exp(·) is the exponential function; the summation term is the summation of the exponential values over all modes m'.
[0065] Based on the modal attention weights, the initial node representation for fused modal attention is obtained. :
[0066] in, This is the initial node representation after fusing modal attention.
[0067] Spatial attention (graph attention): Assign learnable attention weights to edges of different neighboring cities to address the issue of varying degrees of influence of different neighboring cities on the target city. The calculation formula is as follows:
[0068] in, Let be the attention coefficients of cities i and j at time t; LeakyReLU is the ReLU activation function with leakage; a is the learnable attention vector; W is the learnable weight matrix; , For cities i and j in the first place Layer node representation; This is a vector concatenation operation.
[0069] Then, the attention coefficient is normalized:
[0070] in, Let be the normalized spatial attention weights of cities i and j at time t; k is any neighboring city of city i.
[0071] The node update formula after introducing spatial attention is:
[0072] S5.3: Multi-scale Subgraph Fusion The node representations learned from the short-term, medium-term, and long-term subgraphs are concatenated to obtain the final city representation that integrates its own characteristics and information from neighboring cities. Where i is the unique node number of the target city, t is the current baseline time window, and L is the total number of layers in the dynamic graph neural network; refers to the final node representation of the target city with node number i after multi-layer feature aggregation of the L-layer graph neural network under the time window t.
[0073] Figure 4 This is a schematic diagram of a prediction model structure that integrates multimodal features and dynamic graph neural networks. It shows the complete model architecture from the input layer to the multi-task prediction head, which integrates multimodal features and multi-scale graph neural networks, and introduces a hybrid attention mechanism to achieve adaptive learning of feature weights.
[0074] S6: Multi-task forecasting and uncertainty estimation This step represents the final city representation output by S5. This method enables multi-task joint prediction of tourism popularity index, hotspot city identification, and popularity trend analysis, while simultaneously estimating the uncertainty of the prediction results to improve the reliability and robustness of the model. The steps include: S6.1: Multi-task joint prediction A multi-task joint learning structure is employed in the prediction head network to simultaneously perform predictions for three tasks: Task 1 (Regression Task): Tourism Popularity Index Prediction Predicted tourism popularity index for city i over the next T time windows The mathematical expression is as follows:
[0075] in, T represents the lead time for forecasting, which can be set from 1 to 4 weeks depending on the needs. The regression subnetwork is implemented by two fully connected layers.
[0076] Task 2 (Binary Category Task): Identifying Popular Tourist Cities The probability that city i will become a popular tourist destination in the next T time window. The mathematical expression is as follows:
[0077] Where σ is the Sigmoid activation function; u is the learnable weight vector; and b is the bias term.
[0078] The probability of being a popular tourist city When the threshold value is greater than the preset threshold (0.5 in this embodiment), the city is identified as a popular tourist city, and the result of the tourist hotspot city identification is output.
[0079] Task 3 (Three-category Task): Predicting Trends in Popularity (Increasing / Decreasing / Stable) Probability distribution of the trend of city i's popularity over the next T time windows The mathematical expression is as follows:
[0080] Where softmax is the normalized exponential function; V is the learnable weight matrix; and c is the bias term.
[0081] The above formula can be used to obtain the prediction result of the heat change trend.
[0082] S6.2: Calculation of Weighted Loss Function Weighted loss function The weighted sum of the losses from the three tasks enables multi-task collaborative learning, and the formula is as follows:
[0083] in, For weighted loss functions; , , As for the loss weights for each task, this embodiment takes respectively... , , MSE(·) is the mean squared error loss function, used for regression tasks; CE(·) is the cross-entropy loss function, used for classification tasks. , , These are the real labels corresponding to the three tasks.
[0084] Based on the aforementioned weighted loss function, the initial training of the model is completed through the backpropagation algorithm, yielding model parameters that can be used for prediction.
[0085] S6.3: Uncertainty Estimation The Monte Carlo Dropout method is used to calculate the prediction variance of the tourism popularity index of city i over the next T time windows. To quantify the uncertainty of prediction results and identify low-confidence predictions, the calculation formula is as follows:
[0086] Where M is the number of Monte Carlo samplings, and in this embodiment, M=50; This is the predicted value obtained from the m-th sampling. The mean of the predictions is the result of M samples.
[0087] Based on the predicted variance Output prediction confidence and prediction variance The larger the value, the higher the uncertainty and the lower the confidence level of the prediction result, and the lower the confidence level is. Low confidence warning is given for high variance samples.
[0088] S7: Results Interpretation and Visualization This step addresses the lack of interpretability in deep learning models by using the predicted city tourism popularity index output from S6 obtained earlier. Results of the determination of popular tourist cities Heat change trend prediction results and the corresponding prediction confidence level (derived from the prediction variance) Quantization), modal attention weights obtained from S5.2 Spatial attention weights This process transforms information into intuitive, visual data, providing a clear technical basis for relevant applications; it includes the following steps: S7.1: Identification of Key Influencing Factors Modal attention weights obtained from S5.2 The size of the feature modalities (text, time series, spatial, and structured) is used to sort them in descending order to obtain the top 3 feature modalities that contribute the most to the prediction results, forming a set of key influencing factors and identifying the core data source that the prediction results depend on most.
[0089] S7.2: Identification of Key Neighboring Cities Spatial attention weights obtained from S5.2 The size of the target city is used to sort all its neighboring cities in descending order to obtain the top 5 neighboring cities that have the greatest impact on the prediction results of the target city, forming a set of key neighboring cities and clarifying the core propagation relationship between cities.
[0090] S7.3: Visual Display The predicted value of the city tourism popularity index output by S6 Results of the determination of popular tourist cities p, Prediction results of heat change trend q. Prediction confidence (from (Quantification), and the set of key influencing factors obtained in S7.1, the set of key neighboring cities obtained in S7.2, and the corresponding modal attention weights. Spatial attention weights The results are visualized to provide a visual representation of predicted tourist hotspots with explanatory information.
[0091] Figure 5 This is a diagram illustrating the visualization of attention weights and the interpretation of the results, divided into two modules: The upper module is the feature modality and attention weight visualization area, which sequentially displays the attention weight ranking results of four types of features: text, time series, spatial, and structured, corresponding to the key influencing factor identification results in S7.1; The lower module is the area for displaying prediction results and explanatory information. It sequentially presents the results of the determination of tourist hot cities, the predicted value of the tourist popularity index, the prediction of the trend of popularity change, the prediction confidence level, as well as the core influencing factors and the explanatory information of key neighboring cities. It corresponds to the output results of S7.1 and S7.2 and the prediction results of S6, intuitively showing the core basis of the prediction results.
[0092] S8: Online Model Update This step addresses the issue of the model's lagging response to changes in tourism market trends, enabling the model to absorb the latest data in real time and adapt to changes in popularity brought about by trending events. A sliding time window mechanism is used for model updates, as detailed below: When the data for the new week Upon arrival, it is incorporated into the training dataset, based on the weighted loss function defined in S6.2. The loss function is calculated using the backpropagation algorithm of a neural network to obtain the current model parameters. gradient Then, the model parameters are incrementally updated using gradient descent, with the update formula being:
[0093] in, For the updated model parameters; These are the model parameters before the update; For the learning rate, this embodiment takes... ; This represents the gradient of the total loss function with respect to the model parameters. The total loss function defined in S6.2; This is data collected for the past week. Simultaneously set each Each time step (in this embodiment) The model is fully retrained every two months. The full retraining uses complete historical data from the past 24 months and completes the training process based on the total loss function of S6.2 to ensure the long-term predictive performance of the model. This step outputs the updated parameters for the tourism hotspot city prediction model. This parameter will be synchronized to the prediction model module for use in the next new tourism hotspot city prediction process, and will not be included in the output of this prediction result. Secondly, the present invention provides a system for predicting popular tourist cities.
[0094] Example 2: System Module Implementation This embodiment provides a tourism hotspot city prediction system. The system adopts a modular design and can be deployed in a cloud server or local cluster environment. Figure 1This is a schematic diagram of the overall architecture of the tourism hotspot city prediction system, showing the system's seven core modules and their data flow relationships. The functions, inputs, outputs, and steps of each module correspond one-to-one with the steps in the method implementation, as detailed below: 1. Data Acquisition Module By using interfaces from social media platforms, search engine indexes, online travel platforms, and public data, we collect multi-source, heterogeneous raw time-series data related to the city, providing raw data support for the data preprocessing module.
[0095] 2. Data Preprocessing Module The collected multi-source heterogeneous raw time-series data is deduplicated, outlier detected, missing value filled, time resampling and administrative division aggregation are performed to provide cleaned and aligned city-time window-level standardized data for the multimodal feature extraction module.
[0096] 3. Multimodal feature extraction module The system calls a pre-trained language model to extract text features, calculates time series statistical features based on time windows, constructs spatial and structured features, and performs feature standardization and linear transformation to obtain multimodal feature vectors for each city in each time window, providing feature inputs for the multi-scale city relationship map construction module and prediction model module.
[0097] 4. Multi-scale city relationship map construction module A multi-scale dynamic graph of urban relationships is constructed based on geographical location, transportation connectivity, and tourist flow, and edge weights are calculated to provide graph structure input for the prediction model module.
[0098] 5. Prediction Model Module The system enables the learning of urban node representations by a multi-scale dynamic graph neural network, outputs urban heat prediction results through a multi-task prediction network, and performs uncertainty estimation to provide core prediction data for the result interpretation and display module.
[0099] 6. Results Interpretation and Display Module A set of key influencing factors is generated based on hybrid attention weights and uncertainty indicators, and the city heat prediction results and their explanatory information are displayed in a visual manner, providing technical support for relevant application scenarios.
[0100] 7. Model Update Module The latest data is introduced according to a preset cycle or triggering condition to perform incremental training or full retraining of the model parameters. The updated parameters are then synchronized to the prediction model module to achieve online model updates and performance optimization.
[0101] The above seven modules are connected through a data bus or communication network to achieve orderly data flow and collaborative function implementation. They can be deployed in a distributed manner according to actual application scenarios to adapt to the forecasting needs of tourist hotspot cities of different sizes.
[0102] like Figure 6 As shown, this application provides an electronic device including a memory 101 for storing one or more programs and a processor 102. When the one or more programs are executed by the processor 102, they implement the method as described in any of the first aspects above.
[0103] The system also includes a communication interface 103. The memory 101, processor 102, and communication interface 103 are electrically connected directly or indirectly to each other to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used for signaling or data communication with other node devices.
[0104] The memory 101 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0105] The processor 102 can be an integrated circuit chip with signal processing capabilities. The processor 102 can be a general-purpose processor 102, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0106] In the embodiments provided in this application, it should be understood that the disclosed methods and systems can also be implemented in other ways. The method and system embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0107] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0108] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program thereon. When executed by processor 102, the computer program implements the methods described in any of the first aspects above. If the functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
Claims
1. A method for predicting popular tourist cities, characterized in that, Includes the following steps: S1: Collect multi-source data, including social media behavior data, search popularity data, online travel booking data, transportation passenger data, and external environmental data such as weather, holidays, and events; S2: By performing deduplication, outlier detection and correction, missing value filling, temporal resampling and spatial aggregation on the multi-source data, city-time window level standardized data can be obtained; S3: Construct multimodal features based on the city-time window level standardized data. Specifically, the construction of multimodal features involves first extracting single modal features separately, and then concatenating and standardizing the single modal features into a multimodal feature vector of a unified dimension. S4: Using cities as nodes, construct a weighted directed graph based on the multimodal feature vectors, calculate the dynamic edge weights of the fusion feature similarity to obtain the final edge weights, and construct a multi-scale dynamic graph of city relationships and the corresponding dynamic edge weights based on the weighted directed graph and the final edge weights. S5: The multimodal feature vector is used as node input and the multi-scale urban relationship dynamic graph is used as structural input. The basic graph convolution node is updated, and a hybrid attention mechanism is introduced to obtain modal attention weights and spatial attention weights, as well as node representations based on spatial attention. Then, the node representations of the multi-scale subgraphs are fused to obtain the final urban representation that integrates its own features and neighboring urban information. S6: Perform multi-task joint prediction on the final city representation to obtain the predicted value of tourism popularity index, the result of the determination of tourism hot cities, and the prediction result of the popularity change trend. Complete the model training through the weighted loss function, estimate the uncertainty of the prediction results, and output the prediction confidence. S7: Visualize the predicted value of the tourism popularity index, the results of the determination of tourism hotspot cities, the predicted results of the trend of popularity change, the prediction confidence, the modal attention weight, and the spatial attention weight, and finally obtain the tourism hotspot city prediction visualization results with explanatory information. S8: Calculate the gradient of the current model parameters based on the weighted loss function, and then perform incremental training and update of the model parameters using the gradient descent method. The updated model parameters are then used for the next prediction process.
2. The method according to claim 1, characterized in that, The extraction of single-modal features in step S3 includes: text feature extraction, time series feature extraction, and spatial and structured feature extraction, resulting in aggregated text feature vectors, time series feature vectors, spatial feature vectors, and structured feature vectors; the standardization specifically refers to linear transformation and layer normalization.
3. The method according to claim 1, characterized in that, In step S4 The mathematical expression for the weighted directed graph is: ;in, Let V be a weighted directed graph corresponding to time t, and let V be the set of city nodes. Let be the set of edges at time t. Let be the set of edge weights at time t; The dynamic edge weights for calculating the fusion feature similarity are obtained by first calculating the basic edge weights. : Where α, β, γ, and δ are adjustable weighting coefficients. Let be the geographical distance between cities i and j; Let be the frequency of transportation services in cities i and j within time t; The historical proportion of tourist flows from city i to city j within time t; e is a natural constant; Then, the cosine similarity of multimodal features between cities is calculated to obtain the cosine similarity calculation function. : ;in, The dot product of the multimodal feature vectors of the two cities; , These are the magnitudes of the two eigenvectors, respectively. Then the basic edge weights With the cosine similarity calculation function The fusion is performed to obtain the final edge weights of cities i and j at time t based on their fusion feature similarity. : The multi-scale urban relationship dynamic graph specifically includes: a short-term subgraph based on data from the past week, a medium-term subgraph based on data from the past month, and a long-term subgraph based on data from the past three months.
4. The method for predicting popular tourist cities according to claim 1, characterized in that, In step S5, the node update formula for updating the convolutional nodes of the base graph is: ;in, For city i at time t, the first +1 layer node representation; For city i at time t, the first The node representation of the layer; σ is the non-linear activation function; , For the first The learnable parameter matrix of the layer; Let i be the set of neighboring cities; For city i, the neighboring city j at time t, the The layer's node representation; the hybrid attention mechanism includes modal attention and spatial attention, wherein modal attention weights are used to calculate weight coefficients for four types of features: text, time series, spatial, and structured, respectively, and spatial attention weights are used to calculate weight coefficients for edges of different neighboring cities.
5. The method for predicting popular tourist cities according to claim 1, characterized in that, The uncertainty estimation in step S6 specifically involves calculating the prediction variance using the Monte Carlo Dropout method and outputting the prediction confidence level based on the prediction variance.
6. The method for predicting popular tourist cities according to claim 1, characterized in that, In step S6, the weighted loss function is the weighted sum of the losses from the three tasks, and the formula is: ;in, For weighted loss functions; , , The loss weights for each task; This is the mean squared error loss function, used for regression tasks; This is the cross-entropy loss function, used for classification tasks; , , These are the real labels corresponding to the three tasks.
7. A tourism hotspot city prediction system, characterized in that, include: (1) Data collection module, used to collect social media behavior data, search popularity data, online travel booking data, transportation passenger data, and external environmental data such as weather, holidays, and events related to the city; (2) Data preprocessing module, used to perform deduplication, cleaning, missing value filling, time resampling and city aggregation on the collected data; (3) Multimodal feature extraction module, used to extract corresponding features from text data, time series data, spatial data and structured data, and to perform splicing, linear transformation and normalization on the extracted multimodal features to obtain the multimodal feature vectors of each city in each time window; (4) Multi-scale city relationship graph construction module, which is used to establish edge connections between city pairs that meet preset conditions based on the geographical proximity, traffic connectivity and historical tourist flow ratio between cities, and to calculate edge weights according to preset formulas to construct a dynamic city relationship graph. (5) Prediction model module, which is used to input multimodal feature vectors and urban relationship dynamic graphs into dynamic graph neural network and multi-task prediction network, generate urban tourism popularity prediction results and / or tourism hot spot city determination results within the target time window, and perform uncertainty estimation; (6) Results interpretation and display module, used to display the city heat prediction results and the key influencing factors and neighboring city interpretation information based on attention weight in a visual manner; (7) Model update module, used to perform periodic incremental training or parameter fine-tuning of the prediction model based on newly collected data.
8. The system according to claim 7, characterized in that, The prediction model module adopts a graph attention network structure and also includes a fusion module for multi-scale subgraphs to enhance the modeling ability of inter-city propagation effects.
9. An electronic device comprising a memory and a processor, characterized in that, The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the tourism hotspot city prediction method according to any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the tourism hotspot city prediction method as described in any one of claims 1-6.