Urban rail transit short-term OD passenger flow prediction method and system considering accident status
By combining a historical OD encoder with a convolutional long short-term memory unit and a self-attention unit, and a locally connected graph convolutional network with an attention mechanism, the sparseness and nonlinear spatiotemporal dependence of short-term OD prediction in urban rail transit systems are solved. To solve the problem, the accident matrix is introduced to adapt to emergencies, achieving more accurate and real-time OD passenger flow prediction, and improving the system's emergency response capability.
Patent Information
- Application Number
- CN202410396910.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-04-02
AI Technical Summary
Existing technologies face the problems of high-dimensional and sparse data processing, incomplete real-time OD matrix data, insufficient capture of complex nonlinear spatiotemporal dependencies, and insufficient adaptability to passenger behavior changes in emergency situations in short-term OD prediction in urban rail transit systems. .
A historical OD encoder that combines a convolutional long short-term memory unit (ConvLSTM) and a self-attention unit is used, and a local connection graph convolutional network combined with an attention mechanism is used to conduct short-term analysis through historical OD passenger flow encoding features and real-time inbound passenger flow features. OD passenger flow prediction, and the introduction of accident matrix to adapt to changes in passenger behavior during emergencies.
It improves the accuracy and real-time performance of short-term OD passenger flow prediction, can effectively capture spatiotemporal interaction patterns, adapt to different operating conditions and passenger behavior patterns, and improves the emergency response capability and overall safety of the urban rail transit system.
Smart Images

Figure CN118297419B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the application of artificial intelligence in urban rail transit, and in particular to a method and system for predicting short-term OD passenger flow in urban rail transit taking into account accident conditions. Background Art
[0002] The efficient operation of urban rail transit systems plays a vital role in modern cities. With the rapid expansion of urban rail transit systems, the demand for efficient management and operation has also increased accordingly. In this context, the integration of intelligent transportation systems (ITS) has become a key factor in improving service levels and operational efficiency. By collecting and processing large amounts of data, ITS enables the effective integration of big data analytics technology into urban rail transit systems, particularly in the area of short-term origin-destination (OD) predictions. Such predictions are not only useful in daily operations but are also particularly important in emergency situations such as underground accidents, as they can provide critical information for emergency response and passenger evacuation, significantly improving the safety and operational efficiency of subway systems.
[0003] Existing technologies face several key challenges in the field of short-term OD prediction for urban rail transit systems. First, processing high-dimensional and sparse OD matrix data has always been a challenge. The sparsity of data over short time intervals, particularly due to the dispersed distribution of passengers flowing in and out of the network, makes it difficult for traditional data processing methods to effectively utilize this information, thus affecting prediction accuracy. Second, existing technologies generally face a lack of real-time OD matrix data. Since subway journeys typically span multiple time steps, complete origin-destination information is only available when passengers arrive at their destination station and swipe their card to exit. This incomplete data limits the real-time performance and accuracy of the models. Furthermore, existing methods are insufficient in capturing complex nonlinear spatiotemporal dependencies, particularly during emergencies such as subway accidents, where their prediction accuracy can be significantly reduced. Finally, existing technologies have limitations in adapting to changes in passenger behavior and traffic flow during emergencies. In emergency situations, such as extreme weather or operational incidents, passenger travel patterns can undergo sudden and significant changes, but existing prediction models often fail to effectively adapt to these changes, resulting in reduced prediction performance. Summary of the Invention
[0004] In order to solve the above-mentioned problems existing in the prior art, the purpose of the present invention is to propose a method and system for predicting short-term OD passenger flow of urban rail transit taking into account the accident status, so as to solve the problem of deterioration in the short-term OD flow prediction performance during accidents in urban rail transit systems. The specific technical solution is as follows.
[0005] First, this case proposes a method for predicting short-term OD passenger flow of urban rail transit taking into account accident status. The method steps include: obtaining real-time passenger flow characteristics of the incoming station under multiple factors based on the current real-time passenger flow characteristics of the incoming station and the characteristics of multiple factors; predicting short-term OD passenger flow of urban rail transit based on the historical OD passenger flow coding characteristics and the real-time passenger flow characteristics of the incoming station under multiple factors; wherein: the multiple factors include weather information, time period information and accident information.
[0006] In one implementation of the above technical solution, the historical OD passenger flow coding feature is obtained from the historical OD passenger flow sequence through a historical encoder; the historical encoder includes a ConvLSTM unit and a Self-Attention unit; the ConvLSTM unit adopts a convolution-based LSTM to obtain preliminary historical OD passenger flow time series features from historical OD passenger flow data, and the convolution-based LSTM replaces the original multiplication operation with convolution in the activation function; the Self-Attention unit obtains deep historical OD passenger flow time series features based on the preliminary historical OD passenger flow time series features by adopting aggregated attention and feature fusion operations.
[0007] In one embodiment of the above technical solution, the ConvLSTM unit calculates as follows.
[0008] i t =σ(W Xi *OD t +W hi *H t-1 +b i )
[0009] f t =σ(W Xf *OD t +W hf *H t-1 +b f )
[0010]
[0011] o t =σ(W Xo *OD t +W ho *H t-1 +b o )
[0012]
[0013] Where: i t is the output of the ConvLSTM unit input gate, σ is the activation function, ft is the output of the forget gate of the ConvLSTM unit, C t The updated state of the ConvLSTM unit, O t is the output of the ConvLSTM unit output gate, H t is the hidden state of the ConvLSTM unit at the current time step, OD t is the number of passengers in time interval t, W Xi is the learnable weight of the ConvLSTM unit input gate OD matrix, W hi The learnable weight of the hidden state of the previous layer of the ConvLSTM unit input gate, b i is the bias term of the ConvLSTM unit input gate, W Xf is the learnable weight of the ConvLSTM unit forget gate OD matrix, W hf is the learnable weight of the hidden state of the previous layer of the ConvLSTM unit forget gate, b f is the bias term of the forget gate of the ConvLSTM unit, W XC The ConvLSTM unit updates the learnable weights of the state OD matrix, W hC ConvLSTM unit updates the state of the previous hidden state with a learnable weight, b C The bias term for updating the state of the ConvLSTM unit, W Xo is the learnable weight of the ConvLSTM unit output gate OD matrix, W ho is the learnable weight of the hidden state of the previous layer of the ConvLSTM unit output gate, b o is the bias term of the synchronization gate of the ConvLSTM unit, * is the convolution operation, It is the accumulation of Hadamade.
[0014] In one embodiment of the above technical solution, the Self-Attention unit calculates as follows.
[0015] i′ t =σ(W Mi′ *M+W h′i′ *H t +b i′ )
[0016] g′ t =tanh(W Mg′ *M+W h′g′ *H t +b g′ )
[0017]
[0018] o′t =σ(W Mo′ *M+W h′o′ *H t +b o′ )
[0019]
[0020] M=W M [S A (H t );S A (C′ t-1 )]
[0021] Where: i′ t is the output of the Self-Attention unit input gate, g′ t is the output of the Self-Attention unit fusion gate, C′ t The updated state of the Self-Attention unit, o′ t is the output of the Self-Attention unit output gate, H′ t is the hidden state of the Self-Attention unit at the current time step, W Mi′ The learnable weights of the self-attention matrix of the Self-Attention unit input gate, W h′i′ is the learnable weight of the hidden state of the input gate ConvLSTM of the Self-Attention unit, M is the aggregated attention obtained by the connection operation, and H t is the hidden state of the ConvLSTM unit at the current time step, b i′ The bias term for the input gate of the Self-Attention unit, W Mg′ is the learnable weight of the self-attention matrix of the Self-Attention unit fusion gate, W h′g′ is the learnable weight of the hidden state of the Self-Attention unit fusion gate ConvLSTM, b g′ is the bias term of the Self-Attention unit fusion gate, W Mo′ The learnable weight of the self-attention matrix of the Self-Attention unit output gate, W h′o′ is the learnable weight of the hidden state of the Self-Attention unit output gate ConvLSTM, b o′ is the bias term of the Self-Attention unit synchronization gate, σ is the activation function, * is the convolution operation, It is the accumulation of Hadamade.
[0022] In one embodiment of the above technical solution, the real-time inbound passenger flow characteristics under multiple factors are obtained by the following steps: obtaining current weather information and time period information as external features, splicing them with the real-time inbound passenger flow characteristics and performing feature extraction, delinearizing the extracted features and splicing them with the accident features, and further performing feature extraction based on the spliced features to obtain the real-time inbound passenger flow characteristics under multiple factors.
[0023] In one embodiment of the above technical solution, the real-time inbound passenger flow characteristics are obtained through an attention-based local connection graph convolutional network; the attention-based local connection graph convolutional network, based on the real-time inbound passenger flow and the rail transit network, uses skip-connected graph convolution and relationship-based attention mechanism to obtain the long-term interaction characteristics between the station and the real-time passenger volume; wherein: the rail transit network is obtained based on historical OD passenger flow, and the connectivity between two stations is judged by setting a threshold, and its adjacency matrix A is defined as follows.
[0024]
[0025] OD ref =P v (OD obs )
[0026] Among them: OD ref is the set OD passenger flow threshold, P v (OD obs ) is the percentile of OD flow observed in all time periods in the training set, and OD(i, j) is the passenger flow from station i to station j.
[0027] In one implementation of the above technical solution, the attention-based local connection graph convolutional network has multiple layers, and the processing of each layer is as follows.
[0028]
[0029] Where: LN is the normalization function, ReLU is the activation function, W Φ X is the learnable weight of graph convolution in attention-based locally connected graph convolutional network, (i) is the output of the i-th attention-based local connection graph convolutional network block, W Res Learnable weights for residual connections in attention-based locally connected graph convolutional networks, is the kernel filter of the graph convolutional network,* G is the graph convolution operation, where: T k is the K-order Chebyshev polynomial, It is equal to 2 times the Laplace matrix L divided by the largest eigenvalue of the Laplace matrix L minus the identity matrix, θk are the coefficients of the learnable Chebyshev polynomials, Hadamard product, SA is the spatial feature output by the spatial attention module, and the spatial attention module combines the output of the temporal attention module and the input X of the attention-based local connection graph convolutional network (i-1) The fusion features are taken as input.
[0030] In one embodiment of the above technical solution, the urban rail transit short-term OD passenger flow prediction is implemented as follows: is the short-term OD passenger flow forecast value of urban rail transit, For Hadamard, W e is the weight of the historical OD passenger flow coding feature, X enc is the encoding feature of historical OD passenger flow, W f is the weight of the real-time passenger flow characteristics under various factors, X FE It is the real-time passenger flow characteristics under various factors.
[0031] On the second aspect, this case proposes a short-term OD passenger flow prediction system for urban rail transit, which uses a deep learning model to predict short-term OD passenger flow for urban rail transit; the deep learning model includes a historical OD encoder module, a local connection graph convolutional network module based on an attention mechanism, a feature extraction module, and a decoder module; wherein: the historical OD encoder module is configured to obtain historical OD passenger flow coding features; the local connection graph convolutional network module based on an attention mechanism is configured to obtain current real-time inbound passenger flow features; the feature extraction module is configured to obtain real-time inbound passenger flow features under multiple factors based on current real-time inbound passenger flow features and multiple factor features; the decoder module is configured to predict short-term OD passenger flow for urban rail transit based on historical OD passenger flow coding features and real-time inbound passenger flow features under multiple factors; wherein: the multiple factors include weather information, time period information, and accident information.
[0032] In one implementation of the above technical solution, the deep learning model is trained by calculating the mask loss, and the mask loss Loss is calculated as follows: Where: n is the total number of time intervals, t is the time interval number, N is the number of stations, Y is the actual value of the short-term OD passenger flow of urban rail transit, is the short-term OD passenger flow forecast value of urban rail transit; m ij is a binary variable defined as The mask threshold set by δ, OD d,t (i, j) represents the passenger flow from station i to station j in the tth time interval on the dth day.
[0033] The beneficial technical effects of this case are: (1) By combining external features such as weather and time, and by introducing an accident matrix to comprehensively evaluate the impact of unstable changing factors, especially during non-peak periods, the accuracy of short-term OD passenger flow prediction can be improved. (2) By combining convolutional long short-term memory units with self-attention units, the long-range spatiotemporal information of historical OD flows is learned, which improves the accuracy of capturing OD downflow during events. (3) By combining the attention mechanism with locally connected graph convolution, important spatiotemporal interaction patterns are captured and the lack of real-time OD matrices is compensated. (3) The deep learning model designed in this case is highly modular and practical, and can solve the sparsity problem of short-term OD matrices. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0035] Figure 1 、 one Figure 2 is a model structure framework diagram in an implementation manner.
[0036] Figure 2 、 one Schematic diagram of the unit structure of the history encoder in this embodiment.
[0037] Figure 3 、 one Schematic diagram of the unit structure of the attention-based local connection graph convolutional network in this implementation. DETAILED DESCRIPTION
[0038] The parameters involved in this case and their meanings are shown in Table 1.
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045] Early work on OD prediction focused on capturing temporal features using traditional time series models, but these models were limited in their effectiveness when faced with complex, nonlinear spatiotemporal dependencies. With the rapid development of deep neural networks, such as convolutional neural networks (CNNs), recurrent neural networks (RNNs, including long short-term memory networks (LSTMs) and gated recurrent units (GRUs), graph convolutional networks (GCNs), and self-attention mechanisms, modern prediction methods have shown significant potential in capturing spatiotemporal dependencies. These methods provide a strong foundation for OD prediction, particularly when dealing with large-scale networks and complex spatiotemporal relationships.
[0046] However, while these methods perform well in daily operations, their prediction accuracy degrades significantly during emergencies due to their inability to capture complex nonlinear spatiotemporal dependencies. Furthermore, these methods face challenges in adapting to changes in passenger flows during emergencies.
[0047] Therefore, this paper proposes a new method for accurately predicting OD traffic flow in emergency situations. This method addresses the challenge of short-term OD traffic forecasting during incidents and is of great significance for improving the emergency response capabilities and overall safety of urban rail transit systems. This method can handle high-dimensional and sparse data while adapting to varying operating conditions and passenger behavior patterns, providing more accurate and real-time traffic flow forecasts.
[0048] The following, combined with the accompanying drawings, provides a clear and complete description of how the technical solution of this case is implemented. Obviously, the described implementation methods are only part of the implementation methods of this case, not all of the implementation methods. Based on the implementation methods of this case, all other implementation methods obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0049] (1) Overview of prediction model
[0050] First, we objectively quantify the impact of data latency, availability, weather, time, and subway accidents. This helps comprehensively assess the impact of unstable external factors, especially during off-peak hours. Furthermore, we use an accident matrix to adapt to changes in passenger behavior during emergencies, thereby improving the model's accuracy and stability during accident predictions. The details are as follows.
[0051] ① To address the data latency and availability issues, we introduced a historical OD window OD with a granularity of days. d,t ∈R N×N Combined with the number of passengers entering the station TI d,t ∈R N .
[0052] ② For weather factors, four continuous variables are used: real-time temperature, precipitation, relative humidity and wind speed, with W d,t ∈R N×4 To represent weather factors.
[0053] ③ For the time factor, trigonometric functions are used to map the features onto a circle to effectively reflect the periodicity of time. For example, the time period information can be expressed as in, p is the time index, and P represents the total time window step in one cycle.
[0054] ④ For the impact of subway accidents: Arriving Late (AL) (for example, if the train delay is greater than 5 minutes, it is considered an arrival delay), Emptying the Train (ET) and Stopping Departure (SD), the three accidents are represented by the matrix AL d,t ∈R N×N ET d,t ∈R N×N and SD d,t ∈R N×N Indicates that the final accident matrix I within a certain d-day time interval t is obtained through integration d,t ∈R N×N×3 , each element in the matrix represents the number of trains that have the corresponding accident.
[0055] Based on this, the problem of short-term OD passenger flow prediction of rail transit under accident conditions can be expressed as follows.
[0056]
[0057] h1=1,2,…,T1; h2=1,2,…,T2
[0058] The three accident matrices AL mentioned above d,t ∈R N×N ET d,t ∈R N×N and SD d,t ∈R N×N One method is to obtain the following: based on the track network diagram G containing N stations, the accident interval E l , accident start and end time T s ~T eThe values of AL, ET, and SD at the time of the accident are: d1, d2, and d3, where n is the length of the time series. The shortest path algorithm based on the network graph G is used to generate the accident matrix. Here, d1, d2, and d3 represent the number of trains arriving late (AL), empty (ET), and suspended (SD), respectively. For details on the pseudocode implementation of the above acquisition method, see Table 2 below.
[0059] Table 2
[0060]
[0061]
[0062] (2) Model structure framework
[0063] like Figure 1 As shown in the figure, the model consists of five modules: HOD encoder (Historical OD Encoder, HODEncoder, historical encoder), attention-based local connection graph convolutional network (ATTENTION-based Local Connection Graph Convolutional Network, ALC-GCN), feature extraction layer, linear decoder and mask loss function. Adopting an encoder-decoder architecture, the framework starts with the HOD encoder to learn key historical OD features. The attention-based local connection graph convolutional network combines network graph knowledge and uses spatiotemporal graph convolution to capture the real-time characteristics of incoming passenger volume, solving the problem of missing real-time information. External factors and accident matrices are integrated through the feature extraction layer, allowing adjustments to the encoding vector. Subsequently, the linear decoder decodes the compressed information and calculates the mask loss function, emphasizing the large flow during the accident period and alleviating the sparsity problem of the short-term OD matrix.
[0064] (I)HOD encoder
[0065] The HOD encoder is used to extract historical traffic information. It extracts features from historical OD flows and combines CNN, LSTM, and self-attention mechanisms to reveal high-dimensional historical OD flow information. The HOD encoder is based on the LSTM structure and supplemented by convolution operations to process temporal OD matrix data. Furthermore, by introducing the self-attention mechanism, the model's ability to capture long-term dependencies and improve generalization is enhanced. Among them, the units within the LSTM pipeline structure (see Figure 2 ), the formulas that control their behavior are as follows:
[0066] i t =σ(W Xi *OD t +W hi *H t-1 +bi ) (1)
[0067] f t =σ(W Xf *OD t +W hf *H t-1 +b f ) (2)
[0068]
[0069] o t =σ(W Xo *OD t +W ho *H t-1 +b o ) (4)
[0070]
[0071] i′ t =σ(W Mi′ *M+W h′i′ *H t +b i′ ) (6)
[0072] g′ t =tanh(W Mg′ *M+W h′g′ *H t +b g′ ) (7)
[0073]
[0074] o′ t =σ(W Mo′ *M+W h′o′ *H t +b o′ ) (9)
[0075]
[0076] M=W M [S A (H t );S A (C′ t-1 )] (11)
[0077] The above S A represents the self-attention operation (see Figure 3 It is worth noting that the q (query) parameter in the self-attention operation is t and (C′ t-1), which helps prevent overfitting.
[0078] (II) Attention-based Locally Connected Graph Convolutional Network
[0079] The attention-based locally connected graph convolutional network is used to capture the recent real-time inbound passenger volume features, such as Figure 3 As shown, its input is Output X after N_layer layer GCN , N_layer is a hyperparameter that can be determined through training.
[0080] The attention-based locally connected graph convolutional network includes a spatiotemporal attention module, a locally connected graph convolutional module, and a convolutional module. The spatiotemporal attention module uses a relation-based attention mechanism to integrate temporal and spatial attention components, dynamically assigning importance scores to the incoming passenger volume at each station. This helps the module focus on key information in the input data, thereby improving the performance and accuracy of the model. The locally connected graph convolutional module uses Chebyshev polynomials as the kernel of the graph convolution. It uses jump connections to capture the real-time incoming passenger volume characteristics based on the long-term interactions between the real-time passenger volume at network stations. It then fuses this with the real-time passenger volume obtained by the convolutional module to address the problem of missing real-time information.
[0081] Among them, in the GCN block, in order to solve the problem that the information between adjacent stations is "intermittent" and capture the "local connection" relationship of the rail transit network, by setting a threshold OD ref , and assumes that when the passenger volume intensity between two stations is lower than this value, there is a lack of connectivity information between them. The adjacency matrix A ij The modified definition of is as follows:
[0082]
[0083] OD ref =P v (OD obs ) (13)
[0084] The processing of each layer in the attention-based local connection graph convolutional network can be expressed as:
[0085]
[0086] The local connection graph convolution process is:
[0087]
[0088] SA is a spatial feature obtained based on temporal features. It is the spatial attention matrix in the attention-based local connection graph convolutional network. The calculation expression is:
[0089]
[0090] X Space is the input of the spatial attention module.
[0091] from Figure 3 It can be seen that the input of the spatial attention module is the output of the temporal attention module and the input of the attention-based local connection graph convolutional network X (i-1) The fusion output of the time attention module is used to compensate for the lack of real-time information. The processing of the time attention module is as follows:
[0092]
[0093] X Time is the input of the temporal attention module.
[0094] In summary, this approach combines convolutional long short-term memory (LSTM) units with self-attention units to learn long-range spatiotemporal information from historical OD flows. While relying on historical OD to capture the relationships between stations, it introduces an improved graph convolution operation to capture important spatiotemporal interaction patterns and compensate for the lack of a real-time OD matrix.
[0095] (III) Feature Extraction Layer
[0096] The feature extraction layer combines station traffic, external data, and accident information before decoding the information. These inputs are fed into a fully connected (FC) layer and then processed through an activation function. The final output of this module is expressed as follows:
[0097] X FE =ReLU(FC([ReLU(FC([X GCN ;X EXT ]));I d,t ])) (18)
[0098] Among them, X EXT =[W d,t , t p ],
[0099] By incorporating external features such as weather and time, the impact of unstable variability factors can be comprehensively assessed, especially during off-peak periods. In addition, the introduction of event matrix theory improves the accuracy of capturing OD downwelling during events.
[0100] (IV) Linear Decoder
[0101] The linear decoder receives input from the historical OD encoder and the feature extraction layer. The linear decoder is used to convert the multi-source information into a square matrix whose dimension corresponds to the number of stations. The final output It is given by:
[0102]
[0103] (V) Mask loss function
[0104] During an incident, prioritizing high-passenger trips is crucial for providing enhanced services. To address these issues, a masking method is used to effectively mask the impact of these small OD flows using a masking loss function. The masking operation expression is as follows:
[0105]
[0106]
[0107] Among them, m ij ∈Y m Indicates that when the element of the true matrix is less than the mask threshold δ, Y m ∈R N×N The corresponding element is equal to 0.
[0108] Combine the required masking operation with the mean squared error loss function:
[0109]
[0110] In summary, this case proposes a method for predicting short-term starting-end passenger flow of rail transit under accident conditions based on deep learning. By adopting graph convolutional networks and deep learning algorithms, it can effectively process and analyze sparse data, improve data utilization and prediction accuracy. Secondly, it innovatively utilizes real-time card swiping data to make up for the limitation of unavailability of real-time OD matrix data. In addition, by combining ConvLSTM units and self-attention mechanisms, it deeply studies the spatiotemporal patterns in historical OD flow data to understand the mutual influence between different subway stations. Then, combined with external features such as weather and time, the impact of unstable changing factors is comprehensively evaluated, especially during non-peak periods. In addition, the present invention introduces an "accident matrix" to adapt to changes in passenger behavior in emergency situations, thereby improving the accuracy and stability of the model during accident prediction. The overall model is highly adaptable and can keep pace with the latest developments in the field of short-term traffic forecasting, and can address the limitations of existing methods.
[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that the disclosed method can be implemented as a corresponding modular system or device. For example, in the implemented system: the system uses a deep learning model to predict short-term OD passenger flow for urban rail transit; the deep learning model includes a historical OD encoder module, a local connection graph convolutional network module based on an attention mechanism, a feature extraction module, and a decoder module; wherein: the historical OD encoder module is configured to obtain historical OD passenger flow encoding features; the local connection graph convolutional network module based on an attention mechanism is configured to obtain current real-time inbound passenger flow features; the feature extraction module is configured to obtain real-time inbound passenger flow features under multiple factors based on current real-time inbound passenger flow features and multiple factor features; the decoder module is configured to predict short-term OD passenger flow for urban rail transit based on historical OD passenger flow encoding features and real-time inbound passenger flow features under multiple factors; wherein: the multiple factors include weather information, time period information, and accident information. Furthermore, the system or device can be implemented by software plus necessary general-purpose hardware, or can be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally speaking, any function performed by a computer program can be easily implemented using corresponding hardware. Moreover, the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the present disclosure, software program implementation is often the preferred embodiment.
[0112] Although the embodiments of the present invention have been described above with reference to the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments and application fields. The above-mentioned specific embodiments are merely illustrative and instructive, and are not restrictive. A person skilled in the art, guided by this specification and without departing from the scope of protection of the claims of the present invention, may also devise various forms, all of which fall within the scope of protection of the present invention.
Claims
1. A method for predicting short-term OD passenger flow in urban rail transit considering accident conditions, characterized in that: The method steps include: The historical OD passenger flow encoding features are obtained from the historical OD passenger flow sequence using a history encoder consisting of ConvLSTM units and Self-Attention units; Based on the real-time passenger flow entering the station, the attention-based local connection graph convolution module is used to obtain the current real-time passenger flow characteristics entering the station, including: based on the real-time passenger flow entering the station and the rail transit network, the graph convolution with skip connection and the relationship-based attention mechanism are used to obtain the long-term interaction characteristics between the station and the real-time passenger volume; Based on the current real-time incoming passenger flow characteristics and the characteristics of multiple factors, the real-time incoming passenger flow characteristics under multiple factors are obtained, including: obtaining current weather information and time period information as external features, splicing them with the current real-time incoming passenger flow characteristics and then performing feature extraction, delinearizing the extracted features and splicing them with accident features, and further performing feature extraction to obtain the real-time incoming passenger flow characteristics under multiple factors; Based on the historical OD passenger flow coding characteristics and the real-time inbound passenger flow characteristics under various factors, a linear decoder is used to predict and output the short-term OD passenger flow of urban rail transit. During the training phase, the method also performs mask loss calculation after the prediction output based on the linear decoder; Wherein: the multiple factors include weather information, time period information and accident information; The ConvLSTM unit uses a convolution-based LSTM to obtain preliminary historical OD passenger flow time series features from historical OD passenger flow data. The convolution-based LSTM replaces the original multiplication operation with convolution in the activation function; The Self-Attention unit obtains deep historical OD passenger flow time series features based on preliminary historical OD passenger flow time series features by adopting aggregated attention and feature fusion operations.
2. The method according to claim 1, characterized in that The ConvLSTM unit, the calculation includes: Where: is the output of the ConvLSTM unit input gate, As the activation function that compresses the value to (0,1), the hyperbolic tangent function tanh is used as the activation function to compress the value to (-1,1). is the output of the forget gate of the ConvLSTM unit, is the state updated for the ConvLSTM unit, is the output of the ConvLSTM unit output gate, is the hidden state of the ConvLSTM unit at the current time step, is the number of passengers in time interval t, is the learnable weight of the OD matrix of the ConvLSTM unit input gate, The learnable weights for the hidden state of the previous layer of the ConvLSTM unit input gate, is the bias term for the input gate of the ConvLSTM unit, is the learnable weight of the ConvLSTM unit forget gate OD matrix, is the learnable weight of the hidden state of the previous layer of the ConvLSTM unit forget gate, is the bias term of the forget gate of the ConvLSTM unit, The ConvLSTM unit updates the learnable weights of the state OD matrix, ConvLSTM unit updates the state of the previous hidden state with learnable weights, The bias term for updating the state of the ConvLSTM unit, is the learnable weight of the output gate OD matrix of the ConvLSTM unit, is the learnable weight of the hidden state of the previous layer of the ConvLSTM unit output gate, is the bias term of the synchronization gate of the ConvLSTM unit, is the convolution operation, It is the accumulation of Hadamade.
3. The method according to claim 1, characterized in that: The Self-Attention unit, the calculation includes: Where: is the output of the Self-Attention unit input gate, is the output of the Self-Attention unit fusion gate, The state updated by the Self-Attention unit, is the output of the Self-Attention unit output gate, is the hidden state of the Self-Attention unit at the current time step, The learnable weights of the self-attention matrix for the Self-Attention unit input gate, The learnable weights for the hidden state of the input gate ConvLSTM of the Self-Attention unit, is the aggregated attention obtained through the concatenation operation, is the hidden state of the ConvLSTM unit at the current time step, The bias term for the input gate of the Self-Attention unit, is the learnable weight of the self-attention matrix of the Self-Attention unit fusion gate, is the learnable weight of the hidden state of the Self-Attention unit fusion gate ConvLSTM, is the bias term of the Self-Attention unit fusion gate, The learnable weights of the self-attention matrix of the Self-Attention unit output gate, is the learnable weight of the hidden state of the Self-Attention unit output gate ConvLSTM, is the bias term of the Self-Attention unit synchronization gate, As the activation function that compresses the value to (0,1), the hyperbolic tangent function tanh is used as the activation function to compress the value to (-1,1). is the convolution operation, For Hadamard, represents the self-attention operation, Represents a join operation.
4. The method according to claim 1, characterized in that: The rail transit network is obtained based on historical OD passenger flow, and the connectivity between two stations is determined by setting a threshold. Its adjacency matrix The definition is as follows: in: is the set OD passenger flow threshold, is the percentile of OD flow observed in all time periods in the training set, From the station To the station passenger flow.
5. The method according to claim 1, characterized in that The attention-based local connection graph convolutional network has multiple layers, and the processing of each layer is: Where: LN is the normalization function, ReLU is the activation function, Learnable weights for graph convolutions in attention-based locally connected graph convolutional networks, is the output of the i-th attention-based locally connected graph convolutional network block, Learnable weights for residual connections in attention-based locally connected graph convolutional networks, is the kernel filter of the graph convolutional network, is a graph convolution operation, where: in: is the K-order Chebyshev polynomial, It is equal to 2 times the Laplace matrix L divided by the largest eigenvalue of the Laplace matrix L minus the identity matrix, are the coefficients of the learnable Chebyshev polynomials, For Hadamard, The spatial features output by the spatial attention module; The spatial attention module combines the output of the temporal attention module with the input of the attention-based local connection graph convolutional network. The fusion features are taken as input.
6. The method according to claim 1, characterized in that The short-term OD passenger flow prediction of urban rail transit is implemented in one way: Where: is the short-term OD passenger flow forecast value of urban rail transit, For Hadamard, is the weight of the historical OD passenger flow coding feature, Encode the characteristics of historical OD passenger flow, is the weight of the real-time passenger flow characteristics under various factors, It is the real-time inbound passenger flow characteristics under various factors.
7. A short-term OD passenger flow prediction system for urban rail transit, characterized by: The system uses a deep learning model to predict short-term OD passenger flow in urban rail transit; The deep learning model includes a historical OD encoder module, a local connection graph convolutional network module based on an attention mechanism, a feature extraction module, and a linear decoder module; wherein: The historical OD encoder module comprises a ConvLSTM unit and a Self-Attention unit, and the historical OD encoder module is configured to obtain historical OD passenger flow coding features from a historical OD passenger flow sequence; The local connection graph convolution network module based on the attention mechanism is configured to obtain the current real-time passenger flow characteristics based on the real-time passenger flow, including: based on the real-time passenger flow and the rail transit network, using the graph convolution of the jump connection and the attention mechanism based on the relationship to obtain the long-term interaction characteristics between the station and the real-time passenger volume; The feature extraction module is configured to obtain the real-time inbound passenger flow features under multiple factors based on the current real-time inbound passenger flow features and the features of multiple factors, including: obtaining current weather information and time period information as external features, splicing them with the current real-time inbound passenger flow features and then performing feature extraction, delinearizing the extracted features and splicing them with accident features, and further performing feature extraction to obtain the real-time inbound passenger flow features under multiple factors; The linear decoder module is configured to output short-term OD passenger flow prediction of urban rail transit based on historical OD passenger flow coding characteristics and real-time inbound passenger flow characteristics under multiple factors; Wherein: the multiple factors include weather information, time period information and accident information; The ConvLSTM unit uses a convolution-based LSTM to obtain preliminary historical OD passenger flow time series features from historical OD passenger flow data. The convolution-based LSTM replaces the original multiplication operation with convolution in the activation function; The Self-Attention unit obtains the deep historical OD passenger flow time series features based on the preliminary historical OD passenger flow time series features by adopting aggregated attention and feature fusion operations; The deep learning model is trained by calculating the mask loss.
8. The system according to claim 7, characterized in that Mask loss The calculation is as follows: Where: is the total number of time intervals, t is the time interval serial number, N is the number of stations, Y is the actual value of short-term OD passenger flow of urban rail transit, is the short-term OD passenger flow forecast value of urban rail transit, For Hadamade; is a binary variable defined as , Set the mask threshold. Indicated in day from the station within the tth time interval To the station of passenger flow, Indicates that when the element of the real matrix is less than the mask threshold hour, The corresponding element is equal to 0, is the field of real numbers.
Citation Information
Patent Citations
Data prediction method based on long and short term spatio-temporal data multi-graph fusion spatio-temporal attention
CN112801355A
Urban rail transit holiday short-time passenger flow prediction method based on GCN-Transformer
CN115034496A
Rail transit passenger flow prediction method fusing attention mechanism and graph neural network
CN115081717A
Multi-mode traffic short-time passenger flow collaborative prediction method based on multi-task learning
CN115146844A
Urban rail transit short-time passenger flow prediction method considering sudden factors
CN116128122A
