[go: up one dir, main page]

CN115620524A - A traffic jam prediction method, system, device and storage medium - Google Patents

A traffic jam prediction method, system, device and storage medium Download PDF

Info

Publication number
CN115620524A
CN115620524A CN202211612325.6A CN202211612325A CN115620524A CN 115620524 A CN115620524 A CN 115620524A CN 202211612325 A CN202211612325 A CN 202211612325A CN 115620524 A CN115620524 A CN 115620524A
Authority
CN
China
Prior art keywords
data
traffic
congestion
feature
event data
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.)
Granted
Application number
CN202211612325.6A
Other languages
Chinese (zh)
Other versions
CN115620524B (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.)
Central South University
Original Assignee
Central South 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 Central South University filed Critical Central South University
Priority to CN202211612325.6A priority Critical patent/CN115620524B/en
Publication of CN115620524A publication Critical patent/CN115620524A/en
Application granted granted Critical
Publication of CN115620524B publication Critical patent/CN115620524B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • G08G1/0133Traffic data processing for classifying traffic situation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Analytical Chemistry (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Chemical & Material Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Traffic Control Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a traffic jam prediction method, a system, equipment and a storage medium, wherein the method obtains traffic event data, jam event data and station flow data by obtaining a multi-source heterogeneous data set; extracting the space correlation characteristics among the congestion event data, the traffic event data and the traffic congestion to be predicted by adopting a convolutional neural network; extracting time dependency relationship characteristics of the station traffic processing data and the congestion through a characteristic extraction network; acquiring various factor data except traffic event data, congestion event data and station flow data, and performing multi-classification processing and single-hot coding processing on the various factor data to obtain various factor characteristics; and splicing the spatial correlation characteristic, the time dependency relationship characteristic and the multiple factor characteristics to obtain a space-time joint characteristic, and inputting the space-time joint characteristic into the multilayer perceptron model to obtain a prediction result of the traffic jam to be predicted. The invention can improve the accuracy of traffic jam prediction.

Description

一种交通拥堵预测方法、系统、设备及存储介质A traffic jam prediction method, system, device and storage medium

技术领域technical field

本发明涉及交通拥堵预测技术领域,尤其是涉及一种交通拥堵预测方法、系统、设备及存储介质。The present invention relates to the technical field of traffic jam prediction, in particular to a traffic jam prediction method, system, device and storage medium.

背景技术Background technique

交通拥堵问题一直是市民出行非常关注的问题,交通拥堵预测也是智能交通系统的重要研究领域。结合大数据,交通拥堵预测模型能够根据路况、站点流量、历史拥堵数据对未来的通行情况进行有效预测,从而指导市民出行、绕行、错峰出行。现有的研究方法主要包括基于统计学的方法、传统的机器学习方法和基于深度学习模型的方法,基于统计学的方法主要针对小数据集设计,不适合处理复杂动态的数据,并且无法捕获特征之间的关系;传统的机器学习方法,需要进行人工手动提取特征,无法提取复杂时空特征。The problem of traffic congestion has always been a matter of great concern to citizens, and traffic congestion prediction is also an important research field of intelligent transportation systems. Combined with big data, the traffic congestion prediction model can effectively predict future traffic conditions based on road conditions, site traffic, and historical congestion data, so as to guide citizens to travel, detour, and off-peak travel. Existing research methods mainly include methods based on statistics, traditional machine learning methods and methods based on deep learning models. The methods based on statistics are mainly designed for small data sets, which are not suitable for processing complex dynamic data and cannot capture features. The relationship between them; traditional machine learning methods require manual feature extraction and cannot extract complex spatiotemporal features.

在我国,将通行平均速度低于30km/h的高速路段视为拥堵路段,某APP提供的数据源表示在行驶速度低于30km/h时,会将拥堵数据上传云端,而在高于30km/h时,则没有相关拥堵数据的记录。拥堵事件由于数据不连续、拥堵长度难以计算、拥堵事件之间难以区分等特点,导致了拥堵预测相比其他交通流(如高速站点流量、高速路段行驶速度等)预测存在更大困难。In my country, expressway sections with an average speed lower than 30km/h are regarded as congested sections. The data source provided by an APP indicates that when the driving speed is lower than 30km/h, the congestion data will be uploaded to the cloud, while when the driving speed is higher than 30km/h h, there is no record of relevant congestion data. Congestion events are more difficult to predict than other traffic flows (such as high-speed site traffic, high-speed section speed, etc.) due to the characteristics of discontinuous data, difficult calculation of congestion length, and difficulty in distinguishing between congestion events.

发明内容Contents of the invention

本发明旨在至少解决现有技术中存在的技术问题之一。为此,本发明提出一种交通拥堵预测方法、系统、设备及存储介质,能够提高交通拥堵预测的精确度。The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the present invention proposes a traffic congestion prediction method, system, device and storage medium, which can improve the accuracy of traffic congestion prediction.

第一方面,本发明实施例提供了一种交通拥堵预测方法,所述交通拥堵预测方法包括:In a first aspect, an embodiment of the present invention provides a method for predicting traffic congestion, the method for predicting traffic congestion includes:

获取多源异构数据集,并从所述多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据;Obtain a multi-source heterogeneous data set, and obtain traffic event data, congestion event data and site flow data from the multi-source heterogeneous data set;

采用卷积神经网络提取所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征;Using a convolutional neural network to extract spatial correlation features between the congestion event data, the traffic event data and the traffic congestion to be predicted;

通过特征提取网络提取所述站点流量数据与拥堵的时间依赖关系特征;其中,所述特征提取网络由门控神经单元和注意力机制融合制成;Extracting the time-dependent relationship features of the site traffic data and congestion through a feature extraction network; wherein, the feature extraction network is made by fusing a gated neural unit and an attention mechanism;

从所述多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对所述多种因素数据进行多分类处理和独热编码处理,获得多种因素特征;Obtain multiple factor data from the multi-source heterogeneous data set except traffic event data, congestion event data and site traffic data, and perform multi-classification processing and one-hot encoding processing on the multiple factor data to obtain multiple a factor characteristic;

将所述空间相关性特征、所述时间依赖关系特征和所述多种因素特征进行拼接,获得时空联合特征,并将所述时空联合特征输入至多层感知机模型中,获得所述待预测的交通拥堵的预测结果。Splicing the spatial correlation feature, the temporal dependence feature and the multiple factor features to obtain the joint spatio-temporal feature, and inputting the joint spatio-temporal feature into the multi-layer perceptron model to obtain the predicted Traffic congestion prediction results.

与现有技术相比,本发明第一方面具有以下有益效果:Compared with the prior art, the first aspect of the present invention has the following beneficial effects:

本方法通过获取多源异构数据集,从多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据,通过获取多种数据集,从多方面考虑对交通拥堵进行预测,能够综合预测交通拥堵情况,从而提高交通拥堵预测的精确度;采用卷积神经网络提取拥堵事件数据、交通事件数据和待预测的交通拥堵之间的空间相关性特征,通过特征提取网络提取站点流量数据与拥堵的时间依赖关系特征;其中,特征提取网络由门控神经单元和注意力机制融合制成,从多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对多种因素数据进行二分类处理和独热编码处理,获得多种因素特征,通过不同的方式对不同的数据集进行特征提取,并且能捕获特征之间的关系,提高了特征提取的有效性;将空间相关性特征、时间依赖关系特征和多种因素特征进行拼接,获得时空联合特征,并将时空联合特征输入至多层感知机模型中,获得待预测的交通拥堵的预测结果,通过多种类型的特征综合预测交通拥堵情况,能够提高交通拥堵预测的精确度。This method obtains multi-source heterogeneous data sets, traffic event data, congestion event data and site flow data from multi-source heterogeneous data sets. Predict traffic congestion, thereby improving the accuracy of traffic congestion prediction; use convolutional neural network to extract spatial correlation features between congestion event data, traffic event data and traffic congestion to be predicted, and extract site traffic data and The time-dependent relationship features of congestion; among them, the feature extraction network is made by the fusion of gated neural units and attention mechanisms, and obtains a variety of data in addition to traffic event data, congestion event data and site traffic data from multi-source heterogeneous data sets. Factor data, and perform binary classification processing and one-hot encoding processing on multiple factor data to obtain multiple factor features, and extract features from different data sets in different ways, and can capture the relationship between features, improving the feature Effectiveness of extraction; splicing spatial correlation features, time-dependent relationship features, and multiple factor features to obtain joint spatio-temporal features, and input the joint spatio-temporal features into the multi-layer perceptron model to obtain the prediction result of traffic congestion to be predicted , predicting traffic congestion comprehensively through multiple types of features can improve the accuracy of traffic congestion prediction.

根据本发明的一些实施例,所述从所述多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据,包括:According to some embodiments of the present invention, the acquisition of traffic event data, congestion event data and site traffic data from the multi-source heterogeneous data set includes:

对所述多源异构数据集中的交通事件和拥堵事件进行独热编码处理,获取所述交通事件数据和所述拥堵事件数据,对所述多源异构数据集中的站点流量进行归一化处理,获取所述站点流量数据。performing one-hot encoding processing on the traffic events and congestion events in the multi-source heterogeneous data set, obtaining the traffic event data and the congestion event data, and normalizing the site traffic in the multi-source heterogeneous data set Processing, obtaining the site traffic data.

根据本发明的一些实施例,所述采用卷积神经网络提取所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征,包括:According to some embodiments of the present invention, the use of a convolutional neural network to extract spatial correlation features between the congestion event data, the traffic event data, and the traffic congestion to be predicted includes:

预设第一历史时间步长,获取所述预设第一历史时间步长内的地理位置相邻的第一数量的所述拥堵事件数据的历史数据和所述交通事件数据的历史数据;Preset the first historical time step, and acquire the historical data of the first quantity of the congestion event data and the historical data of the traffic event data that are geographically adjacent within the preset first historical time step;

将所述交通事件数据的历史数据和所述拥堵事件数据的历史数据进行拼接,获得拼接数据序列;Splicing the historical data of the traffic event data and the historical data of the congestion event data to obtain a spliced data sequence;

将所述拼接数据序列输入至所述卷积神经网络中,获得所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征。The concatenated data sequence is input into the convolutional neural network to obtain spatial correlation features between the congestion event data, the traffic event data, and the traffic congestion to be predicted.

根据本发明的一些实施例,所述将所述拼接数据序列输入至所述卷积神经网络中,获得所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征,包括:According to some embodiments of the present invention, the splicing data sequence is input into the convolutional neural network to obtain the spatial correlation between the congestion event data, the traffic event data and the traffic congestion to be predicted features, including:

将所述拼接数据序列输入至所述卷积神经网络中,通过卷积层和池化层处理所述拼接数据序列:The spliced data sequence is input into the convolutional neural network, and the spliced data sequence is processed by a convolutional layer and a pooling layer:

Figure 68966DEST_PATH_IMAGE001
Figure 68966DEST_PATH_IMAGE001

其中,

Figure 249412DEST_PATH_IMAGE002
Figure 458807DEST_PATH_IMAGE003
表示卷积层的输出,E表示所述拼接数据序列,
Figure 800927DEST_PATH_IMAGE004
Figure 977830DEST_PATH_IMAGE005
表 示权重矩阵,
Figure 493125DEST_PATH_IMAGE006
Figure 947241DEST_PATH_IMAGE007
Figure 102672DEST_PATH_IMAGE008
Figure 376658DEST_PATH_IMAGE009
表示偏差矩阵,ReLU表示激活函数,
Figure 23540DEST_PATH_IMAGE010
表示最大函数 值,
Figure 128900DEST_PATH_IMAGE011
Figure 78401DEST_PATH_IMAGE012
表示池化层的输出,
Figure 715050DEST_PATH_IMAGE013
表示卷积运算;in,
Figure 249412DEST_PATH_IMAGE002
and
Figure 458807DEST_PATH_IMAGE003
Represents the output of the convolutional layer, E represents the spliced data sequence,
Figure 800927DEST_PATH_IMAGE004
and
Figure 977830DEST_PATH_IMAGE005
represents the weight matrix,
Figure 493125DEST_PATH_IMAGE006
,
Figure 947241DEST_PATH_IMAGE007
,
Figure 102672DEST_PATH_IMAGE008
and
Figure 376658DEST_PATH_IMAGE009
Represents the bias matrix, ReLU represents the activation function,
Figure 23540DEST_PATH_IMAGE010
represents the maximum function value,
Figure 128900DEST_PATH_IMAGE011
and
Figure 78401DEST_PATH_IMAGE012
Represents the output of the pooling layer,
Figure 715050DEST_PATH_IMAGE013
Indicates the convolution operation;

在所述卷积层和所述池化层处理所述拼接数据序列后,将

Figure 775410DEST_PATH_IMAGE012
输入至全连接层,获 得所述空间相关性特征,所述空间相关性特征表示为: After the convolutional layer and the pooling layer process the spliced data sequence, the
Figure 775410DEST_PATH_IMAGE012
Input to the fully connected layer to obtain the spatial correlation feature, the spatial correlation feature is expressed as:

Figure 63172DEST_PATH_IMAGE014
Figure 63172DEST_PATH_IMAGE014

其中,

Figure 980312DEST_PATH_IMAGE015
表示在t时刻的所述拥堵事件数据、所述交通事件数据和所述待预测的 交通拥堵之间的空间相关性特征,
Figure 494470DEST_PATH_IMAGE016
表示权重矩阵,
Figure 466843DEST_PATH_IMAGE017
表示偏差矩阵。 in,
Figure 980312DEST_PATH_IMAGE015
Representing the spatial correlation feature between the congestion event data, the traffic event data and the traffic congestion to be predicted at time t,
Figure 494470DEST_PATH_IMAGE016
represents the weight matrix,
Figure 466843DEST_PATH_IMAGE017
represents the bias matrix.

根据本发明的一些实施例,所述通过特征提取网络提取所述站点流量数据与拥堵的时间依赖关系特征,包括:According to some embodiments of the present invention, the extraction of time-dependent relationship features between the site traffic data and congestion through the feature extraction network includes:

预设第二历史时间步长,获取所述第二历史时间步长内的地理位置排名靠前的第二数量的入站站点流量数据和出站站点流量数据;Preset a second historical time step, and obtain a second quantity of inbound site traffic data and outbound site traffic data of the top geographical locations within the second historical time step;

将所述入站站点流量数据和所述出站站点流量数据进行拼接,获得拼接站点流量数据;Splicing the inbound site traffic data and the outbound site traffic data to obtain spliced site traffic data;

将所述拼接站点流量数据输入至所述门控神经单元中,获得第一向量,所述门控 神经单元第t步输出的第一向量

Figure 484477DEST_PATH_IMAGE018
表示为: Input the splicing site traffic data into the gated neural unit to obtain a first vector, the first vector output by the gated neural unit in step t
Figure 484477DEST_PATH_IMAGE018
Expressed as:

Figure 838098DEST_PATH_IMAGE019
Figure 838098DEST_PATH_IMAGE019

其中,

Figure 698607DEST_PATH_IMAGE020
表示第t-1步的拼接站点流量数据,
Figure 366349DEST_PATH_IMAGE021
表示第t步的拼接站点流量数 据,GRU表示门控神经单元; in,
Figure 698607DEST_PATH_IMAGE020
Indicates the splicing site traffic data of step t-1,
Figure 366349DEST_PATH_IMAGE021
Represents the splicing site traffic data of step t, and GRU represents the gated neural unit;

将所述第一向量输入至所述注意力机制中,获得第二向量,所述注意力机制计算公式为:The first vector is input into the attention mechanism to obtain a second vector, and the calculation formula of the attention mechanism is:

Figure 848277DEST_PATH_IMAGE022
Figure 848277DEST_PATH_IMAGE022

其中,

Figure 576061DEST_PATH_IMAGE023
表示在t时刻由所述门控神经单元输出向量
Figure 595970DEST_PATH_IMAGE018
的注意力分布值,
Figure 926457DEST_PATH_IMAGE024
Figure 918684DEST_PATH_IMAGE025
表示权重系数,
Figure 928622DEST_PATH_IMAGE026
表示偏差系数,
Figure 373509DEST_PATH_IMAGE027
表示在j时刻由所述门控神经单元输出向量
Figure 507688DEST_PATH_IMAGE018
的注意 力分布值,
Figure 620000DEST_PATH_IMAGE028
表示注意力权重,i表示总时间; in,
Figure 576061DEST_PATH_IMAGE023
Indicates the output vector by the gated neuron unit at time t
Figure 595970DEST_PATH_IMAGE018
The attention distribution value of
Figure 926457DEST_PATH_IMAGE024
and
Figure 918684DEST_PATH_IMAGE025
Indicates the weight coefficient,
Figure 928622DEST_PATH_IMAGE026
Indicates the coefficient of deviation,
Figure 373509DEST_PATH_IMAGE027
Indicates that the vector output by the gated neural unit at time j
Figure 507688DEST_PATH_IMAGE018
The attention distribution value of
Figure 620000DEST_PATH_IMAGE028
Represents the attention weight, i represents the total time;

将所述注意力机制输出的向量通过全连接层计算,获得所述时间依赖关系特征,所述全连接层计算公式为:The vector output by the attention mechanism is calculated through a fully connected layer to obtain the time-dependent relationship feature, and the fully connected layer calculation formula is:

Figure 299374DEST_PATH_IMAGE029
Figure 299374DEST_PATH_IMAGE029

其中,

Figure 497137DEST_PATH_IMAGE030
表示在t时刻的时间依赖关系特征,
Figure 169427DEST_PATH_IMAGE031
表示权重矩阵,
Figure 932984DEST_PATH_IMAGE032
表示偏差向 量,ReLU表示激活函数。 in,
Figure 497137DEST_PATH_IMAGE030
Indicates the time-dependent relationship feature at time t,
Figure 169427DEST_PATH_IMAGE031
represents the weight matrix,
Figure 932984DEST_PATH_IMAGE032
Represents the bias vector, and ReLU represents the activation function.

根据本发明的一些实施例,所述对所述多种因素数据进行多分类处理和独热编码处理,获得多种因素特征,包括:According to some embodiments of the present invention, the multi-category processing and one-hot encoding processing are performed on the multiple factor data to obtain multiple factor features, including:

若所述多源异构数据集中的所述多种因素数据为二分类变量,则将所述多种因素数据经过多分类处理表示为二分类0-1变量,获得二分类因素数据,并通过独热编码将所述二分类因素数据映射为多种因素特征;If the multiple factor data in the multi-source heterogeneous data set is a binary variable, then the multiple factor data is expressed as a binary 0-1 variable after multi-classification processing, and the binary factor data is obtained, and passed One-hot encoding maps the binary factor data to multiple factor features;

若所述多源异构数据集中的所述多种因素数据为多分类变量,则采用独热编码将所述多种因素数据映射为多种因素特征。If the multi-factor data in the multi-source heterogeneous data set is a multi-category variable, one-hot encoding is used to map the multi-factor data into multi-factor features.

根据本发明的一些实施例,所述将所述空间相关性特征、所述时间依赖关系特征和所述多种因素特征进行拼接,获得时空联合特征,并将所述时空联合特征输入至多层感知机模型中,获得所述待预测的交通拥堵的预测结果,包括:According to some embodiments of the present invention, the spatial correlation feature, the temporal dependency feature and the multiple factor features are concatenated to obtain a spatio-temporal joint feature, and the spatio-temporal joint feature is input to the multi-layer perception In the computer model, the prediction result of the traffic jam to be predicted is obtained, including:

将所述时空联合特征输入至多层感知机模型中,通过隐藏层和输出层计算获得交通拥堵预测结果,其中,所述隐藏层的计算包括:The joint feature of time and space is input into the multi-layer perceptron model, and the traffic congestion prediction result is obtained through the calculation of the hidden layer and the output layer, wherein the calculation of the hidden layer includes:

Figure 907893DEST_PATH_IMAGE033
Figure 907893DEST_PATH_IMAGE033

其中,

Figure 701274DEST_PATH_IMAGE034
表示在t时刻的所述空间相关性特征,
Figure 52621DEST_PATH_IMAGE035
表示在t时刻的时间依赖关系特 征,
Figure 998581DEST_PATH_IMAGE036
表示在t时刻的所述多种因素特征,
Figure 206708DEST_PATH_IMAGE037
表示拼接函数,
Figure 113484DEST_PATH_IMAGE038
表示所述时空 联合特征,
Figure 878309DEST_PATH_IMAGE039
表示所述隐藏层输出的特征向量,
Figure 554141DEST_PATH_IMAGE040
表示权重矩阵,
Figure 995487DEST_PATH_IMAGE041
表示偏差矩阵, ReLU表示激活函数,
Figure 186297DEST_PATH_IMAGE013
表示卷积运算; in,
Figure 701274DEST_PATH_IMAGE034
Represents the spatial correlation feature at time t,
Figure 52621DEST_PATH_IMAGE035
Indicates the time-dependent relationship feature at time t,
Figure 998581DEST_PATH_IMAGE036
Represents the characteristics of the various factors at time t,
Figure 206708DEST_PATH_IMAGE037
represents the concatenation function,
Figure 113484DEST_PATH_IMAGE038
represents the spatio-temporal joint feature,
Figure 878309DEST_PATH_IMAGE039
represents the feature vector output by the hidden layer,
Figure 554141DEST_PATH_IMAGE040
represents the weight matrix,
Figure 995487DEST_PATH_IMAGE041
Represents the bias matrix, ReLU represents the activation function,
Figure 186297DEST_PATH_IMAGE013
Indicates the convolution operation;

将所述隐藏层输出的特征向量输入至所述输出层,所述输出层的计算包括:The feature vector output by the hidden layer is input to the output layer, and the calculation of the output layer includes:

Figure 879446DEST_PATH_IMAGE042
Figure 879446DEST_PATH_IMAGE042

其中,

Figure 40476DEST_PATH_IMAGE043
表示t+1时刻的所述待预测的交通拥堵的预测结果,
Figure 793668DEST_PATH_IMAGE044
表示权重矩 阵,
Figure 534091DEST_PATH_IMAGE045
表示偏差矩阵,
Figure 765352DEST_PATH_IMAGE046
表示激活函数。 in,
Figure 40476DEST_PATH_IMAGE043
Indicates the prediction result of the traffic jam to be predicted at time t+1,
Figure 793668DEST_PATH_IMAGE044
represents the weight matrix,
Figure 534091DEST_PATH_IMAGE045
Denotes the bias matrix,
Figure 765352DEST_PATH_IMAGE046
represents the activation function.

第二方面,本发明实施例还提供了一种交通拥堵预测系统,所述交通拥堵预测系统包括:In the second aspect, the embodiment of the present invention also provides a traffic congestion prediction system, the traffic congestion prediction system comprising:

数据获取单元,用于获取多源异构数据集,并从所述多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据;A data acquisition unit, configured to acquire a multi-source heterogeneous data set, and acquire traffic event data, congestion event data and site flow data from the multi-source heterogeneous data set;

第一特征提取单元,用于采用卷积神经网络提取所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征;The first feature extraction unit is used to extract the spatial correlation features between the congestion event data, the traffic event data and the traffic congestion to be predicted by using a convolutional neural network;

第二特征提取单元,用于通过特征提取网络提取所述站点流量数据与拥堵的时间依赖关系特征;其中,所述特征提取网络由门控神经单元和注意力机制融合制成;The second feature extraction unit is used to extract the time-dependent relationship features between the site traffic data and congestion through a feature extraction network; wherein, the feature extraction network is made by fusing a gated neural unit and an attention mechanism;

第三特征提取单元,用于从所述多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对所述多种因素数据进行多分类处理和独热编码处理,获得多种因素特征;The third feature extraction unit is used to obtain multiple factor data except traffic event data, congestion event data and site flow data from the multi-source heterogeneous data set, and perform multi-classification processing on the multiple factor data and one-hot encoding processing to obtain multiple factor features;

预测结果获取单元,用于将所述空间相关性特征、所述时间依赖关系特征和所述多种因素特征进行拼接,获得时空联合特征,并将所述时空联合特征输入至多层感知机模型中,获得所述待预测的交通拥堵的预测结果。The prediction result acquisition unit is used to splice the spatial correlation feature, the time dependency feature and the multiple factor features to obtain the joint spatio-temporal feature, and input the joint spatio-temporal feature into the multi-layer perceptron model , to obtain the prediction result of the traffic congestion to be predicted.

第三方面,本发明实施例还提供了一种交通拥堵预测设备,包括至少一个控制处理器和用于与所述至少一个控制处理器通信连接的存储器;所述存储器存储有可被所述至少一个控制处理器执行的指令,所述指令被所述至少一个控制处理器执行,以使所述至少一个控制处理器能够执行如上所述的一种交通拥堵预测方法。In the third aspect, the embodiment of the present invention also provides a traffic jam prediction device, which includes at least one control processor and a memory for communicating with the at least one control processor; Instructions executed by a control processor, said instructions being executed by said at least one control processor, to enable said at least one control processor to perform a traffic congestion prediction method as described above.

第四方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行如上所述的一种交通拥堵预测方法。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make a computer perform one of the above-mentioned Traffic congestion prediction method.

可以理解的是,上述第二方面至第四方面与相关技术相比存在的有益效果与上述第一方面与相关技术相比存在的有益效果相同,可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that the beneficial effects of the above-mentioned second aspect to the fourth aspect compared with the related technology are the same as those of the above-mentioned first aspect compared with the related technology. Please refer to the relevant description in the above-mentioned first aspect. This will not be repeated here.

附图说明Description of drawings

本发明的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and comprehensible from the description of the embodiments in conjunction with the following drawings, wherein:

图1是本发明一实施例的一种交通拥堵预测方法的流程图;Fig. 1 is a flow chart of a kind of traffic jam prediction method of an embodiment of the present invention;

图2是本发明一实施例的一种交通拥堵预测系统的结构图。Fig. 2 is a structural diagram of a traffic jam prediction system according to an embodiment of the present invention.

具体实施方式detailed description

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

在本发明的描述中,如果有描述到第一、第二等只是用于区分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。In the description of the present invention, if the first, second, etc. are described only for the purpose of distinguishing technical features, it cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or implying Indicates the sequence of the indicated technical features.

在本发明的描述中,需要理解的是,涉及到方位描述,例如上、下等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。In the description of the present invention, it should be understood that when it comes to orientation descriptions, for example, the orientation or positional relationship indicated by up, down, etc. is based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description , rather than indicating or implying that the device or element referred to must have a particular orientation, be constructed and operate in a particular orientation, and thus should not be construed as limiting the invention.

本发明的描述中,需要说明的是,除非另有明确的限定,设置、安装、连接等词语应做广义理解,所属技术领域技术人员可以结合技术方案的具体内容合理确定上述词语在本发明中的具体含义。In the description of the present invention, it should be noted that, unless otherwise clearly defined, words such as setting, installation, and connection should be understood in a broad sense, and those skilled in the art can reasonably determine that the above words are included in the present invention in combination with the specific content of the technical solution. specific meaning.

首先,对本申请中涉及的若干名词进行解析:First, analyze some nouns involved in this application:

决策树:是一种用于分类和回归任务的非参数监督学习算法,它是一种分层树形结构,由根节点、分支、内部节点和叶节点组成。Decision tree: It is a non-parametric supervised learning algorithm for classification and regression tasks. It is a hierarchical tree structure consisting of root nodes, branches, internal nodes, and leaf nodes.

极端梯度提升树:是一种基于决策树的集成学习算法。Extreme Gradient Boosting Tree: is an ensemble learning algorithm based on decision trees.

随机森林:是一个包含多个决策树的分类器,并且其输出的类别是由个别树输出的类别的众数而定。Random Forest: It is a classifier that contains multiple decision trees, and its output category is determined by the mode of the category output by individual trees.

K-近邻算法:是一种用于分类和回归的非参数统计方法。K-nearest neighbor algorithm: is a non-parametric statistical method for classification and regression.

长短期记忆网络:是一种循环神经网络的变体,被广泛应用于时间序列预测的深度学习模型。Long short-term memory network: a variant of recurrent neural network, which is widely used in deep learning models for time series forecasting.

交通拥堵问题一直是市民出行非常关注的问题,交通拥堵预测也是智能交通系统的重要研究领域。结合大数据,交通拥堵预测模型能够根据路况、站点流量、历史拥堵数据对未来的通行情况进行有效预测,从而指导市民出行、绕行、错峰出行。现有的研究方法主要包括基于统计学的方法、传统的机器学习方法和基于深度学习模型的方法,基于统计学的方法主要针对小数据集设计,不适合处理复杂动态的数据,并且无法捕获特征之间的关系;传统的机器学习方法,需要进行人工手动提取特征,无法提取复杂时空特征。The problem of traffic congestion has always been a matter of great concern to citizens, and traffic congestion prediction is also an important research field of intelligent transportation systems. Combined with big data, the traffic congestion prediction model can effectively predict future traffic conditions based on road conditions, site traffic, and historical congestion data, so as to guide citizens to travel, detour, and off-peak travel. Existing research methods mainly include methods based on statistics, traditional machine learning methods and methods based on deep learning models. The methods based on statistics are mainly designed for small data sets, which are not suitable for processing complex dynamic data and cannot capture features. The relationship between them; traditional machine learning methods require manual feature extraction and cannot extract complex spatiotemporal features.

在我国,将通行平均速度低于30km/h的高速路段视为拥堵路段,某APP提供的数据源表示在行驶速度低于30km/h时,会将拥堵数据上传云端,而在高于30km/h时,则没有相关拥堵数据的记录。拥堵事件由于数据不连续、拥堵长度难以计算、拥堵事件之间难以区分等特点,导致了拥堵预测相比其他交通流(如高速站点流量、高速路段行驶速度等)预测存在更大困难。In my country, expressway sections with an average speed lower than 30km/h are regarded as congested sections. The data source provided by an APP indicates that when the driving speed is lower than 30km/h, the congestion data will be uploaded to the cloud, while when the driving speed is higher than 30km/h h, there is no record of relevant congestion data. Congestion events are more difficult to predict than other traffic flows (such as high-speed site traffic, high-speed section speed, etc.) due to the characteristics of discontinuous data, difficult calculation of congestion length, and difficulty in distinguishing between congestion events.

为解决上述问题,本发明通过获取多源异构数据集,从多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据,通过获取多种数据集,从多方面考虑对交通拥堵进行预测,能够综合预测交通拥堵情况,从而提高交通拥堵预测的精确度;采用卷积神经网络提取拥堵事件数据、交通事件数据和待预测的交通拥堵之间的空间相关性特征,通过特征提取网络提取站点流量数据与拥堵的时间依赖关系特征;其中,特征提取网络由门控神经单元和注意力机制融合制成,从多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对多种因素数据进行多分类处理和独热编码处理,获得多种因素特征,通过不同的方式对不同的数据集进行特征提取,并且能捕获特征之间的关系,提高了特征提取的有效性;将空间相关性特征、时间依赖关系特征和多种因素特征进行拼接,获得时空联合特征,并将时空联合特征输入至多层感知机模型中,获得待预测的交通拥堵的预测结果,通过多种类型的特征综合预测交通拥堵情况,能够提高交通拥堵预测的精确度。In order to solve the above-mentioned problems, the present invention acquires traffic event data, congestion event data and site traffic data from multi-source heterogeneous data sets by acquiring multi-source heterogeneous data sets, and considers traffic congestion from various aspects by acquiring multiple data sets. Forecasting can comprehensively predict traffic congestion, thereby improving the accuracy of traffic congestion prediction; using convolutional neural network to extract the spatial correlation features between congestion event data, traffic event data and traffic congestion to be predicted, through feature extraction network Extract the time-dependent relationship features between site traffic data and congestion; among them, the feature extraction network is made by the fusion of gated neural units and attention mechanisms, and obtains traffic event data, congestion event data and site traffic data from multi-source heterogeneous data sets Multiple factor data other than multi-factor data, and multi-category processing and one-hot encoding processing for multiple factor data, to obtain multiple factor features, feature extraction for different data sets in different ways, and can capture the relationship between features relationship, which improves the effectiveness of feature extraction; splicing spatial correlation features, time-dependent relationship features, and multiple factor features to obtain joint spatio-temporal features, and input the joint spatio-temporal features into the multi-layer perceptron model to obtain predictive The prediction results of traffic congestion can comprehensively predict traffic congestion through various types of features, which can improve the accuracy of traffic congestion prediction.

参照图1,本发明实施例提供了一种交通拥堵预测方法,本交通拥堵预测方法包括但不限于步骤S100至步骤S500:With reference to Fig. 1, the embodiment of the present invention provides a kind of traffic congestion prediction method, this traffic congestion prediction method includes but not limited to step S100 to step S500:

步骤S100、获取多源异构数据集,并从多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据;Step S100, obtaining multi-source heterogeneous data sets, and obtaining traffic event data, congestion event data and site flow data from the multi-source heterogeneous data sets;

步骤S200、采用卷积神经网络提取拥堵事件数据、交通事件数据和待预测的交通拥堵之间的空间相关性特征;Step S200, using a convolutional neural network to extract spatial correlation features between congestion event data, traffic event data, and traffic congestion to be predicted;

步骤S300、通过特征提取网络提取站点流量数据与拥堵的时间依赖关系特征;其中,特征提取网络由门控神经单元和注意力机制融合制成;Step S300, extracting time-dependent relationship features between site traffic data and congestion through a feature extraction network; wherein, the feature extraction network is made by fusing a gated neural unit and an attention mechanism;

步骤S400、从多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对多种因素数据进行多分类处理和独热编码处理,获得多种因素特征;Step S400, obtain multiple factor data from the multi-source heterogeneous data set except traffic event data, congestion event data and site traffic data, and perform multi-classification processing and one-hot encoding processing on the multiple factor data to obtain multiple factor characteristics;

步骤S500、将空间相关性特征、时间依赖关系特征和多种因素特征进行拼接,获得时空联合特征,并将时空联合特征输入至多层感知机模型中,获得待预测的交通拥堵的预测结果。Step S500, splicing spatial correlation features, time-dependent relationship features and multiple factor features to obtain joint spatio-temporal features, and input the joint spatio-temporal features into the multi-layer perceptron model to obtain the prediction result of traffic congestion to be predicted.

在一些实施例的步骤S100至步骤S500中,为了从多方面考虑对交通拥堵进行预测,综合预测交通拥堵情况,从而提高交通拥堵预测的精确度,通过获取多源异构数据集,从多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据;为了能捕获特征之间的关系,提高特征提取的有效性,通过采用卷积神经网络提取拥堵事件数据、交通事件数据和待预测的交通拥堵之间的空间相关性特征,通过特征提取网络提取站点流量数据与拥堵的时间依赖关系特征;其中,特征提取网络由门控神经单元和注意力机制融合制成,从多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对多种因素数据进行多分类处理和独热编码处理,获得多种因素特征;为了提高交通拥堵预测的精确度,通过将空间相关性特征、时间依赖关系特征和多种因素特征进行拼接,获得时空联合特征,并将时空联合特征输入至多层感知机模型中,获得待预测的交通拥堵的预测结果。In some embodiments, from step S100 to step S500, in order to predict traffic congestion from various aspects, comprehensively predict traffic congestion, thereby improving the accuracy of traffic congestion prediction, by obtaining multi-source heterogeneous data sets, from multiple sources Collect traffic event data, congestion event data, and site traffic data from heterogeneous datasets; in order to capture the relationship between features and improve the effectiveness of feature extraction, convolutional neural networks are used to extract congestion event data, traffic event data, and to-be-predicted data. The spatial correlation features between the traffic congestion, and the time-dependent relationship between site traffic data and congestion are extracted through the feature extraction network; among them, the feature extraction network is made by the fusion of the gated neural unit and the attention mechanism, from the multi-source heterogeneous Collect multiple factor data except traffic event data, congestion event data and site traffic data in the data set, and perform multi-classification processing and one-hot encoding processing on multiple factor data to obtain multiple factor characteristics; in order to improve traffic congestion prediction Accuracy, by splicing spatial correlation features, time-dependent relationship features and multiple factor features to obtain joint spatio-temporal features, and input the joint spatio-temporal features into the multi-layer perceptron model to obtain the prediction result of traffic congestion to be predicted .

在一些实施例中,从多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据,包括:In some embodiments, traffic event data, congestion event data and site flow data are obtained from multi-source heterogeneous data sets, including:

对多源异构数据集中的交通事件和拥堵事件进行独热编码处理,获取交通事件数据和拥堵事件数据,对多源异构数据集中的站点流量进行归一化处理,获取站点流量数据。Perform one-hot encoding processing on traffic events and congestion events in multi-source heterogeneous data sets, obtain traffic event data and congestion event data, and normalize site traffic in multi-source heterogeneous data sets to obtain site traffic data.

在本实施例中,采用不同的方法从多源异构数据集中提取多种类型的数据,针对不同类型的数据采用不同的提取方法,以便有效的提取数据。In this embodiment, different methods are used to extract multiple types of data from multi-source heterogeneous data sets, and different extraction methods are used for different types of data, so as to effectively extract data.

在一些实施例中,采用卷积神经网络提取拥堵事件数据、交通事件数据和待预测的交通拥堵之间的空间相关性特征,包括:In some embodiments, a convolutional neural network is used to extract spatial correlation features between congestion event data, traffic event data, and traffic congestion to be predicted, including:

预设第一历史时间步长,获取预设第一历史时间步长内的地理位置相邻的第一数量的拥堵事件数据的历史数据和交通事件数据的历史数据;Preset the first historical time step, and obtain the historical data of the first quantity of congestion event data and the historical data of the traffic event data that are geographically adjacent within the preset first historical time step;

将交通事件数据的历史数据和拥堵事件数据的历史数据进行拼接,获得拼接数据序列;Splicing the historical data of the traffic event data and the historical data of the congestion event data to obtain the spliced data sequence;

将拼接数据序列输入至卷积神经网中,获得拥堵事件数据、交通事件数据和待预测的交通拥堵之间的空间相关性特征。The concatenated data sequence is input into the convolutional neural network to obtain the spatial correlation features between the congestion event data, the traffic event data and the traffic congestion to be predicted.

需要说明的是,本实施例的第一历史时间步长和第一数量可以根据实际情况进行更改,本实施例不做具体限定。It should be noted that the first historical time step and the first quantity in this embodiment may be changed according to actual conditions, and are not specifically limited in this embodiment.

在本实施例中,采用卷积神经网络能有效提取拥堵事件数据和交通事件数据之间的空间相关性特征,能捕获特征之间的关系,从而提高特征提取的有效性。In this embodiment, the convolutional neural network can effectively extract the spatial correlation features between the congestion event data and the traffic event data, and can capture the relationship between features, thereby improving the effectiveness of feature extraction.

在一些实施例中,将拼接数据序列输入至卷积神经网络中,获得拥堵事件数据、交通事件数据和待预测的交通拥堵之间的空间相关性特征,包括:In some embodiments, the spliced data sequence is input into the convolutional neural network to obtain the spatial correlation features between the congestion event data, the traffic event data and the traffic congestion to be predicted, including:

将拼接数据序列输入至卷积神经网络中,通过卷积层和池化层处理拼接数据序列:Input the spliced data sequence into the convolutional neural network, and process the spliced data sequence through the convolutional layer and the pooling layer:

Figure 212514DEST_PATH_IMAGE001
Figure 212514DEST_PATH_IMAGE001

其中,

Figure 11974DEST_PATH_IMAGE002
Figure 380639DEST_PATH_IMAGE003
表示卷积层的输出,E表示拼接数据序列,
Figure 274645DEST_PATH_IMAGE004
Figure 779576DEST_PATH_IMAGE005
表示权 重矩阵,
Figure 671309DEST_PATH_IMAGE006
Figure 901171DEST_PATH_IMAGE007
Figure 208655DEST_PATH_IMAGE008
Figure 958305DEST_PATH_IMAGE009
表示偏差矩阵,ReLU表示激活函数,
Figure 224202DEST_PATH_IMAGE010
表示最大函数值,
Figure 98617DEST_PATH_IMAGE011
Figure 616317DEST_PATH_IMAGE012
表示池化层的输出,
Figure 95840DEST_PATH_IMAGE013
表示卷积运算; in,
Figure 11974DEST_PATH_IMAGE002
and
Figure 380639DEST_PATH_IMAGE003
Represents the output of the convolutional layer, E represents the spliced data sequence,
Figure 274645DEST_PATH_IMAGE004
and
Figure 779576DEST_PATH_IMAGE005
represents the weight matrix,
Figure 671309DEST_PATH_IMAGE006
,
Figure 901171DEST_PATH_IMAGE007
,
Figure 208655DEST_PATH_IMAGE008
and
Figure 958305DEST_PATH_IMAGE009
Represents the bias matrix, ReLU represents the activation function,
Figure 224202DEST_PATH_IMAGE010
represents the maximum function value,
Figure 98617DEST_PATH_IMAGE011
and
Figure 616317DEST_PATH_IMAGE012
Represents the output of the pooling layer,
Figure 95840DEST_PATH_IMAGE013
Indicates the convolution operation;

在卷积层和池化层处理拼接数据序列后,将

Figure 391692DEST_PATH_IMAGE012
输入至全连接层,获得空间相关性 特征,空间相关性特征表示为: After the concatenated data sequence is processed by the convolutional and pooling layers, the
Figure 391692DEST_PATH_IMAGE012
Input to the fully connected layer to obtain the spatial correlation feature, the spatial correlation feature is expressed as:

Figure 956665DEST_PATH_IMAGE014
Figure 956665DEST_PATH_IMAGE014

其中,

Figure 248363DEST_PATH_IMAGE015
表示在t时刻的拥堵事件数据、交通事件数据和待预测的交通拥堵之间 的空间相关性特征,
Figure 847971DEST_PATH_IMAGE016
表示权重矩阵,
Figure 580304DEST_PATH_IMAGE017
表示偏差矩阵。 in,
Figure 248363DEST_PATH_IMAGE015
Represents the spatial correlation feature between the congestion event data, traffic event data and traffic congestion to be predicted at time t,
Figure 847971DEST_PATH_IMAGE016
represents the weight matrix,
Figure 580304DEST_PATH_IMAGE017
represents the bias matrix.

在一些实施例中,通过特征提取网络提取站点流量数据与拥堵的时间依赖关系特征,包括:In some embodiments, the feature extraction network is used to extract the time-dependent relationship between site traffic data and congestion, including:

预设第二历史时间步长,获取第二历史时间步长内的地理位置排名靠前的第二数量的入站站点流量数据和出站站点流量数据;Preset the second historical time step, and obtain the second quantity of inbound site traffic data and outbound site traffic data with the highest geographical location within the second historical time step;

将入站站点流量数据和出站站点流量数据进行拼接,获得拼接站点流量数据;Splice inbound site traffic data and outbound site traffic data to obtain spliced site traffic data;

将拼接站点流量数据输入至门控神经单元中,获得第一向量,门控神经单元第t步 输出的第一向量

Figure 632574DEST_PATH_IMAGE018
表示为: Input the spliced site traffic data into the gated neural unit to obtain the first vector, the first vector output by the gated neural unit at step t
Figure 632574DEST_PATH_IMAGE018
Expressed as:

Figure 147869DEST_PATH_IMAGE019
Figure 147869DEST_PATH_IMAGE019

其中,

Figure 477350DEST_PATH_IMAGE020
表示第t-1步的拼接站点流量数据,
Figure 990371DEST_PATH_IMAGE021
表示第t步的拼接站点流量数 据,GRU表示门控神经单元; in,
Figure 477350DEST_PATH_IMAGE020
Indicates the splicing site traffic data of step t-1,
Figure 990371DEST_PATH_IMAGE021
Represents the splicing site traffic data of step t, and GRU represents the gated neural unit;

将第一向量输入至注意力机制中,获得第二向量,注意力机制计算公式为:Input the first vector into the attention mechanism to obtain the second vector. The calculation formula of the attention mechanism is:

Figure 654570DEST_PATH_IMAGE022
Figure 654570DEST_PATH_IMAGE022

其中,

Figure 176819DEST_PATH_IMAGE023
表示在t时刻由门控神经单元输出向量
Figure 282178DEST_PATH_IMAGE018
的注意力分布值,
Figure 605581DEST_PATH_IMAGE024
Figure 101284DEST_PATH_IMAGE025
表示 权重系数,
Figure 551857DEST_PATH_IMAGE026
表示偏差系数,
Figure 714985DEST_PATH_IMAGE027
表示在j时刻由门控神经单元输出向量
Figure 632125DEST_PATH_IMAGE018
的注意力分布值,
Figure 21650DEST_PATH_IMAGE028
表示注意力权重,i表示总时间; in,
Figure 176819DEST_PATH_IMAGE023
Indicates that the vector output by the gated neural unit at time t
Figure 282178DEST_PATH_IMAGE018
The attention distribution value of
Figure 605581DEST_PATH_IMAGE024
and
Figure 101284DEST_PATH_IMAGE025
Indicates the weight coefficient,
Figure 551857DEST_PATH_IMAGE026
Indicates the coefficient of deviation,
Figure 714985DEST_PATH_IMAGE027
Indicates that the vector output by the gated neural unit at time j
Figure 632125DEST_PATH_IMAGE018
The attention distribution value of
Figure 21650DEST_PATH_IMAGE028
Represents the attention weight, i represents the total time;

将注意力机制输出的向量通过全连接层计算,获得时间依赖关系特征,全连接层计算公式为:The vector output by the attention mechanism is calculated through the fully connected layer to obtain time-dependent relationship features. The calculation formula of the fully connected layer is:

Figure 620121DEST_PATH_IMAGE029
Figure 620121DEST_PATH_IMAGE029

其中,

Figure 762390DEST_PATH_IMAGE030
表示在t时刻的时间依赖关系特征,
Figure 319273DEST_PATH_IMAGE031
表示权重矩阵,
Figure 851885DEST_PATH_IMAGE032
表示偏差向 量,ReLU表示激活函数。 in,
Figure 762390DEST_PATH_IMAGE030
Indicates the time-dependent relationship feature at time t,
Figure 319273DEST_PATH_IMAGE031
represents the weight matrix,
Figure 851885DEST_PATH_IMAGE032
Represents the bias vector, and ReLU represents the activation function.

需要说明的是,本实施例的第二历史时间步长和第二数量可以根据实际情况进行更改,本实施例不做具体限定。It should be noted that the second historical time step and the second number in this embodiment may be changed according to actual conditions, and are not specifically limited in this embodiment.

在本实施例中,采用门控神经单元和注意力机制能有效提取站点流量数据与拥堵的时间依赖关系特征,能捕获特征之间的关系,从而提高特征提取的有效性。In this embodiment, the use of the gated neural unit and the attention mechanism can effectively extract the time-dependent relationship features between site traffic data and congestion, and can capture the relationship between features, thereby improving the effectiveness of feature extraction.

在一些实施例中,对多种因素数据进行多分类处理和独热编码处理,获得多种因素特征,包括:In some embodiments, multi-category processing and one-hot encoding processing are performed on the multi-factor data to obtain multi-factor features, including:

若多源异构数据集中的多种因素数据为二分类变量,则将多种因素数据经过多分类处理表示为二分类0-1变量,获得二分类因素数据,并通过独热编码将二分类因素数据映射为多种因素特征;If the multi-factor data in the multi-source heterogeneous data set is a binary variable, the multi-factor data is expressed as a binary 0-1 variable after multi-classification processing, and the binary classification factor data is obtained, and the binary classification is processed by one-hot encoding. Factor data is mapped to multiple factor features;

若多源异构数据集中的多种因素数据为多分类变量,则采用独热编码将多种因素数据映射为多种因素特征。If the multi-factor data in the multi-source heterogeneous data set is a multi-category variable, one-hot encoding is used to map the multi-factor data into multi-factor features.

在本实施例中,采用二分类处理和独热编码处理能有效提取多种因素特征,能捕获特征之间的关系,从而提高特征提取的有效性。In this embodiment, the binary classification processing and the one-hot encoding processing can effectively extract the features of multiple factors, and can capture the relationship between features, thereby improving the effectiveness of feature extraction.

在一些实施例中,将空间相关性特征、时间依赖关系特征和多种因素特征进行拼接,获得时空联合特征,并将时空联合特征输入至多层感知机模型中,获得待预测的交通拥堵的预测结果,包括:In some embodiments, spatial correlation features, time-dependent relationship features, and multiple factor features are spliced to obtain joint spatio-temporal features, and the joint spatio-temporal features are input into the multi-layer perceptron model to obtain the prediction of traffic congestion to be predicted Results, including:

将时空联合特征输入至多层感知机模型中,通过隐藏层和输出层计算获得交通拥堵预测结果,其中,隐藏层的计算包括:The spatio-temporal joint features are input into the multi-layer perceptron model, and the traffic congestion prediction results are obtained through the calculation of the hidden layer and the output layer. The calculation of the hidden layer includes:

Figure 630879DEST_PATH_IMAGE033
Figure 630879DEST_PATH_IMAGE033

其中,

Figure 503020DEST_PATH_IMAGE034
表示在t时刻的空间相关性特征,
Figure 355438DEST_PATH_IMAGE035
表示在t时刻的时间依赖关系特征,
Figure 313030DEST_PATH_IMAGE036
表示在t时刻的多种因素特征,
Figure 581200DEST_PATH_IMAGE037
表示拼接函数,
Figure 448793DEST_PATH_IMAGE038
表示时空联合特征,
Figure 816321DEST_PATH_IMAGE039
表示隐藏层输出的特征向量,
Figure 651422DEST_PATH_IMAGE040
表示权重矩阵,
Figure 457704DEST_PATH_IMAGE041
表示偏差矩阵,ReLU表示激活函 数,
Figure 304437DEST_PATH_IMAGE013
表示卷积运算; in,
Figure 503020DEST_PATH_IMAGE034
Indicates the spatial correlation feature at time t,
Figure 355438DEST_PATH_IMAGE035
Indicates the time-dependent relationship feature at time t,
Figure 313030DEST_PATH_IMAGE036
Represents the characteristics of various factors at time t,
Figure 581200DEST_PATH_IMAGE037
represents the concatenation function,
Figure 448793DEST_PATH_IMAGE038
Represents the spatiotemporal joint feature,
Figure 816321DEST_PATH_IMAGE039
Represents the feature vector output by the hidden layer,
Figure 651422DEST_PATH_IMAGE040
represents the weight matrix,
Figure 457704DEST_PATH_IMAGE041
Represents the bias matrix, ReLU represents the activation function,
Figure 304437DEST_PATH_IMAGE013
Indicates the convolution operation;

将隐藏层输出的特征向量输入至输出层,输出层的计算包括:The feature vector output by the hidden layer is input to the output layer, and the calculation of the output layer includes:

Figure 482346DEST_PATH_IMAGE042
Figure 482346DEST_PATH_IMAGE042

其中,

Figure 414530DEST_PATH_IMAGE043
表示t+1时刻的待预测的交通拥堵的预测结果,
Figure 24503DEST_PATH_IMAGE044
表示权重矩阵,
Figure 115956DEST_PATH_IMAGE045
表示偏差矩阵,
Figure 825286DEST_PATH_IMAGE046
表示激活函数。 in,
Figure 414530DEST_PATH_IMAGE043
Indicates the prediction result of the traffic congestion to be predicted at time t+1,
Figure 24503DEST_PATH_IMAGE044
represents the weight matrix,
Figure 115956DEST_PATH_IMAGE045
Denotes the bias matrix,
Figure 825286DEST_PATH_IMAGE046
represents the activation function.

在本实施例中,将空间相关性特征、时间依赖关系特征和多种因素特征进行拼接后,通过多种类型的特征综合预测交通拥堵情况,能够提高交通拥堵预测的精确度。In this embodiment, after splicing spatial correlation features, time-dependent relationship features, and multiple factor features, the traffic congestion situation can be comprehensively predicted through multiple types of features, which can improve the accuracy of traffic congestion prediction.

为方便本领域人员理解,以下提供一组最佳实施例:For the convenience of those skilled in the art to understand, a group of best embodiments are provided below:

1.多源异构数据集的处理。1. Processing of multi-source heterogeneous datasets.

本实施例根据多源异构数据的特性,将数据分为两类数据:类别数据与连续数据,对于多源异构数据集中不同类别的数据,采用不同的处理方法,例如:In this embodiment, according to the characteristics of multi-source heterogeneous data, the data is divided into two types of data: category data and continuous data. For different types of data in multi-source heterogeneous data sets, different processing methods are adopted, for example:

本实施例结合了高德地图返回的拥堵事件数据(车辆行驶速度低于30km/h),将拥堵事件数据结合桩号,以使拥堵事件精准定位到高速公路上,本实施例将路段n在时段[t,t+t1](t1取0.5h,即30min)内发生拥堵时,则将拥堵事件数据记为1,若路段n在时段[t,t+t1](t1取0.5h,即30min)内未有任何拥堵事件信息,则将拥堵事件数据记为0。拥堵事件经过处理之后,处理成了0-1类别变量的拥堵事件数据。This embodiment combines the congestion event data returned by AutoNavi Maps (vehicle speed is lower than 30km/h), and combines the congestion event data with the stake number, so that the congestion event can be accurately located on the expressway. In this embodiment, the road section n is When congestion occurs within the time period [t, t+t1] (t1 takes 0.5h, that is, 30min), the congestion event data is recorded as 1, if the road section n is in the time period [t, t+t1] (t1 takes 0.5h, that is If there is no congestion event information within 30 minutes), the congestion event data will be recorded as 0. After the congestion event is processed, it is processed into the congestion event data of 0-1 category variable.

本实例数据集包含某省级高速路网系统的收费站进出站记录,通过对数据集进行 清洗和预处理,统计并得到所有收费站各个时刻的出进站流量。本实施例将站点m在时刻t 的进出站流量表示为

Figure 385711DEST_PATH_IMAGE047
,其中M表示站点的总数,得到268个收 费站点的进出站的站点流量数据。其中站点流量的统计间隔为0.5小时,每个站点流量数据 均包含从2019年1月1日至2019年12月31日一年的收费站进出站的站点流量数据,流量单位 为辆每小时(即,辆/小时)。针对站点流量数据,本实施例采用归一化层对站点流量数据进 行处理,归一化层的目的为使用梯度下降的方法求解最优化问题时,归一化后可以加快梯 度下降的求解速度,即提升模型的收敛速度。站点流量经过归一化处理之后,每个样本集包 含17520条数据,按照6:2:2划分为模型的训练集、验证集和测试集。流量数据是连续变量就 是某个时间步有多少辆车,经过归一化处理之后变成了0到1里面的一个浮点数。 The data set of this example contains the entry and exit records of the toll stations of a provincial expressway network system. By cleaning and preprocessing the data set, the inbound and outbound traffic of all toll stations at each moment is counted and obtained. In this embodiment, the inbound and outbound traffic of site m at time t is expressed as
Figure 385711DEST_PATH_IMAGE047
, where M represents the total number of stations, and the inbound and outbound traffic data of 268 toll stations are obtained. Among them, the statistical interval of station traffic is 0.5 hours, and each station traffic data includes the station traffic data of the toll gate in and out of the station from January 1, 2019 to December 31, 2019, and the flow unit is vehicle per hour ( i.e. vehicles/hour). For the site traffic data, this embodiment uses the normalization layer to process the site traffic data. The purpose of the normalization layer is to use the gradient descent method to solve the optimization problem. After normalization, the solution speed of the gradient descent can be accelerated. That is to improve the convergence speed of the model. After the site traffic is normalized, each sample set contains 17520 pieces of data, which are divided into the training set, verification set and test set of the model according to 6:2:2. Traffic data is a continuous variable, that is, how many vehicles there are at a certain time step, and after normalization, it becomes a floating point number between 0 and 1.

2.空间相关性特征提取模块。2. Spatial correlation feature extraction module.

由于高速路网拥堵所受影响因素复杂,高速路网的拥堵事件,不仅受高速路网上游路段的影响,也会受到高速路网下游路段的影响。高速路网结构错综复杂,空间影响难以提取。因此,本实施例通过卷积神经网络捕获高速路网拥堵的空间相关性特征。具体为:Due to the complex factors affecting expressway network congestion, the congestion incidents in the expressway network are not only affected by the upstream sections of the expressway network, but also by the downstream sections of the expressway network. The highway network structure is intricate and complex, and the spatial influence is difficult to extract. Therefore, this embodiment captures the spatial correlation features of expressway network congestion through a convolutional neural network. Specifically:

本实施例采用的第一历史时间步长为T,构建地理位置最近的相邻N个路段的交通 事件数据的历史数据为

Figure 737058DEST_PATH_IMAGE048
,其中,
Figure 355121DEST_PATH_IMAGE049
表示相邻的i号路段第 j个历史时间步的交通事件情况;构建地理位置最近的相邻N个路段的拥堵事件数据的历史 数据为
Figure 625566DEST_PATH_IMAGE050
,其中,
Figure 532342DEST_PATH_IMAGE051
表示相邻的i号路段第j个历史时间步 的拥堵情况。将交通事件数据的历史数据C与拥堵事件数据的历史数据D进行拼接操作之 后,得到高速路网相邻路段的交通事件与拥堵事件序列,用
Figure 64211DEST_PATH_IMAGE052
进 行表示,将E输入到卷积神经网络中。其中,交通事件数据包括2019年全省各市区、各高速公 路的全量交通事件信息,包括事件类型(如车流量大、交通管制、突发交通事故、道路施工 等)、持续时间、起点高速公路桩号、终点高速公路桩号、发生时间数据。在本实施例中,第一 历史时间步长T取6,地理位置最近的路段数N取8。 The first historical time step used in this embodiment is T, and the historical data of the traffic event data of the nearest adjacent N road sections to construct the geographic location is
Figure 737058DEST_PATH_IMAGE048
,in,
Figure 355121DEST_PATH_IMAGE049
Represents the traffic event situation of the jth historical time step of the adjacent road section i; the historical data of the congestion event data of the nearest N adjacent road sections constructed is
Figure 625566DEST_PATH_IMAGE050
,in,
Figure 532342DEST_PATH_IMAGE051
Indicates the congestion situation of the jth historical time step of the adjacent road section i. After splicing the historical data C of the traffic event data and the historical data D of the congestion event data, the sequence of traffic events and congestion events on the adjacent sections of the expressway network is obtained.
Figure 64211DEST_PATH_IMAGE052
To represent, input E into the convolutional neural network. Among them, the traffic event data includes the full amount of traffic event information in all urban areas and expressways of the province in 2019, including event types (such as heavy traffic, traffic control, sudden traffic accidents, road construction, etc.), duration, and starting point expressways Chainage, terminal expressway pile number, occurrence time data. In this embodiment, the first historical time step T is set to 6, and the number N of road sections closest to the geographic location is set to 8.

本实施例构建了一个由2个卷积层、2个池化层组成的卷积神经网络框架,根据高速路网的特点,将2个卷积层均设计为二维卷积,将池化方式选择为最大池化,卷积层的激活函数选择ReLU激活函数。卷积层和池化层的处理可以表示如下:In this embodiment, a convolutional neural network framework consisting of two convolutional layers and two pooling layers is constructed. According to the characteristics of the highway network, both convolutional layers are designed as two-dimensional convolutions, and the pooling The method is selected as maximum pooling, and the activation function of the convolutional layer is selected as the ReLU activation function. The processing of convolutional layer and pooling layer can be expressed as follows:

Figure 474463DEST_PATH_IMAGE001
Figure 474463DEST_PATH_IMAGE001
.

在经过卷积层和池化层处理之后,历史交通事件与拥堵事件被映射到隐层特征空 间中,随后将

Figure 181388DEST_PATH_IMAGE012
输入到全连接层,以获得空间相关性特征,全连接层采用激活函数ReLU。卷 积神经网络在t时刻输出的空间相关性特征可表示为: After being processed by the convolutional layer and the pooling layer, the historical traffic events and congestion events are mapped into the hidden layer feature space, and then
Figure 181388DEST_PATH_IMAGE012
Input to the fully connected layer to obtain spatial correlation features, and the fully connected layer uses the activation function ReLU. The spatial correlation features output by the convolutional neural network at time t can be expressed as:

Figure 372198DEST_PATH_IMAGE014
Figure 372198DEST_PATH_IMAGE014
.

通过卷积神经网络能够捕获到相邻路段的拥堵事件与待预测的交通拥堵之间的空间相关性,以及通过卷积神经网络能够捕获到相邻路段的交通事件与待预测的交通拥堵之间的空间相关性,从而能够获得所述拥堵事件数据和待预测的交通拥堵之间的空间相关性特征,以及能够获得所述交通事件数据和待预测的交通拥堵之间的空间相关性特征。The spatial correlation between the congestion events of adjacent road sections and the traffic congestion to be predicted can be captured by the convolutional neural network, and the relationship between the traffic events of the adjacent road sections and the traffic congestion to be predicted can be captured by the convolutional neural network. , so that the spatial correlation characteristics between the traffic congestion event data and the traffic congestion to be predicted can be obtained, and the spatial correlation characteristics between the traffic event data and the traffic congestion to be predicted can be obtained.

3.时间依赖关系特征提取模块。3. Time dependency feature extraction module.

由于高速的站点流量自身有很强的周期性和时间依赖性,并且邻近高速站点流量与高速路段拥堵有很强的非线性时间关联,因此,本实施例通过门控神经单元和注意力机制捕获站点流量数据自身的时间周期性及捕获拥堵与站点流量数据的非线性时间关联。具体为:Since the high-speed site traffic itself has a strong periodicity and time dependence, and the adjacent high-speed site traffic has a strong non-linear time correlation with the congestion of the high-speed section, this embodiment captures The temporal periodicity of site traffic data itself and the non-linear time correlation between capture congestion and site traffic data. Specifically:

本实施例采用的第二历史时间步长为T,构建地理位置最近的排名靠前的M个高速 站点的入站站点流量数据为

Figure 65348DEST_PATH_IMAGE053
,其中,
Figure 736632DEST_PATH_IMAGE054
为站点m长度 为T的入站站点流量数据的历史数据,构建地理位置最近的排名靠前的M个高速站点的出站 站点流量数据为
Figure 224245DEST_PATH_IMAGE055
,其中,
Figure 964668DEST_PATH_IMAGE056
为站点m长度为T 的出站站点流量数据的历史数据。将入站站点流量数据的历史数据
Figure 461508DEST_PATH_IMAGE057
和出站站点流量数 据的历史数据
Figure 908670DEST_PATH_IMAGE058
进行拼接操作之后,得到拼接站点流量数据为
Figure 206665DEST_PATH_IMAGE059
,将拼接站点流量数据输入到门控神经单元中,对需提取的特 征进行充分学习,以捕获时间依赖关系。在本实施例中,第二历史时间步长T取6,地理位置 最近的高速站点数M取10。门控神经单元的输出为第一向量,门控神经单元的输出在第t步 输出的第一向量
Figure 309750DEST_PATH_IMAGE018
可以表示为: The second historical time step used in this embodiment is T, and the inbound site traffic data of the top M high-speed sites with the closest geographic location are constructed as
Figure 65348DEST_PATH_IMAGE053
,in,
Figure 736632DEST_PATH_IMAGE054
is the historical data of the inbound site traffic data of site m with a length of T, and construct the outbound site traffic data of the top M high-speed sites with the closest geographic location as
Figure 224245DEST_PATH_IMAGE055
,in,
Figure 964668DEST_PATH_IMAGE056
is the historical data of the outbound site traffic data of site m with length T. Historical data for inbound site traffic data
Figure 461508DEST_PATH_IMAGE057
and historical data for outbound site traffic data
Figure 908670DEST_PATH_IMAGE058
After the splicing operation, the spliced site traffic data is obtained as
Figure 206665DEST_PATH_IMAGE059
, input the spliced site traffic data into the gated neural unit, and fully learn the features to be extracted to capture the temporal dependence. In this embodiment, the second historical time step T is 6, and the number M of the geographically closest express stations is 10. The output of the gated neuron unit is the first vector, and the output of the gated neuron unit is the first vector output at step t
Figure 309750DEST_PATH_IMAGE018
It can be expressed as:

Figure 469336DEST_PATH_IMAGE019
Figure 469336DEST_PATH_IMAGE019
.

随后,将门控神经单元激活处理后的第一向量,输入到注意力机制中进行汇总,通过权重分配,计算不同特征向量对应的权重,不断计算迭代出更优的参数矩阵,注意力机制的计算方式可以表示如下:Subsequently, the first vector after the activation of the gated neural unit is input into the attention mechanism for summarization, and the weights corresponding to different feature vectors are calculated through weight distribution, and a better parameter matrix is continuously calculated and iterated. The calculation of the attention mechanism The way can be expressed as follows:

Figure 974267DEST_PATH_IMAGE022
Figure 974267DEST_PATH_IMAGE022
.

将注意力机制的输出通过一个全连接层进行计算,获得时间依赖关系特征,全连接层的激活函数为ReLU,得到在t时刻输出的时间依赖关系特征为:The output of the attention mechanism is calculated through a fully-connected layer to obtain time-dependent relationship features. The activation function of the fully-connected layer is ReLU, and the time-dependent relationship features output at time t are:

Figure 944628DEST_PATH_IMAGE029
Figure 944628DEST_PATH_IMAGE029
.

4.多种因素特征提取模块。4. Multiple factor feature extraction module.

本实施例设计了一个嵌入层和一个全连接层来提取时间、节假日和天气等影响高速路网拥堵的多种因素数据。例如:In this embodiment, an embedding layer and a fully connected layer are designed to extract data of various factors that affect expressway network congestion, such as time, holidays, and weather. For example:

对于收费站点每个时刻的流量,提取一天中第几个小时、一周中第几天、是否是周末、是否是节假日、前一天是否是节假日和后一天是否是节假日等具有时间特性的类别特征,并采用独热编码机制将对应时刻的时间特征转换为嵌入向量Other, 包括一天中的第几个小时(24个特征)、一周中的第几天(7个特征)、是否是节假日(2个特征)、前一天是否是节假日(2个特征)、后一天是否是节假日(2个特征)以及当前路段历史交通事件数据(2个特征)等。本实施例中,对于二分类变量的数据(如是否是节假日),本实施例将该数据经过多分类处理表示为二分类0-1变量,获得二分类因素数据,并通过独热编码将二分类因素数据映射为多种因素特征;对于多分类的类别变量的数据,本实施例采用独热编码的方法将数据映射为多个0-1二元特征(即多种因素特征),以保证不同类别之间的距离相同,便于更好地提取特征之间的关系。本实施例将历史时间步设置为6(过去3个小时),即通过历史6个时间步(3个小时)来预测未来单个时间步的路段拥堵情况。For the traffic at each moment of the charging station, extract the hour of the day, the day of the week, whether it is a weekend, whether it is a holiday, whether the previous day is a holiday, and whether the next day is a holiday. And use the one-hot encoding mechanism to convert the time features of the corresponding moment into the embedding vector Other, including the hour of the day (24 features), the day of the week (7 features), whether it is a holiday (2 feature), whether the previous day is a holiday (2 features), whether the next day is a holiday (2 features), and the historical traffic event data of the current road segment (2 features), etc. In this embodiment, for the data of binary classification variables (such as whether it is a holiday or not), this embodiment expresses the data as binary classification 0-1 variables through multi-classification processing, obtains binary classification factor data, and uses one-hot encoding to convert the two Categorical factor data is mapped to a variety of factor features; for data of multi-category categorical variables, this embodiment uses a one-hot encoding method to map the data into multiple 0-1 binary features (that is, multiple factor features) to ensure The distance between different categories is the same, which facilitates better extraction of the relationship between features. In this embodiment, the historical time step is set to 6 (the past 3 hours), that is, the road congestion situation of a single time step in the future is predicted through 6 historical time steps (3 hours).

对于天气因素的处理是:首先进行独热编码处理,然后和其他时间因素一起输入到嵌入层中进行嵌入操作之后,将嵌入层的输出再输入到全连接层,以获得多种因素特征。本实施例中的天气数据是包括2019年全年、细化到每个市区以及每半个小时的天气数据,包括天气状态(如多云、晴、阴、小雨、雨夹雪等)、温度、风力和风向等数据。The processing of weather factors is as follows: first, one-hot encoding processing, and then input into the embedding layer together with other time factors for embedding operation, and then input the output of the embedding layer into the fully connected layer to obtain multiple factor features. The weather data in this embodiment includes weather data for the whole year of 2019, detailed to each urban area and every half hour, including weather conditions (such as cloudy, sunny, cloudy, light rain, sleet, etc.), temperature , wind force and direction data.

5.预测交通拥堵的情况。5. Predict traffic jams.

将时空联合特征输入至多层感知机模型中,通过隐藏层和输出层计算获得待预测的交通拥堵的预测结果,其中,隐藏层的计算包括:Input the spatio-temporal joint feature into the multi-layer perceptron model, and obtain the prediction result of the traffic congestion to be predicted through the calculation of the hidden layer and the output layer, wherein the calculation of the hidden layer includes:

Figure 331747DEST_PATH_IMAGE033
Figure 331747DEST_PATH_IMAGE033

其中,

Figure 170390DEST_PATH_IMAGE036
表示在t时刻的多种因素特征。 in,
Figure 170390DEST_PATH_IMAGE036
Represents the characteristics of various factors at time t.

将隐藏层输出的特征向量输入至输出层,输出层的计算包括:The feature vector output by the hidden layer is input to the output layer, and the calculation of the output layer includes:

Figure 654461DEST_PATH_IMAGE042
Figure 654461DEST_PATH_IMAGE042
.

为了更好的说明,本实施例进行了如下实验:For better illustration, this embodiment has carried out following experiment:

1.性能指标1. Performance indicators

本实施例使用F1分数(F1 Score)、正样本分类精确率(P)和正样本分类召回率(R)作为预测模型性能的评价指标,这三种指标被广泛应用于样本分布极度不均匀的分类情况。其中,TP(True Positive)表示真阳性、FP(False Positive)表示假阳性、FN(FalseNegative)表示假阴性。性能指标的计算如下公式:This example uses F1 score (F1 Score), positive sample classification precision rate (P) and positive sample classification recall rate (R) as the evaluation indicators of prediction model performance. These three indicators are widely used in the classification of samples with extremely uneven distribution. Condition. Among them, TP (True Positive) means true positive, FP (False Positive) means false positive, and FN (False Negative) means false negative. The calculation of the performance index is as follows:

Figure 920357DEST_PATH_IMAGE060
Figure 920357DEST_PATH_IMAGE060
.

2.对比实验。2. Comparative experiment.

为了评估模型的性能,本实施例按一定的比例将处理好的多源异构数据集划分为训练集、验证集和测试集,训练集用于模型训练,验证集和测试集用于模型评价,本实施例通过对比其他的基线模型来评估模型的有效性。本实施例使用决策树、极端梯度提升树、随机森林、K-近邻算法、长短期记忆网络等基线预测方法与本实施例的技术方案进行整体性能的比较评估。In order to evaluate the performance of the model, this embodiment divides the processed multi-source heterogeneous data set into a training set, a verification set and a test set according to a certain ratio. The training set is used for model training, and the verification set and test set are used for model evaluation. , this embodiment evaluates the effectiveness of the model by comparing it with other baseline models. This embodiment uses the baseline prediction methods such as decision tree, extreme gradient boosting tree, random forest, K-nearest neighbor algorithm, long short-term memory network and the technical solution of this embodiment to compare and evaluate the overall performance.

通过比较评估,本实施例的技术方案的预测效果最好,结果如表1所示,可以得出3个结论:By comparison and evaluation, the prediction effect of the technical solution of this embodiment is the best, and the results are shown in Table 1, and three conclusions can be drawn:

(1)本实施例的技术方案在所有指标上都显著优于其他方法,尤其是在F1分数、精确率和召回率的指标上,这对市民的出行有着非常重要的指导性作用;(1) The technical solution of this embodiment is significantly superior to other methods in all indicators, especially in the indicators of F1 score, precision rate and recall rate, which have a very important guiding role for citizens' travel;

(2)由于深度学习的网络能充分学习特征之间的非线性关系,因此这类模型在对高速路网有关数据建模时具有更大优势;(2) Since the deep learning network can fully learn the nonlinear relationship between features, this type of model has a greater advantage in modeling data related to the expressway network;

(3)由于基线模型无法学习到高速路网的空间相关性,而本实施例的技术方案能够通过卷积神经网络学习空间相关性,因此在预测性能上有更好的表现。(3) Since the baseline model cannot learn the spatial correlation of the expressway network, the technical solution of this embodiment can learn the spatial correlation through the convolutional neural network, so it has better performance in prediction performance.

表1Table 1

Figure 386584DEST_PATH_IMAGE061
Figure 386584DEST_PATH_IMAGE061

3.消融实验3. Ablation Experiment

为了评估模型中不同组件的有效性,本实施例通过消融实验来验证,即通过减少模型中某些设计组件对模型的性能进行评价,消融实验能够反映模型中各部分组件的有效性。In order to evaluate the effectiveness of different components in the model, this embodiment is verified by ablation experiments, that is, the performance of the model is evaluated by reducing some design components in the model, and the ablation experiments can reflect the effectiveness of various components in the model.

通过消融实验,评估了本实施例的技术方案中不同组件的有效性,结果如表2所示,表中展现了三个指标,即F1分数、精确率和召回率。结果表明,删除任何组件均会影响本实施例的技术方案的性能。其中,删除空间相关性特征提取模块时,F1分数、精确率、召回率分别从0.683、0.685、0.683降到0.488、0.502、0.475;删除时间依赖关系特征提取模块时,F1分数、精确率和召回率分别从0.683、0.685、0.683降到0.605、0.623、0.589;删除多种因素特征提取模块时,F1分数、精确率和召回率分别从0.683、0.685、0.683降到0.637、0.633、0.642。Through ablation experiments, the effectiveness of different components in the technical solution of this embodiment was evaluated, and the results are shown in Table 2, which shows three indicators, namely F1 score, precision rate and recall rate. The results show that deleting any component will affect the performance of the technical solution of this embodiment. Among them, when the spatial correlation feature extraction module is deleted, the F1 score, precision rate, and recall rate drop from 0.683, 0.685, and 0.683 to 0.488, 0.502, and 0.475 respectively; when the time-dependent feature extraction module is deleted, the F1 score, precision rate, and recall rate The rate decreased from 0.683, 0.685, 0.683 to 0.605, 0.623, 0.589; when the multi-factor feature extraction module was deleted, the F1 score, precision rate and recall rate decreased from 0.683, 0.685, 0.683 to 0.637, 0.633, 0.642, respectively.

这说明了:1)发生在高速路网上的拥堵事件,受路网结构和邻近路段通行状况的影响显著,这也启示了要重视高速路网上发生的拥堵事件,要及时对其进行处理,以免造成邻近路段的拥堵;2)高速路网拥堵的空间相关性的影响大于交通站点流量的影响;3)由于高速路网的空间相关性和高速站点流量的影响比时间因素(如一周中的第几天、今天是否是节假日)的影响更加直接,因此在消融掉前两个组件时,预测精确率和召回率均下降较大。This shows that: 1) Congestion events on the expressway network are significantly affected by the road network structure and the traffic conditions of adjacent road sections. 2) The impact of the spatial correlation of expressway network congestion is greater than the impact of traffic station flow; 3) Due to the spatial correlation of expressway network and the influence of expressway station flow than time factors (such as the first day of a week How many days, whether today is a holiday or not) is more directly affected, so when the first two components are ablated, the prediction accuracy and recall rate both drop greatly.

表2Table 2

Figure 560077DEST_PATH_IMAGE062
Figure 560077DEST_PATH_IMAGE062

参照图2,本发明实施例还提供了一种交通拥堵预测系统,本交通拥堵预测系统包括数据获取单元100、第一特征提取单元200、第二特征提取单元300、第三特征提取单元400以及预测结果获取单元500,其中:With reference to Fig. 2, the embodiment of the present invention also provides a kind of traffic jam prediction system, this traffic jam prediction system comprises data acquisition unit 100, first feature extraction unit 200, second feature extraction unit 300, the 3rd feature extraction unit 400 and Prediction result acquisition unit 500, wherein:

数据获取单元100,用于获取多源异构数据集,并从多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据;The data acquisition unit 100 is configured to acquire multi-source heterogeneous data sets, and acquire traffic event data, congestion event data and site traffic data from the multi-source heterogeneous data sets;

第一特征提取单元200,用于采用卷积神经网络提取拥堵事件数据、交通事件数据和待预测的交通拥堵之间的空间相关性特征;The first feature extraction unit 200 is used to extract spatial correlation features between congestion event data, traffic event data and traffic congestion to be predicted by using a convolutional neural network;

第二特征提取单元300,用于通过特征提取网络提取站点流量数据与拥堵的时间依赖关系特征;其中,特征提取网络由门控神经单元和注意力机制融合制成;The second feature extraction unit 300 is used to extract the time-dependent relationship features between site traffic data and congestion through a feature extraction network; wherein, the feature extraction network is made by fusing a gated neural unit and an attention mechanism;

第三特征提取单元400,用于从多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对多种因素数据进行多分类处理和独热编码处理,获得多种因素特征;The third feature extraction unit 400 is used to obtain multiple factor data other than traffic event data, congestion event data and site traffic data from a multi-source heterogeneous data set, and perform multi-classification processing and unique heat on the multiple factor data Coding processing to obtain multiple factor characteristics;

预测结果获取单元500,用于将空间相关性特征、时间依赖关系特征和多种因素特征进行拼接,获得时空联合特征,并将时空联合特征输入至多层感知机模型中,获得待预测的交通拥堵的预测结果。The prediction result acquisition unit 500 is used to splicing spatial correlation features, time-dependent relationship features, and multiple factor features to obtain joint spatio-temporal features, and input the joint spatio-temporal features into the multi-layer perceptron model to obtain traffic congestion to be predicted prediction results.

需要说明的是,由于本实施例中的一种交通拥堵预测系统与上述的一种交通拥堵预测方法基于相同的发明构思,因此,方法实施例中的相应内容同样适用于本系统实施例,此处不再详述。It should be noted that, since a traffic congestion prediction system in this embodiment is based on the same inventive concept as the above-mentioned traffic congestion prediction method, the corresponding content in the method embodiment is also applicable to the system embodiment, here will not be described in detail.

本发明实施例还提供了一种交通拥堵预测设备,包括:至少一个控制处理器和用于与至少一个控制处理器通信连接的存储器。The embodiment of the present invention also provides a traffic jam prediction device, including: at least one control processor and a memory for communicating with the at least one control processor.

存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。As a non-transitory computer-readable storage medium, memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

实现上述实施例的一种交通拥堵预测方法所需的非暂态软件程序以及指令存储在存储器中,当被处理器执行时,执行上述实施例中的一种交通拥堵预测方法,例如,执行以上描述的图1中的方法步骤S100至步骤S500。The non-transitory software programs and instructions required to realize the traffic jam prediction method of the above-mentioned embodiment are stored in the memory, and when executed by the processor, a kind of traffic jam prediction method in the above-mentioned embodiment is executed, for example, the above Steps S100 to S500 of the method in FIG. 1 are described.

以上所描述的系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The system embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个控制处理器执行,可使得上述一个或多个控制处理器执行上述方法实施例中的一种交通拥堵预测方法,例如,执行以上描述的图1中的方法步骤S100至步骤S500的功能。The embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more control processors, so that the above-mentioned one or more The control processor executes a traffic congestion prediction method in the above method embodiment, for example, executes the functions from step S100 to step S500 of the method in FIG. 1 described above.

本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those skilled in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware and an appropriate combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media including, but not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

上面结合附图对本发明实施例作了详细说明,但本发明不限于上述实施例,在所属技术领域普通技术人员所具备的知识范围内,还可以在不脱离本发明宗旨的前提下作出各种变化。The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned embodiments. Within the scope of knowledge of those of ordinary skill in the art, various modifications can be made without departing from the spirit of the present invention. Variety.

Claims (10)

1.一种交通拥堵预测方法,其特征在于,所述交通拥堵预测方法包括:1. a traffic jam prediction method, is characterized in that, described traffic jam prediction method comprises: 获取多源异构数据集,并从所述多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据;Obtain a multi-source heterogeneous data set, and obtain traffic event data, congestion event data and site flow data from the multi-source heterogeneous data set; 采用卷积神经网络提取所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征;Using a convolutional neural network to extract spatial correlation features between the congestion event data, the traffic event data and the traffic congestion to be predicted; 通过特征提取网络提取所述站点流量数据与拥堵的时间依赖关系特征;其中,所述特征提取网络由门控神经单元和注意力机制融合制成;Extracting the time-dependent relationship features of the site traffic data and congestion through a feature extraction network; wherein, the feature extraction network is made by fusing a gated neural unit and an attention mechanism; 从所述多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对所述多种因素数据进行多分类处理和独热编码处理,获得多种因素特征;Obtain multiple factor data from the multi-source heterogeneous data set except traffic event data, congestion event data and site traffic data, and perform multi-classification processing and one-hot encoding processing on the multiple factor data to obtain multiple a factor feature; 将所述空间相关性特征、所述时间依赖关系特征和所述多种因素特征进行拼接,获得时空联合特征,并将所述时空联合特征输入至多层感知机模型中,获得所述待预测的交通拥堵的预测结果。Splicing the spatial correlation feature, the temporal dependence feature and the multiple factor features to obtain the joint spatio-temporal feature, and inputting the joint spatio-temporal feature into the multi-layer perceptron model to obtain the predicted Traffic congestion prediction results. 2.根据权利要求1所述的交通拥堵预测方法,其特征在于,所述从所述多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据,包括:2. traffic congestion prediction method according to claim 1, is characterized in that, described acquisition traffic event data, congestion event data and site traffic data from described multi-source heterogeneous data set, comprises: 对所述多源异构数据集中的交通事件和拥堵事件进行独热编码处理,获取所述交通事件数据和所述拥堵事件数据,对所述多源异构数据集中的站点流量进行归一化处理,获取所述站点流量数据。performing one-hot encoding processing on the traffic events and congestion events in the multi-source heterogeneous data set, obtaining the traffic event data and the congestion event data, and normalizing the site traffic in the multi-source heterogeneous data set Processing, obtaining the site traffic data. 3.根据权利要求1所述的交通拥堵预测方法,其特征在于,所述采用卷积神经网络提取所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征,包括:3. traffic jam prediction method according to claim 1, is characterized in that, described employing convolutional neural network extracts the spatial correlation feature between described traffic jam event data, described traffic event data and the traffic jam to be predicted ,include: 预设第一历史时间步长,获取所述预设第一历史时间步长内的地理位置相邻的第一数量的所述拥堵事件数据的历史数据和所述交通事件数据的历史数据;Preset the first historical time step, and acquire the historical data of the first quantity of the congestion event data and the historical data of the traffic event data that are geographically adjacent within the preset first historical time step; 将所述交通事件数据的历史数据和所述拥堵事件数据的历史数据进行拼接,获得拼接数据序列;Splicing the historical data of the traffic event data and the historical data of the congestion event data to obtain a spliced data sequence; 将所述拼接数据序列输入至所述卷积神经网络中,获得所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征。The concatenated data sequence is input into the convolutional neural network to obtain spatial correlation features between the congestion event data, the traffic event data, and the traffic congestion to be predicted. 4.根据权利要求3所述的交通拥堵预测方法,其特征在于,所述将所述拼接数据序列输入至所述卷积神经网络中,获得所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征,包括:4. traffic jam prediction method according to claim 3, is characterized in that, described splicing data sequence is input in described convolutional neural network, obtains described congestion event data, described traffic event data and waiting time. Spatial correlation features between predicted traffic jams, including: 将所述拼接数据序列输入至所述卷积神经网络中,通过卷积层和池化层处理所述拼接数据序列:The spliced data sequence is input into the convolutional neural network, and the spliced data sequence is processed by a convolutional layer and a pooling layer:
Figure 698391DEST_PATH_IMAGE001
Figure 698391DEST_PATH_IMAGE001
其中,
Figure 84373DEST_PATH_IMAGE002
Figure 441274DEST_PATH_IMAGE003
表示卷积层的输出,E表示所述拼接数据序列,
Figure 305325DEST_PATH_IMAGE004
Figure 385276DEST_PATH_IMAGE005
表示权 重矩阵,
Figure 801214DEST_PATH_IMAGE006
Figure 537089DEST_PATH_IMAGE007
Figure 814618DEST_PATH_IMAGE008
Figure 952338DEST_PATH_IMAGE009
表示偏差矩阵,ReLU表示激活函数,
Figure 539177DEST_PATH_IMAGE010
表示最大函数值,
Figure 559086DEST_PATH_IMAGE011
Figure 764939DEST_PATH_IMAGE012
表示池化层的输出,
Figure 337259DEST_PATH_IMAGE013
表示卷积运算;
in,
Figure 84373DEST_PATH_IMAGE002
and
Figure 441274DEST_PATH_IMAGE003
Represents the output of the convolutional layer, E represents the spliced data sequence,
Figure 305325DEST_PATH_IMAGE004
and
Figure 385276DEST_PATH_IMAGE005
represents the weight matrix,
Figure 801214DEST_PATH_IMAGE006
,
Figure 537089DEST_PATH_IMAGE007
,
Figure 814618DEST_PATH_IMAGE008
and
Figure 952338DEST_PATH_IMAGE009
Represents the bias matrix, ReLU represents the activation function,
Figure 539177DEST_PATH_IMAGE010
represents the maximum function value,
Figure 559086DEST_PATH_IMAGE011
and
Figure 764939DEST_PATH_IMAGE012
Represents the output of the pooling layer,
Figure 337259DEST_PATH_IMAGE013
Indicates the convolution operation;
在所述卷积层和所述池化层处理所述拼接数据序列后,将
Figure 32683DEST_PATH_IMAGE012
输入至全连接层,获得所 述空间相关性特征,所述空间相关性特征表示为:
After the convolutional layer and the pooling layer process the spliced data sequence, the
Figure 32683DEST_PATH_IMAGE012
Input to the fully connected layer to obtain the spatial correlation feature, the spatial correlation feature is expressed as:
Figure 867784DEST_PATH_IMAGE014
Figure 867784DEST_PATH_IMAGE014
其中,
Figure 346169DEST_PATH_IMAGE015
表示在t时刻的所述拥堵事件数据、所述交通事件数据和所述待预测的交通拥 堵之间的空间相关性特征,
Figure 333848DEST_PATH_IMAGE016
表示权重矩阵,
Figure 934594DEST_PATH_IMAGE017
表示偏差矩阵。
in,
Figure 346169DEST_PATH_IMAGE015
Representing the spatial correlation feature between the congestion event data, the traffic event data and the traffic congestion to be predicted at time t,
Figure 333848DEST_PATH_IMAGE016
represents the weight matrix,
Figure 934594DEST_PATH_IMAGE017
represents the bias matrix.
5.根据权利要求1所述的交通拥堵预测方法,其特征在于,所述通过特征提取网络提取所述站点流量数据与拥堵的时间依赖关系特征,包括:5. traffic jam prediction method according to claim 1, is characterized in that, described site traffic data and the time-dependent relationship feature of congestion are extracted by feature extraction network, comprising: 预设第二历史时间步长,获取所述第二历史时间步长内的地理位置排名靠前的第二数量的入站站点流量数据和出站站点流量数据;Preset a second historical time step, and obtain a second quantity of inbound site traffic data and outbound site traffic data of the top geographical locations within the second historical time step; 将所述入站站点流量数据和所述出站站点流量数据进行拼接,获得拼接站点流量数据;Splicing the inbound site traffic data and the outbound site traffic data to obtain spliced site traffic data; 将所述拼接站点流量数据输入至所述门控神经单元中,获得第一向量,所述门控神经 单元第t步输出的第一向量
Figure 866778DEST_PATH_IMAGE018
表示为:
Input the splicing site traffic data into the gated neural unit to obtain a first vector, the first vector output by the gated neural unit in step t
Figure 866778DEST_PATH_IMAGE018
Expressed as:
Figure 539068DEST_PATH_IMAGE019
Figure 539068DEST_PATH_IMAGE019
其中,
Figure 505886DEST_PATH_IMAGE020
表示第t-1步的拼接站点流量数据,
Figure 543113DEST_PATH_IMAGE021
表示第t步的拼接站点流量数据,GRU 表示门控神经单元;
in,
Figure 505886DEST_PATH_IMAGE020
Indicates the splicing site traffic data of step t-1,
Figure 543113DEST_PATH_IMAGE021
Represents the splicing site traffic data of step t, GRU represents the gated neural unit;
将所述第一向量输入至所述注意力机制中,获得第二向量,所述注意力机制计算公式为:The first vector is input into the attention mechanism to obtain a second vector, and the calculation formula of the attention mechanism is:
Figure 336494DEST_PATH_IMAGE022
Figure 336494DEST_PATH_IMAGE022
其中,
Figure 687841DEST_PATH_IMAGE023
表示在t时刻由所述门控神经单元输出向量
Figure 633800DEST_PATH_IMAGE018
的注意力分布值,
Figure 45190DEST_PATH_IMAGE024
Figure 561753DEST_PATH_IMAGE025
表示 权重系数,
Figure 451212DEST_PATH_IMAGE026
表示偏差系数,
Figure 189361DEST_PATH_IMAGE027
表示在j时刻由所述门控神经单元输出向量
Figure 896285DEST_PATH_IMAGE018
的注意力分 布值,
Figure 290358DEST_PATH_IMAGE028
表示注意力权重,i表示总时间;
in,
Figure 687841DEST_PATH_IMAGE023
Indicates the output vector by the gated neuron unit at time t
Figure 633800DEST_PATH_IMAGE018
The attention distribution value of
Figure 45190DEST_PATH_IMAGE024
and
Figure 561753DEST_PATH_IMAGE025
Indicates the weight coefficient,
Figure 451212DEST_PATH_IMAGE026
Indicates the coefficient of deviation,
Figure 189361DEST_PATH_IMAGE027
Indicates that the vector output by the gated neural unit at time j
Figure 896285DEST_PATH_IMAGE018
The attention distribution value of
Figure 290358DEST_PATH_IMAGE028
Represents the attention weight, i represents the total time;
将所述注意力机制输出的向量通过全连接层计算,获得所述时间依赖关系特征,所述全连接层计算公式为:The vector output by the attention mechanism is calculated through a fully connected layer to obtain the time-dependent relationship feature, and the fully connected layer calculation formula is:
Figure 360338DEST_PATH_IMAGE029
Figure 360338DEST_PATH_IMAGE029
其中,
Figure 890677DEST_PATH_IMAGE030
表示在t时刻的时间依赖关系特征,
Figure 502924DEST_PATH_IMAGE031
表示权重矩阵,
Figure 384292DEST_PATH_IMAGE032
表示偏差向量, ReLU表示激活函数。
in,
Figure 890677DEST_PATH_IMAGE030
Indicates the time-dependent relationship feature at time t,
Figure 502924DEST_PATH_IMAGE031
represents the weight matrix,
Figure 384292DEST_PATH_IMAGE032
Represents the bias vector, and ReLU represents the activation function.
6.根据权利要求1所述的交通拥堵预测方法,其特征在于,所述对所述多种因素数据进行多分类处理和独热编码处理,获得多种因素特征,包括:6. traffic congestion prediction method according to claim 1, is characterized in that, described multiple factor data is carried out multi-category processing and one-hot encoding process, obtains multiple factor features, comprising: 若所述多源异构数据集中的所述多种因素数据为二分类变量,则将所述多种因素数据经过多分类处理表示为二分类0-1变量,获得二分类因素数据,并通过独热编码将所述二分类因素数据映射为多种因素特征;If the multiple factor data in the multi-source heterogeneous data set is a binary variable, then the multiple factor data is expressed as a binary 0-1 variable after multi-classification processing, and the binary factor data is obtained, and passed One-hot encoding maps the binary factor data to multiple factor features; 若所述多源异构数据集中的所述多种因素数据为多分类变量,则采用独热编码将所述多种因素数据映射为多种因素特征。If the multi-factor data in the multi-source heterogeneous data set is a multi-category variable, one-hot encoding is used to map the multi-factor data into multi-factor features. 7.根据权利要求1所述的交通拥堵预测方法,其特征在于,所述将所述空间相关性特征、所述时间依赖关系特征和所述多种因素特征进行拼接,获得时空联合特征,并将所述时空联合特征输入至多层感知机模型中,获得所述待预测的交通拥堵的预测结果,包括:7. traffic congestion prediction method according to claim 1, is characterized in that, described spatial correlation feature, described temporal dependence feature and described multiple factor feature are spliced, obtain space-time joint feature, and The joint feature of time and space is input into the multi-layer perceptron model to obtain the prediction result of the traffic jam to be predicted, including: 将所述时空联合特征输入至多层感知机模型中,通过隐藏层和输出层计算获得交通拥堵预测结果,其中,所述隐藏层的计算包括:The joint feature of time and space is input into the multi-layer perceptron model, and the traffic congestion prediction result is obtained through the calculation of the hidden layer and the output layer, wherein the calculation of the hidden layer includes:
Figure 756499DEST_PATH_IMAGE033
Figure 756499DEST_PATH_IMAGE033
其中,
Figure 406923DEST_PATH_IMAGE034
表示在t时刻的所述空间相关性特征,
Figure 190071DEST_PATH_IMAGE035
表示在t时刻的时间依赖关系特征,
Figure 558735DEST_PATH_IMAGE036
表示在t时刻的所述多种因素特征,
Figure 967589DEST_PATH_IMAGE037
表示拼接函数,
Figure 534836DEST_PATH_IMAGE038
表示所述时空联 合特征,
Figure 364252DEST_PATH_IMAGE039
表示所述隐藏层输出的特征向量,
Figure 79267DEST_PATH_IMAGE040
表示权重矩阵,
Figure 917910DEST_PATH_IMAGE041
表示偏差矩阵, ReLU表示激活函数,
Figure 152714DEST_PATH_IMAGE013
表示卷积运算;
in,
Figure 406923DEST_PATH_IMAGE034
Represents the spatial correlation feature at time t,
Figure 190071DEST_PATH_IMAGE035
Indicates the time-dependent relationship feature at time t,
Figure 558735DEST_PATH_IMAGE036
Represents the characteristics of the various factors at time t,
Figure 967589DEST_PATH_IMAGE037
represents the concatenation function,
Figure 534836DEST_PATH_IMAGE038
represents the spatio-temporal joint feature,
Figure 364252DEST_PATH_IMAGE039
represents the feature vector output by the hidden layer,
Figure 79267DEST_PATH_IMAGE040
represents the weight matrix,
Figure 917910DEST_PATH_IMAGE041
Represents the bias matrix, ReLU represents the activation function,
Figure 152714DEST_PATH_IMAGE013
Indicates the convolution operation;
将所述隐藏层输出的特征向量输入至所述输出层,所述输出层的计算包括:The feature vector output by the hidden layer is input to the output layer, and the calculation of the output layer includes:
Figure 215348DEST_PATH_IMAGE042
Figure 215348DEST_PATH_IMAGE042
其中,
Figure 293025DEST_PATH_IMAGE043
表示t+1时刻的所述待预测的交通拥堵的预测结果,
Figure 794414DEST_PATH_IMAGE044
表示权重矩阵,
Figure 273936DEST_PATH_IMAGE045
表示偏差矩阵,
Figure 75846DEST_PATH_IMAGE046
表示激活函数。
in,
Figure 293025DEST_PATH_IMAGE043
Indicates the prediction result of the traffic jam to be predicted at time t+1,
Figure 794414DEST_PATH_IMAGE044
represents the weight matrix,
Figure 273936DEST_PATH_IMAGE045
Denotes the bias matrix,
Figure 75846DEST_PATH_IMAGE046
represents the activation function.
8.一种交通拥堵预测系统,其特征在于,所述交通拥堵预测系统包括:8. A traffic jam forecasting system, characterized in that, the traffic jam forecasting system comprises: 数据获取单元,用于获取多源异构数据集,并从所述多源异构数据集中获取交通事件数据、拥堵事件数据和站点流量数据;A data acquisition unit, configured to acquire a multi-source heterogeneous data set, and acquire traffic event data, congestion event data and site flow data from the multi-source heterogeneous data set; 第一特征提取单元,用于采用卷积神经网络提取所述拥堵事件数据、所述交通事件数据和待预测的交通拥堵之间的空间相关性特征;The first feature extraction unit is used to extract the spatial correlation features between the congestion event data, the traffic event data and the traffic congestion to be predicted by using a convolutional neural network; 第二特征提取单元,用于通过特征提取网络提取所述站点流量数据与拥堵的时间依赖关系特征;其中,所述特征提取网络由门控神经单元和注意力机制融合制成;The second feature extraction unit is used to extract the time-dependent relationship features between the site traffic data and congestion through a feature extraction network; wherein, the feature extraction network is made by fusing a gated neural unit and an attention mechanism; 第三特征提取单元,用于从所述多源异构数据集中获取除交通事件数据、拥堵事件数据和站点流量数据之外的多种因素数据,并对所述多种因素数据进行多分类处理和独热编码处理,获得多种因素特征;The third feature extraction unit is used to obtain multiple factor data except traffic event data, congestion event data and site flow data from the multi-source heterogeneous data set, and perform multi-classification processing on the multiple factor data and one-hot encoding processing to obtain multiple factor features; 预测结果获取单元,用于将所述空间相关性特征、所述时间依赖关系特征和所述多种因素特征进行拼接,获得时空联合特征,并将所述时空联合特征输入至多层感知机模型中,获得所述待预测的交通拥堵的预测结果。The prediction result acquisition unit is used to splice the spatial correlation feature, the time dependency feature and the multiple factor features to obtain the joint spatio-temporal feature, and input the joint spatio-temporal feature into the multi-layer perceptron model , to obtain the prediction result of the traffic congestion to be predicted. 9.一种交通拥堵预测设备,其特征在于,包括至少一个控制处理器和用于与所述至少一个控制处理器通信连接的存储器;所述存储器存储有可被所述至少一个控制处理器执行的指令,所述指令被所述至少一个控制处理器执行,以使所述至少一个控制处理器能够执行如权利要求1至7任一项所述的交通拥堵预测方法。9. A traffic jam prediction device, characterized in that it comprises at least one control processor and a memory for communication connection with the at least one control processor; the memory stores information that can be executed by the at least one control processor instructions, the instructions are executed by the at least one control processor, so that the at least one control processor can execute the traffic congestion prediction method according to any one of claims 1 to 7. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行如权利要求1至7任一项所述的交通拥堵预测方法。10. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make a computer perform the operation described in any one of claims 1 to 7. traffic congestion prediction method.
CN202211612325.6A 2022-12-15 2022-12-15 Traffic jam prediction method, system, equipment and storage medium Active CN115620524B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211612325.6A CN115620524B (en) 2022-12-15 2022-12-15 Traffic jam prediction method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211612325.6A CN115620524B (en) 2022-12-15 2022-12-15 Traffic jam prediction method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115620524A true CN115620524A (en) 2023-01-17
CN115620524B CN115620524B (en) 2023-03-28

Family

ID=84879919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211612325.6A Active CN115620524B (en) 2022-12-15 2022-12-15 Traffic jam prediction method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115620524B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119207100A (en) * 2024-11-27 2024-12-27 南京东控智能交通研究院有限公司 Real-time identification method, device and system for adverse traffic conditions

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170270413A1 (en) * 2016-03-15 2017-09-21 Nec Europe Ltd. Real-time filtering of digital data sources for traffic control centers
JP2019028489A (en) * 2017-07-25 2019-02-21 ヤフー株式会社 Prediction apparatus, prediction method, prediction program, learning data and model
CN109754605A (en) * 2019-02-27 2019-05-14 中南大学 A Traffic Prediction Method Based on Attention Temporal Graph Convolutional Networks
JP2019169028A (en) * 2018-03-26 2019-10-03 東日本高速道路株式会社 Traffic congestion prediction system, traffic congestion prediction method, learning device, prediction device, program and learned model
AU2020102350A4 (en) * 2020-09-21 2020-10-29 Guizhou Minzu University A Spark-Based Deep Learning Method for Data-Driven Traffic Flow Forecasting
CN112085947A (en) * 2020-07-31 2020-12-15 浙江工业大学 Traffic jam prediction method based on deep learning and fuzzy clustering
US20210020038A1 (en) * 2019-07-18 2021-01-21 International Business Machines Corporation Predictive route congestion management
CN113034913A (en) * 2021-03-22 2021-06-25 平安国际智慧城市科技股份有限公司 Traffic congestion prediction method, device, equipment and storage medium
CN113112793A (en) * 2021-03-29 2021-07-13 华南理工大学 Traffic flow prediction method based on dynamic space-time correlation
CN113160570A (en) * 2021-05-27 2021-07-23 长春理工大学 Traffic jam prediction method and system
CN113450568A (en) * 2021-06-30 2021-09-28 兰州理工大学 Convolutional network traffic flow prediction method based on space-time attention mechanism
CN113469425A (en) * 2021-06-23 2021-10-01 北京邮电大学 Deep traffic jam prediction method
US20220058944A1 (en) * 2020-08-24 2022-02-24 Quantela Inc Computer-based method and system for traffic congestion forecasting
CN114692984A (en) * 2022-04-09 2022-07-01 华东交通大学 Traffic prediction method based on multi-step coupling graph convolution network
CN115148019A (en) * 2022-05-16 2022-10-04 中远海运科技股份有限公司 Early warning method and system based on holiday congestion prediction algorithm
CN115222089A (en) * 2022-05-30 2022-10-21 西南交通大学 Road traffic jam prediction method, device, equipment and readable storage medium
CN115359444A (en) * 2022-10-18 2022-11-18 智道网联科技(北京)有限公司 Road congestion prediction method and device

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170270413A1 (en) * 2016-03-15 2017-09-21 Nec Europe Ltd. Real-time filtering of digital data sources for traffic control centers
JP2019028489A (en) * 2017-07-25 2019-02-21 ヤフー株式会社 Prediction apparatus, prediction method, prediction program, learning data and model
JP2019169028A (en) * 2018-03-26 2019-10-03 東日本高速道路株式会社 Traffic congestion prediction system, traffic congestion prediction method, learning device, prediction device, program and learned model
CN109754605A (en) * 2019-02-27 2019-05-14 中南大学 A Traffic Prediction Method Based on Attention Temporal Graph Convolutional Networks
US20210020038A1 (en) * 2019-07-18 2021-01-21 International Business Machines Corporation Predictive route congestion management
CN112085947A (en) * 2020-07-31 2020-12-15 浙江工业大学 Traffic jam prediction method based on deep learning and fuzzy clustering
US20220058944A1 (en) * 2020-08-24 2022-02-24 Quantela Inc Computer-based method and system for traffic congestion forecasting
AU2020102350A4 (en) * 2020-09-21 2020-10-29 Guizhou Minzu University A Spark-Based Deep Learning Method for Data-Driven Traffic Flow Forecasting
CN113034913A (en) * 2021-03-22 2021-06-25 平安国际智慧城市科技股份有限公司 Traffic congestion prediction method, device, equipment and storage medium
CN113112793A (en) * 2021-03-29 2021-07-13 华南理工大学 Traffic flow prediction method based on dynamic space-time correlation
CN113160570A (en) * 2021-05-27 2021-07-23 长春理工大学 Traffic jam prediction method and system
CN113469425A (en) * 2021-06-23 2021-10-01 北京邮电大学 Deep traffic jam prediction method
CN113450568A (en) * 2021-06-30 2021-09-28 兰州理工大学 Convolutional network traffic flow prediction method based on space-time attention mechanism
CN114692984A (en) * 2022-04-09 2022-07-01 华东交通大学 Traffic prediction method based on multi-step coupling graph convolution network
CN115148019A (en) * 2022-05-16 2022-10-04 中远海运科技股份有限公司 Early warning method and system based on holiday congestion prediction algorithm
CN115222089A (en) * 2022-05-30 2022-10-21 西南交通大学 Road traffic jam prediction method, device, equipment and readable storage medium
CN115359444A (en) * 2022-10-18 2022-11-18 智道网联科技(北京)有限公司 Road congestion prediction method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JOHN GILMORE等: "A NEURAL NETWORKS SYSTEM FOR TRAFFIC CONGESTION FORECASTING" *
李桃迎 等: "考虑多特征的高速公路交通流预测模型" *
黄承锋 等: "基于改进 算法的高速公路交通拥堵状况预测" *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119207100A (en) * 2024-11-27 2024-12-27 南京东控智能交通研究院有限公司 Real-time identification method, device and system for adverse traffic conditions

Also Published As

Publication number Publication date
CN115620524B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN110223510A (en) A kind of multifactor short-term vehicle flowrate prediction technique based on neural network LSTM
CN110322695B (en) A short-term traffic flow prediction method based on deep learning
CN109658695B (en) Multi-factor short-term traffic flow prediction method
Zheng et al. Parking availability prediction for sensor-enabled car parks in smart cities
CN110956807B (en) Highway flow prediction method based on combination of multi-source data and sliding window
CN111144648B (en) People flow prediction equipment and method
CN114664091A (en) Early warning method and system based on holiday traffic prediction algorithm
CN113344254A (en) Method for predicting traffic flow of expressway service area based on LSTM-LightGBM-KNN
CN111582559B (en) Arrival time estimation method and device
WO2021082464A1 (en) Method and device for predicting destination of vehicle
CN111462485A (en) Traffic intersection congestion prediction method based on machine learning
US12142140B2 (en) Methods and systems for managing exhaust emission in a smart city based on industrial Internet of Things
CN114418606A (en) Prediction method of online car-hailing order demand based on spatiotemporal convolutional network
CN111242395B (en) Method and device for constructing prediction model for OD (origin-destination) data
CN110570678A (en) A method and device for predicting the total travel time of public transport vehicles from the start point to the end point
CN109993966A (en) A method and device for constructing a user portrait
CN110362576A (en) A kind of bayonet traffic flow forecasting method
CN116663742B (en) Regional capacity prediction method based on multi-factor and model fusion
Yang et al. Short-term prediction of airway congestion index using machine learning methods
CN118982927A (en) A community traffic flow prediction and optimization system based on artificial intelligence
Chuanxia et al. RETRACTED ARTICLE: Machine learning and IoTs for forecasting prediction of smart road traffic flow
CN115620524A (en) A traffic jam prediction method, system, device and storage medium
KR102359902B1 (en) Crossroads LOS Prediction Method Based on Big Data and AI, and Storage Medium Having the Same
CN117391257A (en) A method and device for predicting road congestion
CN116913088A (en) Intelligent flow prediction method for expressway

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant