CN112966871B - Traffic jam prediction method and system based on convolution long-short-term memory neural network - Google Patents

Traffic jam prediction method and system based on convolution long-short-term memory neural network Download PDF

Info

Publication number
CN112966871B
CN112966871B CN202110277593.6A CN202110277593A CN112966871B CN 112966871 B CN112966871 B CN 112966871B CN 202110277593 A CN202110277593 A CN 202110277593A CN 112966871 B CN112966871 B CN 112966871B
Authority
CN
China
Prior art keywords
traffic
data
neural network
short
prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110277593.6A
Other languages
Chinese (zh)
Other versions
CN112966871A (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.)
Shanghai Jiaotong University
Original Assignee
Shanghai Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN202110277593.6A priority Critical patent/CN112966871B/en
Publication of CN112966871A publication Critical patent/CN112966871A/en
Application granted granted Critical
Publication of CN112966871B publication Critical patent/CN112966871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • 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/40Business processes related to the transportation industry
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Tourism & Hospitality (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Primary Health Care (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a traffic jam prediction method based on a convolution long-short-term memory neural network, which comprises the following steps: s1: acquiring historical information related to traffic congestion; s2: constructing traffic jam indexes based on historical information; s3: constructing a prediction model based on a convolutional neural network and a two-way long-short-time memory neural network; s4: training a prediction model based on traffic congestion indicators; s5, performing S5; and predicting the traffic jam condition of the future time period through a prediction model based on the historical information. In addition, the invention also discloses a traffic jam prediction system based on the convolution long-short-term memory neural network. The invention constructs a reasonable and visual traffic jam index based on traffic speed, and fully extracts time, space and period characteristics of traffic data by utilizing the convolutional neural network and the two-way long-short-term memory network, so that the fitting degree of the output prediction result and the actual traffic jam condition is greatly improved.

Description

Traffic jam prediction method and system based on convolution long-short-term memory neural network
Technical Field
The invention relates to the technical field of transportation, in particular to a prediction method for predicting traffic conditions, and especially relates to a traffic jam prediction method based on a convolution two-way long-short-term memory neural network.
Background
Traffic congestion has a serious impact on the quality of life of people, and even if traffic management departments push out various relief policies, along with the explosive growth of the number of motor vehicles, traffic congestion is still one of the most important traffic problems to which people are concerned at present. The accurate short-time traffic jam prediction not only can provide reliable management basis for traffic managers, but also can show the actual road state to road users, is convenient for the road users to make judgment, and plays a great role in relieving traffic jams and reducing traffic accidents.
Short-time traffic jam prediction is used as a research hotspot in the traffic field, and abundant research results are obtained in recent years, and the prediction method mainly can be divided into five categories: a prediction model based on a statistical theory, a prediction model based on a nonlinear theory, a prediction model based on an artificial intelligence theory, a prediction model based on dynamic traffic distribution and a hybrid prediction model. Statistical theory methods are less applied in recent years, but intelligent theory model prediction methods and combined model prediction methods are more common, and especially, the method of combining a neural network with other models to predict short-term traffic congestion gradually becomes a research hotspot. The method based on the statistical theory has lower calculation complexity and relatively simple operation, but the robustness and the precision of the prediction result are not high under the complex condition. The method is based on dynamic traffic distribution, namely a method for estimating and predicting the dynamic traffic state by using computer technologies such as traffic simulation, calculation experiment and the like on the basis of traffic models and traffic data, and the theoretical analysis of the method is more sufficient, various complex situations can be considered, but road network data are difficult to obtain, and the method is difficult to adapt to a large-scale road network. The nonlinear theory prediction method generally utilizes the concepts and methods of chaos attractor concepts, fractal concepts, phase space reconstruction and the like to model, so that the characteristics of short-time traffic flow prediction and nonlinearity of a complex traffic system are highlighted, but model calculation is complex. The intelligent model prediction method based on knowledge discovery is also based on nonlinear prediction, and the model mainly comprises a support vector machine, a random tree and an artificial neural network, has strong data fitting capacity and high prediction precision, but has huge required data scale and is difficult to adjust parameters in training. The existing short-time traffic jam prediction method is low in efficiency, is not visual in result and cannot be well applied to actual traffic evaluation engineering. The two deep learning methods are combined and applied, so that the time and space characteristics of traffic data are extracted more comprehensively, the prediction accuracy is improved, and the short-time traffic jam prediction method based on the deep learning algorithm is provided.
Predicting traffic jam conditions and establishing traffic jam evaluation indexes is the primary work. Related congestion evaluation indexes which are proposed in major cities at home and abroad can be mainly classified into evaluation indexes based on traffic speed, evaluation indexes based on traffic density and evaluation indexes based on traffic volume. As described above, the time average speed, the average travel time, the traffic flow, the delay index, the saturation and the occupancy can be used as parameters for determining traffic congestion, wherein the time average speed and the average travel time more intuitively reflect the congestion of the road, and the speed parameters are widely used due to the characteristics of high practicability, easy understanding and the like. However, the existing congestion evaluation index is generally single and not intuitive, so that an intuitive and easy-to-understand traffic congestion index is provided based on traffic speed to be applied to traffic congestion prediction.
For example: chinese patent document with publication number CN110222873a, publication date 2019, 9, 10, entitled "subway station passenger flow prediction method based on big data" discloses a subway station passenger flow prediction method based on big data. However, the data disclosed in the patent document is not predicted based on the long-short-term memory neural network, and the prediction result and the prediction accuracy of the data cannot meet the current traffic congestion index.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a traffic jam prediction method and system based on a convolution long-short-term memory neural network. Aiming at the existing short-time traffic jam prediction method, the accuracy is not high, the instantaneity is not enough, the data collection redundancy is complex, and the method cannot be well applied to an actual traffic management system. The invention provides a reasonable and visual traffic jam index based on traffic speed, and the time, space and period characteristics of traffic data are fully extracted by utilizing a convolutional neural network and a two-way long-short-term memory network, so that the fitting degree of the output prediction result and the actual traffic jam condition is greatly improved.
In order to achieve the above object, the present invention is achieved by:
in a first aspect, the present invention provides a traffic congestion prediction method based on a convolutional long-short-term memory neural network, which includes the steps of:
s1: acquiring historical information related to traffic congestion;
s2: constructing traffic jam indexes based on historical information;
s3: constructing a prediction model based on a convolutional neural network and a two-way long-short-time memory neural network;
s4: training a prediction model based on traffic congestion indicators;
s5, performing S5; and predicting the traffic congestion situation of the future time period through a prediction model based on the historical information, judging the traffic congestion level according to the output threshold value of the prediction model, and taking the traffic congestion level as a predicted traffic congestion prediction result.
Preferably, the history information includes traffic speed based on road vehicles.
Preferably, in the step S2, the method further includes the steps of:
step S21: carrying out data processing on the historical information to obtain traffic data time sequence data;
step S22: constructing traffic jam judging indexes;
step S23: time sequence processing: three-dimensional input matrix based on space-time correlation.
Preferably, in the step S21, the data processing includes:
taking the average value of data in two adjacent time periods as history information, and carrying out normalization processing on the data according to the MIN-MAX normalization criterion by taking the maximum value and the minimum value of sample data as the history information, wherein the normalization processing is specifically as follows:
Figure BDA0002977268020000031
wherein x represents sample data, x min Representing the minimum value, x, of the sample data max Representing the maximum value of the sample data.
Preferably, in the step S22, a traffic congestion discrimination index is constructed by the following formula:
Figure BDA0002977268020000032
wherein C represents traffic congestion index, s f Representing the traffic speed of the same road section under ideal road conditions; s is(s) r Representing an actual traffic speed of the road segment; f (F) 5 (s r ) Representing the actual speed s r 5% of (C).
Preferably, in the step S23, the time-series process folds according to the adjacent p time periods, the adjacent o time periods, and the adjacent q time periods by the following formulas 1 and 2 to obtain an input matrix [ p, o+1, q ] to be input into the prediction model:
Figure BDA0002977268020000033
X=[X 1 ,X 2 ,…,X q ]formula 2.
Preferably, in the step S3, the first layer convolutional network in the prediction model is configured to perform spatial feature extraction on the input matrix obtained in the step S23, and perform dimension reduction on input data in the input matrix; and extracting time and period characteristics by the second layer of two-way long-short-period memory network, and finally outputting a threshold value.
Preferably, in the step S3, the hidden layer of the prediction model is five layers, the number of neurons of each hidden layer is 50, the regularization term lambda_l1 is set to 0.5, and lambda_l2 is set to 0.2.
Preferably, in said step S5, said traffic congestion level comprises clear, substantially clear, light congestion, medium congestion and heavy congestion.
In a second aspect, the invention provides a traffic jam prediction system based on a convolutional long-short-term memory neural network, wherein the traffic jam prediction system predicts traffic jams by adopting the traffic jam prediction method.
The technical scheme adopted by the invention is a short-time traffic jam prediction method based on a deep learning algorithm, and the prediction accuracy is improved by fully extracting the space-time characteristics of traffic data.
The traffic congestion index is constructed by the following consideration:
the urban road traffic flow is continuously changed under the influence of factors such as resident trip, climate, traffic control and the like. Meanwhile, due to the influence of urban function planning, geographic factors and social activities, traffic flows in different time and areas on the same road have obvious space-time characteristics. In the present invention, the prediction target is not traffic flow, but short-term traffic congestion degree of a certain road section. Because people generally want more intuitive results, such as the intuitive degree of traffic congestion of their interested road segments in the next few minutes or hours, than the actual traffic flow value. According to the design thought, the inventor constructs a traffic jam index C based on the traffic speed of the road vehicle so as to represent the traffic jam degree. Which is expressed as
Figure BDA0002977268020000041
Wherein s is f Representing the traffic speed of the same road section under ideal road conditions; s is(s) r Representing an actual traffic speed of the road segment; f (F) 5 (s r ) Representing the actual speed s r 5% of (C). The traffic congestion index C can describe the traffic state more intuitively than the traffic flow. It can be regarded as an evaluation tool and can reflect the prediction result relatively intuitively.
In the construction of the prediction model input matrix, it is considered that:
the usual input for traffic congestion prediction is one-dimensional time series data. The inventor considers the correlation of traffic data in time and space, folds the obtained one-dimensional traffic data set, and obtains a three-dimensional input matrix by taking time, space and period as axes respectively.
Through a great deal of experiments and researches, the inventor observes traffic in a specific periodThere is a high correlation between the degree of congestion and the degree of traffic congestion between adjacent epochs and adjacent road segments. Thus, to predict the degree of traffic congestion C (m,n) Where m and n are indexes of time periods and road segments, the inventor selects data of p adjacent time periods, o adjacent road segments and q adjacent time periods respectively, and the data are used as main basis of a prediction model. The dimensions of the input matrix after folding are [ p, o+1, q]The specific formula is as follows:
Figure BDA0002977268020000042
X=[X 1 ,X 2 ,…,X q ]
in the present invention, the number o of relevant links, the number p of relevant time periods, and the number q of relevant periods will be set in experiments, and appropriate parameters will be determined through experiments.
And when training the prediction model, the following considerations are taken into account:
the prediction model constructed by the invention is composed of a convolutional neural network (Convolutional Neural Networks) and a two-way Long-Short-Term Memory network (Long Short-Term Memory), and the basic mechanisms of the two networks mainly comprise an input layer, an output layer, an implicit layer and connection weights between the input layer and the output layer. The number of the neurons of the input layer is determined by the number of parameters to be calibrated, the number of the neurons of the output layer is determined by the number of the output targets, and the number of the hidden layers and the number of the neurons of each layer are determined by a user by adjusting the parameters.
In this case, when training data processing is performed: the obtained data set is divided into a training set, a verification set and a test set according to the proportion of 8:1:1. The training set is used for fitting to obtain a functional relation, the verification set is used for verifying the trained model to ensure that the model with the best fitting and selecting effects is not used, and the test set is used for testing the performance of the final model;
and while training the neural network: the method for determining the initial parameters of the neural network mainly comprises the following steps: (1) the number of hidden layers; (2) the number of neurons per hidden layer; (3) an activation function for each layer; (4) learning rate; (5) a regularization term. Giving each neural network a connection weight initial value, and finding out a model with the minimum loss value (defined by a user) of an output result and a verification set through a certain number of iterations. And (3) adjusting model parameters, and training a new model until the optimal model meets the requirements. The specific parameters of the final model were set as follows: the CNN input layer still adopts 3-DConvolution Layer, the learning rate is set to 0.02, the pooling layer is abandoned, the hidden layer number is 5, the number of nerve cells in each layer is set to 50, the regularization term lambda_L1 is set to 0.5, and lambda_L2 is set to 0.2. Overfitting is always a difficult and common problem in neural network training. To prevent overfitting, the inventors used the following method: 1) Adding L2 regularities in the network parameters to limit the size of the network parameters; 2) The addition of a dropout layer in the CNN and BiLSTM networks for training, it should be noted that the dropout layer is not used in the test, and the specific setting manner is known to those skilled in the art, so that the description thereof is omitted herein. Through the two methods, the network can be effectively prevented from being fitted in the training process;
after training the neural network as a predictive model, the model is tested: testing the trained model by using a test set, if the loss value of the test set is smaller than that of a verification set, considering that the model does not converge, returning to the step of training the model, and increasing the iteration times to continue training; if the test set loss value is slightly greater than the validation set (e.g., if the difference is 5, it is determined that the test set loss value is greater than the validation set), the model is acceptable; if the test set loss value is significantly greater than the validation set (e.g., if the difference is 80, it is determined that it is significantly greater), the model may be trained back to the re-tuning step, taking into account the potential for overfitting, until the model is acceptable.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a reasonable and visual traffic jam index based on traffic speed, and the time, space and period characteristics of traffic data are fully extracted by utilizing a convolutional neural network and a two-way long-short-term memory network, so that the fitting degree of the output prediction result and the actual traffic jam condition is greatly improved. Firstly, constructing a traffic jam index based on traffic speed, so that a prediction result is more visual, and folding data according to time, space and periodic characteristics of the traffic speed to construct a three-dimensional input matrix. And then, extracting spatial features by using a convolutional neural network, extracting time and periodic features by using a two-way long-short-term memory neural network, and combining the two features to output a prediction result. Compared with other prediction methods, the method utilizes traffic jam indexes constructed by traffic speed to make the prediction result more visual; the convolution neural network and the two-way long-short-term memory neural network are combined, so that the advantages of the convolution neural network and the two-way long-short-term memory neural network can be integrated, the extracted data features are more complete, and the prediction result is more accurate. Therefore, the method provided by the invention can accurately and efficiently predict the road traffic jam condition and is suitable for practical application.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a flow chart of the steps of the present invention;
fig. 2 is a schematic flow chart of the algorithm of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present invention.
The invention considers that the actual project has higher requirements on the congestion prediction efficiency and the accuracy, so the invention provides a method of a deep learning algorithm with higher efficiency compared with the traditional nonlinear statistical prediction algorithm.
FIG. 1 is a flow chart of the steps of the present invention.
The traffic jam prediction method based on the convolution long-short-term memory neural network is described with reference to fig. 1, and specifically comprises the following steps:
firstly, screening and processing the original traffic speed data to obtain a prediction model input matrix formed by traffic jam indexes, wherein the specific steps are as follows:
(1) The original data is screened and processed to improve the quality of the data, so that the accuracy of prediction is improved, and the missing data and the error data are mainly processed. The environmental conditions or equipment conditions may cause data loss and errors when they are unstable or fail. Traversing original data, and if blank conditions are found, selecting an average value of two adjacent data before and after to replace the original data; if the value of a certain data in the original data is found to be too large, too small or negative, the data is considered to be abnormal, the processing mode is that firstly, the error data is proposed, and the average value of two adjacent data is used for replacing the error data;
(2) The original traffic speed data is formulated
Figure BDA0002977268020000061
It is converted into traffic jam index;
(3) Taking the maximum value and the minimum value of the sample data, and normalizing the data according to the MIN-MAX normalization criterion, namely
Figure BDA0002977268020000071
Wherein x represents sample data, x min Representing the minimum value, x, of the sample data max Representing the maximum value of the sample data;
(4) Folding the one-dimensional traffic congestion index data obtained through the steps, and obtaining a three-dimensional input matrix by taking time, space and period as axes respectively.
It should be noted that, in this case, the sample data is data after pretreatment and conversion. Because the original collected road data is too redundant or noise exists, the original data is preprocessed and then used as sample data. In this case, the raw data is collected from the north-south elevated road of Shanghai city.
Subsequently, a prediction model is trained and predicted, the algorithm process can be seen in fig. 2, and fig. 2 is a schematic algorithm flow chart of the present invention, and specific steps are as follows:
(1) The data set obtained after the processing is divided into a training set, a verification set and a test set according to a certain proportion (the invention adopts 8:1:1). The training set is used for fitting to obtain a functional relationship, the verification set is used for verifying the trained model to ensure that the model with the best fitting and selecting effects is not used, and the test set is used for testing the performance of the final model.
(2) Constructing a prediction model: constructing a convolution two-way long-short-term memory network Conv-BiLSTM as a congestion prediction model, wherein a first layer of convolution network is used for extracting spatial features of a three-dimensional input matrix and reducing the dimension of input data; and extracting time and period characteristics of the second layer of two-way long-short-period memory network, and finally outputting a prediction result.
(3) Training a prediction model: the method for determining the initial parameters of the neural network mainly comprises the following steps: the number of hidden layers; the number of neurons in each hidden layer; an activation function for each layer; a learning rate; regular terms, etc.
(4) Adjusting parameters of different models by using the method in the step (3), training a plurality of models, and selecting an optimal parameter combination according to the global error of the final verification set;
(5) And testing the performance of the data of the optimal parameter combination test set, and finishing training when the performance meets the requirement, wherein the optimal parameter combination is determined according to the global error of the final verification set, and the optimal parameter combination with the minimum global error of the verification set is optimal.
And finally, the trained model is used for predicting the input data and outputting to obtain a traffic jam prediction result.
Application examples:
the following specific examples illustrate that the method can effectively and accurately predict traffic congestion. In the embodiment, the data come from traffic speed data of a section of road of the south-north elevated road of Shanghai city, one-dimensional traffic speed data are converted by processing the data, so as to obtain traffic congestion indexes constructed in the text, and the congestion degree is divided into 5 degrees according to the numerical value of the traffic congestion indexes and the data are referred to, as shown in the following table 1. And then folding the one-dimensional traffic congestion index data into three-dimensional data, wherein the latitude is time, space and period respectively, and the three-dimensional data is used as the input of a prediction model, and the obtained three-dimensional matrix is input into the prediction model to carry out traffic congestion prediction.
The traffic speed data adopted by the invention adopts traffic speed data of the corresponding road sections of the south-north overhead of Shanghai city from 1 st of 2013, 6 th and 1 st of 2013, 7 th and 1 st of Shanghai. Firstly, screening and processing the obtained original data, converting the original traffic speed data into traffic jam index data according to the following formula C=s_f/(F≡5 (s_r)), and assuming that the traffic speed of a road section is 60km/h under an ideal state according to related traffic department management data. Next, in order to more intuitively display the traffic congestion status, the traffic status is distinguished according to the value of the congestion index c (distinguished into five levels), as shown in table 1.
TABLE 1 traffic state definition table
Traffic state Speed threshold Traffic congestion index range
Clear (65,100) c<0.97
Is basically unblocked (50,65] 0.97≤c<1.26
Mild congestion (35,50] 1.26≤c<1.80
Moderate congestion (20,35] 1.80≤c<3.16
Severe congestion (0,20] c≥3.16
And then folding the obtained one-dimensional time sequence data, constructing a three-dimensional input matrix by taking time, space and period as axes, and inputting the three-dimensional input matrix into a prediction model for prediction. The input data is divided into a training set, a verification set and a test set according to the proportion of 8:1:1, and a prediction model is trained according to the method of training the prediction model.
Comparing the predicted result of a certain day with the actual situation, and comparing the predicted result with the actual situation to see that the prediction is more accurate when the traffic state change trend is more stable; and at some point of mutation, the prediction is biased.
The prediction method provided by the invention is compared with other classical traffic jam prediction methods, and average absolute error (Mean Absolute Error, MAE) and root mean square error (Root Mean Square Error, RMSE) are used as evaluation indexes. MAE reveals the degree of deviation between the actual and predicted values, which is an ideal model when the predicted value is exactly the same as the actual value, equal to 0; the larger the error, the larger its value. RMSE is relatively sensitive to raw data and is very good at measuring accuracy. The predicted result pair is shown in table 2.
Table 2 traffic congestion prediction method vs. table
Figure BDA0002977268020000081
Figure BDA0002977268020000091
As can be seen from Table 2, the congestion prediction method of the invention can effectively improve the accuracy of traffic congestion prediction, thereby assisting traffic management departments in carrying out traffic management, analysis and other works.
It should be noted that the prior art part in the protection scope of the present invention is not limited to the embodiments set forth in the present application, and all prior art that does not contradict the scheme of the present invention, including but not limited to the prior patent document, the prior publication, the prior disclosure, the use, etc., can be included in the protection scope of the present invention.
In addition, the combination of the features described in the present application is not limited to the combination described in the claims or the combination described in the embodiments, and all the features described in the present application may be freely combined or combined in any manner unless contradiction occurs between them.
The foregoing describes specific embodiments of the present invention. It is to be understood that the invention is not limited to the particular embodiments described above, and that various changes or modifications may be made by those skilled in the art within the scope of the appended claims without affecting the spirit of the invention. The embodiments of the present application and features in the embodiments may be combined with each other arbitrarily without conflict.

Claims (6)

1. A traffic jam prediction method based on a convolution long-short-term memory neural network is characterized by comprising the following steps:
s1: acquiring historical information related to traffic congestion;
s2: constructing traffic jam indexes based on historical information;
s3: constructing a prediction model based on a convolutional neural network and a two-way long-short-time memory neural network;
s4: training a prediction model based on traffic congestion indicators;
s5, performing S5; predicting the traffic congestion situation of a future time period through a prediction model based on the historical information, judging the traffic congestion level according to the output threshold value of the prediction model, and taking the traffic congestion level as a predicted traffic congestion prediction result;
in the step S2, the method further includes the steps of:
step S21: carrying out data processing on the historical information to obtain traffic data time sequence data;
step S22: constructing traffic jam judging indexes;
step S23: time sequence processing: a three-dimensional input matrix based on spatio-temporal correlation;
in the step S21, the data processing includes:
taking the average value of data in two adjacent time periods as history information, and carrying out normalization processing on the data according to the MIN-MAX normalization criterion by taking the maximum value and the minimum value of sample data as the history information, wherein the normalization processing is specifically as follows:
Figure QLYQS_1
wherein x represents sample data, x min Representing the minimum value, x, of the sample data max Representing the maximum value of the sample data;
in the step S21, the data processing includes:
taking the average value of data in two adjacent time periods as history information, and carrying out normalization processing on the data according to the MIN-MAX normalization criterion by taking the maximum value and the minimum value of sample data as the history information, wherein the normalization processing is specifically as follows:
Figure QLYQS_2
wherein x represents sample data, x min Representing the minimum value, x, of the sample data max Representing the maximum value of the sample data;
in the step S23, the time series process folds according to the adjacent p time periods, the adjacent o time periods, and the adjacent q time periods by the following formulas 1, 2 to obtain an input matrix [ p, o+1, q ] to be input into the prediction model:
Figure QLYQS_3
X=[X 1 ,X 2 ,…,X q ]formula 2.
2. The traffic congestion prediction method based on a convolutional long-short term memory neural network according to claim 1, wherein the history information includes traffic speed based on road vehicles.
3. The traffic congestion prediction method based on the convolutional long-short-term memory neural network according to claim 1, wherein in the step S3, a first layer convolutional network in the prediction model is used for extracting spatial features of the input matrix obtained in the step S23, and reducing the dimension of input data in the input matrix; and extracting time and period characteristics by the second layer of two-way long-short-period memory network, and finally outputting a threshold value.
4. The traffic congestion prediction method based on the convolutional long-short-term memory neural network according to claim 1, wherein in the step S3, hidden layers of the prediction model are five layers, the number of neurons of each hidden layer is 50, a regularized term lambda_l1 is set to 0.5, and lambda_l2 is set to 0.2.
5. The traffic congestion prediction method based on the convolutional long-short-term memory neural network according to claim 1, wherein in the step S5, the traffic congestion level includes clear, substantially clear, light congestion, medium congestion, and heavy congestion.
6. A traffic congestion prediction system based on a convolutional long-short-term memory neural network, wherein the traffic congestion prediction system predicts traffic congestion by using the traffic congestion prediction method according to any one of claims 1 to 5.
CN202110277593.6A 2021-03-15 2021-03-15 Traffic jam prediction method and system based on convolution long-short-term memory neural network Active CN112966871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110277593.6A CN112966871B (en) 2021-03-15 2021-03-15 Traffic jam prediction method and system based on convolution long-short-term memory neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110277593.6A CN112966871B (en) 2021-03-15 2021-03-15 Traffic jam prediction method and system based on convolution long-short-term memory neural network

Publications (2)

Publication Number Publication Date
CN112966871A CN112966871A (en) 2021-06-15
CN112966871B true CN112966871B (en) 2023-05-05

Family

ID=76279243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110277593.6A Active CN112966871B (en) 2021-03-15 2021-03-15 Traffic jam prediction method and system based on convolution long-short-term memory neural network

Country Status (1)

Country Link
CN (1) CN112966871B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113538903B (en) * 2021-06-21 2022-07-22 东南大学 Traffic jam prediction method based on traffic flow characteristic extraction and classification
CN114015825B (en) * 2021-11-09 2022-12-06 上海交通大学 Method for monitoring abnormal state of blast furnace heat load based on attention mechanism
CN114493402B (en) * 2021-12-17 2024-04-09 重庆特斯联智慧科技股份有限公司 Logistics robot distribution time prediction method and system
CN115394083B (en) * 2022-08-29 2023-06-06 合肥工业大学 Highway traffic jam prediction method based on deep learning
CN115359662B (en) * 2022-10-18 2023-01-10 智道网联科技(北京)有限公司 Lane congestion prediction method and device
CN116050673B (en) * 2023-03-31 2023-08-01 深圳市城市交通规划设计研究中心股份有限公司 Urban public transport passenger flow short-time prediction method based on CNN-BiLSTM

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110766942A (en) * 2019-10-18 2020-02-07 北京大学 Traffic network congestion prediction method based on convolution long-term and short-term memory network
CN111145541A (en) * 2019-12-18 2020-05-12 深圳先进技术研究院 Traffic flow data prediction method, storage medium, and computer device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647834B (en) * 2018-05-24 2021-12-17 浙江工业大学 Traffic flow prediction method based on convolutional neural network structure
CN109934496B (en) * 2019-03-14 2021-03-23 北京百度网讯科技有限公司 Method, device, equipment and medium for determining inter-area traffic influence
CN111383452A (en) * 2019-12-03 2020-07-07 东南大学 Method for estimating and predicting short-term traffic running state of urban road network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110766942A (en) * 2019-10-18 2020-02-07 北京大学 Traffic network congestion prediction method based on convolution long-term and short-term memory network
CN111145541A (en) * 2019-12-18 2020-05-12 深圳先进技术研究院 Traffic flow data prediction method, storage medium, and computer device

Also Published As

Publication number Publication date
CN112966871A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112966871B (en) Traffic jam prediction method and system based on convolution long-short-term memory neural network
CN110570651B (en) Road network traffic situation prediction method and system based on deep learning
Zhang et al. Deep-learning-based probabilistic forecasting of electric vehicle charging load with a novel queuing model
CN106650767B (en) Flood forecasting method based on cluster analysis and real-time correction
CN111091143B (en) Distribution transformer weight overload early warning method based on deep belief network and K-means clustering
CN111832814A (en) Air pollutant concentration prediction method based on graph attention machine mechanism
CN102694800A (en) Gaussian process regression method for predicting network security situation
CN101866143B (en) Road traffic service level prediction method based on space-time characteristic aggregation
CN105117593A (en) Wavelet transform and particle swarm optimized grey model-based short-term wind speed forecasting method
CN115440032A (en) Long-term and short-term public traffic flow prediction method
CN113496314B (en) Method for predicting road traffic flow by neural network model
CN112418518A (en) Passenger flow prediction method and device based on time characteristic weight and network topology
CN115496257A (en) Short-term vehicle speed prediction based on space-time fusion
Li et al. A new multipredictor ensemble decision framework based on deep reinforcement learning for regional gdp prediction
CN113537569A (en) Short-term bus passenger flow prediction method and system based on weight stack decision tree
CN113837473A (en) Charging equipment fault rate analysis system and method based on BP neural network
CN117494034A (en) Air quality prediction method based on traffic congestion index and multi-source data fusion
CN104143117A (en) Method for extracting correlation coefficient between special loads and day loads of power grid
CN104239689A (en) Optimal relevance vector machine based short-term wind speed prediction method
CN117238126A (en) Traffic accident risk assessment method under continuous flow road scene
CN116663742A (en) Regional capacity prediction method based on multi-factor and model fusion
Mao et al. Naive Bayesian algorithm classification model with local attribute weighted based on KNN
CN115829150A (en) Accumulated water prediction system
CN112907953B (en) Bus travel time prediction method based on sparse GPS data
Yang et al. Vehicle information influence degree screening method based on GEP optimized RBF neural network

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