A passenger flow prediction method for urban rail transit stations based on adaptive residual T-S fuzzy neural network
Patent Information
- Application Number
- CN202611214314.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]本发明至少用于解决以下技术问题:第一,解决现有客流预测方法输入变量依赖人工经验、不同粒度下难以统一选择的问题;第二,解决传统T-S模糊神经网络在高维输入下前件参数量过大、规则解释困难的问题;第三,解决模糊规则数依赖人工试错、易欠拟合或过拟合的问题;第四,解决深度学习预测模型可解释性弱的问题;第五,解决多站点预测中全局共性学习和站点个性化适配难以兼顾的问题
(1)输入变量选择自动化:本发明通过TSFC重要度指标评估各候选滞后变量对预测目标的贡献,并通过动态阈值自动截断,避免依赖人工经验选择滞后项,提高了建模流程的自动化、可复现性和跨粒度适应能力。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of rail transit passenger flow prediction technology, and more specifically to a method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network. Background Technology
[0002] Urban rail transit has become an important component of the public transportation system in large and medium-sized cities. With the expansion of the network, the increase in passenger flow intensity, and the periodic accumulation of commuting peaks, stations may experience problems such as overcrowding, queuing, passenger flow control, transfer congestion, or imbalance between supply and demand in a short period of time. Accurate station passenger flow forecasting can provide quantitative data for passenger flow organization in key areas such as platforms, concourses, turnstiles, security checkpoints, and transfer passages. It can also assist operators in adjusting train operation plans, allocating capacity, guiding passenger flow, issuing passenger flow control warnings, and handling emergencies.
[0003] However, existing passenger flow prediction methods generally include statistical models, traditional machine learning models, recurrent neural networks, graph convolutional networks, and attention-based spatiotemporal models. Statistical models are highly interpretable, but they are difficult to characterize complex nonlinearities and peak abrupt changes; deep learning models usually have high prediction accuracy, but they have problems such as strong black box nature, feature selection relying on human experience, high training costs, and difficulty in cross-site parameter tuning. Fuzzy neural networks combine the interpretability of fuzzy reasoning with the self-learning ability of neural networks. However, directly applying traditional TS fuzzy neural networks to multi-site passenger flow prediction still has the following shortcomings: (1) Input variables rely on human experience: Traditional methods usually require researchers to pre-set several lag terms, such as the previous moment, the same moment yesterday, or the same moment last week. The effective lag terms are different under different time granularities. Manual selection is not only time-consuming, but also easy to introduce redundant variables or omit key variables. (2) The number of fuzzy rules is difficult to adaptively determine: Too few rules will lead to underfitting and will be unable to distinguish complex patterns such as morning peak, evening peak, off-peak, and weekend; too many rules will lead to parameter scale expansion, training instability, and overfitting. Existing methods mostly rely on manual trial and error or fixed experience values, and have insufficient generalization ability. (3) High-dimensional input leads to the curse of dimensionality of antecedent parameters: If all lag features and time codes are used for antecedent membership calculation, each rule needs to set the membership function center and width for each dimension of input. When the number of rules and the input dimension increase together, the number of parameters increases rapidly, affecting the trainability and interpretability of the model. (4) Directly fitting the absolute value of passenger flow is difficult to learn: Urban rail transit passenger flow has strong daily periodicity. The passenger flow at the same station yesterday at the same time is usually highly correlated with the current time. If the traditional model fits the absolute passenger flow from zero, it will ignore this clear prior, making the model bear too much fitting burden in terms of cross-station magnitude differences and cross-day changes. (5) It is difficult to take into account both commonalities and individualities in multi-station prediction: If the same model is trained on all stations, the model can learn the common laws of the whole network, but may ignore the individual differences brought about by station functions, passenger flow levels, transfer attributes and surrounding land use; if each station is trained separately, it is easy to overfit when the sample size is insufficient, and it is difficult to utilize the laws of other stations. Summary of the Invention
[0004] In view of this, the present invention provides a method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network. This method is designed for short-term passenger flow prediction tasks at the station level. It uses a two-stage fuzzy curve method to automatically select input variables with predictive value, improves the structure of the TS fuzzy neural network by using a dimensionality reduction antecedent mechanism and residual jump connections, adaptively determines the number of fuzzy rules by using fuzzy C-means clustering initialization and validation set search mechanism, and achieves multi-station adaptation through a two-stage training strategy of global pre-training and station-by-station fine-tuning.
[0005] This invention addresses at least the following technical problems: First, it solves the problem that existing passenger flow prediction methods rely on human experience for input variables and are difficult to uniformly select at different granularities; second, it solves the problem that traditional TS fuzzy neural networks have excessively large antecedent parameters and difficulty in rule interpretation under high-dimensional input; third, it solves the problem that the number of fuzzy rules relies on manual trial and error and is prone to underfitting or overfitting; fourth, it solves the problem of weak interpretability of deep learning prediction models; and fifth, it solves the problem that it is difficult to balance global common learning and site-specific adaptation in multi-site prediction.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: This invention discloses a method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network, comprising: Step 1: Collect and preprocess historical passenger flow data of urban rail transit to obtain passenger flow time series; Step 2: Based on the target prediction granularity, resample or equidistantly aggregate the passenger flow time series to obtain multi-granularity sample data; Step 3: Based on the passenger flow patterns of urban rail transit, construct a pool of candidate lag variables using the multi-granularity sample data; Step 4: Calculate the overall importance of each variable in the candidate lag variable pool using the two-stage fuzzy curve method, and filter each variable through an automatic truncation mechanism to obtain the optimal subset of input variables; Step 5: Construct an adaptive residual TS fuzzy neural network. The neural network introduces a dimensionality reduction antecedent mechanism, residual skip connections, and an adaptive selection mechanism for the number of fuzzy rules. Step 6: Based on the optimal subset of input variables, construct training and validation samples for each station, and train the adaptive residual TS fuzzy neural network using a two-stage training strategy; and use the trained network to predict the passenger flow of the target station at future times.
[0007] Furthermore, in step 1, the collection of historical passenger flow data for urban rail transit includes collecting passenger flow data from each station output by the urban rail transit automatic fare collection system, gate system, clearing system, or operation data platform; the historical passenger flow data includes station identifiers, timestamps, and passenger flow in a single time slot. The preprocessing includes: timestamp alignment, merging of duplicate records, outlier identification and truncation, missing value completion, removal of non-operational periods, and processing of non-negative constraints on passenger flow.
[0008] Furthermore, step 2 specifically includes: determining the time length of the target prediction granularity based on a positive integer multiple of the basic statistical window time length; resampling or equidistantly aggregating the passenger flow within the operating period according to the target granularity; determining the number of time slices per day under the target prediction granularity; and constructing multi-granularity sample data based on different target prediction granularities.
[0009] Furthermore, in step 3, the candidate lagged variable pool consists of four types of lagged terms, including: Short-term continuous items include multi-granularity passenger flow data from the previous 1 to 4 time steps, used to capture short-term continuous trends in passenger flow. The daily periodic item contains multi-granularity passenger flow data from the same time yesterday and one time step before and after it, which is used to adapt to the temporal shift of peak passenger flow. The bi-day cycle item includes multi-granularity passenger flow data from the same moment on the previous two days and one time step before and after it, which is used to enhance the stability of the daily cycle characteristics. The weekly period item contains multi-granularity passenger flow data from the same time last week, used to distinguish the differences in passenger flow patterns between weekdays and weekends.
[0010] Furthermore, step 4 specifically includes: For each candidate variable, a two-stage fuzzy curve is constructed, and the comprehensive importance index is calculated by combining the normalized mean square approximation error and the deviation of the conditional variance. All candidate variables are sorted in ascending order of overall importance. The adjacent differences in the importance sequence after sorting are calculated. A dynamic cutoff threshold is generated based on the mean and standard deviation of the difference sequence. When there is an adjacent difference greater than the dynamic truncation threshold, truncation is performed at the position corresponding to the difference, and the variables before the truncation position are retained to form the optimal subset of input variables.
[0011] Furthermore, in step 4, let each candidate variable be... The corresponding output is ,but: First-stage fuzzy curve and normalized mean square approximation error They are respectively: ; ; ; ; In the formula, Indicates input variables membership function, for One data point in space, This indicates the first-stage fuzzy curve at data points. Local estimates at [location] The width of the Gaussian membership function. and These represent the output variables. The variance and mean; Two-stage fuzzy curve and conditional variance deviation They are respectively: ; ; In the formula, This provides a local estimate of the output variance. Overall Importance for: .
[0012] Furthermore, in step 5, the dimensionality reduction antecedent mechanism specifically includes: Six core features are selected as the antecedent input, which are only used for passenger flow operation mode discrimination and fuzzy rule activation degree calculation. The six core features include passenger flow at the previous time step, passenger flow at the same time yesterday, intraday hourly sine code, intraday hourly cosine code, intraweekly date sine code, and intraweekly date cosine code. All the optimal input variables obtained in step 4, together with the time code, are used as consequent inputs for local linear fine prediction under each fuzzy rule.
[0013] Furthermore, in step 5, the residual jump connection specifically refers to: Using the passenger flow at the same time yesterday as the daily cycle baseline value, the direct output of the adaptive residual TS fuzzy neural network is the residual correction amount relative to the daily cycle baseline value. The final output passenger flow prediction value is the sum of the baseline passenger flow at the same time yesterday and the residual correction amount.
[0014] Furthermore, in step 5, the adaptive selection mechanism for the number of fuzzy rules specifically includes: A preset set of candidate rules is defined. For each candidate rule in the set, the following operations are performed sequentially: The fuzzy C-means clustering algorithm is used to cluster the antecedent feature space to obtain the initial values of the membership function parameters; Construct an adaptive residual TS fuzzy neural network with a corresponding number of rules and perform fast pre-training; The mean absolute error of prediction is calculated on the validation set, and the number of rules with the smallest validation set error is selected as the optimal number of fuzzy rules.
[0015] Furthermore, in step 6, the two-stage training strategy specifically includes: Phase 1: Global pre-training, which gathers training samples from the optimal subset of input variables corresponding to all sites, and uses the Adam optimizer in conjunction with a cosine annealing learning rate scheduling strategy for unified training; The second stage is station-by-station local fine-tuning. Using the model parameters obtained from global pre-training as initial values, full parameter local fine-tuning is performed for each station using training samples from the optimal subset of input variables corresponding to that station.
[0016] As can be seen from the above technical solution, compared with the prior art, the present invention provides a method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network, which has the following beneficial effects: (1) Automated selection of input variables: This invention evaluates the contribution of each candidate lagged variable to the prediction target through the TSFC importance index and automatically truncates it through dynamic thresholds, avoiding reliance on manual experience to select lagged terms, thereby improving the automation, reproducibility and cross-granularity adaptability of the modeling process.
[0017] (2) Combining prediction accuracy and interpretability: AR-TSFNN divides passenger flow operation patterns in the form of fuzzy rules, and each rule has an interpretable structure of "antecedent pattern discrimination + consequent linear prediction". Compared with pure deep learning black box models, this invention can output variable importance, rule activation strength and residual correction, which helps operators understand the basis of prediction.
[0018] (3) Mitigating the curse of dimensionality caused by high-dimensional antecedents: This invention adopts a dimensionality reduction antecedent mechanism, using only key features such as Lag-1, Lag-D and periodic time encoding for rule activation calculation, significantly reducing the membership function parameters of the antecedent; at the same time, the consequent still uses all selected variables for fine prediction, thus taking into account both model simplicity and prediction ability.
[0019] (4) Residual jump connections reduce learning difficulty: This invention uses yesterday's passenger flow at the same time as a daily periodic benchmark, so that the network only needs to learn the change relative to the benchmark, rather than fitting the absolute value of passenger flow from zero. This structure can make full use of the strong periodicity of rail transit passenger flow, improving convergence stability and prediction accuracy.
[0020] (5) The number of fuzzy rules can be adaptively determined: This invention uses FCM clustering to initialize the rule antecedents and searches for the optimal number of rules in the candidate rule number set through the validation set index, avoiding manual trial and error of the number of rules and reducing the risk of underfitting and overfitting.
[0021] (6) Suitable for multi-site and multi-granularity prediction: Through the global pre-training-station fine-tuning strategy, this invention not only uses multi-site data to learn common patterns, but also fine-tunes personalized parameters for individual sites; through candidate variable pool reconstruction and rule number search, it can be adapted to different prediction granularities such as 15 minutes, 30 minutes, and 45 minutes.
[0022] (7) Facilitates engineering deployment: This invention can be packaged as a passenger flow prediction service. The input is the historical passenger flow and time information of the station, and the output is the passenger flow prediction value and explanation information for the next time slot. It can be integrated with existing scheduling, flow restriction warning and visualization systems. Attached Figure Description
[0023] 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.
[0024] Figure 1 A schematic diagram of the overall technical route for the passenger flow prediction method for rail transit stations provided by this invention.
[0025] Figure 2 This is a schematic diagram of the TSFC method provided by the present invention.
[0026] Figure 3 This is a schematic diagram of the AR-TSFNN network structure provided by the present invention. Detailed Implementation
[0027] 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.
[0028] This invention discloses a method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network, such as... Figure 1 As shown, it includes: Step 1: Collect and preprocess historical passenger flow data of urban rail transit to obtain passenger flow time series; Step 2: Based on the target prediction granularity, resample or aggregate the passenger flow time series to obtain multi-granularity sample data; Step 3: Based on the passenger flow patterns of urban rail transit, construct a pool of candidate lag variables using multi-granularity sample data; Step 4: Calculate the overall importance of each variable in the candidate lag variable pool using the two-stage fuzzy curve (TSFC) method, and filter each variable through an automatic truncation mechanism to obtain the optimal subset of input variables; Step 5: Construct an adaptive residual TS fuzzy neural network (AR-TSFNN). The neural network introduces a dimensionality reduction antecedent mechanism, residual skip connections, and an adaptive selection mechanism for the number of fuzzy rules. Step 6: Construct training and validation samples for each station based on the optimal subset of input variables, and train the adaptive residual TS fuzzy neural network using a two-stage training strategy; then use the trained network to predict the passenger flow of the target station at future times.
[0029] In a specific embodiment, step 1, collecting historical passenger flow data of urban rail transit includes collecting passenger flow data of each station output by the urban rail transit automatic fare collection system, gate system, clearing system or operation data platform; the historical passenger flow data includes at least station identifier, timestamp, and passenger flow in a single time slot; preferably, it also includes information such as line identifier, station type, whether it is a transfer station, operating date, holiday mark, and weekday / weekend mark; Preprocessing includes: timestamp alignment, merging of duplicate records, outlier identification and truncation, missing value imputation, removal of non-operational periods, and handling of non-negative passenger flow constraints. Missing values can be imputed using interpolation of adjacent time slices, historical averages for the same period, historical medians for stations, or other statistical methods. Outliers can be handled using quantile truncation, three-times standard deviation, box plot rules, or operational log verification methods. This invention does not limit the specific cleaning method, as long as it can generate a passenger flow time series arranged by station and time slice.
[0030] In a specific embodiment, step 2 specifically includes: determining the time length of the target prediction granularity based on a positive integer multiple of the basic statistical window time length; resampling or equidistantly aggregating the passenger flow within the operating period according to the target granularity; determining the number of time slices per day under the target prediction granularity; and constructing multi-granularity sample data based on different target prediction granularities.
[0031] Specifically, for the organized passenger flow sequence, the basic statistical window is set as follows: The time length for target prediction granularity is then... ,in The value is a positive integer. For each station, passenger flow during the operating hours is resampled or aggregated at equal intervals according to the target granularity, assuming that the daily operating hours include... With a base time slice, the number of time slices per day at the target prediction granularity is: This strategy ensures that the passenger flow values at each granularity are on the same order of magnitude (all are the actual passenger flow of a single basic window).
[0032] In one specific embodiment, in step 3, the candidate lagged variable pool consists of four types of lagged terms, including: Short-term continuous items include multi-granularity passenger flow data from the previous 1 to 4 time steps, used to capture short-term continuous trends in passenger flow. The daily periodic item contains multi-granularity passenger flow data from the same time yesterday and one time step before and after it, which is used to adapt to the temporal shift of peak passenger flow. The bi-day cycle item includes multi-granularity passenger flow data from the same moment on the previous two days and one time step before and after it, which is used to enhance the stability of the daily cycle characteristics. The weekly period item contains multi-granularity passenger flow data from the same time last week, used to distinguish the differences in passenger flow patterns between weekdays and weekends.
[0033] Specifically, considering the patterns of short-term continuous flow, repetition of the same time yesterday, repetition of the previous two days, and weekly repetition in urban rail transit passenger flow, this invention constructs a candidate lag variable pool. The short-term continuous term is used to capture the inertial changes in the previous few time slices; the daily periodic term is based on the same time yesterday and includes a neighborhood term to adapt to earlier or later peak hours; the bi-daily periodic term is used to enhance periodic stability; and when data length allows, a weekly periodic term is added to distinguish between weekday and weekend patterns. The candidate set is as follows:
[0034] In the formula: the short-term dependency term captures the continuous trend of passenger flow changes over the previous 1 to 4 time steps; the daily periodic term uses... (At the same time yesterday) as the core, The neighborhood is used to address the phase shift during peak periods; the bi-daily periodic term is used to enhance the stability of the daily periodic characteristics; the weekly periodic term... Used to distinguish between weekdays and weekends. The size of the entire candidate variable pool is... Adaptive decision-making typically involves 10 to 11 candidate variables at different granularities.
[0035] In one specific embodiment, step 4 specifically includes: For each candidate variable, a two-stage fuzzy curve is constructed, and the comprehensive importance index is calculated by combining the normalized mean square approximation error and the deviation of the conditional variance. All candidate variables are sorted in ascending order of overall importance. The adjacent differences in the importance sequence after sorting are calculated. A dynamic cutoff threshold is generated based on the mean and standard deviation of the difference sequence. When there is an adjacent difference greater than the dynamic truncation threshold, the variable is truncated at the position corresponding to the difference, and the variables before the truncation position are retained to form the optimal subset of input variables.
[0036] Specifically, for each variable in the candidate lag variable pool The explanatory power of this variable for passenger flow output is evaluated using the TSFC method. The overall importance is composed of the normalized mean squared approximation error and the conditional variance deviation; the former reflects the error of the univariate fuzzy approximation output, while the latter reflects the stability of the output fluctuation under piecewise conditions. A lower overall importance indicates a more important variable. The specific algorithm flow is as follows... Figure 2 As shown. The specific process of calculating importance using the TSFC method is as follows: Let each candidate variable be... The corresponding output is Given N pairs of input and output data, a two-stage fuzzy curve can be established: First-stage fuzzy curve and normalized mean square approximation error They are respectively: ; ; ; ; In the formula, Indicates input variables membership function, for One data point in space, This indicates the first-stage fuzzy curve at data points. Local estimates at [location] The width of the Gaussian membership function. and These represent the output variables. The variance and mean; Two-stage fuzzy curve Deviation of conditional variance They are respectively: ; ; In the formula, This provides a local estimate of the output variance. Overall Importance for: .
[0037] All candidate variables Arranged in ascending order, not all lagged terms in the candidate variables contribute significantly to the prediction. Directly inputting all of them would introduce noise and increase model complexity. To achieve fully automated variable selection, this invention introduces an automatic truncation mechanism based on the elbow rule in statistics. Let the sorted variables be... Value Calculate the adjacent difference sequence and dynamic cutoff threshold : ; ; In the formula, and These are the mean and standard deviation of the difference sequence, respectively. When there exists... Make When, it indicates from the first When a variable experiences a significant jump in importance (i.e., its contribution to prediction decreases significantly), the variable is truncated at that point, retaining only the first few variables. The most important variable.
[0038] In a specific embodiment, step 5, the dimensionality reduction precondition mechanism is as follows: Six core features are selected as the antecedent input, which are only used for passenger flow operation mode discrimination and fuzzy rule activation degree calculation. The six core features include passenger flow at the previous time step, passenger flow at the same time yesterday, intraday hourly sine code, intraday hourly cosine code, intraweekly date sine code, and intraweekly date cosine code. All the optimal input variables obtained in step 4, together with the time code, are used as consequent inputs for local linear fine prediction under each fuzzy rule.
[0039] In step 5, the residual jump connection is specifically as follows: Using yesterday's passenger flow at the same time as the daily cycle baseline, the direct output of the adaptive residual TS fuzzy neural network is the residual correction amount relative to the daily cycle baseline. The final output passenger flow prediction value is the sum of yesterday's baseline passenger flow at the same time and the residual correction amount.
[0040] In step 5, the adaptive selection mechanism for the number of fuzzy rules is specifically as follows: A preset set of candidate rules is defined. For each candidate rule in the set, the following operations are performed sequentially: The antecedent feature space is clustered using the fuzzy C-means clustering (FCM) algorithm to obtain the initial values of the membership function parameters; Construct an adaptive residual TS fuzzy neural network with a corresponding number of rules and perform fast pre-training; The mean absolute error (MAE) of prediction is calculated on the validation set, and the number of rules with the smallest error on the validation set is selected as the optimal number of fuzzy rules.
[0041] Specifically, the classic TS fuzzy neural network follows the five-layer functional architecture established by ANFIS: input layer, fuzzification layer, rule activation layer, consequent inference layer, and output layer. When directly applied to passenger flow prediction, two prominent problems arise: firstly, the lagged variables selected by TSFC, together with the time encoding, constitute... If all input elements participate in the antecedent membership calculation, the parameter size will increase accordingly. The rapid expansion of passenger flow leads to the curse of dimensionality; secondly, the absolute magnitude of passenger flow varies greatly across stations, increasing the learning difficulty by directly fitting the original passenger flow values. To address these issues, this invention proposes an AR-TSFNN method, which improves upon the classic five-layer structure with three improvements: a dimensionality reduction antecedent mechanism, residual skip connections, and an adaptive selection mechanism for the number of fuzzy rules. The improved AR-TSFNN network structure is as follows: Figure 3 As shown.
[0042] The three design improvements mentioned above will be explained in detail below.
[0043] (1) Dimensionality reduction precursor mechanism: all in traditional TS systems All inputs participate in the calculation of the predecessor membership degree, and the Gaussian parameter size is [value missing]. ,when Larger dimensions can easily lead to the curse of dimensionality. This invention observes that the function of the antecedent is to determine the current passenger flow pattern (e.g., morning peak / evening off-peak / weekday / weekend) to determine the activation level of each rule. Therefore, the antecedent only needs to contain the key dimensions sufficient to distinguish passenger flow patterns, without including all lagging details. Accordingly, AR-TSFNN extracts only the following 6-dimensional subset as the antecedent variable: ; In the formula, The previous time-phase passenger flow reflects short-term trends; This represents passenger flow at the same time yesterday, reflecting a daily baseline. Time information (hours) h and week w Encoding via trigonometric functions ,get A four-dimensional encoded vector. The reason for using trigonometric function encoding is that time has a periodicity (23:00 is adjacent to 0:00, Sunday is adjacent to Monday). If the original numerical values are used directly, the Euclidean distance of the Gaussian membership function at the periodic boundaries cannot reflect the true semantic distance. Mapping time onto a unit circle ensures cyclical continuity and uniquely determines the position of each moment.
[0044] Through the dimensionality reduction described above, the parameter size of the Gaussian membership function is reduced from... Reduce to The subsequent part still utilizes all Linear inference is performed using 3D input, achieving a division of labor where "the antecedent is responsible for pattern discrimination, and the consequent is responsible for fine-grained prediction": ; ; ; In the formula, Indicates the first r The unnormalized activation strength of a fuzzy rule Indicates the number after standardization. j Each preceding input feature and They represent the first r The first fuzzy rule j The center and width of the Gaussian membership function corresponding to each preceding input feature. Indicates the first r Normalized activation strength of fuzzy rules Indicates the first r The linear consequent output of a fuzzy rule. Indicates the first r The consequent parameter vector of a fuzzy rule. It represents a combination of all selected lagged variables and periodic time codes. n 3D consequent input vector, Indicates the first r The consequent bias term of a fuzzy rule, Indicates the first r In the fuzzy rule and the first i The linear coefficients corresponding to each consequent input feature The nth term of the consequent input vector i One portion, This represents the dimension of the consequent input vector. This represents the residual correction obtained by weighted fusion of the linear consequents of all fuzzy rules. This represents the total number of fuzzy rules.
[0045] (2) Residual Jump Connection: Urban rail transit passenger flow exhibits a strong daily cyclical pattern, with a high correlation between the current day's passenger flow and the passenger flow at the same time yesterday. Directly fitting the absolute value of passenger flow would require the network to learn and reconstruct the passenger flow level from scratch, resulting in a heavy learning burden. Drawing inspiration from residual learning, AR-TSFNN uses the output of the TS system... Considered as a correction to the baseline value of "yesterday at the same time", the final forecast is: ; This design allows the network to learn only daytime deviations, significantly reducing the learning difficulty, while giving the model output a more explicit physical meaning, namely "the amount of change relative to the same time yesterday".
[0046] (3) Adaptive selection of fuzzy rule number: Fuzzy rule number These are key hyperparameters in the TS system; too few will lead to underfitting, while too many will cause overfitting. Traditional methods often rely on manual trial and error to determine them. The generalization ability is insufficient. This method sets a candidate rule number set. For each candidate value, perform the following process: Using the FCM algorithm to perform an analysis of the antecedent feature space Clustering is performed to obtain initial values for membership function parameters; Build includes AR-TSFNN with 1 rule; Perform rapid pre-training on the training set; Calculate the MAE on the validation set, and finally select the rule with the smallest MAE on the validation set: .
[0047] In a specific embodiment, step 6, the two-stage training strategy specifically includes: Phase 1: Global pre-training, which gathers training samples from the optimal subset of input variables corresponding to all sites, and uses the Adam optimizer in conjunction with a cosine annealing learning rate scheduling strategy for unified training; The second stage is station-by-station local fine-tuning. Using the model parameters obtained from global pre-training as initial values, full parameter local fine-tuning is performed for each station using training samples from the optimal subset of input variables corresponding to that station.
[0048] Specifically, urban rail transit networks contain a large number of stations, and the passenger flow levels and change patterns of each station vary significantly. To balance the learning of common features across stations with personalized adaptation, this invention designs a two-stage training strategy of "global pre-training - station-by-station local fine-tuning".
[0049] Data standardization: for each site Station-by-station Z-score standardization of the lag characteristics: ; In the formula, express The standardized lag eigenvalues obtained after station-by-station Z-score standardization Indicates the first s The first site i One original hysteresis characteristic value, Indicates according to the first s The mean of the lag features calculated from the training samples at each site. Indicates according to the first s The standard deviation of the lag feature calculated from the training samples at each site.
[0050] Loss function: The model output is used to calculate the loss at the original scale. ), using a mixed loss of L1 and MSE: ; In the formula, express, express, These are the weighting coefficients for the MSE term. The L1 term directly optimizes the MAE index, while the MSE term provides a stronger gradient signal in the large error region. The two complement each other and help to balance the control of absolute error and peak error.
[0051] Phase 1: Global pre-training. Training data from all sites is aggregated, and the Adam optimizer is used for global model training, coupled with a cosine annealing learning rate scheduling strategy. ; in The initial learning rate, To minimize the learning rate, This represents the total number of training rounds. The global phase learns the common spatiotemporal patterns of passenger flow across all stations.
[0052] The second stage involves station-by-station fine-tuning. Using the global model parameters as initialization, each station undergoes independent local fine-tuning, with all network parameters participating in the update. This local stage adapts to the individual characteristics of each station with fewer training epochs, effectively balancing generalization ability and individualized accuracy.
[0053] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0054] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network, characterized in that, include: Step 1: Collect and preprocess historical passenger flow data of urban rail transit to obtain passenger flow time series; Step 2: Based on the target prediction granularity, resample or equidistantly aggregate the passenger flow time series to obtain multi-granularity sample data; Step 3: Based on the passenger flow patterns of urban rail transit, construct a pool of candidate lag variables using the multi-granularity sample data; Step 4: Calculate the overall importance of each variable in the candidate lag variable pool using the two-stage fuzzy curve method, and filter each variable through an automatic truncation mechanism to obtain the optimal subset of input variables; Step 5: Construct an adaptive residual TS fuzzy neural network. The neural network introduces a dimensionality reduction antecedent mechanism, residual skip connections, and an adaptive selection mechanism for the number of fuzzy rules. Step 6: Based on the optimal subset of input variables, construct training and validation samples for each station, and train the adaptive residual TS fuzzy neural network using a two-stage training strategy; and use the trained network to predict the passenger flow of the target station at future times.
2. The method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 1, characterized in that, In step 1, the collection of historical passenger flow data for urban rail transit includes collecting passenger flow data from each station output by the urban rail transit automatic fare collection system, gate system, clearing system, or operation data platform; The historical passenger flow data includes station identifiers, timestamps, and passenger flow in a single time slot; The preprocessing includes: timestamp alignment, merging of duplicate records, outlier identification and truncation, missing value completion, removal of non-operational periods, and processing of non-negative constraints on passenger flow.
3. The method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 1, characterized in that, Step 2 specifically includes: determining the time length of the target prediction granularity based on a positive integer multiple of the basic statistical window time length; resampling or equidistantly aggregating the passenger flow within the operating period according to the target granularity; determining the number of time slices per day under the target prediction granularity; and constructing multi-granularity sample data based on different target prediction granularities.
4. The method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 1, characterized in that, In step 3, the candidate lagged variable pool consists of four types of lagged terms, including: Short-term continuous items include multi-granularity passenger flow data from the previous 1 to 4 time steps, used to capture short-term continuous trends in passenger flow. The daily periodic item contains multi-granularity passenger flow data from the same time yesterday and one time step before and after it, which is used to adapt to the temporal shift of peak passenger flow. The bi-day cycle item includes multi-granularity passenger flow data from the same moment on the previous two days and one time step before and after it, which is used to enhance the stability of the daily cycle characteristics. The weekly period item contains multi-granularity passenger flow data from the same time last week, used to distinguish the differences in passenger flow patterns between weekdays and weekends.
5. The method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 1, characterized in that, Step 4 specifically includes: For each candidate variable, a two-stage fuzzy curve is constructed, and the comprehensive importance index is calculated by combining the normalized mean square approximation error and the deviation of the conditional variance. All candidate variables are sorted in ascending order of overall importance. The adjacent differences in the importance sequence after sorting are calculated. A dynamic cutoff threshold is generated based on the mean and standard deviation of the difference sequence. When there is an adjacent difference greater than the dynamic truncation threshold, truncation is performed at the position corresponding to the difference, and the variables before the truncation position are retained to form the optimal subset of input variables.
6. The method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 5, characterized in that, In step 4, let each candidate variable be... The corresponding output is ,but: First-stage fuzzy curve and normalized mean square approximation error They are respectively: ; ; ; ; In the formula, Indicates input variables membership function, for One data point in space, This indicates the first-stage fuzzy curve at data points. Local estimates at [location] The width of the Gaussian membership function. and These represent the output variables. The variance and mean; Two-stage fuzzy curve Deviation of conditional variance They are respectively: ; ; In the formula, This provides a local estimate of the output variance. Overall Importance for: .
7. The method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 1, characterized in that, In step 5, the dimensionality reduction antecedent mechanism specifically includes: Six core features are selected as the antecedent input, which are only used for passenger flow operation mode discrimination and fuzzy rule activation degree calculation. The six core features include passenger flow at the previous time step, passenger flow at the same time yesterday, intraday hourly sine code, intraday hourly cosine code, intraweekly date sine code, and intraweekly date cosine code. All the optimal input variables obtained in step 4, together with the time code, are used as consequent inputs for local linear fine prediction under each fuzzy rule.
8. The method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 1, characterized in that, In step 5, the residual jump connection specifically refers to: Using the passenger flow at the same time yesterday as the daily cycle baseline value, the direct output of the adaptive residual TS fuzzy neural network is the residual correction amount relative to the daily cycle baseline value. The final output passenger flow prediction value is the sum of the baseline passenger flow at the same time yesterday and the residual correction amount.
9. The method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 1, characterized in that, In step 5, the adaptive selection mechanism for the number of fuzzy rules specifically involves: A preset set of candidate rules is defined. For each candidate rule in the set, the following operations are performed sequentially: The fuzzy C-means clustering algorithm is used to cluster the antecedent feature space to obtain the initial values of the membership function parameters; Construct an adaptive residual TS fuzzy neural network with a corresponding number of rules and perform fast pre-training; The mean absolute error of prediction is calculated on the validation set, and the number of rules with the smallest validation set error is selected as the optimal number of fuzzy rules.
10. A method for predicting passenger flow at urban rail transit stations based on an adaptive residual TS fuzzy neural network according to claim 1, characterized in that, In step 6, the two-stage training strategy specifically includes: Phase 1: Global pre-training, which gathers training samples from the optimal subset of input variables corresponding to all sites, and uses the Adam optimizer in conjunction with a cosine annealing learning rate scheduling strategy for unified training; The second stage is station-by-station local fine-tuning. Using the model parameters obtained from global pre-training as initial values, full parameter local fine-tuning is performed for each station using training samples from the optimal subset of input variables corresponding to that station.