Background
In recent years, the rise of economic growth and technological progress has led to the higher demand of Intelligent Transportation Systems (ITS) for transportation services, and how to construct a real-time traffic information system of ITS is more and more important. At present, traffic flow data of an expressway mainly passes through detectors such as induction coils, geomagnetism, videos, radar detectors and infrared detectors, detector equipment needs to be installed on the expressway in the modes, and a large amount of manpower and material resources need to be consumed. Or vehicle information collection is performed through the GPS, but this method requires loading GPS-related equipment on a running vehicle, and has high initial investment cost, incomplete collected data, and certain limitations. Therefore, a method for monitoring the highway network in real time with low cost, wide coverage and all weather is urgently needed at present.
At present, with the comprehensive coverage of mobile networks and the comprehensive popularization of mobile phones, the method for acquiring road network traffic flow parameters and monitoring the running state of a highway by using mobile phone signaling data becomes a new mode of the current Intelligent Traffic System (ITS), and can well meet various requirements of the current system.
In the technical research of the prior most patents for calculating the speed of vehicles on the highway based on mobile phone signaling data, the general steps include: (1) collecting and processing data, namely acquiring all user mobile phone signaling track data of a highway monitoring area in a time period from T to T + T in real time, and preprocessing the signaling data to obtain a user mobile phone signaling data track set in the monitoring time period; (2) map matching, namely establishing a geographic grid system according to the actual route of the expressway and the position information of surrounding base stations, and then matching the base stations with the grids of the expressway according to an Euclidean distance formula; (3) identifying the highway user, judging whether the user is the highway user according to the similarity between the user signaling track sequence and the road base station sequence, and obtaining a highway user signaling data track set H _ D; (4) and the traffic parameter estimation and the like, wherein in the average speed calculation, the speed value is simply calculated according to the ratio of the distance to the time, the calculation of the scheme is single, the calculation accuracy is not high enough, and because the positioning accuracy of the current base station is not high, the influence of factors such as complex traffic conditions and the like, the road traffic state cannot be accurately judged by simply calculating the speed value through the ratio of the distance to the time.
Disclosure of Invention
In view of the above, the present invention aims to provide a method for calculating a vehicle speed on an expressway based on big data of a mobile phone signaling, so as to improve the accuracy of vehicle speed estimation, and set an optimal weight function related to a distance by the characteristic that the speed accuracy is higher when the distance to a road grid is shorter, and fuse the optimal weight function to a traditional speed calculation formula, thereby greatly improving the calculation accuracy.
In order to achieve the purpose, the invention provides the following technical scheme:
a highway vehicle speed calculation method based on mobile phone signaling big data comprises the following steps:
s1: according to the step of calculating the speed of the highway vehicle based on the mobile phone signaling data, collecting and processing the mobile phone signaling data; then map matching is carried out, and a geographical grid system is established; then, carrying out highway user identification to obtain a highway user signaling data track set H _ D for calculating the average speed of a highway road grid;
s2: after an expressway user signaling data track set H _ D in a period from T to T + T is obtained, sequentially traversing the expressway user signaling data track set H _ D, and extracting a track sequence of each user;
s3: traversing the trace points in the trace sequence of each user pairwise for each user sequence, wherein the trace points are base stations, the signaling data of the base stations comprise timestamps and geographical position information, and each pairwise trace point in the user trace sequence is used as a calculating unit for calculating the user speed;
s4: setting a corresponding speed container for each road grid according to the road grids divided by the geographical grid system, wherein the speed containers are used for storing the weighted speed values obtained by each calculation unit;
s5: defining the calculation unit obtained by traversal as Trace point TracenTrace Point and TracemCalculating the distance and time of the path of each unit;
s6: according to the concept of physical kinematics, the characteristics are obtained from the angle of statistical significance: the shorter the distance between two track point calculation units containing one road grid is, the larger the contribution value to the average speed of the road grid is; according to the characteristics, a Gaussian weight function which is inversely related to the distance of the route is set
S7: calculating the weighted speed value of the two track point calculating units, and obtaining the distance D between the two track points by calculation
n,mWith the time of journey T
n,mIs multiplied by a Gaussian weight function
Obtaining a weighted velocity value of the computing unit
And will measure the velocity value
Put into a corresponding road grid speed container between two track points,
s8: repeating the steps S2-S7 until the user track sequence in the expressway user signaling data track set H _ D from T to T + T is completely traversed;
s9: finally, traversing the weighted speed set in each road grid speed container, and carrying out sum operation on the weighted speed set in each road grid to obtain the average speed value V of the road gridk,1≤k≤N,
Where l is denoted as the l-th user signalling of the k-th path segment, N
kIndicates the number of users of the k-th road segment,
represents the distance from the nth road section to the mth road section, and k is more than or equal to 1 and less than or equal to N
k,
Representing the time from the nth road section to the mth road section, 1 ≦ l ≦ N
k;
Further, the step S5 specifically includes:
s501: traversing Trace points of the user Trace sequence two by two in sequence, and tracing each two Trace pointsnAnd TracemAs a computing unit, then, according to the geographical grid system matched with the base station and the road grid in the step S1, obtaining and obtaining the Trace points of two track pointsnAnd TracemRoad grid subsequence of cells { gn[an,bn],…,gm[am,bm]In which [ a ]n,bn]Representing the position serial number of the grid, two Trace points TracenAnd TracemDistance D ofn,mCalculated by the following formula:
wherein M is the number of the road grids between the two track points, and L is the length of the road grids;
s502: trace point calculating Trace pointnAnd TracemThe travel time between the two points is set as Trace point TracenThe TimeStamp of is TimestampnTrace point TracemThe TimeStamp of is TimestampmThe travel time between two tracing points is Tn,m;
Tn,m=TimeStampn-TimeStampm。
The invention has the beneficial effects that: according to the invention, through the characteristic that the shorter the distance from the road grid, the higher the calculation speed precision, an optimal weight function related to the distance is set and fused into the traditional speed calculation formula, so that the calculation precision is greatly improved, and the requirements of an ITS system are better met.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
As shown in fig. 1, the invention provides a method for calculating a speed of a vehicle on a highway based on big data of mobile phone signaling, which comprises the following steps:
step 1, performing raster segment division processing according to a rectangular raster with the length and width limited to L on the highway route, and setting a certain direction of the highway as the positive direction of the rectangular raster, so that the raster route sequence of the highway is G ═ G1,g2,g3,…,gnIn which g isiIs a road grid, all the grids are combined into a highway route.
And 2, acquiring base station information data of a monitoring area near the expressway, and then establishing a matching information table B _ G of the base station and the expressway grid, wherein the matching information table of the base station and the expressway comprises a base station location area number LAI, a base station cell number CI, longitude LNG of the base station, latitude LAC of the base station, a grid number GD where the base station is located and a matched road grid number GS. The matching steps of the base station and the road grid are as follows:
step 2.1, based on the base station information table near the highway, the trellis sequence of the base station obtained by the trellis processing in step 1 is B ═ B1,b2,b3,…,bn}。
Step 2.2, base station b is obtained according to the coverage area of the base stationiCovered road grid gn,…,gmThen according to Euclidean distance formula DbigiComputing base station biTo each road grid g it containsiIs represented by Dbg={dn,…,dm}。
Step 2.3, get DbgThe medium-distance minimum grid is determined as the matched road grid GSiAnd repeating the steps 2.1-2.3, and finally obtaining a matching information table B _ G of the base station road.
And 3, acquiring all user mobile phone signaling track data of the expressway monitoring area from T to T + T, wherein the user mobile phone signaling data mainly comprises a unique identification ID, a signaling data position area number LAI, a base station cell number CI and a TimeStamp field. Then carrying out data preprocessing such as dirty data filtering, ping-pong effect and the like on the signaling data; and finally, combining and arranging the signaling track data of each user according to the time stamp sequence of the signaling data to obtain a user mobile phone signaling data track set U _ D of the monitoring time period.
And 4, carrying out matching judgment on the expressway users according to the user mobile phone signaling data track set U _ D and the matching information table B _ G of the base station road, judging whether the users are the users driving on the expressway or not according to the longest effective traveling section of the user mobile phone signaling data track, and generating an expressway user signaling data track set H _ D for calculating the road grid speed of the expressway. The method comprises the following specific steps:
and 4.1, extracting the user track of the mobile phone signaling data track set U _ D to effectively segment the line segment, and taking the sequence with the longest sequence of the line segment as a judgment sequence.
Step 4.2, obtaining the longest effective outgoing section track sequence Trace ═ bn,…,bmIn which biRepresenting the grid serial number of the base station, arranged according to the time sequence), and counting b in the Trace sequence according to N base stations of the Trace sequenceiNumber of base stations N existing in matching information table B _ G of base station road1Calculating the similarity lambda of the matching information table B _ G of the Trace track and the base station road to be N1Judging whether the user is an expressway user or not by the aid of/N, setting a threshold value M, and judging the user as the expressway user and jumping to the step 4.3 when lambda is larger than or equal to M; otherwise, the user is judged to be the non-expressway user.
And 4.3, determining forward driving and backward driving of the expressway users according to the increment and the decrement of the grid serial numbers { n, …, m } of the track sequence in the Trace, wherein if the grid serial numbers are the increment, the expressway users are in the forward driving, and otherwise, the expressway users are in the backward driving. And finally obtaining the highway user signaling data track set H _ D after judgment.
And 5, calculating the average speed of the expressway raster road section according to the expressway user signaling data track set H _ D. Extracting a track sequence of each user from a highway user signaling data track set H _ D, traversing track points in the track sequence of each user two by two, wherein the track points are base stations, the signaling data of the base stations comprise timestamps and geographical position information, taking each two track points in the user track sequence as a calculation unit for calculating speed, calculating the distance and the time of the journey of each unit, multiplying the ratio of the distance to the time of the journey by a Gaussian weight function inversely related to the distance of the journey to obtain a speed value of a weighted distance, putting the speed value into a corresponding road grid speed container, and finally summing the speed values in the road grid speed container to obtain an average speed value of the road grid. The method comprises the following specific steps:
and 5.1, setting a corresponding speed container for each road grid, wherein the speed container is used for storing the weighted speed value obtained by each calculation unit.
Step 5.2, sequentially traversing and extracting the user track sequence in the expressway user signaling data track set H _ D, sequentially traversing the track points of the user track sequence two by two, and tracing each two track pointsnAnd TracemAs a computing unit, acquiring and obtaining two Trace points Trace according to the geographical grid system matched with the base station and the road grid in the step 1nAnd TracemRoad grid subsequence of cells { gn[an,bn],…,gm[am,bm]In which [ a ]n,bn]Representing the position serial number of the grid, two Trace points TracenAnd TracemDistance D ofn,mCan be calculated by the following formula:
wherein M is the number of the road grids between the two track points, and L is the length of the road grids.
Step 5.3, calculating Trace point TracenAnd TracemThe travel time between the two points is set as Trace point TracenThe TimeStamp of is TimestampnTrace point TracemThe TimeStamp of is TimestampmThe travel time between two tracing points is Tn,m。
Tn,m=TimeStampn-TimeStampm
And 5.4, according to the thought of physical kinematics, from the point of statistical significance, the shorter the distance between two track point calculation units comprising one road grid is, the larger the contribution value to the average speed of the road grid is. According to the characteristics, a Gaussian weight function which is inversely related to the distance of the route is set
Step 5.5, calculating the weighted speed value of the two track point calculating units, and obtaining the distance D between the two track points through calculation
n,mWith the time of journey T
n,mIs multiplied by a Gaussian weight function
Obtaining a weighted velocity value of the computing unit
And will measure the velocity value
Into a corresponding road grid speed container between two points of track.
And 5.6, repeating the steps 5.2-5.5 until the user track sequences in the expressway user signaling data track set H _ D from T to T + T are completely traversed.
Step 5.7, finally traversing the weighted speed set in each road grid speed container, and carrying out sum operation on the speed sets in each road grid to obtain the average speed value V of the road gridk(1≤k≤N)。
Where l is denoted as the l-th user signalling of the k-th path segment, N
kIndicates the number of users of the k-th road segment,
represents the distance from the nth link to the mth link (1. ltoreq. k. ltoreq.N)
k),
Indicates the time from the nth link to the mth link (1 ≦ l ≦ N)
k)。
FIG. 2 is a line map of a highway geography grid system; FIG. 3 is a user trajectory graph for different road lengths for an expressway including a grid of road segments.
Finally, it is noted that the above-mentioned preferred embodiments illustrate rather than limit the invention, and that, although the invention has been described in detail with reference to the above-mentioned preferred embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the scope of the invention as defined by the appended claims.