Tourist flow prediction method based on beidou positioning and structured gate recurrent unit
By employing a randomly initialized adjacency matrix and a structured GRU network to dynamically update the adjacency matrix parameters, the problem of the inability to dynamically update the predefined adjacency matrix in existing technologies is solved, enabling efficient and accurate prediction of traffic flow within scenic areas.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2024-07-24
- Publication Date
- 2026-08-04
AI Technical Summary
Existing tourist flow prediction methods cannot effectively update the topology when using predefined graph adjacency matrices, resulting in low prediction efficiency and failing to meet the need for accurate flow prediction within scenic areas.
We employ a method of randomly initializing the adjacency matrix and dynamically updating its parameters during the learning process. We combine adaptive graph convolution and structured gated recurrent unit (GRU) networks to extract tourist flow features through multi-layer spatiotemporal embedding and nonlinear connection layers, and construct a structured GRU network for prediction.
It improves the accuracy and efficiency of tourist flow forecasting, better adapts to the dynamic changes within scenic areas, and provides more accurate flow forecast results.
Smart Images

Figure CN119046657B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of tourist flow prediction in scenic areas using BeiDou positioning applications, and particularly relates to a tourist flow prediction method based on BeiDou positioning and structured gating loop units. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Tourist flow in scenic areas is characterized by fluctuations, seasonality, and uneven spatial distribution. Holidays, in particular, see a surge in visitors. Different types of scenic areas exhibit varying characteristics in their visitor flow. For instance, visitor flow in natural landscape scenic areas is generally more influenced by seasons and weather, while visitor flow in urban cultural scenic areas is relatively stable. Furthermore, visitor flow varies across different sections within a scenic area, with cable car entrances, sightseeing stations, and popular attractions often experiencing higher visitor numbers. Accurate perception and prediction of visitor flow in different sections within a scenic area is a crucial research area. Based on accurate visitor flow predictions, scenic area management departments or traffic police can implement timely visitor guidance, vehicle and personnel scheduling to alleviate congestion and safety issues caused by excessive localized visitor numbers. Visitor flow prediction for different types of scenic areas needs to consider the following three factors: the characteristics of the scenic area itself, the correlation between visitor flows in different areas within the scenic area, and unforeseen events.
[0004] Currently, to improve the accuracy of visitor flow prediction within scenic areas, BeiDou positioning modules and navigation software on tourists' mobile phones are used, along with intelligent analysis of real-time camera footage, to obtain visitor flow data for these areas. Visitor flow prediction within scenic areas is a spatiotemporal data prediction problem, and also a classic multivariate time series (MTS) prediction problem. Early machine learning models (such as SVR and ARIMA) have a solid mathematical foundation for fitting unit time series (UTS), but multivariate time series (MTS) have a graph structure, and the adjacency and distance between nodes are different, thus requiring the introduction of an adjacency matrix. This makes MTS also a non-Euclidean structure data, making it impossible to simultaneously learn spatiotemporal features using traditional machine learning models or convolutional neural networks (CNNs) and recurrent neural networks (RNNs).
[0005] Graph Convolutional Networks (GCNs) introduce symmetric normalized Laplacian matrices, breaking the limitation that non-Euclidean structures cannot propagate forward or perform backward differentiation. GCNs have rapidly developed in the field of MTS applications. Later, based on graph convolutional networks, gating mechanisms, attention mechanisms, and dynamic programming algorithms were introduced and combined with GCNs. With the help of GCNs' powerful ability to handle non-Euclidean structures, performance breakthroughs were achieved on public datasets of MTS. However, these models focus on structural complexity, have long training times, and are far more time-consuming than recurrent models based on RNNs.
[0006] The inventors discovered that, in order to solve the above problems, existing methods improve graph convolutional networks to achieve tourist flow prediction. However, existing improved methods all use predefined graph adjacency matrices to describe the topology. The drawback of this method is that the adjacency state of the graph is a dynamic process that is constantly updated. In order to obtain better performance, it needs to be updated at any time during the model iteration, resulting in low prediction efficiency. Summary of the Invention
[0007] To address at least one of the technical problems mentioned above, this invention provides a tourist flow prediction method based on BeiDou positioning and structured gated loop units. Instead of using a predefined adjacency matrix, it employs a method of randomly initializing the adjacency matrix and dynamically updating the adjacency matrix parameters during the learning process to achieve better performance.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] A first aspect of the present invention provides a method for predicting tourist flow based on BeiDou positioning and structured gating loop units, comprising the following steps:
[0010] Obtain tourist flow data sequences at different time granularities for the scenic area to be predicted. Each tourist flow data point includes time, BeiDou positioning location, and number of tourists.
[0011] An adaptive adjacency matrix is constructed based on adaptive graph convolution and using a random initialization method.
[0012] The temporal and spatial embedding vectors of the tourist flow data sequence are randomly initialized, and combined with the broadcast mechanism, the original tourist flow data sequence is superimposed to obtain a multi-layered spatiotemporally embedded tourist flow data sequence.
[0013] By combining adaptive adjacency matrix and multi-layer spatiotemporal embedding of tourist flow data sequences, and by embedding graph convolutional neural network into gated recurrent unit, the temporal features of tourist flow are extracted.
[0014] Based on the temporal characteristics of tourist flow and the constructed structured GRUs network, tourist flow prediction data at different time granularities are obtained. The structured GRUs network includes multiple single GRU networks. Different GRUs extract linear and nonlinear temporal features of the same sequence to obtain tourist flow prediction matrices at different time granularities.
[0015] Furthermore, the adaptive adjacency matrix constructed based on adaptive graph convolution and using a random initialization method includes:
[0016] An adaptive adjacency matrix method is used, combining the number of nodes and the feature dimension of each node, to construct a spatial embedding vector. This spatial embedding vector consists of two matrices. The structure consists of N, which refers to the number of nodes, and d, which refers to the feature dimension of each node.
[0017] Based on the two constructed matrices E1 and E2, the adjacency feature A of the nodes is represented by multiplication.
[0018] By filtering negative values using a modified linear unit function and standardizing matrix values using the SoftMax function, an adaptive adjacency matrix is obtained.
[0019] Furthermore, the tourist flow data sequence combining adaptive adjacency matrix and multi-layer spatiotemporal embedding is used to extract the temporal features of tourist flow by embedding a graph convolutional neural network into a gated recurrent unit, including:
[0020] The multi-layer spatiotemporal embedded tourist flow data sequence is split according to time step t. The split tourist flow data sequence is received by a gated recurrent unit, and a graph convolutional neural network is embedded into the gated recurrent unit to obtain the feature matrix after dimensional transformation. At this time, the dimension of the feature matrix is the dimension of the gated recurrent unit.
[0021] Based on the feature matrix after dimensional transformation and the output of the hidden layer at the previous time step, the temporal features of tourist flow at the current time step are obtained.
[0022] Furthermore, the transformation formula for the feature matrix after the dimension transformation is as follows:
[0023]
[0024] Where I is an N-order identity matrix, Let h represent the weights and biases of the linear transformation, respectively. t-1 It is the output of the hidden layer at the previous time step, resulting in the feature matrix after dimensional transformation. at this time, The dimension is the same as the dimension of the hidden layer of GRU.
[0025] Furthermore, the structured GRU network comprises multiple single GRU networks. Different GRUs extract linear and nonlinear time-domain features of the same sequence to obtain tourist flow prediction matrices at different time granularities, including:
[0026] The first GRU network is used to extract the linear time-domain features of the tourist flow time-domain features, and the second GRU network is used to extract the nonlinear time-domain features of the tourist flow time-domain features.
[0027] The linear and nonlinear time-domain features of tourist flow are processed through three linear units. The Hadamard product is then calculated between the linear and nonlinear time-domain features processed through the linear units to obtain three output features.
[0028] The hidden layers of the third, fourth, and fifth GRU networks are initialized using the three output features, respectively, to obtain the corresponding hidden layer output features;
[0029] The hidden layer output features are fused to obtain the final tourist flow prediction matrix.
[0030] Furthermore, at F time steps for predicting the next N nodes, the loss is calculated using the mean absolute error, and the model parameters are updated using the backpropagation gradient descent method.
[0031] A second aspect of the present invention provides a tourist flow prediction system based on a structured gated loop unit, comprising:
[0032] The data acquisition module is used to acquire tourist flow data sequences at different time granularities of the scenic area to be predicted. Each tourist flow data includes time, Beidou positioning location and number of tourists.
[0033] The adjacency matrix construction module is used to construct an adaptive adjacency matrix based on adaptive graph convolution and using a random initialization method.
[0034] The multi-layer spatiotemporal embedding module is used to randomly initialize the temporal embedding vector and spatial embedding vector of the tourist flow data sequence, and combine them with the broadcast mechanism to superimpose the original tourist flow data sequence to obtain the multi-layer spatiotemporal embedded tourist flow data sequence.
[0035] The temporal feature extraction module combines the adaptive adjacency matrix and multi-layer spatiotemporal embedding of tourist flow data sequences. By embedding a graph convolutional neural network into a gated recurrent unit, it extracts the temporal features of tourist flow at different time granularities.
[0036] The tourist flow prediction module is used to obtain tourist flow prediction data based on the time-domain characteristics of tourist flow and the constructed structured GRUs network. The structured GRUs network includes multiple single GRU networks. Different GRUs extract the linear and non-linear time-domain features of the same sequence to obtain tourist flow prediction matrices at different time granularities.
[0037] A third aspect of the present invention provides a computer-readable storage medium.
[0038] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the tourist flow prediction method based on BeiDou positioning and structured gating loop units as described above.
[0039] A fourth aspect of the present invention provides a computer device.
[0040] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the tourist flow prediction method based on BeiDou positioning and structured gating loop units as described above.
[0041] Compared with the prior art, the beneficial effects of the present invention are:
[0042] 1. This invention avoids the traditional method of using a predefined graph adjacency matrix to describe the topology. Instead of using a predefined adjacency matrix, it uses a method of randomly initializing the adjacency matrix and dynamically updating the adjacency matrix parameters during the learning process, which can achieve better prediction performance.
[0043] 2. This invention employs a structured GRU network, using multiple GRUs combined with nonlinear connection layers to extract more comprehensive features from the same time series. Compared to simple linearly connected GRU layers, the structured GRU has a smaller depth, which is beneficial to the accuracy of the prediction results.
[0044] 3. This invention employs a multi-layer spatiotemporal embedding method to map high-dimensional features to low-dimensional features and embed them before the recurrent network, which can effectively perform heterogeneity analysis between nodes.
[0045] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0046] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0047] Figure 1This is a flowchart of a tourist flow prediction method based on BeiDou positioning and structured gating loop unit provided by an embodiment of the present invention;
[0048] Figure 2 This is a schematic diagram of the structured GRU model provided in an embodiment of the present invention;
[0049] Figure 3 It is a traditional linear GRU;
[0050] Figure 4 This is an improved structured GRU provided in the embodiments of the present invention;
[0051] Figure 5 This is a bar chart showing the ablation experimental results of the structured GRU provided in this embodiment of the invention. Detailed Implementation
[0052] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0053] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0054] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0055] Terminology Explanation
[0056] The unique characteristics of the scenic area: The changing patterns of tourist flow vary depending on the scenic area and the different areas within the scenic area, exhibiting distinct temporal and spatial characteristics.
[0057] Correlation between scenic areas: Due to the mobility of tourists, there are complex correlations in the changes in visitor flow between areas. This correlation is the result of the combined effects of temporal and spatial correlations, and exhibits obvious multi-periodic characteristics.
[0058] Unexpected events: While tourist flow changes in scenic areas follow fixed temporal and spatial patterns, unexpected events such as pandemics, holidays, extreme weather, and tourist accidents can easily disrupt these patterns, making predictions highly uncertain.
[0059] To address the issue mentioned in the background of this invention, which uses a predefined graph adjacency matrix to describe the topology, the drawback of this method is that the adjacency state of the graph is a dynamic process that needs to be updated constantly during model iteration in order to obtain better performance, resulting in low prediction efficiency.
[0060] The purpose of this invention is to design a deep learning algorithm for MTS prediction based on GCN+GRU, namely Structured GRU, which outperforms other similar model algorithms in the past 5 years and achieves new breakthroughs on public datasets.
[0061] To achieve the above objectives, this invention avoids the aforementioned drawbacks and, instead of using a predefined adjacency matrix, employs a method of randomly initializing the adjacency matrix and dynamically updating its parameters during the learning process to obtain better performance. The specific technical solution is as follows:
[0062] (1) An adaptive adjacency matrix is constructed using a random initialization method;
[0063] (2) By using a multi-layer spatiotemporal embedding method, high-dimensional features are mapped to low-dimensional features and embedded into the recurrent network, which can effectively perform heterogeneity analysis between nodes.
[0064] (3) A structured GRU network is adopted, which uses multiple GRUs combined with nonlinear connection layers to extract more features from the same time series. Compared with simple linear connection GRU layers, the structured GRU has a smaller depth.
[0065] Example 1
[0066] like Figure 1 As shown, this embodiment provides a tourist flow prediction method based on BeiDou positioning and structured gating loop units, including the following steps:
[0067] Step 1: Obtain tourist flow data sequences at different time granularities for the scenic area to be predicted;
[0068] The data includes weekday time-granularity data X1, weekend time-granularity data X2, and holiday time-granularity data X3. Each tourist flow data point includes time, BeiDou positioning location, and tourist volume. The acquired tourist volume data sequences at different time granularities for the scenic area to be predicted are fused to obtain the historical tourist flow data sequence. Where T is the number of time steps in the sequence and N is the number of nodes.
[0069] Step 2: Based on adaptive graph convolution, an adaptive adjacency matrix is constructed using a random initialization method, specifically including:
[0070] Step 201: First, the adaptive adjacency matrix method is used to construct a spatial embedding vector by combining the number of nodes and the feature dimension of each node;
[0071] Spatial embedding vectors consist of two matrices The structure is as follows: N represents the number of nodes, and d represents the feature dimension of each node, both initially set randomly without any prior knowledge. The parameters are updated during the learning process. The two matrices E1 and E2 are represented as follows:
[0072] E1=rand(N,d), E2=rand(d,N),
[0073] Step 202: Based on the two constructed matrices E1 and E2, the adjacency feature A of the nodes is represented by multiplication;
[0074]
[0075] Two different spatial embedding matrices, E1 and E2, make the feature vector length of each node 2d, aiming to improve the model's fitting ability. Multiplying the two embedding matrices yields an N-order square matrix.
[0076] Step 203: Filter negative values by modifying the linear unit function (ReLU activation function) and normalizing the matrix values by normalizing the exponential function (SoftMax function) to obtain the adaptive adjacency matrix A.
[0077] Step 3: Multi-layer spatiotemporal embedding
[0078] The temporal and spatial embedding vectors of the tourist flow data sequence are randomly initialized, and then superimposed on the original tourist flow data sequence X using a broadcast mechanism to obtain a multi-layered spatiotemporally embedded tourist flow data sequence.
[0079] The temporal and spatial embedding vectors of the randomly initialized tourist flow data sequence are represented as follows:
[0080] t emb =rand(T),s emb =rand(N),
[0081] The sequence is added to the original sequence using a broadcast mechanism, and dimensionality is maintained through a linear layer, as shown below:
[0082]
[0083] Step 4: Temporal Feature Extraction
[0084] Combining the adaptive adjacency matrix A obtained in step 2 and the multi-layer spatiotemporal embedded tourist flow data sequence obtained in step 3 By embedding a graph convolutional neural network into a gated recurrent unit, the temporal features of tourist flow are extracted.
[0085] To extract the temporal features of the complete time series and prevent gradient vanishing and gradient exploding, the tourist flow data series... The matrix is split according to time step t. After receiving an input of length N, the GRU module calculates the graph convolution by combining it with the adaptive critical matrix A.
[0086] Specifically, a gated recurrent unit (GRU) is used to receive the split tourist flow data sequence. And the Graph Convolutional Network (GCN) is embedded into the GRU, represented as:
[0087]
[0088] Where I is an N-order identity matrix, Let h represent the weights and biases of the linear transformation, respectively. t-1 It is the output of the hidden layer at the previous time step, resulting in the feature matrix after dimensional transformation. at this time, The dimension is the same as the dimension of the GRU hidden layer, so there is no need to perform dimension transformation.
[0089] Therefore, the output of the hidden layer at the current time can be represented as:
[0090] h t =(1-z) t C t +z t h t-1 ,
[0091]
[0092] Among them, z t The gate output is updated at time t, σ is the sigmoid activation function, and r is the output of the gate. t The gate output is reset at time t, C t It is the memory cell at time t, which participates in the calculation of the hidden layer state at the next time step, h t W is the hidden layer state at time t. z ,b z It updates the trainable parameters of the gate, W. r ,b r These are the trainable parameters of the forget gate, W. c ,b c These are the trainable parameters of the memory unit.
[0093] Step 5: Structure GRUs network;
[0094] The regression performance of a single GRU is limited. To improve the model's performance, a structured multi-GRU network is adopted. The multi-GRU network consists of multiple single GRU networks, each extracting temporal features from the same sequence. The hidden layer outputs are aggregated, linearly transformed, and then the output is presented. The model structure is as follows: Figure 2 As shown.
[0095] First, different GRUs are used to extract linear and nonlinear time-domain features of the same sequence, resulting in the outputs of GRU(a) and GRU(b). and
[0096] Then and After passing through three linear units CONN, After additional sigmoid activation, and The Hadamard product is calculated in two parts, as follows:
[0097]
[0098] Finally, output the results. and The hidden layers of GRU(c), GRU(d), and GRU(e) are initialized respectively to obtain the corresponding hidden layer output features H. (c) H (d) and H (e) .
[0099] like Figure 3 As shown, the widely used linear GRU first inputs time-series data into the first GRU, then inputs the output into the next GRU, and finally uses the output of the last GRU to predict tourist flow. The drawback of this method for flow prediction is that the linear structure is too deep; only the output of the last layer participates in the calculation of the fully connected layer, affecting the final prediction result. The final prediction result includes the number of tourists at a specified scenic spot on a specified date, providing a scientific basis for cultural and tourism managers to make relevant service management measures, as well as transportation and accommodation arrangements.
[0100] Therefore, this embodiment improves this structure, such as Figure 4 As shown, the structured GRUs network constructed in step 5 has a connection module (CONN) that retains both the nonlinear characteristics of the GRU(a) output and the linear characteristics of the GRU(b) output, and fuses the two. The final prediction contains the outputs of three structured GRUs, which is three times the output of the linear GRU.
[0101] Step 6: Prediction and Loss Calculation;
[0102] The output H of all time steps of the last three GRUs (c) H (d) and H (e) After splicing and processing by a fully connected layer, the final result is obtained, as shown below:
[0103] H = [h] t-P+1 ,h t-P+2 ,...,h t ],
[0104]
[0105] Predict the next N nodes at F time steps, calculate the loss using the mean absolute error (MAE), update the model parameters using backpropagation gradient descent, select the Adam optimizer, and reduce the error during multiple iterations. The value is represented as:
[0106]
[0107] In the formula, For loss function The output value, To predict the visitor flow at the nth node at time step f, Let f be the actual visitor flow at the nth node at time step f.
[0108] The above scheme can be used to predict the number of tourists in the scenic area at different time granularities.
[0109] Comparative experiment
[0110] This invention evaluates the performance of the structured GRU on publicly available datasets and compares it with other models. Furthermore, ablation experiments are conducted by removing some important modules, and the effectiveness of these modules is verified by comparing their performance with the original model. The Performance Measure System (PeMS) includes four datasets as follows:
[0111] PeMS03: 358 nodes, 26209 time steps, start date September 1, 2018.
[0112] PeMS04: 307 nodes, 16992 time steps, start date January 1, 2018.
[0113] PeMS07: 883 nodes, 28224 time steps, start date May 1, 2017.
[0114] PeMS08: 170 nodes, 17856 time steps, start date July 1, 2016.
[0115] All four datasets underwent linear interpolation to fill in missing values, followed by standardization. Data was processed in 5-minute timesteps, with 288 timesteps per day. All data was divided into training, validation, and test sets in a 6:2:2 ratio.
[0116] Model Setup. To demonstrate the superiority of the model of this invention, a comparative model is introduced as follows:
[0117] DCRNN uses a Seq2Seq structure to integrate spatiotemporal features and a recurrent network to predict tourist data.
[0118] STGCN applies graph convolution to the spatial domain and two consecutive 1D convolutions to the temporal dimension in a sandwich structure.
[0119] GWNet uses spatial adaptive matrix learning to learn adjacency transformation rules, and dilated convolution is applied in the time dimension.
[0120] ASTGCN integrates multiple spatiotemporal attention mechanisms and uses convolution to dynamically capture spatiotemporal features.
[0121] STSGCN, with its sliding time window, slices long sequences, expanding local spatial awareness on each slice.
[0122] STFGNN generates a "temporal map" to compensate for the shortcomings of the "spatial map" and learns the hidden spatiotemporal dependencies.
[0123] STID applies spatiotemporal embeddings to the original sequence, concatenates the embedding results, and outputs them using a fully connected layer.
[0124] STGNCDE uses two neural control differential equations (NCDEs) to process spatiotemporal data separately and then merges them.
[0125] STSSL learns spatiotemporal heterogeneity through a self-supervised mechanism and improves the model's anti-interference ability by combining "heterogeneity perception enhancement".
[0126] GMAN uses an encoder-decoder that incorporates an attention mechanism, with an additional GRU for spatiotemporal feature integration.
[0127] StemGNN transforms the time domain to the frequency domain using Discrete Fourier Transform (DFT) and Graphical Fourier Transform (GFT), while simultaneously capturing spatiotemporal dependencies.
[0128] The historical time step was set to P=12, the prediction time step to F=12, the spatial embedding dimension to d=2, the GRU hidden layer dimension to H=64, and the batch size to 64. The experiment was conducted on an Intel(R) Xeon(R) Gold 6226R CPU and an NVIDIA GeForce RTX3090 GPU, with random number seeds set to 1 to 10, and the average value of multiple experimental results was taken.
[0129] Performance Experiments. This invention selected three evaluation metrics: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). The lower the value, the better the model performance.
[0130] The experimental results are shown in Table 1. The average values of the 11 baseline models across three evaluation metrics were calculated. Structured GRU (SGRU) achieved improvements of over 10%, especially with a significant 18.6% improvement in MAPE on the PeMS04 dataset. Except for the lower MAPE on the PeMS08 dataset compared to GMAN, SGRU achieved the best performance across all evaluation metrics. GMAN showed the second-best performance. GMAN uses a mechanism combining spatiotemporal attention with GRU, and its output incorporates L ST-Attention blocks. However, each block contains the correlation between two time steps, tj and t, resulting in overly fine temporal granularity and time step duplication. Therefore, its experimental results are inferior to SGRU.
[0131] Table 1 Comparison of test results between the method of this invention and other methods
[0132]
[0133] Ablation experiments. To verify the effectiveness of key modules of the structured GRU, the present invention provides the following variants:
[0134] • simple: The original model, using 5 linear GRUs, without multi-layer spatiotemporal embedding.
[0135] • w / st-emb: Adds multiple layers of spatiotemporal embedding on top of the simple model.
[0136] • w / struct: The five linear GRUs in the simple model were replaced with structured GRUs.
[0137] Due to the large size of the PeMS07 dataset, we conducted experiments on the PeMS03, PeMS04, and PeMS08 datasets sequentially. The evaluation metric was MAE. We varied the value of the time step F for predicting the future, setting it to F = 3, 6, 9, and 12 (corresponding to 15 minutes, 30 minutes, 45 minutes, and 60 minutes). The results are as follows: Figure 5 As shown.
[0138] The simple model performed the worst. Multi-layer spatiotemporal embedding improved the performance of the simple model. Structured GRUs also significantly improved the model's performance, and the final SGRU performed the best. It is proven that both important modules contribute to the model.
[0139] Example 2
[0140] This embodiment provides a tourist flow prediction system based on a structured gated loop unit, including:
[0141] The data acquisition module is used to acquire tourist flow data sequences at different time granularities of the scenic area to be predicted. Each tourist flow data includes time, Beidou positioning location and number of tourists.
[0142] The adjacency matrix construction module is used to construct an adaptive adjacency matrix based on adaptive graph convolution and using a random initialization method.
[0143] The multi-layer spatiotemporal embedding module is used to randomly initialize the temporal embedding vector and spatial embedding vector of the tourist flow data sequence, and combine them with the broadcast mechanism to superimpose the original tourist flow data sequence to obtain the multi-layer spatiotemporal embedded tourist flow data sequence.
[0144] The temporal feature extraction module is used to combine the adaptive adjacency matrix and the multi-layer spatiotemporal embedding of tourist flow data sequences, and extract the temporal features of tourist flow by embedding a graph convolutional neural network into a gated recurrent unit.
[0145] The tourist flow prediction module is used to obtain tourist flow prediction data at different time granularities based on the time-domain characteristics of tourist flow and the constructed structured GRUs network. The structured GRUs network includes multiple single GRU networks. Different GRUs extract the linear and non-linear time-domain features of the same sequence to obtain tourist flow prediction matrices at different time granularities.
[0146] Example 3
[0147] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the tourist flow prediction method based on BeiDou positioning and structured gating loop units as described above.
[0148] Example 4
[0149] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the tourist flow prediction method based on BeiDou positioning and structured gating loop unit as described above.
[0150] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0151] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0152] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0153] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0154] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0155] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A tourist flow prediction method based on Beidou positioning and structured gated recurrent unit, characterized in that, Includes the following steps: Obtain tourist flow data sequences at different time granularities for the scenic area to be predicted. Each tourist flow data point includes time, BeiDou positioning location, and number of tourists. An adaptive adjacency matrix is constructed based on adaptive graph convolution and using a random initialization method. The temporal and spatial embedding vectors of the tourist flow data sequence are randomly initialized, and combined with the broadcast mechanism, the original tourist flow data sequence is superimposed to obtain a multi-layered spatiotemporally embedded tourist flow data sequence. By combining adaptive adjacency matrix and multi-layer spatiotemporal embedding of tourist flow data sequences, and by embedding graph convolutional neural network into gated recurrent unit, the temporal features of tourist flow are extracted. Based on the time-domain characteristics of tourist flow and the constructed structured GRUs network, tourist flow prediction data at different time granularities are obtained. The structured GRUs network includes multiple single GRU networks. Different GRUs extract the linear and non-linear time-domain features of the same sequence to obtain tourist flow prediction matrices at different time granularities. The tourist flow data sequence, which combines an adaptive adjacency matrix and multi-layer spatiotemporal embedding, extracts the temporal features of tourist flow by embedding a graph convolutional neural network into a gated recurrent unit, including: The multi-layered spatiotemporally embedded tourist flow data sequence is arranged according to time steps. t The data is split into segments. The gated recurrent unit receives the segmented tourist flow data sequence and embeds the graph convolutional neural network into the gated recurrent unit to obtain the feature matrix after dimensional transformation. At this time, the dimension of the feature matrix is the dimension of the gated recurrent unit. Based on the feature matrix after dimensional transformation and the output of the hidden layer at the previous time step, the temporal features of the tourist flow at the current time step are obtained. The structured GRU network comprises multiple single GRU networks. Different GRUs extract linear and nonlinear time-domain features of the same sequence to obtain tourist flow prediction matrices at different time granularities, including: The first GRU network is used to extract the linear time-domain features of the tourist flow time-domain features, and the second GRU network is used to extract the nonlinear time-domain features of the tourist flow time-domain features. The linear and nonlinear time-domain features of tourist flow are processed through three linear units. The Hadamard product is then calculated between the linear and nonlinear time-domain features processed through the linear units to obtain three output features. The hidden layers of the third, fourth, and fifth GRU networks are initialized using the three output features, respectively, to obtain the corresponding hidden layer output features; The hidden layer output features are fused to obtain the final tourist flow prediction matrix. 2.The tourist flow prediction method based on Beidou positioning and structured gate cycle unit according to claim 1, characterized in that, The adaptive adjacency matrix, constructed using an adaptive graph convolution method and random initialization, includes: An adaptive adjacency matrix method is used, combining the number of nodes and the feature dimension of each node, to construct a spatial embedding vector. This spatial embedding vector consists of two matrices. Composition, among which, The number of nodes Refers to the feature dimension of each node; Based on the constructed two matrices By multiplying the adjacency features of the nodes ; By filtering negative values using a modified linear unit function and standardizing matrix values using the SoftMax function, an adaptive adjacency matrix is obtained. 3.The tourist flow prediction method based on Beidou positioning and structured gate cycle unit according to claim 1, characterized in that, The transformation formula for the feature matrix after the dimension transformation is: , in, yes An identity matrix of order 1. These represent the weights and biases of the linear transformation, respectively. It is the output of the hidden layer at the previous time step, resulting in the feature matrix after dimensional transformation. ,at this time, The dimension is the same as the dimension of the GRU hidden layer. Represents an adaptive adjacency matrix. This represents a sequence of tourist flow data with multiple spatiotemporal embeddings. According to time step The split tourist flow data sequence. 4.The tourist flow prediction method based on Beidou positioning and structured gate cycle unit according to claim 1, characterized in that, In predicting the future N nodes of The loss is calculated by the mean absolute error and the model parameters are updated by the backpropagation gradient descent method.
5. A tourist flow prediction system based on Beidou positioning and structured gated recurrent unit, for implementing the Beidou positioning and structured gated recurrent unit-based tourist flow prediction method of any one of claims 1-4, characterized in that, include: The data acquisition module is used to acquire tourist flow data sequences at different time granularities of the scenic area to be predicted. Each tourist flow data includes time, Beidou positioning location and number of tourists. The adjacency matrix construction module is used to construct an adaptive adjacency matrix based on adaptive graph convolution and using a random initialization method. The multi-layer spatiotemporal embedding module is used to randomly initialize the temporal embedding vector and spatial embedding vector of the tourist flow data sequence, and combine them with the broadcast mechanism to superimpose the original tourist flow data sequence to obtain the multi-layer spatiotemporal embedded tourist flow data sequence. The temporal feature extraction module is used to combine the adaptive adjacency matrix and the multi-layer spatiotemporal embedding of tourist flow data sequences, and extract the temporal features of tourist flow by embedding a graph convolutional neural network into a gated recurrent unit. The tourist flow prediction module is used to obtain tourist flow prediction data at different time granularities based on the time-domain characteristics of tourist flow and the constructed structured GRUs network. The structured GRUs network includes multiple single GRU networks. Different GRUs extract the linear and non-linear time-domain features of the same sequence to obtain tourist flow prediction matrices at different time granularities.
6. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the program is executed by the processor, it implements the steps in the tourist flow prediction method based on BeiDou positioning and structured gating loop unit as described in any one of claims 1-4.
7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the tourist flow prediction method based on BeiDou positioning and structured gating loop unit as described in any one of claims 1-4.
8. A program product, the program product being a computer program product comprising a computer program, characterized in that When the computer program is executed by the processor, it implements the steps in the tourist flow prediction method based on Beidou positioning and structured gating loop unit as described in any one of claims 1-4.