Disclosure of Invention
In view of the problems in the introduction of the background art, the present invention provides a method, a system and a device for controlling and recommending traffic signals in a smart city, which form a closed-loop self-learning mechanism, adapt to the complex traffic conditions, and provide a recommended parameter value for signal control with good traffic signal control effect, thereby improving the traffic service capability of the whole city.
The technical scheme adopted by the invention is as follows:
a smart city traffic signal control recommendation method comprises the following steps:
acquiring, by one or more computing components, real-time signal control data;
inputting, by one or more computing components, real-time signal control data to a signal control recommendation model;
receiving, by the one or more computing components, a signal control recommendation parameter value output by the signal control recommendation model in response to the real-time signal control data;
the method for acquiring the signal control recommendation model comprises the following steps:
acquiring a signal control data set I;
training one or more deep learning algorithms by using the signal control data set I to obtain a deep learning algorithm model;
and selecting a deep learning algorithm model meeting the performance requirement of the model.
Further, the method for acquiring the network structure of the deep learning algorithm comprises the following steps:
acquiring a signal control data set II;
in the network structure search space of the one or more deep learning algorithms, utilizing the signal control data set II to search for a network structure;
a network structure is selected that satisfies the search requirements.
Further, acquiring the signal control data set includes: signal control data associated with a control scheme operator is extracted as a signal control data set.
And further, one or more computing components acquire cache data, judge whether the trigger condition is met, and trigger the corresponding computing components to work.
Further, the signal control data includes control scheme data and detector data.
A smart city traffic signal control recommendation system comprises a multidimensional database, a deep learning algorithm pool, a neural architecture generator, an algorithm selector and a signal control recommendation model, wherein,
the multidimensional database provides a signal control data set;
the deep learning algorithm pool provides one or more deep learning algorithms;
the neural framework generator acquires a signal control data set II, searches a network structure in one or more network structure search spaces of the deep learning algorithm by using the signal control data set II, and selects the network structure of the deep learning algorithm meeting the search requirement;
the method comprises the steps that an algorithm selector obtains a signal control data set I, one or more deep learning algorithms are trained by the signal control data set I to obtain a deep learning algorithm model, and the deep learning algorithm model meeting the performance requirement of the model is selected;
the signal control recommendation model obtains real-time signal control data based on the deep learning algorithm model output by the algorithm selector, and outputs a signal control recommendation parameter value responding to the real-time signal control data.
And the data processing module is used for extracting a signal control data set related to a control scheme operator to serve as a signal control data set I and a signal control data set II.
And the system further comprises a regulation and control triggering unit, wherein the regulation and control triggering unit is used for acquiring the cache data, judging whether a triggering condition is met or not, and controlling the recommended model, the algorithm selector and the neural framework generator to work by a triggering signal.
The system further comprises an expert judgment module for judging whether the signal control recommended parameter value meets the control parameter verification condition, and if so, outputting a signal control recommended parameter value; if not, judging whether the signal control recommended parameter value is feasible or not by the expert, if so, outputting the signal control recommended parameter value, and if not, setting a preset configuration item of the intelligent city traffic signal control recommended system by the expert.
A device matched with a smart city traffic signal control recommendation system comprises a memory and a processor, wherein the memory stores data and instructions operated by the device, and the processor executes the instructions stored by the memory, wherein the device comprises: downloading a signal control recommendation model; the system comprises a selective download deep learning algorithm pool, a neural framework generator, an algorithm selector, a data processing module and a regulation and control triggering unit; and executing the corresponding instruction.
Compared with the prior art, the invention has the following remarkable advantages: (1) a closed-loop self-learning mechanism is formed, and the model can be continuously updated and iterated according to feedback. (2) Data related to the control scheme operator is extracted to serve as training data of the model, and the signal control scheme recommended by the model is more accurate and more targeted. (3) And a regulation and control trigger mechanism is set, so that signal control recommendation is effectively given in time.
Detailed Description
The present invention is further illustrated by the following examples, which are not intended to limit the invention to these embodiments. It will be appreciated by those skilled in the art that the present invention encompasses all alternatives, modifications and equivalents as may be included within the scope of the claims.
Associated with traffic signal control are class 2 data, control scheme data and detector data, the control scheme data being associated with data executed by the traffic signal control system, including but not limited to: crossing number, phase sequence data, phase on/off information, split ratio, cycle duration data, phase start time and cycle start time data, etc. Such as:
detectors include, but are not limited to: geomagnetism, coils, video, GPS, etc., and detector data related to traffic operating conditions including, but not limited to: collecting time, collecting address, flow data, saturation data, etc., such as:
the invention learns the control scheme data and the detector data based on the deep learning algorithm, acquires new knowledge, updates the knowledge, recombines the knowledge structure, realizes the output of the signal control recommendation parameter value and continuously improves the signal control effect. Deep learning algorithms include, but are not limited to: a recurrent neural network RNN, a recurrent gate unit GRU, a long-short term memory network LSTM, etc. The signal control recommended parameter value is related to the control scheme data and the detector data, and can be transmitted to a traffic signal control system for execution, and the signal control recommended parameter value comprises but is not limited to: minimum green time for each phase, amount of change in phase green time, green ratio, amount of change in green ratio, and the like.
One embodiment 1, referring to fig. 3, the LSTM can solve the long and short term dependency problem, and the LSTM includes three gate designs: the input gate processes input information at the current moment and is responsible for transmitting instant information to the memory cell; the forgetting door processes the long-term state and is responsible for continuously storing the long-term information; the output gate processes the current cell state and is responsible for controlling the long-term state as the output of the current LSTM. And sequentially processing the data of each period, updating the model parameters by utilizing the back propagation of the error, and further estimating the information of the future designated period. The gate has the formula, where σ is the activation function, W is the change matrix, and XtIs an input parameter, b is a bias function:
g(X)=σ(WXt+b)
input of LSTM: xtThe information at the time t is in the form of a tensor [ split, flow, saturation [ ]];
Output of LSTM: the variation between the green signal ratio of the current period and the green signal ratio of the last period is the signal control recommended parameter value;
target of LSTM: the signal output by the LSTM controls the difference between the recommended parameter value and the actual value within a certain time period to be minimized;
training of LSTM: collecting a certain amount of [ green ratio, flow and saturation ] data as a training set, constructing an input, an output and a target, training an LSTM, and obtaining an LSTM algorithm model. When new [ split, flow, saturation ] data is input to the LSTM algorithm model, the model may output the new split variance.
In embodiment 2, referring to fig. 4, RNN algorithm process: x is the number oftInformation representing the input at time t, stRepresenting the hidden state of the model at sequence index t. stFrom xtAnd st-1Jointly determining; otRepresenting the output of the model at sequence index t. otOnly by the current hidden state st of the model. The two matrixes of U and W are x in RNN networktAnd stParameter of linear relationship, V being stThe output layer parameters of (1). It is shared throughout the RNN network. RNN processes data of each period, reversely propagates errors to update parameter values, estimates information of a future period, and adopts the following algorithm formula, wherein W represents weight from a hidden layer to the hidden layer, U represents weight from an input layer to the hidden layer, V represents weight from the hidden layer to an output layer, and f and g represent activation functions:
st=f(Uxt+Wst-1)
ot=g(Vst)
input to RNN: xtThe information at the time t is in the form of a tensor [ split, flow, saturation [ ]];
Output of RNN: the variation between the green signal ratio of the current period and the green signal ratio of the last period is the signal control recommended parameter value;
target of RNN: the signal output by the RNN controls the difference between the recommended parameter value and the actual value within a certain time period to be minimized;
training of RNN: collecting a certain number of phase green light duration and flow]Taking the data as a training set, constructing an input, an output and a target, training an RNN (neural network) and obtaining an initial RNN algorithm model; controlling an initial RNN algorithm model with traffic signalsThe simulation system is connected with the traffic signal control simulation system to obtain the green light time length and the flow of the phase position and the phase position]Data as xtUpdating the hidden state stOutput signal controls recommended parameter value otTransmitted to a traffic signal control simulation system which executestThe simulation system operates to generate new [ phase, phase green light duration and flow]And transmitting the data to an RNN algorithm model, and training the RNN for a period of time by using the target to obtain the RNN algorithm model.
Aiming at the complex and changeable conditions of urban roads, the same algorithm model has different performances at different intersections, and the different algorithm models have different performances in the same intersection environment, the invention is provided with the algorithm selector to realize the independent selection of the proper algorithm model in different intersections and different environments and generate the corresponding intersection signal control recommendation so as to meet the intersection signal control requirement.
The pool of deep learning algorithms provides one or more deep learning algorithms, including but not limited to the following: a Recurrent Neural Network (RNN for short); a circulating gate Unit (Gated Current Unit, GRU for short); long Short Term Memory network (Long Short-Term Memory, LSTM for Short); a Bi-directional Long Short Term Memory network (Bi-directional Long Short-Term Memory, BiLSTM); a Bi-directional circulating gate Unit (Bi-directional gated current Unit, abbreviated as BiLSTM); convolutional neural network-Long Short-Term Memory network (CNN-LSTM); convolutional Neural network-bidirectional cyclic gate Unit (CNN-BiGRU for short); an Attention-based convolutional Neural Network (Att-RNN for short); a Dual-Stage Attention-Based recurrent neural Network (DA-RNN for short) is provided.
An implementation mode 3 is that a deep learning algorithm model selection process is performed, N deep learning algorithms are obtained by training according to implementation modes 1 and 2, model performances are compared, and a deep learning algorithm model meeting the model performance requirements is selected according to preset model performance requirements. Model properties include, but are not limited to: target values for model training to end, time required for model training, output performance of model application to the new data set, etc.
In an embodiment 4, referring to fig. 6, the same input, output and model performance metrics are constructed, and different algorithm models are generated after training different algorithms by using a training set in a signal control data set I; then, test set data in the signal control data set I are put into a model to generate a signal control recommended parameter value; comparing the signal control recommended parameter value generated by the model with the actual signal control parameter value, and calculating a Loss function Loss; and finally, transversely comparing Loss functions Loss of the algorithm models, and selecting the algorithm model with the lowest Loss value.
The deep learning algorithm has a certain network structure before training, such as the number of hidden layers, the size of a convolution kernel, the step size of the convolution kernel and the like, and the same deep learning algorithm with different network structures also has different performances. In order to select the deep learning model with excellent performance, the invention arranges a neural framework generator to generate a network structure with excellent performance of a deep learning algorithm.
The network structure search may adopt methods such as: 1) setting a certain step length or window, dividing feasible search space of the network structure to form a limited number of network structures to be searched, training and comparing one by one, and selecting the network structures to be searched with excellent performance; 2) randomly generating a group of feasible network structures to be searched by using an evolutionary algorithm, training and comparing, selecting partial network structures to be searched with excellent performance, carrying out variation, intersection and combination to form a new group of feasible network structures to be searched, and continuously and repeatedly selecting, varying, intersecting and combining until the evolutionary conditions are met to form a final network structure.
In an implementation manner 5, referring to fig. 5, the deep learning algorithm generates a network structure by using a neural architecture search method, and obtains a network structure to be searched in a feasible search space of the network structure through a recurrent neural network controller based on Deep Reinforcement Learning (DRL). Neural network structures in the DRL include RNN and LSTM. And then inputting the training set in the signal control data set II into the network structure to be searched for training, testing the test set in the signal control data set II to obtain the accuracy rate R, returning the accuracy rate R to the recurrent neural network controller, continuously optimizing by the controller to obtain another network structure to be searched, and repeating the steps until a network structure with excellent performance is obtained. Excellent performance means that the performance of the algorithm model meets the preset requirement. Network structures include, but are not limited to: hidden layer number, node weight, learning rate, convolution kernel, etc.
Aiming at the conditions of large quantity, complex types and high new data generation speed of signal control data, the quality of a signal control data set plays an important role in the expression of a deep learning algorithm model. The invention sets a data processing module to process the signal control data to obtain a proper signal control data set I, II, thereby improving the quality of the data set and further optimizing the expression of the algorithm model.
The signal control data is processed by the following method:
(1) and (4) preprocessing data, identifying missing data and supplementing the missing data.
In one embodiment 6, the data loss problem is repaired using a multiple linear regression model. Firstly, a scatter diagram is made of the existing data, then multivariate regression is made, and a multivariate linear regression polynomial and a confidence interval are obtained. And (4) making a residual analysis graph to verify the fitting effect, wherein the smaller residual indicates that the regression polynomial is well matched with the source data, and the missing data can be supplemented.
(2) And (4) preprocessing data, identifying abnormal data and correcting the abnormal data.
In one embodiment 7, the abnormal data is cleaned and corrected by determining whether the data is an abnormal value by using a statistical t-test method and then interpolating the abnormal value by using a spline function, thereby correcting the abnormal data.
(3) And data sorting, namely associating the control scheme data with the detector data and arranging the data according to a rule.
In one embodiment 8, control scheme data (e.g., timing parameters) are sorted by the cycle start time of the control scheme, and associated detector data (e.g., flow, saturation data) are extracted in chronological order of the control scheme data and combined in a [ timing parameters, saturation, flow ] manner. Further, the timing parameters are sorted according to the receiving time, and the data participating in sorting comprises cycle time (seconds) and the green-to-signal ratios (percentages) of all phases, which are sorted according to time sequence. In addition, the data of the detector, such as flow and saturation, are sequenced according to the preset lane sequence and combined into a new sequence.
(4) Data extraction, when the control scheme data is from different control scheme operators, data associated with the control scheme operators can be extracted as a signal control data set to simulate behavior of the control scheme operators to give signal control recommended parameter values proximate to the control scheme operators.
In an embodiment 9, in the case of applying an adaptive traffic signal control system (such as a SCATS system), when a traffic operation condition slightly changes, the adaptive traffic signal control system may perform fine adjustment on control scheme data; when the traffic running condition is changed greatly, the regulation and control range of the self-adaptive traffic signal control system is exceeded, and manual regulation and control are required to be carried out by a traffic control personnel. And selecting control scheme data adjusted by the first-line traffic controller for simulating the adjustment behavior of the first-line traffic controller on the signal control parameters. Referring to fig. 2, after data preprocessing and data sorting are performed on the original data, the timing scheme data is as follows:
crossing number
|
Date of receipt
|
Receiving time
|
Cycle time
|
A
|
B
|
C
|
D
|
E
| F
|
G |
|
1
|
2018-8-1
|
07:00:00
|
180s
|
45s
|
54s
|
27s
|
27s
|
27s
|
0s
|
0s |
The detector data are as follows:
crossing number
|
Date of receipt
|
Receiving time
|
DS1
|
…
|
DS16
|
VO1
|
…
|
VO16
|
1
|
2018-8-1
|
07:00:00
|
60
|
…
|
48
|
12
|
…
|
8 |
Wherein DS represents saturation, VO represents flow, numeral represents lane number, and detector data and timing parameter data are in one-to-one correspondence according to time relationship.
The sorted data is used for circularly subtracting the green ratio data of the timing parameter of the next period from the green ratio data of the previous period, and the green ratio parameter of the jth period is set as SjThe green signal ratio of the A phase is Sj,AThe split parameter of the j-1 th period is Sj-1The period duration is c, the green ratio of the A phase is Sj-1,AThe mathematical expression is as follows:
pA=|Sj,A-Sj-1,A|/c*100%
when p isAIs greater than or equal to p0Meanwhile, the control scheme data and the detector data from the j period to the j-M +1 period (M periods in total) are taken out and constructed into a new small data set. The other phases are analogized as long as there is a change in the duration of the split ratio of one phase greater than or equal to p0The solution is then extracted to form a small dataset. And finally, collecting all the selected small data sets to form a large data set.
Preferably, p is05% and M is 10. And 5% is a boundary line of manual regulation and control operation, and in order to extract historical data near the time of the manual regulation and control operation, improve the quality of a data training set, improve the accuracy of an algorithm and improve the calculation efficiency, the change of the green signal ratio of a certain phase relative to the green signal ratio of the previous period is more than or equal to 5% of the total period time and is selected as training data.
(5) And data extraction, namely extracting signal control data related to the traffic running conditions as a signal control data set. For example, an early warning value of traffic operation condition change is set, and when the early warning value is reached, an emergency may occur, and traffic signal control is required. And extracting signal control data near the moment when the traffic running condition change reaches an early warning value in the original signal control data to form a small data set, and integrating to form a large data set.
The invention is provided with a regulation and control triggering unit, obtains cache data, judges whether a triggering condition is met, and triggers the signal control recommendation model (selects a well-behaved trained deep learning algorithm model), the algorithm selector and the neural framework generator to work. The buffered data includes, but is not limited to, real-time signal control data, signal control data sets, system operational data, and the like.
If so, setting an early warning value of the change of the traffic running condition; reading real-time signal control data; when the early warning value is reached, an emergency may be met, and traffic signal control is needed; at the moment, the trigger signal controls the recommended model to work; and the signal control recommendation model acquires real-time signal control data and outputs a signal control recommendation parameter value.
If the trained LSTM algorithm model and the RNN model which are good in performance are selected as the signal control recommendation model, one of the models may have a problem when the difference value of the signal control recommendation parameter values output by the two models reaches a preset trigger threshold value; at the moment, the algorithm selector and the neural framework generator are triggered to work, and the deep learning algorithm model meeting the performance requirement of the model is reselected.
For example, the monitoring signal controls the working time of the recommended model, and when the set threshold is reached, the algorithm selector is triggered to work, and the deep learning algorithm model meeting the performance requirement of the model is selected again.
The invention is provided with an expert judgment module for judging whether the signal control recommendation parameter value output by the signal control recommendation model meets the control parameter verification condition or not and setting the preset configuration item of the intelligent urban traffic signal control recommendation system. The control parameter checking condition checks whether the recommended parameter value meets the traffic control rule, the control scheme logic and the intersection artificially set constraint condition, for example: actual conditions of the intersection, maximum cycle time constraint, minimum green time of each phase, pedestrian phase safety time, special phase time and the like. If all data verification conditions are met, outputting verified recommended parameter values; if the recommended parameter value is not met, an alarm is sent out, a first-line traffic control personnel can judge whether the current recommended parameter value is feasible or not after receiving the alarm, and if the current recommended parameter value is feasible, the recommended parameter value judged by the personnel is output; if not, the personnel set the preset configuration items of the system, such as: the method comprises the following steps of replacing a deep learning algorithm in a deep learning algorithm pool, setting model performance requirements, network structure search requirements, triggering conditions, control parameter verification conditions and the like.
The intelligent city traffic signal control recommendation system can be matched with signal control equipment for use, the device outputs a signal control recommendation value, and the signal control equipment executes a control instruction.
The invention also provides a device matched with the intelligent city traffic signal control recommendation system, which can be matched with the signal control equipment for use, the device outputs a signal control recommendation value, and the signal control equipment executes a control instruction. The device includes a memory storing data and instructions for operation of the device and a processor executing instructions stored by the memory. And downloading the signal control recommendation model, acquiring real-time signal control data, and outputting a signal control recommendation parameter value responding to the real-time signal control data. In addition, related computing components of the intelligent city traffic signal control recommendation system can be selectively downloaded according to the performance of the memory and the processor and intersection regulation and control requirements, and corresponding work tasks are completed. Such as:
and 1, a download data processing module is used for preprocessing the signal control data, so that the quality of the data set is improved, and the performance of the algorithm model is optimized.
And 2, downloading a deep learning algorithm pool and an algorithm selector, training one or more deep learning algorithms by taking signal control data stored in the device for a period of time as a signal control data set to obtain a deep learning algorithm model, and selecting the deep learning algorithm model meeting the performance requirement of the model to update the signal control recommendation model.
And 3, downloading the neural architecture generator, taking the signal control data stored in the device for a period of time as a signal control data set, searching the network structure, selecting the network structure of the deep learning algorithm meeting the searching requirement, and updating the deep learning algorithm.
And 4, downloading a regulation and control trigger unit, acquiring the cache data of the device, judging whether the trigger condition is met, and controlling the recommended model, the algorithm selector and the neural framework generator to work by a trigger signal.
In an embodiment 10, referring to fig. 1 and 7, a smart city traffic signal control recommendation system for an intersection a includes a multidimensional database, a data processing module, a deep learning algorithm pool, a neural framework generator, an algorithm selector, a control trigger unit, a signal control recommendation model, an expert judgment module, and a signal control system module. The signal control system module comprises a data interface unit and a signal control device; the multidimensional database comprises an original database and a compliance database, and the deep learning algorithm pool, the neural architecture generator and the algorithm selector are classified into an offline training unit.
Based on the modules, the control scheme recommendation process of the signalized intersection A is as follows:
and <1> processing the intersection training data, preprocessing the data of the 3-month original detector and control scheme data stored in the original database, sorting and storing the data in the compliance database, and extracting the training data from the compliance database.
<2> the training data is divided into a training set and a test set, wherein the training set is 80% of the total training data, and the test set is 20% of the total training data. The training set input algorithm off-line training unit obtains a model of the signalized intersection through deep learning algorithm training; and putting the test set into a model generated by the training set, comparing the calculation result with the actual value, calculating the mean square error of the calculation result and the actual value, selecting an algorithm with the minimum mean square error, outputting the network model and storing the network model. The off-line training unit outputs a result: and (5) deep learning algorithm models.
And 3, deploying the depth algorithm model output by the off-line training unit to the signal control recommendation model.
<4> when the traffic state abnormality occurs at the intersection a, such as: the flow in the east-west direction is increased, the flow in the south-north direction is less, and the regulation and control are triggered when the intersection is empty. The data interface unit of the request signal control system module acquires real-time control scheme data, and the signal control recommendation model outputs a signal control recommendation parameter value: as phase A: 33%, B: 20%, C: 24%, D: 23 percent.
And <5> the traffic control personnel judge whether the recommendation scheme is reasonable or not according to the actual intersection condition, if the recommendation scheme is reasonable, the recommendation scheme is issued, and if the recommendation scheme is not reasonable, the preset configuration items of the system are set.
<6> the signal controls the device to run the issued scheme.
And the data interface unit of the signal control system module can continuously input new data serving as historical data into a training set to form a closed loop, and continuously iteratively update the model and perform self-learning.