A system and method for spatiotemporal passenger flow prediction of urban rail transit
By combining hypergraph convolution and diffusion convolution, a hypergraph is dynamically generated to learn the spatial and temporal characteristics of urban rail transit passenger flow. This solves the problem of balancing accuracy and efficiency in existing technologies and achieves efficient and accurate passenger flow prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGBO ARTIFICIAL INTELLIGENCE RES INST OF SHANGHAI JIAOTONG UNIV
- Filing Date
- 2023-12-26
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to balance accuracy and efficiency in urban rail transit passenger flow forecasting. Traditional methods cannot adapt to complex passenger flow changes, while deep learning methods are computationally slow and difficult to achieve efficient forecasting.
A method combining hypergraph convolution and diffusing convolution is adopted to learn the spatial and temporal feature vectors of passenger flow by dynamically generating hypergraphs. Passenger flow prediction is performed using a hypergraph generation module, a feature learning module, and an output module.
It improves the accuracy and efficiency of passenger flow forecasting, can efficiently process long-term time-series information, and adapts to complex passenger flow trends.
Smart Images

Figure CN117689080B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of passenger flow prediction technology in urban rail transit scenarios, and in particular to a spatiotemporal passenger flow prediction system and method for urban rail transit. Background Technology
[0002] Urban rail transit boasts advantages such as large capacity, high speed, high punctuality, low pollution, and high safety, and has become an indispensable public transportation tool in large and medium-sized cities. In recent years, the urban rail transit network has expanded rapidly, passenger flow has increased dramatically, and the spatial and temporal distribution of passenger flow has become increasingly complex. Furthermore, the imbalance between supply and demand during peak hours has become more prominent, and the number of stations with regular passenger flow restrictions has gradually increased, leading to significant challenges to the system's safe operation and emergency management.
[0003] Passenger flow forecasting can reflect the real-time changes in subway passenger flow, estimate train schedules and adjust passenger organization plans based on actual passenger demand, and provide an important basis for the rational allocation of urban rail transit system resources. Traditional traffic flow forecasting algorithms are mainly based on statistical ideas, predicting future passenger flow changes based on historical passenger flow data, such as the Autoregressive Integrated Moving Average (ARIMA) algorithm. However, passenger flow changes are a complex process. Current passenger flow is related not only to past passenger flow but also to factors such as the time of day, weather, and unforeseen events. It is difficult to accurately predict complex passenger flow trends using only statistics. In the Chinese invention patent application "Urban Rail Transit Passenger Flow Forecasting Method Based on Similar Day Selection" (application number: CN202210591407.0), Guang Zhirui et al. analyzed the similarity between the forecast day and historical days and smoothed the passenger flow of similar days as the forecast value. This method requires a large amount of historical information to define the similarity and cannot be applied to different cities. When special circumstances occur, it cannot achieve accurate passenger flow forecasting.
[0004] In recent years, with the continuous development of deep learning technology, various passenger flow prediction algorithms based on Convolutional Neural Networks (CNNs) have been proposed. Among them, Graph Convolutional Neural Networks (GCNs) are widely used in passenger flow prediction problems. This type of neural network can effectively extract spatial feature vectors of graphs, and is particularly suitable for extracting spatial feature vectors of urban rail transit maps, thereby achieving higher accuracy in passenger flow prediction. Patents "A Method and System for Predicting Rail Transit Passenger Flow Based on Neural Networks" (Application No.: CN202210498705.5) and "A Method for Predicting Urban Rail Transit Passenger Flow Status Based on Spatiotemporal Characteristics" (Application No.: CN202010603626.7) both use graph convolutional neural networks to extract spatial feature vectors of urban rail transit maps. However, in establishing time-series prediction models, the aforementioned methods all chose to use Long Short-Term Memory Networks (LSTM) to learn the temporal feature vectors of passenger flow. The number of parameters in this type of network is affected by the length of the time dimension, resulting in slow computation and a tendency for gradient vanishing, making it difficult to handle long-term time-series information and leading to low prediction accuracy. The patent "A Rail Transit Passenger Flow Prediction Method Considering Dynamic Spatiotemporal Correlation" (application number: CN202110646415.6) uses a temporal attention mechanism to learn the temporal correlation of rail transit passenger flow. While this method can effectively improve the accuracy of model prediction, extracting the temporal feature vectors of historical information through the attention mechanism requires a large amount of computation, resulting in slow model operation and difficulty in achieving efficient passenger flow prediction.
[0005] Therefore, those skilled in the art are dedicated to developing a spatiotemporal passenger flow prediction system and method for urban rail transit. Summary of the Invention
[0006] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is the difficulty in balancing accuracy and efficiency in the prior art.
[0007] The inventors analyzed that passenger movement at various stations on urban rail transit is not directly related to the distance between stations, and passenger flow patterns differ between adjacent stations. Therefore, adjacency matrices based on distance or station topology are not suitable for predicting passenger flow trends. The inventors combined hypergraph theory with the rail transit topology and historical passenger flow data to dynamically generate a hypergraph. Through hypergraph convolution, spatial feature vectors are efficiently extracted from the passenger flow data for accurate passenger flow prediction.
[0008] The inventors defined the terms: OD matrix, or Origin-Destination Matrix, describes the way travel flow occurs, recording the number of trips from one origin to one destination; hyperpoints are the various stations of urban rail transit, and hyperedges are the passenger flow relationships between urban rail transit stations; a hypergraph is composed of hyperpoints and hyperedges, representing the topological structure and passenger flow relationships of urban rail transit, and hypergraphs are divided into spatial hypergraphs, temporal hypergraphs, and composite hypergraphs; spatial hypergraphs represent the spatial movement characteristics of passenger flow, temporal hypergraphs represent the temporal movement characteristics of passenger flow, and composite hypergraphs are obtained by combining temporal and spatial hypergraphs.
[0009] In one embodiment of the present invention, a spatiotemporal passenger flow prediction system for urban rail transit is provided, comprising: The hypermap generation module dynamically generates composite hypermaps based on the connection relationships of stations and routes, as well as passenger flow data. The feature learning module learns the feature vectors of passenger flow through a composite hypergraph. The feature vectors include temporal feature vectors and spatial feature vectors. The feature learning module includes a temporal feature learning sub-module and a spatial feature learning sub-module, which learn the temporal feature vectors and spatial feature vectors respectively. The temporal feature learning sub-module and the spatial feature learning sub-module are connected in series. There are three feature learning modules. Each feature learning module includes N pairs of temporal feature learning sub-modules and spatial feature learning sub-modules, where N is an integer greater than or equal to 1. The output module maps the feature vectors of passenger flow and outputs the predicted passenger flow values. Three feature learning modules are connected in parallel, N pairs of temporal feature learning sub-modules and spatial feature learning sub-modules are connected in sequence, the hypergraph generation module is connected to the three feature learning modules, and the three feature learning modules are connected to the output module.
[0010] In response to the connection relationships of stations and routes and passenger flow data, the hypergraph generation module dynamically generates a composite hypergraph. In response to the composite hypergraph, three feature learning modules learn the feature vectors of passenger flow. Finally, the feature vectors of passenger flow are input into the output module to obtain the passenger flow prediction value.
[0011] Optionally, in the urban rail transit spatiotemporal passenger flow prediction system of the above embodiments, the composite hypergraph has three time granularities.
[0012] Furthermore, in the urban rail transit spatiotemporal passenger flow prediction system of the above embodiments, the three time granularities include hour, day, and week.
[0013] Furthermore, in the urban rail transit spatiotemporal passenger flow prediction system of the above embodiments, the method for the hypergraph generation module to dynamically generate a composite hypergraph includes: S100. Generate a spatial hypergraph. Based on the connection relationships between stations and lines, when two stations are on the same line, connect them with a hyperedge to obtain the spatial hypergraph. ; S110. Calculate the characteristic vector of passenger flow. Based on the time granularity of hours, days, and weeks, obtain the passenger flow OD matrix at the corresponding time granularity, denoted as follows: Ignoring the directionality of passenger flow, the passenger flow vector matrix of the station is obtained by normalization. ,as follows: (1), (2), Normalization uses an activation function. , to give a vector The values of each Normalization to Within the range, the formula is (3), Obtain the passenger flow vector for each station; S120. Generate a time hypermap, calculate the time hypermap at the hourly, daily, and weekly time granularities, and use the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm to divide each site into different classes according to the passenger flow vector. Set the parameters in the algorithm: Control the spacing of neighborhoods between different classes; Control the minimum number of samples for each class; By controlling the feature distance metric function, inputting station passenger flow vectors at different time granularities, running the algorithm, and then connecting stations of the same type with a hyperedge, time hypergraphs at hourly, daily, and weekly time granularities can be obtained. ; S130. Calculate composite hypergraphs, including hourly, daily, and weekly time-granularity composite hypergraphs, and spatial hypergraphs. Time supermaps with hourly, daily, and weekly time granularities respectively Adding them together yields a composite hypergraph with hourly, daily, and weekly time granularities. .
[0014] Optionally, in the urban rail transit spatiotemporal passenger flow prediction system of any of the above embodiments, the spatial feature learning submodule uses a hypergraph convolution formula to learn spatial feature vectors, as follows: (4), in, Let be the degree matrix of the superpoint. Let be the degree matrix of the hyperedge. The incidence matrix of the hypergraph. Let be the parameter matrix of the hypergraph convolution. Given the input feature vector matrix, Let W be the output eigenvector matrix, and W be the hyperedge weight matrix. These are trainable weights.
[0015] Furthermore, in the urban rail transit spatiotemporal passenger flow prediction system of the above embodiments, the method for learning spatial feature vectors includes: S200. Calculate the feature vector of each hyperedge. Combine the feature vectors of all hyperpoints connected by each hyperedge to obtain the feature vector of each hyperedge. S210. Calculate the feature vector of each superpoint. Combine the feature vectors of all the super edges associated with each superpoint to obtain the feature vector of each superpoint.
[0016] Optionally, in the urban rail transit spatiotemporal passenger flow prediction system of any of the above embodiments, the time feature learning submodule uses diffusion convolution to learn the time feature vector. To ensure compliance with temporal logic, future input information is filled with 0, ensuring that the current output is only related to historical information. For a one-dimensional input sequence... and one-dimensional convolution kernel ,time The formula for the spread convolution operation is: (5), in It is the diffusion factor, which controls the jump distance of the diffuse convolution.
[0017] Optionally, in the urban rail transit spatiotemporal passenger flow prediction system of any of the above embodiments, the temporal feature learning submodule is composed of GLU (Gated Linear Unit), and all convolutions are replaced with diffusing convolutions. The GLU formula is: (6), in, All kernels are one-dimensional convolutions, performing diffuse convolution. Indicates element-wise product. for Activation function.
[0018] Furthermore, in the urban rail transit spatiotemporal passenger flow prediction system of the above embodiments, the time feature learning submodule adds a residual connection to help learn a higher-dimensional time feature vector. The difference between the features input from the previous layer and the features learned in this layer is added to the output features, as shown in the formula: (7), in, Given the input feature matrix, This is the output feature matrix.
[0019] Optionally, in the urban rail transit spatiotemporal passenger flow prediction system of any of the above embodiments, the output module uses three fully connected layers for feature mapping and outputs passenger flow prediction values. The formula is (8), in, The eigenvector matrix representing the hypergraph obtained at three different time granularities. This represents the weight matrix of the fully connected layer. It is a constant.
[0020] Based on any of the above embodiments, another embodiment of the present invention provides a method for predicting spatiotemporal passenger flow in urban rail transit, comprising the following steps: S1000, data collection, collects card swipe data from each station through the station's automatic fare collection (AFC) system; S2000, data cleaning and labeling, cleans up invalid data, and generates passenger flow data for each station based on historical card swipe data; S3000, Define the prediction model; Define the prediction model according to the task. S4000: Train the prediction model by using the station's passenger flow data as the dataset, dividing the dataset into training, validation, and test sets according to time sequence and proportion, setting the input sequence length and the prediction sequence length, and obtaining the prediction model. S5000 uses a prediction model for prediction, and uses a trained prediction model for passenger flow prediction.
[0021] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method in the above embodiments, the card swiping data in step S1000 includes card swiping time, station number, card-swiping passenger ID, and entry / exit status.
[0022] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method in any of the above embodiments, invalid data in step S2000 includes data where the entry time is after the exit time, data where the entry and exit interval is less than the minimum entry time or greater than the maximum entry time, and data where the entry and exit times are the same.
[0023] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method in any of the above embodiments, the minimum station entry time is 5 minutes.
[0024] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method in any of the above embodiments, the maximum arrival time is 4 hours.
[0025] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method of any of the above embodiments, step S2000 includes: S2100: Convert a day's operating time into minutes; S2200: Based on a 5-minute time granularity, obtain passenger flow data for each station; S2300: Obtain the OD matrix of passenger flow for each station based on the time granularity of hourly, daily, and weekly.
[0026] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method of any of the above embodiments, step S3000 includes: S3100, Define a hypergraph, define the hypergraph as follows: ,in For exceeding the limit, For superedge, The hyperedge weight matrix is given by [example matrix]. The incidence matrix of the hypergraph is given by [example matrix]. Performance of each super point and super edge The connection relationship; S3200, Define the learning function and set the hypergraph. and historical information time steps Define the learning function To predict the future The passenger flow data based on steps is represented by the following mapping. in Represented as passenger flow data, Indicated as past time Passenger flow data, Indicates future time Passenger flow data.
[0027] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method in any of the above embodiments, in step S4000, the dataset is divided proportionally into a training set of 70%, a validation set of 10%, and a test set of 20%.
[0028] Preferably, in the urban rail transit spatiotemporal passenger flow prediction method in the above embodiments, the length of the input sequence is 12.
[0029] Preferably, in the urban rail transit spatiotemporal passenger flow prediction method in the above embodiments, the predicted sequence length is 6.
[0030] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method of any of the above embodiments, step S4000 includes: S4100: Input the training set, input the data of the training set into the hypergraph generation module, and dynamically generate the hypergraph; S4200, learn spatial feature vectors, learn spatial feature vectors through hypergraph in the spatial feature learning submodule; S4300, learn time feature vectors, learn time feature vectors through hypergraph in the time feature learning submodule; S4400 outputs passenger flow prediction values. The output module uses three fully connected layers to map the feature vectors of passenger flow and outputs passenger flow prediction values.
[0031] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method in any of the above embodiments, the prediction model training in step S4000 adopts a 10-cycle warmup process, trains for 100 rounds, with a batch size of 64, uses the Adam optimizer during training, has an initial learning rate of 0.001, and an L2 regularization penalty of 0.0001.
[0032] Furthermore, in the urban rail transit spatiotemporal passenger flow prediction method in the above embodiments, a dropout rate of 0.3 and layer normalization are added to each temporal feature learning submodule and spatial feature learning submodule.
[0033] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method in any of the above embodiments, the training of the prediction model in step S4000 is evaluated using regression prediction indicators.
[0034] Furthermore, in the urban rail transit spatiotemporal passenger flow prediction method in the above embodiments, the regression prediction indicators include Mean Square Error (MSE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). Assuming the predicted value is... The actual value is The mathematical definitions of mean square error, root mean square error, and mean absolute percentage error are as follows: , , .
[0035] Optionally, in the urban rail transit spatiotemporal passenger flow prediction method of any of the above embodiments, step S5000 includes: S5100, Dataset Input: The passenger flow prediction system trained with the divided dataset; S5200, Feature Learning: The spatial feature learning submodule and the temporal feature learning submodule are used to obtain the spatial feature vector and temporal feature vector of passenger flow; S5300 Passenger Flow Forecast Output: The output module maps the spatial and temporal feature vectors of passenger flow into forecast values, thus obtaining the future passenger flow forecast values for each station.
[0036] This invention uses Hypergraph Convolution to dynamically obtain a hypergraph through the connection relationship of station routes and historical passenger flow data, learn the spatial feature vector of passenger flow, and combine Diffusion Convolution and Gated Linear Unit (GLU) to learn the temporal feature vector of passenger flow through residual connections, thereby improving the prediction accuracy of the passenger flow prediction model.
[0037] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the structure of an urban rail transit spatiotemporal passenger flow prediction system according to an exemplary embodiment; Figure 2 This is a flowchart illustrating a method for predicting spatiotemporal passenger flow in urban rail transit according to an exemplary embodiment. Detailed Implementation
[0039] The following description, with reference to the accompanying drawings, illustrates several preferred embodiments of the present invention to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms, and the scope of protection of the present invention is not limited to the embodiments mentioned herein.
[0040] In the accompanying drawings, components with the same structure are indicated by the same numerical designation, and components with similar structures or functions are indicated by similar numerical designations. The dimensions and thicknesses of each component shown in the drawings are arbitrary, and the present invention does not limit the dimensions and thicknesses of each component. To make the illustrations clearer, the thickness of components is schematically exaggerated in some places in the drawings.
[0041] The inventors designed a spatiotemporal passenger flow prediction system for urban rail transit, such as Figure 1 As shown, it includes: The hypermap generation module dynamically generates composite hypermaps based on station route connections and passenger flow data. These composite hypermaps have three time granularities: hourly, daily, and weekly. The methods used by the hypermap generation module to dynamically generate composite hypermaps include: S100. Generate a spatial hypergraph. Based on the connection relationships between stations and lines, when two stations are on the same line, connect them with a hyperedge to obtain the spatial hypergraph. ; S110. Calculate the characteristic vector of passenger flow. Based on the time granularity of hours, days, and weeks, obtain the passenger flow OD matrix at the corresponding time granularity, denoted as follows: Ignoring the directionality of passenger flow, the passenger flow vector matrix of the station is obtained by normalization. ,as follows: (1), (2), Normalization uses an activation function. , to give a vector The values of each Normalization to Within the range, the formula is (3) Obtain the passenger flow vector for each station; S120. Generate a time hypermap, calculate the time hypermap at the hourly, daily, and weekly time granularities, and use the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm to divide each site into different classes according to the passenger flow vector. Set the parameters in the algorithm: Control the spacing of neighborhoods between different classes; Control the minimum number of samples for each class; By controlling the feature distance metric function, inputting station passenger flow vectors at different time granularities, running the algorithm, and then connecting stations of the same type with a hyperedge, time hypergraphs at hourly, daily, and weekly time granularities can be obtained. ; S130. Calculate composite hypergraphs, including hourly, daily, and weekly time-granularity composite hypergraphs, and spatial hypergraphs. Time supermaps with hourly, daily, and weekly time granularities respectively Adding them together yields a composite hypergraph with hourly, daily, and weekly time granularities. .
[0042] The feature learning module learns the feature vectors of passenger flow through a composite hypergraph. The feature vectors include temporal feature vectors and spatial feature vectors. The feature learning module includes a temporal feature learning sub-module and a spatial feature learning sub-module, which learn the temporal feature vectors and spatial feature vectors respectively. The temporal feature learning sub-module and the spatial feature learning sub-module are connected in series. There are three feature learning modules. Each feature learning module includes N pairs of temporal feature learning sub-modules and spatial feature learning sub-modules, where N is an integer greater than or equal to 1. The spatial feature learning submodule uses the hypergraph convolution formula to learn spatial feature vectors. The hypergraph convolution formula is as follows: (4), in, Let be the degree matrix of the superpoint. Let be the degree matrix of the hyperedge. The incidence matrix of the hypergraph. Let be the parameter matrix of the hypergraph convolution. Given the input feature vector matrix, The output is the feature vector matrix; methods for learning spatial feature vectors include: S200. Calculate the feature vector of each hyperedge. Combine the feature vectors of all hyperpoints connected by each hyperedge to obtain the feature vector of each hyperedge. S210. Calculate the feature vector of each superpoint. Combine the feature vectors of all the super edges associated with each superpoint to obtain the feature vector of each superpoint.
[0043] The temporal feature learning submodule uses diffraction convolution to learn temporal feature vectors. To ensure compliance with temporal logic, future input information is padded with zeros, guaranteeing that the current output is only related to historical information. For a one-dimensional input sequence... and one-dimensional convolution kernel ,time The formula for the spread convolution operation is: (5) in It is the diffusion factor, which controls the jump distance of the diffuse convolution; The temporal feature learning submodule consists of a GLU (Gated Linear Unit), which replaces all convolutions with diffusing convolutions. The GLU formula is as follows: (6), in, All kernels are one-dimensional convolutions, performing diffuse convolution. Indicates element-wise product. for Activation function; the temporal feature learning submodule adds residual connections to help learn higher-dimensional temporal feature vectors. This adds the difference between the input features of the previous layer and the features learned in the current layer to the output features, as shown in the formula. (7) in, Given the input feature matrix, This is the output feature matrix.
[0044] The output module maps the feature vectors of passenger flow and outputs the predicted passenger flow values. The output module uses three fully connected layers for feature mapping and outputs the predicted passenger flow values. The formula is (8) in, The eigenvector matrix representing the hypergraph obtained at three different time granularities. This represents the weight matrix of the fully connected layer. It is a constant.
[0045] The three feature learning modules are connected in parallel, and N pairs of temporal feature learning sub-modules and spatial feature learning sub-modules are connected in sequence. The hypergraph generation module is connected to the three feature learning modules in communication, and the three feature learning modules are connected to the output module in communication. In this embodiment, N=3.
[0046] In response to the connection relationships of stations and routes and passenger flow data, the hypergraph generation module dynamically generates a composite hypergraph. In response to the composite hypergraph, three feature learning modules learn the feature vectors of passenger flow. Finally, the feature vectors of passenger flow are input into the output module to obtain the passenger flow prediction value.
[0047] Based on the above embodiments, the inventors provide a method for predicting the spatiotemporal passenger flow of urban rail transit, such as... Figure 2 As shown, it includes the following steps: S1000 Data Acquisition: Collects card swipe data from each station through the station's automatic fare collection (AFC) system. The card swipe data includes the swipe time, station number, passenger ID, and entry / exit status.
[0048] S2000, Data Cleaning and Labeling: Clean up invalid data, including data where the entry time is after the exit time, data where the entry / exit interval is less than the minimum entry time or greater than the maximum entry time, and data where the entry and exit times are the same. The minimum entry time is 5 minutes, and the maximum entry time is 4 hours. Generate passenger flow data for each station based on historical card swipe data; specifically including: S2100: Convert a day's operating time into minutes; S2200: Based on a 5-minute time granularity, obtain passenger flow data for each station; S2300: Obtain the OD matrix of passenger flow for each station based on the time granularity of hourly, daily, and weekly.
[0049] S3000, Define the prediction model; define the prediction model according to the task; specifically including: S3100, Define a hypergraph, define the hypergraph as follows: ,in For exceeding the limit, For superedge, The hyperedge weight matrix is given by [example matrix]. The incidence matrix of the hypergraph is given by [example matrix]. Performance of each super point and super edge The connection relationship; S3200, Define the learning function and set the hypergraph. and historical information time steps Define the learning function To predict the future The passenger flow data based on steps is represented by the following mapping. in Represented as passenger flow data, Indicated as past time Passenger flow data, Indicates future time Passenger flow data.
[0050] S4000, training the prediction model, uses the station's passenger flow data as the dataset, and divides the dataset proportionally according to time sequence into a 70% training set, a 10% validation set, and a 20% test set. The input sequence length and the prediction sequence length are set: the input sequence length is 12, and the prediction sequence length is 6, resulting in the prediction model; specifically including: S4100: Input the training set, input the data of the training set into the hypergraph generation module, and dynamically generate the hypergraph; S4200, learn spatial feature vectors, learn spatial feature vectors through hypergraph in the spatial feature learning submodule; S4300, learn time feature vectors, learn time feature vectors through hypergraph in the time feature learning submodule; S4400 outputs passenger flow prediction values. The output module uses three fully connected layers to map the feature vectors of passenger flow and outputs passenger flow prediction values.
[0051] The prediction model was trained using a 10-episode warmup process, totaling 100 training rounds with a batch size of 64. The Adam optimizer was used during training with an initial learning rate of 0.001 and an L2 regularization penalty of 0.0001. A dropout rate of 0.3 and layer normalization were applied to each temporal and spatial feature learning sub-module. Regression prediction metrics were used for evaluation, including Mean Square Error (MSE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). The predicted values were assumed to be... The actual value is The mathematical definitions of mean square error, root mean square error, and mean absolute percentage error are as follows: , , .
[0052] S5000 uses a prediction model for prediction, specifically including: S5100, Dataset Input: The passenger flow prediction system trained with the divided dataset; S5200, Feature Learning: The spatial feature learning submodule and the temporal feature learning submodule are used to obtain the spatial feature vector and temporal feature vector of passenger flow; S5300 Passenger Flow Forecast Output: The output module maps the spatial and temporal feature vectors of passenger flow into forecast values, thus obtaining the future passenger flow forecast values for each station.
[0053] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A spatiotemporal passenger flow prediction system for urban rail transit, characterized in that, include: The hypermap generation module dynamically generates composite hypermaps based on the connection relationships of stations and routes, as well as passenger flow data. The feature learning module learns the feature vectors of passenger flow through the composite hypergraph. These feature vectors include temporal and spatial feature vectors. The feature learning module includes a temporal feature learning submodule and a spatial feature learning submodule, which respectively learn the temporal and spatial feature vectors. These two submodules are connected sequentially. The spatial feature learning submodule learns the spatial feature vectors using a hypergraph convolution formula, which is as follows: (4), in, Let be the degree matrix of the superpoint. Let be the degree matrix of the hyperedge. The incidence matrix of the hypergraph. Let be the parameter matrix of the hypergraph convolution. Given the input feature vector matrix, The output feature vector matrix is W, where W is the hyperedge weight matrix; the methods for learning the spatial feature vectors include: S200. Calculate the feature vector of each hyperedge. Combine the feature vectors of all hyperpoints connected by each hyperedge to obtain the feature vector of each hyperedge. S210. Calculate the feature vector of each super point, and combine the feature vectors of all the super edges associated with each super point to obtain the feature vector of each super point. The temporal feature learning submodule uses diffraction convolution to learn the temporal feature vector. To ensure compliance with temporal logic, future input information is padded with 0, ensuring that the current output is only related to historical information. For a one-dimensional input sequence... and one-dimensional convolution kernel ,time The formula for the spread convolution operation is: (5), in It is the diffusion factor, which controls the jump distance of the diffuse convolution; The feature learning module has three components, and each feature learning module includes N pairs of temporal feature learning sub-modules and spatial feature learning sub-modules, where N is an integer greater than or equal to 1. The output module maps the feature vectors and outputs the passenger flow prediction value; The three feature learning modules are connected in parallel, and N pairs of the temporal feature learning sub-modules and the spatial feature learning sub-modules are connected in sequence. The hypergraph generation module is communicatively connected to the three feature learning modules respectively, and the three feature learning modules are communicatively connected to the output module.
2. The urban rail transit spatiotemporal passenger flow prediction system as described in claim 1, characterized in that, The method by which the hypergraph generation module dynamically generates the composite hypergraph includes: S100. Generate a spatial hypergraph. Based on the connection relationships between stations and lines, when two stations are on the same line, connect them with a hyperedge to obtain the spatial hypergraph. ; S110. Calculate the characteristic vector of passenger flow. Based on the time granularity of hours, days, and weeks, obtain the passenger flow OD matrix at the corresponding time granularity, denoted as follows: Ignoring the directionality of passenger flow, the passenger flow vector matrix of the station is obtained by normalization. ; S120. Generate a time hypermap, calculate the time hypermap at the hourly, daily, and weekly time granularities, use the DBSCAN clustering algorithm to divide each station into different classes according to the passenger flow vector, and set the parameters in the algorithm: Control the spacing of neighborhoods between different classes; Control the minimum number of samples for each class; By controlling the feature distance metric function, inputting station passenger flow vectors at different time granularities, running the algorithm, and then connecting stations of the same type with a hyperedge, time hypergraphs at hourly, daily, and weekly time granularities can be obtained. ; S130. Calculate composite hypergraphs, including hourly, daily, and weekly time-granularity composite hypergraphs, and spatial hypergraphs. Time supermaps with hourly, daily, and weekly time granularities respectively Adding them together yields a composite hypergraph with hourly, daily, and weekly time granularities. .
3. The urban rail transit spatiotemporal passenger flow prediction system as described in claim 1, characterized in that, The output module uses three fully connected layers for feature mapping and outputs passenger flow prediction values. The formula is (8), in, The eigenvector matrix representing the hypergraph obtained at three different time granularities. This represents the weight matrix of the fully connected layer. It is a constant.
4. A method for predicting spatiotemporal passenger flow in urban rail transit, using the urban rail transit spatiotemporal passenger flow prediction system as described in any one of claims 1-3, characterized in that, Includes the following steps: S1000, data collection, collects card swipe data from each station through the station's automatic ticket checking system; S2000, data cleaning and labeling, cleans up invalid data, and generates passenger flow data for each station based on historical card swipe data; S3000, Define the prediction model; Define the prediction model according to the task. S4000, Train the prediction model by taking the passenger flow data of the station as a dataset, dividing the dataset into a training set, a validation set, and a test set according to the time sequence and proportion, setting the input sequence length and the prediction sequence length, and obtaining the prediction model. S5000 uses a prediction model for prediction, and uses a trained prediction model for passenger flow prediction.
5. The urban rail transit spatiotemporal passenger flow prediction method as described in claim 4, characterized in that, Step S2000 includes: S2100: Convert a day's operating time into minutes; S2200: Based on a 5-minute time granularity, obtain passenger flow data for each station; S2300: Obtain the OD matrix of passenger flow for each station based on the time granularity of hourly, daily, and weekly.
6. The urban rail transit spatiotemporal passenger flow prediction method as described in claim 4 or 5, characterized in that, Step S3000 includes: S3100, Define a hypergraph, define the hypergraph as follows: ,in For exceeding the limit, Let W be the hyperedge, W be the hyperedge weight matrix, and the incidence matrix of the hypergraph be... , Performance of each super point and super edge The connection relationship; S3200, Define the learning function and set the hypergraph. and historical information time steps Define the learning function To predict the future The passenger flow data based on steps is represented by the following mapping. , in Represented as passenger flow data, Indicated as past time Passenger flow data, Indicates future time Passenger flow data.
7. The urban rail transit spatiotemporal passenger flow prediction method as described in claim 6, characterized in that, Step S4000 includes: S4100. Input the training set, input the data of the training set into the hypergraph generation module, and dynamically generate the hypergraph; S4200, Learning spatial feature vectors: The spatial feature learning submodule learns the spatial feature vectors through the hypergraph; S4300, Learning the time feature vector: The time feature learning submodule learns the time feature vector through the hypergraph; S4400: Output passenger flow prediction value. The output module uses three fully connected layers to perform feature vector mapping of passenger flow and output passenger flow prediction value.