A real-time prediction method for abnormal large passenger flow of urban rail transit

By constructing a multi-source heterogeneous passenger flow data processing system for urban rail transit, along with a dynamic evolution map and attention mechanism prediction model, the shortcomings of existing technologies in predicting abnormal passenger flow evolution paths have been addressed, enabling earlier and more accurate passenger flow prediction.

CN121638697BActive Publication Date: 2026-07-21JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JILIN UNIVERSITY
Filing Date
2026-02-05
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing urban rail transit passenger flow forecasting technologies are unable to respond sensitively in the early stages of fundamental changes in passenger flow patterns, especially in their limited ability to predict abnormal passenger flow evolution paths and their lack of formal representation and utilization of the dynamic evolution process of passenger flow.

Method used

Collect multi-source heterogeneous passenger flow data, perform anomaly detection and cleaning, construct a dynamic evolution map of spatiotemporal feature vectors, identify passenger flow pattern transfer paths through feature evolution relationship networks, and input the data into an attention-based prediction model to analyze the evolution law of spatiotemporal features and the continuity of pattern transfer, and mark abnormal passenger flow stations.

Benefits of technology

It improves the timeliness and accuracy of abnormal passenger flow identification, enabling earlier identification of nonlinear changes in passenger flow trends and reducing prediction lag and bias. It is particularly sensitive and accurate in responding near the critical point where the passenger flow growth rate changes or the trend is about to reverse.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638697B_ABST
    Figure CN121638697B_ABST
Patent Text Reader

Abstract

The application discloses a kind of urban rail transit abnormal large passenger flow real-time prediction method, it is related to urban rail transit passenger flow prediction technical field, including through acquisition and fusion multi-source heterogeneous passenger flow data, continuous time window data block is formed after cleaning and segmentation.For each window, after extracting space-time feature vector, the core is to construct dynamic evolution atlas with time window as node, and the transfer path of feature similarity as connecting edge, and identify passenger flow mode from it.Path.In the prediction stage, model receives space-time feature vector and mode transfer path as input simultaneously, by comprehensively analyzing the evolution law of feature and the continuity of mode transfer, the passenger flow prediction value of each station in the future specific period is calculated, and the abnormal station exceeding historical threshold is marked.The method realizes earlier, more accurate real-time prediction and early warning to abnormal large passenger flow by explicitly modeling the dynamic evolution process of passenger flow state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of urban rail transit passenger flow prediction technology, specifically a method for real-time prediction of abnormally large passenger flows in urban rail transit. Background Technology

[0002] In existing urban rail transit passenger flow forecasting technologies, the commonly used method is to collect and fuse multi-source heterogeneous data, and then extract statistical features in terms of time and space after preprocessing. These spatiotemporal features are then input into various forecasting models, which learn the mapping relationships in historical data to generate future forecasts. Existing technologies focus on optimizing the dimensionality of feature extraction and the complexity of model algorithms, aiming to fit a more accurate input-output function relationship from historical data.

[0003] A major drawback of existing technical solutions lies in their static or implicit time-series processing methods. They typically treat the passenger flow characteristics of each time segment as independent sample points, or rely solely on the model's internal memory mechanism to handle sequence dependencies. This approach fails to actively and explicitly characterize the inherent evolutionary logic and transition patterns between passenger flow states. Its prediction logic is essentially based on backtracking and interpolation of feature similarity, lacking a structured description and utilization of the dynamic process of passenger flow transitioning from one macro-pattern to another.

[0004] Existing methods struggle to respond sensitively in the early stages of fundamental shifts in passenger flow patterns and have limited predictive capabilities for abnormal passenger flow evolution paths caused by special events. Improving the timeliness and accuracy of predictions hinges on how to formally represent the dynamic evolution of passenger flow patterns and how to effectively integrate this evolutionary pattern into the decision-making mechanism of prediction models. This would enable models to not only reference static patterns from historical data but also understand the current dynamic evolutionary stage and its development trends. Summary of the Invention

[0005] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes a real-time prediction method for abnormally large passenger flows in urban rail transit, comprising: Collect multi-source heterogeneous passenger flow data generated by various turnstiles, cameras and mobile signaling sources in the urban rail transit system, and align and merge the multi-source heterogeneous passenger flow data according to a unified timestamp to generate an original merged passenger flow sequence. Anomaly detection and cleaning are performed on the original fused passenger flow sequence to identify and remove outlier data points caused by equipment failure or communication errors. The cleaned passenger flow data stream is then segmented by a sliding window to form multiple consecutive time window data blocks. Spatiotemporal feature extraction is performed on each time window data block. Passenger flow statistics within the window are extracted in the time dimension, and passenger flow interaction intensity of related stations is extracted based on the urban rail transit network topology in the spatial dimension. The results are combined to obtain a spatiotemporal feature vector. A dynamic evolution map of spatiotemporal feature vectors is constructed. A feature evolution relationship network is established with time windows as nodes and similarity between feature vectors as edges. Based on the feature evolution relationship network, the transfer path of passenger flow pattern is identified. The spatiotemporal feature vector and the identified passenger flow pattern transfer path are input into a prediction model. The prediction model calculates the passenger flow prediction value of each station in a specific future time period by analyzing the evolution law of spatiotemporal features and the continuity of pattern transfer, and marks abnormal passenger flow stations that exceed the historical threshold range.

[0006] Preferably, the outlier detection and cleaning of the original fused passenger flow sequence, identifying and removing outlier data points caused by equipment failure or communication errors, and segmenting the cleaned passenger flow data stream into multiple consecutive time window data blocks, specifically includes: For each data point in the original integrated passenger flow sequence, a local sequence is formed based on its preceding and following data points. The statistical deviation of the data point relative to the local sequence is calculated. When the statistical deviation exceeds a preset sensitivity threshold, the data point is determined to be an outlier and is removed from the original integrated passenger flow sequence. At the locations where outliers were removed, a time-trend-based interpolation method was used to fill in the missing values ​​by utilizing the changing trends of valid data points before and after, thereby generating a continuous passenger flow time series. Set a sliding window of fixed time length, slide it over the continuous passenger flow time series with a preset step size, and capture passenger flow data within a time period each time it slides to form a single time window data block; Each captured time window data block is normalized to eliminate the dimensional differences between different data sources. The normalized time window data blocks are then stored in chronological order to form a time window data block queue for subsequent analysis.

[0007] Preferably, the step of performing spatiotemporal feature extraction on each time window data block, extracting passenger flow statistics within the window in the time dimension, and extracting passenger flow interaction intensity of related stations based on the urban rail transit network topology in the spatial dimension, and combining them to obtain a spatiotemporal feature vector, specifically includes: For each time window data block in the time window data block queue, calculate the maximum, minimum, mean, variance and slope of passenger flow within the time window data block, and combine these calculated statistics to form a time dimension feature sub-vector; Based on the connection relationship between urban rail transit lines and stations, a network topology graph is constructed with stations as nodes and interval connections as edges. For the target station corresponding to the data block of the current time window, its directly adjacent related stations are found in the network topology graph. Obtain passenger flow data of the associated stations within the same time window data block, calculate the passenger flow covariance between the target station and each associated station, aggregate all calculated covariance values ​​to form a spatial feature sub-vector reflecting the spatial correlation strength; By concatenating the time-dimensional feature vector with the spatial feature vector, a high-dimensional spatiotemporal feature vector is obtained that comprehensively represents the spatiotemporal characteristics of passenger flow of the target station within the time period corresponding to the data block of the time window. A corresponding spatiotemporal feature vector is then generated for each data block of the time window.

[0008] Preferably, the construction of the dynamic evolution map of spatiotemporal feature vectors, using time windows as nodes and the similarity between feature vectors as edges, establishes a feature evolution relationship network, and identifies the transfer path of passenger flow patterns based on the feature evolution relationship network, specifically including: Each spatiotemporal feature vector generated in chronological order is treated as an independent node and numbered according to its temporal sequence. Calculate the cosine similarity between the spatiotemporal feature vectors corresponding to any two different nodes. When the two nodes are temporally adjacent and the cosine similarity is greater than a preset connectivity threshold, a directed edge is established between the two nodes. The direction of the directed edge is from the node generated earlier to the node generated later. Connecting all nodes and edges that meet the conditions forms a directed network that describes the evolution of spatiotemporal features over time, which is called a dynamic evolution graph. In the dynamic evolution map, starting from the node representing the historical pattern, all paths that can reach the node representing the most recent time window are searched. The spatiotemporal feature vector sequence represented by the node in the path is identified as the potential transfer path of passenger flow pattern from history to the present, and each transfer path is recorded.

[0009] Preferably, the step of inputting the spatiotemporal feature vector and the identified passenger flow pattern transfer path into a prediction model, wherein the prediction model calculates the passenger flow forecast value for each station within a specific future time period by analyzing the evolution law of spatiotemporal features and the continuity of pattern transfer, includes the following specific steps: Prepare the input data for the prediction model. The input data includes the latest spatiotemporal feature vector corresponding to the current time window, as well as multiple passenger flow pattern transfer paths identified from the dynamic evolution map. Each passenger flow pattern transfer path is transformed into a fixed-dimensional path encoding vector. Specifically, the spatiotemporal feature vectors corresponding to all nodes on the path are subjected to temporal pooling, and all path encoding vectors are fused with the latest spatiotemporal feature vector to generate a comprehensive feature representation that integrates the current state and historical evolution patterns. The comprehensive feature representation is input into a time series prediction model based on an attention mechanism. The prediction model uses the attention mechanism to measure the contribution weight of different historical patterns to the current prediction, and performs weighted fusion of historical feature information based on the contribution weight. The prediction model outputs a passenger flow prediction sequence for multiple consecutive time windows in the future based on the weighted and fused feature information. The passenger flow prediction sequence contains the passenger flow prediction value of the target station in a specific future time period.

[0010] Preferably, the process of identifying abnormal passenger flow stations that exceed historical threshold range further includes: A historical passenger flow database is established for each station to store passenger flow statistics for the same period and week in history. Based on the historical passenger flow database, the historical passenger flow threshold range for each station in the future prediction period is calculated. The predicted passenger flow for a specific future time period output by the prediction model is compared with the historical passenger flow threshold range for the corresponding station and time period. If the predicted passenger flow of a station in a future period continues to exceed the upper limit of its historical passenger flow threshold range, the station will be marked as a potentially abnormally high passenger flow station in that future period. All potentially high-traffic sites marked with abnormal data and their corresponding abnormal time periods are integrated to generate an abnormal high-traffic warning list.

[0011] Preferably, after generating an abnormally large passenger flow warning list, the process also includes steps for verifying and updating the warning list: When the actual time reaches a certain warning period in the warning list, the actual passenger flow of the marked station during the warning period is collected in real time; The actual passenger flow collected is compared with the predicted passenger flow value of the stations in the early warning list, and the prediction deviation rate is calculated. If the prediction deviation rate is consistently lower than the preset verification threshold, the prediction is considered accurate, and the abnormal status of the marked station is maintained. If the actual passenger flow does not reach the predicted value and the deviation rate exceeds the verification threshold, the abnormal mark of the marked station during this period will be immediately removed from the warning list. Based on the results of this verification, the historical passenger flow database of the corresponding station is updated, and the actual passenger flow data of this time is used as a new sample to fine-tune the parameters of the prediction model in order to optimize the subsequent prediction accuracy.

[0012] Preferably, the calculation of passenger flow interaction intensity of associated stations based on the urban rail transit network topology adopts a dynamic weighting method: When calculating the passenger flow covariance between the target station and related stations, not only the data of the current time window is considered, but a time decay factor is also introduced to consider the covariance data of the historical window. The calculated covariance value is dynamically weighted based on the frequency of trains operating between the two stations; the higher the frequency, the greater the weight. The weighted covariance values ​​are normalized and mapped to the interval between zero and one to obtain the final passenger flow interaction intensity value. The dynamically weighted passenger flow interaction intensity value is used to construct the spatial feature sub-vector.

[0013] Preferably, the step of inputting the comprehensive feature representation into a time series prediction model based on an attention mechanism, wherein the prediction model uses the attention mechanism to measure the contribution weight of different historical patterns to the current prediction, and performs weighted fusion of historical feature information based on the contribution weight, specifically including: The comprehensive feature representation is decomposed into a first feature vector representing the current time window state, and a set of multiple second feature vectors representing the transfer paths of each historical passenger flow pattern. Calculate the dot product between the first feature vector and each second feature vector in the second feature vector set to obtain the initial correlation score; The initial correlation score is normalized using the Softmax function to generate the attention weight coefficient for each historical passenger flow pattern transfer path corresponding to the current prediction task. Multiply each second feature vector in the second feature vector set with its corresponding attention weight coefficient to obtain the weighted historical feature vector; Summing all weighted historical feature vectors generates a context vector that aggregates key historical pattern information; The context vector is concatenated with the first feature vector to form a feature enhancement vector that integrates historical attention and the current state; The feature enhancement vector is input into the fully connected network layer of the prediction model for nonlinear transformation, and the output is a passenger flow prediction sequence for multiple consecutive time windows in the future.

[0014] Preferably, the method further includes an evaluation step of the fusion quality of multi-source heterogeneous passenger flow data: After aligning and merging multi-source heterogeneous passenger flow data according to a unified timestamp, the integrity and consistency of the merged data are evaluated. Calculate the correlation coefficient between passenger flow data from different data sources for the same monitoring point within the same time period, and use the correlation coefficient as a quantitative indicator of data consistency; If the consistency index of a certain data source with most data sources is consistently lower than the trust threshold, the weight of the data source with the consistency index consistently lower than the trust threshold will be reduced in subsequent data fusion, or a maintenance alarm for the acquisition device corresponding to the data source will be triggered. Regularly generate data fusion quality reports, which include the availability, consistency indicators, and weight adjustment records of each data source. These data fusion quality reports are used to guide the maintenance and optimization of the data acquisition system.

[0015] Compared with the prior art, the beneficial effects of the present invention are: A dynamic evolutionary graph of spatiotemporal feature vectors is constructed, and nodes in continuous time windows are connected by edges based on feature similarity, transforming the temporal continuity of passenger flow data into an explicit network topology. This method can quantify and extract frequent patterns and probabilistic relationships of transitions between different passenger flow states from historical data. The system can directly determine the tendency of subsequent states based on the position of the current observation window in the evolutionary network and the weights of its connecting edges. This allows the identification of abnormal passenger flow to move beyond simply relying on instantaneous flow exceeding static thresholds, and enables earlier warnings by detecting whether the current state deviates from its normal evolutionary path, thus improving the timeliness of anomaly detection.

[0016] By using the identified passenger flow pattern transition paths and the original spatiotemporal feature vectors as inputs to the prediction model, explicit dynamic process context information is introduced into the model's decision-making. The model's computation process is simultaneously constrained by both the statistical regularity of feature values ​​and the probabilistic regularity of state transitions. Predictive inference is not only based on the induction of historically similar features but also incorporates judgments on the sustainability of the current evolutionary stage. This enhances the ability to capture nonlinear changes in passenger flow trends, especially near critical points where passenger flow growth rates change or trends are about to reverse. The prediction results are more sensitive and accurate in responding to stage-specific changes, reducing prediction lag or bias caused by pattern switching. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the steps of the real-time prediction method for abnormally large passenger flows in urban rail transit as described in this invention. Figure 2 Flowchart for generating spatiotemporal feature vectors; Figure 3 A quality assessment chart for multi-source passenger flow data fusion; Figure 4 A graph showing the attention weights and similarity analysis of passenger flow pattern transfer paths; Figure 5A heat map showing the intensity of passenger flow interaction between target stations and related stations in a rail transit network. Detailed Implementation

[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. 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.

[0019] See Figure 1 This process involves collecting multi-source heterogeneous passenger flow data from various turnstiles, cameras, and mobile signaling sources within the urban rail transit system. The data is then aligned and fused according to a unified timestamp to generate an original fused passenger flow sequence. Anomaly detection and cleaning are performed on the original fused passenger flow sequence to identify and remove outlier data points caused by equipment failures or communication errors. The cleaned passenger flow data stream is then segmented into multiple continuous time window data blocks using a sliding window method. Spatiotemporal feature extraction is performed on each time window data block, extracting passenger flow statistics within the window in the time dimension and based on the urban rail transit network in the spatial dimension. The topology extracts the passenger flow interaction intensity of related stations and combines them to obtain spatiotemporal feature vectors. A dynamic evolution map of the spatiotemporal feature vectors is constructed. Using time windows as nodes and the similarity between feature vectors as edges, a feature evolution relationship network is established, and the transfer path of passenger flow patterns is identified based on the feature evolution relationship network. The spatiotemporal feature vectors and the identified passenger flow pattern transfer paths are input into a prediction model. The prediction model calculates the passenger flow prediction value of each station in a specific future time period by analyzing the evolution law of spatiotemporal features and the continuity of pattern transfer, and marks abnormal passenger flow stations that exceed the historical threshold range.

[0020] In one embodiment of the present invention, the original fused passenger flow sequence is a sequence of discrete data points arranged according to a uniform timestamp, where each data point contains passenger flow observations obtained from multi-source data fusion at a specific time. When performing outlier detection and cleaning on the original fused passenger flow sequence, for each data point in the sequence, a local sequence is formed by a predetermined number of adjacent data points. This local sequence is used to characterize the local context of the data point. The statistical deviation of the data point relative to the local sequence is calculated. The statistical deviation is used to quantify the degree of difference between the data point and the local context. When the calculated statistical deviation exceeds a preset sensitivity threshold, the data point is determined to be an outlier caused by equipment failure or communication error, and the outlier is removed from the original fused passenger flow sequence.

[0021] In some embodiments, statistical deviation can be calculated based on the relationship between data point values ​​and the mean and standard deviation of the local sequence. A specific calculation method is defined by the following formula: ; in: Indicates the degree of statistical deviation. This represents the value of the data point to be evaluated. This represents the arithmetic mean of all data point values ​​in a local sequence. This represents the standard deviation of all data point values ​​in a local sequence. It is a very small constant used to avoid the case where the denominator is zero.

[0022] In practice, removing outliers from the original merged passenger flow sequence creates missing data points. These missing values ​​are filled using a time-trend-based interpolation method. This method estimates the missing value by utilizing the numerical trends of valid data points before and after the missing point. For each missing point, the preceding and following valid data points are selected, and the estimated value of the missing point is calculated based on the linear relationship between them, thus generating a continuous passenger flow time series. It can be understood that the continuous passenger flow time series no longer contains the data gaps caused by outlier removal.

[0023] In one embodiment of the present invention, see [reference] Figure 2 For each time window data block in the time window data block queue, spatiotemporal feature extraction needs to be performed to generate a vector representing the passenger flow pattern. The extraction of the time dimension feature sub-vector is achieved by calculating multiple statistics of passenger flow within the time window data block. These statistics include the maximum value, minimum value, mean value, variance, and slope of passenger flow. The slope of passenger flow can be obtained by fitting the trend line of passenger flow over time within the time window data block using a linear regression method. The calculated maximum value, minimum value, mean value, variance, and slope are combined in a predetermined order to form the time dimension feature sub-vector. In practical implementation, the extraction of spatial feature sub-vectors is based on the urban rail transit network topology. According to the connection relationship between urban rail transit lines and stations, a network topology graph is constructed with stations as nodes and interval connections as edges. For the target station corresponding to the current time window data block, its directly adjacent associated stations are found in the network topology graph. Passenger flow data of associated stations within the same time window data block is obtained, and the passenger flow covariance between the target station and each associated station is calculated. The passenger flow covariance calculation adopts the standard covariance formula, which reflects the degree of coordination of passenger flow changes of two stations in the same time period. All the calculated covariance values ​​are aggregated. The aggregation operation can be summation, averaging, or concatenation to form a spatial feature sub-vector that reflects the spatial correlation strength.

[0024] In some embodiments, when extracting the passenger flow interaction intensity of associated stations based on the urban rail transit network topology, the calculation of the interaction intensity adopts a dynamic weighting method. This dynamic weighting method, when calculating the passenger flow covariance between the target station and associated stations, not only considers the data of the current time window but also introduces a time decay factor to consider the covariance data of historical windows. Based on the frequency density of trains operating between the two stations, the calculated covariance value is dynamically weighted; the higher the frequency density, the greater the weight. A specific dynamic weighted covariance calculation method is defined by the following formula: ; in: This represents the dynamically weighted covariance between target station i and associated station j. This represents a dynamic weighting factor based on the frequency density between station i and station j. This represents the passenger flow covariance calculated based on the data in the current time window. This represents the passenger flow covariance calculated based on the data from the k-th historical time window. This represents the overall weighting coefficient of the historical covariance data. This represents the time decay factor, and its value is between zero and one. This indicates the number of historical time windows considered. This can be understood as a time decay factor. This makes more recent historical data have a greater impact.

[0025] In specific implementation, the dynamically weighted covariance values ​​are normalized and mapped to the interval between zero and one to obtain the final passenger flow interaction intensity value. The normalization process uses a min-max scaling method to scale the dynamically weighted covariance values ​​of all target stations and associated station pairs to between zero and one. The dynamically weighted passenger flow interaction intensity value is used to construct the spatial feature sub-vector. In some embodiments, the concatenation of the time-dimensional feature sub-vector and the spatial feature sub-vector is completed through a vector concatenation operation, directly connecting the time-dimensional feature sub-vector and the spatial feature sub-vector into a longer vector, resulting in a high-dimensional spatiotemporal feature vector that comprehensively represents the spatiotemporal characteristics of passenger flow at the target station within the time period corresponding to the time window data block. A corresponding spatiotemporal feature vector is generated for each time window data block, and the spatiotemporal feature vectors are arranged in chronological order to form a feature sequence. Optionally, before concatenation, the time-dimensional feature sub-vector and the spatial feature sub-vector can be adjusted or standardized to ensure the consistency of the numerical distribution of the concatenated vector. The aggregation method of spatial feature subvectors can be adjusted. For example, in addition to using covariance aggregation, graph convolution operations based on network topology can be introduced to extract more complex spatial dependency features, but covariance aggregation is still the main method in basic implementation.

[0026] In one embodiment of the present invention, constructing a dynamic evolution map of spatiotemporal feature vectors begins with processing each spatiotemporal feature vector generated in chronological order. Each spatiotemporal feature vector is treated as an independent node and sequentially numbered according to its generation time. The numbering results are used to identify the temporal order of the nodes. In a specific implementation, the cosine similarity between spatiotemporal feature vectors corresponding to any two different nodes is calculated. Cosine similarity measures the directional proximity of two high-dimensional vectors, and its value ranges between negative one and positive one. For spatiotemporal feature vectors, a higher sine and cosine similarity indicates that the passenger flow patterns represented by the two nodes within the time window have a higher morphological similarity.

[0027] In some embodiments, cosine similarity is calculated using the ratio of vector dot product to magnitude, and a specific calculation method is defined by the following formula: ; in: This represents the spatiotemporal feature vector corresponding to node i. The spatiotemporal feature vector corresponding to node j Cosine similarity between them, dot product operation This represents the sum of the products of the corresponding dimensions of two vectors, with the sign... Representing vectors The Euclidean norm, i.e., the modulus, is represented by the symbol. Representing vectors The Euclidean norm.

[0028] In practical implementation, a feature evolution relationship network is established based on the calculated cosine similarity results and the temporal relationship of nodes. When two nodes are temporally adjacent and the calculated cosine similarity between these two nodes is greater than a preset connectivity threshold, a directed edge is established between these two nodes. The direction of the directed edge is from the node generated earlier to the node generated later. The connectivity threshold can be understood as a preset numerical threshold used to filter out temporary fluctuations with excessively low pattern similarity, ensuring that the established connections represent meaningful pattern continuation or evolution. Connecting all nodes that meet the aforementioned conditions with directed edges forms a directed network describing the evolution of spatiotemporal features over time. This directed network is the dynamic evolution graph, and the paths in the dynamic evolution graph represent the possible evolutionary trajectories of passenger flow patterns.

[0029] In some embodiments, the transfer paths of passenger flow patterns are identified based on a dynamic evolution graph. In the dynamic evolution graph, starting from nodes representing historical patterns (which can be predefined typical pattern nodes based on business knowledge or nodes generated earlier in the dynamic evolution graph), all directed paths that can reach the node representing the most recent time window via directed edges are searched. All searched directed paths are recorded. The spatiotemporal feature vector sequence represented by the nodes in each directed path is identified as a potential transfer path of passenger flow patterns from the past to the present. It can be understood that by traversing the dynamic evolution graph for path search, all possible pattern evolution histories can be systematically enumerated, rather than a single sequence. In specific implementations, each transfer path is recorded, including the node sequence contained in the path and the directed edges between adjacent nodes on the path. These transfer paths, along with the current spatiotemporal feature vector, serve as input to the prediction model. Optionally, the path search can be implemented using a depth-first search or breadth-first search algorithm. Optionally, to improve efficiency or focus on key patterns, a maximum path length limit can be set for path search or search results can be sorted and filtered by path weight, but all reachable paths are recorded in the basic implementation.

[0030] See Figure 3 This is a quality assessment chart for multi-source passenger flow data fusion. Through a combination of bar charts and line graphs, it visually displays the availability and data consistency coefficients of different data sources in the urban rail transit system, serving as a key basis for evaluating the quality of multi-source heterogeneous data fusion. The weights of each data source in the fusion model are dynamically adjusted based on the consistency coefficients to improve the accuracy of the fused data. Low consistency and availability of mobile signaling indicate potential malfunctions or signal interference in the acquisition equipment, and these should be prioritized for maintenance. A layered fusion strategy of "core data source (gate / card swipe) + auxiliary verification (camera / manual)" is adopted to reduce the interference of low-quality data on the prediction model. When the consistency coefficient of a data source consistently falls below a confidence threshold (e.g., 0.85), an equipment maintenance alarm is automatically triggered to ensure the stability of data acquisition.

[0031] In one embodiment of the present invention, the input data for the prediction model is prepared. The input data includes the latest spatiotemporal feature vector corresponding to the current time window and multiple passenger flow pattern transfer paths identified from the dynamic evolution map. In a specific implementation, each passenger flow pattern transfer path is converted into a fixed-dimensional path encoding vector. The conversion method is to perform temporal pooling on the spatiotemporal feature vectors corresponding to all nodes on the path. The temporal pooling operation can use max pooling, average pooling, or attention-based weighted pooling. By aggregating the values ​​of each feature dimension in the path sequence, the variable-length node vector sequence is compressed into a fixed-length path encoding vector. All path encoding vectors obtained after temporal pooling are fused with the latest spatiotemporal feature vector. The fusion operation can be achieved by concatenating vectors and then connecting them to a fully connected layer for dimensionality reduction, generating a comprehensive feature representation that integrates the current state and historical evolution patterns.

[0032] In some embodiments, the process of generating path encoding vectors can be illustrated by an example. Suppose three passenger flow pattern transfer paths are identified from a dynamic evolution map. The node sequences and their spatiotemporal feature vectors contained in the paths need to be encoded, and the temporal pooling operation uses the average pooling method. See Table 1.

[0033] Table 1: Path Encoding Vector Generation Table

[0034] In practical implementation, the comprehensive feature representation is input into a time series prediction model based on an attention mechanism. The prediction model uses the attention mechanism to measure the contribution weight of different historical patterns to the current prediction, and performs weighted fusion of historical feature information based on the contribution weight. The comprehensive feature representation is decomposed into a first feature vector representing the current time window state, and a set of multiple second feature vectors representing the transfer paths of each historical passenger flow pattern. The first feature vector is extracted from the portion of the comprehensive feature representation corresponding to the latest spatiotemporal feature vector, and the set of second feature vectors is composed of the portion of the comprehensive feature representation corresponding to the encoding vectors of each path.

[0035] In practical implementation, the weight calculation based on the attention mechanism includes the following steps: calculating the dot product between the first feature vector and each second feature vector in the second feature vector set to obtain the initial relevance score; applying the Softmax function to normalize the initial relevance score to generate the attention weight coefficient for each historical passenger flow pattern transfer path corresponding to the current prediction task. A specific method for calculating the attention weight coefficient is defined by the following formula: ; in: This represents the attention weight coefficient for the p-th historical passenger flow pattern transfer path. This represents the first feature vector characterizing the current time window state. Let the second feature vector, denoted by , represent the p-th historical passenger flow pattern transfer path. This represents the vector dot product operation. The function represents the total number of historical passenger flow pattern transfer paths. This represents the natural exponential function.

[0036] In specific implementation, each second feature vector in the second feature vector set is multiplied by its corresponding attention weight coefficient to obtain a weighted historical feature vector. All weighted historical feature vectors are summed to generate a context vector that aggregates key historical pattern information. This context vector is concatenated with the first feature vector to form a feature enhancement vector that integrates historical attention and the current state. It can be understood that the feature enhancement vector simultaneously contains current passenger flow characteristics and filtered historical pattern evolution information. The feature enhancement vector is input into the fully connected network layer of the prediction model for nonlinear transformation. The fully connected network layer typically contains one or more linear transformation layers with activation functions, outputting a passenger flow prediction sequence for multiple consecutive future time windows. This passenger flow prediction sequence contains the predicted passenger flow values ​​for the target station within a specific future time period. In some embodiments, the prediction model can adopt an encoder-decoder architecture, where the encoder processes historical features, and the decoder progressively generates future prediction sequences based on the feature enhancement vector. Optionally, the attention mechanism can be extended to multi-head attention to capture the relationship between historical patterns and the current state from different subspaces. Optionally, in addition to dot-product attention, additive attention mechanisms can also be used to calculate the initial relevance score.

[0037] See Figure 4 This is a graph analyzing the attention weights and similarity of passenger flow pattern shift paths. It visually displays the attention weight coefficients and cosine similarity of feature vectors for three passenger flow pattern shift paths, serving as a key basis for pattern matching and weight allocation in predicting abnormally large passenger flows in urban rail transit. The differences in attention weights reflect the contribution of different historical passenger flow patterns to the current prediction, and can be used to optimize the feature fusion strategy of the prediction model, improving the accuracy of identifying abnormally large passenger flows. The level of cosine similarity directly corresponds to the degree of matching between historical passenger flow patterns and the current state; high-similarity paths (such as P1) can serve as the core reference pattern for early warning of abnormally large passenger flows. By quantifying the weights and similarities of different paths, the most valuable historical patterns can be quickly located, reducing manual analysis costs and improving the speed of real-time early warning response.

[0038] In one embodiment of the present invention, a historical passenger flow database is established for each station. This database stores passenger flow statistics for the station during the same historical period and week. Based on this database, the historical passenger flow threshold range for each station in the future forecast period is calculated. The calculation of the historical passenger flow threshold range is based on the distribution of passenger flow data during the same historical period and week. The upper and lower limits can be selected as the mean plus or minus a certain number of standard deviations, or percentiles (such as the 5th and 95th percentiles) can be used to define the threshold range. The predicted passenger flow value for a specific future period output by the prediction model is compared with the historical passenger flow threshold range for the corresponding station and period. If the predicted passenger flow value for a station in a future period consistently exceeds the upper limit of its historical passenger flow threshold range, the station is marked as a potentially abnormally high passenger flow station in the future period. All marked potentially abnormally high passenger flow stations and their corresponding abnormal period information are integrated to generate an abnormally high passenger flow warning list. The entries in the abnormally high passenger flow warning list include the station identifier, the warning period, the predicted passenger flow value, and the extent to which it exceeds the historical threshold range.

[0039] In practice, when the actual time reaches a certain warning period in the abnormally large passenger flow warning list, the actual inbound, outbound, and in-station passenger flow of the marked stations during the warning period is collected in real time. The actual passenger flow data is collected from cleaned and aligned multi-source heterogeneous passenger flow data. The collected actual passenger flow is compared with the predicted passenger flow values ​​of the stations in the abnormally large passenger flow warning list to calculate the prediction deviation rate. The prediction deviation rate quantifies the degree of difference between the predicted value and the actual observed value. A specific method for calculating the prediction deviation rate is defined by the following formula: ; in: Indicates the prediction bias rate. This refers to the passenger flow forecast values ​​recorded in the abnormally large passenger flow warning list for specific time periods and stations. This represents the actual passenger flow collected at the same time period and station. It can be understood that the prediction bias rate is a dimensionless relative error indicator.

[0040] In practice, the verification logic of the early warning list is executed based on the prediction deviation rate calculation results. If the prediction deviation rate is consistently lower than the preset verification threshold, the prediction is considered accurate, and the abnormal status of the marked station is maintained. A consistently lower rate than the verification threshold means that the prediction deviation rate has not exceeded the verification threshold at multiple consecutive monitoring points during the early warning period. If the actual passenger flow does not reach the predicted value and the deviation rate exceeds the verification threshold, the abnormal status of the marked station during this period is immediately removed from the abnormal large passenger flow early warning list. Based on the verification results, the historical passenger flow database of the corresponding station is updated. The update operation includes adding the actual passenger flow data as a new historical sample to the corresponding category in the historical passenger flow database. The actual passenger flow data and its corresponding previous features are used as a new training sample to fine-tune the parameters of the prediction model to optimize subsequent prediction accuracy. The fine-tuning process can be performed online or offline after accumulating a certain number of batches.

[0041] In some embodiments, after aligning and fusing multi-source heterogeneous passenger flow data according to a unified timestamp, the integrity and consistency of the fused data are evaluated. The correlation coefficient between passenger flow data from different data sources for the same monitoring point within the same time period is calculated. This correlation coefficient serves as a quantitative indicator of data consistency; a correlation coefficient close to positive one indicates a high degree of consistency in the changing trends among the data sources. If the consistency index of a particular data source with most data sources consistently falls below a confidence threshold, the weight of that data source in subsequent data fusion is reduced, or a maintenance alarm for the corresponding data acquisition equipment is triggered. Data fusion quality reports are generated periodically, including the availability of each data source, consistency index, and weight adjustment records. These reports guide the maintenance and optimization of the data acquisition system.

[0042] See Figure 5 This is a heatmap used to display the intensity of passenger flow interaction between target stations and related stations in a rail transit network. It is a core tool for analyzing station spatial relationships and identifying key transfer hubs. Station pairs with high interaction intensity (such as ID / E / F) are key connection points in the network, and priority should be given to allocating capacity and increasing security equipment to improve hub capacity. Interaction intensity data is the core spatial dimension for constructing spatiotemporal feature vectors and can be directly used in abnormal large passenger flow prediction models to improve prediction accuracy. For high interaction intervals (such as ID / E / F), train frequency can be increased to alleviate congestion during peak hours; for low interaction intervals, capacity allocation can be optimized to reduce operating costs. In the event of an emergency, high interaction intensity stations will have a wider impact on the network and should be prioritized for emergency response.

[0043] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A method for real-time prediction of abnormally large passenger flows in urban rail transit, characterized in that, The following steps are included: Collect multi-source heterogeneous passenger flow data generated by various turnstiles, cameras and mobile signaling sources in the urban rail transit system, and align and merge the multi-source heterogeneous passenger flow data according to a unified timestamp to generate an original merged passenger flow sequence. Anomaly detection and cleaning are performed on the original fused passenger flow sequence to identify and remove outlier data points caused by equipment failure or communication errors. The cleaned passenger flow data stream is then segmented by a sliding window to form multiple consecutive time window data blocks. Spatiotemporal feature extraction is performed on each time window data block. Passenger flow statistics within the window are extracted in the time dimension, and passenger flow interaction intensity of related stations is extracted based on the urban rail transit network topology in the spatial dimension. The results are combined to obtain a spatiotemporal feature vector. A dynamic evolution graph of spatiotemporal feature vectors is constructed. Using time windows as nodes and the similarity between feature vectors as edges, a feature evolution relationship network is established. Based on this feature evolution relationship network, the transfer paths of passenger flow patterns are identified, specifically including: Each spatiotemporal feature vector generated in chronological order is treated as an independent node and numbered according to its temporal sequence. Calculate the cosine similarity between the spatiotemporal feature vectors corresponding to any two different nodes. When the two nodes are temporally adjacent and the cosine similarity is greater than a preset connectivity threshold, a directed edge is established between the two nodes. The direction of the directed edge is from the node generated earlier to the node generated later. Connecting all nodes that meet the conditions forms a directed network that describes the evolution of spatiotemporal features over time, which is called a dynamic evolution graph. In the dynamic evolution map, starting from the node representing the historical pattern, all paths that can reach the node representing the most recent time window are searched. The spatiotemporal feature vector sequence represented by the nodes in the path is identified as the potential transfer path of the passenger flow pattern from the past to the present, and each transfer path is recorded. The spatiotemporal feature vectors and the identified passenger flow pattern transition paths are input into a prediction model. This prediction model, by analyzing the evolution of spatiotemporal features and the continuity of pattern transitions, calculates the predicted passenger flow values ​​for each station within a specific future time period. The specific steps include: Prepare the input data for the prediction model. The input data includes the latest spatiotemporal feature vector corresponding to the current time window, as well as multiple passenger flow pattern transfer paths identified from the dynamic evolution map. Each passenger flow pattern transfer path is transformed into a fixed-dimensional path encoding vector. Specifically, the spatiotemporal feature vectors corresponding to all nodes on the path are subjected to temporal pooling, and all path encoding vectors are fused with the latest spatiotemporal feature vector to generate a comprehensive feature representation that integrates the current state and historical evolution patterns. The comprehensive feature representation is input into a time series prediction model based on an attention mechanism. The prediction model uses the attention mechanism to measure the contribution weight of different historical patterns to the current prediction, and performs weighted fusion of historical feature information based on the contribution weight. The prediction model outputs a passenger flow prediction sequence for multiple consecutive time windows in the future based on the weighted and fused feature information. The passenger flow prediction sequence contains the passenger flow prediction value of the target station in a specific future time period. It also marks abnormal passenger flow stations that exceed historical threshold ranges.

2. The method for real-time prediction of abnormally large passenger flows in urban rail transit according to claim 1, characterized in that, The process of detecting and cleaning outliers in the original fused passenger flow sequence, identifying and removing outlier data points caused by equipment failure or communication errors, and segmenting the cleaned passenger flow data stream using a sliding window to form multiple consecutive time window data blocks, specifically includes: For each data point in the original integrated passenger flow sequence, a local sequence is formed based on its preceding and following data points. The statistical deviation of the data point relative to the local sequence is calculated. When the statistical deviation exceeds a preset sensitivity threshold, the data point is determined to be an outlier and is removed from the original integrated passenger flow sequence. At the locations where outliers were removed, a time-trend-based interpolation method was used to fill in the missing values ​​by utilizing the changing trends of valid data points before and after, thereby generating a continuous passenger flow time series. Set a sliding window of fixed time length, slide it over the continuous passenger flow time series with a preset step size, and capture passenger flow data within a time period each time it slides to form a single time window data block; Each captured time window data block is normalized to eliminate the dimensional differences between different data sources. The normalized time window data blocks are then stored in chronological order to form a time window data block queue for subsequent analysis.

3. The method for real-time prediction of abnormally large passenger flows in urban rail transit according to claim 2, characterized in that, The process of performing spatiotemporal feature extraction on each time window data block involves extracting passenger flow statistics within the window in the time dimension and extracting the passenger flow interaction intensity of related stations based on the urban rail transit network topology in the spatial dimension. The combined results form a spatiotemporal feature vector, specifically including: For each time window data block in the time window data block queue, calculate the maximum, minimum, mean, variance and slope of passenger flow within the time window data block, and combine these calculated statistics to form a time dimension feature sub-vector; Based on the connection relationship between urban rail transit lines and stations, a network topology graph is constructed with stations as nodes and interval connections as edges. For the target station corresponding to the data block of the current time window, its directly adjacent related stations are found in the network topology graph. Obtain passenger flow data of the associated stations within the same time window data block, calculate the passenger flow covariance between the target station and each associated station, aggregate all calculated covariance values ​​to form a spatial feature sub-vector reflecting the spatial correlation strength; By concatenating the time-dimensional feature vector with the spatial feature vector, a high-dimensional spatiotemporal feature vector is obtained that comprehensively represents the spatiotemporal characteristics of passenger flow of the target station within the time period corresponding to the data block of the time window. A corresponding spatiotemporal feature vector is then generated for each data block of the time window.

4. The method for real-time prediction of abnormally large passenger flows in urban rail transit according to claim 3, characterized in that, The process of identifying abnormal passenger flow stations that exceed historical threshold ranges further includes: A historical passenger flow database is established for each station to store passenger flow statistics for the same period and week in history. Based on the historical passenger flow database, the historical passenger flow threshold range for each station in the future prediction period is calculated. The predicted passenger flow for a specific future time period output by the prediction model is compared with the historical passenger flow threshold range for the corresponding station and time period. If the predicted passenger flow of a station in a future period continues to exceed the upper limit of its historical passenger flow threshold range, the station will be marked as a potentially abnormally high passenger flow station in that future period. All potentially high-traffic sites marked with abnormal data and their corresponding abnormal time periods are integrated to generate an abnormal high-traffic warning list.

5. The method for real-time prediction of abnormally large passenger flows in urban rail transit according to claim 4, characterized in that, After generating an alert list for abnormally large passenger flows, the process also includes verifying and updating the alert list: When the actual time reaches a certain warning period in the warning list, the actual passenger flow of the marked station during the warning period is collected in real time; The actual passenger flow collected is compared with the predicted passenger flow value of the stations in the early warning list, and the prediction deviation rate is calculated. If the prediction deviation rate is consistently lower than the preset verification threshold, the prediction is considered accurate, and the abnormal status of the marked station is maintained. If the actual passenger flow does not reach the predicted value and the deviation rate exceeds the verification threshold, the abnormal mark of the marked station during this period will be immediately removed from the warning list. Based on the results of this verification, the historical passenger flow database of the corresponding station is updated, and the actual passenger flow data of this time is used as a new sample to fine-tune the parameters of the prediction model in order to optimize the subsequent prediction accuracy.

6. The method for real-time prediction of abnormally large passenger flows in urban rail transit according to claim 3, characterized in that, The method for extracting passenger flow interaction intensity of associated stations based on the urban rail transit network topology employs a dynamic weighting method for calculating the interaction intensity. When calculating the passenger flow covariance between the target station and related stations, not only the data of the current time window is considered, but a time decay factor is also introduced to consider the covariance data of the historical window. The calculated covariance value is dynamically weighted based on the frequency of trains operating between the two stations; the higher the frequency, the greater the weight. The weighted covariance values ​​are normalized and mapped to the interval between zero and one to obtain the final passenger flow interaction intensity value. The dynamically weighted passenger flow interaction intensity value is used to construct the spatial feature sub-vector.

7. The method for real-time prediction of abnormally large passenger flows in urban rail transit according to claim 1, characterized in that, The process involves inputting the comprehensive feature representation into an attention-based time series prediction model. This model utilizes the attention mechanism to measure the contribution weight of different historical patterns to the current prediction, and then weights and fuses historical feature information based on these contribution weights. Specifically, this includes: The comprehensive feature representation is decomposed into a first feature vector representing the current time window state, and a set of multiple second feature vectors representing the transfer paths of each historical passenger flow pattern. Calculate the dot product between the first feature vector and each second feature vector in the second feature vector set to obtain the initial correlation score; The initial correlation score is normalized using the Softmax function to generate the attention weight coefficient for each historical passenger flow pattern transfer path corresponding to the current prediction task. Multiply each second feature vector in the second feature vector set with its corresponding attention weight coefficient to obtain the weighted historical feature vector; Summing all weighted historical feature vectors generates a context vector that aggregates key historical pattern information; The context vector is concatenated with the first feature vector to form a feature enhancement vector that integrates historical attention and the current state; The feature enhancement vector is input into the fully connected network layer of the prediction model for nonlinear transformation, and the output is a passenger flow prediction sequence for multiple consecutive time windows in the future.

8. The method for real-time prediction of abnormally large passenger flows in urban rail transit according to claim 1, characterized in that, The method also includes an evaluation step for the quality of multi-source heterogeneous passenger flow data fusion: After aligning and merging multi-source heterogeneous passenger flow data according to a unified timestamp, the integrity and consistency of the merged data are evaluated. Calculate the correlation coefficient between passenger flow data from different data sources for the same monitoring point within the same time period, and use the correlation coefficient as a quantitative indicator of data consistency; If the consistency index of a certain data source with most data sources is consistently lower than the trust threshold, the weight of the data source with the consistency index consistently lower than the trust threshold will be reduced in subsequent data fusion, or a maintenance alarm for the acquisition device corresponding to the data source will be triggered. Regularly generate data fusion quality reports, which include the availability, consistency indicators, and weight adjustment records of each data source. These data fusion quality reports are used to guide the maintenance and optimization of the data acquisition system.