A rail transit passenger flow prediction method based on multi-task cascade deep learning
Through the multi-task cascading deep learning method, combining long-term topology and geographical adjacency maps, the high-temporal interaction relationship in the rail transit network is captured, and the shortcomings in the passenger flow prediction model in the existing technology are solved in the understanding of interaction relationships and fine-grained sizes, and the implementation of the implementation of the implementation of high-temporal interaction relationships and high-quality interaction relationships in the existing technology are solved. More accurate and adaptive passenger flow forecasts.
Patent Information
- Application Number
- CN202410434364.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-04-11
AI Technical Summary
The existing rail transit passenger flow prediction method is difficult to utilize the interaction between inbound, outbound and OD passenger flow, lacks a fine-grained understanding of proximity effects, and deep learning models have limitations in adapting to different new line features and urban spatial patterns. , limits the scalability and transfer learning ability of the model.
Using multi-task cascading deep learning method, we build inbound passenger flow predictors, outbound passenger flow predictors and adaptive supply and demand sharing embedded networks, and capture the high-temporal interaction between sites through long-term topology and geographic adjacency graphs, and use multi-headed self-direction Attention network captures higher-order interactions between different features and forms a more accurate passenger flow prediction model.
It realizes end-to-end passenger flow prediction with more accurate and generalized capabilities, adapts to different land use models and operating conditions, improves the accuracy and adaptability of predictions, and makes up for the shortcomings of existing methods in terms of interactive relationships and fine-grained understanding. .
Smart Images

Figure CN118536640B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rail transit passenger flow prediction, and in particular to a rail transit passenger flow prediction method based on multi-task cascade deep learning. Background Art
[0002] With the acceleration of urbanization and people's pursuit of travel efficiency, the scientific and rational planning and operation management of urban rail transit systems, as an important part of urban public transportation, are becoming increasingly important. Passenger flow forecasting is a key link in the planning, design, operation and management of urban rail transit, and its accuracy is directly related to the operating efficiency of the urban rail transit system and the travel experience of passengers. Urban rail transit passenger flow forecasting involves multiple fields such as big data analysis, artificial intelligence, traffic engineering and operations research. In the context of the information and intelligent era, passenger flow forecasting no longer relies solely on traditional survey and statistical methods, but more on advanced data mining technology, machine learning algorithms and other means to achieve the processing and analysis of massive data, so as to more accurately predict the changing trend of passenger flow.
[0003] Passenger flow measurement in and out of the station:
[0004] Passenger flow forecasting for inbound and outbound stations is an important part of urban rail transit passenger flow forecasting. By collecting multi-dimensional information such as passenger flow data at station entrances and exits, time series data, weather data, and holiday data, and using forecasting models such as time series analysis, regression analysis, and neural networks, the passenger flow for inbound and outbound stations in the future is forecasted. This helps station operators to reasonably arrange personnel, materials, and equipment to ensure smooth and safe station operation.
[0005] At present, the existing technology for predicting inbound and outbound passenger flow mainly relies on traditional statistical methods, such as time series analysis (such as moving average method, exponential smoothing method) and regression analysis models (such as linear regression, logistic regression). These methods are usually based on historical passenger flow data and use mathematical models to predict future passenger flow. This method is simple and easy to use, but when dealing with large-scale data and complex situations, its prediction accuracy and efficiency are often unsatisfactory.
[0006] With the rapid development of big data technology, the prediction of inbound and outbound passenger flow has begun to introduce big data technology. By collecting multi-dimensional information such as passenger flow data at the entrance and exit of the station, time series data, weather data, holiday data, etc., and using data mining and machine learning algorithms, a more accurate prediction of inbound and outbound passenger flow can be achieved. The technological changes at this stage have greatly improved the accuracy and efficiency of the prediction.
[0007] In recent years, with the rapid development of artificial intelligence and deep learning technologies, big data technology has also been introduced into the prediction of inbound and outbound passenger flow. By building deep learning models, such as neural networks (RNN) and convolutional neural networks (CNN), automatic feature extraction and prediction of data can be achieved. These models can automatically learn the inherent laws and patterns of data, so as to more accurately predict the changing trends of inbound and outbound passenger flow. At the same time, by combining with other technologies, such as time series analysis and geographic information systems, the accuracy and efficiency of prediction are further improved.
[0008] OD (Origin to Destination) passenger flow prediction:
[0009] OD ridership forecasting is an important aspect of transportation planning, which requires consideration of factors such as population distribution, land use patterns, economic activities, and travel behavior. Over the years, researchers have adopted various methods to improve the accuracy and efficiency of OD ridership forecasting. The traditional four-step forecasting method is rooted in traditional transportation planning models and has long been used to estimate travel demand. However, the practical application of this model poses several challenges. These factors include sequentiality, demanding data requirements, limited spatiotemporal resolution, and high associated costs. Subsequently, direct demand models emerged as an alternative approach, which integrates trip generation, trip distribution, and mode partitioning in the four-step model into a unified formula and enriches multiple explanatory variables. These models emphasize the influence of factors such as the distance and attractiveness between the origin and destination. The determinants of bus ridership have been explored through various traditional regression models, including regression analysis, radial models, gravity models, and multiple (or hierarchical) regression models that combine the above methods. Although these models provide an intuitive understanding of transit ridership, they encounter challenges such as multicollinearity and difficulty in capturing nonlinear relationships and temporal dynamics.
[0010] With the enhanced ability to capture nonlinear relationships and identify complex patterns from large datasets, machine learning models have become a tool for solving OD passenger flow prediction problems. Commonly used prediction models include random forests (RF), gradient boosting decision trees (GBDT), and artificial neural networks (ANN). Some schemes improve the gravity model by introducing artificial neural network units, enhancing the complex modeling capabilities of traditional methods. Despite the encouraging results, these models have inherent constraints in capturing spatial dependencies and often ignore the important considerations of network topology properties and complex spatial proximity dependencies.
[0011] In recent years, the rapid development of deep learning models has shown promising results in capturing complex spatiotemporal dependencies in transportation systems. Graph Neural Networks (GNNs) have been shown to be advantageous in handling non-Euclidean relationships, making them well suited for the abstraction and modeling of transportation networks. The introduction of a self-attention mechanism for embedding neighborhood features of transportation networks enhances the ability to adaptively capture adjacency and achieves excellent results in transportation OD demand forecasting. Liu proposed a multi-task deep learning framework that combines machine learning methods with a two-stage model to significantly improve the accuracy of OD passenger flow forecasting. In addition, methods such as generative adversarial networks (GANs), diffusion models, and causal learning have been used for new city OD passenger flow forecasting.
[0012] The shortcomings of the rail transit passenger flow prediction methods in the above-mentioned prior art include: the existing methods mainly focus on separately predicting inbound, outbound and OD passenger flows, but there is a natural interaction between the three, and the existing methods are difficult to utilize these interactions, which affects the accuracy of the prediction. Secondly, the existing methods lack an understanding of more fine-grained proximity effects, resulting in insufficient performance in considering long-term temporal and high-order spatial interactions of rail transit networks. Finally, many existing technologies only use deep learning models for embedded learning and do not achieve end-to-end prediction, resulting in limitations in adapting to the characteristics of different newly opened lines, different urban spatial patterns, etc., making transfer learning and generalization difficult, and inherently limiting the scalability of the model. Summary of the invention
[0013] An embodiment of the present invention provides a rail transit passenger flow prediction method based on multi-task cascade deep learning to achieve effective rail transit passenger flow prediction.
[0014] In order to achieve the above object, the present invention adopts the following technical scheme.
[0015] A rail transit passenger flow prediction method based on multi-task cascade deep learning, comprising:
[0016] Constructing an inbound passenger flow predictor, an outbound passenger flow predictor and an adaptive supply-demand sharing embedding network, establishing a long-term topological adjacency graph and a long-term geographic adjacency graph of the rail transit network, inputting the long-term topological adjacency graph and the long-term geographic adjacency graph into the adaptive supply-demand sharing embedding network, and the adaptive supply-demand sharing embedding network outputs the supply characteristics of the starting station and the demand characteristics of the terminal station;
[0017] The supply characteristics of the starting station are input into the inbound passenger flow predictor to obtain the predicted inbound passenger flow; the demand characteristics of the terminal station are input into the outbound passenger flow predictor to obtain the predicted outbound passenger flow;
[0018] The inbound passenger flow, outbound passenger flow, and line-level indicators between OD pairs are densely embedded according to the dimensions of the supply and demand characteristics of the starting and ending points, and the starting and ending points are connected according to the OD pairs to obtain the attribute characteristics of the OD pairs. According to the attribute characteristics of the OD pairs, the high-order interaction relationship between different features is captured through a multi-head self-attention network to obtain the predicted OD passenger flow.
[0019] Preferably, the construction of the adaptive supply and demand sharing embedded network includes:
[0020] The adaptive supply-demand sharing embedding network is composed of multiple GAT modules and gating mechanisms of different fusion layers. Each fusion layer contains three learning units: supply attribute learning unit, demand attribute learning unit and sharing learning unit. The task of each unit is to acquire specific knowledge. For each learning unit, the GAT submodule is built on the topological map and the geographical map respectively to capture the heterogeneous spatial dependencies between sites.
[0021] Preferably, the long-term topological adjacency graph and the long-term geographical adjacency graph of the rail transit station are obtained, and the long-term topological adjacency graph and the long-term geographical adjacency graph are input into the adaptive supply and demand sharing embedding network, and the adaptive supply and demand sharing embedding network outputs the supply characteristics of the starting station and the demand characteristics of the terminal station, including:
[0022] Construct a long-term topological adjacency graph and a long-term geographic adjacency graph of rail transit stations. The nodes in the long-term topological adjacency graph represent rail transit stations, the edges represent the lines between stations, and the edge weights represent the lengths of the edge lines. The nodes in the long-term geographic graph represent rail transit stations. Stations within a set distance are spatially adjacent. The attribute information of the set nodes includes the node attributes of the nodes in the network and the location attributes of the nodes.
[0023] The long-term topological adjacency graph and the long-term geographic adjacency graph are input into the adaptive supply-demand shared embedding network. The adaptive supply-demand shared embedding network integrates the graph attention network and the gating mechanism to capture the long-term spatiotemporal proximity effect. The supply and demand characteristics of the site are embedded. The adaptive supply-demand shared embedding network outputs two long-term graph networks. The node attributes of one long-term graph network represent the supply characteristics of the point as the starting point site, and the node attributes of the other long-term graph network represent the demand characteristics of the point as the terminal site.
[0024] Use A t ′ and A g ′ respectively represent the long-term topological adjacency matrix and long-term geographical adjacency matrix of rail transit stations:
[0025]
[0026]
[0027] Where dist(·) represents the distance between adjacent sites, SD is the standard deviation of the corresponding distance, and the function geo(v i ,v j ) indicates site v i to v j The physical geographical distance, η represents the distance threshold;
[0028] Two long-term graph topological adjacency and geographic adjacency matrices A for adaptive supply-demand sharing embedding networks on continuous spatial graphs t and A g Expressed as:
[0029]
[0030]
[0031] In the formula, A t ' (γ) and A g ' (γ) denote the long-term topological adjacency matrix and long-term geographic adjacency matrix in the γth year respectively. Let the GAT level l site v i The status is Connect i The distance characteristic of the line is ε ij .
[0032] Combined with the long-term topological adjacency matrix A t , long-term geographic adjacency matrix A gand site-level attribute features, and automatically constructs the long-term topological adjacency graph and long-term geographic adjacency graph of the rail transit network based on the DGL deep graph library. Preferably, the line-level indicators of the incoming passenger flow, outgoing passenger flow, and OD pairs are densely embedded according to the dimension of the start-end supply and demand characteristics, and the start-end OD pairs are connected according to the start-end OD pair to obtain the attribute features of the OD pair, and the high-order interaction relationship between different features is captured through the multi-head self-attention network according to the attribute features of the OD pair to obtain the predicted OD passenger flow, including:
[0033] The inbound passenger flow passes through a dense embedding layer to obtain a dense embedding feature, the outbound passenger flow passes through a dense embedding layer as the second dense embedding feature, the OD pair attribute features pass through a dense embedding layer as the third dense embedding feature, the supply features of the starting station are extracted from the long-term graph representing the supply features of the starting point as the fourth feature, and the supply features of the terminal station are extracted from the long-term graph representing the supply features of the terminal as the fifth feature. The five features are spliced in the order of the starting and ending points of the OD pairs to form the attribute features of the OD pairs; according to the attribute features of the OD pairs, the high-order interaction relationship between different features is captured through a multi-head self-attention network to obtain the predicted OD passenger flow value.
[0034] Preferably, the method further comprises:
[0035] Calculate the multi-task loss function value according to the predicted inbound passenger flow, outbound passenger flow and OD passenger flow, perform back propagation according to the multi-task loss function value, update the parameters of the multi-task cascade deep learning passenger flow prediction model, and repeat the above process until the iteration termination condition is reached, thereby obtaining the trained inbound passenger flow predictor, outbound passenger flow predictor and adaptive supply and demand sharing embedding network, wherein the trained inbound passenger flow predictor, outbound passenger flow predictor and adaptive supply and demand sharing embedding network constitute the multi-task cascade deep learning passenger flow prediction model;
[0036] The long-term topological adjacency graph and long-term geographical adjacency graph of the rail transit station to be predicted are obtained and input into the multi-task cascade deep learning passenger flow prediction model. The multi-task cascade deep learning passenger flow prediction model outputs the prediction results of inbound passenger flow, outbound passenger flow and OD passenger flow.
[0037] It can be seen from the technical solutions provided by the above-mentioned embodiments of the present invention that the method of the present invention takes into account the natural correlation between the three passenger flows, while considering the high-order spatiotemporal interactions of network topology and geographical proximity, and can adapt to different operating conditions such as land use patterns to provide more accurate and more generalized end-to-end passenger flow predictions.
[0038] Additional aspects and advantages of the present invention will be given in part in the following description, which will become obvious from the following description, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0040] Figure 1 A schematic diagram of a long-term graph structure provided by an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of a rail transit passenger flow prediction method based on multi-task cascade deep learning provided by an embodiment of the present invention;
[0042] Figure 3 A specific processing flow chart of a rail transit passenger flow prediction method based on multi-task cascade deep learning provided by an embodiment of the present invention;
[0043] Figure 4 A structural diagram of an adaptive supply-demand sharing embedded network provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0045] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or coupling. The term "and / or" used herein includes any unit and all combinations of one or more associated listed items.
[0046] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.
[0047] To facilitate understanding of the embodiments of the present invention, several specific embodiments will be further explained below with reference to the accompanying drawings, and each embodiment does not constitute a limitation on the embodiments of the present invention.
[0048] Developing a new method that can accurately and simultaneously predict the inbound, outbound and OD passenger flows after the opening of a new line is of great significance for improving the efficiency and quality of urban rail transit passenger organization. An embodiment of the present invention provides a rail transit passenger flow prediction method based on multi-task cascade deep learning. The method integrates the graph attention network and the gating mechanism to construct an adaptive supply and demand sharing embedding learning network to characterize the intrinsic supply and demand relationship expression characteristics of the station; then, an improved multi-head self-attention feature interaction network is introduced to measure the high-order interactions between the supply and demand characteristics of the station and the edge commuting attributes; and a multi-task cascade prediction framework is built to fully consider the natural correlation between the three passenger flows. Finally, a modular and adaptable framework is provided to keep pace with the latest developments in the field of long-term passenger flow prediction and address the limitations of existing methods.
[0049] The present invention sets the definition and problems of multi-task urban rail transit passenger flow prediction as follows:
[0050] Definition 1: Station-level indicators: There are N stations v1, v2, …v in the urban rail transit network. N . Site-level metrics Indicates station v i A vector of attributes. It contains information about the station's land use, infrastructure, accessibility, and demographic details.
[0051] Definition 2 Line-level indicators: When a i To site v j Certain travel patterns are often observed when a person travels on a route, including factors such as trip distance, number of transfers, and detour index. is a vector containing the attributes associated with these travel modes.
[0052] Definition 3 passenger flow: OD passenger flow T ij Indicates that from site v i To site v j The number of passengers. It is worth noting that Tij It can be regarded as a line-level passenger flow. In addition, the present invention introduces two types of station-level flows: inbound passenger flow T i: Representative station v i Total inbound passengers and outbound passenger flow T :j Representative station v j of total outbound passengers.
[0053] Definition 4 Long-term graph: Figure 1 A schematic diagram of a long-term graph structure (γ≥2) provided by an embodiment of the present invention. In which, (a) an adjacency matrix network that changes over time. (b) a long-term adjacency matrix. The original graph is defined as G(V,E,A), where V = {v1,v2,…v N} is a set of sites, E is a set of edges that describe the strength of correlation, A∈R N×N is the adjacency matrix, where a ij ∈A means from site v i to v j There is a strong connection (0 or 1) between them. It is worth noting that the structure of the railway network has evolved over time, introducing Figure 1 The “Long Term Chart” shown. Figure 1 It records the network connections over a period of time. In addition, two types of graphs are introduced: topological network G t (V,E t ,A t ), a spatial graph commonly used in transportation studies that shows subway line connections; and the geographic network G g (V,E g ,A g ), indicating the physical distance between stations.
[0054] A processing flow chart of a rail transit passenger flow prediction method based on multi-task cascade deep learning provided by an embodiment of the present invention is as follows: Figure 2 As shown, the process includes the following steps:
[0055] Step S10: constructing an inbound passenger flow predictor, an outbound passenger flow predictor and an adaptive supply-demand sharing embedding network, establishing a long-term topological adjacency graph and a long-term geographic adjacency graph of rail transit stations, and inputting the long-term topological adjacency graph and the long-term geographic adjacency graph into the adaptive supply-demand sharing embedding network;
[0056] Step S20: the above-mentioned adaptive supply-demand sharing embedding network captures the long-term spatiotemporal proximity effect and outputs the supply characteristics of the starting station and the demand characteristics of the terminal station;
[0057] Step S30: inputting the supply characteristics of the starting station into the inbound passenger flow predictor to obtain the predicted inbound passenger flow; inputting the demand characteristics of the terminal station into the outbound passenger flow predictor to obtain the predicted outbound passenger flow;
[0058] Step S40: densely embedding the predicted inbound passenger flow, predicted outbound passenger flow, and line-level indicators between OD pairs according to the dimension of the start-end point supply and demand characteristics, and splicing the start-end points according to the OD pairs to obtain the attribute features of the OD pairs, and capturing the high-order interaction relationship between different features through the multi-head self-attention network to obtain the predicted OD passenger flow;
[0059] Step S50: Combine the predicted inbound passenger flow, outbound passenger flow and OD passenger flow, calculate the multi-task loss function, perform back propagation, and update the parameters of the multi-task cascade deep learning passenger flow prediction model. S20-S50 are repeated until the iteration termination condition is reached, and the trained inbound passenger flow predictor, outbound passenger flow predictor and adaptive supply and demand sharing embedding network are obtained, and the trained inbound passenger flow predictor, outbound passenger flow predictor and adaptive supply and demand sharing embedding network constitute the multi-task cascade deep learning passenger flow prediction model.
[0060] The long-term topological adjacency graph and the long-term geographic adjacency graph of the rail transit station to be predicted are obtained and input into the multi-task cascade deep learning passenger flow prediction model. The multi-task cascade deep learning passenger flow prediction model outputs the prediction results of the inbound passenger flow, the outbound passenger flow and the OD passenger flow according to the processing process of the above steps S10 to S50.
[0061] Specifically, the above steps S10 and S20 include: constructing a multi-task cascade deep learning passenger flow prediction model. The model structure of a multi-task cascade deep learning passenger flow prediction model provided by an embodiment of the present invention is as follows: Figure 3 shown. Figure 3 (a) is the basic model. Figure 3 (b) is the model structure. First, we build a simple basic model that embodies the core concepts of the framework, such as Figure 3 (a). The model trains a weak learner for inbound and outbound passenger flow prediction based on station-level indicators. Subsequently, the trained weak learner is used to predict inbound and outbound passenger flow as the basis for the next-level predictor. The second-level learner combines the original station-level indicators and line-level indicators of the OD point to predict the OD passenger flow. This two-level learning approach enhances our understanding of the potential factors affecting passenger flow, improves the model's ability to capture nonlinear relationships, and improves prediction accuracy.
[0062] The basic model lacks the ability to integrate the adjacent information of stations in the railway network, and does not consider the deep interactive learning of features. In fact, both the topological and geographical proximity of stations have the potential to attract passenger flow. In order to enhance the model's ability in long-term spatial modeling of station proximity and high-order interactive learning of feature attributes, this paper introduces the following Figure 3 (b) The cascade predictor shown.
[0063] The above multi-task cascade deep learning passenger flow prediction model includes an inbound passenger flow predictor, an outbound passenger flow predictor and an ASDSEN (Adaptive Supply and Demand Sharing Embedding Network). The structure of the adaptive supply and demand sharing embedding network is as follows: Figure 4 As shown in the figure, it consists of multiple GAT modules and gating mechanisms at different fusion layers. Through knowledge sharing and fusion, the topological and geographical contextual information is encoded into two different embedding spaces to represent the supply and demand attributes respectively. Each fusion layer contains three learning units: supply attribute learning unit, demand attribute learning unit and sharing learning unit. The task of each unit is to acquire specific knowledge. For each learning unit, the GAT submodule is built on the topological map and the geographical map respectively, which can capture the heterogeneous spatial dependencies between sites.
[0064] Obtain the long-term topological adjacency graph and long-term geographic adjacency graph of rail transit stations. The nodes in the long-term topological adjacency graph represent rail transit stations, the edges represent the lines between stations, and the edge weight represents the length of the edge line. The nodes in the long-term geographic graph represent rail transit stations. We believe that stations within a spatial distance of 2000 meters are spatially adjacent. If the distance between stations is less than 2000 meters, there is an edge, and the edge weight is 1. There is some attribute information on the node, that is, the station-level indicator in the problem definition.
[0065] The long-term topological adjacency graph and the long-term geographic adjacency graph are input into the adaptive supply and demand shared embedding network. The adaptive supply and demand shared embedding network integrates the graph attention network and the gating mechanism to capture the long-term spatiotemporal proximity effect and embed the supply and demand characteristics of the site. The adaptive supply and demand shared embedding network outputs two long-term graph networks. The node attribute information in the long-term graph network is the attribute information learned by the adaptive supply and demand shared embedding network. The node attributes of one long-term graph network represent the supply characteristics of the point as the starting point (entry), and the node attributes of the other long-term graph network represent the demand characteristics of the point as the end point (exit).
[0066] The GAT module iteratively aggregates information from the node neighborhood and nonlinearly updates the node state through a self-attention mechanism. The attention weights, which are crucial for aggregating neighborhood information, are determined by the features of the connected nodes and the edge features. t ′ and A g′ respectively represent the long-term topological adjacency matrix and long-term geographic adjacency matrix of rail transit stations. The definitions of these two types of adjacency matrices are as follows:
[0067]
[0068]
[0069] Where dist(·) represents the distance between adjacent sites, and SD is the standard deviation of the corresponding distance. i ,v j ) indicates site v i to v j The physical geographical distance, η represents the distance threshold. Figure 1 (b) The long-term graph A constructed on the continuous space graph shown in t and A g It can be expressed as:
[0070]
[0071]
[0072] In the formula, A t ' (γ) and A g ' (γ) denote the topological adjacency matrix and geographic adjacency matrix of the γth year respectively. Let the GAT level l site v i The status is Connect i The distance characteristic of the line is ε ij The GAT starts the process by applying a linear transformation to the input vector.
[0073]
[0074] In the formula, and V (l) ∈R τ×1 represents the trainable parameter matrix, k is the embedding dimension of the site-level indicator, and τ is the hidden layer dimension. is the information vector passed to the neighboring sites. Before aggregating these information vectors, the attention score of each edge is calculated. This score indicates the attention score of site v. j The characteristics of site v i The importance of.
[0075]
[0076] Among them, || represents the connection operation, a (l) ∈R (2k+τ)×1is a trainable parameter vector that maps the connection of information to a scalar value, and σ(·) is an activation function (e.g. ReLU, Sigmoid). Then, the attention scores are normalized by the softmax function.
[0077]
[0078] Where Φ(i) represents the station v i The graph neighborhood of . is the trainable parameter matrix, and the final output Summarized by neighborhood influence and self-influence.
[0079]
[0080] exist Figure 2 In , each unit is fused with other units through a dedicated gating unit, which is conditioned on the input of this fusion layer. The fusion between pairs of task-specific units simulates interactive sharing, while the fusion of task-specific units and shared units transfers broad knowledge applicable to all tasks. This leads to efficient and flexible supply-demand knowledge sharing. For a learning unit t, after receiving all the outputs h of the p-1th fusion layer, t p-1 After that, we construct GATs for this unit in the pth layer, and its output is represented as:
[0081]
[0082] In the formula, u=1,2 is the index of GATs. For simpler representation, at layer p, we use and They represent the connection of the GATs output belonging to task t and all GATs cross-task outputs respectively. Then the learning embedding of the p-th layer learning unit t is expressed as:
[0083]
[0084] in, is the crossover score of all GATs, is the crossover score between GATs.
[0085] The adjacency matrix A of the long-term graph t and A g The row numbers in represent the nodes of the long-term graph, and the adjacency matrix A t and A g The value represents the edge weight of the long-term graph. With the adjacency matrix A t and A gWith the node attribute features, the long-term topological adjacency graph and the long-term geographic adjacency graph can be automatically constructed based on the DGL (DeepGraph Library) deep graph library.
[0086] DGL is a deep learning library for processing graph-structured data. It provides flexible and efficient tools for building, analyzing, and operating graph neural networks.
[0087] like Figure 4 As shown in Figure 2, after the P-layer fusion layer, two outputs (indicated by the arrows outside the dotted line) will be obtained, namely and Embedding Matrix and They respectively represent the supply characteristics as the starting point and the demand characteristics as the end point of each node after learning.
[0088] Specifically, the above step S30 includes:
[0089] After completing the above process, two trained embedding matrices are obtained and They capture the inherent properties of the stations. These matrices are then fed into different linear predictors: one for predicting incoming passenger flow and one for predicting outgoing passenger flow. This approach allows us to predict the number of passengers entering and leaving each station.
[0090] The supply characteristics of the starting point (entry point) Input to the inbound passenger flow predictor, which outputs the predicted inbound passenger flow. The input is to the outbound passenger flow predictor, which outputs the predicted outbound passenger flow.
[0091] The inbound predictor and the outbound predictor are simple linear connection layers, as shown in Formula 11, w O , w D , b O , b D is the trainable parameter matrix.
[0092]
[0093] Specifically, the above step S40 includes:
[0094] The inbound passenger flow, outbound passenger flow and OD pair attribute features are respectively passed through the dense embedding layer to obtain three continuous dense embedding feature vectors.
[0095] The dense embedding layer is a linear connection layer. The specific dense embedding process is to transform the predicted inbound and outbound passenger flow and edge factors through the dense embedding layer into the learned embedding and The same dimensions result in three additional continuous dense embedding feature vectors.
[0096]
[0097] Among them, V, U and W are embedding vectors, and vector C = {c 11 ,c 12 ,…c NN} is a set of edge-level indicators.
[0098] The dense embedding feature of incoming passenger flow is used as the first feature, the dense embedding feature of outgoing passenger flow is used as the second feature, the dense embedding feature of OD pair attributes is used as the third feature, the supply feature of the starting station is extracted from the long-term graph representing the supply feature of the starting point as the fourth feature, and the supply feature of the terminal station is extracted from the long-term graph representing the supply feature of the terminal as the fifth feature. The above five features are spliced in the order of the OD pair starting and ending points to form the attribute features of the OD pair. Serves as input data for the automatic feature interaction layer.
[0099] Take the OD pair attribute features as an example: for example, the OD pair from Xizhimen to Dongzhimen has the following features: the dense embedded feature of incoming passenger flow at the starting station Xizhimen, the dense embedded feature of outgoing passenger flow at the terminal station Dongzhimen, the supply feature of Xizhimen extracted from the long-term graph representing the supply feature of the starting station, the demand feature of Dongzhimen extracted from the long-term graph representing the demand feature of the terminal, and the edge attribute features between Xizhimen and Dongzhimen (edge-level features defined above: such as the shortest distance between stations, number of transfers, etc.).
[0100] The attribute features of the OD pair are captured through a multi-head self-attention network to capture the high-order interaction between different features and obtain the predicted OD passenger flow value. This allows different combinations to be evaluated by mapping the features to different subspaces.
[0101] With M being the total number of feature fields, we can update the representation of feature m in a specific attention head s by combining all relevant features.
[0102]
[0103] In the formula, e m ,e f ∈Λ denotes the dense embedding of feature domain m and feature domain f respectively. Represents the correlation between feature m and feature f under a specific attention head s. Attention function Ψ (s) (·,·) defines the similarity between two feature domains, expressed as the inner product <·,·>. The transformation matrix and is responsible for mapping these vectors to a new vector space. In order to preserve the previously learned combined features before interaction, the final aggregation process consists of two parts, representing neighborhood influence and self-influence respectively. The output embedding can be expressed as:
[0104]
[0105] In the formula, is the projection matrix when the dimensions do not match, and S is the total number of attention heads.
[0106] Generate a set of feature vectors by stacking multiple layers of interaction It is possible to model the combined features of different orders. The final OD passenger flow is predicted by the FC (Full Connection) layer.
[0107]
[0108] Specifically, the above step S50 includes:
[0109] According to Formula 1, the RMSE (Root Mean Square Error) of the OD passenger flow of the entire network and the RMSE of the inbound and outbound passenger flow of the entire website are calculated. Then, the loss function is calculated according to Formula 2, and back propagation is performed to update the parameters of the entire multi-task cascade deep learning passenger flow prediction model.
[0110]
[0111] Finally, the overall loss function is expressed as the weighted sum of all three tasks.
[0112] Loss = λ od L od +λ o L o +λ d L d (17)
[0113] Among them, λ od ,λ o ,λ d are the hyperparameters of the three tasks, representing the weights of the three tasks respectively.
[0114] It should be noted that during model training, data from 2012 to 2019 will be input, but data from 2012 to 2018 are continuously trained, and data from 2019 is not involved in the calculation of loss functions, etc. After the multi-task cascade deep learning passenger flow prediction model is trained, the 2019 data is input to obtain the predicted OD passenger flow, inbound passenger flow and outbound passenger flow. At the same time, the RMSE (Root Mean Square Error) for the entire network passenger flow and CPC (Common Part of Commuters) are calculated as indicators for evaluating the quality of the multi-task cascade deep learning passenger flow prediction model.
[0115] In summary, the embodiment of the present invention combines the graph attention network with the gating unit to provide a new method for adaptively learning the long-term spatiotemporal correlation information between station supply and demand. This advanced fusion allows for more accurate and comprehensive modeling of topological and geographical proximity effects and temporal before and after correlation effects in urban rail transit networks. At the same time, the densely embedded node supply and demand characteristics, edge attribute characteristics and predicted inbound and outbound passenger flow characteristics are passed through a multi-head self-attention network to achieve high-order adaptive interaction, making it possible to capture important feature interaction patterns. In addition, the multi-task cascade framework design fully considers the natural correlation between the three passenger flows, making up for the limitations of independent predictions of existing methods. Finally, the design of the framework is highly modular and adaptable, ensuring that it keeps pace with the latest developments in the field of long-term traffic forecasting and provides a more flexible and scalable solution than existing technologies.
[0116] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0117] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0118] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0119] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A rail transit passenger flow prediction method based on multi-task cascade deep learning, characterized in that: include: Constructing an inbound passenger flow predictor, an outbound passenger flow predictor and an adaptive supply-demand sharing embedding network, establishing a long-term topological adjacency graph and a long-term geographic adjacency graph of the rail transit network, inputting the long-term topological adjacency graph and the long-term geographic adjacency graph into the adaptive supply-demand sharing embedding network, and the adaptive supply-demand sharing embedding network outputs the supply characteristics of the starting station and the demand characteristics of the terminal station; The supply characteristics of the starting station are input into the inbound passenger flow predictor to obtain the predicted inbound passenger flow; the demand characteristics of the terminal station are input into the outbound passenger flow predictor to obtain the predicted outbound passenger flow; The inbound passenger flow, outbound passenger flow, and line-level indicators between OD pairs are densely embedded according to the dimension of the start-end supply and demand characteristics, and the start-end points are connected according to the OD pairs to obtain the attribute characteristics of the OD pairs. According to the attribute characteristics of the OD pairs, the high-order interaction relationship between different features is captured through a multi-head self-attention network to obtain the predicted OD passenger flow; The construction of the adaptive supply and demand sharing embedded network includes: The adaptive supply-demand sharing embedding network is composed of multiple GAT modules and gating mechanisms of different fusion layers. Each fusion layer contains three learning units: supply attribute learning unit, demand attribute learning unit and sharing learning unit. The task of each unit is to acquire specific knowledge. For each learning unit, the GAT submodule is built on the topological map and the geographical map respectively to capture the heterogeneous spatial dependencies between sites. The long-term topological adjacency graph and the long-term geographical adjacency graph of the rail transit network are established, and the long-term topological adjacency graph and the long-term geographical adjacency graph are input into the adaptive supply and demand sharing embedding network, and the adaptive supply and demand sharing embedding network outputs the supply characteristics of the starting station and the demand characteristics of the terminal station, including: Construct a long-term topological adjacency graph and a long-term geographic adjacency graph of rail transit stations. The nodes in the long-term topological adjacency graph represent rail transit stations, the edges represent the lines between stations, and the edge weights represent the lengths of the edge lines. The nodes in the long-term geographic graph represent rail transit stations. Stations within a set distance are spatially adjacent. The attribute information of the set nodes includes the node attributes of the nodes in the network and the location attributes of the nodes. The long-term topological adjacency graph and the long-term geographic adjacency graph are input into the adaptive supply-demand shared embedding network. The adaptive supply-demand shared embedding network integrates the graph attention network and the gating mechanism to capture the long-term spatiotemporal proximity effect. The supply and demand characteristics of the site are embedded. The adaptive supply-demand shared embedding network outputs two long-term graph networks. The node attributes of one long-term graph network represent the supply characteristics of the point as the starting point site, and the node attributes of the other long-term graph network represent the demand characteristics of the point as the terminal site. Use A t ′ and A g ′ respectively represent the long-term topological adjacency matrix and long-term geographical adjacency matrix of rail transit stations: Where dist(·) represents the topological network distance between adjacent sites, SD is the standard deviation of the corresponding distance, and the function geo(v i ,v j ) indicates site v i to v j The physical geographical distance, η represents the distance threshold; Long-term topological adjacency and geographic adjacency matrices of adaptive supply-demand sharing embedding networks on continuous spatial graphs A t and A g Expressed as: In the formula, A t ' (γ) and A g ' (γ) denote the long-term topological adjacency matrix and long-term geographic adjacency matrix of the γth year, respectively; Combined with the long-term topological adjacency matrix A t , long-term geographic adjacency matrix A g and site-level attribute features, automatically constructing the long-term topological adjacency graph and long-term geographic adjacency graph of the rail transit network based on the DGL deep graph library; The line-level indicators of the incoming passenger flow, outgoing passenger flow, and OD pairs are densely embedded according to the dimension of the supply and demand characteristics of the starting and ending points, and the starting and ending points are connected according to the OD pairs to obtain the attribute characteristics of the OD pairs. According to the attribute characteristics of the OD pairs, the high-order interaction relationship between different features is captured through a multi-head self-attention network to obtain the predicted OD passenger flow, including: The inbound passenger flow passes through a dense embedding layer to obtain the first dense embedding feature, the outbound passenger flow passes through a dense embedding layer as the second dense embedding feature, the OD pair attribute feature passes through a dense embedding layer as the third dense embedding feature, the supply feature of the starting station is extracted from the long-term graph representing the supply feature of the starting point as the fourth feature, and the supply feature of the terminal station is extracted from the long-term graph representing the supply feature of the terminal as the fifth feature. The first dense embedding feature, the second dense embedding feature, the third dense embedding feature, the fourth feature and the fifth feature are concatenated in the order of the starting and ending points of the OD pair to form the attribute feature of the OD pair; according to the attribute feature of the OD pair, the high-order interaction relationship between different features is captured through a multi-head self-attention network to obtain the predicted OD passenger flow value; Calculate the multi-task loss function value according to the predicted inbound passenger flow, outbound passenger flow and OD passenger flow, perform back propagation according to the multi-task loss function value, update the parameters of the multi-task cascade deep learning passenger flow prediction model, and repeat the process until the iteration termination condition is reached to obtain the trained inbound passenger flow predictor, outbound passenger flow predictor and adaptive supply and demand sharing embedding network, wherein the trained inbound passenger flow predictor, outbound passenger flow predictor and adaptive supply and demand sharing embedding network constitute the multi-task cascade deep learning passenger flow prediction model; The long-term topological adjacency graph and long-term geographical adjacency graph of the rail transit station to be predicted are obtained and input into the multi-task cascade deep learning passenger flow prediction model. The multi-task cascade deep learning passenger flow prediction model outputs the prediction results of inbound passenger flow, outbound passenger flow and OD passenger flow.
