Long-time subway passenger flow prediction method based on deep tensor decomposition and reconstruction
By representing subway passenger flow data as a three-dimensional tensor and combining it with deep neural networks and vector autoregression models, the problems of long-term dependence and spatial correlation modeling in long-term subway passenger flow forecasting are solved, and accurate and stable forecasting of passenger flow for multiple future days is achieved.
Patent Information
- Application Number
- CN202511718908.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-11-21
AI Technical Summary
Existing technologies for long-term subway passenger flow forecasting suffer from problems such as weak long-term reliance on capture capabilities, insufficient spatial correlation modeling, limited ability to express nonlinear patterns, and easy accumulation of long-term forecasting errors, making it impossible to achieve accurate and stable forecasting of subway passenger flow for several days in the future.
The subway passenger flow data is represented as a three-dimensional tensor. Nonlinear spatial distribution patterns and temporal evolution patterns are extracted through deep neural networks. The time factor sequence is constrained by a vector autoregression model. A prediction model based on deep tensor decomposition and reconstruction is constructed to achieve accurate and stable prediction of passenger flow over multiple future days.
By reconstructing the model through deep tensor decomposition, it is possible to accurately capture the complex nonlinear spatial distribution and temporal evolution patterns of subway passenger flow data. It has strong capabilities in capturing long-term dependencies and modeling spatial correlations, thereby improving the reliability of long-term predictions.
Smart Images

Figure CN121502728A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of rail transit operation planning, and particularly relates to a long-term subway passenger flow prediction method based on deep tensor decomposition reconstruction. BACKGROUND
[0002] The prediction of urban subway passenger flow has always been a key problem in intelligent transportation systems and operation planning. In the prior art, researchers have proposed a variety of methods for passenger flow prediction, mainly including the following categories: (1) traditional time series models, typical models include ARIMA, SARIMA, etc. This kind of model assumes that the passenger flow time series satisfies certain stationarity, and is effective for modeling linear trends. In short-term prediction, ARIMA and other methods can achieve certain results, but due to the obvious nonlinear and non-stationary characteristics of traffic passenger flow data, these models are difficult to capture complex patterns. (2) Traditional machine learning methods, typical algorithms include support vector machines (SVM), random forests, and other traditional machine learning algorithms. These methods usually need to manually design input features, such as historical passenger flow averages, peak characteristics, etc. The model learns the mapping relationship between the features and the future passenger flow, but manual feature extraction is difficult to fully capture the deep rules of passenger flow, and the ability to mine patterns from massive data is limited. (3) Deep learning time series models, typical algorithms include recurrent neural networks (RNN), long short-term memory networks LSTM, gated recurrent units GRU, etc. This kind of model does not need to extract features manually, and can automatically learn the time dependence pattern from the data. LSTM can remember the passenger flow trend within a certain time range, and is usually more accurate than traditional models in short-term prediction. However, subway passenger flow is a spatio-temporal sequence, and different stations have a linkage effect, and simple LSTM and other models cannot handle spatial relationships. (4) Deep spatio-temporal fusion models, typical algorithms include ST-GCN, CNN+LSTM, etc. This kind of model incorporates spatial structure information into the deep model, first uses CNN, GCN, etc. to extract the spatial adjacency relationship of the traffic network, and then combines with LSTM, etc. to model both spatial and temporal features, but it still faces challenges in handling long-term periodic patterns across days and weeks and responding to fluctuations caused by abnormal events. (5) Multidimensional data decomposition model, typical algorithms include LATC, BTTF, etc. This kind of method regards subway passenger flow data as a high-order tensor containing station-time-date dimensions. The classic low-rank tensor decomposition assumes that the passenger flow tensor can be generated by a linear combination of a few latent patterns, so as to extract the dominant patterns hidden by decomposition, which can mine typical daily variation patterns of daily passenger flow and passenger flow factors of different stations, but the linear model assumption limits its ability to describe complex nonlinear relationships in the real world, and it is sensitive to data noise.
[0003] Considering that subway passenger flow has obvious periodic patterns (such as the difference between weekdays and weekends, seasonal changes), and abnormal fluctuations caused by emergencies, the traditional model can fit the trend through recent data in a short time range, but for cross-day or even longer time span prediction, it is not enough to capture long-term dependencies. Many time series focused models (such as traditional ARIMA, LSTM, etc.) only focus on the time variation of a single station or the overall passenger flow, and do not consider the interaction of passenger flow between different stations. Subway network is an organic whole, and the passenger flow change of a station often links with its adjacent stations or functionally similar stations. While using tensor decomposition and other methods can extract the multi-modal structure implied in passenger flow data, traditional low-rank decomposition is essentially a linear model, which requires data to meet the approximate linear decomposability. There are a large number of nonlinear relationships and noise interference in real passenger flow data, and simple linear factors are difficult to describe complex patterns.
[0004] In summary, the existing technology has the problems of weak long-term dependence capture ability, insufficient spatial correlation modeling, limited nonlinear pattern expression ability, and easy accumulation of long-term prediction error in subway passenger flow prediction, especially in long-term prediction tasks. Therefore, accurate and stable prediction of future multi-day (long-term) subway passenger flow cannot be achieved through existing prediction methods or models. SUMMARY
[0005] To solve the above problems existing in the prior art, the present application provides a long-term subway passenger flow prediction method based on deep tensor decomposition reconstruction. This method decouples the spatial and temporal characteristics of subway passenger flow data, extracts complex nonlinear spatial distribution patterns and temporal evolution patterns through deep neural networks, and combines vector autoregressive models to constrain the time factor sequence, thereby achieving accurate and stable prediction of future multi-day passenger flow.
[0006] To achieve the above purpose, the present application provides the following technical solutions: A long-term subway passenger flow prediction method based on deep tensor decomposition and reconstruction includes: S1. Representing subway passenger flow data as a three-dimensional tensor with three dimensions: station dimension, time slice dimension, and date dimension; wherein, the station dimension corresponds to each station in the subway network, the time slice dimension corresponds to multiple time periods divided in a day, and the date dimension corresponds to multiple consecutive dates; the elements in the three-dimensional tensor represent passenger flow containing information in the three dimensions; S2. Initializing the corresponding spatial latent factors, temporal latent factors, and date latent factors for the station dimension, time slice dimension, and date dimension of the three-dimensional tensor respectively, and establishing the spatial latent factor matrix and the temporal latent factor matrix. S3. For each initialized latent factor matrix, equip it with a parameter-independent one-dimensional deep convolutional neural network to perform nonlinear transformation and feature enhancement on the corresponding latent factor matrix, and then obtain the reconstruction result through tensor reconstruction, thereby constructing a tensor decomposition and reconstruction model based on deep neural network; S4. Introduce a vector autoregression model to apply time dynamic constraints to the date latent factors, and jointly train the tensor decomposition and reconstruction model and the vector autoregression model based on the acquired historical subway passenger flow data; S5. Use the trained vector autoregression model and tensor decomposition and reconstruction model to predict the subway passenger flow tensor for the next few days.
[0007] The present invention provides a preferred embodiment, in S2, the spatial latent factor matrix is used to characterize the passenger flow pattern characteristics corresponding to each station; the temporal latent factor matrix is used to reflect the typical change pattern of passenger flow in each time period of the day; and the date latent factor matrix is used to describe the implicit characteristics of the overall passenger flow status on each date.
[0008] This invention provides a preferred embodiment, S3 including: S31. Designing one-dimensional deep convolutional neural networks with identical structures and independent parameters for the initialized spatial latent factor matrix, temporal latent factor matrix, and date latent factor matrix respectively; S32. Encoding and decoding each input latent factor matrix through its respective one-dimensional deep convolutional neural network to obtain the corresponding enhanced high-order feature representation; S33. Reconstructing the three high-order feature representations through a CP tensor to generate the passenger flow reconstruction value of each element in the tensor, which is used as the reconstruction result, thereby constructing a tensor decomposition and reconstruction model based on a deep neural network.
[0009] The present invention provides a preferred embodiment in which the one-dimensional deep convolutional neural network adopts the UNet network. The UNet network is a neural network with an encoder-decoder symmetric structure, used for feature extraction of one-dimensional vectors.
[0010] This invention provides a preferred embodiment. In step S4, the introduction of a vector autoregression model to impose a time dynamic constraint on the date latent factors includes: S41. Splitting the date latent factor matrix into multiple multidimensional vectors by row, each representing the date latent factor for each day, thereby obtaining the date latent factor state vector for each day; S42. Assuming that the date latent factor state vector for each day follows a... The first-order vector autoregression process yields a vector autoregression model, used to characterize the past. The linear influence of the latent date factor of the day on the latent date factor of the current day; S43. Use the vector autoregression model as a dynamic constraint for the tensor decomposition and reconstruction model, and train them together.
[0011] This invention provides a preferred embodiment. In step S4, joint training is performed by constructing a joint loss function. The joint loss function is obtained by establishing the reconstruction loss function of the tensor decomposition reconstruction model and the time dynamic loss function of the vector autoregression model. With the goal of minimizing the joint loss, the learnable parameters in the tensor decomposition reconstruction model and the learnable parameters in the vector autoregression model are uniformly optimized, iteratively updating the parameters until the joint loss converges, obtaining the optimal parameters. The learnable parameters in the tensor decomposition reconstruction model include deep network weights, spatial latent factors, temporal latent factors, and date latent factors. The learnable parameters in the vector autoregression model include the autoregression coefficient matrix. The reconstruction loss function measures the difference between the reconstructed value output by the tensor decomposition reconstruction model and the true value. The time dynamic loss function measures the difference between the date latent factor predicted by the vector autoregression model and the date latent factor actually obtained in the current iteration of the deep tensor decomposition reconstruction model.
[0012] The present invention provides a preferred solution, S5 including: using the trained vector autoregressive model, taking the date latent factors of the last few days as the initial state, iteratively extrapolating and predicting the date latent factors of the next few days; inputting the predicted date latent factors of the next few days together with the existing spatial latent factors and temporal latent factors into the trained deep tensor decomposition and reconstruction model to reconstruct the subway passenger flow tensor of the next few days.
[0013] This invention provides a preferred solution. In S4, an end-to-end joint training method is adopted to simultaneously update the deep network weights, spatial latent factors, temporal latent factors, date latent factors, and autoregressive coefficient matrix; the gradient descent algorithm is used to calculate the gradient of all parameters and iteratively optimize them together.
[0014] This invention provides a preferred embodiment in which the joint loss function adopts a dynamic weighting strategy, setting weight coefficients for the time dynamic loss in the joint loss function; and gradually increasing the weight coefficients during the training process.
[0015] The present invention provides a preferred embodiment in which the mean square error is used as the loss in the joint loss function, the reconstruction loss function, and the time dynamic loss function.
[0016] Compared with the prior art, the present invention has the following beneficial technical effects: This invention provides a long-term subway passenger flow prediction method based on deep tensor decomposition and reconstruction. This method represents subway passenger flow data as a three-dimensional tensor including station, time slice, and date dimensions, decoupling the spatial and temporal features of the data. It initializes corresponding spatial, temporal, and date latent factors for each dimension, and then uses a deep convolutional neural network to perform nonlinear transformation and feature enhancement on these latent factors. This allows for the extraction of complex nonlinear spatial distribution and temporal evolution patterns in the subway passenger flow data. The reconstruction results are then obtained through tensor reconstruction. The resulting deep neural network-based tensor decomposition and reconstruction model can be used to predict passenger flow tensors, exhibiting strong long-term dependency capture capabilities, sufficient spatial correlation modeling, and strong nonlinear pattern expression. Finally, a vector autoregression model is introduced to impose temporal dynamic constraints on the date latent factors, enabling the model to have long-term predictive capabilities. Simultaneously, a joint training framework is constructed, using historical subway passenger flow data to jointly train the tensor decomposition and reconstruction model and the vector autoregression model. This ensures that the evolution of the date latent factors automatically conforms to the rules of the vector autoregression model, improving the reliability of long-term prediction and achieving accurate and stable prediction of subway passenger flow over multiple days (long-term). Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 The flowchart illustrates a long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction, as provided in a specific embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Please refer toFigure 1 In one optional implementation, the long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction of the present invention is mainly implemented through the following steps: S1. Represent the subway passenger flow data as a three-dimensional tensor with three dimensions: station dimension, time slice dimension, and date dimension. The station dimension corresponds to each station in the subway network, the time slice dimension corresponds to multiple time periods divided in a day, and the date dimension corresponds to multiple consecutive dates. The elements in the three-dimensional tensor represent passenger flow containing information from the three dimensions.
[0021] This step involves representing passenger flow data as a tensor. Specifically, historical subway passenger flow data is acquired and represented as a three-dimensional tensor. This three-dimensional tensor contains the following dimensions: station dimension (corresponding to each station in the subway network), time slice dimension (corresponding to multiple time periods divided within a day, such as intervals of 5 minutes, 10 minutes, or 15 minutes), and date dimension (corresponding to multiple consecutive dates). Elements in the tensor... Indicates the first The first day The time slice in the first The passenger flow of each station. This embodiment utilizes past data. Historical data tensor of the day To predict the future Passenger flow of the day ,in and Configure according to requirements (e.g.) It can be a 30-day history. (It can be a 7-day forecast).
[0022] S2. Initialize the corresponding spatial latent factors, temporal latent factors, and date latent factors for the site dimension, time slice dimension, and date dimension of the three-dimensional tensor, respectively, and establish the spatial latent factor matrix, temporal latent factor matrix, and date latent factor matrix.
[0023] This step is the process of initializing latent factors. Specifically, it involves introducing a corresponding latent factor representation for each dimension of the tensor, i.e., establishing the spatial latent factor matrix, the temporal latent factor matrix, and the date latent factor matrix. Specifically, let... is the dimension of the latent factor (i.e., the rank of the tensor decomposition).
[0024] Spatial latent factor matrix Among them, the first row vector Indicates site of Wei Qianke said, "Characteristics of the site" The corresponding passenger flow pattern characteristics; N is the total number of online sites.
[0025] Time latent factor matrix Among them, the first row vector Indicates time slice of The potential value represents the typical pattern of passenger flow during that time period of the day, such as the different time characteristics of the morning peak, evening peak, and off-peak; M is the total number of time periods, and when the sampled data is of the 5M time period type, M=288.
[0026] Date latent factor matrix Among them, the first row vector Indicates date of The latent representation is used to describe the implicit characteristics of the overall passenger flow status on that date, such as the difference in patterns between weekdays and weekends; T is the length of the historical data date.
[0027] During model initialization, the element values in the aforementioned latent factor matrices can be randomly initialized. (Latent factor dimension) It is an adjustable hyperparameter, and a moderate value is usually chosen based on experience and data complexity to ensure that it has sufficient expressive power without excessively increasing the amount of computation.
[0028] S3. For each initialized latent factor matrix, a parameter-independent one-dimensional deep convolutional neural network is provided to perform nonlinear transformations and feature enhancements on the corresponding latent factor matrix. Then, the reconstruction result is obtained through tensor reconstruction, thereby constructing a tensor decomposition and reconstruction model based on a deep neural network. In a preferred embodiment, S3 is specifically implemented through the following steps: S31. Design one-dimensional deep convolutional neural networks with identical structures and independent parameters for the initialized spatial latent factor matrix, temporal latent factor matrix, and date latent factor matrix, respectively. S32. For each input latent factor matrix, after encoding and decoding by its respective one-dimensional deep convolutional neural network, the corresponding enhanced high-order feature representation is obtained; S33. The three higher-order feature representations are reconstructed through the CP tensor to generate the passenger flow reconstruction value of each element in the tensor, which is used as the reconstruction result. In this way, a tensor decomposition and reconstruction model based on deep neural network (also known as: deep tensor decomposition and reconstruction model) is constructed.
[0029] The above steps describe the construction process of the deep tensor decomposition reconstruction model. Specifically, a deep neural network-based tensor decomposition reconstruction model is constructed to fuse the aforementioned latent factors to approximately reconstruct the original passenger flow tensor. This involves considering the spatial latent factor matrix. Time latent factor matrix Date latent factor matrix One-dimensional UNet networks with identical structures but independent parameters are designed for each input factor vector. UNet is a symmetric encoder-decoder neural network originally used for image semantic segmentation; in this invention, it is simplified for feature extraction from one-dimensional vectors. The one-dimensional UNet extracts global trends through multi-layer downsampling (dimensionality compression), then gradually restores the dimension through symmetric upsampling, while simultaneously fusing information from different scales via skip connections. This structure can capture both local detail patterns in factor vectors and preserve overall pattern information. For each input factor vector, after encoding and decoding by its respective one-dimensional UNet network, an enhanced higher-order representation is obtained. Subsequently, these three higher-order feature representations are reconstructed using CP tensors to obtain the reconstructed result. CP tensor reconstruction uses matrix operations to... U , V , W Reorganized into a three-dimensional tensor of passenger flow data.
[0030] S4. Introduce a vector autoregression model to impose a time-dynamic constraint on the date latent factor, and jointly train the tensor decomposition reconstruction model and the vector autoregression model based on the acquired historical subway passenger flow data. In a preferred embodiment, for step S4, the introduction of the vector autoregression model to impose a time-dynamic constraint on the date latent factor is specifically implemented through the following steps: S41. Split the date latent factor matrix into multiple multidimensional vectors by row, which are the date latent factors for each day, thereby obtaining the date latent factor state vector for each day; S42. Assume that the latent factor state vector for each day follows a... The first-order vector autoregression process yields a vector autoregression model, used to characterize the past. The linear relationship between the latent factor of the day and the latent factor of the current day; S43. Use the vector autoregression model as a dynamic constraint for the tensor decomposition and reconstruction model, and train them together.
[0031] In a preferred embodiment, for step S4, joint training is performed by constructing a joint loss function. The joint loss function is obtained by establishing the reconstruction loss function of the tensor decomposition reconstruction model and the time dynamic loss function of the vector autoregression model. With the goal of minimizing the joint loss, the learnable parameters in the tensor decomposition reconstruction model and the learnable parameters in the vector autoregression model are uniformly optimized, iteratively updating the parameters until the joint loss converges to obtain the optimal parameters. The learnable parameters in the tensor decomposition reconstruction model include deep network weights, spatial latent factors, temporal latent factors, and date latent factors. The learnable parameters in the vector autoregression model include the autoregression coefficient matrix. The reconstruction loss function measures the difference between the reconstructed value output by the tensor decomposition reconstruction model and the true value. The time dynamic loss function measures the difference between the date latent factor predicted by the vector autoregression model and the date latent factor actually obtained in the current iteration of the deep tensor decomposition reconstruction model. In a more preferred embodiment, for joint training, an end-to-end joint training method is adopted, simultaneously updating the deep network weights, spatial latent factors, temporal latent factors, date latent factors, and autoregressive coefficient matrix; the gradient descent algorithm is used to calculate the gradients of all parameters, and the optimization is performed iteratively. In a preferred embodiment, the joint loss function adopts a dynamic weighting strategy, setting weight coefficients for the temporal dynamic loss in the joint loss function; the weight coefficients are gradually increased during training.
[0032] More specifically, in step S4, regarding model training, on the one hand, the training of the tensor decomposition reconstruction model based on deep neural networks is conducted using historical data to learn the optimal latent factors and network parameters, enabling the model to reconstruct known data and possess predictive capabilities. The training process includes the following key points: (1) Loss function: Establish the reconstruction loss function This measures the difference between the reconstructed values and the true values from the depth tensor decomposition reconstruction model. This invention preferably uses mean squared error as the loss, i.e.: in The predicted value output by the model. The MSE (Mean Street Experience) loss represents the actual passenger flow values from historical data. By minimizing the MSE loss, the model can reproduce historical passenger flow patterns as accurately as possible.
[0033] (2) Parameter optimization strategy: All learnable parameters in the model are uniformly optimized, including deep network weights and spatial, temporal, and date latent factors. This differs from traditional tensor decomposition, which requires alternating solutions for each factor. In this invention, end-to-end gradient descent is used for synchronous adjustment. A feasible optimization algorithm is the Adam adaptive gradient algorithm or the stochastic gradient descent method. During training, tensor samples are extracted in a certain batch to calculate the gradient, and the parameters are iteratively updated until the loss converges.
[0034] Through the training described above, the model will learn the latent factor representations for each station, time slice, and date. The deep tensor decomposition and reconstruction model can interpret the spatiotemporal structure of historical passenger flow tensors in a nonlinear manner without relying on external information. It should be noted that the above training process is an explanation for ease of technical understanding. In this embodiment, the tensor decomposition and reconstruction model is not trained separately, but rather jointly trained with the vector autoregression model.
[0035] On the other hand, to enable the model to have long-term predictive power, this invention introduces a Vector Autoregression (VAR) model in the date dimension to dynamically constrain the date latent factor matrix, thereby learning its predictive ability in the date dimension. The specific steps are as follows: (1) The present invention uses the aforementioned date latent factor matrix By splitting by row, we can get indivual dimensional vector , respectively representing day 1, day 2, ..., day 3. The latent factors of the day (i.e., the implicit representation of the daily global passenger flow pattern). This embodiment will... Considered as in the The latent factor state vector of day (dimension: ).assumed Obey one A vector autoregression process of order X. Mathematically expressed as: in for dimensional autoregressive coefficient matrix ( ), The noise term is typically assumed to have a mean of 0 and that each dimension is independently and identically distributed. The VAR model represents the past... The linear relationship between the latent factors of a day and the latent factors of the current day can capture the stationary linear correlation structure of latent patterns in a date series over time.
[0036] (2) This invention uses these Vector Autoregression (VAR) coefficient matrices as parameters to be learned, and integrates VAR dynamic constraints into the training process of the deep tensor decomposition reconstruction model to form a joint training framework. Initially, A near-zero random matrix is set, and its optimal value is then learned progressively through joint training. Joint training allows the evolution of the date latent factors to automatically conform to the patterns of the VAR model, thereby improving the reliability of long-term predictions. The joint loss function is integrated with the original reconstruction loss. Based on this, the time dynamic loss corresponding to VAR constraints is introduced. First, based on the past data obtained from the depth tensor decomposition reconstruction model in the current iteration... Date potential factors Using VAR model to predict the first Day's latent factors : Next The actual iterative optimization of the depth tensor decomposition reconstruction model gives... By comparison, the VAR constraint error is defined as the root mean square error of both: in express Norm. The deviation of the date latent factor matrix from the VAR relationship was measured, and it was constrained to satisfy the VAR(p) process as much as possible. Finally, the joint total loss was defined as the sum of the two parts: in To weigh the importance of the two losses (dynamic weighting coefficient). By adjusting The value of can control the degree to which the model emphasizes reconstruction accuracy and time dynamic constraints: When the potential factors are larger, more emphasis is placed on the stable dynamic consistency of the potential factors; when the potential factors are smaller, more emphasis is placed on the accurate fitting of historical passenger flow.
[0037] In application, an end-to-end joint training method is adopted to train the deep network parameters and latent factor matrix. and VAR coefficient matrix Simultaneously update. Calculate using the gradient descent algorithm. The gradients of all parameters are iteratively optimized together. In the early stages of training, a smaller gradient is initially used. Training allows the model to fully learn the basic spatiotemporal structure, ensuring that the reconstruction error is small enough; subsequently, the size is gradually increased. Weights guide the model to focus on the temporal consistency of date factors. A dynamic weighting strategy helps the model first capture the main patterns, then fine-tunes them to conform to long-term dynamics, improving predictive stability.
[0038] S5. Using the trained vector autoregression model and tensor decomposition reconstruction model, predict the subway passenger flow tensor for the next few days. In a preferred embodiment, S5 is specifically implemented through the following steps: using the trained vector autoregression model, with the date latent factors of the last few days as the initial state, iteratively extrapolate to predict the date latent factors for the next few days; input the predicted date latent factors for the next few days, together with the existing spatial latent factors and temporal latent factors, into the trained deep tensor decomposition reconstruction model to reconstruct the subway passenger flow tensor for the next few days.
[0039] More specifically, after joint training, it can be used for passenger flow prediction over several days. The prediction process reconstructs the optimal parameters of the training model using deep tensor decomposition and the optimal parameters of the VAR model, and mainly includes the following sub-steps: Future Date Latent Factor Prediction: Since the number of days to be predicted in the future does not have a corresponding real date factor in the training data, it needs to be extrapolated using a VAR model. Assume that the final date factor at the end of training has been obtained. Day's date factor sequence Based on VAR ( p ) model, using the previous p The data from the previous day is used to regress the data from the current day, and the factors for the future are calculated using an iterative method: For the prediction of the first sky: get As the first The latent factors of the sky can be represented. Similarly, the latent factors of the sky can be represented. Merging sequence,( The original length of the sequence is T×r. The length of the W matrix is 1×r. After merging, the length of the W matrix becomes (T+1)×r. Continue calculating the th... Daily passenger flow: This process continues until the desired number of days for prediction is obtained. All future date factors In this process, each step uses the factors predicted at the previous moment as the input for the next moment, thus achieving multi-step forward calculation.
[0040] The predicted date latent factors for the next few days are then input together with the existing spatial and temporal latent factors into the trained deep tensor decomposition and reconstruction model to reconstruct the subway passenger flow tensor for the next few days, as follows: Will , , The three latent factors are reorganized into (N×M×(T+H)) passenger flow data through CP tensor reconstruction. The additional N×M×H passenger flow data is the passenger flow data of M time periods per day for N stations in the future H days.
[0041] The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction of the present invention, based on the above specific embodiments, can achieve the following beneficial technical effects: 1) By employing a deep neural network to perform nonlinear decomposition of the passenger flow tensor, this invention is able to extract complex spatial correlation patterns and temporal evolution laws from historical data; at the same time, the VAR model ensures the grasp of long-term trends and periodicity during prediction.
[0042] 2) This invention uses a deep tensor decomposition framework to enable the model to consider data from all stations and all time periods simultaneously, thus capturing the collaborative change patterns between stations in the subway network.
[0043] 3) This invention uses low-rank factors (three low-rank latent factors U, V, and W) to compress and represent data, which has the effect of dimensionality reduction and noise filtering. Combined with the nonlinear fitting ability and regularization constraints (VAR dynamic constraints) of deep networks, it has good generalization performance for unseen data.
[0044] 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.
[0045] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. Furthermore, the above embodiments only illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. For those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A long-term subway passenger flow prediction method based on deep tensor decomposition and reconstruction, characterized in that, include: S1. Represent the subway passenger flow data as a three-dimensional tensor with three dimensions: station dimension, time slice dimension, and date dimension. The station dimension corresponds to each station in the subway network, the time slice dimension corresponds to multiple time periods divided in a day, and the date dimension corresponds to multiple consecutive dates. The elements in the three-dimensional tensor represent passenger flow containing information from the three dimensions. S2. Initialize the corresponding spatial latent factors, temporal latent factors, and date latent factors for the site dimension, time slice dimension, and date dimension of the three-dimensional tensor, respectively, and establish the spatial latent factor matrix, temporal latent factor matrix, and date latent factor matrix; S3. Equip each initialized latent factor matrix with a parameter-independent one-dimensional deep convolutional neural network to perform nonlinear transformation and feature enhancement on the corresponding latent factor matrix, and then obtain the reconstruction result through tensor reconstruction, thereby constructing a tensor decomposition and reconstruction model based on deep neural network. S4. Introduce a vector autoregression model to impose a time dynamic constraint on the date latent factor, and jointly train the tensor decomposition reconstruction model and the vector autoregression model based on the acquired historical subway passenger flow data; S5. Using the trained vector autoregressive model and tensor decomposition reconstruction model, predict the subway passenger flow tensor for the next few days.
2. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 1, characterized in that, In S2, the spatial latent factor matrix is used to characterize the passenger flow pattern features corresponding to each station; the temporal latent factor matrix is used to reflect the typical change patterns of passenger flow in different time periods of the day; and the date latent factor matrix is used to describe the implicit features of the overall passenger flow status on each date.
3. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 1, characterized in that, S3 include: S31. Design one-dimensional deep convolutional neural networks with identical structures and independent parameters for the initialized spatial latent factor matrix, temporal latent factor matrix, and date latent factor matrix, respectively. S32. For each input latent factor matrix, after encoding and decoding by its respective one-dimensional deep convolutional neural network, the corresponding enhanced high-order feature representation is obtained; S33. The three higher-order feature representations are reconstructed through the CP tensor to generate the passenger flow reconstruction value of each element in the tensor, which is used as the reconstruction result, thereby constructing a tensor decomposition and reconstruction model based on a deep neural network.
4. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 1 or 3, characterized in that, The one-dimensional deep convolutional neural network uses the UNet network, which is a neural network with an encoder-decoder symmetric structure used for feature extraction of one-dimensional vectors.
5. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 1, characterized in that, In S4, the introduction of the vector autoregressive model imposes a time-dynamic constraint on the date latent factor, including: S41. Split the date latent factor matrix into multiple multidimensional vectors by row, which are the date latent factors for each day, thereby obtaining the date latent factor state vector for each day; S42. Assume that the latent factor state vector for each day follows a... The first-order vector autoregression process yields a vector autoregression model, used to characterize the past. The linear relationship between the latent factor of the day and the latent factor of the current day; S43. Use the vector autoregression model as a dynamic constraint for the tensor decomposition and reconstruction model, and train them together.
6. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 5, characterized in that, In S4, joint training is performed by constructing a joint loss function, which is obtained by establishing the reconstruction loss function of the tensor decomposition reconstruction model and the time dynamic loss function of the vector autoregression model. With the goal of minimizing the joint loss, the learnable parameters in the tensor decomposition reconstruction model and the learnable parameters in the vector autoregression model are uniformly optimized, iteratively updating the parameters until the joint loss converges to obtain the optimal parameters. The learnable parameters in the tensor decomposition reconstruction model include deep network weights, spatial latent factors, temporal latent factors, and date latent factors, while the learnable parameters in the vector autoregression model include the autoregression coefficient matrix. The reconstruction loss function measures the difference between the reconstructed value output by the tensor decomposition reconstruction model and the true value; the time dynamic loss function measures the difference between the date latent factor predicted by the vector autoregression model and the date latent factor actually obtained in the current iteration of the deep tensor decomposition reconstruction model.
7. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 1, characterized in that, S5 includes: using the trained vector autoregressive model, taking the date latent factors of the last few days as the initial state, iteratively extrapolating and predicting the date latent factors of the next few days; inputting the predicted date latent factors of the next few days together with the existing spatial latent factors and temporal latent factors into the trained deep tensor decomposition and reconstruction model to reconstruct the subway passenger flow tensor of the next few days.
8. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 6, characterized in that, In S4, an end-to-end joint training method is adopted to simultaneously update the deep network weights, spatial latent factors, temporal latent factors, date latent factors, and autoregressive coefficient matrix; the gradient descent algorithm is used to calculate the gradient of all parameters and iteratively optimize them together.
9. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 6, characterized in that, The joint loss function employs a dynamic weighting strategy, setting weight coefficients for the time dynamic loss in the joint loss function; these weight coefficients are gradually increased during training.
10. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 6, characterized in that, The joint loss function, reconstruction loss function, and time dynamic loss function all use mean squared error as the loss.
Citation Information
Patent Citations
A real-time station flow prediction method based on a neural network space-time attention mechanism
CN109919358A
Subway passenger flow prediction method and device based on subway line network site similarity
CN112686428A
Depth map convolution short-time passenger flow prediction method and system, medium, equipment and terminal
CN115759441A
System, method, and computer readable storage medium for auto-regressive wavenet variational autoencoders for alignment-free generative protein design and fitness prediction
US20230326543A1