Summary of the invention
The embodiment of the present invention provides a kind of method and apparatus of vehicle queue length detection, deposits in the prior art to solve
In the problem that vehicle queue length detection accuracy is insufficient and testing cost is high.
The embodiment of the invention provides a kind of methods of vehicle queue length detection, comprising:
The journey time of the vehicle in predetermined period by section to be analyzed is obtained, journey time is vehicle from downstream road junction
Difference at the time of leaving section to be analyzed and at the time of vehicle enters section to be analyzed from upstream crossing;
The journey time for the vehicle for passing through section to be analyzed in the predetermined period of acquisition is clustered, determines predetermined period
Interior multiple data sets by section to be analyzed;
For any one data set in the multiple data sets for passing through section to be analyzed in predetermined period, according in data set
Median, cycle time and the free flow journey time of journey time determine the stop frequency of the corresponding all vehicles of data set,
Free flow journey time is the journey time that vehicle does not stop directly by section to be analyzed;
According to pass through in predetermined period the stop frequency of all vehicles in path to be analyzed, the number of track-lines in section to be analyzed,
The traffic phase in section to be analyzed determines the maximum queue length in section to be analyzed in predetermined period.
Optionally, the journey time for the vehicle that section to be analyzed is passed through in the predetermined period of acquisition is clustered, is determined
By multiple data sets in section to be analyzed in predetermined period, comprising:
It is carried out by journey time of the hierarchical clustering algorithm to the vehicle for passing through section to be analyzed in the predetermined period of acquisition
Cluster determines cluster number;
According to determining cluster number, by K mean cluster algorithm to passing through section to be analyzed in the predetermined period of acquisition
The journey time of vehicle clustered, determine multiple data sets in predetermined period by section to be analyzed.
Optionally, data are determined according to the median of journey time, cycle time and free flow journey time in data set
The stop frequency for collecting corresponding all vehicles meets following formula (1):
Wherein, SkFor the stop frequency of vehicle, TkIt (t) is the median of data set middle rolling car time, C is cycle time,
TvfFor free flow journey time,For regulation coefficient, k is positive integer.
Optionally, according to passing through the stop frequency of all vehicles in path to be analyzed, section to be analyzed in predetermined period
Number of track-lines, section to be analyzed traffic phase determine the maximum queue length in section to be analyzed in predetermined period, comprising:
The transport need of section to be analyzed single traffic phase within the setting period, transport need are determined according to formula (2)
For the vehicle number of queuing:
Dj,p={ Fj,p|Sk≥1}+{Fj+1,p|Sk≥2}+…+{Fj+n,p|Sk≥n+1}……(2)
Wherein, Dj,pFor the transport need in period j on traffic phase p, Fj,pFor the corresponding collection of period j traffic phase p
It closes, the element in set is the vehicle number that stop frequency is greater than or equal to 1, Fj+1,pFor the corresponding collection of period j+1 traffic phase p
It closes, and so on, Fj+n,pFor the corresponding set of period j+n traffic phase p, j is positive integer, and p is positive integer, and n is positive integer;
According to the transport need of determining traffic phase each in predetermined period, section is analysed in predetermined period
The transport need of all traffic phases adds up, and determines the total transport need amount in section to be analyzed;
It is determined according to the number of track-lines in the total transport need amount in section to be analyzed, section to be analyzed to be analyzed in predetermined period
The maximum queue length in section.
Optionally, the maximum queue length in section to be analyzed in predetermined period is determined according to formula (3):
Wherein, LmaxFor the maximum queue length in section to be analyzed, DjFor the total transport need amount in section to be analyzed, N be to
The number of track-lines in section is analyzed, SSH is saturation space headway, and j is positive integer.
Correspondingly, the embodiment of the invention also provides a kind of devices of vehicle queue length detection, comprising:
Module is obtained, for obtaining the journey time of the vehicle in predetermined period by section to be analyzed, journey time is
At the time of the vehicle leaves section to be analyzed from downstream road junction and at the time of vehicle enters section to be analyzed from upstream crossing
Difference;
Cluster module gathers for passing through the journey time of vehicle in section to be analyzed in the predetermined period to acquisition
Class determines multiple data sets in predetermined period by section to be analyzed;
Determining module, for for any one data in the multiple data sets for passing through section to be analyzed in predetermined period
Collection determines that data set is corresponding all according to the median of journey time, cycle time and free flow journey time in data set
The stop frequency of vehicle, free flow journey time are the journey time that vehicle does not stop directly by section to be analyzed.
Processing module, for the stop frequency, to be analyzed according to all vehicles for passing through path to be analyzed in predetermined period
The number of track-lines in section, section to be analyzed traffic phase determine the maximum queue length in section to be analyzed in predetermined period.
Optionally, cluster module is specifically used for:
It is carried out by journey time of the hierarchical clustering algorithm to the vehicle for passing through section to be analyzed in the predetermined period of acquisition
Cluster determines cluster number;
According to determining cluster number, by K mean cluster algorithm to passing through section to be analyzed in the predetermined period of acquisition
The journey time of vehicle clustered, determine multiple data sets in predetermined period by section to be analyzed.
Optionally it is determined that module is specifically used for:
Determine that data set is corresponding according to the median of journey time, cycle time and free flow journey time in data set
The stop frequency of all vehicles meets following formula (1):
Wherein, SkFor the stop frequency of vehicle, TkIt (t) is the median of data set middle rolling car time, C is cycle time,
TvfFor free flow journey time,For regulation coefficient, k is positive integer.
Optionally, processing module is specifically used for:
The transport need of section to be analyzed single traffic phase within the setting period, transport need are determined according to formula (2)
For the vehicle number of queuing:
Dj,p={ Fj,p|Sk≥1}+{Fj+1,p|Sk≥2}+…+{Fj+n,p|Sk≥n+1}……(2)
Wherein, Dj,pFor the transport need in period j on traffic phase p, Fj,pFor the corresponding collection of period j traffic phase p
It closes, the element in the set is the vehicle number that stop frequency is greater than or equal to 1, Fj+1,pIt is corresponding for period j+1 traffic phase p
Set, and so on, Fj+n,pFor the corresponding set of period j+n traffic phase p, j is positive integer, and p is positive integer, and n is positive integer;
According to the transport need of determining traffic phase each in predetermined period, section is analysed in predetermined period
The transport need of all traffic phases adds up, and determines the total transport need amount in section to be analyzed;
It is determined according to the number of track-lines in the total transport need amount in section to be analyzed, section to be analyzed to be analyzed in predetermined period
The maximum queue length in section.
Optionally, processing module is specifically used for:
The maximum queue length in section to be analyzed in predetermined period is determined according to formula (3):
Wherein, LmaxFor the maximum queue length in section to be analyzed, DjFor the total transport need amount in section to be analyzed, N be to
The number of track-lines in section is analyzed, SSH is saturation space headway, and j is positive integer.
The embodiment of the present invention shows to obtain the journey time of the vehicle in predetermined period by section to be analyzed, when stroke
Between for vehicle leave section to be analyzed from downstream road junction at the time of and vehicle from upstream crossing enter section to be analyzed at the time of
Difference clusters the journey time for the vehicle for passing through section to be analyzed in the predetermined period of acquisition, determines in predetermined period
By multiple data sets in section to be analyzed, for any one in the multiple data sets for passing through section to be analyzed in predetermined period
Data set determines that data set is corresponding according to the median of journey time, cycle time and free flow journey time in data set
The stop frequency of all vehicles, free flow journey time are the journey time that vehicle does not stop directly by section to be analyzed,
According to the stop frequency of all vehicles, the number of track-lines in section to be analyzed, road to be analyzed for passing through path to be analyzed in predetermined period
The traffic phase of section determines the maximum queue length in section to be analyzed in predetermined period.In the embodiment of the present invention, due to obtaining
It does not need to reinstall camera when vehicle travel time data, but is multiplexed existing electric police grasp shoot system, by obtaining
At the time of the vehicle of electric police grasp shoot system detection and record is taken by upstream and downstream crossing, vehicle is calculated in section to be analyzed
Journey time, to reduce testing cost.Due to passing through the stroke of the vehicle in section to be analyzed in the predetermined period to acquisition
Time is clustered, and the stop frequency of vehicle is calculated according to cluster result, therefore is by stroke when seeking vehicle parking number
The merging of vehicle similar in time calculates stop frequency together, rather than the journey time of single vehicle and the relationship in period is relied on to determine
On the one hand stop frequency reduces calculation amount, improve computational accuracy, on the other hand not only obtains the parking time of each car
Number, is also obtained the vehicle number in every kind of stop frequency.When being lined up due to the maximum in section to be analyzed in calculating predetermined period,
Based on the stop frequency of all vehicles for passing through section to be analyzed in predetermined period, while considering the vehicle in section to be analyzed
Road number, traffic phase to improve the detection accuracy of vehicle maximum queue length in section to be analyzed, and then improve signal control
The accuracy of precision processed and traffic state judging.
Specific embodiment
In order to which the purpose of the present invention, technical solution and beneficial effect is more clearly understood, below in conjunction with attached drawing and implementation
Example, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used to explain this hair
It is bright, it is not intended to limit the present invention.
In the embodiment of the present invention, the upstream and downstream crossing in section to be analyzed is mounted on electric police grasp shoot system, and integrated
Bayonet function.Bayonet function uses the skills such as advanced photoelectricity, computer, image procossing, pattern-recognition, remote data access
Art carries out round-the-clock real time monitoring to car lane, the non-motorized lane in monitoring section and records dependent image data, picture number
According to including vehicle by information such as time, place, driving direction, license plate number, license plate color, body colors, and will acquire
To information be transferred to by computer network progress data storage, inquiry, comparison in the database of bayonet system control centre
Deng processing.
Fig. 1 example shows a kind of process of the method for vehicle queue length detection provided in an embodiment of the present invention, the stream
Journey can be executed by vehicle queue length detection device.
As shown in Figure 1, the specific steps of the process include:
Step S101 obtains the journey time of the vehicle in predetermined period by section to be analyzed.
Step S102 clusters the journey time for the vehicle for passing through section to be analyzed in the predetermined period of acquisition, really
Determine multiple data sets in predetermined period by section to be analyzed.
Step S103, for any one data set in the multiple data sets for passing through section to be analyzed in predetermined period, root
The corresponding all vehicles of data set are determined according to the median of journey time, cycle time and free flow journey time in data set
Stop frequency.
Step S104, according to the stop frequency for all vehicles for passing through path to be analyzed in predetermined period, section to be analyzed
Number of track-lines, section to be analyzed traffic phase determine the maximum queue length in section to be analyzed in predetermined period.
Specifically, in step s101, journey time of the vehicle in section to be analyzed be vehicle from downstream road junction leave to
Difference at the time of analyzing section and at the time of vehicle enters section to be analyzed from upstream crossing.Section upstream and downstream to be analyzed
The electric police grasp shoot system at crossing can detect and record automatically incessantly by upstream and downstream crossing vehicle license plate number, when
Carve etc., and saved in the form of crossing car data.When needing to analyze the traffic conditions in section to be analyzed in the setting period, root
Car data is crossed according to what electric police grasp shoot system in the particular situation available setting period recorded.Obtained the pre- of car data
If the period can be a traffic signal cycles, two traffic signal cycles or multiple traffic signal cycles, it is also possible to basis
The time cycle for specifically needing to set, wherein traffic signal cycles are that each light color of belisha beacon shows primary required in turn
Time, including vehicle straight trip signal time, vehicle left rotaring signal time and vehicle right turn signal time etc..For example, setting obtains
The period for crossing car data is 5 minutes, obtains the electric police grasp shoot system of section downstream road junction to be analyzed first within the period
Cross car data, downstream road junction has recorded the license plate number for leaving the vehicle in section to be analyzed and departure time at this time, sets vehicle
It is t at the time of i leaves downstream road junctioni, the car data excessively of section upstream crossing to be analyzed is inquired then according to license plate number, is obtained
At the time of entering section to be analyzed to vehicle i last time, and vehicle i is entered section to be analyzed from upstream crossing at the time of, is remembered
For t 'i, then vehicle i is T by the journey time in section to be analyzedi(t)=ti-t′i。
Due to not all being driven into from upstream crossing by the vehicle of downstream road junction, it is also possible to from along section cell or
Unit is driven into, although therefore have Some vehicles at the time of downstream road junction detects and leaves section to be analyzed, upstream
At the time of there is no corresponding entrance section to be analyzed in the record at crossing.It needs to take compensation data, data in this case
The method of compensation specifically: the vehicle j for leaving section to be analyzed that setting downstream road junction detects is not corresponded in upstream crossing
Into section to be analyzed at the time of, then crossing in car data to find out the moment passed through by moment and vehicle j from downstream road junction
Closest to and there are two of matched data to cross car datas in upstream crossing, take the two to cross the corresponding journey time of car data
Journey time of the average value as vehicle j.
Since electric police grasp shoot system is when carrying out vehicle detection, it may appear that the situation of Car license recognition mistake, while to
Analysis section is also possible to there are improper driving vehicle, for example, vehicle from section intermediate docking, drive over the speed limit, fake-licensed car etc.,
These will lead to the vehicle being calculated and occur some noise datas in the travel time data in section to be analyzed, therefore right
It needs to identify these data before the analysis of vehicle travel data, reject.Below to be using box-shaped figure removal noise data
Example introduces denoising process, it should be noted that the method that noise data is handled in the embodiment of the present invention is not limited in box-shaped figure,
Other denoising methods can also be used.Box-shaped figure can be used to observe the distribution situation of data entirety, using 25/% quantile,
The statistics such as 75/% quantile, coboundary, lower boundary are come come the overall distribution situation that describes data.By calculating these statistics
Amount, generates a box-shaped figure, and cabinet contains most normal data, and except box-shaped coboundary and lower boundary, just
It is abnormal data.In specific implementation, be analysed on section 0~24 hour each cross the history travel time data of vehicle according to week
The format on one to Sunday stores.If historical data less than six weeks, by historical data be processed into working day (Mon-Fri) and
Nonworkdays (Saturday, Sunday) data on the totally 2nd, if historical data is accumulated over six weeks data, by Monday to Sunday totally 7 days
It is analyzed and processed.
With 15 minutes for time window, there can be a large amount of travel time data T in each time window of daily historical datai
(t), to the T in each time windowi(t) it is ranked up by size, finds 25% quantile and 75% quantile, calculate IQR
(InterQuartile Range, upper and lower interquartile range).
To the T in each time windowiIt (t) can be according to arranging or arrange from small to large from big to small when being arranged.When
To the T in each time windowi(t) by arranging from small to large when, the calculation formula of IQR is formula (4):
- 25% quantile ... ... ... ... ... ... of IQR=75% quantile (4)
The up-and-down boundary of travel time data in the time window, calculation formula such as formula (5) and formula (6) are calculated according to IQR:
UpperLimit=75% quantile+IQR θ ... ... ... ... ... ... (5)
LowerLimit=25% quantile-IQR θ ... ... ... ... ... ... (6)
Wherein, θ is boundary adjustment coefficient, and numerical value is smaller, and boundary is smaller, it is proposed that value 0.5~1.5.
When to the T in each time windowi(t) by arranging from big to small when, the calculation formula of IQR is formula (7):
- 75% quantile ... ... ... ... ... ... of IQR=25% quantile (7)
The up-and-down boundary of travel time data in the time window, calculation formula such as formula (8) and formula (9) are calculated according to IQR:
UpperLimit=25% quantile+IQR θ ... ... ... ... ... ... (8)
LowerLimit=75% quantile-IQR θ ... ... ... ... ... ... (9)
Wherein, θ is boundary adjustment coefficient, and numerical value is smaller, and boundary is smaller, it is proposed that value 0.5~1.5.
After obtaining the up-and-down boundary of travel time data, by the travel time data handled in real time and travel time data
Up-and-down boundary comparison, data except boundary are noise data, directly rejecting.
The embodiment of the present invention obtains vehicle in the stroke in section to be analyzed due to being multiplexed existing electric police grasp shoot system
Time data thus greatly reduce testing cost without increasing additional equipment investment.
In step s 102, the journey time for the vehicle that section to be analyzed is passed through in the predetermined period of acquisition is clustered
When, vehicle travel time is clustered in such a way that two kinds of clustering algorithms combine, passes through hierarchical clustering algorithm pair first
The journey time of vehicle in the predetermined period of acquisition by section to be analyzed is clustered, and determines cluster number.Then basis
Determining cluster number, the stroke by K mean cluster algorithm to the vehicle for passing through section to be analyzed in the predetermined period of acquisition
Time is clustered, and determines multiple data sets in predetermined period by section to be analyzed.Below with the vehicle in a cycle
Cluster process is introduced for travel time data, the cluster that the vehicle travel time data in other periods are used when being clustered
Method is identical as the method for this example introduction.
Cycle duration is set as C, the cycle starting point moment is Tc, extraction at the time of leave section to be analyzed from downstream road junction
Section [Tc,Tc+ C] in travel time data Ti(t), n travel time data sample is obtained, data set X is formed(i)(i=1,
2,…,n)。
Cluster number is determined using hierarchical clustering method first, as shown in Fig. 2, specifically includes the following steps:
Step S201 calculates data set X(i)The Chebyshev's distance of middle n sample between any two, obtain between sample away from
From matrix.
Initial n sample is respectively formed one kind, the number K=n of class, t class G by step S202t={ X(t)(i=1,
2 ..., n), the distance between class is exactly the distance between sample at this time.
Step S203, merging the smallest two class of class distance are a new class, and the number K of class reduces by 1 class at this time.
Step S204 calculates new class at a distance from other classes, obtains new distance matrix.
Step S205, judges whether the distance values of each class in new distance matrix are all larger than threshold value (C- σ) (wherein, σ
To adjust system, it is proposed that value 0.2*C), it is no to then follow the steps S203 if so then execute S206 is thened follow the steps.
Step S206 determines that cluster number is K.
Then it is clustered again using K mean cluster method, specifically:
Using K mean cluster method to data set X(i)(i=1,2 ..., n) it is clustered again.Data set is obtained after cluster
X(i)In each element [Ti(t)] cluster number Ui, Ui=1 ... k ... K, definition have identical cluster number UiElement [Ti
(t),Ui] composition data set Zk, until data set ZkIn each element TiThe distance between (t) it is less than threshold value (C- σ), cluster
Terminate, obtains multiple data sets in the period by section to be analyzed.
Cluster number is determined using hierarchical clustering algorithm in the embodiment of the present invention, then based on obtained cluster number
The advantages of being clustered again using K mean cluster algorithm, combining two kinds of clustering algorithms, to make Clustering Effect more preferably.
In step s 103, for any one data in the multiple data sets for passing through section to be analyzed in predetermined period
Collection determines that data set is corresponding all according to the median of journey time, cycle time and free flow journey time in data set
The stop frequency of vehicle, free flow journey time are the journey time that vehicle does not stop directly by section to be analyzed.Specifically
In implementation, the stop frequency of the corresponding all vehicles of data set can be determined according to formula (1):
Wherein, SkFor the stop frequency of vehicle, TkIt (t) is the median of data set middle rolling car time, C is cycle time,
TvfFor free flow journey time,For regulation coefficient, k is positive integer.
Below for passing through multiple data sets in section to be analyzed in a cycle, all vehicles in the period are introduced
The calculating process of stop frequency, sets cycle duration C=2min, and vehicle directly passes through the free flow journey time in section to be analyzed
Tvf=5min obtains 3 data sets in the period by section to be analyzed, respectively according to the clustering method in step S102
For data set Z1, data set Z2, data set Z3, wherein data set Z1Median be 6, data set Z2Median be 10, data
Collect Z3Median be 15,It, can be in 0.25~0.5 selection for regulation coefficient.Data set Z can be calculated according to formula (7)1
The stop frequency of corresponding all vehicles isTherefore data set Z1Corresponding all vehicles are in this week
It does not stop in phase, similarly, data set Z2The stop frequency of corresponding all vehicles isTherefore
Data set Z2Corresponding all vehicle parking numbers are 2 times, data set Z3The stop frequency of corresponding all vehicles isTherefore data set Z3Corresponding all vehicle parking numbers are 5 times.
Due to calculating the corresponding all vehicles of data set based on clustering and obtain data set when calculating vehicle parking number
Stop frequency, calculated without the stop frequency to each car, on the one hand reduce calculation amount, improve vehicle
On the other hand the computational accuracy of stop frequency not only obtains the stop frequency of each car, is also obtained in every kind of stop frequency
Vehicle number.
In step S104, according to the stop frequency, to be analyzed for all vehicles for passing through path to be analyzed in predetermined period
The number of track-lines in section, section to be analyzed traffic phase determine the maximum queue length in section to be analyzed in predetermined period.Specifically
In implementation, the vehicle number that this period passes through can only be calculated using by the flow of stop line, and the queuing in this period cannot be obtained
Farthest point information, 10 vehicles for example, it is assumed that each period traffic light intersection can let pass have 20 before j-th of period green light is let pass
Vehicle is being lined up, then vehicle needs No. 2 green lights that could pass through from the 11st to the 20th, these vehicles+1 period of jth
It can be detected, and its stop frequency is judged as 2 times.Therefore it is not only wanted when calculating the maximum queue length in j-th of period
The vehicle travel time data for obtaining this week also need the travel time data for obtaining+1 period of jth.
Section to be analyzed may include multiple lanes, and include multiple traffic at the downstream red light crossing in section to be analyzed
Phase, such as straight trip phase, left turn phase, right-hand rotation phase etc., therefore calculate section maximum length of queue in predetermined period to be analyzed
The transport need of section to be analyzed single traffic phase in predetermined period can be first calculated when spending, transport need is the vehicle being lined up
Number, calculation formula are formula (2):
Dj,p={ Fj,p|Sk≥1}+{Fj+1,p|Sk≥2}+…+{Fj+n,p|Sk≥n+1}……(2)
Wherein, Dj,pFor the transport need in period j on traffic phase p, Fj,pFor the corresponding collection of period j traffic phase p
It closes, the element in set is the vehicle number that stop frequency is greater than or equal to 1, Fj+1,pFor the corresponding collection of period j+1 traffic phase p
It closes, and so on, Fj+n,pFor the corresponding set of period j+n traffic phase p, j is positive integer, and p is positive integer, and n is positive integer.
The transport need calculating process for introducing single traffic phase by taking period j keeps straight on phase p as an example below, sets j-th
Before period green light is let pass, there are 10 vehicles being lined up, as shown in Figure 3a, wherein vehicle A, vehicle B, vehicle C and vehicle D are in jth -1
Not over crossing when a period green light is let pass, so this four vehicles are second of parkings j-th of period, other 6 vehicles are equal
It is first time stop-for-waiting.When j-th of period green light is let pass, setting vehicle A, vehicle B and vehicle C have passed through crossing, other
Vehicle is not at this time into+1 period of jth.The queuing situation in+1 period of jth is as shown in Figure 3b, and vehicle D is in jth
+ 1 period is that third time is stopped, and vehicle E, vehicle F, vehicle G, vehicle H, vehicle I, vehicle J are second of parking, vehicle K, vehicle
L, vehicle M are the queuing vehicles being newly added, and are to stop for the first time in+1 period of jth.When+1 period green light of jth is let pass
When, vehicle D, vehicle E, vehicle F, vehicle G have passed through crossing, other vehicles are not at this time into+2 periods of jth.
The queuing situation in+2 periods of jth is as shown in Figure 3c, and vehicle H, vehicle I, vehicle J are that third time is stopped, vehicle K, vehicle L, vehicle
M is second of parking, and vehicle N, vehicle O, vehicle P are the queuing vehicles being newly added, and is to stop for the first time in+2 periods of jth
Vehicle.When+2 period green lights of jth are let pass, vehicle H, vehicle I, vehicle J, vehicle K have passed through crossing, other vehicles are without logical
It crosses, enters+3 periods of jth at this time.The queuing situation in+3 periods of jth is as shown in Figure 3d, and vehicle L, vehicle M are that third time is stopped
Vehicle, vehicle N, vehicle O, vehicle P are second of parkings, and vehicle Q, vehicle R are the queuing vehicles being newly added, in+3 periods of jth
It is to stop for the first time.And so on, the first four period that subsequent cycle is lined up the representation method of situation and lists is lined up situation table
Show that method is identical.The transport need kept straight on phase p in period j is calculated below according to formula (2), specifically: in j-th of period
Pass through the stop frequency S at crossingk>=1 vehicle number is 3, passes through the stop frequency S at crossing in+1 period of jthk>=2 vehicle
Number is 4, passes through the stop frequency S at crossing in+2 periods of jthk>=3 vehicle number is 3, and jth passes through in+3 periods
The stop frequency S at crossingk>=4 vehicle number is 0, therefore the transport need D in period j on straight trip phase pj,p={ Fj,p|Sk
≥1}+{Fj+1,p|Sk≥2}+{Fj+2,p|Sk>=3 }=3+4+3=10.It should be noted that above-mentioned example is by taking bicycle road as an example
Be calculated the transport need of single traffic phase in the setting period, the embodiment of the present invention is not limited to one-lane traffic
Demand is calculated, and the transport need calculation method of multilane is identical with one-lane transport need calculation method, herein no longer
It repeats.
It is obtaining in predetermined period after the transport need of single traffic phase, according to determining friendship each in predetermined period
The transport need of logical phase, is analysed to section transport need of all traffic phases in predetermined period and adds up, and determines
The total transport need amount in section to be analyzed.Then according to the total transport need amount in section to be analyzed, the number of track-lines in section to be analyzed
Determine the maximum queue length in section to be analyzed in predetermined period.
Optionally, the maximum queue length in section to be analyzed in predetermined period is determined according to formula (3):
Wherein, LmaxFor the maximum queue length in section to be analyzed, DjFor the total transport need amount in section to be analyzed, N be to
The number of track-lines in section is analyzed, SSH is saturation space headway, and j is positive integer.
Since the embodiment of the present invention is when calculating section maximum queue length to be analyzed, first wait divide in calculating predetermined period
The total transport need amount of section downstream road junction is analysed, total transport need amount includes the transport need of all phases in all lanes, then
The maximum queue length in section to be analyzed is found out by the method being averaged, to improve the calculating of vehicle maximum queue length
Precision, and then improve the accuracy of signal control precision and traffic state judging.
From the above, it is seen that the embodiment of the present invention provides a kind of method and apparatus of vehicle queue length detection,
The journey time of the vehicle in predetermined period by section to be analyzed is obtained, journey time is that vehicle leaves from downstream road junction wait divide
Difference at the time of analysing section and at the time of vehicle enters section to be analyzed from upstream crossing, to passing through in the predetermined period of acquisition
The journey time of the vehicle in section to be analyzed is clustered, and determines multiple data sets in predetermined period by section to be analyzed,
For any one data set in the multiple data sets for passing through section to be analyzed in predetermined period, according to journey time in data set
Median, cycle time and free flow journey time determine the stop frequencies of the corresponding all vehicles of data set, it is freely popular
The journey time is the journey time do not stopped directly by section to be analyzed of vehicle, according in predetermined period by path to be analyzed
The stop frequency of all vehicles, the number of track-lines in section to be analyzed, section to be analyzed traffic phase determine in predetermined period to
Analyze the maximum queue length in section.In the embodiment of the present invention, due to not needed again when obtaining vehicle travel time data
Camera is installed, but is multiplexed existing electric police grasp shoot system, by obtaining electric police grasp shoot system detection and record
Vehicle pass through upstream and downstream crossing at the time of, calculate vehicle section to be analyzed journey time, to reduce testing cost.
Journey time due to passing through the vehicle in section to be analyzed in the predetermined period to acquisition clusters, and according to cluster result meter
The stop frequency of vehicle is calculated, therefore is to merge vehicle similar in journey time to calculate parking together when seeking vehicle parking number
Number, rather than the journey time of single vehicle and the relationship in period is relied on to determine stop frequency, calculation amount is on the one hand reduced, is mentioned
High computational accuracy, on the other hand not only obtains the stop frequency of each car, the vehicle in every kind of stop frequency is also obtained
Number.When being lined up due to the maximum in section to be analyzed in calculating predetermined period, to pass through the institute in section to be analyzed in predetermined period
Based on having the stop frequency of vehicle, while the number of track-lines in section to be analyzed, traffic phase are considered, to improve to be analyzed
The detection accuracy of section vehicle maximum queue length, so improve signal control precision and traffic state judging it is accurate
Property.
Based on same idea, Fig. 4 illustratively shows a kind of vehicle queue length detection provided in an embodiment of the present invention
Device structure, the device can execute vehicle queue length detection process.
As shown in figure 4, the device includes:
Module 401 is obtained, for obtaining the journey time of the vehicle in predetermined period by section to be analyzed, journey time
At the time of leaving section to be analyzed from downstream road junction for the vehicle and at the time of vehicle enters section to be analyzed from upstream crossing
Difference;
Cluster module 402 is carried out for passing through the journey time of vehicle in section to be analyzed in the predetermined period to acquisition
Cluster determines multiple data sets in predetermined period by section to be analyzed;
Determining module 403, for for any one number in the multiple data sets for passing through section to be analyzed in predetermined period
According to collection, the corresponding institute of data set is determined according to the median of journey time, cycle time and free flow journey time in data set
There is the stop frequency of vehicle, free flow journey time is the journey time that vehicle does not stop directly by section to be analyzed.
Processing module 404, for according in predetermined period pass through path to be analyzed all vehicles stop frequency, to point
Analyse the number of track-lines in section, the traffic phase in section to be analyzed determines the maximum queue length in section to be analyzed in predetermined period.
Optionally, cluster module 402 is specifically used for:
It is carried out by journey time of the hierarchical clustering algorithm to the vehicle for passing through section to be analyzed in the predetermined period of acquisition
Cluster determines cluster number;
According to determining cluster number, by K mean cluster algorithm to passing through section to be analyzed in the predetermined period of acquisition
The journey time of vehicle clustered, determine multiple data sets in predetermined period by section to be analyzed.
Optionally it is determined that module 403 is specifically used for:
Determine that data set is corresponding according to the median of journey time, cycle time and free flow journey time in data set
The stop frequency of all vehicles meets following formula (1):
Wherein, SkFor the stop frequency of vehicle, TkIt (t) is the median of data set middle rolling car time, C is cycle time,
TvfFor free flow journey time,For regulation coefficient, k is positive integer.
Optionally, processing module 404 is specifically used for:
The transport need of section to be analyzed single traffic phase within the setting period, transport need are determined according to formula (2)
For the vehicle number of queuing:
Dj,p={ Fj,p|Sk≥1}+{Fj+1,p|Sk≥2}+…+{Fj+n,p|Sk≥n+1}……(2)
Wherein, Dj,pFor the transport need in period j on traffic phase p, Fj,pFor the corresponding collection of period j traffic phase p
It closes, the element in the set is the vehicle number that stop frequency is greater than or equal to 1, Fj+1,pIt is corresponding for period j+1 traffic phase p
Set, and so on, Fj+n,pFor the corresponding set of period j+n traffic phase p, j is positive integer, and p is positive integer, and n is positive integer;
According to the transport need of determining traffic phase each in predetermined period, section is analysed in predetermined period
The transport need of all traffic phases adds up, and determines the total transport need amount in section to be analyzed;
It is determined according to the number of track-lines in the total transport need amount in section to be analyzed, section to be analyzed to be analyzed in predetermined period
The maximum queue length in section.
Optionally, processing module 404 is specifically used for:
The maximum queue length in section to be analyzed in predetermined period is determined according to formula (3):
Wherein, LmaxFor the maximum queue length in section to be analyzed, DjFor the total transport need amount in section to be analyzed, N be to
The number of track-lines in section is analyzed, SSH is saturation space headway, and j is positive integer.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the present invention
Form.It is deposited moreover, the present invention can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.