[go: up one dir, main page]

CN115265555B - Map matching correction method and system based on hidden Markov multi-noise perception - Google Patents

Map matching correction method and system based on hidden Markov multi-noise perception Download PDF

Info

Publication number
CN115265555B
CN115265555B CN202210878302.3A CN202210878302A CN115265555B CN 115265555 B CN115265555 B CN 115265555B CN 202210878302 A CN202210878302 A CN 202210878302A CN 115265555 B CN115265555 B CN 115265555B
Authority
CN
China
Prior art keywords
points
map
point
error
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210878302.3A
Other languages
Chinese (zh)
Other versions
CN115265555A (en
Inventor
钱诗友
周建华
胡瀚文
曹健
薛广涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiao Tong University
Original Assignee
Shanghai Jiao Tong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiao Tong University filed Critical Shanghai Jiao Tong University
Priority to CN202210878302.3A priority Critical patent/CN115265555B/en
Publication of CN115265555A publication Critical patent/CN115265555A/en
Application granted granted Critical
Publication of CN115265555B publication Critical patent/CN115265555B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Abstract

The invention provides a map matching correction method and a system based on hidden Markov multi-noise perception, which are used for obtaining a smooth track by gridding an area; inputting the smoothed track into a hidden Markov model for matching; calculating fluctuation conditions of observation points in the matching process; deleting the current observation point when the fluctuation amplitude exceeds a threshold value; deleting continuous track points in the adjacent area, predicting the positions of the deleted points, evaluating the error range of the predicted positions and the observed positions, and judging that the map error exists at the section of sampling track when the error is smaller than a threshold value; and taking the deleted points as the input of a map generator, dividing the deleted road segments into a series of sections according to the calculated inflection point positions, and calculating the line segments passing through the inflection points in the sections. The invention creatively provides a map matching framework capable of detecting map errors and deleting low-quality sampling points, which can be combined with a map matching algorithm based on a hidden Markov model to correct matching results and improve matching accuracy.

Description

基于隐马尔科夫的多噪声感知的地图匹配校正方法及系统Map matching correction method and system based on multi-noise perception of hidden Markov

技术领域Technical Field

本发明涉及智能交通的技术领域,具体地,涉及一种基于隐马尔科夫的多噪声感知的地图匹配校正方法及系统。尤其是,优选的涉及一种基于隐马尔科夫模型的多噪声感知的地图匹配与校正框架。The present invention relates to the technical field of intelligent transportation, and in particular, to a map matching and correction method and system based on hidden Markov multi-noise perception. In particular, it preferably relates to a map matching and correction framework based on hidden Markov model multi-noise perception.

背景技术Background technique

近几年,随着在线打车平台的快速发展与广泛应用,各个公司均推出了自己的打车app,同时为几乎所有的出租车均配备了GPS设备,以获取车辆的位置、方向等信息。许多功能例如对出租车的路径导航、位置与路线预测和识别、异常行为的检测等均需要精确的定位与追踪。In recent years, with the rapid development and widespread application of online taxi platforms, various companies have launched their own taxi apps, and almost all taxis are equipped with GPS devices to obtain information such as the location and direction of the vehicle. Many functions such as taxi route navigation, location and route prediction and identification, and abnormal behavior detection require accurate positioning and tracking.

早期地图匹配算法的研究,大多数是基于几何相似性的,这类方法无法处理采样误差大的情况。后来提出的许多基于隐马尔科夫模型的匹配算法,借助路网本身的限制,定义了转移概率,从而避免了一些采样误差大而选择错误路段的情况。但是这些算法缺乏考虑路网的复杂性以及采样误差大同时出现的情况,从而导致出现反向运动等不正确的匹配结果。同时由于现实路网本身是不断更新的,路段的缺失使得地图匹配时无法选到真实的路段。Most of the early research on map matching algorithms was based on geometric similarity, which cannot handle situations with large sampling errors. Many matching algorithms based on hidden Markov models proposed later defined transition probabilities with the help of the limitations of the road network itself, thereby avoiding situations where the wrong road sections are selected due to large sampling errors. However, these algorithms lack consideration of the complexity of the road network and the simultaneous occurrence of large sampling errors, resulting in incorrect matching results such as reverse motion. At the same time, since the real road network itself is constantly updated, the lack of road sections makes it impossible to select real road sections during map matching.

除了隐马尔科夫模型外,近几年在地图匹配算法还有其他方面的改进。随着更多的指标引入,一些基于评分模型的算法也取得了很好的效果。例如通过支持向量机对各个GPS点进行分类并剔除低质量采样点等。总的来说,各类算法在采样误差低或符合路网限制的情况下,匹配精度足够用于实际场景。In addition to the hidden Markov model, there have been other improvements in map matching algorithms in recent years. With the introduction of more indicators, some algorithms based on scoring models have also achieved good results. For example, support vector machines are used to classify each GPS point and remove low-quality sampling points. In general, the matching accuracy of various algorithms is sufficient for practical scenarios when the sampling error is low or the road network restrictions are met.

公开号为CN113639757A的中国发明专利文献公开了一种基于双向评分模型和回溯校正机制的地图匹配方法及系统,包括:基于采集到的GPS点位置信息,根据地图路径信息选取候选点;基于双向评分模型对测量的GPS点的位置、方向以及速度进行评分并赋予位置、方向以及速度不同的权重,得到候选点对GPS点的评分;当GPS点的评分低于阈值时,则判定为低质量点,并删除当前低质量点不参与匹配;当判定连续的GPS点为低质量点并删除时,则利用随后第一个没有被删除的GPS点逆向评估被删除的GPS点,重新检测被删除的GPS点是否为低质量点;基于双向评分模型计算每个候选点与当前保留的GPS点的匹配概率,选择概率值最大的候选点作为匹配的候选点;根据匹配的候选点,基于最短路径原则生成唯一的地图匹配结果。The Chinese invention patent document with publication number CN113639757A discloses a map matching method and system based on a two-way scoring model and a backtracking correction mechanism, including: selecting candidate points based on the collected GPS point location information according to the map path information; scoring the measured position, direction and speed of the GPS point based on the two-way scoring model and assigning different weights to the position, direction and speed to obtain the score of the candidate point to the GPS point; when the score of the GPS point is lower than the threshold, it is determined to be a low-quality point, and the current low-quality point is deleted and does not participate in the matching; when the continuous GPS points are determined to be low-quality points and deleted, the deleted GPS points are reversely evaluated using the first subsequent GPS point that has not been deleted, and the deleted GPS points are re-detected to see if they are low-quality points; the matching probability of each candidate point and the currently retained GPS point is calculated based on the two-way scoring model, and the candidate point with the largest probability value is selected as the matching candidate point; according to the matching candidate points, a unique map matching result is generated based on the shortest path principle.

针对上述中的相关技术,发明人认为目前所提出的算法由于忽略了地图错误的情况,以及采样误差大的情况,导致在实际应用中匹配常常出现中断或绕路等错误的匹配结果。With respect to the above-mentioned related technologies, the inventors believe that the currently proposed algorithms ignore map errors and large sampling errors, which leads to erroneous matching results such as frequent interruptions or detours in actual applications.

发明内容Summary of the invention

针对现有技术中的缺陷,本发明的目的是提供一种基于隐马尔科夫的多噪声感知的地图匹配校正方法及系统。In view of the defects in the prior art, the object of the present invention is to provide a map matching correction method and system based on hidden Markov multi-noise perception.

根据本发明提供的一种基于隐马尔科夫的多噪声感知的地图匹配校正方法,包括如下步骤:According to the present invention, a map matching correction method based on hidden Markov multi-noise perception includes the following steps:

区域窗口化步骤:通过对区域网格化,限制轨迹的不规则漂移,得到平滑的轨迹;Region windowing step: By gridding the region, the irregular drift of the trajectory is limited to obtain a smooth trajectory;

地图匹配步骤:将平滑后的轨迹输入带有删除点与地图纠正框架的隐马尔科夫模型进行匹配;Map matching step: the smoothed trajectory is input into the hidden Markov model with deleted points and map correction frame for matching;

概率波动检测步骤:匹配的过程中计算每个观测点的维特比解码概率的波动情况;如果波动幅度超过阈值,则删除当前观测点;Probability fluctuation detection step: during the matching process, the fluctuation of the Viterbi decoding probability of each observation point is calculated; if the fluctuation amplitude exceeds the threshold, the current observation point is deleted;

轨迹评估步骤:若在邻近区域内删除掉连续的轨迹点,则利用卡尔曼滤波器和已保留轨迹点对删除点位置做预测,评估预测位置和观测位置的误差范围,若误差小于阈值,则判定该段采样轨迹处有地图错误;Trajectory evaluation step: If continuous trajectory points are deleted in the adjacent area, the Kalman filter and the retained trajectory points are used to predict the position of the deleted points, and the error range between the predicted position and the observed position is evaluated. If the error is less than the threshold, it is determined that there is a map error in the sampling trajectory;

缺失路段生成步骤:将删除的点作为地图生成器的输入,根据计算的拐点位置,将缺失的路段划分为一系列区间,区间内利用线性回归模型计算出穿过拐点间的线段。Steps for generating missing road segments: Use the deleted points as the input of the map generator, divide the missing road segments into a series of intervals according to the calculated turning point positions, and use the linear regression model to calculate the line segments passing through the turning points within the intervals.

优选的,在所述区域窗口化步骤中,首先将地理区域划分为网格单元;Preferably, in the region windowing step, the geographical region is first divided into grid units;

如果车辆在网格单元中没有花费预定行驶时间,则不允许车辆从该网格单元过渡;If a vehicle does not spend a predetermined travel time in a grid cell, the vehicle is not allowed to transition from that grid cell;

在每个网格单元中,使用DP算法的变体来平滑轨迹,用近似线段代替原始轨迹;In each grid cell, a variation of the DP algorithm is used to smooth the trajectory, replacing the original trajectory with an approximated line segment;

如果替换不满足指定的错误要求,将通过选择的位置点作为划分点,递归地将原始问题划分为两个子问题,再判断替换是否满足指定的错误要求,直到近似轨迹和原始轨迹之间的误差低于指定的误差阈值;If the replacement does not meet the specified error requirement, the original problem is recursively divided into two sub-problems by using the selected position point as the partition point, and then it is judged whether the replacement meets the specified error requirement until the error between the approximate trajectory and the original trajectory is lower than the specified error threshold;

DP算法使用正交欧氏距离作为误差度量,保持近似轨迹中的方向趋势;The DP algorithm uses orthogonal Euclidean distance as the error metric to maintain the directional trend in the approximate trajectory;

通过移除距离大于阈值的分区点,限制网格单元中的速度变化。Limit the velocity variation in a grid cell by removing partition points whose distance is greater than a threshold.

优选的,在所述地图匹配步骤中,在地图匹配阶段,将从区域窗口化步骤中获取平滑的GPS点作为输入,并将平滑的GPS点映射到数字地图上的路段,使用隐马尔科夫模型确定与GPS原始数据的时间戳序列相对应的路段序列;Preferably, in the map matching step, in the map matching stage, the smoothed GPS points are obtained from the region windowing step as input, and the smoothed GPS points are mapped to road segments on the digital map, and a hidden Markov model is used to determine a road segment sequence corresponding to a timestamp sequence of the GPS raw data;

隐马尔科夫模型是具有候选状态和观测值的离散时间马尔可夫过程;A hidden Markov model is a discrete-time Markov process with candidate states and observations;

使用索引网格来搜索候选状态,每个候选状态为最接近路段中观测点的点,并产生观测概率该观测概率/>定义为GPS采样点pi与基于高斯噪声模型计算的候选点/>匹配的可能性:Use the index grid to search for candidate states, each candidate state is the point closest to the observation point in the road segment, and generates an observation probability The observation probability/> Defined as the GPS sampling point p i and the candidate point calculated based on the Gaussian noise model/> Possibility of matching:

其中,σ是标准偏差,d定义为pi之间的投影距离,pi是i时刻的采样点,/>是pi的第j个候选点;where σ is the standard deviation and d is defined as p i and The projection distance between them, pi is the sampling point at time i, /> is the jth candidate point of pi ;

其中,是pi第j条候选路段,c是边/>上的任意点,dist(pi,c)是pi和c之间的欧式距离;in, is the jth candidate road segment of p i , c is the edge/> For any point on , dist( pi ,c) is the Euclidean distance between pi and c;

隐马尔科夫模型允许从前一个候选状态到当前候选状态的转换,并且该转换由转换概率控制;The hidden Markov model allows transitions from the previous candidate state to the current candidate state, and the transitions are controlled by transition probabilities;

根据经验,隐马尔科夫模型假设连续候选状态之间的最短路径具有转移概率 As a rule of thumb, the Hidden Markov Model assumes that the shortest path between consecutive candidate states has a transition probability

因此,转移概率计算如下:Therefore, the transition probability The calculation is as follows:

其中,是当前观测的候选点;/>是前一观测的候选点;D是从/>到/>的最短路径长度和观测之间的欧几里德距离之间差的绝对值;in, is the candidate point of the current observation; /> is the candidate point of the previous observation; D is the point from/> To/> The absolute value of the difference between the shortest path length and the Euclidean distance between observations;

然后利用在线维特比译码算法,找到与输入序列的可变滑动窗口相对应的路段的最大似然序列。Then, an online Viterbi decoding algorithm is used to find the maximum likelihood sequence of the road segments corresponding to the variable sliding window of the input sequence.

优选的,在所述概率波动检测步骤中,通过定义观测概率和转移概率,在接收到GPS采样点后通过添加新节点和加权边逐步构建分层图;Preferably, in the probability fluctuation detection step, by defining the observation probability and the transition probability, a hierarchical graph is gradually constructed by adding new nodes and weighted edges after receiving the GPS sampling points;

如果在分层图中添加新的GPS样本时匹配精度下降,则认为存在测量误差或地图错误;If the matching accuracy decreases when adding new GPS samples to the layer map, it is considered that there is a measurement error or map error;

给定候选点集,隐马尔科夫模型将使用维特比解码算法计算最大似然路径;Given a set of candidate points, the hidden Markov model will calculate the maximum likelihood path using the Viterbi decoding algorithm;

当候选集包含观察的真实位置时,隐马尔科夫模型推断出正确的路径;When the candidate set contains the true location of the observation, the hidden Markov model infers the correct path;

当存在地图错误或测量错误时,两个连续候选对象之间的最短路径不是真实路径,并且会迂回;When there are map errors or measurement errors, the shortest path between two consecutive candidates is not the true path and will be circuitous;

将候选集不包含真实位置的采集点视为低质量点,检测模型将删除检测到的低质量点;The collected points that do not contain the true position in the candidate set are regarded as low-quality points, and the detection model will delete the detected low-quality points;

维特比算法的计算过程是在添加新的GPS采样点时,使观测概率和转移概率的乘积最大化;The calculation process of the Viterbi algorithm is to maximize the product of the observation probability and the transition probability when adding new GPS sampling points;

采样误差或地图错误引起最优解码概率的幅度波动;Sampling errors or map errors cause fluctuations in the amplitude of the optimal decoding probability;

取原始值的对数,使波动更加明显;Take the logarithm of the original value to make the fluctuation more obvious;

当采样新加入的点导致匹配概率的波动超过预设阈值时,删除采样新加入的点;When the sampling of newly added points causes the fluctuation of the matching probability to exceed the preset threshold, the newly added points are deleted;

存在地图错误时,限制连续移除点的数量;Limit the number of consecutive points removed when there are map errors;

当移除某区域的一系列连续采样点超过限制数量时,算法评估器将评估不匹配的样本,检测是否存在地图错误,如果存在则使用地图生成模型来拟合缺失的道路。When a series of consecutive sample points in an area are removed beyond a limit, the algorithm evaluator will evaluate the unmatched samples to detect whether there are map errors and, if so, use the map generation model to fit the missing roads.

优选的,在所述轨迹评估步骤中,将从检测模型中连续移除的一系列GPS点作为输入,并评估整个序列的质量,判断被移除的原因;Preferably, in the trajectory evaluation step, a series of GPS points that are successively removed from the detection model are used as input, and the quality of the entire sequence is evaluated to determine the reasons for removal;

评估在位置和速度约束下这一系列移除GPS样本的运动模式;Evaluate the motion pattern of this series of GPS-removed samples under position and velocity constraints;

如果检测到的异常是由不符合实际驾驶情况的运动模式引起的,则认为匹配概率的变化是由测量误差引起的,并删除相应的点;其余点将重新加入匹配序列继续匹配;If the detected anomaly is caused by a motion pattern that does not conform to the actual driving situation, the change in matching probability is considered to be caused by measurement error and the corresponding point is deleted; the remaining points are re-added to the matching sequence to continue matching;

如果在评估模型中允许移除点形成驾驶模式,则恢复移除的GPS采样点,并使用无法匹配的点来生成缺失的道路;If removing points to form driving patterns is allowed in the evaluation model, the removed GPS sample points are restored and the missing roads are generated using the points that could not be matched;

使用卡尔曼滤波来预测车辆的运动方向和位置,然后将估计点作为新的匹配点来判断是否存在异常;Use Kalman filtering to predict the direction and position of the vehicle, and then use the estimated points as new matching points to determine whether there are any abnormalities;

将采样点邻近的路段的速度和方向信息作为运动轨迹物理模型的输入,计算出车辆下一次时刻的理想位置,将采样到的轨迹方向和速度信息作为运动模型输入算出下一时刻的位置作为测量值;The speed and direction information of the road section near the sampling point is used as the input of the motion trajectory physical model to calculate the ideal position of the vehicle at the next moment. The sampled trajectory direction and speed information is used as the motion model input to calculate the position at the next moment as the measurement value.

基于加权后的估计值与系统的真实值之间的误差,计算出卡尔曼增益,得到下一时刻位置估计值如下:Based on the error between the weighted estimate and the true value of the system, the Kalman gain is calculated, and the position estimate at the next moment is obtained as follows:

xt|t=Ktzt+(I-KtH)xt|t-1 xt |tKtzt + ( IKtH )xt |t-1

其中,xt|t是系统估计值,xt|t-1是系统理想状态值,zt是测量值,Kt为卡尔曼增益,I是单位矩阵,H是状态空间转换矩阵;Where xt|t is the system estimate, xt|t-1 is the ideal state value of the system, zt is the measured value, Kt is the Kalman gain, I is the identity matrix, and H is the state space transformation matrix;

将位置预测值与位置采样值进行比较,计算位置预测值与位置采样值之间平均距离,如果距离小于阈值Δd,则认为采样是由地图错误造成的。The predicted position value is compared with the sampled position value, and the average distance between the predicted position value and the sampled position value is calculated. If the distance is less than the threshold Δd, it is considered that the sampling is caused by a map error.

优选的,在所述缺失路段生成步骤中,数字地图由属性化的无向图组成;交叉点表示为度大于二的顶点,而路段表示为一系列边;将双向道路被视为单一路径;定义高阶属性来补充图形;几何特征显示为地图描述的一部分;提供道路有关的局部几何形状信息;Preferably, in the missing road segment generation step, the digital map is composed of an attributed undirected graph; intersections are represented as vertices with a degree greater than two, and road segments are represented as a series of edges; bidirectional roads are regarded as single paths; high-order attributes are defined to supplement the graph; geometric features are displayed as part of the map description; and local geometric shape information about the road is provided;

使用基于聚类技术的地图生成模型,自动推断道路和交通特征;Use a map generation model based on clustering techniques to automatically infer road and traffic characteristics;

地图生成模型对无法匹配的GPS采样点进行拟合,生成的拓扑结构接近实际的缺失道路;The map generation model fits the GPS sampling points that cannot be matched, and the generated topology is close to the actual missing roads;

根据拐点的位置,将无法匹配的GPS点划分为不同的区间;According to the position of the turning point, the unmatched GPS points are divided into different intervals;

拐点的距离由垂直欧几里德距离的欧几里德距离变量测量;The distance of the inflection point is measured by the Euclidean distance variable of the perpendicular Euclidean distance;

在每个分割部分,使用线性回归模型来拟合缺失的道路;In each segment, a linear regression model is used to fit the missing roads;

为了确定转折点的位置,设置了参数θG和dGIn order to determine the location of the turning point, the parameters θ G and d G are set;

连接序列中的第一个点和最后一个点,然后将所有其他点投影到连接线;Connect the first and last points in the sequence, and then project all other points onto the connecting line;

如果指定投影距离大于阈值dG,则具有指定距离的点是真实路段的拐角点;If the specified projection distance is greater than the threshold d G , the point with the specified distance is the corner point of the real road segment;

将具有指定投影距离的点分别连线第一个点和最后一个点,继续计算连线之间的角度;如果角度大于阈值θG,则将序列分为两部分,并迭代完成。Connect the first point and the last point with the points with the specified projection distance, and continue to calculate the angle between the lines; if the angle is greater than the threshold θ G , divide the sequence into two parts and iterate.

根据本发明提供的一种基于隐马尔科夫的多噪声感知的地图匹配校正系统,包括如下模块:According to the present invention, a map matching correction system based on hidden Markov multi-noise perception includes the following modules:

区域窗口化模块:通过对区域网格化,限制轨迹的不规则漂移,得到平滑的轨迹;Regional windowing module: By gridding the region, the irregular drift of the trajectory is limited to obtain a smooth trajectory;

地图匹配模块:将平滑后的轨迹输入带有删除点与地图纠正框架的隐马尔科夫模型进行匹配;Map matching module: The smoothed trajectory is input into the hidden Markov model with deleted points and map correction frame for matching;

概率波动检测模块:匹配的过程中计算每个观测点的维特比解码概率的波动情况;如果波动幅度超过阈值,则删除当前观测点;Probability fluctuation detection module: during the matching process, the fluctuation of the Viterbi decoding probability of each observation point is calculated; if the fluctuation amplitude exceeds the threshold, the current observation point is deleted;

轨迹评估模块:若在邻近区域内删除掉连续的轨迹点,则利用卡尔曼滤波器和已保留轨迹点对删除点位置做预测,评估预测位置和观测位置的误差范围,若误差小于阈值,则判定该位置有地图错误;Trajectory evaluation module: If continuous trajectory points are deleted in the adjacent area, the Kalman filter and the retained trajectory points are used to predict the position of the deleted points, and the error range between the predicted position and the observed position is evaluated. If the error is less than the threshold, it is determined that there is a map error at that location;

缺失路段生成模块:将删除的点作为地图生成器的输入,根据计算的拐点位置,将缺失的路段划分为一系列区间,区间内利用线性回归模型计算出穿过拐点间的线段。Missing road segment generation module: The deleted points are used as the input of the map generator. According to the calculated turning point positions, the missing road segments are divided into a series of intervals. The linear regression model is used to calculate the line segments passing through the turning points within the intervals.

优选的,在所述区域窗口化模块中,首先将地理区域划分为网格单元;Preferably, in the regional windowing module, the geographical area is first divided into grid units;

如果车辆在网格单元中没有花费预定行驶时间,则不允许车辆从该网格单元过渡;If a vehicle does not spend a predetermined travel time in a grid cell, the vehicle is not allowed to transition from that grid cell;

在每个网格单元中,使用DP算法的变体来平滑轨迹,用近似线段代替原始轨迹;In each grid cell, a variation of the DP algorithm is used to smooth the trajectory, replacing the original trajectory with an approximated line segment;

如果替换不满足指定的错误要求,将通过选择的位置点作为划分点,递归地将原始问题划分为两个子问题,再判断替换是否满足指定的错误要求,直到近似轨迹和原始轨迹之间的误差低于指定的误差阈值;If the replacement does not meet the specified error requirement, the original problem is recursively divided into two sub-problems by using the selected position point as the partition point, and then it is judged whether the replacement meets the specified error requirement until the error between the approximate trajectory and the original trajectory is lower than the specified error threshold;

DP算法使用正交欧氏距离作为误差度量,保持近似轨迹中的方向趋势;The DP algorithm uses orthogonal Euclidean distance as the error metric to maintain the directional trend in the approximate trajectory;

通过移除距离大于阈值的分区点,限制网格单元中的速度变化。Limit the velocity variation in a grid cell by removing partition points whose distance is greater than a threshold.

优选的,在所述地图匹配模块中,在地图匹配阶段,将从区域窗口化步骤中获取平滑的GPS点作为输入,并将平滑的GPS点映射到数字地图上的路段,使用隐马尔科夫模型确定与GPS原始数据的时间戳序列相对应的路段序列;Preferably, in the map matching module, in the map matching stage, the smoothed GPS points are obtained from the region windowing step as input, and the smoothed GPS points are mapped to road segments on the digital map, and a hidden Markov model is used to determine a road segment sequence corresponding to a timestamp sequence of the GPS raw data;

隐马尔科夫模型是具有候选状态和观测值的离散时间马尔可夫过程;A hidden Markov model is a discrete-time Markov process with candidate states and observations;

使用索引网格来搜索候选状态,每个候选状态为最接近路段中观测点的点,并产生观测概率该观测概率/>定义为GPS采样点pi与基于高斯噪声模型计算的候选点/>匹配的可能性:Use the index grid to search for candidate states, each candidate state is the point closest to the observation point in the road segment, and generates an observation probability The observation probability/> Defined as the GPS sampling point p i and the candidate point calculated based on the Gaussian noise model/> Possibility of matching:

其中,σ是标准偏差,d定义为pi之间的投影距离,pi是i时刻的采样点,/>是pi的第j个候选点;where σ is the standard deviation and d is defined as p i and The projection distance between them, pi is the sampling point at time i, /> is the jth candidate point of pi ;

其中,是pi第j条候选路段,c是边/>上的任意点,dist(pi,c)是pi和c之间的欧式距离;in, is the jth candidate road segment of p i , c is the edge/> For any point on , dist( pi ,c) is the Euclidean distance between pi and c;

隐马尔科夫模型允许从前一个候选状态到当前候选状态的转换,并且该转换由转换概率控制;The hidden Markov model allows transitions from the previous candidate state to the current candidate state, and the transitions are controlled by transition probabilities;

根据经验,隐马尔科夫模型假设连续候选状态之间的最短路径具有转移概率 As a rule of thumb, the Hidden Markov Model assumes that the shortest path between consecutive candidate states has a transition probability

因此,转移概率计算如下:Therefore, the transition probability The calculation is as follows:

其中,是当前观测的候选点;/>是前一观测的候选点;D是从/>到/>的最短路径长度和观测之间的欧几里德距离之间差的绝对值;in, is the candidate point of the current observation; /> is the candidate point of the previous observation; D is the point from/> To/> The absolute value of the difference between the shortest path length and the Euclidean distance between observations;

然后利用在线维特比译码算法,找到与输入序列的可变滑动窗口相对应的路段的最大似然序列。Then, an online Viterbi decoding algorithm is used to find the maximum likelihood sequence of the road segments corresponding to the variable sliding window of the input sequence.

优选的,在所述概率波动检测模块中,通过定义观测概率和转移概率,在接收到GPS采样点后通过添加新节点和加权边逐步构建分层图;Preferably, in the probability fluctuation detection module, by defining the observation probability and the transition probability, a hierarchical graph is gradually constructed by adding new nodes and weighted edges after receiving the GPS sampling points;

如果在分层图中添加新的GPS样本时匹配精度下降,则认为存在测量误差或地图错误;If the matching accuracy decreases when adding new GPS samples to the layer map, it is considered that there is a measurement error or map error;

给定候选点集,隐马尔科夫模型将使用维特比解码算法计算最大似然路径;Given a set of candidate points, the hidden Markov model will calculate the maximum likelihood path using the Viterbi decoding algorithm;

当候选集包含观察的真实位置时,隐马尔科夫模型推断出正确的路径;When the candidate set contains the true location of the observation, the hidden Markov model infers the correct path;

当存在地图错误或测量错误时,两个连续候选对象之间的最短路径不是真实路径,并且会迂回;When there are map errors or measurement errors, the shortest path between two consecutive candidates is not the true path and will be circuitous;

将候选集不包含真实位置的采集点视为低质量点,检测模型将删除检测到的低质量点;The collected points that do not contain the true position in the candidate set are regarded as low-quality points, and the detection model will delete the detected low-quality points;

维特比算法的计算过程是在添加新的GPS采样点时,使观测概率和转移概率的乘积最大化;The calculation process of the Viterbi algorithm is to maximize the product of the observation probability and the transition probability when adding new GPS sampling points;

采样误差或地图错误引起最优解码概率的幅度波动;Sampling errors or map errors cause fluctuations in the amplitude of the optimal decoding probability;

取原始值的对数,使波动更加明显;Take the logarithm of the original value to make the fluctuation more obvious;

当采样新加入的点导致匹配概率的波动超过预设阈值时,删除采样新加入的点;When the sampling of newly added points causes the fluctuation of the matching probability to exceed the preset threshold, the newly added points are deleted;

存在地图错误时,限制连续移除点的数量;Limit the number of consecutive points removed when there are map errors;

当移除某区域的一系列连续采样点超过限制数量时,算法评估器将评估不匹配的样本,检测是否存在地图错误,如果存在则使用地图生成模型来拟合缺失的道路。When a series of consecutive sample points in an area are removed beyond a limit, the algorithm evaluator will evaluate the unmatched samples to detect whether there are map errors and, if so, use the map generation model to fit the missing roads.

与现有技术相比,本发明具有如下的有益效果:Compared with the prior art, the present invention has the following beneficial effects:

1、本发明创新性地提出了能检测地图错误与删除低质量采样点的地图匹配框架,能与基于隐马尔科夫模型的地图匹配算法相结合,纠正匹配结果并提升其匹配精度;1. The present invention innovatively proposes a map matching framework that can detect map errors and delete low-quality sampling points, which can be combined with a map matching algorithm based on a hidden Markov model to correct the matching results and improve their matching accuracy;

2、由于之前的地图匹配算法没有考虑到地图错误的因素,在实际应用过程中会导致匹配中断等问题,本发明利用了采样到的轨迹,在匹配的过程中能检测并更新地图数据库,避免了之前地图更新过程需要大量人力的消耗;2. Since the previous map matching algorithm did not take into account the factor of map error, it would cause matching interruption and other problems in the actual application process. The present invention uses the sampled trajectory to detect and update the map database during the matching process, avoiding the previous map update process that requires a lot of manpower consumption;

3、本发明基于匹配的位置,可以预测特定区域周围的交通状况,并为用户推荐即将到来的兴趣点。3. Based on the matched locations, the present invention can predict the traffic conditions around a specific area and recommend upcoming points of interest to users.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

通过阅读参照以下附图对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

图1为本发明的应用架构图;FIG1 is an application architecture diagram of the present invention;

图2为本发明的匹配过程图;Fig. 2 is a diagram of the matching process of the present invention;

图3为窗口平滑后轨迹误差情况图;Figure 3 is a diagram of the trajectory error after window smoothing;

图4为候选点选取示意图;FIG4 is a schematic diagram of candidate point selection;

图5为一条轨迹内解码概率波动的示意图。FIG5 is a schematic diagram of the decoding probability fluctuation within a trajectory.

附图标记:Moving vehicles with GPS sensors表示带传感器的移动车辆;Wireless network表示无线网络;GPS records表示采样记录;Data center表示数据中心;Route planning表示路径推荐;Traffic estimation表示交通流量估计;Point ofinterest表示兴趣点;End devices running LBS表示运行基于位置服务的终端设备;Mapdatabase表示地图数据库;Windowing表示窗口技术;Map matching表示地图匹配;Detection model表示检测模型;Evaluation model表示评估模型Generation model表示生成模型;With windowing表示使用了窗口技术;Withoutwindowing表示未使用窗口技术;CDF表示位置误差概率累积分布;Radius r表示候选半径;Sequencenumberofpoints表示采样点序列号;Variationofprobability表示概率波动。Figure symbols: Moving vehicles with GPS sensors represents moving vehicles with sensors; Wireless network represents wireless network; GPS records represents sampling records; Data center represents data center; Route planning represents route recommendation; Traffic estimation represents traffic flow estimation; Point of interest represents point of interest; End devices running LBS represents terminal devices running location-based services; Map database represents map database; Windowing represents window technology; Map matching represents map matching; Detection model represents detection model; Evaluation model represents evaluation model Generation model represents generation model; With windowing represents the use of window technology; Without windowing represents the use of window technology; CDF represents the cumulative distribution of position error probability; Radius r represents the candidate radius; Sequence number of points represents the sequence number of sampling points; Variation of probability represents probability fluctuation.

具体实施方式Detailed ways

下面结合具体实施例对本发明进行详细说明。以下实施例将有助于本领域的技术人员进一步理解本发明,但不以任何形式限制本发明。应当指出的是,对本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变化和改进。这些都属于本发明的保护范围。The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

本发明实施例公开了一种基于隐马尔科夫的多噪声感知的地图匹配校正方法,如图1和图2所示,包括如下步骤:The embodiment of the present invention discloses a map matching correction method based on hidden Markov multi-noise perception, as shown in FIG1 and FIG2, comprising the following steps:

区域窗口化步骤:通过对区域网格化,限制轨迹的不规则漂移,得到平滑的轨迹。首先将地理区域划分为网格单元;Regional windowing step: By gridding the region, the irregular drift of the trajectory is limited and a smooth trajectory is obtained. First, the geographical area is divided into grid cells;

如果车辆在网格单元中没有花费预定行驶时间,则不允许车辆从该网格单元过渡;If a vehicle does not spend a predetermined travel time in a grid cell, the vehicle is not allowed to transition from that grid cell;

在每个网格单元中,使用DP算法的变体来平滑轨迹,用近似线段代替原始轨迹。如果替换不满足指定的错误要求,将通过选择的位置点作为划分点,递归地将原始问题划分为两个子问题,再判断替换是否满足指定的错误要求,直到近似轨迹和原始轨迹之间的误差低于指定的误差阈值。DP算法使用正交欧氏距离作为误差度量,保持近似轨迹中的方向趋势。通过移除距离大于阈值的分区点,限制网格单元中的速度变化。图3显示了收集的GPS数据位置误差的累积分布函数(CDF)分布。DP英文全称为Douglas–Peucker,中文译文为道格拉斯-普克算法。In each grid cell, a variation of the DP algorithm is used to smooth the trajectory, replacing the original trajectory with an approximate line segment. If the replacement does not meet the specified error requirement, the original problem is recursively divided into two sub-problems by using the selected position point as the partition point, and then judging whether the replacement meets the specified error requirement until the error between the approximate trajectory and the original trajectory is below the specified error threshold. The DP algorithm uses orthogonal Euclidean distance as the error metric to maintain the directional trend in the approximate trajectory. The velocity variation in the grid cell is limited by removing partition points with a distance greater than the threshold. Figure 3 shows the cumulative distribution function (CDF) distribution of the position error of the collected GPS data. DP is the full name of Douglas–Peucker in English, and its Chinese translation is Douglas-Peucker algorithm.

地图匹配步骤:将平滑后的轨迹输入带有删除点与地图纠正框架的隐马尔科夫模型进行匹配。在地图匹配阶段,将从区域窗口化步骤中获取平滑的GPS点作为输入,并将平滑的GPS点映射到数字地图上的路段,使用隐马尔科夫模型确定与GPS原始数据的时间戳序列相对应的路段序列。隐马尔科夫模型是具有候选状态和观测值的离散时间马尔可夫过程。使用索引网格来搜索候选状态,如图4所示,每个候选状态为最接近路段中观测点的点,并产生观测概率该观测概率/>定义为GPS采样点pi与基于高斯噪声模型计算的候选点/>匹配的可能性:Map matching step: The smoothed trajectory is input into the hidden Markov model with deleted points and map correction framework for matching. In the map matching stage, the smoothed GPS points are taken from the regional windowing step as input and mapped to the road segments on the digital map. The hidden Markov model is used to determine the road segment sequence corresponding to the timestamp sequence of the GPS raw data. The hidden Markov model is a discrete-time Markov process with candidate states and observations. An index grid is used to search for candidate states, as shown in Figure 4. Each candidate state is the point closest to the observation point in the road segment and generates an observation probability. The observation probability/> Defined as the GPS sampling point p i and the candidate point calculated based on the Gaussian noise model/> Possibility of matching:

其中,σ是标准偏差,d定义为pi之间的投影距离,pi是i时刻的采样点,/>是pi的第j个候选点。where σ is the standard deviation and d is defined as p i and The projection distance between them, pi is the sampling point at time i, /> is the jth candidate point of pi .

其中,是pi第j条候选路段,c是边/>上的任意点,dist(pi,c)是pi和c之间的欧式距离。in, is the jth candidate road segment of p i , c is the edge/> For any point on , dist( pi ,c) is the Euclidean distance between pi and c.

隐马尔科夫模型允许从前一个候选状态到当前候选状态的转换,并且该转换由转换概率控制。根据经验,隐马尔科夫模型假设连续候选状态之间的最短路径具有转移概率 The hidden Markov model allows transitions from the previous candidate state to the current candidate state, and the transition is controlled by the transition probability. As a rule of thumb, the hidden Markov model assumes that the shortest path between consecutive candidate states has a transition probability

因此,转移概率计算如下:Therefore, the transition probability The calculation is as follows:

其中,是当前观测的候选点;/>是前一观测的候选点;D是从/>到/>的最短路径长度和观测之间的欧几里德距离之间差的绝对值。in, is the candidate point of the current observation; /> is the candidate point of the previous observation; D is the point from/> To/> The absolute value of the difference between the shortest path length and the Euclidean distance between observations.

然后利用在线维特比译码算法,找到与输入序列的可变滑动窗口相对应的路段的最大似然序列。Then, an online Viterbi decoding algorithm is used to find the maximum likelihood sequence of the road segments corresponding to the variable sliding window of the input sequence.

概率波动检测步骤:匹配的过程中计算每个观测点的维特比解码概率的波动情况;如果波动幅度超过阈值,则删除当前观测点。Probability fluctuation detection step: during the matching process, the fluctuation of the Viterbi decoding probability of each observation point is calculated; if the fluctuation amplitude exceeds the threshold, the current observation point is deleted.

通过定义观测概率和转移概率,在接收到GPS采样点后通过添加新节点和加权边逐步构建分层图。如果在分层图中添加新的GPS样本时匹配精度下降,则认为存在测量误差或地图错误。给定候选点集,隐马尔科夫模型将使用维特比解码算法计算最大似然路径。当候选集包含观察的真实位置时,隐马尔科夫模型推断出正确的路径。当存在地图错误或测量错误时,两个连续候选对象之间的最短路径不是真实路径,并且会迂回。将候选集不包含真实位置的采集点视为低质量点,检测模型将删除检测到的低质量点。维特比算法的计算过程是在添加新的GPS采样点时,使观测概率和转移概率的乘积最大化。采样误差或地图错误引起最优解码概率的幅度波动。取原始值的对数,使波动更加明显。当采样新加入的点导致匹配概率的波动超过预设阈值时,删除采样新加入的点。由于地图错误会使得后续所有点的解码概率波动都超过阈值,因此需要限制连续移除点的数量。当移除某区域的一系列连续采样点超过限制数量时,算法评估器将评估不匹配的样本,检测是否存在地图错误,如果存在则使用地图生成模型来拟合缺失的道路。By defining the observation probability and transition probability, a hierarchical graph is gradually constructed by adding new nodes and weighted edges after receiving GPS sampling points. If the matching accuracy decreases when adding new GPS samples to the hierarchical graph, it is considered that there is a measurement error or map error. Given a set of candidate points, the hidden Markov model will use the Viterbi decoding algorithm to calculate the maximum likelihood path. When the candidate set contains the true location of the observation, the hidden Markov model infers the correct path. When there is a map error or measurement error, the shortest path between two consecutive candidates is not the true path and will be circuitous. The collection points whose candidate set does not contain the true location are regarded as low-quality points, and the detection model will delete the detected low-quality points. The calculation process of the Viterbi algorithm is to maximize the product of the observation probability and the transition probability when adding new GPS sampling points. Sampling errors or map errors cause fluctuations in the amplitude of the optimal decoding probability. Take the logarithm of the original value to make the fluctuation more obvious. When sampling a newly added point causes the fluctuation of the matching probability to exceed the preset threshold, the newly added point is deleted. Since the map error will cause the decoding probability fluctuation of all subsequent points to exceed the threshold, it is necessary to limit the number of consecutively removed points. When a series of consecutive sample points in an area are removed beyond a limit, the algorithm evaluator will evaluate the unmatched samples to detect whether there are map errors and, if so, use the map generation model to fit the missing roads.

轨迹评估步骤:若在邻近区域内删除掉连续的轨迹点,则利用卡尔曼滤波器和已保留轨迹点对删除点位置做预测,评估预测位置和观测位置的误差范围,若误差小于阈值,则判定该段采样轨迹处有地图错误。Trajectory evaluation steps: If continuous trajectory points are deleted in the adjacent area, the Kalman filter and the retained trajectory points are used to predict the position of the deleted points, and the error range between the predicted position and the observed position is evaluated. If the error is less than the threshold, it is determined that there is a map error in this sampling trajectory.

将从检测模型中连续移除的一系列GPS点作为输入,并评估整个序列的质量,判断被移除的原因。评估在位置和速度约束下这一系列移除GPS样本的运动模式。如果检测到的异常是由不符合实际驾驶情况的运动模式引起的,则认为匹配概率的变化是由测量误差引起的,并删除相应的点;其余点将重新加入匹配序列继续匹配。如果在评估模型中允许移除点形成驾驶模式,则恢复移除的GPS采样点,并使用无法匹配的点来生成缺失的道路。使用卡尔曼滤波来预测车辆的运动方向和位置,然后将估计点作为新的匹配点来判断是否存在异常。将采样点邻近的路段的速度和方向信息作为运动轨迹物理模型的输入,计算出车辆下一次时刻的理想位置,将采样到的轨迹方向和速度信息作为运动模型输入算出下一时刻的位置作为测量值。基于加权后的估计值与系统的真实值之间的误差,计算出卡尔曼增益,得到下一时刻位置估计值如下:A series of GPS points that are continuously removed from the detection model are used as input, and the quality of the entire sequence is evaluated to determine the reason for removal. The motion pattern of this series of removed GPS samples is evaluated under position and speed constraints. If the detected anomaly is caused by a motion pattern that does not conform to the actual driving situation, the change in matching probability is considered to be caused by measurement error, and the corresponding point is deleted; the remaining points are re-added to the matching sequence for continued matching. If the removed points are allowed to form a driving pattern in the evaluation model, the removed GPS sample points are restored and the unmatched points are used to generate the missing roads. The Kalman filter is used to predict the direction and position of the vehicle, and then the estimated point is used as a new matching point to determine whether there is an anomaly. The speed and direction information of the road section adjacent to the sampling point is used as the input of the motion trajectory physical model to calculate the ideal position of the vehicle at the next moment, and the sampled trajectory direction and speed information is used as the motion model input to calculate the position at the next moment as the measurement value. Based on the error between the weighted estimate and the true value of the system, the Kalman gain is calculated, and the position estimate at the next moment is obtained as follows:

xt|t=Ktzt+(I-KtH)xt|t-1 xt |tKtzt + ( IKtH )xt |t-1

其中,xt|t是系统估计值,xt|t-1是系统理想状态值,zt是测量值,Kt为卡尔曼增益,I是单位矩阵,H是状态空间转换矩阵。Where xt |t is the system estimate, xt|t-1 is the ideal system state value, zt is the measured value, Kt is the Kalman gain, I is the identity matrix, and H is the state space transformation matrix.

将位置预测值与位置采样值进行比较,计算位置预测值与位置采样值之间平均距离,如果距离小于阈值Δd,则认为采样是由地图错误造成的。The predicted position value is compared with the sampled position value, and the average distance between the predicted position value and the sampled position value is calculated. If the distance is less than the threshold Δd, it is considered that the sampling is caused by a map error.

缺失路段生成步骤:将删除的点作为地图生成器的输入,根据计算的拐点位置,将缺失的路段划分为一系列区间,区间内利用线性回归模型计算出穿过拐点间的线段。Steps for generating missing road segments: Use the deleted points as the input of the map generator, divide the missing road segments into a series of intervals according to the calculated turning point positions, and use the linear regression model to calculate the line segments passing through the turning points within the intervals.

数字地图由属性化的无向图组成;交叉点表示为度大于二的顶点,而路段表示为一系列边;将双向道路被视为单一路径;定义高阶属性来补充图形;几何特征显示为地图描述的一部分;提供道路有关的局部几何形状信息。使用基于聚类技术的地图生成模型,自动推断道路和交通特征。地图生成模型对无法匹配的GPS采样点进行拟合,生成的拓扑结构接近实际的缺失道路。根据拐点的位置,将无法匹配的GPS点划分为不同的区间。拐点的距离由垂直欧几里德距离的欧几里德距离变量测量。在每个分割部分,使用线性回归模型来拟合缺失的道路。为了确定转折点的位置,设置了参数θG和dG。连接序列中的第一个点和最后一个点,然后将所有其他点投影到连接线。如果指定投影距离大于阈值dG,则具有指定距离的点是真实路段的拐角点。将具有指定投影距离的点分别连线第一个点和最后一个点,继续计算连线之间的角度;如果角度大于阈值ΔG,则将序列分为两部分,并迭代完成。The digital map consists of an attributed undirected graph; intersections are represented as vertices with degree greater than two, and road segments are represented as a series of edges; bidirectional roads are considered as single paths; high-order attributes are defined to supplement the graph; geometric features are displayed as part of the map description; and local geometric shape information about roads is provided. A map generation model based on clustering technology is used to automatically infer road and traffic characteristics. The map generation model fits the unmatched GPS sampling points, and the generated topological structure is close to the actual missing roads. According to the location of the turning point, the unmatched GPS points are divided into different intervals. The distance of the turning point is measured by the Euclidean distance variable of the perpendicular Euclidean distance. In each segmented part, a linear regression model is used to fit the missing roads. In order to determine the location of the turning point, parameters θ G and d G are set. The first and last points in the sequence are connected, and then all other points are projected to the connecting line. If the specified projection distance is greater than the threshold d G , the point with the specified distance is the corner point of the real road segment. The points with the specified projection distance are connected to the first and last points respectively, and the angle between the connecting lines is continued to be calculated; if the angle is greater than the threshold Δ G , the sequence is divided into two parts and iterated.

本发明实施例公开了一种基于隐马尔科夫模型的多噪声感知的地图匹配和校正框架,如图1所示,显示了典型基于位置的服务的高级系统模型。The embodiment of the present invention discloses a multi-noise-aware map matching and correction framework based on a hidden Markov model, as shown in FIG1 , which shows a high-level system model of a typical location-based service.

1、框架应用:在大多数普适计算应用程序中,通过无线通信将移动车辆的测量位置报告给服务器。采样间隔在相同的轨迹中变化,具体取决于驾驶环境。如果GPS轨迹中存在太多的异常值,则需要进行滤波预处理,如中值滤波、卡尔曼滤波和粒子滤波。服务器运行地图匹配算法,该算法使用有噪声的GPS点来查找用户驾驶的实际路段。一旦确定了驾驶路线,其他LBS应用程序可以查询结果以满足其要求。例如,基于匹配的位置,可以预测特定区域周围的交通状况,并为用户推荐即将到来的兴趣点。LBS英文全称为Location BasedServices,中文译文为基于位置的服务。1. Framework application: In most ubiquitous computing applications, the measured position of a mobile vehicle is reported to a server via wireless communication. The sampling interval varies in the same trajectory, depending on the driving environment. If there are too many outliers in the GPS trajectory, filtering preprocessing such as median filtering, Kalman filtering, and particle filtering is required. The server runs a map matching algorithm that uses noisy GPS points to find the actual road section where the user is driving. Once the driving route is determined, other LBS applications can query the results to meet their requirements. For example, based on the matched locations, traffic conditions around a specific area can be predicted, and upcoming points of interest can be recommended to users. The full name of LBS in English is Location Based Services, and the Chinese translation is location-based services.

2、匹配过程:2. Matching process:

如图2所示,详细说明了发明框架的处理流程。为了在驾驶时节约能源,通常使用低能耗设备来采集和传输GPS记录。这些采集设备可能存在来回转换的问题。因此,我们首先使用窗口技术平滑轨迹数据。经过平滑处理后,输出没有来回转换的轨迹数据,可以作为输入发送到地图匹配模块。本专利将地图匹配和地图更新视为一个协作优化过程。As shown in Figure 2, the processing flow of the invention framework is detailed. In order to save energy while driving, low-energy devices are usually used to collect and transmit GPS records. These collection devices may have problems with back-and-forth conversion. Therefore, we first use windowing technology to smooth the trajectory data. After smoothing, the trajectory data without back-and-forth conversion is output and can be sent as input to the map matching module. This patent regards map matching and map updating as a collaborative optimization process.

具体来说,当匹配结果精度较低时,本发明提出的框架会评估它是由GPS测量误差还是地图错误引起的。如果原因是第一个因素,可以简单地删除或校准GPS轨迹中的异常值。否则,使用生成器生成缺失的路段,然后利用这些路段更正匹配结果并更新地图数据库。此过程通过动态检测地图错误和自动更新地图数据库,提高地图匹配精度和地图质量,防止匹配过程中出现迂回和匹配中断。Specifically, when the matching result accuracy is low, the framework proposed in this invention evaluates whether it is caused by GPS measurement error or map error. If the cause is the first factor, the outliers in the GPS trajectory can be simply deleted or calibrated. Otherwise, the missing segments are generated using a generator, which are then used to correct the matching results and update the map database. This process improves map matching accuracy and map quality by dynamically detecting map errors and automatically updating the map database, and prevents detours and matching interruptions during the matching process.

该系统包括如下模块:The system includes the following modules:

(1)区域窗口化模块:通过对区域网格化,限制轨迹的不规则漂移,得到平滑的轨迹。(1) Regional windowing module: By gridding the region, the irregular drift of the trajectory is limited and a smooth trajectory is obtained.

第一个模块为区域窗口化模板,为了简化平滑过程,首先将地理区域划分为固定大小的均匀方形网格单元G。如果车辆在网格单元中没有花费足够的行驶时间,则不允许车辆从该网格单元过渡。在每个网格单元中,本专利使用Douglas–Peucker(DP)算法的变体来平滑轨迹,该算法通常用于简化轨迹。其基本思想是用近似线段代替原始轨迹。如果替换不满足指定的错误要求,它将通过选择错误最多的位置点作为划分点,递归地将原始问题划分为两个子问题。此过程将继续,直到近似轨迹和原始轨迹之间的误差低于指定的误差阈值。DP算法的目标是使用正交欧氏距离作为误差度量,以保持近似轨迹中的方向趋势。本发明的实现不同于之前的方法,因为本发明移除了距离大于阈值的分区点,以限制一个网格单元中的速度变化。图3显示了收集的GPS数据位置误差的累积分布函数(CDF)分布。DP英文全称为Douglas–Peucker,中文译文为道格拉斯-普克算法。The first module is a regional windowing template. In order to simplify the smoothing process, the geographic area is first divided into uniform square grid cells G of a fixed size. If the vehicle does not spend enough driving time in the grid cell, the vehicle is not allowed to transition from the grid cell. In each grid cell, this patent uses a variant of the Douglas–Peucker (DP) algorithm to smooth the trajectory, which is usually used to simplify the trajectory. The basic idea is to replace the original trajectory with an approximate line segment. If the replacement does not meet the specified error requirements, it will recursively divide the original problem into two sub-problems by selecting the position point with the most errors as the partition point. This process will continue until the error between the approximate trajectory and the original trajectory is lower than the specified error threshold. The goal of the DP algorithm is to use orthogonal Euclidean distance as an error metric to maintain the directional trend in the approximate trajectory. The implementation of the present invention is different from the previous method because the present invention removes partition points with a distance greater than the threshold to limit the speed change in one grid cell. Figure 3 shows the cumulative distribution function (CDF) distribution of the position error of the collected GPS data. DP is the full name of Douglas–Peucker in English, and its Chinese translation is Douglas-Peucker algorithm.

(2)地图匹配模块:将平滑后的轨迹输入带有删除点与地图纠正框架的隐马尔科夫模型进行匹配。(2) Map matching module: The smoothed trajectory is input into the hidden Markov model with deleted points and the map correction frame for matching.

在地图匹配阶段,将从区域窗口化模块中一系列平滑的GPS点作为输入,并将其映射到数字地图上的路段。本发明提出的框架使用隐马尔科夫模型(HMM)来确定与GPS原始数据的时间戳序列相对应的路段序列。HMM是一个具有一组候选状态和观测值的离散时间马尔可夫过程。本发明使用索引网格来搜索候选状态,如图4所示。每个状态都是最接近路段中观测点的点,并产生一个观测概率,该概率定义为GPS采样点pi与基于高斯噪声模型计算的候选点匹配的可能性:In the map matching stage, a series of smoothed GPS points from the regional windowing module are taken as input and mapped to road segments on the digital map. The framework proposed in this invention uses a hidden Markov model (HMM) to determine the road segment sequence corresponding to the timestamp sequence of the GPS raw data. The HMM is a discrete-time Markov process with a set of candidate states and observations. The present invention uses an index grid to search for candidate states, as shown in Figure 4. Each state is the point closest to the observed point in the road segment and produces an observation probability, which is defined as the probability of the GPS sampling point p i and the candidate point calculated based on the Gaussian noise model. Possibility of matching:

其中,σ是标准偏差,d定义为pi之间的投影距离,pi是i时刻的采样点,/>是pi的第j个候选点。where σ is the standard deviation and d is defined as p i and The projection distance between them, pi is the sampling point at time i, /> is the jth candidate point of pi .

其中,是pi第j条候选路段,c是边/>上的任意点,dist(pi,c)是pi和c之间的欧式距离。in, is the jth candidate road segment of p i , c is the edge/> For any point on , dist( pi ,c) is the Euclidean distance between pi and c.

HMM允许从前一个候选状态到当前候选状态的转换,并且此转换由转换概率控制。根据经验,HMM假设两个连续候选状态之间的最短路径具有较大的转移概率。因此,转移概率通常计算如下:HMM allows transitions from the previous candidate state to the current candidate state, and this transition is controlled by the transition probability. Based on experience, HMM assumes that the shortest path between two consecutive candidate states has a larger transition probability. Therefore, the transition probability is usually calculated as follows:

其中,和/>分别是前一观测和当前观测的候选点,D是从/>到/>的最短路径长度和观测之间的欧几里德距离之间差的绝对值。然后利用在线维特比译码算法,可以找到与输入序列的可变滑动窗口相对应的路段的最大似然序列。in, and/> are the candidate points of the previous observation and the current observation respectively, and D is the candidate point from/> To/> The absolute value of the difference between the shortest path length and the Euclidean distance between observations. Then, using an online Viterbi decoding algorithm, the maximum likelihood sequence of the path segments corresponding to a variable sliding window of the input sequence can be found.

(3)概率波动检测模块:匹配的过程中计算每个观测点的维特比解码概率的波动情况;如果波动幅度超过阈值,则删除当前观测点。(3) Probability fluctuation detection module: During the matching process, the fluctuation of the Viterbi decoding probability of each observation point is calculated; if the fluctuation amplitude exceeds the threshold, the current observation point is deleted.

通过定义观测概率和转移概率,可以在接收到GPS采样点后通过添加新节点和加权边逐步构建分层图。该模型旨在提高基于HMM的地图匹配算法在面对现实复杂场景时的鲁棒性和匹配精度。换言之,如果在分层图中添加新的GPS样本时匹配精度下降,则认为存在测量误差或地图错误。给定候选点集,HMM将使用维特比解码算法计算最大似然路径。然而,这种方法的一个缺点是,它不知道当前观测的质量。只有当候选集包含观察的真实位置时,HMM才能推断出正确的路径。当存在地图错误或测量错误时,两个连续候选对象之间的最短路径永远不可能是真实路径,并且会导致一条很长的迂回。By defining observation probabilities and transition probabilities, a hierarchical graph can be gradually constructed by adding new nodes and weighted edges after receiving GPS sample points. This model aims to improve the robustness and matching accuracy of HMM-based map matching algorithms in the face of realistic and complex scenarios. In other words, if the matching accuracy decreases when adding new GPS samples to the hierarchical graph, it is considered that there is a measurement error or map error. Given a set of candidate points, the HMM will calculate the maximum likelihood path using the Viterbi decoding algorithm. However, a disadvantage of this approach is that it is unaware of the quality of the current observations. The HMM can only infer the correct path if the candidate set contains the true location of the observation. When there is a map error or measurement error, the shortest path between two consecutive candidates can never be the true path and will result in a long detour.

本发明将候选集不包含真实位置的采集点视为低质量点,这可能是由测量误差或地图误差引起的。检测模型将删除检测到的低质量点。维特比算法的计算过程是在添加新的GPS采样点时,使观测概率和转移概率的乘积最大化。由于地图错误或测量误差通常会导致较低的观测概率和转移概率,且维特比解码概率的最大值与观测概率和转移概率相关,因此采样误差或地图错误通常会引起最优解码概率的的大幅度波动。图5显示了当前GPS点与前一个GPS点在一条轨迹中的最大匹配概率之差的变化。本发明取原始值的对数,使波动更加明显。当这些点导致匹配概率发生较大变化时,可以删除这些点,这通常是由地图错误或测量误差引起的。如果存在地图错误,则此过程可能会删除掉所有后续的GPS采样点。因此,我们应该限制连续移除点的数量。由于地图错误,限制连续移除点的数量。当移除某区域的一系列连续采样点时,算法评估器将评估这些不匹配的样本,以检测是否存在地图错误,如果存在则可以使用地图生成模型来拟合缺失的道路。The present invention regards the collected points whose candidate set does not contain the real position as low-quality points, which may be caused by measurement error or map error. The detection model will delete the detected low-quality points. The calculation process of the Viterbi algorithm is to maximize the product of observation probability and transition probability when adding new GPS sampling points. Since map errors or measurement errors usually lead to lower observation probability and transition probability, and the maximum value of Viterbi decoding probability is related to observation probability and transition probability, sampling error or map error usually causes large fluctuations in the optimal decoding probability. Figure 5 shows the change of the difference between the maximum matching probability of the current GPS point and the previous GPS point in a trajectory. The present invention takes the logarithm of the original value to make the fluctuation more obvious. These points can be deleted when they cause a large change in matching probability, which is usually caused by map error or measurement error. If there is a map error, this process may delete all subsequent GPS sampling points. Therefore, we should limit the number of consecutively removed points. Limit the number of consecutively removed points due to map errors. When a series of consecutive sampling points in a certain area are removed, the algorithm evaluator will evaluate these unmatched samples to detect whether there is a map error, and if so, the map generation model can be used to fit the missing road.

(4)轨迹评估模块:若在邻近区域内删除掉连续的轨迹点,则利用卡尔曼滤波器和已保留轨迹点对删除点位置做预测,评估预测位置和观测位置的误差范围,若误差小于阈值,则判定该位置有地图错误。(4) Trajectory evaluation module: If continuous trajectory points are deleted in the adjacent area, the Kalman filter and the retained trajectory points are used to predict the position of the deleted points, and the error range between the predicted position and the observed position is evaluated. If the error is less than the threshold, it is determined that there is a map error at that location.

该模块将从检测模型中连续移除的一系列GPS点作为输入,并评估整个序列的质量,以判断它们是由于地图错误还是测量误差而被移除。本专利评估了在位置和速度约束下这一系列移除GPS样本的运动模式。如果检测到的异常是由不符合实际驾驶情况的运动模式引起的,则认为匹配概率的较大变化是由测量误差引起的,并删除相应的点。其余点将重新加入匹配序列以继续匹配。如果在评估模型中允许这些移除点形成的驾驶模式,则恢复移除的GPS采样点,并使用这些无法匹配的点来生成缺失的道路。本专利使用卡尔曼滤波来预测车辆的运动方向和位置,然后将这些估计点作为新的匹配点来判断是否存在异常。This module takes as input a series of GPS points that are continuously removed from the detection model and evaluates the quality of the entire sequence to determine whether they were removed due to map errors or measurement errors. This patent evaluates the movement pattern of this series of removed GPS samples under position and speed constraints. If the detected anomaly is caused by a movement pattern that does not conform to the actual driving situation, the large change in the matching probability is considered to be caused by the measurement error, and the corresponding point is deleted. The remaining points are rejoined to the matching sequence to continue matching. If the driving pattern formed by these removed points is allowed in the evaluation model, the removed GPS sample points are restored and these unmatched points are used to generate the missing roads. This patent uses Kalman filtering to predict the vehicle's direction of movement and position, and then uses these estimated points as new matching points to determine whether there are anomalies.

本发明将采样点邻近的路段的速度和方向信息作为运动轨迹物理模型的输入,计算出车辆下一次时刻的理想位置,以及采样到的轨迹方向和速度信息作为运动模型输入算出下一时刻的位置作为测量值。基于加权后的估计值与系统的真实值之间的误差最小,计算出卡尔曼增益,从而得到下一时刻位置估计值如下:The present invention uses the speed and direction information of the road section near the sampling point as the input of the motion trajectory physical model to calculate the ideal position of the vehicle at the next moment, and uses the sampled trajectory direction and speed information as the motion model input to calculate the position at the next moment as the measurement value. Based on the minimum error between the weighted estimate and the true value of the system, the Kalman gain is calculated, and the estimated value of the position at the next moment is obtained as follows:

xt|t=Ktzt+(I-KtH)xt|t-1 xt |tKtzt + ( IKtH )xt |t-1

其中xt|t是系统估计值,xt|t-1是系统理想状态值,zt是测量值,Kt为卡尔曼增益,I是单位矩阵,H是状态空间转换矩阵。将位置预测值与位置采样值进行比较,计算它们之间平均距离,如果距离小于阈值Δd,则认为该段采样是由于地图错误造成的。Where xt|t is the system estimate, xt|t-1 is the ideal state value of the system, zt is the measurement value, Kt is the Kalman gain, I is the identity matrix, and H is the state space conversion matrix. The position prediction value is compared with the position sampling value, and the average distance between them is calculated. If the distance is less than the threshold Δd, it is considered that the sampling of this segment is caused by map error.

(5)缺失路段生成模块:将删除的点作为地图生成器的输入,根据计算的拐点位置,将缺失的路段划分为一系列区间,区间内利用线性回归模型计算出穿过拐点间的线段。(5) Missing road segment generation module: The deleted points are used as the input of the map generator. According to the calculated turning point positions, the missing road segments are divided into a series of intervals. The linear regression model is used to calculate the line segments passing through the turning points within the intervals.

数字地图通常由属性化的无向图组成。交叉点表示为度大于2的顶点,而路段表示为一系列边。因为图是无向的,所以路径没有方向。因此,双向道路被视为单一路径。可以定义高阶属性来补充图形。宽度和曲率等几何特征可以显示为地图描述的一部分。这些功能对于道路安全应用至关重要,因为它们提供了道路有关的局部几何形状详细信息。推断道路网的结构要比这些高阶的路段信息容易得多。此外,本专利使用具有普遍适用性的基于聚类技术的地图生成模型,可自动推断道路和交通特征(如限速、道路类型和车道结构)。地图生成模型的目标是对那些无法匹配的GPS采样点进行拟合,生成拓扑结构更接近实际的缺失道路。地图生成的挑战在于测量误差导致采样点无法准确地落在道路上。如果直接将GPS采样点作为路段的交点,生成的路段将出现锯齿现象。根据拐点的位置,将无法匹配的GPS点划分为不同的序列(类似几段子序列)。拐点的最大距离由称为垂直欧几里德距离的欧几里德距离变量测量。在每个分割部分,本专利使用线性回归模型来拟合缺失的道路。为了确定转折点的位置,设置了两个参数θG和dG。连接序列中的第一个点和最后一个点,然后将所有其他点投影到此线。如果最大投影距离大于阈值dG,则具有最大距离的点可能是真实路段的拐角点。继续计算具有最大投影距离的点与第一个点和最后一个点之间的角度。如果角度也大于阈值θG,则将序列分为两部分。这个过程可以迭代完成,投影距离的阈值dG随着区间内点的总距离的减小而减小,角度阈值随着距离的减小而扩大。Digital maps are usually composed of attributed undirected graphs. Intersections are represented as vertices with degree greater than 2, and road segments are represented as a series of edges. Because the graph is undirected, the path has no direction. Therefore, a two-way road is considered a single path. Higher-order attributes can be defined to supplement the graph. Geometric features such as width and curvature can be displayed as part of the map description. These features are critical for road safety applications because they provide detailed information about the local geometry of the road. It is much easier to infer the structure of the road network than these high-order road segment information. In addition, this patent uses a map generation model based on clustering technology with general applicability to automatically infer road and traffic characteristics (such as speed limit, road type and lane structure). The goal of the map generation model is to fit those GPS sampling points that cannot be matched, and generate missing roads with a topological structure closer to the actual one. The challenge of map generation is that the measurement error causes the sampling points to not fall accurately on the road. If the GPS sampling points are directly used as the intersection of the road segment, the generated road segment will appear jagged. According to the position of the inflection point, the unmatched GPS points are divided into different sequences (similar to several subsequences). The maximum distance of the turning point is measured by a Euclidean distance variable called the perpendicular Euclidean distance. In each segmented part, this patent uses a linear regression model to fit the missing roads. In order to determine the location of the turning point, two parameters θ G and d G are set. Connect the first and last points in the sequence, and then project all other points to this line. If the maximum projection distance is greater than the threshold d G , the point with the maximum distance may be the corner point of the real road segment. Continue to calculate the angle between the point with the maximum projection distance and the first and last points. If the angle is also greater than the threshold θ G , the sequence is divided into two parts. This process can be iteratively completed, and the threshold d G of the projection distance decreases as the total distance of the points in the interval decreases, and the angle threshold increases as the distance decreases.

3、算法实现:3. Algorithm implementation:

本发明将算法应用于开源地图匹配平台GraphHopper上,地图网络信息来源于OpenStreetMap。在仿真平台上,本专利将实现的框架与三种经典的基于隐马尔科夫模型的地图匹配结合,并在四个城市共79670.6km长的轨迹数据集上做了大量的实验,验证了匹配结果的精度、召回率等指标,实验结果表明与本专利提出的框架结合后,三个算法的这些指标提升了20%左右,另外在精度高于95%与90%的轨迹比例上,本专利提出的算法相对于原始的基于隐马尔科夫模型的匹配算法提升了30%左右。框架在上海数据集上检测到了1962次地图错误,随机抽取了200条轨迹,手动验证了算法对于地图错误检测的准确性,发现在居民小区住宅区附近准确率有60%左右,在路网密集的公路中,准确率达到80%左右。The present invention applies the algorithm to the open source map matching platform GraphHopper, and the map network information comes from OpenStreetMap. On the simulation platform, this patent combines the implemented framework with three classic map matching based on the hidden Markov model, and conducts a large number of experiments on a trajectory data set of 79,670.6 km in four cities, verifying the accuracy, recall rate and other indicators of the matching results. The experimental results show that after combining with the framework proposed by this patent, these indicators of the three algorithms are improved by about 20%. In addition, in terms of the proportion of trajectories with an accuracy higher than 95% and 90%, the algorithm proposed by this patent is improved by about 30% compared with the original matching algorithm based on the hidden Markov model. The framework detected 1,962 map errors on the Shanghai data set, randomly selected 200 trajectories, and manually verified the accuracy of the algorithm for map error detection. It was found that the accuracy rate was about 60% near residential areas in residential communities, and the accuracy rate reached about 80% on roads with dense road networks.

本发明大幅度提高了地图匹配算法在复杂交通网络内的精度,并且本发明的算法能对地图错误有所感知,能基于采样到的轨迹自动纠正地图匹配结果,更新地图数据库。这些特性提高了地图匹配算法的鲁棒性和准确性。The invention greatly improves the accuracy of the map matching algorithm in complex traffic networks, and the algorithm of the invention can sense map errors, automatically correct the map matching results based on the sampled trajectories, and update the map database. These features improve the robustness and accuracy of the map matching algorithm.

本发明首先通过对区域网格化,限制轨迹的不规则漂移。将平滑后的轨迹输入带有删点与地图纠正框架的隐马尔科夫模型进行匹配,匹配的过程中计算每个观测点的维特比解码概率的波动情况。如果波动幅度超过阈值,则删除当前观测点。若在邻近区域内删除掉连续的轨迹点,则利用卡尔曼滤波器和已保留轨迹点对删除点位置做预测,评估预测位置和观测位置的误差范围,若误差小于阈值,则判定该位置(该段采样轨迹处)有地图错误。将删除的点作为地图生成器的输入,根据计算的拐点位置,将缺失的路段划分为一系列区间,区间内利用线性回归模型计算出穿过拐点间误差最小的线段。由于评估位置和观测位置距离误差小,说明采样质量比较高,解码概率波动不会是因为采样误差导致的,而是地图错误造成的。The present invention first limits the irregular drift of the trajectory by gridding the region. The smoothed trajectory is input into a hidden Markov model with a deletion point and a map correction framework for matching. During the matching process, the fluctuation of the Viterbi decoding probability of each observation point is calculated. If the fluctuation amplitude exceeds the threshold, the current observation point is deleted. If continuous trajectory points are deleted in the adjacent area, the Kalman filter and the retained trajectory points are used to predict the position of the deleted point, and the error range of the predicted position and the observed position is evaluated. If the error is less than the threshold, it is determined that the position (the sampling trajectory section) has a map error. The deleted points are used as the input of the map generator, and the missing road sections are divided into a series of intervals according to the calculated inflection point positions. The linear regression model is used within the interval to calculate the line segment with the smallest error between the inflection points. Since the distance error between the evaluation position and the observation position is small, it means that the sampling quality is relatively high, and the fluctuation of the decoding probability is not caused by the sampling error, but by the map error.

本发明基于当前大多数地图匹配算法所采用的隐马尔科夫模型,提出了一个抗多种噪声的地图匹配框架,能处理低精度轨迹采样和地图错误的情况。这里的低精度和现有提出的隐马尔科夫模型的关注点不同,当前算法是基于路网限制下计算观测概率和转移概率的协同优化的极大似然估计。但是忽略了候选半径内可能由于采样误差的原因而没有包含真实的候选路段。Based on the hidden Markov model adopted by most current map matching algorithms, this paper proposes a map matching framework that is resistant to multiple noises and can handle low-precision trajectory sampling and map errors. The low precision here is different from the focus of the existing hidden Markov model. The current algorithm is based on the maximum likelihood estimation of the collaborative optimization of the observation probability and the transition probability under the constraint of the road network. However, it ignores the fact that the candidate radius may not contain the real candidate road section due to sampling errors.

本发明基于对维特比解码算法的波动幅度限制,删除掉那些波动幅度大的采样点。对于邻近的一系列被删除点,基于卡尔曼滤波器和当前保留点,对删除点的运动位置和方向做估计,与采样点的情况做比较,根据误差范围来鉴别是否存在地图错误。当检测存在地图错误时,将删除的点作为地图生成器的输入,根据计算的拐点位置,将缺失的路段划分为一系列区间,区间内利用线性回归模型计算出穿过拐点间误差最小的线段。The present invention is based on limiting the fluctuation amplitude of the Viterbi decoding algorithm and deleting sampling points with large fluctuation amplitudes. For a series of adjacent deleted points, the movement position and direction of the deleted points are estimated based on the Kalman filter and the current retained points, and compared with the situation of the sampling points, and the presence of map errors is identified according to the error range. When a map error is detected, the deleted points are used as inputs of the map generator, and the missing road sections are divided into a series of intervals according to the calculated inflection point positions, and the line segments with the smallest errors between the inflection points are calculated within the intervals using a linear regression model.

本发明涉及智能交通、轨迹处理、地图匹配算法,公开了一种基于隐马尔科夫模型的抗多种噪声的地图匹配框架,能处理低精度GPS采样轨迹,且检测并纠正当前电子地图上存在的错误。大数据时代,我们可以采样到大量的GPS位置数据,这对于实时追踪车辆当前所处的位置十分重要,但由于GPS轨迹采样本身存在误差,需要一种可靠的算法能将其准确地对应到路网中,以支持其他交通应用,如预测某条路段是否会出现堵塞等。目前,由于城市化进程的加快,各国不断修建新的道路,使得路网更新速度每年都在增加。传统地图更新速度慢,且大量依赖于人力,使得将其应用于基于位置服务时,往往由于发生路段缺失问题而无法提供可靠定位与导航服务。The present invention relates to intelligent transportation, trajectory processing, and map matching algorithms, and discloses a map matching framework based on a hidden Markov model that is resistant to multiple noises, can process low-precision GPS sampling trajectories, and detect and correct errors existing on current electronic maps. In the era of big data, we can sample a large amount of GPS location data, which is very important for real-time tracking of the current location of the vehicle. However, due to the errors in GPS trajectory sampling itself, a reliable algorithm is needed to accurately correspond it to the road network to support other traffic applications, such as predicting whether a certain road section will be blocked. At present, due to the accelerated urbanization process, countries are constantly building new roads, which makes the road network update speed increase every year. Traditional maps are slow to update and rely heavily on manpower, so when they are applied to location-based services, they are often unable to provide reliable positioning and navigation services due to the problem of missing road sections.

因此,对于地图匹配算法而言,采样误差以及地图错误是其目前所面临的最大挑战。当前大多数匹配算法是基于隐马尔科夫模型的,没有考虑到由于采样误差导致候选集中不存在真实路段,且地图存在不精确的问题。为了解决上述问题,本专利基于隐马尔科夫模型,提出了一种抗多种噪声的地图匹配与地图纠正框架,纠正地图匹配结果以提升基于隐马尔科夫模型地图匹配算法的精度。Therefore, sampling errors and map errors are the biggest challenges currently faced by map matching algorithms. Most current matching algorithms are based on hidden Markov models, which do not take into account the problem that there are no real road sections in the candidate set due to sampling errors and the map is inaccurate. In order to solve the above problems, this patent proposes a map matching and map correction framework that is resistant to multiple noises based on the hidden Markov model, correcting the map matching results to improve the accuracy of the map matching algorithm based on the hidden Markov model.

本领域技术人员知道,除了以纯计算机可读程序代码方式实现本发明提供的系统及其各个装置、模块、单元以外,完全可以通过将方法步骤进行逻辑编程来使得本发明提供的系统及其各个装置、模块、单元以逻辑门、开关、专用集成电路、可编程逻辑控制器以及嵌入式微控制器等的形式来实现相同功能。所以,本发明提供的系统及其各项装置、模块、单元可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置、模块、单元也可以视为硬件部件内的结构;也可以将用于实现各种功能的装置、模块、单元视为既可以是实现方法的软件模块又可以是硬件部件内的结构。Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

以上对本发明的具体实施例进行了描述。需要理解的是,本发明并不局限于上述特定实施方式,本领域技术人员可以在权利要求的范围内做出各种变化或修改,这并不影响本发明的实质内容。在不冲突的情况下,本申请的实施例和实施例中的特征可以任意相互组合。The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims (8)

1. The map matching correction method based on the hidden Markov multi-noise perception is characterized by comprising the following steps of:
a region windowing step: by gridding the region, the irregular drift of the track is limited, and a smooth track is obtained;
Map matching step: inputting the smoothed track into a hidden Markov model with a deleting point and a map correcting frame for matching;
Probability fluctuation detection step: calculating fluctuation conditions of the Viterbi decoding probability of each observation point in the matching process; if the fluctuation amplitude exceeds the threshold value, deleting the current observation point;
Track evaluation step: if the continuous track points are deleted in the adjacent area, predicting the deleted point positions by using a Kalman filter and the reserved track points, evaluating the error range of the predicted positions and the observed positions, and if the error is smaller than a threshold value, judging that the map error exists at the section of sampling track;
A missing road section generation step: taking the deleted points as the input of a map generator, dividing the deleted road sections into a series of sections according to the calculated inflection point positions, and calculating line segments passing through the inflection points in the sections by using a linear regression model;
In the map matching step, in the map matching stage, smooth GPS points obtained from the regional windowing step are taken as input, the smooth GPS points are mapped to road segments on a digital map, and a hidden Markov model is used for determining a road segment sequence corresponding to a time stamp sequence of GPS original data;
The hidden markov model is a discrete time markov process with candidate states and observations;
searching candidate states using an index grid, each candidate state being a point closest to an observation point in a road segment, and generating an observation probability The observation probability/>Is defined as a GPS sampling point p i and a candidate point/>, calculated based on a Gaussian noise modelPossibility of matching:
Wherein σ is the standard deviation and d is defined as p i and The projection distance between the two points, p i is the sampling point at the moment i,/>Is the j-th candidate point of p i;
Wherein, Is p i th candidate road segment, c is edge/>At any point above, dist (p i, c) is the Euclidean distance between p i and c;
the hidden markov model allows a transition from a previous candidate state to a current candidate state, and the transition is controlled by a transition probability;
empirically, the hidden Markov model assumes that the shortest path between successive candidate states has transition probabilities
Thus, transition probabilityThe calculation is as follows:
Wherein, Is a candidate point of current observation; /(I)Is a candidate point for the previous observation; d is from/>To/>An absolute value of a difference between the shortest path length and the euclidean distance between observations;
and then, using an online Viterbi decoding algorithm to find the maximum likelihood sequence of the road section corresponding to the variable sliding window of the input sequence.
2. The map matching correction method based on hidden markov multi-noise perception according to claim 1, wherein in the region windowing step, a geographical region is first divided into grid cells;
If the vehicle does not spend a predetermined travel time in the grid cell, the vehicle is not allowed to transition from the grid cell;
In each grid cell, a variation of the DP algorithm is used to smooth the trajectory, replacing the original trajectory with an approximate line segment;
if the replacement does not meet the specified error requirement, recursively dividing the original problem into two sub-problems by taking the selected position point as a dividing point, and judging whether the replacement meets the specified error requirement or not until the error between the approximate track and the original track is lower than a specified error threshold;
The DP algorithm uses the orthogonal Euclidean distance as an error measure to keep the direction trend in the approximate track;
by removing partition points whose distance is greater than a threshold value, speed variation in the grid cells is limited.
3. The map matching correction method based on hidden markov multi-noise perception according to claim 1, wherein in the probability fluctuation detection step, a hierarchical map is gradually constructed by adding new nodes and weighted edges after receiving GPS sampling points by defining observation probabilities and transition probabilities;
If the matching accuracy is reduced when a new GPS sample is added in the layered graph, the measurement error or map error is considered to exist;
Given the candidate point set, the hidden Markov model will calculate the maximum likelihood path using the Viterbi decoding algorithm;
When the candidate set contains the observed real position, the hidden Markov model deduces the correct path;
when there is a map error or a measurement error, the shortest path between two consecutive candidates is not a real path, and may detour;
taking the acquisition points of which the candidate set does not contain the real position as low-quality points, and deleting the detected low-quality points by a detection model;
The calculation process of the Viterbi algorithm is to maximize the product of the observation probability and the transition probability when a new GPS sampling point is added;
the sampling error or map error causes amplitude fluctuation of the optimal decoding probability;
taking the logarithm of the original value to make the fluctuation more obvious;
deleting the newly added point when the fluctuation of the matching probability caused by the newly added point sampling exceeds a preset threshold value;
Limiting the number of consecutive removal points when there is a map error;
When a series of consecutive sampling points for a region is removed beyond a limit number, the algorithm evaluator will evaluate the unmatched samples, detect if there is a map error, and if so, use a map generation model to fit the missing road.
4. The map matching correction method based on hidden markov multi-noise perception according to claim 1, wherein in the trajectory evaluation step, a series of GPS points continuously removed from the detection model are taken as input, and the quality of the entire sequence is evaluated, and the reason for the removal is judged;
evaluating the series of motion patterns under position and velocity constraints that remove GPS samples;
if the detected abnormality is caused by a motion pattern that does not conform to the actual driving situation, then the change in the matching probability is considered to be caused by a measurement error, and the corresponding point is deleted; the rest points are added into the matching sequence again to continue matching;
Restoring the removed GPS sampling points and generating a missing road by using points which cannot be matched if the removed points are allowed to form a driving mode in the evaluation model;
Predicting the movement direction and position of the vehicle by using Kalman filtering, and then judging whether an abnormality exists by taking the estimated points as new matching points;
Taking the speed and direction information of the road section adjacent to the sampling point as the input of a motion trail physical model, calculating the ideal position of the vehicle at the next moment, and taking the sampled trail direction and speed information as the input of the motion model to calculate the position at the next moment as a measured value;
based on the error between the weighted estimated value and the true value of the system, the Kalman gain is calculated, and the position estimated value at the next moment is obtained as follows:
xt|t=Ktzt+(I-KtH)xt|t-1
Wherein x t|t is a system estimation value, x t|t-1 is a system ideal state value, z t is a measurement value, K t is Kalman gain, I is an identity matrix, and H is a state space conversion matrix;
Comparing the position predicted value with the position sampling value, calculating the average distance between the position predicted value and the position sampling value, and if the distance is smaller than the threshold value delta d, considering the sampling to be caused by map errors.
5. The hidden markov based map matching correction method according to claim 1, wherein in the missing road section generating step, a digital map is composed of an attributed undirected graph; the intersection points are represented as vertices with a degree greater than two, and the road segments are represented as a series of edges; treating the bi-directional link as a single path; defining high-order attributes to supplement the graph; the geometric features are displayed as part of the map description; providing local geometry information about the road;
automatically deducing road and traffic characteristics by using a map generation model based on a clustering technology;
Fitting the GPS sampling points which cannot be matched by the map generation model, wherein the generated topological structure is close to an actual missing road;
dividing the GPS points which cannot be matched into different sections according to the positions of the inflection points;
The distance of the inflection point is measured by a euclidean distance variable of the vertical euclidean distance;
at each segment, fitting the missing road using a linear regression model;
In order to determine the position of the turning point, parameters θ G and d G are set;
connecting a first point and a last point in the sequence, and then projecting all other points to the connecting line;
If the specified projection distance is greater than the threshold d G, the point with the specified distance is a corner point of the real road segment;
connecting points with specified projection distances with a first point and a last point respectively, and continuously calculating angles between the connecting points; if the angle is greater than the threshold θ G, the sequence is split into two parts and iterated.
6. A hidden markov based multi-noise aware map matching correction system comprising the following modules:
region windowing module: by gridding the region, the irregular drift of the track is limited, and a smooth track is obtained;
And a map matching module: inputting the smoothed track into a hidden Markov model with a deleting point and a map correcting frame for matching;
Probability fluctuation detection module: calculating fluctuation conditions of the Viterbi decoding probability of each observation point in the matching process; if the fluctuation amplitude exceeds the threshold value, deleting the current observation point;
Track evaluation module: if the continuous track points are deleted in the adjacent area, predicting the positions of the deleted points by using a Kalman filter and the reserved track points, evaluating the error range of the predicted positions and the observed positions, and if the error is smaller than a threshold value, judging that the positions have map errors;
the missing road section generation module: taking the deleted points as the input of a map generator, dividing the deleted road sections into a series of sections according to the calculated inflection point positions, and calculating line segments passing through the inflection points in the sections by using a linear regression model;
In the map matching module, in the map matching stage, smooth GPS points are obtained from the regional windowing step as input, the smooth GPS points are mapped to road segments on a digital map, and a hidden Markov model is used for determining a road segment sequence corresponding to a time stamp sequence of GPS original data;
The hidden markov model is a discrete time markov process with candidate states and observations;
searching candidate states using an index grid, each candidate state being a point closest to an observation point in a road segment, and generating an observation probability The observation probability/>Is defined as a GPS sampling point p i and a candidate point/>, calculated based on a Gaussian noise modelPossibility of matching:
Wherein σ is the standard deviation and d is defined as p i and The projection distance between the two points, p i is the sampling point at the moment i,/>Is the j-th candidate point of p i;
Wherein, Is p i th candidate road segment, c is edge/>At any point above, dist (p i, c) is the Euclidean distance between p i and c;
the hidden markov model allows a transition from a previous candidate state to a current candidate state, and the transition is controlled by a transition probability;
empirically, the hidden Markov model assumes that the shortest path between successive candidate states has transition probabilities
Thus, transition probabilityThe calculation is as follows:
Wherein, Is a candidate point of current observation; /(I)Is a candidate point for the previous observation; d is from/>To/>An absolute value of a difference between the shortest path length and the euclidean distance between observations;
and then, using an online Viterbi decoding algorithm to find the maximum likelihood sequence of the road section corresponding to the variable sliding window of the input sequence.
7. The hidden markov based multi-noise aware map matching correction system of claim 6 wherein in the region windowing module, the geographic region is first divided into grid cells;
If the vehicle does not spend a predetermined travel time in the grid cell, the vehicle is not allowed to transition from the grid cell;
In each grid cell, a variation of the DP algorithm is used to smooth the trajectory, replacing the original trajectory with an approximate line segment;
if the replacement does not meet the specified error requirement, recursively dividing the original problem into two sub-problems by taking the selected position point as a dividing point, and judging whether the replacement meets the specified error requirement or not until the error between the approximate track and the original track is lower than a specified error threshold;
The DP algorithm uses the orthogonal Euclidean distance as an error measure to keep the direction trend in the approximate track;
by removing partition points whose distance is greater than a threshold value, speed variation in the grid cells is limited.
8. The map matching correction system based on hidden markov multi-noise perception according to claim 6, wherein in the probability fluctuation detection module, a hierarchical map is gradually constructed by defining an observation probability and a transition probability and adding new nodes and weighted edges after receiving GPS sampling points;
If the matching accuracy is reduced when a new GPS sample is added in the layered graph, the measurement error or map error is considered to exist;
Given the candidate point set, the hidden Markov model will calculate the maximum likelihood path using the Viterbi decoding algorithm;
When the candidate set contains the observed real position, the hidden Markov model deduces the correct path;
when there is a map error or a measurement error, the shortest path between two consecutive candidates is not a real path, and may detour;
taking the acquisition points of which the candidate set does not contain the real position as low-quality points, and deleting the detected low-quality points by a detection model;
The calculation process of the Viterbi algorithm is to maximize the product of the observation probability and the transition probability when a new GPS sampling point is added;
the sampling error or map error causes amplitude fluctuation of the optimal decoding probability;
taking the logarithm of the original value to make the fluctuation more obvious;
deleting the newly added point when the fluctuation of the matching probability caused by the newly added point sampling exceeds a preset threshold value;
Limiting the number of consecutive removal points when there is a map error;
When a series of consecutive sampling points for a region is removed beyond a limit number, the algorithm evaluator will evaluate the unmatched samples, detect if there is a map error, and if so, use a map generation model to fit the missing road.
CN202210878302.3A 2022-07-25 2022-07-25 Map matching correction method and system based on hidden Markov multi-noise perception Active CN115265555B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210878302.3A CN115265555B (en) 2022-07-25 2022-07-25 Map matching correction method and system based on hidden Markov multi-noise perception

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210878302.3A CN115265555B (en) 2022-07-25 2022-07-25 Map matching correction method and system based on hidden Markov multi-noise perception

Publications (2)

Publication Number Publication Date
CN115265555A CN115265555A (en) 2022-11-01
CN115265555B true CN115265555B (en) 2024-05-07

Family

ID=83769007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210878302.3A Active CN115265555B (en) 2022-07-25 2022-07-25 Map matching correction method and system based on hidden Markov multi-noise perception

Country Status (1)

Country Link
CN (1) CN115265555B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115979247B (en) * 2023-01-12 2025-08-01 柳州五菱新能源汽车有限公司 Map track smoothing method and device
CN116541721B (en) * 2023-03-31 2024-08-20 苏州大学 A signaling data-oriented positioning and road network matching method and system
CN116955335B (en) * 2023-07-21 2024-10-15 北京国信达数据技术有限公司 Address data management method and system based on big data model algorithm
CN117889871B (en) * 2024-03-14 2024-05-10 德博睿宇航科技(北京)有限公司 Navigation road network matching accurate position echelon iterative search method and system
CN118670407B (en) * 2024-08-23 2025-02-11 杭州浙诚数据科技有限公司 A map matching method and system based on hidden Markov model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632202A (en) * 2020-12-18 2021-04-09 东南大学 Dynamic map matching method based on high-order hidden Markov model
CN113639757A (en) * 2021-07-29 2021-11-12 上海交通大学 Map matching method and system based on bidirectional scoring model and retrospective correction mechanism
EP3961489A1 (en) * 2020-08-28 2022-03-02 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for identifying updated road, device and computer storage medium
CN114440900A (en) * 2022-01-07 2022-05-06 中国地质大学(武汉) Improved Hidden Markov Model Map Matching Method and Device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8645061B2 (en) * 2010-06-16 2014-02-04 Microsoft Corporation Probabilistic map matching from a plurality of observational and contextual factors

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3961489A1 (en) * 2020-08-28 2022-03-02 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for identifying updated road, device and computer storage medium
CN112632202A (en) * 2020-12-18 2021-04-09 东南大学 Dynamic map matching method based on high-order hidden Markov model
CN113639757A (en) * 2021-07-29 2021-11-12 上海交通大学 Map matching method and system based on bidirectional scoring model and retrospective correction mechanism
CN114440900A (en) * 2022-01-07 2022-05-06 中国地质大学(武汉) Improved Hidden Markov Model Map Matching Method and Device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于HMM模型改进的地图匹配算法;李梅 等;北京大学学报(自然科学版);20180615(06);全文 *

Also Published As

Publication number Publication date
CN115265555A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN115265555B (en) Map matching correction method and system based on hidden Markov multi-noise perception
CN109405839B (en) An Offline Map Matching Algorithm for Traffic Networks Based on Multipath
Goh et al. Online map-matching based on hidden markov model for real-time traffic sensing applications
CN107766808B (en) Method and system for clustering of moving trajectories of vehicle objects in road network space
CN106912018B (en) Map matching method and system based on signaling track
Zhu et al. Trajectory segmentation map-matching approach for large-scale, high-resolution GPS data
Ren et al. A fuzzy logic map matching for wheelchair navigation
Xiao et al. Vehicle trajectory interpolation based on ensemble transfer regression
CN110260870A (en) Map-matching method, device, equipment and medium based on hidden Markov model
CN107277765A (en) A kind of mobile phone signaling track preprocess method based on cluster Outlier Analysis
CN106023587A (en) Track data road network precise matching method based on multi-information fusion
CN105091889A (en) Hotspot path determination method and hotspot path determination equipment
Dogramadzi et al. Accelerated map matching for GPS trajectories
CN106408124A (en) Moving path hybrid forecasting method oriented to data sparse environment
CN109710714A (en) An Improved Hidden Markov Model for Road Network Matching
Kannan et al. Predictive indoor navigation using commercial smart-phones
CN107917716A (en) Fixed circuit air navigation aid, device, terminal and computer-readable recording medium
CN111123333B (en) Vehicle track positioning method fusing bayonet and GPS data
CN114664104B (en) Road network matching method and device
CN113581260B (en) Train track occupation judging method based on GNSS
CN113639757B (en) Map matching method and system based on two-way scoring model and retrospective correction mechanism
CN113465613A (en) Map matching optimization method for tunnel network positioning in urban rail transit
CN114462609A (en) A Trajectory Restoration Method for Floating Car Data Based on Hidden Markov Model
Jafarlou et al. Improving Fuzzy-logic based map-matching method with trajectory stay-point detection
CN116702021A (en) Intersection space structure extraction method, system, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant