Movatterモバイル変換


[0]ホーム

URL:


CN118297419B - Urban rail transit short-term OD passenger flow prediction method and system considering accident status - Google Patents

Urban rail transit short-term OD passenger flow prediction method and system considering accident status
Download PDF

Info

Publication number
CN118297419B
CN118297419BCN202410396910.XACN202410396910ACN118297419BCN 118297419 BCN118297419 BCN 118297419BCN 202410396910 ACN202410396910 ACN 202410396910ACN 118297419 BCN118297419 BCN 118297419B
Authority
CN
China
Prior art keywords
passenger flow
attention
time
unit
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410396910.XA
Other languages
Chinese (zh)
Other versions
CN118297419A (en
Inventor
王子甲
邹林沐
冯丹泳
朱亚迪
陈�峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jiaotong University
Original Assignee
Beijing Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jiaotong UniversityfiledCriticalBeijing Jiaotong University
Priority to CN202410396910.XApriorityCriticalpatent/CN118297419B/en
Publication of CN118297419ApublicationCriticalpatent/CN118297419A/en
Application grantedgrantedCritical
Publication of CN118297419BpublicationCriticalpatent/CN118297419B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及一种考虑事故状态的城市轨道交通短时OD客流预测方法及系统,属于人工智能在城市轨道交通的应用,用于解决现有技术轨道交通在突发事件发生时因对复杂的非线性时空依赖性捕捉不足,短时OD客流量预测准确性大幅降低的问题。本案通过基于当前实时进站客流特征与多种因素特征,获取在多种因素下的实时进站客流特征;基于历史OD客流量编码特征和在多种因素下的实时进站客流特征,进行城市轨道交通短时OD客流预测,提高事故期间的预测准确性和稳定性,对提升城市轨道交通系统的应急响应能力和整体安全性具有重要意义。

The present invention relates to a method and system for predicting short-term OD passenger flow of urban rail transit taking into account accident status, which belongs to the application of artificial intelligence in urban rail transit and is used to solve the problem that the accuracy of short-term OD passenger flow prediction is greatly reduced due to insufficient capture of complex nonlinear spatiotemporal dependencies in the prior art rail transit when an emergency occurs. This case obtains real-time inbound passenger flow characteristics under multiple factors based on the current real-time inbound passenger flow characteristics and multiple factor characteristics; based on the historical OD passenger flow coding characteristics and the real-time inbound passenger flow characteristics under multiple factors, short-term OD passenger flow prediction of urban rail transit is performed to improve the prediction accuracy and stability during accidents, which is of great significance to improving the emergency response capability and overall safety of the urban rail transit system.

Description

Translated fromChinese
考虑事故状态的城市轨道交通短时OD客流预测方法及系统Urban rail transit short-term OD passenger flow prediction method and system considering accident status

技术领域Technical Field

本发明涉及人工智能在城市轨道交通的应用,尤其涉及一种考虑事故状态的城市轨道交通短时OD客流预测方法及系统。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 of urban rail transit considering accident status.

背景技术Background Art

城市轨道交通系统的高效运营在现代城市中扮演着至关重要的角色。随着城市轨道交通系统的迅速扩展,对高效管理和运营的需求也相应增加。在这种背景下,智能交通系统(ITS)的整合成为提高服务水平和运营效率的关键因素。ITS通过收集和处理大量数据,使得大数据分析技术能够有效地融入城市轨道交通系统中,特别是在短期起点-终点(OD)预测方面。这种预测不仅在日常运营中发挥作用,而且在地下事故等紧急情况下尤为重要,因为它能够为紧急响应和乘客疏散提供关键信息,从而显著提高地铁系统的安全性和运营效率。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 big data analysis technology to be effectively integrated into urban rail transit systems, especially in short-term origin-destination (OD) predictions. This prediction not only plays a role in daily operations, but is also particularly important in emergency situations such as underground accidents, as it can provide key information for emergency response and passenger evacuation, thereby significantly improving the safety and operational efficiency of the subway system.

现有技术在城市轨道交通系统的短期OD预测领域面临几个关键性的挑战。首先,处理高维度和稀疏的OD矩阵数据一直是一个难题。由于数据在短时间间隔内的稀疏性,尤其是在网络中流入/流出的乘客分布分散,这使得传统的数据处理方法难以高效利用这些信息,从而影响预测的准确性。其次,现有技术普遍面临实时OD矩阵数据缺乏的问题。由于地铁行程通常涵盖多个时间步骤,仅在乘客到达目的地车站并刷卡出站时才能提供完整的起始-终点信息,这种数据的不完整性限制了模型的实时性和准确性。此外,现有方法在捕捉复杂的非线性时空依赖性方面也表现不足,特别是在突发事件发生时,如地下事故,这些方法的预测准确性会大幅下降。最后,现有技术在适应紧急情况下乘客行为和流量变化方面存在局限性。在紧急情况下,如极端天气或运营事故,乘客的出行模式可能会发生突然和显著的变化,但现有的预测模型往往无法有效适应这些变化,导致预测性能下降。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 difficult problem. Due to the sparsity of data in short time intervals, especially the dispersed distribution of passengers flowing in/out of the network, it is difficult for traditional data processing methods to efficiently utilize this information, thus affecting the accuracy of prediction. Second, existing technologies generally face the problem of lack of real-time OD matrix data. Since subway trips usually cover multiple time steps, complete start-end information can only be provided when passengers arrive at the destination station and swipe their cards to exit the station. This incompleteness of data limits the real-time and accuracy of the model. In addition, existing methods are also insufficient in capturing complex nonlinear spatiotemporal dependencies, especially when emergencies occur, such as underground accidents, the prediction accuracy of these methods will drop significantly. Finally, existing technologies have limitations in adapting to changes in passenger behavior and flow in emergency situations. In emergency situations, such as extreme weather or operational accidents, passengers' travel patterns may change suddenly and significantly, but existing prediction models often cannot effectively adapt to these changes, resulting in a decrease in prediction performance.

发明内容Summary of the invention

为了解决现有技术中存在的上述问题,本发明的目的在于提出一种考虑事故状态的城市轨道交通短时OD客流预测方法及系统,以解决城市轨道交通系统事故期间短期OD流量预测性能下降的问题,具体技术方案如下。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 degradation of short-term OD flow prediction performance during accidents in urban rail transit systems. The specific technical solution is as follows.

第一方面,本案提出一种考虑事故状态的城市轨道交通短时OD客流预测方法,所述方法步骤包括:基于当前实时进站客流特征与多种因素特征,获取在多种因素下的实时进站客流特征;基于历史OD客流量编码特征和在多种因素下的实时进站客流特征,进行城市轨道交通短时OD客流预测;其中:所述多种因素包括天气信息、时间周期信息以及事故信息。On the first aspect, this case proposes a method for predicting short-term OD passenger flow of urban rail transit taking into account accident status, and the method steps include: based on the current real-time in-station passenger flow characteristics and the characteristics of multiple factors, obtaining the real-time in-station passenger flow characteristics under multiple factors; based on the historical OD passenger flow coding characteristics and the real-time in-station passenger flow characteristics under multiple factors, predicting the short-term OD passenger flow of urban rail transit; wherein: the multiple factors include weather information, time period information and accident information.

在上述技术方案的一种实施方式中,所述基于历史OD客流量编码特征,通过历史编码器从历史OD客流序列中获取;所述历史编码器,包括ConvLSTM单元和Self-Attention单元;所述ConvLSTM单元,采用基于卷积的LSTM从历史OD客流量数据中获取初步历史OD客流量时序特征,所述基于卷积的LSTM在激活函数中将原来的乘法运算改用卷积;所述Self-Attention单元,通过采用聚合注意力和特征融合操作,基于初步历史OD客流量时序特征获得深度历史OD客流量时序特征。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 uses 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.

在上述技术方案的一种实施方式中,所述ConvLSTM单元,计算如下。In one implementation of the above technical solution, the ConvLSTM unit is calculatedas follows.

it=σ(WXi*ODt+Whi*Ht-1+bi)it =σ(WXi *ODt +Whi *Ht-1 +bi )

ft=σ(WXf*ODt+Whf*Ht-1+bf)ft =σ(WXf *ODt +Whf *Ht-1 +bf )

ot=σ(WXo*ODt+Who*Ht-1+bo)ot =σ(WXo *ODt +Who *Ht-1 +bo )

式中:it为ConvLSTM单元输入门的输出,σ为激活函数,ft为ConvLSTM单元遗忘门的输出,Ct为ConvLSTM单元更新的状态,Ot为ConvLSTM单元输出门的输出,Ht为ConvLSTM单元当前时间步的隐藏状态,ODt为时间间隔t内的乘客量,WXi为ConvLSTM单元输入门OD矩阵的可学习权重,Whi为ConvLSTM单元输入门上一层隐藏状态的可学习权重,bi为ConvLSTM单元输入门的偏置项,WXf为ConvLSTM单元遗忘门OD矩阵的可学习权重,Whf为ConvLSTM单元遗忘门上一层隐藏状态的可学习权重,bf为ConvLSTM单元遗忘门的偏置项,WXC ConvLSTM单元更新状态OD矩阵的可学习权重,WhC ConvLSTM单元更新状态上一层隐藏状态的可学习权重,bC为ConvLSTM单元更新状态的偏置项,WXo为ConvLSTM单元输出门OD矩阵的可学习权重,Who为ConvLSTM单元输出门上一层隐藏状态的可学习权重,bo为ConvLSTM单元同步门的偏置项,*为卷积操作,为哈达马德积。Where:it is the output of the input gate of the ConvLSTM unit, σ is the activation function,ft is the output of the forget gate of the ConvLSTM unit,Ct is the updated state of the ConvLSTM unit,Ot is the output of the output gate of the ConvLSTM unit,Ht is the hidden state of the current time step of the ConvLSTM unit,ODt is the number of passengers in the time interval t,WXi is the learnable weight of the OD matrix of the input gate of the ConvLSTM unit,Whi is the learnable weight of the hidden state of the previous layer of the input gate of the ConvLSTM unit,bi is the bias term of the input gate of the ConvLSTM unit,WXf is the learnable weight of the OD matrix of the forget gate of the ConvLSTM unit,Whf is the learnable weight of the hidden state of the previous layer of the forget gate of the ConvLSTM unit,bf is the bias term of the forget gate of the ConvLSTM unit,WXC is the learnable weight of the OD matrix of the updated state of the ConvLSTM unit,WhC is the learnable weight of the hidden state of the previous layer of the updated state of the ConvLSTM unit,bC is the bias term of the updated state of the ConvLSTM unit, WXo is the learnable weight of the OD matrix of the ConvLSTM unit output gate,Who is the learnable weight of the hidden state of the previous layer of the ConvLSTM unit output gate, bo is the bias term of the ConvLSTM unit synchronization gate, * is the convolution operation, It is the accumulation of Hadamade.

在上述技术方案的一种实施方式中,所述Self-Attention单元,计算如下。In one implementation of the above technical solution, the Self-Attention unit is calculatedas follows.

i′t=σ(WMi′*M+Wh′i′*Ht+bi′)i′t =σ(WMi′ *M+Wh′i′ *Ht +bi′ )

g′t=tanh(WMg′*M+Wh′g′*Ht+bg′)g′t =tanh(WMg′ *M+Wh′g′ *Ht +bg′ )

o′t=σ(WMo′*M+Wh′o′*Ht+bo′)o′t =σ(WMo′ *M+Wh′o′ *Ht +bo′ )

M=WM[SA(Ht);SA(C′t-1)]M=WM [SA (Ht ); SA (C′t-1 )]

式中:i′t为Self-Attention单元输入门的输出,g′t为Self-Attention单元融合门的输出,C′t为Self-Attention单元更新的状态,o′t为Self-Attention单元输出门的输出,H′t为Self-Attention单元当前时间步的隐藏状态,WMi′为Self-Attention单元输入门自注意力矩阵的可学习权重,Wh′i′为Self-Attention单元输入门ConvLSTM隐藏状态的可学习权重,M为通过连接操作获得的聚合注意力,Ht为ConvLSTM单元当前时间步的隐藏状态,bi′为Self-Attention单元输入门的偏置项,WMg′为Self-Attention单元融合门自注意力矩阵的可学习权重,Wh′g′为Self-Attention单元融合门ConvLSTM隐藏状态的可学习权重,bg′为Self-Attention单元融合门的偏置项,WMo′为Self-Attention单元输出门自注意力矩阵的可学习权重,Wh′o′为Self-Attention单元输出门ConvLSTM隐藏状态的可学习权重,bo′为Self-Attention单元同步门的偏置项,σ为激活函数,*为卷积操作,为哈达马德积。Where:i′t is the output of the input gate of the Self-Attention unit,g′t is the output of the fusion gate of the Self-Attention unit,C′t is the updated state of the Self-Attention unit,o′t is the output of the output gate of the Self-Attention unit,H′t is the hidden state of the Self-Attention unit at the current time step, WMi′ is the learnable weight of the self-attention matrix of the input gate of the Self-Attention unit, Wh′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,Ht is the hidden state of the ConvLSTM unit at the current time step, bi is the bias term of the input gate of the Self-Attention unit, WMg′ is the learnable weight of the self-attention matrix of the fusion gate of the Self-Attention unit, Wh′g′ is the learnable weight of the hidden state of the fusion gate ConvLSTM of the Self-Attention unit, bg′ is the bias term of the fusion gate of the Self-Attention unit, and WMo′ is the learnable weight of the self-attention matrix of the Self-Attention unit output gate, Wh′o′ is the learnable weight of the hidden state of the Self-Attention unit output gate ConvLSTM, bo′ 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.

在上述技术方案的一种实施方式中,在多种因素下的实时进站客流特征,获取步骤包括:获取当前天气信息和时间周期信息作为外部特征,将其与实时进站客流特征拼接后进行特征提取,将提取的特征去线性化后与事故特征拼接,基于拼接后的特征进一步进行特征提取,获得在多种因素下的实时进站客流特征。In one implementation of the above technical solution, the real-time inbound passenger flow characteristics under multiple factors, the acquisition step includes: acquiring 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 accident features, further performing feature extraction based on the spliced features, and obtaining real-time inbound passenger flow characteristics under multiple factors.

在上述技术方案的一种实施方式中,所述实时进站客流特征,通过基于注意力的局部连接图卷积网络获取;所述基于注意力的局部连接图卷积网络,基于实时进站客流量和轨道交通网,利用跳跃连接的图卷积和基于关系的注意力机制,来获取车站与实时乘客量之间的长期交互特征;其中:所述轨道交通网基于历史OD客流量获取,并通过设定阈值来判断两个车站之间的连通性,其邻接矩阵A定义如下。In one implementation 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 jump connection 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.

ODref=Pv(ODobs)ODref =Pv (ODobs )

其中:ODref为设定的OD客流阈值,Pv(ODobs)为训练集中所有时间段观测到的OD流量的百分位数,OD(i,j)为从车站i到车站j的客流量。Where: ODref is the set OD passenger flow threshold, Pv (ODobs ) is the percentile of the 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.

在上述技术方案的一种实施方式中,所述基于注意力的局部连接图卷积网络具有多层,每层的处理如下。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.

式中:LN规范化操作函数,ReLU为激活函数,WΦ为基于注意力的局部连接图卷积网络中的图卷积可学习权重,X(i)为第i个基于注意力的局部连接图卷积网络块的输出,WRes为基于注意力的局部连接图卷积网络中的残差连接可学习权重,为图卷积网络的核过滤器,*G为图卷积操作,其中:Tk为K阶切比雪夫多项式,等于2倍的拉普拉斯矩阵L除以拉普拉斯矩阵L最大的特征值再减去单位矩阵,θk为可学习的切比雪夫多项式的系数,哈达马德积,SA为空间注意力模块输出的空间特征,空间注意力模块将时间注意力模块的输出和基于注意力的局部连接图卷积网络的输入X(i-1)的融合特征作为输入。Where: LN is the normalization operation function, ReLU is the activation function, WΦ is the graph convolution learnable weight in the attention-based local connection graph convolution network, X(i) is the output of the i-th attention-based local connection graph convolution network block, WRes is the residual connection learnable weight in the attention-based local connection graph convolution network, is the kernel filter of the graph convolutional network, *G is the graph convolution operation, where: Tk 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 is the coefficient of the learnable Chebyshev polynomial. Hadamard product, SA is the spatial feature output by the spatial attention module, and the spatial attention module takes the fused features of the output of the temporal attention module and the input X(i-1) of the attention-based locally connected graph convolutional network as input.

在上述技术方案的一种实施方式中,所述城市轨道交通短时OD客流预测,一种实现方式为为城市轨道交通短时OD客流预测值,为哈达马德积,We为历史OD客流量编码特征的权重,Xenc为历史OD客流量编码特征,Wf为在多种因素下的实时进站客流特征的权重,XFE为在多种因素下的实时进站客流特征。In one implementation of the above technical solution, the short-term OD passenger flow prediction of urban rail transit is implemented as follows: is the short-term OD passenger flow forecast value of urban rail transit, is the Hadamard product,We is the weight of the historical OD passenger flow coding feature,Xenc is the historical OD passenger flow coding feature,Wf is the weight of the real-time inbound passenger flow feature under various factors, andXFE is the real-time inbound passenger flow feature under various factors.

第二方面,本案提出一种城市轨道交通短时OD客流预测系统,所述系统使用深度学习模型进行城市轨道交通短时OD客流预测;所述深度学习模型包括历史OD编码器模块、基于注意力机制的局部连接图卷积网络模块、特征提取模块、解码器模块;其中:所述历史OD编码器模块,被配置用于获取历史OD客流量编码特征;所述基于注意力机制的局部连接图卷积网络模块,被配置用于获取当前实时进站客流特征;所述特征提取模块,被配置基于当前实时进站客流特征与多种因素特征,获取在多种因素下的实时进站客流特征;所述解码器模块,被配置基于历史OD客流量编码特征和在多种因素下的实时进站客流特征,进行城市轨道交通短时OD客流预测;其中:所述多种因素包括天气信息、时间周期信息以及事故信息。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 the short-term OD passenger flow of 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 the historical OD passenger flow coding features; the local connection graph convolutional network module based on the attention mechanism is configured to obtain the current real-time inbound passenger flow features; 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 multiple factor features; the decoder module is configured to predict the short-term OD passenger flow of urban rail transit based on the historical OD passenger flow coding features and the real-time inbound passenger flow features under multiple factors; wherein: the multiple factors include weather information, time period information and accident information.

在上述技术方案的一种实施方式中,所述深度学习模型通过计算掩码损失进行训练,掩码损失Loss计算如下:式中:n为时间间隔总数,t为时间间隔序号,N为站点数,Y为城市轨道交通短时OD客流真实值,为城市轨道交通短时OD客流预测值;mij为定义的二元变量,δ设定的掩码阈值,ODd,t(i,j)表示在第d天在第t个时间间隔内从车站i到车站j的客流量。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 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;mij is a binary variable defined, The mask threshold set by δ, ODd,t (i, j) represents the passenger flow from station i to station j in the tth time interval on the dth day.

本案的有益技术效果为:(1)通过结合了天气和时间等外部特征,并通过引入事故矩阵,以全面评估不稳定变化因素的影响,特别是在非高峰时期,可提高短时OD客流预测准确性。(2)采用卷积长短期记忆单元与自注意力单元相结合,学习历史OD流的长程时空信息,提高了捕获事件期间OD下降流的准确性。(3)通过将注意力机制和局部连接的图卷积结合,以捕获重要的时空交互模式,并补偿实时OD矩阵的缺失。(3)本案设计的深度学习模型具有高度的模块化和实用性,可解决短期OD矩阵的稀疏性问题。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) The convolutional long short-term memory unit is combined with the self-attention unit to learn the long-range spatiotemporal information of the historical OD flow, thereby improving the accuracy of capturing the OD downflow during the event. (3) By combining the attention mechanism and the locally connected graph convolution, important spatiotemporal interaction patterns can be captured and the lack of real-time OD matrix can be compensated. (3) The deep learning model designed in this case is highly modular and practical, and can solve the sparsity problem of the short-term OD matrix.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 paying creative labor.

图1、一种实施方式中的模型结构框架图。Fig. 1 is a diagram of a model structure framework in one implementation.

图2、一种实施方式中历史编码器的单元结构示意图。FIG2 is a schematic diagram of a unit structure of a history encoder in one implementation.

图3、一种实施方式中基于注意力的局部连接图卷积网络的单元结构示意图。Figure 3 is a schematic diagram of the unit structure of an attention-based local connection graph convolutional network in one implementation.

具体实施方式DETAILED DESCRIPTION

本案中涉及的参数及其含义见表1所示。The parameters involved in this case and their meanings are shown in Table 1.

在OD预测技术上,早期侧重于利用传统时间序列模型捕捉时序特征,但这些模型在面对复杂的非线性时空依赖性时效果有限。随着深度神经网络的快速发展,如卷积神经网络(CNN)、递归神经网络(RNN,包括长短期记忆网络LSTM和门控循环单元GRU)、图卷积网络(GCN)以及自注意力机制,现代预测方法在捕捉时空依赖性方面显示出显著的潜力。这些方法为OD预测提供了良好的基础,尤其是在处理大规模网络和复杂的时空关系方面。In the early stage of OD prediction technology, the focus was on using traditional time series models to capture temporal features, but these models have limited effect when faced with complex nonlinear spatiotemporal dependencies. With the rapid development of deep neural networks, such as convolutional neural networks (CNN), recurrent neural networks (RNN, including long short-term memory networks LSTM and gated recurrent units GRU), graph convolutional networks (GCN), and self-attention mechanisms, modern prediction methods have shown significant potential in capturing spatiotemporal dependencies. These methods provide a good foundation for OD prediction, especially in dealing with large-scale networks and complex spatiotemporal relationships.

然而,尽管这些方法在日常运营中表现良好,但在突发事件发生时,由于对复杂的非线性时空依赖性捕捉不足,预测准确性大幅降低。此外,这些方法在适应紧急情况下的乘客流变化方面也面临诸多挑战。However, although these methods perform well in daily operations, their prediction accuracy is greatly reduced when emergencies occur due to insufficient capture of complex nonlinear spatiotemporal dependencies. In addition, these methods also face many challenges in adapting to changes in passenger flow during emergencies.

因此,本案提出一种能够在紧急情况下准确预测OD流量的新方法,用于解决事件期间短期OD流量预测的挑战,对于提升城市轨道交通系统的应急响应能力和整体安全性具有重要意义。本案方法能够处理高维度和稀疏的数据,同时能够适应不同的运营条件和乘客行为模式,以提供更准确、更实时的交通流量预测。Therefore, this case proposes a new method that can accurately predict OD flow in emergency situations, which is used to solve the challenge of short-term OD flow prediction during events, and is of great significance for improving the emergency response capability and overall safety of urban rail transit systems. This method can handle high-dimensional and sparse data, and can adapt to different operating conditions and passenger behavior patterns to provide more accurate and real-time traffic flow predictions.

下面将结合附图,对本案技术方案如何实施进行清楚、完整地描述,显然,所描述的实施方式仅仅是本案的一部分实施方式,而不是全部的实施方式。基于本案中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本申请保护的范围。The following will be combined with the accompanying drawings to clearly and completely describe how to implement the technical solution of this case. Obviously, the described implementation method is only a part of the implementation method of this case, not all of the implementation methods. Based on the implementation method in this case, all other implementation methods obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

(一)预测模型概述1. Overview of prediction model

首先将数据延迟可用性问题、天气因素、时间因素以及地铁事故造成的影响进行客观量化表示,有利于将外部特征带来的不稳定变化因素的影响进行全面评估,特别是在非高峰时期。并通过事故矩阵,以适应紧急情况下的乘客行为变化,从而提高模型在预测事故期间的准确性和稳定性。具体如下。First, the impact of data delay availability, weather factors, time factors, and subway accidents is objectively quantified, which is conducive to a comprehensive assessment of the impact of unstable change factors brought by external characteristics, especially during non-peak hours. And through the accident matrix, it can adapt to the changes in passenger behavior in emergency situations, thereby improving the accuracy and stability of the model during the prediction of accidents. The details are as follows.

①针对数据延迟可用性问题,引入了使用天作为粒度的历史OD窗口ODd,t∈RN×N并结合进站乘客量TId,t∈RN① To address the data delay availability issue, a historical OD window ODd, tRN×N with day as the granularity is introduced and combined with the inbound passenger volume TId, tRN .

②针对天气因素,使用四个连续变量:实时温度、降水量、相对湿度和风速,用Wd,t∈RN×4来表示天气因素。② For weather factors, four continuous variables are used: real-time temperature, precipitation, relative humidity and wind speed, and Wd, tRN×4 is used to represent weather factors.

③针对时间因素,运用三角函数将特征映射到一个圆上,以有效地反映了时间的周期性,比如将时间周期信息表示为其中,p为时间索引,P表示一个周期内的总时间窗口步长。③ 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.

④针对地铁事故造成的影响:到达迟延(Arriving Late,AL)(比如列车延迟大于5分钟,则认为到达延迟)、清空列车(Emptying the Train,ET)和停止发车(stoppingdeparture,SD),将三种事故分别采用矩阵ALd,t∈RN×N、ETd,t∈RN×N和SDd,t∈RN×N表示,经整合获得最终的在某d天的时间间隔t内的事故矩阵Id,t∈RN×N×3,矩阵中的每个元素表示出现对应事故的列车数。④ Regarding the impact caused by 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 types of accidents are represented by matrices ALd, t ∈RN×N , ETd, t ∈RN×N and SDd, t ∈RN×N respectively. After integration, the final accident matrix Id, t ∈RN×N×3 within a time interval t of a certain d days is obtained. Each element in the matrix represents the number of trains with the corresponding accident.

基于此,可将事故状态下轨道交通短时OD客流预测问题表达如下所示。Based on this, the short-term OD passenger flow prediction problem of rail transit under accident conditions can be expressed as follows.

h1=1,2,…,T1;h2=1,2,…,T2h1 =1, 2,..., T1 ; h2 =1, 2,..., T2

上述的三个事故矩阵ALd,t∈RN×N、ETd,t∈RN×N和SDd,t∈RN×N,一种获取方法为:基于包含N个站点的轨道网络图G,事故区间El,事故起止时间Ts~Te,事故发生时AL,ET和SD的值:d1,d2和d3,n为时间序列长度,采用基于网络图G的最短路径算法,生成事故矩阵。其中:d1,d2和d3分别表示到晚(AL),清人(ET),停运(SD)的列车数。前述获取方法具体参见下表2所示伪代码实现过程。The three accident matrices ALd, tRN×N , ETd, tRN×N and SDd, tRN×N mentioned above can be obtained by using the following method: based on the track network graph G containing N stations, the accident intervalEl , the start and end time of the accidentTs ~Te , the values of AL, ET and SD when the accident occurs:d1 ,d2 andd3 , n is the length of the time series, and the shortest path algorithm based on the network graph G is used to generate the accident matrix. Among them:d1 ,d2 andd3 represent the number of trains that are late (AL), cleared (ET) and suspended (SD) respectively. For the above acquisition method, please refer to the pseudo code implementation process shown in Table 2 below.

表2Table 2

(二)模型结构框架(II) Model structure framework

如图1所示,模型包括五个模块:HOD编码器(Historical OD Encoder,HODEncoder,历史编码器)、基于注意力机制的局部连接图卷积网络(Attention-based LocalConnection Graph Convolutional Network,ALC-GCN)、特征提取层、线性解码器和掩码损失函数。采用编码器-解码器架构,框架从HOD编码器开始,学习关键的历史OD特征。基于注意力机制的局部连接图卷积网络结合网络图知识,采用时空图卷积来捕捉实时进站乘客量特征,解决实时信息缺失的问题。外部因素和事故矩阵通过特征提取层进行整合,允许对编码向量进行调整。随后,线性解码器解码压缩信息,计算掩码损失函数,强调事故期间的大流量,减轻短期OD矩阵的稀疏性问题。As shown in Figure 1, the model consists of five modules: HOD encoder (Historical OD Encoder, HODEncoder, Historical Encoder), Attention-based Local Connection Graph Convolutional Network (ALC-GCN), feature extraction layer, linear decoder and mask loss function. Using 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 inbound passenger volume characteristics to solve the problem of missing real-time information. External factors and accident matrices are integrated through feature extraction layers, allowing the encoding vector to be adjusted. Subsequently, the linear decoder decodes the compressed information and calculates the mask loss function, emphasizing the large flow during the accident and alleviating the sparsity problem of the short-term OD matrix.

(I)HOD编码器(I)HOD encoder

HOD编码器用于提取历史交通信息,其通过从历史OD流中提取特征,并结合CNN、LSTM和自注意力机制来揭示高维历史OD流信息。HOD编码器以LSTM结构作为基础,辅以卷积操作来处理时间OD矩阵数据。进一步地,通过引入自我注意机制,增强了模型捕捉长期依赖性和提高泛化能力的能力。其中,LSTM管道结构内的单元(参见图2),控制它们行为的公式如下: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 uses 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 capabilities is enhanced. Among them, the units in the LSTM pipeline structure (see Figure 2) control their behavior as follows:

it=σ(WXi*ODt+Whi*Ht-1+bi) (1)it =σ(WXi *ODt +Whi *Ht-1 +bi ) (1)

ft=σ(WXf*ODt+Whf*Ht-1+bf) (2)ft =σ(WXf *ODt +Whf *Ht-1 +bf ) (2)

ot=σ(WXo*ODt+Who*Ht-1+bo) (4)ot =σ(WXo *ODt +Who *Ht-1 +bo ) (4)

i′t=σ(WMi′*M+Wh′i′*Ht+bi′) (6)i′t =σ(WMi′ *M+Wh′i′ *Ht +bi′ ) (6)

g′t=tanh(WMg′*M+Wh′g′*Ht+bg′) (7)g′t =tanh(WMg′ *M+Wh′g′ *Ht +bg′ ) (7)

o′t=σ(WMo′*M+Wh′o′*Ht+bo′) (9)o′t =σ(WMo′ *M+Wh′o′ *Ht +bo′ ) (9)

M=WM[SA(Ht);SA(C′t-1)] (11)M=WM [SA (Ht ); SA (C′t-1 )] (11)

上述SA表示自注意力操作(参见图3所示)。值得注意的是,在自注意力操作中的q(查询)参数在Ht和(C′t-1)之间共享,有助于防止过拟合。The aboveSA represents the self-attention operation (see Figure 3). It is worth noting that the q (query) parameter in the self-attention operation is shared betweenHt and (C′t-1 ), which helps prevent overfitting.

(II)基于注意力的局部连接图卷积网络(II) Attention-based Locally Connected Graph Convolutional Network

基于注意力的局部连接图卷积网络用于捕捉最近的实时进站乘客量特征,如图3所示,其输入为经过N_layer层输出XGCN,N_layer为一个超参数,可通过训练确定。The attention-based local connection graph convolutional network is used to capture the recent real-time inbound passenger volume characteristics, as shown in Figure 3. Its input is After the N_layer layer, the output is XGCN , where N_layer is a hyperparameter that can be determined through training.

基于注意力的局部连接图卷积网络包括时空注意力模块、局部连接图卷积模块、卷积模块。其中,时空注意力模块采用基于关系的注意力机制,整合时间和空间注意力组件,动态地为每个车站的进站乘客量分配重要性分数,帮助模块集中地关注输入数据中的关键信息,有助于提高模型的性能和准确性。而局部连接图卷积模块使用切比雪夫多项式作为图卷积的核,通过跳跃连接基于网络车站实时乘客量之间的长期交互来捕捉实时进站乘客量特征,并通过与卷积模块获得的实时乘客量进行融合,解决实时信息缺失的问题。The attention-based local connection graph convolution network includes a spatiotemporal attention module, a local connection graph convolution module, and a convolution module. Among them, the spatiotemporal attention module adopts a relationship-based attention mechanism, integrates the time and space attention components, and dynamically assigns importance scores to the number of passengers entering each station, helping the module to focus on the key information in the input data, which helps to improve the performance and accuracy of the model. The local connection graph convolution module uses Chebyshev polynomials as the kernel of the graph convolution, and captures the real-time passenger volume characteristics based on the long-term interaction between the real-time passenger volume of network stations through jump connections, and solves the problem of missing real-time information by fusing it with the real-time passenger volume obtained by the convolution module.

其中,在GCN块中,为了解决邻近站点之间的信息是“间歇性”的这个问题,并捕捉轨道交通网络的“局部连接”关系。通过设定一个阈值ODref,并假设当两个车站之间的乘客量强度低于这个值时,它们之间缺乏连通性信息。邻接矩阵Aij的修正定义如下:Among them, in the GCN block, in order to solve the problem that the information between neighboring stations is "intermittent" and capture the "local connection" relationship of the rail transit network. By setting a threshold ODref and assuming that when the passenger volume intensity between two stations is lower than this value, there is a lack of connectivity information between them. The modified definition of the adjacency matrix Aij is as follows:

ODref=Pv(ODobs) (13)ODref =Pv (ODobs ) (13)

基于注意力的局部连接图卷积网络中每一层的处理,可以表达为:The processing of each layer in the attention-based local connection graph convolutional network can be expressed as:

局部连接图卷积处理为:The local connection graph convolution process is:

SA为基于时间特征获取的空间特征,其为基于注意力的局部连接图卷积网络中的空间注意力矩阵,计算表达式为: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:

XSpace为空间注意力模块的输入。XSpace is the input of the spatial attention module.

从图3可以看出,空间注意力模块的输入是时间注意力模块输出和基于注意力的局部连接图卷积网络输入X(i-1)的融合输出,通过融合实现实时信息缺失的补偿。时间注意力模块的处理如下:As can be seen from Figure 3, the input of the spatial attention module is the fusion output of the temporal attention module output and the attention-based local connection graph convolution network input X(i-1) , and the compensation of real-time information loss is achieved through fusion. The processing of the temporal attention module is as follows:

XTime为时间注意力模块的输入。XTime is the input of the temporal attention module.

综上所述,本案将卷积长短期记忆单元与自注意力单元相结合,学习历史OD流的长程时空信息。它在依靠历史OD来捕获车站之间流动的关系的基础上,通过引入了一种改进的图卷积操作,以捕获重要的时空交互模式,补偿实时OD矩阵的缺失。In summary, this case combines the convolutional long short-term memory unit with the self-attention unit to learn the long-range spatiotemporal information of the historical OD flow. It relies on historical OD to capture the flow relationship between stations, and introduces an improved graph convolution operation to capture important spatiotemporal interaction patterns to compensate for the lack of real-time OD matrix.

(III)特征提取层(III) Feature Extraction Layer

特征提取层在进行信息解码之前,将车站交通、外部数据和事故情况结合起来。其中这些输入被引入一个全连接(FC)层,随后经过一个激活函数处理。该模块的最终输出表达如下:The feature extraction layer combines station traffic, external data, and accident conditions before decoding the information. These inputs are introduced into a fully connected (FC) layer and then processed by an activation function. The final output of this module is expressed as follows:

XFE=ReLU(FC([ReLU(FC([XGCN;XEXT]));Id,t])) (18)XFE =ReLU(FC([ReLU(FC([XGCN ;XEXT ]));Id,t ])) (18)

其中,XEXT=[Wd,t,tp],Among them, XEXT =[Wd, t , tp ],

通过结合天气和时间等外部特征,以全面评估不稳定变化因素的影响,特别是在非高峰时期。此外,事件矩阵理论的引入提高了捕获事件期间OD下降流的准确性。External features such as weather and time are combined to comprehensively evaluate the impact of unstable change factors, especially during off-peak periods. In addition, the introduction of event matrix theory improves the accuracy of capturing OD downwelling during events.

(IV)线性解码器(IV) Linear Decoder

线性解码器接收来自历史OD编码器和特征提取层的输入。使用线性解码器将多源信息转换成一个方阵,其维度对应于车站的数量。最终输出由下式给出:The linear decoder receives input from the historical OD encoder and the feature extraction layer. The multi-source information is converted into a square matrix with dimensions corresponding to the number of stations using the linear decoder. The final output is Given by:

(V)掩码损失函数(V) Mask loss function

在事故发生期间,优先预测高乘客量的行程对于提供增强服务至关重要。为了解决这些问题,通过采用掩蔽的方法,利用掩蔽损失函数有效屏蔽这些小OD流量的影响。掩蔽操作表达式如下:During an incident, prioritizing the prediction of trips with high passenger volume is crucial to provide enhanced services. To address these issues, a masking method is adopted to effectively mask the impact of these small OD flows using a masking loss function. The masking operation expression is as follows:

其中,mij∈Ym表示当真实矩阵的元素小于掩码阈值δ时,Ym∈RN×N对应的元素等于0。Among them, mij ∈Ym means that when the element of the real matrix is less than the mask threshold δ, the corresponding element of Ym ∈RN×N is equal to 0.

将所需的掩蔽操作和均方误差损失函数结合起来:Combine the required masking operation with the mean squared error loss function:

综上,本案提出了一种基于深度学习的事故状态下轨道交通短时起点-终点客流预测方法,通过采用图卷积网络和深度学习算法,能够有效地处理和分析稀疏数据,提高数据的利用率和预测的准确性。其次,创新性地利用实时刷卡数据以弥补实时OD矩阵数据不可用的限制。此外,通过结合ConvLSTM单元和自注意力机制,深入学习历史OD流量数据中的时空模式,从而理解不同地铁站之间的相互影响。然后,结合外部特征,如天气和时间,全面评估不稳定变化因素的影响,特别是在非高峰时期。并且,本发明引入“事故矩阵”以适应紧急情况下的乘客行为变化,从而提高模型在预测事故期间的准确性和稳定性。整体模型适应性强,可与短期交通预测领域的最新发展保持同步,能够解决现有方法的局限性。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, sparse data can be effectively processed and analyzed, and data utilization and prediction accuracy can be improved. Secondly, real-time card swiping data is innovatively used to make up for the limitation of unavailability of real-time OD matrix data. In addition, by combining ConvLSTM units and self-attention mechanisms, the spatiotemporal patterns in historical OD flow data are deeply studied 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 the prediction of accidents. The overall model is highly adaptable, can keep pace with the latest developments in the field of short-term traffic forecasting, and can address the limitations of existing methods.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本公开方法可实现为相应模块化的系统或装置。示例性地,在实现的系统中:所述系统使用深度学习模型进行城市轨道交通短时OD客流预测;所述深度学习模型包括历史OD编码器模块、基于注意力机制的局部连接图卷积网络模块、特征提取模块、解码器模块;其中:所述历史OD编码器模块,被配置用于获取历史OD客流量编码特征;所述基于注意力机制的局部连接图卷积网络模块,被配置用于获取当前实时进站客流特征;所述特征提取模块,被配置基于当前实时进站客流特征与多种因素特征,获取在多种因素下的实时进站客流特征;所述解码器模块,被配置基于历史OD客流量编码特征和在多种因素下的实时进站客流特征,进行城市轨道交通短时OD客流预测;其中:所述多种因素包括天气信息、时间周期信息以及事故信息。并且所述系统或装置可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本公开而言更多情况下,软件程序实现是更佳的实施方式。Through the description of the above embodiments, the technicians in the relevant field can clearly understand that the disclosed method can be implemented as a corresponding modular system or device. Exemplarily, in the implemented system: the system uses a deep learning model to predict the short-term OD passenger flow of 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 the historical OD passenger flow coding features; the local connection graph convolutional network module based on the attention mechanism is configured to obtain the current real-time inbound passenger flow features; 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 multiple factor features; the decoder module is configured to predict the short-term OD passenger flow of urban rail transit based on the historical OD passenger flow coding features and the real-time inbound passenger flow features under multiple factors; wherein: the multiple factors include weather information, time period information, and accident information. And the system or device can be implemented by means of software plus necessary general hardware, and of course, it can also 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 by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits, etc. However, for the present disclosure, software program implementation is a better implementation method in most cases.

尽管以上结合附图对本发明的实施方案进行了描述,但本发明并不局限于上述的具体实施方案和应用领域,上述的具体实施方案仅仅是示意性的、指导性的,而不是限制性的。本领域的普通技术人员在本说明书的启示下和在不脱离本发明权利要求所保护的范围的情况下,还可以做出很多种的形式,这些均属于本发明保护之列。Although the embodiments of the present invention are described above in conjunction with the accompanying drawings, the present invention is not limited to the above specific embodiments and application fields, and the above specific embodiments are only illustrative and instructive, rather than restrictive. A person of ordinary skill in the art can also make many forms under the guidance of this specification and without departing from the scope of protection of the claims of the present invention, all of which belong to the protection of the present invention.

Claims (8)

Translated fromChinese
1.一种考虑事故状态的城市轨道交通短时OD客流预测方法,其特征在于,所述方法步骤包括:1. A method for predicting short-term OD passenger flow of urban rail transit considering accident status, characterized in that the method steps include:利用包含 ConvLSTM 单元和 Self-Attention 单元的历史编码器从历史 OD 客流序列中获取历史 OD 客流量编码特征;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;基于历史OD客流量编码特征和在多种因素下的实时进站客流特征,利用线性解码器进行城市轨道交通短时OD客流预测输出;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;所述ConvLSTM单元,采用基于卷积的LSTM从历史OD客流量数据中获取初步历史OD客流量时序特征,所述基于卷积的LSTM在激活函数中将原来的乘法运算改用卷积;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;所述Self-Attention单元,通过采用聚合注意力和特征融合操作,基于初步历史OD客流量时序特征获得深度历史OD客流量时序特征。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.根据权利要求1所述的方法,其特征在于,所述ConvLSTM单元,计算包括:2. The method according to claim 1, characterized in that the ConvLSTM unit calculates:式中:为ConvLSTM单元输入门的输出,为将值压缩到(0,1)的激活函数,双曲正切函数tanh作为激活函数将值压缩到(-1,1),为ConvLSTM单元遗忘门的输出,为ConvLSTM单元更新的状态,为ConvLSTM单元输出门的输出,为ConvLSTM单元当前时间步的隐藏状态,为时间间隔t内的乘客量,为ConvLSTM单元输入门OD矩阵的可学习权重,为ConvLSTM单元输入门上一层隐藏状态的可学习权重,为ConvLSTM单元输入门的偏置项,为ConvLSTM单元遗忘门OD矩阵的可学习权重,为ConvLSTM单元遗忘门上一层隐藏状态的可学习权重,为ConvLSTM单元遗忘门的偏置项, ConvLSTM单元更新状态OD矩阵的可学习权重, ConvLSTM单元更新状态上一层隐藏状态的可学习权重,为ConvLSTM单元更新状态的偏置项,为ConvLSTM单元输出门OD矩阵的可学习权重,为ConvLSTM单元输出门上一层隐藏状态的可学习权重,为ConvLSTM单元同步门的偏置项,为卷积操作,为哈达马德积。Where: is the output of the ConvLSTM unit input gate, As an activation function that compresses the value to (0,1), the hyperbolic tangent function tanh is used as an activation function to compress the value to (-1,1). is the output of the forget gate of the ConvLSTM unit, is the updated state of 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.根据权利要求1所述的方法,其特征在,所述Self-Attention单元,计算包括:3. The method according to claim 1, wherein the Self-Attention unit calculates:式中:为Self-Attention单元输入门的输出,为Self-Attention单元融合门的输出,为Self-Attention单元更新的状态,为Self-Attention单元输出门的输出,为Self-Attention单元当前时间步的隐藏状态, 为Self-Attention单元输入门自注意力矩阵的可学习权重,为Self-Attention单元输入门ConvLSTM隐藏状态的可学习权重,为通过连接操作获得的聚合注意力,为ConvLSTM单元当前时间步的隐藏状态,为Self-Attention单元输入门的偏置项,为Self-Attention单元融合门自注意力矩阵的可学习权重,为Self-Attention单元融合门ConvLSTM隐藏状态的可学习权重,为Self-Attention单元融合门的偏置项,为Self-Attention单元输出门自注意力矩阵的可学习权重,为Self-Attention单元输出门ConvLSTM隐藏状态的可学习权重,为Self-Attention单元同步门的偏置项,为将值压缩到(0,1)的激活函数,双曲正切函数tanh作为激活函数将值压缩到(-1,1),为卷积操作,为哈达马德积,表示自注意力操作,表示连接操作。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 an activation function that compresses the value to (0,1), the hyperbolic tangent function tanh is used as an 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.根据权利要求1所述的方法,其特征在于:4. The method according to claim 1, characterized in that:所述轨道交通网基于历史OD客流量获取,并通过设定阈值来判断两个车站之间的连通性,其邻接矩阵定义如下: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:其中:为设定的OD客流阈值,为训练集中所有时间段观测到的OD流量的百分位数,为从车站到车站的客流量。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.根据权利要求1所述的方法,其特征在于,所述基于注意力的局部连接图卷积网络具有多层,每层的处理为: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:式中:LN规范化操作函数,ReLU为激活函数,为基于注意力的局部连接图卷积网络中的图卷积可学习权重,为第i个基于注意力的局部连接图卷积网络块的输出,为基于注意力的局部连接图卷积网络中的残差连接可学习权重,为图卷积网络的核过滤器,为图卷积操作,其中:Where: LN is the normalization function, ReLU is the activation function, Learnable weights for graph convolution 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:其中:为K阶切比雪夫多项式,等于2倍的拉普拉斯矩阵L除以拉普拉斯矩阵L最大的特征值再减去单位矩阵,为可学习的切比雪夫多项式的系数,为哈达马德积,为空间注意力模块输出的空间特征;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.根据权利要求1所述的方法,其特征在于,所述城市轨道交通短时OD客流预测,一种实现方式为:6. The method according to claim 1 is characterized in that the short-term OD passenger flow prediction of urban rail transit is implemented in the following manner:式中:为城市轨道交通短时OD客流预测值,为哈达马德积,为历史OD客流量编码特征的权重,为历史OD客流量编码特征,为在多种因素下的实时进站客流特征的权重,为在多种因素下的实时进站客流特征。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.一种城市轨道交通短时OD客流预测系统,其特征在于:7. A short-term OD passenger flow prediction system for urban rail transit, characterized by:所述系统使用深度学习模型进行城市轨道交通短时OD客流预测;The system uses a deep learning model to predict short-term OD passenger flow in urban rail transit;所述深度学习模型包括历史OD编码器模块、基于注意力机制的局部连接图卷积网络模块、特征提取模块、线性解码器模块;其中: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:所述历史OD编码器模块,包含 ConvLSTM 单元和 Self-Attention 单元,所述历史OD编码器模块被配置用于从历史 OD 客流序列中获取历史OD客流量编码特征;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 encoding 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;所述线性解码器模块,被配置基于历史OD客流量编码特征和在多种因素下的实时进站客流特征,进行城市轨道交通短时OD客流预测输出;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;所述ConvLSTM单元,采用基于卷积的LSTM从历史OD客流量数据中获取初步历史OD客流量时序特征,所述基于卷积的LSTM在激活函数中将原来的乘法运算改用卷积;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;所述Self-Attention单元,通过采用聚合注意力和特征融合操作,基于初步历史OD客流量时序特征获得深度历史OD客流量时序特征;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.根据权利要求7所述的系统,其特征在于,掩码损失计算如下:8. The system according to claim 7, characterized in that the mask loss The calculation is as follows:式中:为时间间隔总数,t为时间间隔序号,N为站点数,Y为城市轨道交通短时OD客流真实值,为城市轨道交通短时OD客流预测值,为哈达马德积;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 Hadamad;为定义的二元变量,设定的掩码阈值,表示在第天在第t个时间间隔内从车站到车站的客流量,表示当真实矩阵的元素小于掩码阈值时,对应的元素等于0,为实数域。 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.
CN202410396910.XA2024-04-022024-04-02 Urban rail transit short-term OD passenger flow prediction method and system considering accident statusActiveCN118297419B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202410396910.XACN118297419B (en)2024-04-022024-04-02 Urban rail transit short-term OD passenger flow prediction method and system considering accident status

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202410396910.XACN118297419B (en)2024-04-022024-04-02 Urban rail transit short-term OD passenger flow prediction method and system considering accident status

Publications (2)

Publication NumberPublication Date
CN118297419A CN118297419A (en)2024-07-05
CN118297419Btrue CN118297419B (en)2024-10-01

Family

ID=91675819

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202410396910.XAActiveCN118297419B (en)2024-04-022024-04-02 Urban rail transit short-term OD passenger flow prediction method and system considering accident status

Country Status (1)

CountryLink
CN (1)CN118297419B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112801355A (en)*2021-01-202021-05-14南京航空航天大学Data prediction method based on multi-graph fusion space-time attention of long-short-term space-time data
CN115081717A (en)*2022-06-272022-09-20北京建筑大学 A Rail Transit Passenger Flow Prediction Method Integrating Attention Mechanism and Graph Neural Network

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US9147297B2 (en)*2012-03-142015-09-29Flextronics Ap, LlcInfotainment system based on user profile
US9411925B2 (en)*2014-04-142016-08-09Lenovo Enterprise Solutions (Singapore) Pte. Ltd.Simultaneously viewing multi paired schematic and layout windows on printed circuit board (PCB) design software and tools
CN110751586A (en)*2019-02-212020-02-04北京嘀嘀无限科技发展有限公司Order travel abnormity identification method and system
CN110866649B (en)*2019-11-192022-09-20中国科学院深圳先进技术研究院Method and system for predicting short-term subway passenger flow and electronic equipment
CN110991775B (en)*2020-03-022020-06-26北京全路通信信号研究设计院集团有限公司Deep learning-based rail transit passenger flow demand prediction method and device
CN115034496A (en)*2022-06-272022-09-09北京交通大学 Short-term passenger flow prediction method for urban rail transit holidays based on GCN-Transformer
CN115146844A (en)*2022-06-272022-10-04北京交通大学 A collaborative prediction method for short-term passenger flow in multi-modal traffic based on multi-task learning
CN116432808A (en)*2022-12-232023-07-14北京交通大学 A network-level multi-modal traffic short-term passenger flow prediction method based on deep learning
CN116128122B (en)*2023-01-032023-09-12北京交通大学Urban rail transit short-time passenger flow prediction method considering burst factors
CN116935649A (en)*2023-08-092023-10-24中国矿业大学 Multi-view fusion spatio-temporal dynamic graph convolution network urban traffic flow prediction method
CN117494864A (en)*2023-08-252024-02-02江西理工大学 A short-term passenger flow prediction method for urban rail transit based on RSALGCN
CN117593878B (en)*2023-10-172024-12-20北京交通大学 A method for predicting short-term OD demand of urban rail transit under emergencies
CN117641005A (en)*2023-12-012024-03-01北京字跳网络技术有限公司 A flow prediction method, device, equipment and medium for multimedia files

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112801355A (en)*2021-01-202021-05-14南京航空航天大学Data prediction method based on multi-graph fusion space-time attention of long-short-term space-time data
CN115081717A (en)*2022-06-272022-09-20北京建筑大学 A Rail Transit Passenger Flow Prediction Method Integrating Attention Mechanism and Graph Neural Network

Also Published As

Publication numberPublication date
CN118297419A (en)2024-07-05

Similar Documents

PublicationPublication DateTitle
CN112990536B (en)Bus arrival time prediction method based on quantile convolution network
CN112417753B (en)Urban public transport resource-based joint scheduling method
CN116090602A (en)Power load prediction method and system
CN113762338A (en) A traffic flow prediction method, device and medium based on multi-graph attention mechanism
CN116307152A (en) A Spatiotemporal Interactive Dynamic Graph Attention Network for Traffic Prediction
CN115423189A (en) A rail transit passenger flow prediction model and method based on an adaptive graph convolutional neural network combined with an attention mechanism
CN114493034A (en)Space-time global semantic representation learning method for regional flow prediction
CN113345236A (en)Time-space traffic state prediction method based on Transformer network
CN118865676A (en) A traffic flow prediction method, device and storage medium based on gated spatiotemporal fusion Transformer
CN118154240A (en) A method for predicting online car-hailing demand based on Transformer and generative adversarial network
Liu et al.A MRT daily passenger flow prediction model with different combinations of influential factors
CN118297419B (en) Urban rail transit short-term OD passenger flow prediction method and system considering accident status
Wang et al.The prediction of flow in railway station based on RRC-STGCN
CN118487264A (en) Electric vehicle charging station load forecasting method and system based on multi-source feature fusion
CN118171776A (en) A method and system for predicting the sharing rate of multiple transportation modes in a comprehensive transportation hub
CN116682056A (en)Multi-mode crowd density prediction method based on time convolution network
CN117744866A (en) A building energy consumption and carbon emission prediction method based on the Informer model
CN113159409B (en)National city air quality prediction method based on group perception map neural network
Zhou et al.Research on Metro Transportation Flow Prediction Based on the STL-GRU Combined Model
Lei et al.A comparison study of short-term passenger flow forecast model of rail transit
He et al.Short-term inbound passenger flow prediction for urban rail transit by integrating spatiotemporal features
Gu et al.Daily OD Demand Prediction in Urban Metro Transit System: A Convolutional LSTM Neural Network with Multi-factor Fusion Channel-wise Attention
Wang et al.Multi-point short-term passenger flow prediction in the station based on temporal multi-graph convolutional network
CN111144696A (en) A big data-based rail transit data analysis method
CN118644988B (en)Distributed traffic flow prediction method based on cloud edge cooperative training

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp