CN110081890B - Dynamic k nearest neighbor map matching method combined with deep network - Google Patents

Dynamic k nearest neighbor map matching method combined with deep network Download PDF

Info

Publication number
CN110081890B
CN110081890B CN201910438446.5A CN201910438446A CN110081890B CN 110081890 B CN110081890 B CN 110081890B CN 201910438446 A CN201910438446 A CN 201910438446A CN 110081890 B CN110081890 B CN 110081890B
Authority
CN
China
Prior art keywords
error
angle
data
value
point
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
CN201910438446.5A
Other languages
Chinese (zh)
Other versions
CN110081890A (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.)
Changan University
Original Assignee
Changan 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 Changan University filed Critical Changan University
Priority to CN201910438446.5A priority Critical patent/CN110081890B/en
Publication of CN110081890A publication Critical patent/CN110081890A/en
Application granted granted Critical
Publication of CN110081890B publication Critical patent/CN110081890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Abstract

A dynamic k nearest neighbor map matching method combined with a deep network comprises the following steps: step one, collecting GPS data, and cleaning noise generated in the GPS data collection process; secondly, obtaining distance errors and direction errors in the experimental data through map matching; step three, normalizing input data of the multilayer perceptron, taking the normalized longitude and latitude as the input of a multilayer perceptron model, and training the multilayer perceptron model to obtain a dynamic k value; step four, each test data is combined with Euclidean distance according to a k value obtained by training, a k nearest neighborhood algorithm is used for obtaining a predicted distance error and a predicted direction error of the test data, and then projection points of corresponding test points are obtained; and step five, obtaining a projection point of the test data according to the longitude and the latitude of the test data, the prediction distance error and the prediction direction error. The method can improve the global single k value condition of the k nearest neighbor algorithm and obtain the optimal error value.

Description

Dynamic k nearest neighbor map matching method combined with deep network
Technical Field
The invention belongs to the technical field of map matching, and relates to a dynamic k nearest neighbor map matching method combined with a depth network.
Background
With the development and popularization of global positioning technology, more and more devices embed a GPS (global position system) global positioning function. The devices can collect a large amount of mobile position data every day, the data contains abundant traffic information and user behaviors, and the data can be applied to researches such as route prediction, GPS track analysis and activity recognition. However, in the data acquisition process, there are inevitable errors in the GPS system (e.g., propagation delay errors generated by the satellites and their propagation paths themselves, which cannot be measured or calculated by using a correction model, and inherent errors of the user receiver), which causes a deviation between the acquired GPS positioning point and the actual position. The main purpose of map matching is to associate a series of trajectory points with a road network in a digital map to correct for positional offsets due to GPS positioning errors.
The characteristic that the distance error and the direction error between the GPS positioning points in the adjacent areas have similarity due to the similarity of interference factors (environment, buildings and the like) is mainly used for correcting the similarity between the adjacent areas of the GPS positioning points by combining the characteristic and machine learning, so that the similar relation exists between the GPS positioning points in the adjacent areas, and the errors can be corrected by using historical data. The existing map matching algorithm, such as a matching algorithm based on geometry, a matching algorithm based on topological relation, a matching algorithm based on probability statistics and a matching algorithm based on an advanced method, is mainly matched according to the geometrical relation formed by limited points before and after positioning data and the topological structure between roads, and rarely utilizes a large amount of historical positioning data characteristics to correct errors, so that the characteristic that positioning point errors in adjacent areas have similarity can be considered, and a positioning data error correction method combining a multilayer perceptron (MLP) and a k nearest neighbor (kNN) algorithm is adopted.
Disclosure of Invention
The invention aims to provide a dynamic k nearest neighbor map matching method combined with a depth network, which aims to solve the problems in the prior art, and the method enables a trained model to generate a k value for each positioning data by training a multilayer perceptron model so as to form a dynamic k value, improves the global single k value condition of a k nearest neighbor algorithm and obtains an optimal error value.
In order to achieve the purpose, the technical scheme adopted by the invention comprises the following steps:
step one, collecting GPS data, and cleaning noise generated in the GPS data collection process;
step two, data preparation;
2.1, carrying out map matching on the cleaned GPS data;
2.2, calculating the distance and direction difference between the original point and the matching point in the GPS data as a distance error and a direction error;
step three, training a multilayer perceptron model to obtain a dynamic k value;
3.1, carrying out normalization processing on the longitude and the latitude in the cleaned GPS data;
3.2, building a multilayer perceptron model by selecting parameters;
3.3, taking the normalized longitude and latitude data as the input of the multilayer perceptron model, comparing the distance error with the error obtained by the nearest neighbor algorithm under different k values to obtain the k value with the minimum error, taking the k value with the minimum error as the label of each GPS point, and taking the k value with the minimum error as the output of the multilayer perceptron model;
3.4, after the multilayer perceptron model is trained stably through the training data, predicting a corresponding k value for each test data, and further forming a dynamic k value correction method;
step four, combining the corresponding k value obtained by training the test data according to the multilayer perceptron model with the Euclidean distance, and obtaining the distance error and the direction error of the test point by using a k nearest neighbor algorithm;
and step five, obtaining a projection point of the test data according to the longitude and the latitude of the test data, the prediction distance error and the prediction direction error, wherein the projection point is a result corrected by a dynamic k nearest neighbor method combined with a depth network.
In the first step, data which are out of range, unchanged GPS coordinates of the vehicle in a certain period of time, wrong formats and abnormal data are removed during data cleaning.
The calculation formula of the distance error and the direction error in the step 2.2 is as follows:
Figure GDA0003947120750000031
in the above formula, (lon 1, lat 1), (lon 2, lat 2) are the original point and the matching point respectively, dlon, dlat are the difference values after radian system conversion of longitude and latitude respectively, and distance is the distance error;
angle = the angle between the connecting line between the original point and the matching point and the true north direction
The angle in the formula is the direction error.
The calculation formula of the normalization processing in step 3.1 is as follows:
Figure GDA0003947120750000032
in the formula, maxValue and MinValue are the maximum value and the minimum value of the sequence.
The parameter setting contents when the multilayer perceptron model is built in the step 3.2 are as follows:
the number of MLP layers is 3, and the MLP comprises an input layer, a hidden layer and an output layer;
the number of input units is 2, including longitude and latitude;
the number of the hidden layer units is 100;
the activation function between the hidden layer and the output layer is
Figure GDA0003947120750000033
In the formula, v i C is the output of the ith hidden unit, and the number of the hidden layer units is c;
the optimizer is AdamaOptimizer, and the learning rate is 0.0001;
20% as test data and 80% as training data;
the loss function is mean square error;
the training method is to obtain the error between the predicted value and the label value by forward propagation and update the network parameters by backward propagation.
And 3.4, dividing the k value into 10 classes for prediction, wherein the value range of the label class in the step 3.4 is 1-10.
The calculation formula of the distance error and the direction error of the test points in the fourth step is as follows:
Figure GDA0003947120750000041
angle_err=angle_north
if|head_angle′-head_angle|<45°or|head_angle′-head_angle-360°|<45°
in the formula, distance i For distance error, dis _ err is predicted distance error of each test point, angle _ err represents direction error, angle _ normal is predicted direction error of an included angle between a point before and after correction of a similar point and a true north direction meeting a heading angle constraint condition, head _ angle represents a heading angle when a certain adjacent GPS point is not matched, and head _ angle' represents a heading angle after matching of a certain adjacent GPS point.
Compared with the prior art, the invention has the following beneficial effects: the method comprises the following steps that firstly, a multi-layer perceptron model is trained, so that the trained model can predict a k value for each positioning data to form a dynamic k value, and the condition of global single k value existing in a k nearest neighbor algorithm is improved; secondly, obtaining a distance error and a direction error of each positioning point by a map matching method based on geometry; and finally, combining a k-Nearest Neighbor (kNN) Algorithm with an Euclidean Algorithm (Euclidean Algorithm) to acquire an error learned to the required correction data, thereby obtaining a projection point of the point. According to the characteristic that positioning point errors of adjacent areas have similarity, a positioning data error correction method combining a multilayer perceptron (MLP) and a k nearest neighbor (kNN) algorithm is adopted, and in an experiment, real taxi track data are used for fully verifying the model provided by the invention. The result shows that the model provided by the invention has better improvement than the existing error correction model.
Drawings
FIG. 1 is a graph of the error between the original localization point and the matching result;
FIG. 2 is a neighborhood error similarity graph: (a) a distance error map of a GPS positioning point; (b) GPS positioning point direction error;
FIG. 3 is a histogram of a k-value distribution;
FIG. 4 is a graph of a multi-layered perceptron loss function.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
1. Defining the track sequence as T, wherein T is a series of continuous GPS positioning points p 1 ,p 2 ,...,p n Each anchor point containing a longitude (p) i Lat), latitude (p) i Lon), time (p) i Time), speed (p) i Velocity), heading angle (p) i Path-angle), etc. 2. Defining a distance error: suppose R i For an anchor point p i If the matching result is positive, then R is added i And p i The distance between is called the distance error
Figure GDA0003947120750000052
As shown in fig. 1. 3. Defining the direction error: let R be i For an anchor point p i If the matching result is positive, then R is added i 、p i The clockwise included angle between the interval line and the due north direction is called the direction error
Figure GDA0003947120750000053
As shown in fig. 1. 4. Defining the error similarity of adjacent areas: GPS location point p i With adjacent point p i-n ,...,p i-1 And p i+1 ,...,p m+1 (where m, N. Epsilon. N * ) Is/are as follows
Figure GDA0003947120750000055
And
Figure GDA0003947120750000054
there is a similarity between them. Referring to fig. 2, it can be seen from fig. 2 (a) that the distance errors of adjacent GPS positioning points are the most similar, and from fig. 2 (b) that the direction errors between adjacent GPS positioning points are the most similar.
The dynamic k nearest neighbor map matching method combined with the deep network specifically comprises the following steps:
the method comprises the following steps: clearing data;
because the GPS data acquisition process has noise, the data needs to be cleaned. And eliminating data which is beyond the scope of the city of Western Ann, has no change of GPS coordinates of the vehicle within a certain period of time and has various format errors and anomalies.
Step two: preparing data;
2.1, the process of cleaning the GPS data is only to eliminate abnormal data, and the positioning error of the GPS data still exists, so that the GPS data needs to be subjected to map matching before the model is trained.
2.2, obtaining the matching points after map matching, and taking the distance difference and the direction difference between the original GPS points and the matching points as a distance error and a direction error, wherein the expression of the distance error and the direction error is as follows:
Figure GDA0003947120750000051
in the formula, (lon 1, lat 1), (lon 2, lat 2) are respectively an original point and a matching point, dlon and dlat are respectively difference values obtained by performing radian system conversion on longitude and latitude, and distance is a distance error;
angle = angle between connecting line between original point and matching point and true north direction
In the formula, angle is a direction error;
step three: training a multilayer perceptron model to obtain a dynamic k value;
for deep learning networks, the format of the input data may affect the training effect of the model. The data are normalized, so that the speed of solving the optimal solution by gradient descent can be increased, and the precision can be improved. The mathematical expression for normalizing the input of the multilayer perceptron is as follows, wherein MaxValue and MinValue are the maximum and minimum values of the sequence.
Figure GDA0003947120750000061
The multilayer perceptron (MLP) mainly has a good effect on the identification of handwritten numbers and can well distinguish numbers 0-9. By applying the MLP from the image domain to the traffic domain and improving it using the principle of handwriting recognition, the parameter settings of the MLP are shown in table 1. Firstly, setting and building a multilayer perceptron according to parameters in a table 1, secondly, taking the normalized longitude and latitude as the input of the multilayer perceptron, comparing the actual error with the error obtained by kNN under different k values to obtain the closest k value as a label of each positioning point, wherein the label category is shown in figure 3, the value range is 1-10, and then, the k value is divided into 10 categories for prediction. After the multi-layer perceptron model is trained and stabilized through training data, a corresponding k value is predicted for each test data, so that the defect of an original global single k value is overcome, and a dynamic k value is formed to prepare for error correction.
TABLE 1 Multi-layer perceptron parameter settings
Figure GDA0003947120750000062
Step four: k, acquiring a predicted distance error and a direction error of the test data from the nearest neighborhood;
according to the error analysis of the matching result, the Distance error and the direction error between adjacent GPS positioning points have similarity, so that the characteristic is utilized on the basis of the dynamic k value, the Euclidean Distance (Euclidean Distance) is taken as a similarity measurement standard, the smaller the Euclidean Distance between two positioning points is, the higher the similarity between the two positioning points is, and the more the similarity exists between the error vectors between the two positioning points. And (3) combining the k value obtained by model training and the Euclidean distance by using a k nearest neighborhood algorithm to obtain a distance error and a direction error. The distance error and the direction error are shown as follows:
Figure GDA0003947120750000071
angle_err=angle_north
if|head_angle′-head_angle|<45°or|head_angle′-head_angel-360°|<45°
in the formula, distance i For the distance error, dis _ err is the predicted distance error of each test point, angle _ err represents the direction error, and angle _ normal is fullAnd correcting a predicted direction error of an included angle between a front point and a rear point and a due north direction by using the similar points under the condition of the sufficient heading angle constraint condition, wherein head _ angle represents a heading angle when a certain adjacent GPS point is not matched, and head _ angle' represents a heading angle after the certain adjacent GPS point is matched.
Step five: and obtaining a projection point of the test data according to the longitude, the latitude, the prediction distance error and the prediction direction error of the test data, wherein the projection point is a result corrected by a dynamic k nearest neighbor method combined with a depth network.
The invention proposes to use a network model combining a multi-layer perceptron (MLP) and a k-nearest neighbor (kNN) algorithm for correcting positioning errors. Through the network model, the global constant k value can be effectively improved when the k nearest neighborhood algorithm carries out error correction, so that the GPS positioning point cannot acquire the optimal error value, and the correction result is influenced.
The hybrid model proposed by the invention is compared with constant k values kNN, MLP and SVR.
Referring to fig. 4, the loss of network training and testing tended to decrease, converging after 20 iterations, indicating that the model was correctly trained and not over-fitted. After k values were obtained by MLP, correction errors were obtained by kNN method, and the results of comparison with constant k values kNN, MLP and SVR are shown in table 2. From the analysis in table 2, no matter MLP or SVR, the method of directly obtaining the correction error by using longitude and latitude as input has no obvious effect. The kNN method with the optimal k value is adopted, so that the improvement result is greater, and the hybrid model provided by the invention is further improved compared with a constant k value method on the basis of the dynamic k value.
TABLE 2 comparison of mean standard deviation of error correction results for different models
Original error 11.89833 21.77521
MLP regression error 11.74524 20.75426
SVR regression error 11.45269 20.45862
kNN error at optimal k value 5.21216 11.41555
Mixed model error 5.03315 8.61773
The foregoing is only a preferred embodiment of the present invention and is not intended to limit the invention in any way, it will be understood by those skilled in the art that various modifications and substitutions can be made without departing from the spirit and principle of the invention, and these modifications and substitutions will fall within the scope of the invention defined by the appended claims.

Claims (7)

1. A dynamic k nearest neighbor map matching method combined with a deep network is characterized by comprising the following steps:
step one, collecting GPS data, and cleaning noise generated in the GPS data collection process;
step two, data preparation;
2.1, carrying out map matching on the cleaned GPS data;
2.2, calculating the distance and direction difference between the original point and the matching point in the GPS data as a distance error and a direction error;
step three, training a multilayer perceptron model to obtain a dynamic k value;
3.1, carrying out normalization processing on the longitude and the latitude in the cleaned GPS data;
3.2, building a multilayer perceptron model by selecting parameters;
3.3, taking the normalized longitude and latitude data as the input of the multilayer perceptron model, comparing the distance error with the error obtained by the nearest neighbor algorithm under different k values to obtain the k value with the minimum error, taking the k value with the minimum error as the label of each GPS point, and taking the k value with the minimum error as the output of the multilayer perceptron model;
3.4, after the multilayer perceptron model is trained stably through the training data, predicting a corresponding k value for each test data, and further forming a dynamic k value correction method;
step four, combining the corresponding k value obtained by training the test data according to the multilayer perceptron model with the Euclidean distance, and obtaining the distance error and the direction error of the test point by using a k nearest neighborhood algorithm;
and step five, obtaining a projection point of the test data according to the longitude and the latitude of the test data, the prediction distance error and the prediction direction error, wherein the projection point is a result corrected by a dynamic k nearest neighbor method combined with a depth network.
2. The dynamic k-nearest neighbor map matching method in combination with a deep network according to claim 1, wherein: the data is cleaned to remove the data which is out of range, the GPS coordinates of the vehicle are not changed in a certain period of time, and the data has wrong format and is abnormal.
3. The method for matching a dynamic k-nearest neighbor map in combination with a deep network as claimed in claim 1, wherein the distance error and the direction error in step 2.2 are calculated as follows:
Figure FDA0003947120740000021
in the above formula, (lon 1, lat 1), (lon 2, lat 2) are respectively an original point and a matching point, dlon and dlat are respectively difference values obtained by performing radian system conversion on longitude and latitude, and distance is a distance error;
angle = the angle between the connecting line between the original point and the matching point and the true north direction
The angle in the formula is the direction error.
4. The method for matching a dynamic k-nearest neighbor map in combination with a deep network according to claim 1, wherein the normalization in step 3.1 is performed according to the following calculation formula:
Figure FDA0003947120740000022
in the formula, maxValue and MinValue are the maximum value and the minimum value of the sequence.
5. The dynamic k-nearest neighbor map matching method combined with the deep network according to claim 1, wherein the parameter content is set in the step 3.2 when a multi-layer perceptron model is built as follows:
the number of MLP layers is 3, and the MLP comprises an input layer, a hidden layer and an output layer;
the number of input units is 2, including longitude and latitude;
the number of hidden layer units is 100;
the activation function between the hidden layer and the output layer is
Figure FDA0003947120740000023
In the formula, v i C is the output of the ith hidden unit, and the number of the hidden layer units is c;
the optimizer is AdamaOptizer, and the learning rate is 0.0001;
20% as test data and 80% as training data;
the loss function is mean square error;
the training method is to obtain the error between the predicted value and the label value by forward propagation and update the network parameters by backward propagation.
6. The dynamic k-nearest neighbor map matching method in combination with a deep network according to claim 1, wherein: in the step 3.4, the value range of the label category is 1-10, and the k value is divided into 10 categories for prediction.
7. The method according to claim 1, wherein the distance error and the direction error of the test points in the fourth step are calculated as follows:
Figure FDA0003947120740000031
angle_err=angle_north
if|head_angle′-head_angle|<45°or|head_angle′-head_angle-360°|<45°
in the formula, distance i For distance error, dis _ err is predicted distance error of each test point, angle _ err represents direction error, angle _ normal is predicted direction error of an included angle between a point before and after correction of a similar point and a true north direction meeting a heading angle constraint condition, head _ angle represents a heading angle when a certain adjacent GPS point is not matched, and head _ angle' represents a heading angle after matching of a certain adjacent GPS point.
CN201910438446.5A 2019-05-24 2019-05-24 Dynamic k nearest neighbor map matching method combined with deep network Active CN110081890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910438446.5A CN110081890B (en) 2019-05-24 2019-05-24 Dynamic k nearest neighbor map matching method combined with deep network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910438446.5A CN110081890B (en) 2019-05-24 2019-05-24 Dynamic k nearest neighbor map matching method combined with deep network

Publications (2)

Publication Number Publication Date
CN110081890A CN110081890A (en) 2019-08-02
CN110081890B true CN110081890B (en) 2023-02-03

Family

ID=67421688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910438446.5A Active CN110081890B (en) 2019-05-24 2019-05-24 Dynamic k nearest neighbor map matching method combined with deep network

Country Status (1)

Country Link
CN (1) CN110081890B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111879305B (en) * 2020-06-16 2022-03-18 华中科技大学 Multi-mode perception positioning model and system for high-risk production environment
CN112967296B (en) * 2021-03-10 2022-11-15 重庆理工大学 Point cloud dynamic region graph convolution method, classification method and segmentation method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5774831A (en) * 1996-12-06 1998-06-30 Gupta; Surender Kumar System for improving average accuracy of signals from global positioning system by using a neural network to obtain signal correction values
CN103983263A (en) * 2014-05-30 2014-08-13 东南大学 Inertia/visual integrated navigation method adopting iterated extended Kalman filter and neural network
DE102016210032A1 (en) * 2016-06-07 2017-12-07 Robert Bosch Gmbh Method Device and system for wrong driver identification
CN106441316B (en) * 2016-09-08 2020-09-01 复旦大学 Historical data-based single-point road network matching method
WO2018094375A1 (en) * 2016-11-21 2018-05-24 Nio Usa, Inc. Method and system for vehicle data optimization

Also Published As

Publication number Publication date
CN110081890A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
CN109405839B (en) Traffic network off-line map matching algorithm based on multiple paths
CN106912018B (en) Map matching method and system based on signaling track
CN109459045B (en) Improved interactive voting matching method for low-frequency GPS track
CN102707276B (en) The AIS of based target topology information and radar track robust association algorithm
CN109708638B (en) Ship track point extraction method
CN106441316B (en) Historical data-based single-point road network matching method
CN103759732B (en) A kind of centralized multisensor multiple hypotheis tracking method of angle information auxiliary
CN111291790B (en) Turning path extraction and road network topology change detection framework method based on track similarity
CN110081890B (en) Dynamic k nearest neighbor map matching method combined with deep network
WO2021208110A1 (en) Method for determining lane line recognition abnormal event, and lane line recognition apparatus and system
CN111121791A (en) Optimization method of hidden Markov model in map matching and GPS positioning method
CN109033239B (en) Road network structure generation method based on least square optimization
CN112612862A (en) Grid map positioning method based on point cloud registration
Hashemi Automatic inference of road and pedestrian networks from spatial-temporal trajectories
CN114705193A (en) Marine big data-based ship navigation path planning method and system
CN113581260B (en) Train track occupation judging method based on GNSS
CN113932821A (en) Track map matching method based on continuous window average direction features
CN113295173A (en) Map matching method for annular road section
CN110647877B (en) Three-dimensional traffic facility positioning and deviation rectifying method and device based on neural network
Jafarlou et al. Improving Fuzzy-logic based map-matching method with trajectory stay-point detection
CN115265555A (en) Hidden Markov based multi-noise perception map matching correction method and system
CN114993325A (en) Vehicle GPS map road matching method, device and storage medium
TWI748514B (en) Method and system for estimating traffic
Sunderrajan et al. Map stream: initializing what-if analyses for real-time symbiotic traffic simulations
US11113292B2 (en) Feature data storage apparatus and driving feature and distribution databases

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