Subway-shared bicycle joint demand prediction method based on robust tensor clustering and double-expert collaborative architecture
By constructing a robust tensor clustering and dual-expert collaborative architecture, the robustness of multi-source data and time series modeling problems in joint demand forecasting of subway and shared bicycles were solved, achieving high-precision joint forecasting and improving the stability and adaptability of the forecast.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies for joint demand forecasting of subways and shared bicycles suffer from poor robustness to multi-source traffic data, insufficient multi-scale time series modeling capabilities, and difficulty in explicitly modeling the temporal dependencies of behavioral chains, resulting in insufficient prediction accuracy and generalization ability.
We adopt a method based on robust tensor clustering and a dual-expert collaborative architecture. By constructing a third-order spatiotemporal tensor for decomposition, we extract low-rank normal components and sparse abnormal components. Combining the site clustering results and robust spatiotemporal latent features, we construct a multi-source joint feature vector. In the dual-expert collaborative prediction model, we explicitly model the behavioral sequence relationship between subway and shared bicycles for joint prediction.
It improves the accuracy and reliability of joint demand forecasting for subways and shared bicycles, can stably express spatiotemporal characteristics in the presence of noise and anomalies, automatically identifies potential pattern structures between stations, explicitly models the causal relationships of travel behavior chains, and enhances the real-time performance and causal rationality of the forecast.
Smart Images

Figure CN121745995A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation systems and artificial intelligence data prediction technology, and particularly relates to a joint demand prediction method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture. Background Technology
[0002] Subways and shared bicycles exhibit significant spatial connectivity and temporal synchronization fluctuations, peak coupling, and potential mutual influence, resulting in a clear spatiotemporal correlation structure for their combined demand. The order of behavior between the two modes may also differ depending on the commuting phase and station function. For example, in scenarios primarily involving subway entry, passengers typically park and lock shared bicycles before entering the station, while in scenarios primarily involving subway exit, passengers often unlock and use shared bicycles after leaving the station. This difference in behavioral sequence due to different travel chain directions leads to complex coupling relationships and dynamic temporal structures in subway passenger flow and shared bicycle usage across various scenarios, posing higher demands on joint modeling and prediction. Although the synergistic relationship of multimodal transportation has received attention in urban traffic management and academic research, existing demand forecasting methods still mainly focus on the independent modeling of single modes of transportation. Traditional time series forecasting models, such as ARIMA, SARIMA, and various methods based on exponential smoothing, are generally built on a linear autoregressive framework. While they can characterize the periodicity and trend changes of a single series to some extent, they struggle to effectively handle the nonlinear coupling characteristics between multi-source transportation data, such as subway and shared bicycle data, and cannot explicitly represent the sequential relationship between different modes of transportation in the travel chain within the model structure. With the development of deep learning technology, neural network-based models such as LSTM, GRU, and TCN have shown relatively good fitting ability in single-modal long-sequence forecasting tasks. However, their network structures typically treat multi-modal data as parallel multi-dimensional input features, lacking an explicit modeling mechanism for the behavioral chain logic of "using one mode of transportation first, then another" in multi-modal transportation systems.
[0003] However, existing technologies still face several key challenges in jointly predicting demand for subway and shared bicycle services: First, at the data level, multi-source traffic data generally exhibits high dimensionality, strong noise, and frequent outliers. Traditional dimensionality reduction and clustering methods are sensitive to outliers, leading to unstable feature representation and affecting the robustness of the prediction model. Second, at the temporal modeling level, existing methods struggle to simultaneously consider multi-scale temporal features and station heterogeneity, and lack explicit modeling of the temporal dependencies between subway and shared bicycle services caused by behavioral chains, limiting prediction accuracy. Third, at the system architecture level, there is a lack of a unified technical solution that can handle robustness of high-dimensional data, multi-scale temporal modeling, and consistency of multi-modal behavioral logic, resulting in insufficient generalization ability and interpretability of existing methods in complex real-world traffic scenarios.
[0004] Therefore, this invention proposes a joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention proposes a joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture, thereby resolving the issues present in the existing technologies.
[0006] To achieve the above objectives, this invention provides a joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture, comprising:
[0007] Based on subway passenger flow data and shared bicycle usage data, a third-order spatiotemporal tensor is constructed. The third-order spatiotemporal tensor is decomposed to obtain low-rank normal components and sparse abnormal components.
[0008] Partial Tucker decomposition of the low-rank normal components yields site clustering results and robust spatiotemporal latent features;
[0009] By integrating the site clustering results, the robust spatiotemporal latent features, the anomaly indicators extracted from the sparse anomaly components, the temporal features, and the historical lag features, a multi-source joint feature vector is constructed.
[0010] The multi-source joint feature vector is input into the dual-expert collaborative prediction model. In the dual-expert collaborative prediction model, based on the sequential relationship between the behavior of the subway and shared bicycles in the scenario to be predicted, the output of the upstream prediction expert is used as a future covariate and input to the downstream prediction expert.
[0011] Through a rolling forecasting mechanism, the upstream forecasting experts and downstream forecasting experts collaboratively output joint forecasting results for subway passenger flow and shared bicycle demand.
[0012] Optionally, the process of constructing a third-order spatiotemporal tensor based on subway passenger flow data and shared bicycle usage data includes:
[0013] A station-level spatiotemporal dataset was constructed based on subway passenger flow data and shared bicycle usage data.
[0014] The site-level spatiotemporal dataset is subjected to time alignment, spatial mapping, anomaly filtering, and standardization to obtain preprocessed multi-source data.
[0015] A three-dimensional structuring method is used to organize the data in three dimensions: site, date, and intraday time period, to obtain a third-order spatiotemporal tensor.
[0016] Optionally, the process of decomposing the third-order spacetime tensor to obtain low-rank normal components and sparse anomalous components includes:
[0017] The third-order spatiotemporal tensor is processed using a low-rank sparse decomposition method to construct an objective function that includes a reconstruction error term, a sparse regularization term, and a low-rank constraint term.
[0018] Orthogonal constraints are applied to the factor matrix, and an alternating optimization strategy is used to solve the objective function to obtain low-rank normal components and sparse abnormal components.
[0019] Optionally, the process of performing partial Tucker decomposition on the low-rank normal components to obtain site clustering results and robust spatiotemporal latent features includes:
[0020] Based on the low-rank normal components, a partial Tucker decomposition method is used to process them to obtain the core tensor and the corresponding orthogonal factor matrix.
[0021] A subspace self-expression constraint is introduced into the space of the core tensor to construct a self-expression matrix representing the similarity between sites;
[0022] A symmetric site affinity matrix is generated based on the self-expression matrix;
[0023] The site affinity matrix is processed using a spectral clustering algorithm to obtain the site clustering results;
[0024] The robust spatiotemporal latent features are obtained by extracting site feature vectors from the core tensor.
[0025] Optionally, the process of constructing a multi-source joint feature vector includes:
[0026] The site clustering results are one-hot encoded to form static classification features;
[0027] Spatiotemporal features are extracted based on the robust spatiotemporal latent features;
[0028] Based on the aforementioned sparse and abnormal components, abnormal indicators are extracted;
[0029] The static classification features, spatiotemporal features, anomaly indicators, time features, and historical lag features are fused to obtain a multi-source joint feature vector.
[0030] Optionally, the dual-expert collaborative prediction model includes: a shared bicycle prediction expert model and a subway prediction expert model; wherein, a multi-scale neural interpolation structure is used to construct the shared bicycle prediction expert model and the subway prediction expert model.
[0031] Optionally, the process of configuring a collaborative prediction mechanism based on the sequential relationship between the behavior of the subway and shared bicycles in the scenario to be predicted includes:
[0032] When predicting the number of subway arrivals and the number of shared bicycle locks, the shared bicycle prediction expert is used as the upstream prediction expert, and the subway prediction expert is used as the downstream prediction expert.
[0033] When predicting subway exits and shared bicycle unlocks, subway prediction experts are used as upstream prediction experts, and shared bicycle prediction experts are used as downstream prediction experts.
[0034] Optionally, the process of outputting joint prediction results based on the rolling prediction mechanism includes:
[0035] S1. Based on historical observation data and the multi-source joint feature vector, call the upstream prediction expert to perform rolling prediction and obtain the prediction result sequence of upstream transportation modes in the future several time steps;
[0036] S2. Construct a mixed covariate sequence that includes the historical true values of upstream transportation modes and the predicted result sequence;
[0037] S3. Input the mixed covariate sequence and the multi-source joint feature vector into the downstream prediction expert to obtain the predicted value of the downstream traffic mode;
[0038] S4. Repeat S1-S3 until the entire prediction interval is covered, and output the joint prediction results of subway passenger flow and shared bicycle demand.
[0039] Compared with the prior art, the present invention has the following advantages and technical effects:
[0040] This method, based on robust tensor clustering and a dual-expert collaborative architecture, effectively improves the accuracy and reliability of joint demand forecasting for subways and shared bicycles. By constructing a third-order spatiotemporal tensor and employing low-rank sparse decomposition, stable spatiotemporal patterns and anomalous disturbances in the original data are separated, making the feature extraction process more robust to noise such as holidays and sudden weather events, resulting in more stable spatiotemporal latent features. Clustering analysis based on partial Tucker decomposition and subspace self-expression constraints can automatically identify passenger flow similarities between stations, forming station groups with actual physical meaning, and improving the model's generalization ability to different functional stations. The constructed dual-expert collaborative prediction architecture explicitly models the causal relationship between subways and shared bicycles in the travel behavior chain, ensuring that the information flow direction is consistent with the actual travel logic, solving the fundamental problem of traditional methods that simply splice multi-modal data and fail to reflect the sequence of behaviors. This architecture supports a configurable collaborative prediction mechanism, which can flexibly adapt to different connection scenarios, and ensures the real-time performance and causal rationality of the prediction through a rolling prediction process. Ultimately, this method achieves high-precision joint prediction of subway passenger flow and shared bicycle demand, providing reliable technical support for the coordinated scheduling and dynamic allocation of resources for urban multimodal transportation. Attached Figure Description
[0041] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0042] Figure 1 This is an overall flowchart of an embodiment of the present invention;
[0043] Figure 2 This is a structural thermogram of the tensor in an embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram of the dual-expert collaborative prediction model structure, taking the number of subway entries and the number of shared bicycle locks as examples in an embodiment of the present invention.
[0045] Figure 4 This is a system architecture diagram of an embodiment of the present invention. Detailed Implementation
[0046] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0047] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0048] Example 1
[0049] This invention aims to address the strong coupling, multi-scale nature, and temporal differences in behavioral chains exhibited by subway passenger flow and shared bicycle usage demand in urban multimodal transportation systems. It seeks to resolve common problems in existing technologies for joint prediction, such as unstable feature representation, insufficient temporal modeling capabilities, inability to reflect causal structures between modes, and weak robustness to multi-source anomaly data. This invention seeks to construct a collaborative prediction method that can simultaneously achieve robust feature extraction from high-dimensional spatiotemporal data, automatic identification of potential station pattern structures, high-precision modeling of multimodal temporal dependencies, and collaborative prediction that conforms to the sequential logic of actual travel behavior within a unified framework. By improving the accuracy and stability of joint prediction for subway and shared bicycle transportation, this invention provides reliable data support and decision-making basis for dynamic scheduling, resource optimization, connection service design, and supply-demand balance management of urban transportation systems.
[0050] like Figure 1 and Figure 4 As shown, this embodiment provides a joint demand prediction method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture, including the following steps:
[0051] Step 1: Data Collection and Preprocessing. Urban subway passenger flow data and shared bicycle usage data are collected and preprocessed to construct a station-level spatiotemporal dataset containing subway entry and exit data, shared bicycle unlocking and locking data. The data undergoes time alignment, spatial mapping, anomaly filtering, and standardization.
[0052] Furthermore, the collection and preprocessing of urban traffic data includes: acquiring data such as passenger flow entering and exiting subway stations, station numbers, station latitude and longitude, and timestamps; mapping the unlocking and locking of shared bicycles to corresponding stations based on the spatial neighborhood of subway stations; performing time-scale unification processing on multi-source data, normalizing the time granularity to a preset resolution, and limiting the daily statistical range to the target operating period; removing, imputing, or smoothing missing values, outliers, and data segments that deviate significantly from the norm; and performing dimensionless standardization processing on subway passenger flow and shared bicycle usage.
[0053] As a specific implementation method of this embodiment, subway data for the target area is first collected. Data fields include station number, station name in Chinese, start time of time period, passenger flow entering the subway, passenger flow exiting the subway, and station longitude and latitude. Then, combining the shared bicycle association ratio map within different associated ranges around the subway station, a radius threshold is selected as the spatial distance connecting the subway and shared bicycle data. Based on this threshold, the unlocking and locking counts of shared bicycles are collected within this threshold range. The time granularity can be 15 minutes or 1 hour, and the spatial granularity is at the station level. Next, weekday data is filtered out, eliminating date samples that significantly impact the data due to major holidays and large-scale events. Finally, several subway stations are selected as research objects (for example, 139 stations are ultimately selected from the data of a certain city, but this invention is not limited to this number). Subsequently, the time range of the original data is uniformly restricted, only counting passenger flow and shared bicycle usage for each station during the time period from 6:00 to 23:00. The average weekday passenger flow can be calculated to describe the long-term level. To eliminate dimension differences and improve the comparability of data between different sites, the z-score normalization method is used to perform dimensionless processing on passenger flow and shared bicycle usage. The calculation formula is as follows:
[0054]
[0055] in, These are the original observations. Let be the mean of the sequence. The standard deviation is given. These preprocessing steps lay the foundation for subsequent tensor construction and feature extraction.
[0056] Step 2: Constructing a tensor decomposition model. Based on the preprocessed multi-source data, a third-order spatiotemporal tensor with site, date, and intraday time dimensions is constructed. A robust tensor decomposition model is established based on low-rank sparse decomposition to decompose the original tensor into low-rank normal components and sparse anomalous components.
[0057] Furthermore, such as Figure 2 As shown, the method for constructing a third-order spacetime tensor includes: Each site Date and The intraday time periods are organized in a fixed order into a three-dimensional data structure, where the tensor contains the first... The site, the Heaven, the First The data elements for each time period represent the usage of the subway or shared bicycles at that station during the corresponding time. Based on the low-rank assumption, the tensor is decomposed into a low-rank structure that reflects the steady-state pattern and a sparse anomaly structure that reflects temporary disturbances.
[0058] Furthermore, the method for robust tensor decomposition of the third-order spatiotemporal tensor includes: constructing an objective function containing a reconstruction error term, a sparse regularization term, and a low-rank constraint term; applying orthogonal constraints on the factor matrix; and using an alternating optimization strategy to update the low-rank tensor, sparse tensor, and core tensor respectively, so that the model can extract a stable spatiotemporal latent structure in the presence of noise, anomalous events, and irregular fluctuations.
[0059] As a specific implementation method in this embodiment, this step aims to achieve the classification of subway stations and the extraction of deep spatiotemporal features through a low-rank robust subspace tensor clustering model. This method can simultaneously complete tensor decomposition, anomaly detection, and subspace clustering within the same framework, effectively overcoming the error accumulation problem in traditional step-by-step processing methods, and exhibiting strong robustness to outliers in the data. The following is the method for constructing the tensor decomposition model.
[0060] Regarding tensor data construction, third-order tensors are constructed using the subway passenger flow data (entry and exit) and shared bicycle lock / unlock data (preprocessed in step one):
[0061]
[0062] in, Indicates the number of sites. Indicates the number of days in a week. This represents the number of time periods divided into segments within a day. Each tensor element... Indicates the first The site at the Heaven, the First This tensor structure represents the passenger flow or shared bicycle usage during specific time periods. It fully preserves the demand distribution information for each station throughout the week, providing a rich spatiotemporal feature foundation for subsequent analysis.
[0063] In tensor model construction, it is assumed that the original tensor can be decomposed into the sum of normal mode components (low-rank part) and abnormal components (sparse part), that is:
[0064]
[0065] in, As a normal component, it has low-rank characteristics and reflects the stable pattern of passenger flow at the station or the use of shared bicycles. These are anomalous components, exhibiting sparsity, representing abnormal fluctuations caused by holidays, unexpected events, etc.
[0066] In determining the tensor decomposition parameters, after establishing the tensor decomposition model, the decomposition rank parameters need to be determined through a data-driven adaptive search (grid search). The value to be determined. First, a candidate set is defined. ), For each set of parameters, the complete LRTSC algorithm is run to calculate the corresponding normalized cut index and tensor reconstruction error. The optimal rank is selected by comparative experiments to achieve an overall balance between reconstruction error and clustering stability.
[0067] Step 3: Subspace Clustering and Feature Extraction. Partial Tucker decomposition is performed on the low-rank components. Subspace self-expression constraints are introduced into the core tensor space to construct a self-expression matrix and generate a site affinity matrix based on it. The clustering results and robust spatiotemporal latent features of the sites are obtained through spectral clustering.
[0068] Furthermore, the method of introducing subspace self-expression constraints into the core tensor space includes: enabling the feature representation of each station in the core tensor to be reconstructed through a linear combination of other stations, and realizing the expression of similarity between stations by solving the self-expression matrix; constructing a symmetric affinity matrix based on the self-expression matrix, and using spectral clustering to classify the stations to obtain the potential pattern structure of subway and shared bicycles between different stations.
[0069] As a specific implementation of this embodiment, based on the model built in step two, in order to further characterize the potential subspace structure between sites, the low-rank components are... Perform partial Tucker decomposition:
[0070]
[0071] in, For the core tensor; and These are orthogonal factor matrices for the day dimension and the time period dimension, respectively, used to capture the correlation between the dimensions; and These are low-rank dimension parameters.
[0072] Based on this, an optimization objective function is established, comprising four key components: first, a tensor reconstruction error term, used to ensure consistency between the decomposed data and the original observations; second, a self-expressive subspace clustering term based on the core tensor, used to learn the low-dimensional subspace structure between sites; third, a sparse regularization term for the outlier term, used to promote anomaly detection; and fourth, a regularization term, used to control model complexity. The entire optimization process requires consideration of the factor matrix. and Solving under the constraint of column orthogonal matrices, this optimization process can simultaneously yield the self-expression matrix and the core tensor. , Day pattern factor matrix Time pattern factor matrix and abnormal tensors .
[0073] For the algorithm, a coordinate descent method is used for iterative optimization. Each iteration updates each variable block sequentially, mainly including: updating the self-expression matrix through closed-form solutions; updating the outlier tensor through soft thresholding operators; updating the core tensor by solving linear systems; and updating the orthogonal factor matrix by solving the orthogonal Procrustes problem through singular value decomposition. Model parameters can be tuned using grid search combined with normalized cut indices to ensure optimal clustering results. After the algorithm converges, a symmetric affinity matrix is constructed using the final self-expression matrix. This affinity matrix represents the similarity of sites in the low-rank robust subspace.
[0074] In terms of station classification, a spectral clustering algorithm is applied to divide the affinity matrix, automatically generating clustering results for stations. The number of clusters can be determined by analyzing the eigenvalue spectrum of the Laplacian matrix. The inherent spatiotemporal patterns of each station category can be determined by analyzing the slices corresponding to that category on the core tensor, combined with the factor matrix and its 3D visualization results, to identify the usage patterns of subways and shared bicycles, such as morning peak, evening peak, or balanced usage. Simultaneously, the Jaccard similarity between shared bicycles and subways under different modes can be calculated to uncover the complementarity and correlation between multimodal transportation demands.
[0075] Step 4: Constructing the joint prediction dataset for cluster fusion. Site cluster labels, core tensor features, anomaly indicators, and site static attributes, temporal features, and lag features are fused to form a multi-source joint feature vector for model input.
[0076] Furthermore, the method for constructing joint feature vectors includes: performing one-hot encoding on the above-mentioned site clustering labels to form static classification features; extracting feature vectors from the core tensor or factor matrix as spatiotemporal latent features; extracting anomalous amplitude, anomalous frequency, or anomalous weight from sparse anomalous components as anomalous indicators; and fusing the above features with time features, lag features, and site attribute features to obtain joint features that characterize the state of the site in different time periods.
[0077] In a specific implementation of this embodiment, the site clustering results obtained in step two are transformed into static input features that can be used for the prediction model. Specifically, based on the results of low-rank robust subspace tensor clustering, a corresponding category label is assigned to each subway station. Each category represents a station type with similar spatiotemporal passenger flow characteristics, such as morning peak, evening peak, or balanced. Subsequently, the clustering labels are one-hot encoded to obtain a dimension of [missing information]. The site category feature matrix, where For the number of stations, This represents the number of cluster categories. This feature matrix serves as the static input to the prediction model, reflecting the differences in travel patterns across different stations. This provides prior information for the subsequent N-HiTS dual-expert collaborative prediction model, helping the model distinguish the operational patterns of different station types and improving prediction accuracy and generalization ability. By combining time features, lag features, and anomaly indicators, a joint prediction dataset containing multi-source information can be constructed, providing richer input for deep learning models.
[0078] Step 5: Construct a dual-expert collaborative prediction model based on N-HiTS. For example... Figure 3 As shown, a collaborative prediction architecture consisting of two prediction experts is constructed, where the shared bicycle prediction expert is used to predict the number of shared bicycles unlocked or locked, and the subway prediction expert is used to predict the number of subway entries or exits.
[0079] Furthermore, the construction of the dual-expert collaborative prediction architecture includes: establishing a first prediction expert model for shared bicycle demand, which is used to predict the number of shared bicycles unlocked or locked at multiple future time steps based on joint feature vectors; establishing a second prediction expert model for subway passenger flow, which is used to predict the number of subway passengers entering or leaving the station based on joint feature vectors and future covariates; both expert models are built based on a multi-scale neural interpolation structure to extract trends, periodicity, and short-term fluctuations in time series data in a hierarchical manner.
[0080] As a specific implementation of this embodiment, the dual-expert architecture is illustrated by taking the joint prediction of subway entry volume and shared bicycle lock volume as an example. Those skilled in the art can extend this architecture to other multi-mode combination scenarios such as subway exit volume and shared bicycle unlock volume without departing from the spirit of this invention.
[0081] In this embodiment, a deep learning prediction system based on "independent experts and collaborative prediction" is designed. This system is based on the N-HiTS model and constructs two independent but interconnected "expert" models: one focusing on predicting subway entry volume (subway expert), and the other focusing on predicting shared bicycle lockout volume (bicycle expert). Collaborative prediction of subway and shared bicycle demand is achieved through one-way information transmission.
[0082] In terms of model structure, the N-HiTS model employs hierarchical interpolation and multi-scale feature extraction mechanisms. Each expert model consists of multiple stacked N-HiTS blocks. Within each N-HiTS block, the input time series is first decomposed into multiple components at different scales through a series of convolutional filter banks. Specifically, for the input sequence... ( For the backtracking window length, Given the input feature dimension, its multiscale decomposition can be expressed as:
[0083]
[0084] in, The total number of preset scales, For the first Subsequences at each scale. Subsequently, the model modulates the components at each scale. Nonlinear mapping and hierarchical interpolation are performed separately. The interpolation process is achieved through deconvolution, upsampling the low-resolution prediction signal to the original temporal resolution. Its core steps can be represented as follows:
[0085]
[0086] in, In order to target the Interpolation functions at various scales (such as linear or spline interpolation). These are the learnable parameters. Finally, the predictions after upsampling at all scales are summed and residually concatenated with the projections of the input sequence to form the final output of the block. :
[0087]
[0088] in, The linear projection weights are used for the residual connections. This structure enables the model to process patterns with different periodicities in parallel, significantly improving its ability to fit subway and shared bicycle passenger flow data with complex time structures.
[0089] In terms of input feature design, the input features for the subway entry prediction expert include time features (one-hot encoding of hours, days of the week, and whether it is a weekday), lag features (entry and locking volumes of the previous and several time periods), static category features (encoded from the clustering results in step three), and a future covariate as the core logic (predicted locking volumes of shared bicycles from the bicycle expert). The input features for the shared bicycle locking prediction expert are symmetrical, including time features, lag features, static category features, and optional subway-related covariates. All input features need to be standardized or normalized, then fused through a fully connected layer, and subsequently input into an N-HiTS stacked block for multi-level temporal feature extraction.
[0090] Two expert models are set as global models and trained on time-series data from all stations. They are combined with the static category features generated in step three to learn the commonalities and differences in travel behavior among different types of stations.
[0091] Step Six: Configure a collaborative prediction mechanism. Determine the sequential relationship between the two modes of transportation in the behavior chain based on the specific travel chain scenario. Input the prediction results of the transportation mode located upstream in the behavior chain as a future covariate into the prediction expert located downstream in the behavior chain, thereby forming a configurable one-way information transmission mechanism.
[0092] Furthermore, methods for determining the sequential relationship between the two modes of transportation include: selecting the direction of the behavior chain based on different scenarios of the prediction task. For example, when predicting the number of subway arrivals and the number of shared bicycle locks, the method determines that the behavior of locking shared bicycles precedes the behavior of entering the subway, and the prediction result of shared bicycles is used as a future covariate input into the subway prediction expert; when predicting the number of subway departures and the number of shared bicycle unlocks, the method determines that the behavior of leaving the subway precedes the behavior of unlocking shared bicycles, and the prediction result of the subway is used as a future covariate input into the shared bicycle prediction expert.
[0093] As a specific implementation method of this embodiment, this step aims to accurately configure the collaborative prediction mechanism between the two expert models according to the specific travel chain scenario, so as to ensure that the direction of information flow is strictly consistent with the causal logic in real travel behavior.
[0094] First, the sequential relationship between the two modes of transportation in the behavioral chain is clarified based on the specific scenario of the prediction task. For example, when the prediction target is the number of subway arrivals and the number of shared bicycle locks, the behavioral logic is that passengers lock the shared bicycles first, and then enter the subway station. Therefore, in this scenario, the shared bicycle locking behavior precedes the subway entry behavior, and the shared bicycle prediction expert is defined as the upstream expert, while the subway prediction expert is defined as the downstream expert. Conversely, when the prediction target is the number of subway exits and the number of shared bicycle unlocks, the behavioral logic is that passengers leave the subway station first, and then unlock and use the shared bicycles. In this scenario, the subway exit behavior precedes the shared bicycle unlocking behavior, and the subway prediction expert becomes the upstream expert, while the shared bicycle prediction expert becomes the downstream expert.
[0095] Then, in terms of mechanism configuration, the prediction results of transportation modes located upstream in the behavior chain are used as future covariates and input into the prediction expert model located downstream in the behavior chain. This mechanism is reflected at the model level as follows: the input to the downstream expert model (such as a subway station entry expert) includes a sequence of covariates representing the future demand of the upstream transportation modes. During the training phase, the sequence uses the true values. In the prediction phase, the predicted values output by the upstream expert model are used. This configurable one-way information transmission mechanism fundamentally ensures that the direction of information flow is consistent with the causal logic of the real travel chain, overcoming the shortcomings of existing models that simply splice together multi-mode data and fail to reflect the sequence of behaviors.
[0096] Step Seven: Model Training, Collaborative Prediction, and Performance Evaluation. Execution and performance evaluation of collaborative prediction. In the prediction phase, upstream prediction experts are first invoked to perform rolling predictions based on historical observation data. Then, the rolling prediction results, along with joint features, are input into downstream prediction experts to obtain predicted values for subway passenger flow or shared bicycle demand, achieving joint prediction of multi-modal transportation demand.
[0097] Furthermore, the rolling prediction process includes: at the start of the prediction, using historical observation data as input, calling an expert model upstream of the behavior chain to obtain prediction results for multiple future time steps; at the next time step, inputting the predicted value along with other joint features into the downstream expert model to obtain the predicted value of the target mode; repeating the above process until the entire prediction interval is covered, thereby achieving collaborative prediction of multi-modal traffic demand in any travel chain direction.
[0098] In this specific implementation, during the model training phase, the subway expert and the shared bicycle expert are trained as two independent N-HiTS models. Both experts construct training samples at the same time granularity and use a sliding window method to generate input sequences and corresponding supervision targets. For each expert, its model input is the feature set described in step five, which does not contain any future covariates or predictions from another expert, thus ensuring that the training process is entirely based on observable historical data. Each expert model learns the mapping relationship between input features and target variables by minimizing a loss function, defined as follows:
[0099]
[0100] in, The number of training samples, To predict the total step size, and The first The first sample The training data uses the same time granularity as in step one (15 minutes or one hour) and a sliding window is used to construct training samples. During training, the model parameters are updated via backpropagation and the Adam optimizer, with a learning rate of 0.001 and a batch size determined by computational resources. Training is iterative until the model converges.
[0101] During the forecasting phase, rolling forecasts are executed according to the collaborative mechanism configured in step six. Taking the forecasting of subway station arrivals as an example, the specific execution process is as follows:
[0102] First, initialize the prediction start point and parameter configuration. Set the prediction start time to... The predicted total step size is The backtracking window length is The system initializes the historical data buffer and loads data from time [time]. - arrive The system collects real observations of subway station entry volume, shared bicycle lock volume, time characteristics, and station static characteristics. Simultaneously, based on the station clustering results obtained in step three, the corresponding category-coded feature matrix is loaded.
[0103] Subsequently, multi-step rolling predictions from upstream experts are executed. The system invokes a pre-trained shared bicycle lock prediction expert, which performs predictions based on the N-HiTS model architecture. During this process, the model input is strictly limited to historical observation data to ensure no future information is introduced. Through multiple rolling predictions, a complete predicted sequence of shared bicycle lock volumes is obtained. .
[0104] Next, a mixed covariate sequence for downstream expert input is constructed. The system constructs a mixed covariate sequence for downstream expert input. The construction of this sequence follows strict time causality, specifically in the following form:
[0105]
[0106] The historical section Using real observations, the future part This mixture of predictions, generated using upstream expert forecasts, accurately simulates the future covariate information available to downstream experts in a real-world deployment.
[0107] Then, downstream experts are initiated to perform target prediction. The constructed mixed covariate sequence is then used. As a future covariate, it is input along with other joint features such as time features, lag features, and static category features to the downstream expert, namely the subway entry prediction expert. Based on all input information, this expert model outputs the predicted subway entry volume within the validation set time range. .
[0108] Finally, iterative rolling is performed to complete the full-range prediction. The above process is for the starting point. The initial one-time prediction. In practice, the system employs a rolling prediction mechanism. After each time step of prediction is completed, the actual observed value (or predicted value) is added to the historical window, the prediction starting point is moved forward one step, and the steps of upstream prediction, constructing a mixed sequence, and downstream prediction are repeated iteratively until the entire prediction interval is covered. Ultimately, this allows for the collaborative prediction of multimodal traffic demand across the entire time series, covering all moments within the timeframe.
[0109] This rolling prediction mechanism strictly follows the law of causality, ensuring that no real information after a certain point in time is used when predicting any future moment. This makes the entire prediction process consistent with the real business scenario, guaranteeing the practicality and reliability of the model after deployment.
[0110] In the performance evaluation stage of the prediction results, in order to objectively evaluate the prediction performance of the model of this invention, the mean absolute error (MAE) and root mean square error (RMSE) are used as evaluation indicators in this step, and their calculation formulas are as follows:
[0111]
[0112]
[0113] in, Indicates the number of samples. Indicates the first The actual value of each sample This represents the corresponding predicted value.
[0114] Taking Tianjin Metro and shared bicycle travel as examples, this paper compares the prediction results of the proposed "dual-expert" collaborative prediction system with those of traditional time series models such as LSTM, TCN, and GRU on the same test set. According to the experimental evaluation results, as shown in Tables 1 and 2, it can be observed that the RMSE of metro entry volume using the proposed method is significantly better than that of the baseline models on the validation set of multiple typical metro stations, and the MAE index is also at a superior level, especially in the prediction of peak traffic at single stations. Based on an N-HiTS model trained only a small number of epochs (25 epochs) on the training set, this invention can achieve or even partially surpass the performance of the baseline model on the validation set under more training epochs (150 epochs), indicating that the proposed method has certain advantages in terms of computational resource consumption. It also verifies the effectiveness and application potential of this architecture in multi-modal transportation collaborative demand prediction.
[0115] Table 1
[0116] Evaluation indicators This invention model LSTM TCN GRU N-HiTS Average absolute error 16.4188 21.4262 33.3508 21.95 18.8608 Root mean square error 9.3676 9.3212 13.6975 9.42 11.3250
[0117] Table 2
[0118] Evaluation indicators This invention model LSTM TCN GRU N-HiTS Root mean square error 4.7058 5.4866 7.9221 4.77 4.7890 Average absolute error 3.0796 2.7808 3.7874 3.02 3.0796
[0119] Based on the above specific embodiments, the present invention has the following technical effects:
[0120] (1) This invention constructs a robust tensor clustering model based on low-rank-sparse decomposition to separate the stable structure and abnormal disturbances in high-dimensional multi-source traffic data, so that the station-level spatiotemporal features can still be stably expressed in the presence of noise, holiday fluctuations and local anomalies, thereby improving the robustness and reliability of the feature extraction process.
[0121] (2) By leveraging the self-expression constraints of the core tensor space, this invention can automatically identify the potential pattern structure between subway stations, enabling the usage characteristics of shared bicycles and subways at different stations to be clustered and expressed according to passenger flow patterns. This is beneficial to the generalization ability of the prediction model in the spatial dimension and avoids the shortcomings of traditional feature splicing methods in reflecting the heterogeneity of stations.
[0122] (3) This invention constructs a collaborative prediction architecture consisting of two expert models and determines the direction of covariate transmission according to the behavioral sequence of different modes of transportation in the travel chain, so that the prediction process can reflect the temporal dependency structure of multi-mode transportation in actual use, thus overcoming the defect that existing models cannot reflect the causal logic between modes.
[0123] (4) The present invention uses a multi-scale neural interpolation structure to perform hierarchical modeling of time series data, which can simultaneously capture the long-term trend, periodic changes and short-term local fluctuations of subway passenger flow and shared bicycle usage, thereby improving the prediction accuracy of the model in complex time series environments.
[0124] (5) The feature construction process of the present invention comprehensively utilizes site clustering labels, core tensor potential features, anomaly indicators, static attributes and lag features, so that the prediction input can simultaneously reflect the information of spatial structure, temporal structure and abnormal events, thereby improving the adaptability of the joint prediction model to different sites and different time periods.
[0125] (6) The present invention can simultaneously support the scenarios of “shared bicycle locking – subway entry” and “subway exit – shared bicycle unlocking” through a configurable collaborative prediction mechanism, realize unified modeling of different combinations of multi-mode traffic, and improve the applicability of the method in actual traffic scheduling.
[0126] (7) The system architecture of the present invention can realize multi-source data processing, tensor decomposition, feature construction, dual expert collaborative prediction and result output in a modular manner, which is convenient to be deployed in urban traffic management platforms, mobile travel service systems or intelligent traffic control systems, and provides directly usable prediction services for subway-shared bicycle connection optimization, resource allocation, capacity planning and dynamic scheduling.
[0127] Example 2
[0128] This embodiment also provides a joint demand prediction system for subway-shared bicycles based on robust tensor clustering and dual-expert collaborative architecture. The system includes: a data acquisition module, a tensor construction and decomposition module, a station feature extraction module, a joint feature generation module, a dual-expert collaborative prediction module, and a result output module.
[0129] The data acquisition module is used to acquire multi-source traffic data such as passenger flow entering and exiting urban subway stations, station attributes, geographic information, and the number of shared bicycles unlocked and locked. The module performs time alignment, spatial mapping, anomaly filtering, and standardization on the data to construct a station-level spatiotemporal dataset.
[0130] The tensor construction and decomposition module is used to construct a third-order spatiotemporal tensor based on preprocessed multi-source data, and to perform robust decomposition of the tensor using a low-rank-sparse decomposition model to obtain a low-rank component reflecting the spatiotemporal stability of the traffic system and a sparse component reflecting abnormal disturbances. The module is also used to apply orthogonal constraints to the factor matrix and to solve the low-rank tensor, sparse tensor and core tensor using an alternating optimization strategy.
[0131] The site feature extraction module is used to perform partial Tucker decomposition based on low-rank components, introduce self-expression constraints in the core tensor space to construct a self-expression matrix, and generate a site affinity matrix accordingly; the module uses spectral clustering to classify sites and obtain the clustering labels of sites and their corresponding robust spatiotemporal latent features.
[0132] The joint feature generation module is used to fuse site clustering labels, core tensor features, anomaly indicators, and site static attributes, time features, and lag features to form a multi-source joint feature vector for the prediction model.
[0133] The dual-expert collaborative prediction module is used to construct a first expert model for predicting shared bicycle demand and a second expert model for predicting subway passenger flow, and to determine the transmission direction of covariates based on the sequential relationship of travel chain behaviors. The module first performs rolling predictions by the expert model at the upstream of the behavior chain, and then inputs the prediction results as future covariates and joint features into the downstream expert model to achieve collaborative prediction of subway and shared bicycle demand.
[0134] The result output module is used to output the predicted results of the number of shared bicycles unlocked or locked, the number of subway entries or exits, and to provide predicted information for traffic scheduling, resource allocation and operation monitoring.
[0135] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture, characterized in that, Includes the following steps: Based on subway passenger flow data and shared bicycle usage data, a third-order spatiotemporal tensor is constructed. The third-order spatiotemporal tensor is decomposed to obtain low-rank normal components and sparse abnormal components. Partial Tucker decomposition of the low-rank normal components yields site clustering results and robust spatiotemporal latent features; By integrating the site clustering results, the robust spatiotemporal latent features, the anomaly indicators extracted from the sparse anomaly components, the temporal features, and the historical lag features, a multi-source joint feature vector is constructed. The multi-source joint feature vector is input into the dual-expert collaborative prediction model. In the dual-expert collaborative prediction model, based on the sequential relationship between the behavior of the subway and shared bicycles in the scenario to be predicted, the output of the upstream prediction expert is used as a future covariate and input to the downstream prediction expert. Through a rolling forecasting mechanism, the upstream forecasting experts and downstream forecasting experts collaboratively output joint forecasting results for subway passenger flow and shared bicycle demand.
2. The joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture as described in claim 1, characterized in that, The process of constructing a third-order spatiotemporal tensor based on subway passenger flow data and shared bicycle usage data includes: A station-level spatiotemporal dataset was constructed based on subway passenger flow data and shared bicycle usage data. The site-level spatiotemporal dataset is subjected to time alignment, spatial mapping, anomaly filtering, and standardization to obtain preprocessed multi-source data. A three-dimensional structuring method is used to organize the data in three dimensions: site, date, and intraday time period, to obtain a third-order spatiotemporal tensor.
3. The joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture as described in claim 1, characterized in that, The process of decomposing the third-order spacetime tensor to obtain low-rank normal components and sparse anomalous components includes: The third-order spatiotemporal tensor is processed using a low-rank sparse decomposition method to construct an objective function that includes a reconstruction error term, a sparse regularization term, and a low-rank constraint term. Orthogonal constraints are applied to the factor matrix, and an alternating optimization strategy is used to solve the objective function to obtain low-rank normal components and sparse abnormal components.
4. The joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and dual-expert collaborative architecture according to claim 3, characterized in that, The process of obtaining site clustering results and robust spatiotemporal latent features by performing partial Tucker decomposition on the low-rank normal components includes: Based on the low-rank normal components, a partial Tucker decomposition method is used to process them to obtain the core tensor and the corresponding orthogonal factor matrix. A subspace self-expression constraint is introduced into the space of the core tensor to construct a self-expression matrix representing the similarity between sites; A symmetric site affinity matrix is generated based on the self-expression matrix; The site affinity matrix is processed using a spectral clustering algorithm to obtain the site clustering results; The robust spatiotemporal latent features are obtained by extracting site feature vectors from the core tensor.
5. The joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture as described in claim 4, characterized in that, The process of constructing a multi-source joint feature vector includes: The site clustering results are one-hot encoded to form static classification features; Spatiotemporal features are extracted based on the robust spatiotemporal latent features; Based on the aforementioned sparse and abnormal components, abnormal indicators are extracted; The static classification features, spatiotemporal features, anomaly indicators, time features, and historical lag features are fused to obtain a multi-source joint feature vector.
6. The joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture as described in claim 1, characterized in that, The dual-expert collaborative prediction model includes a shared bicycle prediction expert model and a subway prediction expert model; wherein, a multi-scale neural interpolation structure is used to construct the shared bicycle prediction expert model and the subway prediction expert model.
7. The joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture as described in claim 6, is characterized in that... The process of configuring a collaborative prediction mechanism based on the sequential relationship between the behavior of subway vehicles and shared bicycles in the scenario to be predicted includes: When predicting the number of subway arrivals and the number of shared bicycle locks, the shared bicycle prediction expert is used as the upstream prediction expert, and the subway prediction expert is used as the downstream prediction expert. When predicting subway exits and shared bicycle unlocks, subway prediction experts are used as upstream prediction experts, and shared bicycle prediction experts are used as downstream prediction experts.
8. The joint demand forecasting method for subway-shared bicycles based on robust tensor clustering and a dual-expert collaborative architecture as described in claim 7, is characterized in that... The process of outputting joint prediction results based on the rolling prediction mechanism includes: S1. Based on historical observation data and the multi-source joint feature vector, call the upstream prediction expert to perform rolling prediction and obtain the prediction result sequence of upstream transportation modes in the future several time steps; S2. Construct a mixed covariate sequence that includes the historical true values of upstream transportation modes and the predicted result sequence; S3. Input the mixed covariate sequence and the multi-source joint feature vector into the downstream prediction expert to obtain the predicted value of the downstream traffic mode; S4. Repeat S1-S3 until the entire prediction interval is covered, and output the joint prediction results of subway passenger flow and shared bicycle demand.