A long-time subway passenger flow prediction method based on deep tensor decomposition 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 insufficient spatial correlation modeling in long-term subway passenger flow forecasting are solved, and accurate and stable forecasting of passenger flow for the next few days is achieved.

CN121502728BActive Publication Date: 2026-07-14浙江众合科技股份有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
浙江众合科技股份有限公司
Filing Date
2025-11-21
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies for subway passenger flow forecasting, especially for long-term forecasting tasks, suffer from problems such as weak long-term capture capabilities, insufficient spatial correlation modeling, limited ability to express nonlinear patterns, and easy accumulation of long-term forecasting errors. These issues prevent the achievement of accurate and stable forecasting of subway passenger flow over several future days.

Method used

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.

Benefits of technology

By reconstructing the model through deep tensor decomposition, it is possible to extract the complex nonlinear spatial distribution patterns and temporal evolution patterns of subway passenger flow data. It has a strong ability to capture long-term dependencies and model spatial correlations, thereby improving the accuracy and stability of long-term predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502728B_ABST
    Figure CN121502728B_ABST
Patent Text Reader

Abstract

The application provides a long-time subway passenger flow prediction method based on deep tensor decomposition reconstruction, relates to the technical field of rail transit operation planning, and has the advantages that by representing subway passenger flow data as a three-dimensional tensor of station, time slice and date dimensions, the spatial and temporal characteristics of the subway passenger flow data are decoupled and represented, and corresponding spatial, temporal and date latent factors are initialized for each dimension, then the latent factors are nonlinearly transformed and feature enhanced through a deep convolutional neural network, so that the complex nonlinear spatial distribution pattern and time evolution pattern of the subway passenger flow data can be extracted, then a reconstruction result is obtained through tensor reconstruction, the tensor decomposition reconstruction model based on the deep neural network constructed from this can be used for predicting the passenger flow tensor, and finally a vector autoregressive model is introduced to impose a time dynamic constraint on the date latent factor, so that the model has long-term prediction capability, thereby realizing accurate and stable prediction of future multi-day (long-time) subway passenger flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rail transit operation planning technology, and in particular to a long-term subway passenger flow prediction method based on deep tensor decomposition and reconstruction. Background Technology

[0002] Predicting passenger flow in urban subways has always been a key issue in intelligent transportation systems and operation planning. In existing technologies, researchers have proposed a variety of methods for passenger flow prediction, which mainly include the following categories: (1) Traditional time series models, such as ARIMA and SARIMA. These models assume that the passenger flow time series meets a certain stationarity and are more effective in modeling linear trends. In short-term prediction, ARIMA and other methods can achieve certain results, but because traffic passenger flow data often has obvious nonlinear and non-stationary characteristics, these models are difficult to capture complex patterns. (2) Traditional machine learning methods, such as support vector machines (SVM) and random forests. These methods usually require manual design of input features, such as historical passenger flow averages and peak features. The model learns the mapping relationship with future passenger flow based on the features. However, manual feature extraction is difficult to fully depict the deep patterns of passenger flow, and the ability to mine patterns from massive data is limited. (3) Deep learning time series models, such as recurrent neural networks (RNN), long short-term memory networks (LSTM), and gated recurrent units (GRU). These models do not require manual feature extraction and can automatically learn time-dependent patterns from 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 spatiotemporal sequence with linkage effects between different stations, and simple LSTM and other models cannot handle spatial relationships. (4) Deep spatiotemporal fusion model, typical algorithms include ST-GCN, CNN+LSTM, etc. This type of model incorporates spatial structure information into the deep model. First, it uses CNN, GCN, etc. to extract the spatial adjacency relationship of the transportation network, and then combines it with LSTM and other methods to model spatial and temporal features at the same time. However, it still faces challenges in handling long-term periodic patterns across days and weeks and dealing with fluctuations caused by abnormal events. (5) Multidimensional data decomposition model, typical algorithms include LATC, BTTF, etc. This type of method regards subway passenger flow data as a high-order tensor containing dimensions such as station-time-date. The classic low-rank tensor decomposition assumes that the passenger flow tensor can be generated by a linear combination of a few latent patterns, thereby extracting the implicit dominant patterns through decomposition. It can uncover typical daily variation patterns of daytime passenger flow, passenger flow factors of different stations, etc. However, its inherent linear model assumption limits its ability to characterize complex nonlinear relationships in the real world, and it is also quite sensitive to data noise.

[0003] Considering the distinct cyclical patterns of subway passenger flow (such as differences between weekday and weekend patterns and seasonal variations), as well as abnormal fluctuations caused by unforeseen events, traditional models can fit trends using recent data within a short timeframe. However, for predictions spanning multiple days or even longer periods, their ability to capture long-term dependencies is insufficient. Many time-series-focused models (such as traditional ARIMA and LSTM) only consider the temporal changes in passenger flow at a single station or overall, neglecting the interactive effects between different stations. The subway network is an organic whole; changes in passenger flow at one station often interact with those at neighboring or functionally similar stations. While methods like tensor decomposition can extract the implicit multimodal structures in passenger flow data, traditional low-rank decomposition is essentially a linear model, requiring the data to be approximately linearly decomposable. Real-world passenger flow data contains numerous nonlinear relationships and noise interference, making it difficult for simple linear factors to characterize complex patterns.

[0004] In summary, existing technologies for subway passenger flow forecasting, especially for long-term forecasting tasks, suffer from problems such as weak long-term reliance on data capture capabilities, insufficient spatial correlation modeling, limited ability to express nonlinear patterns, and easy accumulation of long-term forecasting errors. Therefore, existing forecasting methods or models cannot achieve accurate and stable forecasting of subway passenger flow over multiple days (long-term). Summary of the Invention

[0005] To address the aforementioned problems in existing technologies, this invention provides a long-term subway passenger flow prediction method based on deep tensor decomposition and reconstruction. This method decouples the spatial and temporal features of subway passenger flow data, extracts complex nonlinear spatial distribution patterns and temporal evolution patterns through deep neural networks, and combines a vector autoregression model to constrain the time factor sequence, thereby achieving accurate and stable prediction of passenger flow over multiple future days.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] 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.

[0008] 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.

[0009] 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.

[0010] 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.

[0011] 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.

[0012] 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.

[0013] 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.

[0014] 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.

[0015] 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.

[0016] 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.

[0017] Compared with the prior art, the present invention has the following beneficial technical effects:

[0018] 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

[0019] 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.

[0020] 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

[0021] 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.

[0022] Please refer to Figure 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:

[0023] 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.

[0024] 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).

[0025] 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.

[0026] 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).

[0027] 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.

[0028] 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.

[0029] 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.

[0030] 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.

[0031] 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:

[0032] 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.

[0033] 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;

[0034] 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.

[0035] 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.

[0036] 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:

[0037] 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;

[0038] 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;

[0039] S43. Use the vector autoregression model as a dynamic constraint for the tensor decomposition and reconstruction model, and train them together.

[0040] 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.

[0041] 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:

[0042] (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.:

[0043]

[0044] 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.

[0045] (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.

[0046] 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.

[0047] 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:

[0048] (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:

[0049]

[0050] 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.

[0051] (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 :

[0052]

[0053] 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:

[0054]

[0055] 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:

[0056]

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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:

[0061] 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:

[0062] For the prediction of the first sky:

[0063]

[0064] 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:

[0065]

[0066] 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.

[0067] 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:

[0068] 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.

[0069] 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:

[0070] 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.

[0071] 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.

[0072] 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.

[0073] 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.

[0074] 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; 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.

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, 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.

6. 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.

7. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 5, 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.

8. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 5, 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.

9. The long-term subway passenger flow prediction method based on depth tensor decomposition and reconstruction according to claim 5, characterized in that, The joint loss function, reconstruction loss function, and time dynamic loss function all use mean squared error as the loss.