Scenic spot flow prediction method and device, terminal and storage medium

By integrating multi-source data and adopting a multi-model prediction architecture, the problem of insufficient integration of external factors in existing scenic area visitor flow prediction methods has been solved, achieving higher accuracy in visitor flow prediction.

CN121903073APending Publication Date: 2026-04-21HENAN INFORMATION CONSULTATION DESIGN & RES
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN INFORMATION CONSULTATION DESIGN & RES
Filing Date
2025-12-31
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing methods for predicting visitor flow in scenic areas rely on a single data source, making it difficult to effectively integrate external influencing factors such as weather changes, holiday effects, traffic conditions, and online public opinion, resulting in low prediction accuracy.

Method used

By integrating internal perception data, external environmental data, and online public opinion data of the scenic area, a multi-source heterogeneous time-series dataset is generated. Multi-dimensional features are extracted through one-dimensional convolutional neural networks, feature cross-models, and graph embedding algorithms, and a multi-model prediction architecture is adopted to predict visitor flow.

Benefits of technology

It improves the accuracy of tourist flow forecasting in scenic areas, and can capture long-term periodicity, short-term fluctuations, and sudden local changes in emergencies, thus enhancing the accuracy of the forecasting system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121903073A_ABST
    Figure CN121903073A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a scenic spot traffic prediction method and device, a terminal and a storage medium, and the method comprises the steps: generating a multi-source heterogeneous time series data set based on scenic spot internal perception data, external environment data and network public opinion data; obtaining basic features and derivative features based on the multi-source heterogeneous time sequence data set, and fusing the basic features and the derivative features to generate a target feature matrix; wherein the derivative features comprise at least one of statistical features, periodic features, interactive features, public opinion features and regional flow features; and inputting the target feature matrix into a multi-model prediction architecture to obtain a passenger flow prediction result in a future preset time period. The accuracy of passenger flow prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, device, terminal and storage medium for predicting tourist traffic. Background Technology

[0002] With the rapid development of smart tourism, scenic spots have generally deployed sensing facilities such as turnstiles, video surveillance, and ticketing systems, achieving some progress in visitor flow monitoring. However, there are still significant shortcomings in visitor flow forecasting. Existing methods are mostly based on time series models (such as ARIMA) or multiple regression analysis of historical data, relying on only a single data source. This makes it difficult to effectively integrate external influencing factors such as weather changes, holiday effects, traffic conditions, and online public opinion, resulting in slow response to external disturbances and low forecast accuracy. Summary of the Invention

[0003] In view of this, embodiments of this application provide a method, apparatus, terminal, and storage medium for predicting scenic area traffic flow, which can improve the accuracy of scenic area traffic flow prediction.

[0004] In a first aspect, embodiments of this application provide a method for predicting visitor traffic in scenic areas, including: Based on internal perception data, external environmental data, and online public opinion data of the scenic area, a multi-source heterogeneous time-series dataset is generated. Based on the multi-source heterogeneous time-series dataset, basic features and derived features are obtained, and the basic features and derived features are fused to generate a target feature matrix; wherein, the derived features include at least one of statistical features, periodic features, interaction features, public opinion features, and regional flow features; The target feature matrix is ​​input into the multi-model prediction architecture to obtain the passenger flow prediction results for the future preset time period.

[0005] In an optional implementation, the statistical features are obtained by aggregating and calculating the historical passenger flow in the multi-source heterogeneous time-series dataset over multiple time windows; The periodic features are extracted by performing multi-scale convolution operations on the historical passenger flow using a one-dimensional convolutional neural network; the periodic features are used to characterize at least one of short-term fluctuations, daily cycle patterns, and cyclical trends. The interactive features are generated by high-order nonlinear combination of multiple variables in the basic features through a feature cross model; the interactive features include at least one of the following: time dimension and weather conditions, holiday type and social popularity, traffic conditions and ticket prices. The public opinion features are generated based on natural language processing analysis of keyword information related to the target scenic spot collected from the online platform; wherein, the public opinion features include at least one of sentiment polarity distribution and travel intention index; The regional flow characteristics are generated by mapping each source region into a low-dimensional vector representation through a graph embedding algorithm, and then weighted and fused together with the spatial distribution of real-time passenger flow in the multi-source heterogeneous time-series dataset.

[0006] In an optional implementation, obtaining the derived features based on the multi-source heterogeneous time-series dataset includes: Based on the type of the derived feature, the corresponding feature generation mechanism is invoked to process the corresponding data source in the multi-source heterogeneous time series dataset to obtain the corresponding derived feature; The feature generation mechanism includes at least one of sliding window aggregation computation, one-dimensional convolutional neural network, feature cross model, graph embedding algorithm and natural language processing model.

[0007] In an optional implementation, the multi-model prediction architecture includes a master prediction model and at least two auxiliary prediction models; The step of inputting the target feature matrix into a multi-model prediction architecture to obtain passenger flow prediction results for a future preset time period includes: The target feature matrix is ​​input into the main prediction model, the first auxiliary prediction model, and the second auxiliary prediction model, respectively, to obtain the first passenger flow prediction value, the second passenger flow prediction value, and the third passenger flow prediction value. The first passenger flow forecast, the second passenger flow forecast, and the third passenger flow forecast are weighted and fused to obtain the passenger flow forecast result for a future preset time period.

[0008] In an optional implementation, the main prediction model is a two-layer recurrent neural network; wherein, the first layer is used to extract short-term time-dependent features, the second layer is used to model long-term periodic patterns based on the short-term time-dependent features, and the final hidden state is decoded into the first passenger flow prediction value within a future preset time period through a fully connected layer. The first auxiliary prediction model is a temporal convolutional network, which is used to extract local mutation features and long-distance historical dependency patterns from the target feature matrix, and output the second passenger flow prediction value within a future preset time period through global average pooling and regression head. The second auxiliary prediction model is an ensemble model based on gradient boosting decision trees, which is used to fit historical passenger flow based on non-time-series features in the target feature matrix to output a third passenger flow prediction value for a future preset time period.

[0009] In an optional implementation, after inputting the target feature matrix into a multi-model prediction architecture to obtain passenger flow prediction results for a future preset time period, the method further includes: Visual information is generated based on the passenger flow prediction results, and an early warning signal is triggered when an abnormal passenger flow trend is detected. The visualization information includes at least one of real-time passenger flow dashboard, heat map, and trend prediction curve; The warning signal is determined based on whether the predicted value exceeds a set threshold or whether the growth rate exceeds the allowable range.

[0010] In an optional implementation, the step of generating a multi-source heterogeneous time-series dataset based on scenic area internal perception data, external environmental data, and online public opinion data includes: The time-series records of the internal sensing data of the scenic area are acquired through a streaming acquisition channel, and the records are standardized by timestamp. The external environment data and the online public opinion data are obtained through application programming interfaces or batch synchronization methods. The internal perception data of the scenic area, the external environment data, and the online public opinion data are resampled according to a unified time granularity and then time-aligned. Missing values ​​are filled using interpolation or forward imputation to generate a spatiotemporally aligned multi-source heterogeneous time-series dataset.

[0011] Secondly, embodiments of this application provide a scenic area traffic prediction device, comprising: The generation module is used to generate multi-source heterogeneous time-series datasets based on internal scenic area perception data, external environmental data, and online public opinion data. The feature extraction module is used to obtain basic features and derived features based on the multi-source heterogeneous time-series dataset, and to fuse the basic features and the derived features to generate a target feature matrix; wherein, the derived features include at least one of statistical features, periodic features, interaction features, public opinion features, and regional flow features; The prediction module is used to input the target feature matrix into the multi-model prediction architecture to obtain the passenger flow prediction results for a future preset time period.

[0012] Thirdly, embodiments of this application provide a terminal device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the computer program to implement the above-described scenic area traffic prediction method.

[0013] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed on a processor, implements the above-described scenic area traffic prediction method.

[0014] The embodiments of this application have the following beneficial effects: This application integrates multi-source time-series data, including internal scenic area perception data, external environmental data, and online public opinion data. Through systematic feature engineering processing of this multi-source time-series data, it generates high-order derived features covering multiple dimensions such as statistical regularities, periodic patterns, variable interactions, social sentiment, and spatial flow. These features are then fused to form a structurally unified target feature matrix, providing high-quality input for subsequent intelligent prediction. During prediction, a multi-model prediction architecture is adopted, which can simultaneously capture the long-term periodicity, short-term fluctuations, and local mutations caused by sudden events in passenger flow changes, thereby enhancing the accuracy of the prediction system. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This paper illustrates a first flowchart of a scenic area traffic prediction method according to an embodiment of this application. Figure 2 This paper illustrates a second flowchart of the scenic area traffic prediction method according to an embodiment of this application. Figure 3 A schematic diagram of a scenic area traffic prediction device according to an embodiment of this application is shown. Detailed Implementation

[0017] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0018] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0019] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0020] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0021] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0022] The following examples illustrate the method for predicting visitor traffic in this scenic area.

[0023] Figure 1 A schematic flowchart of a scenic area traffic prediction method according to an embodiment of this application is shown. Exemplarily, the scenic area traffic prediction method includes steps S100-S300: Step S100: Generate a multi-source heterogeneous time-series dataset based on the scenic area's internal perception data, external environmental data, and online public opinion data.

[0024] This step mainly involves integrating multi-source data from within the scenic area, the external environment, and internet platforms to construct a time-series data set that is structurally unified, time-aligned, and of controllable quality.

[0025] Exemplary, such as Figure 2 As shown, based on internal scenic area perception data, external environmental data, and online public opinion data, a multi-source heterogeneous time-series dataset is generated, including steps S110-S140: Step S110: Obtain time-series records of internal sensing data of the scenic area through the streaming acquisition channel, and perform timestamp standardization processing on the records.

[0026] Among them, the internal sensing data of the scenic area refers to the real-time operational data generated by various sensing devices and business systems deployed on-site in the scenic area. This includes, but is not limited to, gate entry and exit records in the access control system, vehicle entry and exit information in the parking management system, visitor location tracking data based on WIFI probes and Bluetooth or people flow detection data from cameras, online and offline ticket purchase and verification records in the ticketing system, and the opening status of attractions and security event logs in the scenic area operation and management platform.

[0027] This embodiment uses Kafka as the core streaming acquisition channel to achieve high data timeliness. Specifically, each data source can push raw log data to different Topic partitions in the Kafka cluster in real time through the Flume agent, thereby enabling preliminary classification and decoupling of data categories.

[0028] Because different devices may experience clock drift or time zone inconsistencies, this step also requires timestamp standardization. Specifically, all timestamps are uniformly converted to UTC+8 Beijing time and standardized using the ISO 8601 format (e.g., "2025-05-01T08:15:00+08:00"). Furthermore, ZooKeeper can be used to coordinate multiple data acquisition tasks in a distributed manner, thereby ensuring time consistency of data across systems.

[0029] After the above processing, a set of scenic area internal perception data with precise time stamps can be obtained.

[0030] Step S120: Obtain external environment data and online public opinion data through application programming interface or batch synchronization.

[0031] The external environmental data mainly includes information related to meteorological conditions and transportation. Meteorological data can be retrieved periodically via the public application programming interface (API) provided by the China Meteorological Administration, covering key parameters such as hourly temperature, humidity, precipitation, wind speed, visibility, and air quality index (AQI) for the target scenic area. Transportation data can be obtained from the Baidu Maps Open Platform or the Gaode Maps API, providing indicators such as surrounding road congestion index, public transportation passenger flow, and navigation search volume trends.

[0032] Online public opinion data refers to unstructured information reflecting the public's attention and emotional inclination towards a target scenic spot. In this embodiment, a scheduled web crawler program can be configured to extract content fragments containing "scenic spot name" or related keywords from mainstream social media platforms such as Weibo, Douyin, and Xiaohongshu. At the same time, third-party public interfaces such as Baidu Index, WeChat Index, and Ctrip scenic spot browsing popularity are integrated to obtain quantitative sentiment fluctuations and interest growth curves.

[0033] For the two types of data mentioned above, different acquisition strategies can be selected based on their update frequency. For example, for data that needs to be updated frequently (such as weather and road conditions), real-time synchronization can be achieved by polling the API every 5-15 minutes. For data with a long update cycle or a large amount of data (such as historical public opinion statistics and holiday schedules), the Sqoop tool can be used to extract data in batches on a daily basis and import it into the Hive data warehouse.

[0034] Step S130: Resample the internal perception data, external environment data, and online public opinion data of the scenic area according to a unified time granularity and perform time alignment.

[0035] As an example, because the original sampling frequencies of the aforementioned three types of data differ significantly—for instance, gate data can be as low as seconds, meteorological data is mostly hourly, and some public opinion data is even updated daily—directly concatenating them would lead to dimensional misalignment and modeling bias. Therefore, they must be converted to a unified time granularity to support subsequent modeling operations.

[0036] This embodiment can set the standard time granularity to 15 minutes, meaning each time window corresponds to a 15-minute statistical period (e.g., 08:00-08:15, 08:15-08:30, etc.). For different types of variables, corresponding aggregation or expansion methods are used for resampling. For example, for count variables (e.g., number of visitors, number of vehicle entries), a summation method is used to combine all events within the time period; for continuously observed variables (e.g., average temperature, humidity), a time-weighted average method is used to calculate the interval mean; for categorical state variables (e.g., whether the park is open, weather conditions), the last valid state value within the time period is taken; for sparsely updated variables (e.g., public opinion index), if there is no new data in a certain period, the value of the previous period is used until the update.

[0037] After resampling, using the standardized UTC+8 timestamp as the primary key, the internal perception data, external environment data, and online public opinion data of the scenic area are horizontally connected to form a wide table record spanning multiple data domains. Each row represents a joint snapshot of various indicators at a specific point in time (or time window), thereby achieving precise alignment of multi-source data in the time dimension.

[0038] Step S140: Missing values ​​are filled in using interpolation or forward padding to generate a spatiotemporally aligned multi-source heterogeneous time-series dataset.

[0039] As an example, due to equipment failure, network interruption, or interface malfunction, some fields may still contain null values ​​when retrieving data. To ensure data integrity and avoid affecting the subsequent modeling process, missing values ​​need to be appropriately filled in.

[0040] This embodiment can adopt an appropriate completion strategy according to the characteristics of different types of data. For example, for continuous numerical variables (such as passenger flow, temperature, and congestion index), when the missing time is short (no more than two consecutive time windows), linear interpolation is used to estimate based on the nearest values ​​before and after; when the missing span is large but the trend is stable, sliding window mean is used to fill in the missing data; for discrete or state variables (such as whether it is a holiday or weather type), a forward filling strategy is adopted, that is, the most recent valid value is extended to the current moment, which is suitable for state information that changes slowly or has continuity.

[0041] After missing value completion, a spatiotemporally aligned, multi-source heterogeneous time-series dataset with complete structure, all fields, and continuous time can be output. This dataset can be stored in the HDFS distributed file system in Parquet or ORC columnar storage format and can be efficiently queried and accessed through Hive external tables.

[0042] After completing the missing value completion, the system can also perform noise filtering and signal smoothing to further improve data quality. For continuous time series variables (such as passenger flow and social popularity index), an exponentially weighted moving average is used to eliminate high-frequency random fluctuations; for time series with a fixed waveform structure (such as passenger flow cycle curve), a Savitzky-Golay filter can be used to effectively remove measurement noise while preserving the peak shape.

[0043] Step S200: Obtain basic features and derived features based on multi-source heterogeneous time-series datasets, and fuse the basic features and derived features to generate a target feature matrix.

[0044] Among them, the derived features include at least one of the following: statistical features, periodic features, interactive features, public opinion features, and regional flow features.

[0045] Statistical features are obtained by aggregating historical passenger flow data from multi-source heterogeneous time-series datasets across multiple time windows.

[0046] Specifically, statistical features are a class of derived features generated by performing aggregation calculations over multiple time windows of varying lengths based on historical visitor flow data from multi-source heterogeneous time-series datasets. These features characterize the dynamic trends, fluctuation intensity, and periodic patterns of visitor flow in scenic areas. Historical visitor flow refers to a set of continuous visitor flow data points extracted from multi-source heterogeneous time-series datasets and arranged in chronological order, with a time granularity that can be uniformly set to 15 minutes. Based on this, several time windows with different spans can be defined, and statistical operations can be performed on the subsequences within each time window to generate corresponding statistical features.

[0047] As an example, firstly, several representative time window lengths can be selected, corresponding to short-term, medium-term, and long-term historical observation periods, respectively. The short-term window includes the past 1 hour (i.e., 4 15-minute time points) or the past 3 hours (12 time points) to capture the recent rhythm of passenger flow changes; the medium-term window includes the past 24 hours (96 time points) to reflect the comparison between the current day and the previous day; and the long-term window includes the past 7 days (672 time points) or the past 30 days (2880 time points) to identify periodic and seasonal trends.

[0048] For each current time point t, the system backtracks the historical passenger flow values ​​within the aforementioned time windows and performs the corresponding aggregation operations. Specific aggregation calculation methods include, but are not limited to, mathematical statistical functions such as mean, maximum, minimum, variance, and growth rate. For example, at the current time t, the system extracts the passenger flow values ​​from the past hour (i.e., [t]). The passenger flow data (3, t) at 4 time steps are used to calculate the arithmetic mean, which is used as the average passenger flow characteristic over the past hour.

[0049] Furthermore, the system can also calculate passenger flow volatility indicators. For example, it can use the standard deviation formula to analyze the dispersion of passenger flow data over the past hour, generating a 1-hour passenger flow variance characteristic to measure the stability of passenger flow during that period. If the variance increases significantly, it may indicate the occurrence of a sudden gathering event.

[0050] In addition, the system can also construct growth rate features. For example, by comparing the passenger flow in the current time period with the passenger flow in the previous time period (such as time t-1), the relative rate of change can be calculated. This result can be output as an instantaneous growth rate feature to reflect the acceleration or deceleration trend of passenger flow.

[0051] To enhance its ability to model cyclical patterns, the system can also calculate cross-cycle comparison features. For example, it can extract passenger flow data for the same time period each day over the past 7 days (e.g., 10:00-10:15 AM each day), calculate its average, and compare it with the current value to generate a year-on-year growth rate feature; or it can compare the current day with the average of the same time period over the past 3 days to generate a short-term trend offset feature.

[0052] Once all the above statistical features have been calculated, they can be added to the feature vector at the current time point and participate in the subsequent modeling process together with other types of features.

[0053] Periodic features are extracted by performing multi-scale convolution operations on historical passenger flow using a one-dimensional convolutional neural network.

[0054] Exemplary features are a class of high-order derived features extracted by applying multi-scale convolutional operations using a one-dimensional convolutional neural network (1D-CNN) to historical visitor flows from multi-source heterogeneous time-series datasets. These features are primarily used to automatically identify and quantify repetitive rhythmic patterns in tourist flow within scenic areas, including but not limited to at least one of short-term fluctuations, daily cyclical patterns, and cyclical trends, thereby enhancing the predictive model's ability to perceive temporal structure.

[0055] When acquiring periodic features, the aforementioned historical passenger flow data can be input into a one-dimensional convolutional neural network (1D-CNN) for processing. This 1D-CNN consists of multiple one-dimensional convolutional layers, each containing several sets of one-dimensional filters with convolutional kernels of different sizes. Multi-scale convolution operations involve using multiple convolutional kernel sizes in parallel or sequentially within the same network structure, enabling it to simultaneously capture periodic patterns across different time spans.

[0056] For example, four sets of convolutional kernels can be set with lengths of 3, 7, 24, and 96. A kernel of length 3 slides across the time series to detect short-term fluctuations lasting less than 45 minutes, such as instantaneous crowd gatherings caused by the end of a temporary performance or the arrival of a shuttle bus. A kernel of length 7 covers a time range of approximately 105 minutes and excels at identifying medium-term local changes, such as the trend of the morning peak transitioning to noon. A kernel of length 24 corresponds to a 6-hour time span and can effectively respond to fixed daily cyclical patterns, such as the bimodal passenger flow structure that appears daily between 10:00-12:00 AM and 2:00-4:00 PM. A kernel of length 96 spans 24 hours and is specifically used to learn cross-day cyclical trends, such as long-term rhythms like weekend total passenger flow being significantly higher than weekdays or daily increases on holidays. Each set of convolutional kernels performs convolution operations on the time axis with a sliding stride, generating corresponding feature maps. Subsequently, a nonlinear transformation is introduced through an activation function (such as ReLU), and max pooling is used to reduce the feature dimensionality while preserving the main periodic structural information. Finally, the output feature maps at all scales are concatenated to form a set of low-dimensional vector representations rich in periodic semantics, i.e., periodic features.

[0057] In addition, to improve model stability, the original historical passenger flow can be normalized before inputting into the one-dimensional convolutional neural network. That is, the Z-score normalization method is used to convert it into a standard distribution with a mean of 0 and a standard deviation of 1, thereby avoiding the impact of the difference in units on the learning effect of the convolutional kernel.

[0058] Through the above multi-scale convolution operations, the extracted periodic features can not only accurately depict the temporal rhythm of passenger flow, but also have good generalization ability, and can stably express the core periodic behavior under different seasons and weather conditions.

[0059] Interactive features are generated by performing high-order nonlinear combinations of multiple variables in the basic features through a feature cross-model.

[0060] Exemplary examples illustrate how interactive features are a class of derived features generated by high-order nonlinear combinations of multiple variables in the basic features. These features are used to capture the complex coupling relationships between different influencing factors. Traditional prediction methods typically treat each variable as an independent input, making it difficult to reflect the synergistic effects of multiple factors in real-world scenarios. Therefore, this embodiment employs a feature cross-model that integrates CrossNet and DeepFM to automatically construct cross-dimensional interaction terms, thereby enhancing the model's ability to express complex passenger flow driving mechanisms.

[0061] First, all basic features, after being numerically encoded or embedded, are concatenated into a unified dense feature vector x. These are used as inputs to the feature cross-model. For example, categorical features (such as whether it is a holiday) can be converted into numerical vectors using one-hot encoding; continuous features (such as temperature, social popularity index, and congestion index) can be standardized using Z-score; high-dimensional correlated variables (such as weather conditions and social popularity) can be reduced to low-dimensional fusion features using PCA; regional flow features are generated into 8-dimensional vectors using graph embedding algorithms; temporal features are mapped to an 8-dimensional dense representation through embedding layers; and periodic features are extracted into 16-dimensional temporal pattern vectors using 1D-CNN, etc.

[0062] The above features are concatenated in a preset order to form an initial input vector of fixed length. Then, the vector is input into the feature interaction model for processing.

[0063] The feature interaction model includes two parallel branches: the CrossNet branch and the DeepFM branch.

[0064] In the CrossNet branch, higher-order feature interactions are explicitly constructed through layer-by-layer outer product operations. Its first... The output of the layer is given by the formula Calculate, where, The original input features, and The parameters to be learned This represents element-wise multiplication. The structure automatically learns the product relationship between feature i and feature j through an iterative mechanism, thereby generating explicit interactive features of order one to three.

[0065] DeepFM combines a Factorization Machine (FM) component with a Deep Neural Network (DNN) component. In the DeepFM branch, the FM part is used to automatically learn the second-order interaction strength of all feature pairs (i,j), and its computational form is: ;in, Let i be the latent vector of feature i. The latent vector of feature j is used to measure the interaction weights through the inner product; the DNN part uses a multi-layer fully connected network (such as a three-layer MLP with ReLU / GELU activation functions) to further capture higher-order nonlinear combination relationships.

[0066] Finally, the outputs of the CrossNet branch, the FM part, and the DNN part are concatenated along the feature dimension to form the final interactive feature vector. .

[0067] In this embodiment, the interactive features include, but are not limited to, interactions between time dimension and weather conditions, holiday type and social media buzz, and traffic conditions and ticket prices. The interaction between time dimension and weather conditions is used to characterize the differentiated impact of weather changes on travel intentions at different times. For example, during weekday morning commutes, light rain may lead to a slight decrease in visitor flow; while on weekend mornings, the same rainfall may significantly suppress visitors' willingness to enter the park. The interaction between holiday type and social media buzz is used to amplify the incentive effect of online public opinion on visitor flow during festivals. For example, the National Day holiday combined with trending topics on Douyin often triggers explosive growth far exceeding weekdays. By generating such combined features, the model can more sensitively respond to the combined effects of trending events and special holidays. The interaction between traffic conditions and ticket prices is used to model the actual regulatory effect of pricing strategies under external congestion conditions. For example, when roads leading into the mountains are severely congested, even lowering ticket prices may not be effective in attracting visitors; conversely, during periods of smooth traffic, dynamic price reductions are more attractive. By constructing such interactive features, the system can learn this non-linear adjustment boundary.

[0068] The aforementioned interactive features are retained as new numerical variables after generation and participate in the subsequent feature fusion process along with other features. Each interactive feature carries a clear physical meaning, and its influence weight on the final prediction result can be verified through gradient analysis. In addition, to prevent feature explosion and overfitting, an upper limit can be set for the interaction level (e.g., a maximum of three-order interactions), and the model complexity can be controlled by combining Dropout regularization and L2 weight decay mechanism.

[0069] It is understood that this embodiment introduces a feature cross model to perform high-order nonlinear combination of basic features, which can construct an interactive feature system covering various real-world coupling relationships such as time-weather, holidays-public opinion, and transportation-ticket prices, thereby improving the expressive power and prediction accuracy of the scenic area traffic prediction model.

[0070] The public opinion features are generated by natural language processing analysis of keyword information related to the target scenic spot collected from online platforms; among them, public opinion features include at least one of sentiment polarity distribution and travel intention index.

[0071] It is understandable that public opinion features are a type of semantic feature generated by natural language processing analysis of keyword information related to the target scenic spot collected from online platforms. They are used to quantify the public's level of attention and emotional inclination towards the target scenic spot.

[0072] As an example, the system can be configured with a distributed crawler to periodically scrape relevant text content containing the name, alternative names, or abbreviations of target scenic spots from mainstream social media platforms such as Weibo, Douyin, and Xiaohongshu. For instance, for Huangshan Scenic Area, it can collect keywords including phrases such as "Huangshan tourism," "Are there many people in Huangshan?", "What's the weather like in Huangshan?", and "Huangshan photo spots," along with their contextual information. Simultaneously, it can utilize open application programming interfaces (APIs) provided by platforms like Baidu Index, WeChat Index, and OTAs such as Ctrip and Fliggy to obtain structured data related to the scenic spot, such as search popularity, topic discussion volume, user favorites, and browsing frequency.

[0073] All unstructured text data is fed into the Natural Language Processing (NLP) analysis module after access. In some implementations, a pre-trained Chinese language model, BERT-base-chinese, can be used, and fine-tuned using a labeled scenic spot review dataset to build a dedicated sentiment classifier. This classifier classifies each text into one of three sentiment polarities: positive, negative, or neutral, and calculates the proportion of samples of each polarity to generate a sentiment polarity distribution as part of the public opinion features.

[0074] Furthermore, the system can synthesize multiple source popularity indicators to construct a travel intention index, which represents the actual likelihood of the public traveling to target scenic spots in the short term. This index is not a simple average, but rather dynamically weighted according to the timeliness and influence of various data: recently explosively growing short video topics are given higher weights, while long-term stable search trends are given basic weights. Finally, after normalization, a standardized value between 0 and 1 is obtained. For example, when a scenic spot experiences a five-fold increase in Douyin (TikTok) video views due to a viral online sensation, the travel intention index will rise significantly, thus reflecting the potential peak in visitor flow within the next 1-2 days.

[0075] Regional flow characteristics are generated by mapping each source region into a low-dimensional vector representation through a graph embedding algorithm, and then weighted and fused together with the spatial distribution of real-time passenger flow in multi-source heterogeneous time-series datasets.

[0076] It is understandable that regional flow characteristics are a type of spatial correlation feature generated by mapping each source region to a low-dimensional vector representation through graph embedding algorithm and combining it with the spatial distribution of real-time passenger flow in multi-source heterogeneous time series datasets for weighted fusion. This feature is used to characterize the group behavior patterns and collaborative change patterns among tourists from different source regions.

[0077] Specifically, a regional flow map can be constructed first. The nodes of this map represent the main source areas of tourists, typically divided by prefecture-level cities or provincial-level administrative regions, such as Shanghai, Hangzhou, Nanjing, and Guangzhou, totaling R regions. The edges in the map reflect the linkages between regions, and their weights are determined by multiple factors. For example, based on anonymized passenger flow data provided by telecommunications operators, the number of tourists from city A to the target scenic spot in the past 30 days can be counted; the Pearson correlation coefficient between the daily tourist flow sequences of each city can be calculated, and if the travel rhythms of tourists in two regions are highly synchronized, a high connection strength is set; additionally, a geographical proximity factor can be introduced, setting initial positive weights between adjacent cities. Through the above methods, a weighted adjacency matrix can be formed to describe the flow structure between regions.

[0078] Then, a graph embedding algorithm is applied to learn the graph. For example, the Node2Vec algorithm can be used to balance breadth-first and depth-first search by adjusting the random walk strategy, generating a context sequence for each node (i.e., each source city). Then, a Skip-gram model is used for training, mapping each city to a d-dimensional dense vector. (d can be 8 or 16), called the embedding representation of the region. These vectors implicitly express potential attributes such as travel styles, economic levels, and climate preferences of various cities, and their similarity can be inferred even without direct observation (e.g., Suzhou and Wuxi have highly similar embedding vectors). In the daily prediction task, the system obtains the actual proportion of passengers from each source region at the current time. (e.g., regional distribution statistics from Ctrip ticketing data), and then weighted and fused with the corresponding regional embedding vectors, i.e. This allows us to obtain a fixed-dimensional regional flow feature vector. This feature not only preserves the individual characteristics of each geographical unit, but more importantly, it captures the synergistic effects between urban clusters. For example, during peak holiday periods, the Yangtze River Delta urban cluster (Shanghai, Suzhou, Hangzhou, etc.) often shows an overall increase in passenger flow.

[0079] Furthermore, after acquiring all basic and derived features, the system performs a feature fusion operation to generate a target feature matrix for model input.

[0080] Exemplary, the target feature matrix is ​​a two-dimensional numerical data structure, where each row corresponds to a time window (e.g., 15-minute granularity), and each column represents an independent feature variable. All feature vectors are aligned according to a uniform timestamp and horizontally concatenated along the feature dimension (column direction) to form a complete feature row. For example, at time point t, the system sequentially arranges the basic features of that moment (e.g., hour number, whether it is a holiday), statistical features (average passenger flow in the past hour), periodic features (four main pattern components extracted by 1D-CNN), public opinion features (positive sentiment percentage, travel intention index), regional flow features (8-dimensional graph embedding weighted vector), and interaction features (higher-order combination terms such as timeholiday and traffic_price) to form a dense feature vector of length n. .

[0081] To eliminate the dimensional differences between different features and prevent high-amplitude variables from dominating the model training process, the entire target feature matrix can be uniformly normalized. Specifically, min-max normalization can be used to scale all features to the [0, 1] interval, or Z-score standardization can be used to make each feature follow a standard normal distribution with a mean of 0 and a standard deviation of 1. The normalization parameters (such as maximum / minimum or mean / standard deviation) are calculated based on the historical training set and are fixed in the prediction stage to ensure consistency between online and offline training.

[0082] In some implementations, a feature importance assessment module may be introduced, such as using attention mechanisms or SHAP values ​​to analyze the contribution of each feature to the prediction results, thereby achieving dynamic feature weighting or redundant feature filtering and further optimizing the quality of the target feature matrix.

[0083] The final output target feature matrix X= It can be represented as a tensor of shape (W,n), where W is the length of the sliding window (e.g., 24 represents 24 15-minute points in the past 6 hours), and n is the total number of target features (which can reach 100-300 dimensions).

[0084] It is understood that this embodiment generates sentiment polarity distribution and travel intention index through natural language processing technology, realizing automated semantic analysis of online public opinion; and constructs regional flow characteristics through graph embedding algorithm to uncover potential correlation patterns between passenger origin areas. The introduction of these two types of features breaks through the limitations of traditional methods that rely solely on historical passenger flow and static variables, enabling the prediction system to have stronger social perception capabilities, thereby making subsequent passenger flow predictions more accurate.

[0085] In some implementations, derived features are obtained based on multi-source heterogeneous time-series datasets, including calling the corresponding feature generation mechanism based on the type of the derived features to process the corresponding data source in the multi-source heterogeneous time-series dataset and obtain the corresponding derived features.

[0086] The feature generation mechanism includes at least one of sliding window aggregation calculation, one-dimensional convolutional neural network, feature cross model, graph embedding algorithm and natural language processing model.

[0087] As an example, in actual operation, the system first needs to identify the category of the derived features to be generated. Since different types of derived features rely on different data sources and mathematical modeling methods, a unified processing flow cannot be used. For instance, a mapping relationship between feature types and feature generation mechanisms can be preset, allowing the system to automatically select the optimal processing path based on the target feature. For example, when the system needs to generate statistical features, it identifies them as variables describing historical trends and then calls a time-series-based sliding window aggregation mechanism, applying it to the historical passenger flow field in a multi-source heterogeneous time-series dataset. When extracting periodic features, it determines that it is a time-pattern mining task and starts a one-dimensional convolutional neural network model, inputting the historical passenger flow sequence for multi-scale convolution operations. When the target is an interaction feature, it activates a feature cross-model, receiving multiple basic features as input and generating higher-order combinations. For constructing public opinion features, the system can delegate the task to a natural language processing model to process the raw text data. For regional flow features, it uses a graph embedding algorithm to learn a low-dimensional representation based on the correlation between passenger origins.

[0088] The sliding window aggregation calculation is used to generate statistical features. This mechanism extracts time series segments of specified fields (such as total number of visitors) from multi-source heterogeneous time series datasets, and iterates through them according to a preset time window length (such as the past 1 hour, 3 hours, or 7 days). Within each window, it performs aggregation functions such as summation, mean, variance, and maximum value, outputting numerical features that reflect the trend and intensity of passenger flow fluctuations. This method is particularly suitable for capturing the difference between short-term rhythm changes and long-term average levels.

[0089] The other one-dimensional convolutional neural networks, feature cross models, graph embedding algorithms, and natural language processing models have all been explained above and will not be repeated here.

[0090] Step S300: Input the target feature matrix into the multi-model prediction architecture to obtain the passenger flow prediction results for the future preset time period.

[0091] A multi-model prediction architecture includes a master prediction model and at least two auxiliary prediction models.

[0092] In some implementations, step S300 specifically includes inputting the target feature matrix into a multi-model prediction architecture to obtain passenger flow prediction results for a future preset time period, including: inputting the target feature matrix into the main prediction model, the first auxiliary prediction model, and the second auxiliary prediction model respectively to obtain a first passenger flow prediction value, a second passenger flow prediction value, and a third passenger flow prediction value; and weighting and fusing the first passenger flow prediction value, the second passenger flow prediction value, and the third passenger flow prediction value to obtain the passenger flow prediction results for the future preset time period.

[0093] The main prediction model is a two-layer recurrent neural network, specifically a two-layer long short-term memory network (LSTM), used to learn the long-term periodic patterns and short-term temporal dependencies in the changes of tourist flow in scenic areas.

[0094] The first LSTM layer is used to extract short-term time-dependent features, that is, to capture short-term dynamic fluctuations and local trends. Its input is a fragment of the target feature matrix from several consecutive time steps in the past (e.g., 24 15-minute time points in the past 6 hours). This layer controls the retention of historical information through a forgetting gate, filters important features at the current moment through an input gate, updates internal memory with candidate states, and determines the content expressed externally through an output gate. Because it directly acts on the original feature sequence, the first layer is highly sensitive to temporary events, such as the formation of morning peak arrival times or short-term reductions in visitor numbers caused by sudden light rain. Its output is a sequence of hidden states carrying short-term memory information. .

[0095] The second LSTM layer takes the short-term temporal dependencies of the first layer as input to further model periodic and seasonal patterns spanning longer time spans. Since the input has already undergone preliminary abstraction and smoothing by the first layer, the second layer does not need to deal with the original noise interference, and can therefore focus on extracting stable long-term rhythms, such as daily or even weekly trend patterns like increased passenger flow on Saturday mornings, daily increases during the National Day holiday, peak student travel during summer vacation, and changes in the number of people returning home before and after the Spring Festival. This layer typically has a higher hidden dimension to accommodate more complex periodic representations. Finally, the final hidden state of the second LSTM layer... The data is sent to the fully connected layer, and then the fully connected layer decodes the final hidden state into the first passenger flow prediction value within a preset future time period (such as the next hour).

[0096] The first auxiliary prediction model is a temporal convolutional network, which is used to extract local mutation features and long-distance historical dependency patterns from the target feature matrix, and output the second passenger flow prediction value within a preset future time period through global average pooling and regression head.

[0097] As an example, to overcome the limitations of recurrent neural networks in capturing local mutations and long-range dependencies, the system introduces a first auxiliary prediction model—a Temporal Convolutional Network (TCN). This model is used to detect spikes, anomalous jumps, and long-term historical correlation signals during passenger flow.

[0098] TCN employs a causal convolutional structure to ensure that predictions are made using only information from the current and previous time points, preventing the leakage of future information. Building upon this, a dilated convolution method is introduced, causing the receptive field of the convolutional kernel to expand exponentially with increasing layer depth. For example, the... The void ratio of the layer This allows even a few layers of network to cover historical data across hundreds of time steps, effectively identifying long-distance pre-holiday effects such as growth starting two days before a holiday and a surge in passenger traffic the day after a short video goes viral.

[0099] In addition, TCN employs a residual connection structure to alleviate the gradient vanishing problem in deep networks, improving training convergence speed and model stability. Each residual block contains multiple dilated convolutional layers and activation functions (such as ReLU or GELU), extracting local patterns layer by layer.

[0100] In this embodiment, the TCN further includes a regression output head for converting the feature map output from the last layer into a scalar form of passenger flow prediction values. Specifically, the system first performs Global Average Pooling (GAP) on the final feature map in the time dimension to compress temporal information and preserve channel semantics; then it flattens it into a one-dimensional vector and maps it to a single numerical output through a fully connected layer, namely, the second passenger flow prediction value within a preset future time period. This design ensures that the TCN model has end-to-end independent prediction capabilities, rather than being used only as a feature extractor. When situations such as sudden cable car release, performance end and dispersal, or sudden weather changes cause a rapid gathering or dispersal of people, the TCN, due to its parallel computing characteristics and strong local perception capabilities, can independently generate highly responsive predictions of future passenger flow trends and output the second passenger flow prediction value for use by the subsequent weighted fusion module.

[0101] Furthermore, the second passenger flow forecast value output by the TCN is complementary to the first passenger flow forecast value output by the master forecast model (two-layer LSTM): LSTM is good at modeling long-term periodic patterns but has a lag effect when dealing with sudden changes; while TCN can quickly capture spikes and abnormal fluctuations and provide a feedforward response.

[0102] The second auxiliary prediction model is an ensemble model based on gradient boosting decision trees, which is used to fit historical passenger flow based on non-time-series features in the target feature matrix to output a third passenger flow prediction value for a future preset time period.

[0103] As an example, for static or low-frequency variables that do not have obvious temporal continuity but have a significant impact on passenger flow, this embodiment configures a second auxiliary prediction model, namely an ensemble model based on gradient boosting decision trees, such as the XGBoost algorithm. This model is used to model the effect of non-time-series external influencing factors on the passenger flow of scenic spots, and its goal is to output an independent prediction of passenger flow within a preset future time period. The XGBoost model is built on the gradient boosting decision tree (GBDT) framework, and trains multiple CART regression trees iteratively. Each tree fits the residual of the previous prediction, gradually approximating the complex nonlinear relationship between the actual passenger flow and the input features. During the training phase, the model uses the actual passenger flow of the same period in history as the supervision label and the non-time-series features in the target feature matrix as input, and learns the mapping function between variables such as holiday type, weather conditions (sunny / cloudy / rainy), whether there are large-scale events, ticket price range, social media popularity level, and whether competing scenic spots have flow restrictions, and the passenger flow value.

[0104] Understandably, the model can automatically detect threshold effects and piecewise response mechanisms among variables. For example, when rainfall exceeds 10mm and no indoor attractions are open, the model can identify the decline in passenger flow under such combined conditions and automatically trigger corresponding reduction predictions during the forecasting phase. Furthermore, when the National Day holiday coincides with trending topics on Douyin (TikTok), the model can amplify the incentive effect of social media buzz on travel intentions, generating higher passenger flow estimates.

[0105] During the inference phase, the second auxiliary prediction model receives a subset of non-temporal features extracted from the target feature matrix at the current moment as input and directly outputs a scalar prediction result, namely the predicted value of the third passenger flow within a preset future time period, in person. This output has the same semantic space and dimensions as the prediction results of other sub-models (main prediction model and first auxiliary prediction model), supporting subsequent weighted fusion operations. Furthermore, since the XGBoost model does not rely on sequence structure, it can quickly respond to sudden events (such as temporary park closure notices, extreme weather warnings, and viral videos of popular tourist attractions) that cause sudden changes in passenger flow. Therefore, it has high prediction sensitivity in sudden disturbance scenarios, effectively compensating for the lag problem of temporal models.

[0106] Furthermore, to fully leverage the strengths of each sub-model, the system incorporates a fusion layer to comprehensively process the outputs of the three models. In one embodiment, a stacking method can be used for fusion, whereby the prediction outputs of the main prediction model, the first auxiliary prediction model, and the second auxiliary prediction model are combined. , , As new meta-features, these are input into the upper-level fusion model (such as a linear regressor or a lightweight MLP), which learns the optimal weight combination to generate the final prediction result. The weighting coefficients are among them. , , The parameters can be automatically tuned on the validation set using a Bayesian optimization algorithm to ensure maximum fusion performance.

[0107] In some implementations, an attention mechanism can be introduced to achieve dynamic weighted fusion. Specifically, the system maps the intermediate outputs of the three models (such as the final hidden state of LSTM, the last layer feature map of TCN, and the leaf node path of XGBoost) to a unified semantic space and calculates their importance scores relative to the current input context. After Softmax normalization, a set of attention weights that vary over time is obtained. , , This enables dynamic adjustment of feature sensitivity. For example, when in a stable holiday cycle, the LSTM output weight increases; when a short-term congestion or a sudden increase in people is detected, TCN receives more attention; and when there are sudden events such as heavy rain, high temperatures, or a surge in social media activity, XGBoost becomes the main contributor due to its ability to handle non-time-series variables.

[0108] During the training phase, the system uses a sliding window method to construct samples, with a time window of length W (e.g., W=24 corresponding to the past 6 hours) as input, and the label being the actual passenger flow in the next time step. The HuberLoss loss function can be used, balancing the smoothness of MSE and the robustness of MAE to outliers; the Adam optimizer is used, supporting adaptive learning rate adjustment; an early stopping mechanism can be enabled during training, terminating training when the validation set loss has not decreased for N consecutive rounds to prevent overfitting. All models are trained using GPU acceleration and periodically retrained to update parameters.

[0109] During the prediction phase, the system switches to streaming inference mode. Real-time data is accessed through Flink or Spark Streaming, and the feature module updates the feature vectors of the most recent W time steps in real time to form the latest target feature matrix. Each prediction model executes inference tasks in parallel, and the fusion layer outputs the final prediction results. The predicted values ​​are cached in Redis for the front-end visualization module to read with millisecond-level latency, and a service interface is provided to the outside world through a RESTful API.

[0110] The final output includes not only the predicted passenger flow for the next preset period (e.g., 7200 people per hour), but also multi-period trend curves (1 hour, 3 hours, 24 hours), 95% prediction confidence intervals (e.g., [6800, 9800]), and a report on the contribution of key influencing factors, to help managers determine the reliability of the prediction and the driving reasons.

[0111] It is understood that this embodiment, by constructing a multi-model prediction architecture that includes a two-layer recurrent neural network, a temporal convolutional network, and a gradient-boosting decision tree, can achieve comprehensive modeling of long-term cycles, short-term fluctuations, local mutations, and external disturbances in changes in tourist flow in scenic areas. The collaborative work of each model further improves prediction accuracy and system stability.

[0112] In some implementations, after inputting the target feature matrix into a multi-model prediction architecture to obtain passenger flow prediction results for a future preset time period, the method further includes: generating visualization information based on the passenger flow prediction results, and triggering an early warning signal when an abnormal passenger flow trend is detected; wherein, the visualization information includes at least one of a real-time passenger flow dashboard, a heat map, and a trend prediction curve; the early warning signal is determined based on whether the predicted value exceeds a set threshold or whether the growth rate exceeds the allowable range.

[0113] For example, the system can push the prediction results to the backend service layer through the data interface module. This interface can be an interface that adopts the RESTful API standard protocol, supports cross-platform calls and high-concurrency access, thereby ensuring that the frontend can stably obtain the latest prediction output.

[0114] The forecast results include, but are not limited to, structured information such as current actual passenger flow, expected passenger flow values ​​for the next 1 hour, 3 hours and 24 hours, forecast confidence interval (such as 95% confidence range), trend change direction and analysis of key influencing factors.

[0115] After obtaining the forecast results, they are visualized. The visualization information includes at least one of the following: a real-time visitor flow dashboard, a heat map, and a trend prediction curve. The real-time visitor flow dashboard centrally displays the overall operational status of the scenic area. Its main display content includes: the current total number of visitors, the predicted value for the next time step, the growth rate compared to the previous time period, the congestion risk level (green / yellow / red color indicators), and system-suggested operational instructions (such as suggesting additional staff to guide visitors at the South Gate). The dashboard automatically refreshes every 5 seconds to ensure the on-site command center can grasp the latest situation. The heat map reflects the spatial concentration of visitors in different areas within the scenic area. The system combines data from WIFI probes, Bluetooth Beacons, and video surveillance to statistically analyze the population density of each attraction or functional area (such as cable car entrances, viewing platforms, and rest areas), and maps this density onto an electronic map, presenting a heat map effect in the form of color gradients, with darker colors indicating denser populations. Managers can quickly identify potential congestion points through this map and deploy crowd control measures in advance. The trend prediction curve displays the temporal evolution relationship between historical actual visitor flow and future forecasts. The graph displays time on the horizontal axis and passenger flow on the vertical axis, overlaying real data lines for a past period (e.g., from 0:00 to the present) with predicted curves for the next 6 hours. The predicted portion is shaded with a band covering its 95% confidence interval to reflect the uncertainty of the prediction. In addition, the system can also plot auxiliary reference lines such as public opinion heat curves and weather change curves in parallel, facilitating the analysis of the driving factors behind passenger flow fluctuations.

[0116] The aforementioned visualized information is uniformly integrated into a comprehensive management screen or mobile app, supporting simultaneous viewing on multiple terminals and meeting the different usage needs of the command center, patrol personnel, and back-end operations team.

[0117] Furthermore, the system continuously monitors passenger flow trends for any abnormalities and determines whether an early warning signal needs to be triggered accordingly. The early warning mechanism employs a dual-judgment logic, dynamically evaluating based on both absolute thresholds and relative rates of change. On one hand, the system presets the maximum carrying capacity of the scenic area and its tiered thresholds. For example, when the predicted passenger flow exceeds 80% of the maximum carrying capacity, a yellow warning is issued, indicating a potential risk of mild congestion; when it reaches or exceeds 95%, a red warning is triggered, indicating that the safety limit is approaching and immediate flow control or diversion measures are required. These settings can be flexibly configured according to different regions and time periods; for example, lower thresholds can be set for core scenic spots to enhance protection. On the other hand, the system also introduces a trend-based early warning mechanism to identify situations where passenger flow is rapidly increasing even before reaching a threshold. Specifically, it calculates the passenger flow growth rate over multiple consecutive time windows to determine if it exceeds the permissible range. For example, if the passenger flow increase is greater than 10% in each of the past two 15-minute time periods, it is considered a rapid growth trend. Even if the current total volume does not exceed the limit, it is considered a potential risk, automatically triggering a trend warning signal to remind management to pay attention to subsequent developments. Once any warning condition is met, the system immediately activates a multi-channel alarm mechanism. Warning signals can be conveyed to relevant personnel in various ways: a prominent alarm box pops up in the management backend, SMS notification is sent to a designated mobile phone number, messages are pushed via WeChat or DingTalk, a red light flashes on a large visual screen, and a voice reminder can be played in conjunction with the broadcast system.

[0118] In some implementations, the system also includes a model self-learning mechanism. Specifically, each prediction result is compared with the subsequent actual passenger flow to calculate the prediction error; when the error exceeds a preset threshold, an incremental model update process is automatically triggered. This process uses online fine-tuning technology to make lightweight adjustments only to the parameters of the last few layers of the model, without retraining the entire model, thus ensuring that the system can quickly adapt to changes in passenger flow patterns after new data inflows.

[0119] This embodiment integrates multi-source time-series data, including internal scenic area perception data, external environmental data, and online public opinion data. Through systematic feature engineering processing of this multi-source time-series data, it generates high-order derived features covering multiple dimensions such as statistical regularities, periodic patterns, variable interactions, social sentiment, and spatial flow. These features are then fused to form a structurally unified target feature matrix, providing high-quality input for subsequent intelligent prediction. During prediction, a multi-model prediction architecture is employed, with a main model and auxiliary models working collaboratively. This architecture can simultaneously capture long-term periodicity, short-term volatility, and local mutations caused by sudden events in passenger flow changes, thereby enhancing the accuracy of the prediction system.

[0120] Figure 3A schematic diagram of a scenic area traffic prediction device according to an embodiment of this application is shown. Exemplarily, the scenic area traffic prediction device includes: The generation module 100 is used to generate a multi-source heterogeneous time-series dataset based on internal scenic area perception data, external environmental data, and online public opinion data.

[0121] The feature extraction module 200 is used to obtain basic features and derived features based on the multi-source heterogeneous time series dataset, and to fuse the basic features and the derived features to generate a target feature matrix; wherein, the derived features include at least one of statistical features, periodic features, interaction features, public opinion features, and regional flow features.

[0122] The prediction module 300 is used to input the target feature matrix into the multi-model prediction architecture to obtain the passenger flow prediction results for a future preset time period.

[0123] It is understood that the device in this embodiment corresponds to the scenic area traffic prediction method in the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described again here.

[0124] This application also provides a terminal device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the terminal device to perform the functions of the various modules in the above-described scenic area traffic prediction method or the above-described scenic area traffic prediction device.

[0125] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0126] The memory can 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. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.

[0127] This application also provides a computer-readable storage medium for storing the computer program used in the aforementioned terminal device. For example, the computer-readable storage medium may include, but is not limited to, 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.

[0128] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, 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 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 the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, 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.

[0129] In addition, the functional modules or units 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.

[0130] If the aforementioned 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 smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0131] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for predicting visitor flow in a scenic area, characterized in that, include: Based on internal perception data, external environmental data, and online public opinion data of the scenic area, a multi-source heterogeneous time-series dataset is generated. Based on the multi-source heterogeneous time-series dataset, basic features and derived features are obtained, and the basic features and derived features are fused to generate a target feature matrix; wherein, the derived features include at least one of statistical features, periodic features, interaction features, public opinion features, and regional flow features; The target feature matrix is ​​input into the multi-model prediction architecture to obtain the passenger flow prediction results for the future preset time period.

2. The scenic area traffic prediction method according to claim 1, characterized in that, The statistical features are obtained by aggregating and calculating the historical passenger flow in the multi-source heterogeneous time-series dataset within multiple time windows; The periodic features are extracted by performing multi-scale convolution operations on the historical passenger flow using a one-dimensional convolutional neural network; the periodic features are used to characterize at least one of short-term fluctuations, daily cycle patterns, and cyclical trends. The interactive features are generated by high-order nonlinear combination of multiple variables in the basic features through a feature cross model; the interactive features include at least one of the following: time dimension and weather conditions, holiday type and social popularity, traffic conditions and ticket prices. The public opinion features are generated based on natural language processing analysis of keyword information related to the target scenic spot collected from the online platform; wherein, the public opinion features include at least one of sentiment polarity distribution and travel intention index; The regional flow characteristics are generated by mapping each source region into a low-dimensional vector representation through a graph embedding algorithm, and then weighted and fused together with the spatial distribution of real-time passenger flow in the multi-source heterogeneous time-series dataset.

3. The scenic area traffic prediction method according to claim 2, characterized in that, Obtaining the derived features based on the multi-source heterogeneous time-series dataset includes: Based on the type of the derived feature, the corresponding feature generation mechanism is invoked to process the corresponding data source in the multi-source heterogeneous time series dataset to obtain the corresponding derived feature; The feature generation mechanism includes at least one of sliding window aggregation computation, one-dimensional convolutional neural network, feature cross model, graph embedding algorithm and natural language processing model.

4. The scenic area traffic prediction method according to claim 1, characterized in that, The multi-model prediction architecture includes a master prediction model and at least two auxiliary prediction models; The step of inputting the target feature matrix into a multi-model prediction architecture to obtain passenger flow prediction results for a future preset time period includes: The target feature matrix is ​​input into the main prediction model, the first auxiliary prediction model, and the second auxiliary prediction model, respectively, to obtain the first passenger flow prediction value, the second passenger flow prediction value, and the third passenger flow prediction value. The first passenger flow forecast, the second passenger flow forecast, and the third passenger flow forecast are weighted and fused to obtain the passenger flow forecast result for a future preset time period.

5. The scenic area traffic prediction method according to claim 4, characterized in that, The main prediction model is a two-layer recurrent neural network; wherein, the first layer is used to extract short-term time-dependent features, the second layer is used to model long-term periodic patterns based on the short-term time-dependent features, and the final hidden state is decoded into the first passenger flow prediction value within a future preset time period through a fully connected layer. The first auxiliary prediction model is a temporal convolutional network, which is used to extract local mutation features and long-distance historical dependency patterns from the target feature matrix, and output the second passenger flow prediction value within a future preset time period through global average pooling and regression head. The second auxiliary prediction model is an ensemble model based on gradient boosting decision trees, which is used to fit historical passenger flow based on non-time-series features in the target feature matrix to output a third passenger flow prediction value for a future preset time period.

6. The scenic area traffic prediction method according to claim 1, characterized in that, After inputting the target feature matrix into the multi-model prediction architecture to obtain the passenger flow prediction results for the future preset time period, the method further includes: Visual information is generated based on the passenger flow prediction results, and an early warning signal is triggered when an abnormal passenger flow trend is detected. The visualization information includes at least one of real-time passenger flow dashboard, heat map, and trend prediction curve; The warning signal is determined based on whether the predicted value exceeds a set threshold or whether the growth rate exceeds the allowable range.

7. The scenic area traffic prediction method according to claim 1, characterized in that, The process of generating a multi-source heterogeneous time-series dataset based on internal scenic area perception data, external environmental data, and online public opinion data includes: The time-series records of the internal sensing data of the scenic area are acquired through a streaming acquisition channel, and the records are standardized by timestamp. The external environment data and the online public opinion data are obtained through application programming interfaces or batch synchronization methods. The internal perception data of the scenic area, the external environment data, and the online public opinion data are resampled according to a unified time granularity and then time-aligned. Missing values ​​are filled using interpolation or forward imputation to generate a spatiotemporally aligned multi-source heterogeneous time-series dataset.

8. A scenic area traffic prediction device, characterized in that, include: The generation module is used to generate multi-source heterogeneous time-series datasets based on internal scenic area perception data, external environmental data, and online public opinion data. The feature extraction module is used to obtain basic features and derived features based on the multi-source heterogeneous time-series dataset, and to fuse the basic features and the derived features to generate a target feature matrix; wherein, the derived features include at least one of statistical features, periodic features, interaction features, public opinion features, and regional flow features; The prediction module is used to input the target feature matrix into the multi-model prediction architecture to obtain the passenger flow prediction results for a future preset time period.

9. A terminal device, characterized in that, The terminal device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the scenic area traffic prediction method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed on a processor, implements the scenic area traffic prediction method according to any one of claims 1-7.