WO2022262741A1 - 一种高效gps轨迹地图匹配方法 - Google Patents
一种高效gps轨迹地图匹配方法 Download PDFInfo
- Publication number
- WO2022262741A1 WO2022262741A1 PCT/CN2022/098815 CN2022098815W WO2022262741A1 WO 2022262741 A1 WO2022262741 A1 WO 2022262741A1 CN 2022098815 W CN2022098815 W CN 2022098815W WO 2022262741 A1 WO2022262741 A1 WO 2022262741A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- search
- matching
- point
- endpoint
- connection line
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000008569 process Effects 0.000 claims abstract description 10
- 238000013459 approach Methods 0.000 claims description 12
- 238000010845 search algorithm Methods 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 3
- 238000012804 iterative process Methods 0.000 claims description 2
- 238000007418 data mining Methods 0.000 abstract description 2
- 238000004458 analytical method Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 3
- 230000001186 cumulative effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000012731 temporal analysis Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S19/00—Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
- G01S19/38—Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
- G01S19/39—Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
- G01S19/42—Determining position
Definitions
- the invention relates to the technical field of transportation, in particular to an efficient GPS track map matching method.
- the urban traffic network system is a complex giant system. Tens of thousands of traffic flows run and transfer on its network structure every moment. How to comprehensively and accurately collect relevant traffic spatio-temporal data, and then grasp the urban traffic network for system analysis It is one of the main topics in the field of intelligent analysis of transportation systems in recent years to provide strong data and theoretical support for transportation system analysis problems such as operation rules, congestion evolution mechanism, improvement of large-scale urban traffic demand composition structure, and optimization of related transportation network system supply. .
- vehicle-mounted GPS data as one of the fast and easy-to-obtain traffic information data sources, has data advantages such as wide coverage, strong time continuity, and direct correlation with the traffic network.
- it has been widely used in various traffic big data system analysis projects.
- the first step of the system analysis is to accurately map the vehicle trajectory and the road network structure based on the vehicle GPS, which is called "Map Matching trajectory matching".
- the related algorithm is the trajectory matching algorithm, which is generally divided into four categories: geometry, topology , probability, advanced, etc.
- the overall matching ratio is low, and the matching mileage of various matching algorithms is generally less than 90%.
- the reasons include errors in the road network topology, GPS track point sampling errors, etc.;
- the precise matching of algorithms such as search often leads to a low overall matching ratio due to network topology, sometimes even lower than 50%, and if the driving direction is used to estimate the driving trajectory, local matching errors are prone to occur;
- the algorithm lacks effective logic Control, local matching errors are uncontrollable, especially in areas with complex traffic network structures, such as parallel sections of multiple main roads and auxiliary roads, intersection areas, matching errors are unavoidable; 5)
- the object of the present invention is to provide a high-efficiency GPS trajectory map matching method, which solves the problems of difficult balance between matching accuracy and efficiency and lower matching efficiency in the prior art GPS trajectory matching method.
- the technical solution of the present invention is: provide a kind of efficient GPS track map matching method, comprise the following steps:
- step S4 judge whether the current search end point vp (s) is the end point vp (k), if so, then the current search end point vp (s) is the end point vp (k), and complete the efficient GPS track map Otherwise, take vp(s+1) as the first point of map matching, and return to step S2.
- the present invention has not only realized to replace the traditional "GPS track point-guided path search logic" with “path search-guided GPS track point matching logic”, but also solves the problem of backtracking dead loop in the emerging algorithm, avoiding The complicated and inefficient call process of map data in traditional matching logic greatly improves the efficiency of map matching.
- the present invention can be widely used in the fields of edge computing, navigation systems and urban traffic data mining management.
- Fig. 1 is method flowchart of the present invention
- Fig. 2 is the schematic diagram of experimental data in the present embodiment
- Fig. 3 is a comparison diagram of matching accuracy in the present embodiment
- FIG. 4 is a comparison diagram of matching speed in this embodiment.
- false means no
- true means yes
- the present invention provides a kind of high-efficiency GPS trajectory map matching method, and its implementation method is as follows:
- S103 choose a GPS track point p(i) from a plurality of GPS track points ⁇ p(1), p(2), ..., p(i), ..., p(n) ⁇ in the segment Ta as Current GPS track point, wherein, p(n) represents the total GPS track point;
- step S104 judging whether the linear velocity of the current GPS track point p(i) to p(i+1) is greater than 300km/h, if so, then remove the current GPS track point p(i), and turn to the next GPS track point p (i+1), and repeat step S104, otherwise, enter step S105; or
- step S105 Judging whether the interval between the current GPS track point p(i) and p(i+1) is less than or equal to 0, if so, then remove the current GPS track point p(i) and transfer to the next GPS track point p(i+ 1), and repeat step S104, otherwise, enter step S105;
- step S203 judging whether the start node Startp is less than or equal to the end node Endp, if so, then enter step S204, otherwise, the start node Startp is greater than the end node Endp, complete all the matching of the GPS trajectory, and obtain the first point vp (1) to the end The best map matching path of point vp (k), and enter step S3;
- step S204 Utilize the path search algorithm guided by GPS track points to search the shortest path from the start node Startp to the end node Endp, and judge whether the iterative process of the path search is over, if so, obtain the alternative path, and enter step S3, otherwise, Repeat step S204 until the path search iteration is completed, and its implementation method is as follows:
- step S2043. Determine whether each connecting line satisfies the departure condition, and if so, include the corresponding endpoints of each connecting line into the search open node set OpenL, and update the corresponding search forward reference variable set OpenValueL and the modified road network node set NList respectively And update the search attribute set Search(s) of each connecting line corresponding to the forward search endpoint s, and when the loop ends, the search opens the node set OpenL is not an empty set, and enters step S2044; otherwise, the initial node Startp selects the connecting line with the largest adjacent matching value as the point matching result, and updates the starting node Startp to be equal to the starting node Startp+1, and returns to step S202, wherein the endpoint search attribute set Search(s) includes endpoint starting truncation Cost StartCut(s), path physical cost SPcost(s), local truncation cost LOCcost(s), GPS track point weighted cost PWcost(s), corresponding track label ValidN(s), local track increment Padd(s
- step S2045 Select the first forward search endpoint s in the search open node set OpenL to carry out the search, respectively obtain the corresponding track label ValidN(s) and the corresponding search advance reference variable OpenValueL value OpenValueL.begin of the forward search endpoint s, and determine Whether the corresponding trajectory label ValidN(s) is greater than the starting node Startp-1, if so, then remove the forward search endpoint from the first corresponding search forward reference variable set OpenValueL of the search open node set OpenL and the corresponding forward search endpoint s s and its corresponding advance variable HeadDist, and enter step S2046, otherwise, enter step S2048;
- step S2046 If the corresponding track label ValidN(s) is smaller than the termination node Endp, and the corresponding track label ValidN(s) is smaller than the current farthest matching node Pnow, calculate the forward judgment distance Jdist, and enter step S2047; or
- step S2047 Determine whether the value OpenValueL(s) of the corresponding search forward reference variable of the forward search endpoint s is greater than 2* forward judgment distance Jdist, and the forward judgment distance Jdist is greater than 250 meters. If so, return to step S2045; otherwise, enter step S2048 ;or
- step S2049 Judging whether the moving direction included angle MoveAng(u) is greater than or equal to 100 degrees, if so, jump to the next forward connecting line u in the forward connecting line set ForwardL, and return to step S2048, otherwise, connect forward
- the line u is inserted into the extended connection set NextL according to the angle MoveAng(u) in the moving direction, and enters step S20410 after the cycle ends;
- serial number Sernow of the matched GPS track point be the serial number Sernow+1 of the matched GPS track point, search for the forward connection line u in the adjacent connection set NearL(Sernow) of the GPS track point vp(Sernow), and determine the forward connection Whether the line u is not in the connection set NearL(Sernow) adjacent to the GPS track point vp(Sernow), if so, go to step S20413; ), and enter step S20414; or
- serial number of the matched GPS track point Sernow be the serial number of the matched GPS track point Sernow+1, search for the forward connection line u in the adjacent connection line set NearL(Sernow) of the GPS track point vp(Sernow), and judge the matched GPS track point
- step S20413 judge whether the local incremental matching points AddN is equal to 0, if so, then enter step S20415, otherwise, then the local incremental matching points AddN is greater than 0, and enter step S20416;
- LOCcost(s) represents the local truncation cost of the forward search endpoint s
- Length(u) represents the length of the forward connection line u
- step S20417 Determine whether the track label ValidN(n(u)) corresponding to the forward end point n(u) of the forward connection line u is equal to the track label ValidN(s) corresponding to the forward search end point s, if so, enter step S20418, otherwise, The track label ValidN(n(u)) corresponding to the forward end point n(u) of the forward connection line u is smaller than the track label ValidN(s) corresponding to the forward search end point s, and enters step S20419;
- Cost1 SPcost(s)+Length(u)+PWcost(s)
- SPcost(s) represents the path physical cost of the forward search endpoint s
- Length(u) represents the length of the forward connection line u
- PWcost(s) represents the weighted cost of the GPS track point of the forward search endpoint s
- SPcost(n(u)) represents the path physical cost of the forward end point n(u) of the forward connection line u
- PWcost(n(u)) represents the forward end point n(u)GPS of the forward connection line u Track point weighted cost
- LOCcost(s) represents the local truncation cost of the forward search endpoint s
- Length(u) represents the length of the forward connection line u
- SPcost(s) represents the physical cost of the forward search endpoint s path
- Length(u) represents the length of the forward connection line u
- HeadDist LOCcost(s)+Length(u)
- LOCcost(s) represents the local truncation cost of the forward search endpoint s
- Length(u) represents the length of the forward connection line u
- step S20420 Calculate the current matching GPS track point progress Mnow according to the track label ValidN(s) corresponding to the forward search endpoint s, and judge the track label ValidN(n( u)) is empty, if so, then enter step S20421, otherwise, enter step S20422; wherein, the expression of the progress Mnow of the current matching GPS track point is as follows:
- ValidN(s) represents the trajectory label corresponding to the forward search endpoint s
- AddN represents the number of local incremental matching points
- Length(u) represents the length of the forward connection line u
- StartCut(s) represents the truncation cost of starting from the forward search endpoint s
- step S20422 Determine whether the track label ValidN(n(u)) corresponding to the forward end point n(u) of the forward connection line u is equal to the track label ValidN(s) corresponding to the forward search end point s, if so, enter step S20423, otherwise,
- the forward end point n(u) of the forward connection line u corresponds to the track label ValidN(n(u)) which is less than the progress Mnow of the current matching GPS track point, and enters step S20424;
- Cost1 SPcost(s)+Length(u)+PWcost(s)+PWac-StartCut(s)
- SPcost(s) represents the path physical cost of the forward search endpoint s
- Length(u) represents the length of the forward connecting line u
- PWcost(s) represents the weighted cost of GPS track points of the forward search endpoint s
- PWac represents the local Weighted variable of GPS track point
- StartCut(s) represents the truncation cost starting from the forward search endpoint s
- SPcost(n(u)) represents the path physical cost of the forward end point n(u) of the forward connection line u
- PWcost(n(u)) represents the forward end point n(u)GPS of the forward connection line u Track point weighted cost
- SPcost(s) represents the physical cost of the path of the forward search endpoint s
- Length(u) represents the length of the forward connection line u
- StartCut(s) represents the truncation cost of the forward search endpoint s
- the forward endpoint n(u)GPS trajectory point weighted cost PWcost (n(u)) of the forward connecting line u is expressed as follows:
- PWcost(s) represents the weighted cost of the GPS track point of the forward search endpoint s
- PWac represents the weighted variable of the local GPS track point
- Length(u) represents the length of the forward connection line u
- StartCut(s) represents the truncation cost of starting from the forward search endpoint s
- Euc(vp(ValidN(s)+1),n(u)) represents the Euclidean distance between the GPS track point vp(ValidN(s)) and the forward endpoint n(u) of the forward connection line u
- LOCcost (n(u)) represents the local truncation cost of the forward end point n(u) of the forward connection line u;
- Euc(vp(ValidN(n(u))+1) represents the Euclidean distance Euc between GPS track point vp(ValidN(s)) and n(u)
- LOCcost(n(u)) represents the forward connecting line u's forward endpoint n(u) local truncation cost
- step S20430 Determine whether the trajectory label ValidN(n(u)) corresponding to the forward endpoint n(u) of the forward connection line u is greater than the current farthest matching node Pnow, if so, enter step S20431, otherwise, the forward connection line u
- the trajectory label ValidN(n(u)) corresponding to the forward endpoint n(u) is less than or equal to the current farthest matching node Pnow, and enters step S20432;
- step S3013 Check whether there is the last element SPvia(s).last of the connection line set of the forward search endpoint s near the current farthest matching node Pnow, if so, find the local optimal endpoint, and enter step S3015, otherwise, enter step S3014;
- step S3014 If the number of elements SPvia(s) in the forward search endpoint s path connection line set is not empty, set the path backtracking endpoint CrtEndN equal to the forward search endpoint s path connection line SPvia(s).tail, and return to step S3012;
- step S3015 According to the found path traceback endpoint CrtEndN and the path traceback endpoint CrtEndN path connection line SPvia(CrtN) of the connecting line, calculate the total path cost TotalCost, and determine whether the path total cost TotalCost is less than the minimum total path weighted cost MinCost, if so , then update the minimum total path weighted cost MinCost equal to the total path cost TotalCost and the best matching tail node BestEndN equal to the path backtracking endpoint CrtEndN, enter the next candidate tail node, and return to step S3011, otherwise, traverse the search end road network node set CloseL, select an optimal element as the backtracking point of the matching path, and enter step S302; wherein, the expression of the total path cost TotalCost is as follows:
- SPcost(CrtN) represents the path physical cost set of the path traceback endpoint CrtEndN
- PWcost(CrtN) represents the weighted cost set of GPS track points of the path traceback endpoint CrtEndN
- Euc(vp(Pnow),CrtN) represents the GPS track point vp( Pnow) and the Euclidean distance of the path backtracking endpoint CrtEndN;
- step S3022 Check whether it has traced back to the starting point of the road network path, if so, terminate the iteration directly, and enter step S3023, otherwise, return to step S3021;
- the matching result variable Match(k) is greater than -1, if the path backtracking endpoint CrtEndN path connecting line SPvia(CrtEndN) is in the adjacent connecting line set NearL(k), and the trajectory point vp(k) corresponds to the matching weight of the connecting line vp(k).Weight(SPvia(CrtEndN)) is less than the best matching weight MatchW(k), then the matching result variable Match(k) is the path backtracking endpoint CrtEndN path connecting line SPvia(CrtEndN), and the best matching weight MatchW(k ) is the matching weight vp(k).Weight(Match(k)) of the matching connection line at node k, if the path backtracking endpoint CrtEndN path connecting line SPvia(CrtEndN) is not in the adjacent connection set NearL(k), and the path backtracking endpoint CrtEndN corresponding track label ValidN (CrtEndN) is less than the current backt
- step S3025 let k be k-1, and continue to loop, if it is judged whether the loop is over, if so, then enter step S3026, otherwise, return to step S3024;
- step S3026 Determine whether the backtracking indicator variable BackCk is equal to a null value, if not, return to step S3023, otherwise, the backtracking indicator variable BackCk is equal to a null value, and the iteration ends, so as to complete the current track segment backtracking with the optimal matching tail node BestEndN as the tail node
- the matching process and enter step S303;
- step S304 judging whether the start node Startp is greater than the end node Endp, if so, then all the GPS track points of the current trip are matched, and the statistical table of the output matching results is summarized, and enter step S4, otherwise, the start node Startp is smaller than the end node Endp, and Go to step S4;
- step S4 judges whether the current search end point vp (s) is the end point vp (k), if so, then the current search end point vp (s) is the end point vp (k), and complete the efficient GPS track map Otherwise, use vp(s+1) as the first point of map matching, and return to step S2, the implementation method is as follows:
- step S401 According to the statistical table of matching results, judge whether the current search end point vp(s) is the end point vp(k), if so, then the current search end point vp(s) is the end point vp(k), and complete the efficient GPS track map Otherwise, then use vp(s+1) as the first point of map matching, and enter step S402;
- other 6 kinds of comparative trajectory matching methods include 4 kinds of step-by-step matching algorithms: STM, a matching algorithm based on spatio-temporal analysis; HMM, an implicit Markov matching algorithm; MDP, a multi-criteria dynamic programming matching algorithm; LBMM, a matching algorithm based on trajectory local features; two segmented matching algorithms: SMRI, a segmented matching algorithm based on MRI systems; SRF, a segmented matching algorithm based on trajectory features, as shown in Figure 3 and Figure 4, Fig. 3 is the matching accuracy comparison curve, and Fig. 4 is the matching speed comparison curve, where the accuracy calculation method is the ratio of the number of correct matching points to the number of all track points; the speed calculation method is the required matching time (seconds) for every thousand track points Base 10 logarithmic value.
- STM a matching algorithm based on spatio-temporal analysis
- HMM an implicit Markov matching algorithm
- MDP a multi-criteria dynamic programming matching algorithm
- LBMM a matching algorithm based on trajectory local features
- the present invention is based on the matching algorithm of "path search-track point space weighting" logic, and the algorithm realizes reliable and efficient replacement of traditional "track point-oriented path search logic” with “path search-oriented track point matching logic”. ", which not only avoids the complicated and inefficient map data calling process in traditional matching logic, but also solves the problem of backtracking infinite loops in emerging algorithms, which greatly improves the efficiency of map matching.
Landscapes
- Engineering & Computer Science (AREA)
- Remote Sensing (AREA)
- Radar, Positioning & Navigation (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Navigation (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
一种高效GPS轨迹地图匹配方法,属于交通技术领域,包括以下步骤:得到有效GPS轨迹点列表;得到当前搜索终点;由当前搜索终点回溯最佳地图匹配路径,遍历获取沿途各GPS轨迹点的最佳匹配结果,并汇总输出匹配结果统计表;判断当前搜索终点是否为末点。该方法既实现了以"路径搜索导向的GPS轨迹点匹配逻辑"替代传统的"GPS轨迹点导向的路径搜索逻辑",同时也解决了新兴算法中存在回溯死循环问题,避免了传统匹配逻辑中繁复低效的地图数据调用过程,极大提升了地图匹配工作效率,解决了现有技术GPS轨迹匹配方法中匹配精度及效率难以兼顾的问题,可广泛应用于边缘计算、导航***及城市交通数据挖掘管理领域。
Description
本申请要求于2021年06月18日提交中国专利局、申请号为202110674847.8、发明名称为“一种高效GPS轨迹地图匹配方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及交通技术领域,特别是涉及一种高效GPS轨迹地图匹配方法。
城市交通网络***是个复杂的巨***,每时每刻都有数以万计的交通流在其网络结构上运行及转移,如何全面准确对相关交通时空数据进行采集,进而为***分析把握城市交通网络运行规律、拥堵发生演变机理、完善大规模城市交通需求组成结构、优化相关交通网络***供给等交通***分析难题提供强有力的数据及理论支撑,是近年来交通***智能分析领域的主要议题之一。
其中车载GPS数据作为快速易得的交通信息数据源之一,具有覆盖范围广、时间连续性强、与交通网络直接相关等数据优势,近年来已为各类交通大数据***分析项目广泛采用,通过将实时车载GPS轨迹信息映射至交通网络,通过分析挖掘相关出行轨迹信息,相关统计结果既可有效覆盖城市大范围时空下的交通***信息,也能在需要时较精确刻画区域交通运行状态。而***分析的第一步即是基于车载GPS将车辆行驶轨迹与路网结构进行准确映射,称为“Map Matching轨迹匹配”,相关算法即为轨迹匹配算法,一般分为四类:几何、拓扑、概率、高级等。
快速准确刻画“车辆行驶轨迹与道路网络的匹配关系”对车载导航、基于位置的服务、交通网络***分析等工作的重要性不言而喻,然而纵观现有各类匹配算法,算法逻辑仍存在一些技术性缺点。对于传统步进式匹配算法,如HMM,隐式马尔科夫匹配算法;MDP,多准则动态规划匹配算法;LBMM,基于轨迹局部特征的匹配算法,存在缺点包括:1)步 进式匹配过程速度慢,由于该匹配过程需逐点展开路径分析,较分段式匹配显著较慢,从而极大限制了地图匹配算法的应用效果,如车载导航及基于位置的服务中地图路径卡顿现象、以及基于离线地图匹配在传统交通规划及***分析应用领域尚无有效应用案例等。2)总体匹配比例较低,各类匹配算法匹配里程总体一般不到90%,产生原因包括路网拓扑中存在误差、GPS轨迹点采样误差等;3)匹配精度与比例难以兼顾,若采用路径搜索等算法精确匹配,往往由于网络拓扑原因导致总体匹配比例较低,有时甚至低于50%,而若采用行驶方向对行驶轨迹进行估计,则又易产生局部匹配误差;4)算法缺乏有效逻辑控制,局部匹配误差不可控,尤其在交通网络结构复杂的区域,如多条干路辅路并行路段、交叉口区域,匹配误差难以避免;5)对异常GPS轨迹点缺乏有效处理,如设备故障导致的GPS轨迹点异常等,有时可能严重影响匹配质量。
对于最新的基于“路径搜索-轨迹点空间加权”匹配算法(申请号为:CN202110005167.7),也有一些先天缺陷,包括:前向搜索存在信息重叠,该算法设计将导致匹配过程无法避免出现回溯验证死循环,从而可能严重降低匹配效率。
发明内容
本发明的目的是提供的一种高效GPS轨迹地图匹配方法,解决了现有技术GPS轨迹匹配方法中匹配精度及效率难以兼顾以及降低匹配效率的问题。
为达到上述目的,本发明的技术方案为:提供一种高效GPS轨迹地图匹配方法,包括以下步骤:
S1、获取任一车辆的GPS经过的若干个GPS轨迹点,并对所述若干个GPS轨迹点进行初始化操作,得到有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)};
S2、在所述有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}中,以首点vp(1)建立地图匹配工作前向迭代,利用以GPS轨迹点导向的路径搜索算法得到当前搜索终点vp(s);其中,所述前向迭代为: 以首点vp(1)起始,逐点迭代向后搜索匹配路径;
S3、由当前搜索终点vp(s)回溯最佳地图匹配路径,遍历获取沿途各GPS轨迹点的最佳匹配结果,并汇总输出匹配结果统计表;
S4、根据所述匹配结果统计表,判断当前搜索终点vp(s)是否为末点vp(k),若是,则当前搜索终点vp(s)为末点vp(k),完成高效GPS轨迹地图的匹配,否则,则以vp(s+1)作为地图匹配首点,并返回步骤S2。
本发明的有益效果:
(1)本发明既实现了以“路径搜索导向的GPS轨迹点匹配逻辑”替代了传统的“GPS轨迹点导向的路径搜索逻辑”,同时也解决了新兴算法中存在回溯死循环问题,避免了传统匹配逻辑中繁复低效的地图数据调用过程,极大提升了地图匹配工作效率。
(2)本发明可广泛应用于边缘计算、导航***及城市交通数据挖掘管理领域。
说明书附图
下面结合附图对本发明作进一步说明:
图1为本发明的方法流程图;
图2为本实施例中实验数据示意图;
图3为本实施例中匹配精度对比图;
图4为本实施例中匹配速度对比图。
下面对本发明的具体实施方式进行描述,以便于本技术领域的技术人员理解本发明,但应该清楚,本发明不限于具体实施方式的范围,对本技术领域的普通技术人员来讲,只要各种变化在所附的权利要求限定和确定的本发明的精神和范围内,这些变化是显而易见的,一切利用本发明构思的发明创造均在保护之列。
实施例
在对本实施例进行说明前,对以下参数进行说明:
本实施例中,false表示否,true表示是。
如图1所示,本发明提供了一种高效GPS轨迹地图匹配方法,其实现方法如下:
S1、获取任一车辆的GPS经过的若干个GPS轨迹点,并对所述若干个GPS轨迹点进行初始化操作,得到有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)},其实现方法如下:
S101、获取任一车辆的GPS经过的若干个GPS轨迹点;
S102、将所述若干个GPS轨迹点分离为分段集合Trip(a)={T1,T2,…,Ta,…,Tn},其中,Ta表示一个分段,且所述Ta分段内包括多个GPS轨迹点,Tn表示总分段数;
S103、从分段Ta内的多个GPS轨迹点{p(1),p(2),…,p(i),…,p(n)}中任选一个GPS轨迹点p(i)作为当前GPS轨迹点,其中,p(n)表示总的GPS轨迹点;
S104、判断所述当前GPS轨迹点p(i)至p(i+1)的直线速度是否大于300km/h,若是,则剔除当前GPS轨迹点p(i),转入下一个GPS轨迹点p(i+1),并重复步骤S104,否则,进入步骤S105;或
判断所述当前GPS轨迹点p(i)与p(i+1)的间隔时间是否小于等于0,若是,则剔除当前GPS轨迹点p(i),转入下一个GPS轨迹点p(i+1),并重复步骤S104,否则,进入步骤S105;
S105、设当前GPS轨迹点的上一累计行驶距离变量为p(i).lastD;
S106、判断所述p(i).lastD是否小于20米,若是,则计算得到GPS轨迹点p(i-1)至p(i)的距离,并剔除GPS轨迹点p(i),并进入步骤S107,否则,所述p(i).lastD大于20米,并将当前GPS轨迹点p(i)=vp(l)纳入有效节点列表VP={vp(1),vp(2),…,vp(k)},并进入步骤S107;
本实施例中,如果小于20米,比如是3米,并设当前GPS轨迹点的上一累计行驶距离变量为p(i).lastD=10米,则轨迹点p(i+1)的当前累计行驶p(i).currentD=p(i).lastD+3=13米,轨迹点p(i+1).lastD=p(i).currentD,并从节点列表中剔除p(i);
S107、判断分段Ta内是否所有的GPS轨迹点均被作为当前GPS轨 迹点,若是,则建立有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)},并获取所述GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}中各GPS轨迹点k在地图数据中的待匹配邻近连接线集合NearL(k),并初始化匹配结果变量Match(k)=-1,最佳匹配权重MatchW(k)=10000,完成有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}的建立,并进入步骤S2,否则,返回步骤S101;
S2、在所述有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}中,以首点vp(1)建立地图匹配工作前向迭代,利用以GPS轨迹点导向的路径搜索算法得到当前搜索终点vp(s),其实现方法如下:
S201、在所述有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}中,以首点vp(1)建立地图匹配工作前向迭代;
S202、根据所述地图匹配工作前向迭代,设有效GPS列表VP={vp(1),vp(2),…,vp(k)}的起始节点为Startp,终止节点为Endp;
S203、判断所述起始节点Startp是否小于等于终止节点Endp,若是,则进入步骤S204,否则,起始节点Startp大于终止节点Endp,完成GPS轨迹的全部匹配,得到首点vp(1)至末点vp(k)的最佳地图匹配路径,并进入步骤S3;
S204、利用以GPS轨迹点导向的路径搜索算法搜索起始节点Startp至终止节点Endp的最短路径,并判断路径搜索的迭代过程是否结束,若是,则获取备选路径,并进入步骤S3,否则,重复步骤S204,直至路径搜索迭代完成,其实现方法如下:
S2041、对所述起始节点Startp进行匹配变量初始化处理,所述匹配变量包括上一起始节点Lastp等于起始节点Startp、当前最远匹配节点Pnow、已修改路网节点集NList、搜索打开节点集OpenL、对应搜索前进参考变量集OpenValueL、搜索结束路网节点集CloseL以及起点邻近路网连接线集NearL(Startp);
S2042、对所述起点邻近路网连接线集NearL(Startp)中各连接线建立地图匹配工作循环;
S2043、判断各连接线是否满足出发条件,若是,则将各连接线的对应端点纳入所述搜索打开节点集OpenL,并分别更新所述对应搜索前进 参考变量集OpenValueL、已修改路网节点集NList以及更新各连接线对应前向搜索端点s的搜索属性集Search(s),且当循环结束时,所述搜索打开节点集OpenL不为空集,进入步骤S2044;否则,对所述起始节点Startp选取邻近匹配值最大的连接线作为该点匹配结果,并更新起始节点Startp等于起始节点Startp+1,并返回步骤S202,其中,所述端点搜索属性集Search(s)包括端点出发截断成本StartCut(s)、路径物理成本SPcost(s)、局部截断成本LOCcost(s)、GPS轨迹点加权成本PWcost(s)、对应轨迹标号ValidN(s)、局部轨迹增量Padd(s)以及途径连接线SPvia(s);
S2044、对所述搜索打开节点集OpenL中各路网搜索前向搜索端点s建立迭代,并判断所述迭代的结束条件是否为搜索打开节点集OpenL已为空集,若是,则获取备选路径,并进入步骤S3,否则,进入步骤S2045;
S2045、选取所述搜索打开节点集OpenL中首个前向搜索端点s开展搜索,分别获取对应轨迹标号ValidN(s)以及前向搜索端点s的对应搜索前进参考变量OpenValueL值OpenValueL.begin,并判断所述对应轨迹标号ValidN(s)是否大于起始节点Startp-1,若是,则从搜索打开节点集OpenL以及对应前向搜索端点s的首个对应搜索前进参考变量集OpenValueL中剔除前向搜索端点s及其对应的前进变量HeadDist,并进入步骤S2046,否则,进入步骤S2048;
S2046、若所述对应轨迹标号ValidN(s)小于终止节点Endp,且所述对应轨迹标号ValidN(s)小于当前最远匹配节点Pnow,则计算得到前进判断距离Jdist,并进入步骤S2047;或
若所述对应轨迹标号ValidN(s)小于终止节点Endp,且所述局部轨迹增量Padd(s)=0,则计算得到前进判断距离Jdis,并进入步骤S2047;
S2047、判断前向搜索端点s的对应搜索前进参考变量的值OpenValueL(s)是否大于2*前进判断距离Jdist,且前进判断距离Jdist大于250米,若是,则返回步骤S2045,否则,进入步骤S2048;或
判断所述前向搜索端点s的对应搜索前进参考变量的值OpenValueL(s)是否大于450米且前进判断距离Jdist小于等于250米,若是,则返回步骤S2045,否则,进入步骤S2048;
S2048、对当前搜索前向搜索端点s各前向连接线集合ForwardL建立循环,并提取所述前向连接线u及下一路网节点n(u),当途径连接线SPvia(s)不为空值时,若前向搜索端点s途径连接线SPvia(s)等于前向连接线u时,跳至前向连接线集合ForwardL下一连接线,并继续计算前向连接线u与GPS轨迹点vp(ValidN(s))运动方向夹角MoveAng(u);
S2049、判断所述运动方向夹角MoveAng(u)是否大于等于100度,若是,则跳至前向连接线集合ForwardL中下一前向连接线u,并返回步骤S2048,否则,将前向连接线u按运动方向夹角MoveAng(u)从小到大顺序***拓展连线集NextL,并在循环结束后进入步骤S20410;
S20410、对拓展连线集NextL中元素建立前向搜索循环,提取前向连接线u及下一路网节点n(u),并初始化局部GPS轨迹点加权变量PWac=0、已匹配GPS轨迹点序号Sernow=对应轨迹标号ValidN(s)、局部增量匹配点数AddN=0以及掉头指示变量TurnIndi=false;
S20411、当已匹配GPS轨迹点序号Sernow小于终止节点Endp时,初始化迭代指示变量Indi=true,并建立前向轨迹匹配增益,判断迭代结束条件是否为迭代指示变量Indi=false,若是,则进入步骤S20412,否则,进入步骤S20415;
S20412、令已匹配GPS轨迹点序号Sernow为已匹配GPS轨迹点序号Sernow+1,在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中搜索前向连接线u,并判断前向连接线u是否不在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中,若是,则进入步骤S20413,否则,前向连接线u在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中,并进入步骤S20414;或
令已匹配GPS轨迹点序号Sernow为已匹配GPS轨迹点序号Sernow+1,在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中搜索前向连接线u,并判断已匹配GPS轨迹点序号Sernow等于终止节点Endp时,迭代结束条件是否为迭代指示变量Indi=false,若是,则进入步骤S20413,否则,前向连接线u在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中,并进入步骤S20414;
S20413、判断局部增量匹配点数AddN是否等于0,若是,则进入步 骤S20415,否则,则局部增量匹配点数AddN大于0,并进入步骤S20416;
S20414、分别令局部增量匹配点数AddN为局部增量匹配点数AddN+1,以及令局部GPS轨迹点加权变量PWac为PWac+(Sernow).Weight(u),且若GPS轨迹点存在掉头,则掉头指示变量TurnIndi=true,迭代指示变量Indi=false;当局部增量匹配点数AddN=0,则进入步骤S20415;并判断局部增量匹配点数AddN是否大于0,若是,则进入步骤S20421,否则,返回步骤S20412;其中,vp(Sernow).Weight(u)表示GPS轨迹点vp;
S20415、当前向搜索端点s大于起始节点Startp时,判断前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))是否为空值,若是,则进入步骤S20416,否则,进入步骤S20417;
S20416、计算得到局部搜索成本Costnow,并令前向连接线u的前向端点n(u)的局部截断成本LOCcost(n(u))=Costnow,前向连接线u的前向端点n(u)的途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)的局部轨迹增量Padd(n(u))=0,前向连接线u的前向端点n(u)的路径物理成本SPcost(n(u))=SPcost(s)+Length(u),前向连接线u的前向端点n(u)的GPS轨迹点加权成本PWcost(n(u))=PWac,在已修改路网节点集NList末尾***n(u),并进入步骤S20419,其中,所述局部搜索成本Costnow的表达式如下:
Costnow=LOCcost(s)+Length(u)
式中,LOCcost(s)表示前向搜索端点s的局部截断成本,Length(u)表示前向连接线u的长度;
S20417、判断前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))是否等于前向搜索端点s对应轨迹标号ValidN(s),若是,则进入步骤S20418,否则,前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))小于前向搜索端点s对应轨迹标号ValidN(s),并进入步骤S20419;
S20418、根据前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))计算得到匹配路径成本Cost1,以及根据计算得到前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u)),若匹配路径成本Cost1 小于匹配路径成本Cost2,则计算得到前向连接线u的前向端点n(u)局部截断成本LOCcost(n(u)),并令前向连接线u的前向端点n(u)途径连接线SPvia(n(u))=u,令前向连接线u的前向端点n(u)局部轨迹增量Padd(n(u))=0,以及计算得到前向连接线u的前向端点n(u)路径物理成本SPcost(n(u))以及令前向连接线u的前向端点n(u)GPS轨迹点加权成本PWcost(n(u))等于前向搜索端点s的GPS轨迹点加权成本PWcost(s),并进入步骤S20420,其中,所述匹配路径成本Cost的表达式如下:
Cost1=SPcost(s)+Length(u)+PWcost(s)
式中,SPcost(s)表示前向搜索端点s路径物理成本,Length(u)表示前向连接线u的长度,PWcost(s)表示前向搜索端点s的GPS轨迹点加权成本;
所述匹配路径成本Cost2的表达式如下:
Cost2=SPcost(n(u))+PWcost(n(u))
式中,SPcost(n(u))表示前向连接线u的前向端点n(u)路径物理成本,PWcost(n(u))表示前向连接线u的前向端点n(u)GPS轨迹点加权成本;
所述前向连接线u的前向端点n(u)局部截断成本LOCcost(n(u))的表达式如下:
LOCcost(n(u))=LOCcost(s)+Length(u)
式中,LOCcost(s)表示,前向搜索端点s局部截断成本,Length(u)表示前向连接线u的长度;
SPcost(n(u))=SPcost(s)+Length(u)
式中,SPcost(s)表示前向搜索端点s路径物理成本,Length(u)表示前向连接线u的长度;
S20419、根据前向搜索端点s局部截断成本LOCcost(s)以及前向连接线u的长度Length(u)计算得到前进变量HeadDist,并令前向连接线u的前向端点n(u)的局部截断成本LOCcost(n(u))=HeadDist,前向连接线u的前向端点n(u)的途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)的局部轨迹增量Padd(n(u))=0,前向连接 线u的前向端点n(u)的对应轨迹标号ValidN(n(u))=ValidN(s),前向连接线u的前向端点n(u)的路径物理成本SPcost(n(u))=SPcost(s)+Length(u),前向连接线u的前向端点n(u)的GPS轨迹点加权成本PWcost(n(u))=PWcost(s),并进入步骤S20425;其中,所述前进变量HeadDist的表达式如下:
HeadDist=LOCcost(s)+Length(u)
式中,LOCcost(s)表示前向搜索端点s局部截断成本,Length(u)表示前向连接线u的长度;
S20420、根据所述前向搜索端点s对应轨迹标号ValidN(s)计算得到当前匹配GPS轨迹点进度Mnow,并判断前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))是否为空值,若是,则进入步骤S20421,否则,进入步骤S20422;其中,所述当前匹配GPS轨迹点进度Mnow的表达式如下:
Mnow=ValidN(s)+AddN
式中,ValidN(s)表示前向搜索端点s对应轨迹标号,AddN表示局部增量匹配点数;
S20421、计算得到局部搜索成本Costnow以及令前向变量HeadDist为GPS轨迹点vp(Mnow)和前向连接线u的前向端点n(u)的欧式距离Euc(vp(Mnow),n(u)),并令前向连接线u的前向端点n(u)的局部截断成本LOCcost(n(u))=HeadDist,前向连接线u的前向端点n(u)的途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)的局部轨迹增量Padd(n(u))=AddN,前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))=Mnow,前向连接线u的前向端点n(u)的路径物理成本SPcost(n(u))=SPcost(s)+Costnow,前向连接线u的前向端点n(u)的GPS轨迹点加权成本PWcost(n(u))=PWcost(s)+PWac,以及在已修改路网节点集NList末尾***n(u),并进入步骤S0425,其中,所述局部搜索成本Costnow的表达式如下:
Costnow=Length(u)-StartCut(s)
式中,Length(u)表示前向连接线u的长度,StartCut(s)表示前向搜索端点s出发截断成本;
S20422、判断前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))是否等于前向搜索端点s对应轨迹标号ValidN(s),若是,则进入步骤S20423,否则,前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))小于当前匹配GPS轨迹点进度Mnow,并进入步骤S20424;
S20423、分别计算得到匹配路径成本Cost1以及匹配路径成本Cost2,若匹配路径成本Cost1小于匹配路径成本Cost2,则令前进变量HeadDist等于GPS轨迹点vp(Mnow)和n(u)的欧式距离Euc(vp(Mnow),n(u)),令前向连接线u的前向端点n(u)局部截断成本LOCcost(n(u))=HeadDist,前向连接线u的前向端点n(u)途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)局部轨迹增量Padd(n(u))=AddN,以及分别计算得到前向连接线u的前向端点n(u)路径物理成本SPcost(n(u))以及前向连接线u的前向端点n(u)GPS轨迹点加权成本PWcost(n(u)),并进入步骤S20428;其中,所述匹配路径成本的表达式如下:
Cost1=SPcost(s)+Length(u)+PWcost(s)+PWac-StartCut(s)
式中,SPcost(s)表示前向搜索端点s路径物理成本,Length(u)表示前向连接线u的长度,PWcost(s)表示前向搜索端点s的GPS轨迹点加权成本,PWac表示局部GPS轨迹点加权变量,StartCut(s)表示前向搜索端点s出发截断成本;
所述匹配路径成本Cost2的表达式如下:
Cost2=SPcost(n(u))+PWcost(n(u))
式中,SPcost(n(u))表示前向连接线u的前向端点n(u)路径物理成本,PWcost(n(u))表示前向连接线u的前向端点n(u)GPS轨迹点加权成本;
所述前向连接线u的前向端点n(u)路径物理成本SPcost(n(u))的表达式如下:
SPcost(n(u))=SPcost(s)+Length(u)+StartCut(s)
式中,SPcost(s)表示前向搜索端点s路径物理成本,Length(u)表示前向连接线u的长度,StartCut(s)表示前向搜索端点s出发截断成本;
所述前向连接线u的前向端点n(u)GPS轨迹点加权成本PWcost (n(u))的表达式如下:
PWcost(n(u))=PWcost(s)+PWac
式中,PWcost(s)表示前向搜索端点s的GPS轨迹点加权成本,PWac表示局部GPS轨迹点加权变量;
S20424、执行前进变量HeadDist为GPS轨迹点vp(Mnow)和前向连接线u的前向端点n(u)的欧式距离Euc(vp(Mnow),n(u)),并计算得到局部搜索成本Costnow,以及令前向连接线u的前向端点n(u)的局部截断成本LOCcost(n(u))=HeadDist,前向连接线u的前向端点n(u)的途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)的局部轨迹增量Padd(n(u))=AddN,前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))=Mnow,前向连接线u的前向端点n(u)的路径物理成本SPcost(n(u))=SPcost(s)+Costnow,前向连接线u的前向端点n(u)的GPS轨迹点加权成本PWcost(n(u))=PWcost(s)+PWac,并进入步骤S20428;其中,所述局部搜索成本Costnow的表达式如下:
Costnow=Length(u)-StartCut(s)
式中,Length(u)表示前向连接线u的长度,StartCut(s)表示前向搜索端点s出发截断成本;
S20425、当前向搜索端点s对应轨迹标号ValidN(s)小于终止节点Endp时,在搜索结束路网节点集CloseL中剔除前向搜索端点s,并计算得到前进变量HeadDist(n(u)),若搜索打开节点集OpenL中有前向连接线u的前向端点n(u),则剔除该元素,并判断前向搜索端点s对应轨迹标号ValidN(s)是否等于当前最远匹配节点Pnow,若是,则进入步骤S20426,否则,前向连接线u的前向端点n(u)对应轨迹标号ValidN(s)小于当前最远匹配节点Pnow,并进入步骤S20427;其中,前进变量HeadDist(n(u))的表达式如下:
HeadDist(n(u))=Euc(vp(ValidN(s)+1),n(u))+LOCcost(n(u))
式中,Euc(vp(ValidN(s)+1),n(u))表示GPS轨迹点vp(ValidN(s))和前向连接线u的前向端点n(u)的欧式距离,LOCcost(n(u)) 表示前向连接线u的前向端点n(u)局部截断成本;
S20426、在搜索打开节点集OpenL起始位置***前向连接线u的前向端点n(u),在对应搜索前进参考变量集OpenValueL起始位置***前进变量HeadDist(n(u)),在搜索结束路网节点集CloseL中***前向连接线u的前向端点n(u),并返回步骤S2044;
S20427、在搜索打开节点集OpenL末尾位置***n(u),在对应搜索前进参考变量集OpenValueL末尾位置***前进变量HeadDist(n(u)),当前向搜索端点s对应轨迹标号ValidN(s)等于终止节点Endp时,若前向连接线u在GPS轨迹点vp(Endp)邻近连线集NearL(Endp)中,则在搜索结束路网节点集CloseL中剔除前向搜索端点s,在搜索打开节点集OpenL起始位置***前向连接线u的前向端点n(u),在对应搜索前进参考变量集OpenValueL起始位置***0以及在搜索结束路网节点集CloseL***前向连接线u的前向端点n(u),并返回步骤S2043;
S20428、当前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))小于终止节点Endp时,计算前进变量HeadDist(n(u))等于GPS轨迹点vp(ValidN(s)和n(u)的欧式距离Euc(vp(ValidN(n(u))+1)以及前向连接线u的前向端点n(u))和前向连接线u的前向端点n(u)局部截断成本LOCcost(n(u))之和,若搜索打开节点集OpenL中有前向连接线u的前向端点n(u),则剔除前向连接线u的前向端点n(u),并判断前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))是否大等于当前最远匹配节点Pnow,若是,则进入步骤S20429,否则,进入步骤S20430;其中,所述前进变量HeadDist(n(u))的表达式如下:
HeadDist(n(u))=(vp(ValidN(n(u))+1)+LOCcost(n(u))
式中,Euc(vp(ValidN(n(u))+1)表示GPS轨迹点vp(ValidN(s))和n(u)的欧式距离Euc,LOCcost(n(u))表示前向连接线u的前向端点n(u)局部截断成本;
S20429、在搜索打开节点集OpenL起始位置***前向连接线u的前向端点n(u),在对应搜索前进参考变量集OpenValueL起始位置***前进变量HeadDist(n(u)),并返回步骤S2044;
S20430、判断前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))是否大于当前最远匹配节点Pnow,若是,则进入步骤S20431,否则,前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))小于等于当前最远匹配节点Pnow,并进入步骤S20432;
S20431、更新当前最远匹配节点Pnow为前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u)),并清空搜索结束路网节点集CloseL集合,***前向连接线u的前向端点n(u),并返回步骤S2044;
S20432、在搜索打开节点集OpenL末尾位置***前向连接线u的前向端点n(u),在对应搜索前进参考变量集OpenValueL末尾位置***前进变量HeadDist(n(u)),当前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))等于终止节点Endp时,若前向连接线u在GPS轨迹点vp(Endp)邻近连线集NearL(Endp)中,在搜索打开节点集OpenL起始位置***n(u),在对应搜索前进参考变量集OpenValueL起始位置***0,并返回步骤S2043;
S3、由当前搜索终点vp(s)回溯所述最佳地图匹配路径,遍历获取沿途各GPS轨迹点的最佳匹配结果,并汇总输出匹配结果统计表,其实现方法如下:
S301、由末点vp(k)回溯最佳匹配路径,遍历获取沿途各GPS轨迹点,并根据沿途GPS轨迹点,获取搜索结束路网节点集CloseL各元素,遍历所述搜索结束路网节点集CloseL选择一最优元素作为匹配路径回溯点,其实现方法如下:
S3011、由末点vp(k)回溯所述最佳匹配路径,遍历获取沿途各GPS轨迹点,并根据沿途GPS轨迹点,获取搜索结束路网节点集CloseL各元素;
S3012、对所述搜索结束路网节点集CloseL中各元素道路节点建立循环,并初始化最小总路径加权成本MinCost等于1000000,当节点对应轨迹标号ValidN(s)等于当前最远匹配节点Pnow时,建立最优局部路径终点搜索迭代m=false,以及初始化当前搜索路网节点CrtN为前向搜索端点s,并进入步骤S3013;
S3013、检查当前最远匹配节点Pnow附近是否存在前向搜索端点s 途径连接线集的最后一个元素SPvia(s).last,若是,则找到局部最优终点,并进入步骤S3015,否则,进入步骤S3014;
S3014、若前向搜索端点s途径连接线集的元素数量SPvia(s)不为空值,令路径回溯端点CrtEndN等于前向搜索端点s途径连接线SPvia(s).tail,并返回步骤S3012;
S3015、根据找到的路径回溯端点CrtEndN及所属连接线路径回溯端点CrtEndN途径连接线SPvia(CrtN),计算得到路径总成本TotalCost,并判断所述路径总成本TotalCost是否小于最小总路径加权成本MinCost,若是,则更新最小总路径加权成本MinCost等于路径总成本TotalCost以及最佳匹配尾节点BestEndN等于路径回溯端点CrtEndN,进入下一备选尾节点,并返回步骤S3011,否则,遍历完搜索结束路网节点集CloseL,选择一最优元素作为匹配路径回溯点,并进入步骤S302;其中,路径总成本TotalCost的表达式如下:
TotalCost=SPcost(CrtN)+PWcost(CrtN)+Euc(vp(Pnow),CrtN)
式中,SPcost(CrtN)表示路径回溯端点CrtEndN的路径物理成本集,PWcost(CrtN)表示路径回溯端点CrtEndN的GPS轨迹点加权成本集,Euc(vp(Pnow),CrtN)表示GPS轨迹点vp(Pnow)和路径回溯端点CrtEndN的欧式距离;
S302、根据所述匹配路径回溯点,以最优匹配尾节点BestEndN为尾节点回溯完成当前轨迹段匹配过程,其实现方法如下:
S3021、更新起始节点Startp为当前最远匹配节点Pnow+1,并分别初始化当前回溯GPS轨迹点CrtP等于当前最远匹配节点Pnow、当前回溯尾节点CrtEndN等于最佳匹配尾节点BestEndN以及回溯指示变量BackCk等于端点BestEndN途径连接线SPvia(BestEndN),建立回溯迭代,并判断回溯迭代的回溯指示变量BackCk是否为空值,若是,则进入步骤S3022,否则进入步骤S3023;
S3022、检查是否已回溯到路网路径起点,若是,则直接终止迭代,并进入步骤S3023,否则,返回步骤S3021;
S3023、建立从当前回溯GPS轨迹点CrtP到上一起始节点Lastp的逆序循环k;
S3024、当匹配结果变量Match(k)等于-1时,若路径回溯端点CrtEndN途径连接线SPvia(CrtEndN)在邻近连线集NearL(k)中,则更新匹配结果变量Match(k)等于路径回溯端点CrtEndN途径连接线SPvia(CrtEndN),最优匹配权重MatchW(k)等于节点k匹配连接线的匹配权重vp(k).Weight(Match(k));以及
当匹配结果变量Match(k)大于-1时,若路径回溯端点CrtEndN途径连接线SPvia(CrtEndN)在邻近连线集NearL(k)中,且轨迹点vp(k)对应该连接线的匹配权重vp(k).Weight(SPvia(CrtEndN))小于最佳匹配权重MatchW(k),则匹配结果变量Match(k)为路径回溯端点CrtEndN途径连接线SPvia(CrtEndN),最佳匹配权重MatchW(k)为节点k匹配连接线的匹配权重vp(k).Weight(Match(k)),若路径回溯端点CrtEndN途径连接线SPvia(CrtEndN)不在邻近连线集NearL(k)中,且路径回溯端点CrtEndN对应轨迹标号ValidN(CrtEndN)小于当前回溯GPS轨迹点CrtP时,则当前回溯GPS轨迹点CrtP为当前回溯GPS轨迹点CrtP-1;
S3025、令k为k-1,并继续循环,若判断循环是否结束,若是,则进入步骤S3026,否则,返回步骤S3024;
S3026、判断回溯指示变量BackCk是否等于空值,若否,则返回步骤S3023,否则,回溯指示变量BackCk等于空值,迭代结束,从而实现以最优匹配尾节点BestEndN为尾节点回溯完成当前轨迹段的匹配过程,并进入步骤S303;
S303、根据当前匹配轨迹段回溯结果,输出从GPS轨迹点vp(Lastp)到GPS轨迹点vp(Pnow)中各GPS轨迹点的匹配结果,并分别清空所有已修改路网节点集NList中涉及路网节点各途径连接线集SPvia、路径物理成本集SPcost、局部截断成本集LOCcost、GPS轨迹点加权成本集PWcost、局部轨迹增量集Padd、对应轨迹标号集ValidN以及端点出发截断成本集StartCut;
S304、判断起始节点Startp是否大于终止节点Endp,若是,则当前出行GPS轨迹点全部匹配结束,并汇总输出匹配结果统计表,并进入步骤S4,否则,起始节点Startp小于终止节点Endp,并进入步骤S4;
S4、根据所述匹配结果统计表,判断当前搜索终点vp(s)是否为末点vp(k),若是,则当前搜索终点vp(s)为末点vp(k),完成高效GPS轨迹地图的匹配,否则,则以vp(s+1)作为地图匹配首点,并返回步骤S2,其实现方法如下:
S401、根据所述匹配结果统计表,判断当前搜索终点vp(s)是否为末点vp(k),若是,则当前搜索终点vp(s)为末点vp(k),完成高效GPS轨迹地图的匹配,否则,则以vp(s+1)作为地图匹配首点,并进入步骤S402;
S402、输出首点vp(1)至中断点vp(s)的匹配结果,并从下一点vp(s+1)到末点vp(k)执行步骤S2至S3,直至完成高效GPS轨迹地图的匹配。
本实施例中,对西安市2020年1月11日期间使用“GPSkit”人工采集GPS轨迹数据(234公里,26段轨迹,10445轨迹点)进行匹配校验,如图2所示,图2为实验数据分布地图。
本实施例中,其他6种对比轨迹匹配方法包括,4种步进式匹配算法:STM,基于时空分析的匹配算法;HMM,隐式马尔科夫匹配算法;MDP,多准则动态规划匹配算法;LBMM,基于轨迹局部特征的匹配算法;2种分段式匹配算法:SMRI,基于MRI***的分段匹配算法;SRF,基于轨迹特征的分段匹配算法,如图3和图4所示,图3为匹配精度对比曲线,图4为匹配速度对比曲线,其中精度计算方式为正确匹配点数量与全部轨迹点数量之比;速度计算方式为每一千个轨迹点所需匹配时间(秒)的以10为底对数值。
本实施例中,本发明基于“路径搜索-轨迹点空间加权”逻辑的匹配算法,算法实现了可靠高效的以“路径搜索导向的轨迹点匹配逻辑”替代传统的“轨迹点导向的路径搜索逻辑”,既避免了传统匹配逻辑中繁复低效的地图数据调用过程,也解决了新兴算法中存在回溯死循环问题,极大提升了地图匹配工作效率。
提供以上实施例仅仅是为了描述本发明的目的,而并非要限制本发明的范围。本发明的范围由所附权利要求限定。不脱离本发明的精神和原理而做出的各种等同替换和修改,均应涵盖在本发明的范围之内。
Claims (8)
- 一种高效GPS轨迹地图匹配方法,其特征在于,包括以下步骤:S1、获取任一车辆的GPS经过的若干个GPS轨迹点,并对所述若干个GPS轨迹点进行初始化操作,得到有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)};S2、在所述有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}中,以首点vp(1)建立地图匹配工作前向迭代,利用以GPS轨迹点导向的路径搜索算法得到当前搜索终点vp(s);其中,所述前向迭代为:以首点vp(1)起始,逐点迭代向后搜索匹配路径;S3、由当前搜索终点vp(s)回溯最佳地图匹配路径,遍历获取沿途各GPS轨迹点的最佳匹配结果,并汇总输出匹配结果统计表;S4、根据所述匹配结果统计表,判断当前搜索终点vp(s)是否为末点vp(k),若是,则当前搜索终点vp(s)为末点vp(k),完成高效GPS轨迹地图的匹配,否则,则以vp(s+1)作为地图匹配首点,并返回步骤S2。
- 根据权利要求1所述的高效GPS轨迹地图匹配方法,其特征在于,所述步骤S1包括以下步骤:S101、获取任一车辆的GPS经过的若干个GPS轨迹点;S102、将所述若干个GPS轨迹点分离为分段集合Trip(a)={T1,T2,…,Ta,…,Tn},其中,Ta表示一个分段,且所述Ta分段内包括多个GPS轨迹点,Tn表示总分段数;S103、从分段Ta内的多个GPS轨迹点{p(1),p(2),…,p(i),…,p(n)}中任选一个GPS轨迹点p(i)作为当前GPS轨迹点,其中,p(n)表示总的GPS轨迹点;S104、判断所述当前GPS轨迹点p(i)至p(i+1)的直线速度是否大于300km/h,若是,则剔除当前GPS轨迹点p(i),转入下一个GPS轨迹点p(i+1),并重复步骤S104,否则,进入步骤S105;或判断所述当前GPS轨迹点p(i)与p(i+1)的间隔时间是否小于等于0,若是,则剔除当前GPS轨迹点p(i),转入下一个GPS轨迹点p(i+1),并重复步骤S104,否则,进入步骤S105;S105、设当前GPS轨迹点的上一累计行驶距离变量为p(i).lastD;S106、判断所述p(i).lastD是否小于20米,若是,则计算得到GPS轨迹点p(i-1)至p(i)的距离,并剔除GPS轨迹点p(i),并进入步骤S107,否则,所述p(i).lastD大于20米,并将当前GPS轨迹点p(i)=vp(l)纳入有效节点列表VP={vp(1),vp(2),…,vp(k)},并进入步骤S107;S107、判断分段Ta内是否所有的GPS轨迹点均被作为当前GPS轨迹点,若是,则建立有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)},并获取所述GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}中各GPS轨迹点k在地图数据中的待匹配邻近连接线集合NearL(k),并初始化匹配结果变量Match(k)=-1,最佳匹配权重MatchW(k)=10000,完成有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}的建立,并进入步骤S2,否则,返回步骤S101。
- 根据权利要求1所述的高效GPS轨迹地图匹配方法,其特征在于,所述步骤S2包括以下步骤:S201、在所述有效GPS轨迹点列表VP={vp(1),vp(2),…,vp(k)}中,以首点vp(1)建立地图匹配工作前向迭代;S202、根据所述地图匹配工作前向迭代,设有效GPS列表VP={vp(1),vp(2),…,vp(k)}的起始节点为Startp,终止节点为Endp;S203、判断所述起始节点Startp是否小于等于终止节点Endp,若是,则进入步骤S204,否则,起始节点Startp大于终止节点Endp,完成GPS轨迹的全部匹配,得到首点vp(1)至末点vp(k)的最佳地图匹配路径,并进入步骤S3;S204、利用以GPS轨迹点导向的路径搜索算法搜索起始节点Startp至终止节点Endp的最短路径,并判断路径搜索的迭代过程是否结束,若是,则获取备选路径,并进入步骤S3,否则,重复步骤S204,直至路径搜索迭代完成。
- 根据权利要求3所述的高效GPS轨迹地图匹配方法,其特征在于,所述步骤S204包括以下步骤:S2041、对所述起始节点Startp进行匹配变量初始化处理,所述匹配变量包括上一起始节点Lastp等于起始节点Startp、当前最远匹配节点 Pnow、已修改路网节点集NList、搜索打开节点集OpenL、对应搜索前进参考变量集OpenValueL、搜索结束路网节点集CloseL以及起点邻近路网连接线集NearL(Startp);S2042、对所述起点邻近路网连接线集NearL(Startp)中各连接线建立地图匹配工作循环;S2043、判断各连接线是否满足出发条件,若是,则将各连接线的对应端点纳入所述搜索打开节点集OpenL,并分别更新所述对应搜索前进参考变量集OpenValueL、已修改路网节点集NList以及更新各连接线对应前向搜索端点s的搜索属性集Search(s),且当循环结束时,所述搜索打开节点集OpenL不为空集,进入步骤S2044;否则,对所述起始节点Startp选取邻近匹配值最大的连接线作为该点匹配结果,并更新起始节点Startp等于起始节点Startp+1,并返回步骤S202,其中,所述端点搜索属性集Search(s)包括端点出发截断成本StartCut(s)、路径物理成本SPcost(s)、局部截断成本LOCcost(s)、GPS轨迹点加权成本PWcost(s)、对应轨迹标号ValidN(s)、局部轨迹增量Padd(s)以及途径连接线SPvia(s);S2044、对所述搜索打开节点集OpenL中各路网搜索前向搜索端点s建立迭代,并判断所述迭代的结束条件是否为搜索打开节点集OpenL已为空集,若是,则获取备选路径,并进入步骤S3,否则,进入步骤S2045;S2045、选取所述搜索打开节点集OpenL中首个前向搜索端点s开展搜索,分别获取对应轨迹标号ValidN(s)以及前向搜索端点s的对应搜索前进参考变量OpenValueL值OpenValueL.begin,并判断所述对应轨迹标号ValidN(s)是否大于起始节点Startp-1,若是,则从搜索打开节点集OpenL以及对应前向搜索端点s的首个对应搜索前进参考变量集OpenValueL中剔除前向搜索端点s及其对应的前进变量HeadDist,并进入步骤S2046,否则,进入步骤S2048;S2046、若所述对应轨迹标号ValidN(s)小于终止节点Endp,且所述对应轨迹标号ValidN(s)小于当前最远匹配节点Pnow,则计算得到前进判断距离Jdist,并进入步骤S2047;或若所述对应轨迹标号ValidN(s)小于终止节点Endp,且所述局部轨 迹增量Padd(s)=0,则计算得到前进判断距离Jdis,并进入步骤S2047;S2047、判断前向搜索端点s的对应搜索前进参考变量的值OpenValueL(s)是否大于2*前进判断距离Jdist,且前进判断距离Jdist大于250米,若是,则返回步骤S2045,否则,进入步骤S2048;或判断所述前向搜索端点s的对应搜索前进参考变量的值OpenValueL(s)是否大于450米且前进判断距离Jdist小于等于250米,若是,则返回步骤S2045,否则,进入步骤S2048;S2048、对当前搜索前向搜索端点s各前向连接线集合ForwardL建立循环,并提取所述前向连接线u及下一路网节点n(u),当途径连接线SPvia(s)不为空值时,若前向搜索端点s途径连接线SPvia(s)等于前向连接线u时,跳至前向连接线集合ForwardL下一连接线,并继续计算前向连接线u与GPS轨迹点vp(ValidN(s))运动方向夹角MoveAng(u);S2049、判断所述运动方向夹角MoveAng(u)是否大于等于100度,若是,则跳至前向连接线集合ForwardL中下一前向连接线u,并返回步骤S2048,否则,将前向连接线u按运动方向夹角MoveAng(u)从小到大顺序***拓展连线集NextL,并在循环结束后进入步骤S20410;S20410、对拓展连线集NextL中元素建立前向搜索循环,提取前向连接线u及下一路网节点n(u),并初始化局部GPS轨迹点加权变量PWac=0、已匹配GPS轨迹点序号Sernow=对应轨迹标号ValidN(s)、局部增量匹配点数AddN=0以及掉头指示变量TurnIndi=false;S20411、当已匹配GPS轨迹点序号Sernow小于终止节点Endp时,初始化迭代指示变量Indi=true,并建立前向轨迹匹配增益,判断迭代结束条件是否为迭代指示变量Indi=false,若是,则进入步骤S20412,否则,进入步骤S20415;S20412、令已匹配GPS轨迹点序号Sernow为已匹配GPS轨迹点序号Sernow+1,在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中搜索前向连接线u,并判断前向连接线u是否不在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中,若是,则进入步骤S20413,否则,前向连接线u在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中,并进入步骤S20414;或令已匹配GPS轨迹点序号Sernow为已匹配GPS轨迹点序号Sernow+1,在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中搜索前向连接线u,并判断已匹配GPS轨迹点序号Sernow等于终止节点Endp时,迭代结束条件是否为迭代指示变量Indi=false,若是,则进入步骤S20413,否则,前向连接线u在GPS轨迹点vp(Sernow)邻近连线集NearL(Sernow)中,并进入步骤S20414;S20413、判断局部增量匹配点数AddN是否等于0,若是,则进入步骤S20415,否则,则局部增量匹配点数AddN大于0,并进入步骤S20416;S20414、分别令局部增量匹配点数AddN为局部增量匹配点数AddN+1,以及令局部GPS轨迹点加权变量PWac为PWac+vp(Sernow).Weight(u),且若GPS轨迹点存在掉头,则掉头指示变量TurnIndi=true,迭代指示变量Indi=false;当局部增量匹配点数AddN=0,则进入步骤S20415;并判断局部增量匹配点数AddN是否大于0,若是,则进入步骤S20421,否则,返回步骤S20412;其中,vp(Sernow).Weight(u)表示GPS轨迹点vp;S20415、当前向搜索端点s大于起始节点Startp时,判断前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))是否为空值,若是,则进入步骤S20416,否则,进入步骤S20417;S20416、计算得到局部搜索成本Costnow,并令前向连接线u的前向端点n(u)的局部截断成本LOCcost(n(u))=Costnow,前向连接线u的前向端点n(u)的途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)的局部轨迹增量Padd(n(u))=0,前向连接线u的前向端点n(u)的路径物理成本SPcost(n(u))=SPcost(s)+Length(u),前向连接线u的前向端点n(u)的GPS轨迹点加权成本PWcost(n(u))=PWac,在已修改路网节点集NList末尾***n(u),并进入步骤S20419,其中,所述局部搜索成本Costnow的表达式如下:Costnow=LOCcost(s)+Length(u)式中,LOCcost(s)表示前向搜索端点s的局部截断成本,Length(u)表示前向连接线u的长度;S20417、判断前向连接线u的前向端点n(u)对应轨迹标号ValidN (n(u))是否等于前向搜索端点s对应轨迹标号ValidN(s),若是,则进入步骤S20418,否则,前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))小于前向搜索端点s对应轨迹标号ValidN(s),并进入步骤S20419;S20418、根据前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))计算得到匹配路径成本Cost1,以及根据计算得到前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u)),若匹配路径成本Cost1小于匹配路径成本Cost2,则计算得到前向连接线u的前向端点n(u)局部截断成本LOCcost(n(u)),并令前向连接线u的前向端点n(u)途径连接线SPvia(n(u))=u,令前向连接线u的前向端点n(u)局部轨迹增量Padd(n(u))=0,以及计算得到前向连接线u的前向端点n(u)路径物理成本SPcost(n(u))以及令前向连接线u的前向端点n(u)GPS轨迹点加权成本PWcost(n(u))等于前向搜索端点s的GPS轨迹点加权成本PWcost(s),并进入步骤S20420,其中,所述匹配路径成本Cost的表达式如下:Cost1=SPcost(s)+Length(u)+PWcost(s)式中,SPcost(s)表示前向搜索端点s路径物理成本,Length(u)表示前向连接线u的长度,PWcost(s)表示前向搜索端点s的GPS轨迹点加权成本;所述匹配路径成本Cost2的表达式如下:Cost2=SPcost(n(u))+PWcost(n(u))式中,SPcost(n(u))表示前向连接线u的前向端点n(u)路径物理成本,PWcost(n(u))表示前向连接线u的前向端点n(u)GPS轨迹点加权成本;所述前向连接线u的前向端点n(u)局部截断成本LOCcost(n(u))的表达式如下:LOCcost(n(u))=LOCcost(s)+Length(u)式中,LOCcost(s)表示,前向搜索端点s局部截断成本,Length(u)表示前向连接线u的长度;SPcost(n(u))=SPcost(s)+Length(u)式中,SPcost(s)表示前向搜索端点s路径物理成本,Length(u)表示前向连接线u的长度;S20419、根据前向搜索端点s局部截断成本LOCcost(s)以及前向连接线u的长度Length(u)计算得到前进变量HeadDist,并令前向连接线u的前向端点n(u)的局部截断成本LOCcost(n(u))=HeadDist,前向连接线u的前向端点n(u)的途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)的局部轨迹增量Padd(n(u))=0,前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))=ValidN(s),前向连接线u的前向端点n(u)的路径物理成本SPcost(n(u))=SPcost(s)+Length(u),前向连接线u的前向端点n(u)的GPS轨迹点加权成本PWcost(n(u))=PWcost(s),并进入步骤S20425;其中,所述前进变量HeadDist的表达式如下:HeadDist=LOCcost(s)+Length(u)式中,LOCcost(s)表示前向搜索端点s局部截断成本,Length(u)表示前向连接线u的长度;S20420、根据所述前向搜索端点s对应轨迹标号ValidN(s)计算得到当前匹配GPS轨迹点进度Mnow,并判断前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))是否为空值,若是,则进入步骤S20421,否则,进入步骤S20422;其中,所述当前匹配GPS轨迹点进度Mnow的表达式如下:Mnow=ValidN(s)+AddN式中,ValidN(s)表示前向搜索端点s对应轨迹标号,AddN表示局部增量匹配点数;S20421、计算得到局部搜索成本Costnow以及令前向变量HeadDist为GPS轨迹点vp(Mnow)和前向连接线u的前向端点n(u)的欧式距离Euc(vp(Mnow),n(u)),并令前向连接线u的前向端点n(u)的局部截断成本LOCcost(n(u))=HeadDist,前向连接线u的前向端点n(u)的途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)的局部轨迹增量Padd(n(u))=AddN,前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))=Mnow,前向连接线u的前向端点n(u) 的路径物理成本SPcost(n(u))=SPcost(s)+Costnow,前向连接线u的前向端点n(u)的GPS轨迹点加权成本PWcost(n(u))=PWcost(s)+PWac,以及在已修改路网节点集NList末尾***n(u),并进入步骤S0425,其中,所述局部搜索成本Costnow的表达式如下:Costnow=Length(u)-StartCut(s)式中,Length(u)表示前向连接线u的长度,StartCut(s)表示前向搜索端点s出发截断成本;S20422、判断前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))是否等于前向搜索端点s对应轨迹标号ValidN(s),若是,则进入步骤S20423,否则,前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))小于当前匹配GPS轨迹点进度Mnow,并进入步骤S20424;S20423、分别计算得到匹配路径成本Cost1以及匹配路径成本Cost2,若匹配路径成本Cost1小于匹配路径成本Cost2,则令前进变量HeadDist等于GPS轨迹点vp(Mnow)和n(u)的欧式距离Euc(vp(Mnow),n(u)),令前向连接线u的前向端点n(u)局部截断成本LOCcost(n(u))=HeadDist,前向连接线u的前向端点n(u)途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)局部轨迹增量Padd(n(u))=AddN,以及分别计算得到前向连接线u的前向端点n(u)路径物理成本SPcost(n(u))以及前向连接线u的前向端点n(u)GPS轨迹点加权成本PWcost(n(u)),并进入步骤S20428;其中,所述匹配路径成本的表达式如下:Cost1=SPcost(s)+Length(u)+PWcost(s)+PWac-StartCut(s)式中,SPcost(s)表示前向搜索端点s路径物理成本,Length(u)表示前向连接线u的长度,PWcost(s)表示前向搜索端点s的GPS轨迹点加权成本,PWac表示局部GPS轨迹点加权变量,StartCut(s)表示前向搜索端点s出发截断成本;所述前向连接线u的前向端点n(u)路径物理成本SPcost(n(u))的表达式如下:SPcost(n(u))=SPcost(s)+Length(u)+StartCut(s)式中,SPcost(s)表示前向搜索端点s路径物理成本,Length(u)表示前向连接线u的长度,StartCut(s)表示前向搜索端点s出发截断成 本;所述前向连接线u的前向端点n(u)GPS轨迹点加权成本PWcost(n(u))的表达式如下:PWcost(n(u))=PWcost(s)+PWac式中,PWcost(s)表示前向搜索端点s的GPS轨迹点加权成本,PWac表示局部GPS轨迹点加权变量;S20424、执行前进变量HeadDist为GPS轨迹点vp(Mnow)和前向连接线u的前向端点n(u)的欧式距离Euc(vp(Mnow),n(u)),并计算得到局部搜索成本Costnow,以及令前向连接线u的前向端点n(u)的局部截断成本LOCcost(n(u))=HeadDist,前向连接线u的前向端点n(u)的途径连接线SPvia(n(u))=u,前向连接线u的前向端点n(u)的局部轨迹增量Padd(n(u))=AddN,前向连接线u的前向端点n(u)的对应轨迹标号ValidN(n(u))=Mnow,前向连接线u的前向端点n(u)的路径物理成本SPcost(n(u))=SPcost(s)+Costnow,前向连接线u的前向端点n(u)的GPS轨迹点加权成本PWcost(n(u))=PWcost(s)+PWac,并进入步骤S20428;其中,所述局部搜索成本Costnow的表达式如下:S20425、当前向搜索端点s对应轨迹标号ValidN(s)小于终止节点Endp时,在搜索结束路网节点集CloseL中剔除前向搜索端点s,并计算得到前进变量HeadDist(n(u)),若搜索打开节点集OpenL中有前向连接线u的前向端点n(u),则剔除该元素,并判断前向搜索端点s对应轨迹标号ValidN(s)是否等于当前最远匹配节点Pnow,若是,则进入步骤S20426,否则,前向连接线u的前向端点n(u)对应轨迹标号ValidN(s)小于当前最远匹配节点Pnow,并进入步骤S20427;其中,前进变量HeadDist(n(u))的表达式如下:HeadDist(n(u))=Euc(vp(ValidN(s)+1),n(u))+LOCcost(n(u))式中,Euc(vp(ValidN(s)+1),n(u))表示GPS轨迹点vp(ValidN(s))和前向连接线u的前向端点n(u)的欧式距离,LOCcost(n(u))表示前向连接线u的前向端点n(u)局部截断成本;S20426、在搜索打开节点集OpenL起始位置***前向连接线u的前向端点n(u),在对应搜索前进参考变量集OpenValueL起始位置***前进变量HeadDist(n(u)),在搜索结束路网节点集CloseL中***前向连接线u的前向端点n(u),并返回步骤S2044;S20427、在搜索打开节点集OpenL末尾位置***n(u),在对应搜索前进参考变量集OpenValueL末尾位置***前进变量HeadDist(n(u)),当前向搜索端点s对应轨迹标号ValidN(s)等于终止节点Endp时,若前向连接线u在GPS轨迹点vp(Endp)邻近连线集NearL(Endp)中,则在搜索结束路网节点集CloseL中剔除前向搜索端点s,在搜索打开节点集OpenL起始位置***前向连接线u的前向端点n(u),在对应搜索前进参考变量集OpenValueL起始位置***0以及在搜索结束路网节点集CloseL***前向连接线u的前向端点n(u),并返回步骤S2043;S20428、当前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))小于终止节点Endp时,计算前进变量HeadDist(n(u))等于GPS轨迹点vp(ValidN(s)和n(u)的欧式距离Euc(vp(ValidN(n(u))+1)以及前向连接线u的前向端点n(u))和前向连接线u的前向端点n(u)局部截断成本LOCcost(n(u))之和,若搜索打开节点集OpenL中有前向连接线u的前向端点n(u),则剔除前向连接线u的前向端点n(u),并判断前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))是否大等于当前最远匹配节点Pnow,若是,则进入步骤S20429,否则,进入步骤S20430;其中,所述前进变量HeadDist(n(u))的表达式如下:HeadDist(n(u))=(vp(ValidN(n(u))+1)+LOCcost(n(u))式中,Euc(vp(ValidN(n(u))+1)表示GPS轨迹点vp(ValidN(s))和n(u)的欧式距离Euc,LOCcost(n(u))表示前向连接线u的前向端点n(u)局部截断成本;S20429、在搜索打开节点集OpenL起始位置***前向连接线u的前向端点n(u),在对应搜索前进参考变量集OpenValueL起始位置***前进变量HeadDist(n(u)),并返回步骤S2044;S20430、判断前向连接线u的前向端点n(u)对应轨迹标号ValidN (n(u))是否大于当前最远匹配节点Pnow,若是,则进入步骤S20431,否则,前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))小于等于当前最远匹配节点Pnow,并进入步骤S20432;S20431、更新当前最远匹配节点Pnow为前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u)),并清空搜索结束路网节点集CloseL集合,***前向连接线u的前向端点n(u),并返回步骤S2044;S20432、在搜索打开节点集OpenL末尾位置***前向连接线u的前向端点n(u),在对应搜索前进参考变量集OpenValueL末尾位置***前进变量HeadDist(n(u)),当前向连接线u的前向端点n(u)对应轨迹标号ValidN(n(u))等于终止节点Endp时,若前向连接线u在GPS轨迹点vp(Endp)邻近连线集NearL(Endp)中,在搜索打开节点集OpenL起始位置***n(u),在对应搜索前进参考变量集OpenValueL起始位置***0,并返回步骤S2043。
- 根据权利要求1所述的高效GPS轨迹地图匹配方法,其特征在于,所述步骤S3包括以下步骤:S301、由末点vp(k)回溯所述最佳匹配路径,遍历获取沿途各GPS轨迹点,并根据沿途GPS轨迹点,获取搜索结束路网节点集CloseL各元素,遍历所述搜索结束路网节点集CloseL选择一最优元素作为匹配路径回溯点;S302、根据所述匹配路径回溯点,以最优匹配尾节点BestEndN为尾节点回溯完成当前轨迹段匹配过程;S303、根据当前匹配轨迹段回溯结果,输出从GPS轨迹点vp(Lastp)到GPS轨迹点vp(Pnow)中各GPS轨迹点的匹配结果,并分别清空所有已修改路网节点集NList中涉及路网节点各途径连接线SPvia、路径物理成本SPcost、局部截断成本LOCcost、GPS轨迹点加权成本PWcost、局部轨迹增量Padd、对应轨迹标号ValidN以及端点出发截断成本StartCut;S304、判断起始节点Startp是否大于终止节点Endp,若是,则当前出行GPS轨迹点全部匹配结束,并汇总输出匹配结果统计表,并进入步骤S4,否则,起始节点Startp小于终止节点Endp,并进入步骤S4。
- 根据权利要求5所述的高效GPS轨迹地图匹配方法,其特征在于,所述步骤S301包括以下步骤:S3011、由末点vp(k)回溯所述最佳匹配路径,遍历获取沿途各GPS轨迹点,并根据沿途GPS轨迹点,获取搜索结束路网节点集CloseL各元素;S3012、对所述搜索结束路网节点集CloseL中各元素道路节点建立循环,并初始化最小总路径加权成本MinCost等于1000000,当节点对应轨迹标号ValidN(s)等于当前最远匹配节点Pnow时,建立最优局部路径终点搜索迭代m=false,以及初始化当前搜索路网节点CrtN为前向搜索端点s,并进入步骤S3013;S3013、检查当前最远匹配节点Pnow附近是否存在前向搜索端点s途径连接线集的最后一个元素SPvia(s).last,若是,则找到局部最优终点,并进入步骤S3015,否则,进入步骤S3014;S3014、若前向搜索端点s途径连接线集的元素数量SPvia(s)不为空值,令路径回溯端点CrtEndN等于前向搜索端点s途径连接线SPvia(s).tail,并返回步骤S3012;S3015、根据找到的路径回溯端点CrtEndN及所属连接线路径回溯端点CrtEndN途径连接线SPvia(CrtN),计算得到路径总成本TotalCost,并判断所述路径总成本TotalCost是否小于最小总路径加权成本MinCost,若是,则更新最小总路径加权成本MinCost等于路径总成本TotalCost以及最佳匹配尾节点BestEndN等于路径回溯端点CrtEndN,进入下一备选尾节点,并返回步骤S3011,否则,遍历完搜索结束路网节点集CloseL,选择一最优元素作为匹配路径回溯点,并进入步骤S302;其中,路径总成本TotalCost的表达式如下:TotalCost=SPcost(CrtN)+PWcost(CrtN)+Euc(vp(Pnow),CrtN)式中,SPcost(CrtN)表示路径回溯端点CrtEndN的路径物理成本集,PWcost(CrtN)表示路径回溯端点CrtEndN的GPS轨迹点加权成本集,Euc(vp(Pnow),CrtN)表示GPS轨迹点vp(Pnow)和路径回溯端点CrtEndN的欧式距离。
- 根据权利要求5所述的高效GPS轨迹地图匹配方法,其特征在于, 所述步骤S302包括以下步骤:S3021、更新起始节点Startp为当前最远匹配节点Pnow+1,并分别初始化当前回溯GPS轨迹点CrtP等于当前最远匹配节点Pnow、当前回溯尾节点CrtEndN等于最佳匹配尾节点BestEndN以及回溯指示变量BackCk等于端点BestEndN途径连接线SPvia(BestEndN),建立回溯迭代,并判断回溯迭代的回溯指示变量BackCk是否为空值,若是,则进入步骤S3022,否则进入步骤S3023;S3022、检查是否已回溯到路网路径起点,若是,则直接终止迭代,并进入步骤S3023,否则,返回步骤S3021;S3023、建立从当前回溯GPS轨迹点CrtP到上一起始节点Lastp的逆序循环k;S3024、当匹配结果变量Match(k)等于-1时,若路径回溯端点CrtEndN途径连接线SPvia(CrtEndN)在邻近连线集NearL(k)中,则更新匹配结果变量Match(k)等于路径回溯端点CrtEndN途径连接线SPvia(CrtEndN),最优匹配权重MatchW(k)等于节点k匹配连接线的匹配权重vp(k).Weight(Match(k));以及当匹配结果变量Match(k)大于-1时,若路径回溯端点CrtEndN途径连接线SPvia(CrtEndN)在邻近连线集NearL(k)中,且轨迹点vp(k)对应该连接线的匹配权重vp(k).Weight(SPvia(CrtEndN))小于最佳匹配权重MatchW(k),则匹配结果变量Match(k)为路径回溯端点CrtEndN途径连接线SPvia(CrtEndN),最佳匹配权重MatchW(k)为节点k匹配连接线的匹配权重vp(k).Weight(Match(k)),若路径回溯端点CrtEndN途径连接线SPvia(CrtEndN)不在邻近连线集NearL(k)中,且路径回溯端点CrtEndN对应轨迹标号ValidN(CrtEndN)小于当前回溯GPS轨迹点CrtP时,则当前回溯GPS轨迹点CrtP为当前回溯GPS轨迹点CrtP-1;S3025、令k为k-1,并继续循环,若判断循环是否结束,若是,则进入步骤S3026,否则,返回步骤S3024;S3026、判断回溯指示变量BackCk是否等于空值,若否,则返回步骤S3023,否则,回溯指示变量BackCk等于空值,迭代结束,从而实现 以最优匹配尾节点BestEndN为尾节点回溯完成当前轨迹段的匹配过程,并进入步骤S303。
- 根据权利要求1所述的高效GPS轨迹地图匹配方法,其特征在于,所述步骤S4包括以下步骤:S401、根据所述匹配结果统计表,判断当前搜索终点vp(s)是否为末点vp(k),若是,则当前搜索终点vp(s)为末点vp(k),完成高效GPS轨迹地图的匹配,否则,则以vp(s+1)作为地图匹配首点,并进入步骤S402;S402、输出首点vp(1)至中断点vp(s)的匹配结果,并从下一点vp(s+1)到末点vp(k)执行步骤S2至S3,直至完成高效GPS轨迹地图的匹配。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110674847.8 | 2021-06-18 | ||
CN202110674847.8A CN113254562B (zh) | 2021-06-18 | 2021-06-18 | 一种高效gps轨迹地图匹配方法 |
Publications (3)
Publication Number | Publication Date |
---|---|
WO2022262741A1 true WO2022262741A1 (zh) | 2022-12-22 |
WO2022262741A9 WO2022262741A9 (zh) | 2023-02-23 |
WO2022262741A8 WO2022262741A8 (zh) | 2023-11-09 |
Family
ID=77188491
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/098815 WO2022262741A1 (zh) | 2021-06-18 | 2022-06-15 | 一种高效gps轨迹地图匹配方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113254562B (zh) |
WO (1) | WO2022262741A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113254562B (zh) * | 2021-06-18 | 2021-09-28 | 长安大学 | 一种高效gps轨迹地图匹配方法 |
CN114061591B (zh) * | 2021-11-18 | 2022-07-12 | 东南大学 | 一种基于滑动窗数据回溯的等值线匹配方法 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080262721A1 (en) * | 2007-04-17 | 2008-10-23 | Hitachi, Ltd. | Map generation system and map generation method by using GPS tracks |
CN109143291A (zh) * | 2018-06-29 | 2019-01-04 | 长安大学 | 一种车载gps轨迹空间索引精确匹配方法 |
CN112327338A (zh) * | 2021-01-05 | 2021-02-05 | 长安大学 | 一种快速车载gps轨迹精确地图匹配的方法 |
CN113254562A (zh) * | 2021-06-18 | 2021-08-13 | 长安大学 | 一种高效gps轨迹地图匹配方法 |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100689773B1 (ko) * | 2005-07-27 | 2007-03-08 | 주식회사 현대오토넷 | 등산로 안내 기능을 가지는 네비게이션 시스템 및 등산로안내 방법 |
US10281279B2 (en) * | 2016-10-24 | 2019-05-07 | Invensense, Inc. | Method and system for global shape matching a trajectory |
US11015941B2 (en) * | 2018-05-25 | 2021-05-25 | Here Global B.V. | Method and apparatus for path based map matching |
CN109405839B (zh) * | 2018-10-23 | 2022-04-12 | 南京林业大学 | 一种基于多路径的交通网络离线地图匹配算法 |
CN109459047B (zh) * | 2018-12-24 | 2022-10-18 | 武汉大学 | 车辆高精度定位数据与导航地图精确匹配及变道行为探测方法 |
CN110209048A (zh) * | 2019-05-20 | 2019-09-06 | 华南理工大学 | 基于动力学模型的机器人时间最优轨迹规划方法、设备 |
CN110595487B (zh) * | 2019-07-24 | 2024-07-23 | 平安科技(深圳)有限公司 | 行车轨迹生成方法、装置、计算机设备及存储介质 |
CN111174798A (zh) * | 2020-01-17 | 2020-05-19 | 长安大学 | 一种足式机器人路径规划方法 |
CN111343585B (zh) * | 2020-02-28 | 2021-11-02 | 重庆邮电大学 | 一种基于隐马尔可夫模型的移动用户轨迹地图匹配方法 |
CN112082564B (zh) * | 2020-08-11 | 2022-09-06 | 东莞理工学院 | 一种交互式地图匹配方法及*** |
CN112020012B (zh) * | 2020-08-18 | 2022-09-30 | 深圳诺地思维数字科技有限公司 | 一种移动轨迹重建及道路匹配方法、存储介质及服务器 |
CN112539754B (zh) * | 2020-11-12 | 2023-04-28 | 武汉光庭信息技术股份有限公司 | 一种基于rds-tmc的高精度地图与传统地图路径匹配方法及装置 |
-
2021
- 2021-06-18 CN CN202110674847.8A patent/CN113254562B/zh active Active
-
2022
- 2022-06-15 WO PCT/CN2022/098815 patent/WO2022262741A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080262721A1 (en) * | 2007-04-17 | 2008-10-23 | Hitachi, Ltd. | Map generation system and map generation method by using GPS tracks |
CN109143291A (zh) * | 2018-06-29 | 2019-01-04 | 长安大学 | 一种车载gps轨迹空间索引精确匹配方法 |
CN112327338A (zh) * | 2021-01-05 | 2021-02-05 | 长安大学 | 一种快速车载gps轨迹精确地图匹配的方法 |
CN113254562A (zh) * | 2021-06-18 | 2021-08-13 | 长安大学 | 一种高效gps轨迹地图匹配方法 |
Also Published As
Publication number | Publication date |
---|---|
CN113254562A (zh) | 2021-08-13 |
WO2022262741A9 (zh) | 2023-02-23 |
CN113254562B (zh) | 2021-09-28 |
WO2022262741A8 (zh) | 2023-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022147968A1 (zh) | 一种快速车载gps轨迹精确地图匹配的方法 | |
WO2022262741A1 (zh) | 一种高效gps轨迹地图匹配方法 | |
CN109405839B (zh) | 一种基于多路径的交通网络离线地图匹配算法 | |
CN109143291B (zh) | 一种车载gps轨迹空间索引精确匹配方法 | |
CN110095127A (zh) | 一种基于分段的隐马尔可夫模型地图匹配方法 | |
CN106023587A (zh) | 基于多信息融合的轨迹数据路网精确匹配方法 | |
CN108346284A (zh) | 一种基于马尔科夫模型的不确定性路网车辆轨迹预测方法 | |
CN106052701B (zh) | 一种交通溢流状态下车辆路径选择的方法 | |
CN108827335A (zh) | 一种基于单向搜索模型的最短路径规划方法 | |
CN108021686A (zh) | 一种快速匹配电子地图中公交线路与道路网络的方法 | |
CN105184393A (zh) | 一种复杂路径下辅助路径还原方法 | |
CN112067005A (zh) | 一种基于转弯点的离线地图匹配方法、装置及终端设备 | |
CN109035783A (zh) | 一种基于公交gps轨迹的虚拟路网缺失路段自动识别方法 | |
Liu et al. | Popular route planning with travel cost estimation from trajectories | |
CN108132056A (zh) | 一种通过gps推断公交路径方法 | |
CN113295177A (zh) | 基于实时路况信息的动态路径规划方法及*** | |
CN112033418A (zh) | 一种离线地图匹配方法 | |
CN112857378A (zh) | 一种轨迹匹配方法及装置 | |
CN110363300A (zh) | 一种融合隐马尔可夫模型和数据投影切分的轨迹修正方法 | |
CN113465612B (zh) | 一种基于双层索引的并行路径规划方法及*** | |
Imamichi et al. | Truncating Shortest Path Search for Efficient Map-Matching. | |
CN111595353B (zh) | 一种基于GPU和Spark混合并行计算架构的实时地图匹配方法 | |
CN110457352B (zh) | 一种基于微观交通仿真车辆数据结构的邻车查询方法 | |
CN114842641A (zh) | 面向省域的多模式链式交通分配方法 | |
CN115050182B (zh) | 高速出行真实od识别方法及其*** |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 18015348 Country of ref document: US |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22824220 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22824220 Country of ref document: EP Kind code of ref document: A1 |