CN112013856B - Track fitting method, device, terminal and medium based on road network and track data - Google Patents

Track fitting method, device, terminal and medium based on road network and track data Download PDF

Info

Publication number
CN112013856B
CN112013856B CN202010877736.2A CN202010877736A CN112013856B CN 112013856 B CN112013856 B CN 112013856B CN 202010877736 A CN202010877736 A CN 202010877736A CN 112013856 B CN112013856 B CN 112013856B
Authority
CN
China
Prior art keywords
track
point
points
data
road network
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
CN202010877736.2A
Other languages
Chinese (zh)
Other versions
CN112013856A (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 Halo Pratt&whitney Technology Co ltd
Original Assignee
Shanghai Junzheng Network Technology Co Ltd
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 Junzheng Network Technology Co Ltd filed Critical Shanghai Junzheng Network Technology Co Ltd
Priority to CN202010877736.2A priority Critical patent/CN112013856B/en
Publication of CN112013856A publication Critical patent/CN112013856A/en
Application granted granted Critical
Publication of CN112013856B publication Critical patent/CN112013856B/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
    • G01C21/32Structuring or formatting of map data
    • 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/34Route searching; Route guidance
    • G01C21/3407Route searching; Route guidance specially adapted for specific applications
    • G01C21/3415Dynamic re-routing, e.g. recalculating the route when the user deviates from calculated route or after detecting real-time traffic data or accidents
    • 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/34Route searching; Route guidance
    • G01C21/3446Details of route searching algorithms, e.g. Dijkstra, A*, arc-flags, using precalculated routes

Abstract

The invention provides a track fitting method, a device, a terminal and a medium based on road network and track data, comprising the following steps: cleaning track data; recalling corresponding road network data according to the cleaned track data; inputting the cleaned track data and the road network data corresponding to the recall to construct a map matching model; the map matching module is used for outputting road information of roads contained in the fitting track. According to the invention, the riding track of the user is fitted by cleaning the software track data of the user side and the hardware track data of the vehicle side and combining the road network information, so that more extreme positioning service is displayed, and better riding experience is brought to the user. Important technical support is provided for end point positioning fitting and the like of the vehicle.

Description

Track fitting method, device, terminal and medium based on road network and track data
Technical Field
The invention relates to the technical field of positioning, in particular to a track fitting method, a track fitting device, a track fitting terminal and a track fitting medium based on road networks and track data.
Background
With the development of the internet sharing concept, the sharing bicycle plays a great role in solving the problem of going out in the last kilometer of each city. In order to bring better experience to the riding of the user, fitting the riding track of the user is an essential part.
In the existing shared bicycle riding track fitting technology, available track data sources mainly include positions uploaded by user mobile phone apps and positions uploaded by vehicle hardware chips. Under a common condition, most users can turn off the background riding app in the riding process, a main track data source is a hardware chip of the vehicle, and the riding track of the users is fitted according to the hardware track data of the users in consideration of the positioning capacity of the hardware chip, so that a plurality of problems including hardware base station positioning drift and the like can be brought. Therefore, how to fit the real riding track of the user according to the existing track data is an important topic.
Disclosure of Invention
In view of the above defects in the prior art, the present invention aims to provide a method, an apparatus, a terminal and a medium for fitting a trajectory based on a road network and trajectory data, so as to solve the technical problems that the prior art cannot fit a real user riding trajectory according to the trajectory data.
In order to achieve the purpose, the invention provides a riding track fitting method based on a road network and track data, which comprises the following steps: cleaning track data; recalling corresponding road network data according to the cleaned track data; inputting the cleaned track data and the road network data corresponding to the recall to construct a map matching model; the map matching module is used for outputting road information of roads contained in the fitting track.
In a preferred embodiment of the present invention, the cleaning trajectory data includes: and cleaning the abnormal riding track points according to whether the direction angle formed by the continuous track points is abnormal.
In another preferred embodiment of the present invention, the cleaning of the abnormal riding track points according to whether or not the direction angle formed by the continuous track points is abnormal includes: screening out points with abnormal angles with direction angles formed by the front and rear adjacent track points as suspected abnormal points, and forming a suspected abnormal point array; converting the suspected abnormal point array into a corresponding two-dimensional array; the two-dimensional array is composed of a plurality of one-dimensional arrays, and the one-dimensional arrays comprise a first one-dimensional array composed of continuous track points in the suspected abnormal point array and a second one-dimensional array formed by isolated track points in the suspected abnormal point array; and reserving track points in the second type of one-dimensional array and the first track point in the first type of one-dimensional array, and removing other track points to clean the track points of abnormal riding.
In another preferred embodiment of the present invention, the screening out points with abnormal angles of direction angles formed by adjacent front and back track points as suspected abnormal points includes: calculating the angle of a direction angle formed by the current track point and the front and rear continuous track points; and screening out the current track points with the direction angles smaller than the preset angle threshold value as suspected abnormal points.
In another preferred embodiment of the present invention, the recalling the corresponding road network data according to the cleaned track data includes: and interpolating sampling points at preset intervals between adjacent riding track points so that the distance between the adjacent points does not exceed the side length of the grid of the road network, and recalling all road network data in the road network.
In another preferred embodiment of the present invention, the map matching model is constructed in a manner including: calculating a shortest path table for inquiring the shortest path value between two points and constructing a candidate point set of the track points; inferring an optimal trajectory based on the shortest path table and a set of candidate points; and constructing complete road information according to the optimal track.
In another preferred embodiment of the present invention, the method for deducing the optimal trajectory based on the shortest path table and the candidate point set comprises: calculating a transition probability from a current candidate point to a next candidate point; the transition probability is calculated according to the shortest distance from the current candidate point to the next candidate point; the shortest distance from the current candidate point to the next candidate point is calculated based on the shortest path table; calculating the emission probability of the current candidate point; calculating score data of each candidate edge in the track according to the transition probability and the emission probability; calculating to obtain the highest score of the whole track by using a dynamic programming algorithm based on the score data of each candidate edge, and correspondingly obtaining the optimal candidate point and the optimal candidate edge of each observation point when the score is highest; based on the score data of each candidate edge, calculating by using a dynamic programming algorithm to obtain the highest score of the whole track, and correspondingly obtaining the optimal candidate point and the optimal candidate edge of each observation point when the score is highest; and obtaining an optimal track according to the optimal candidate point and the optimal candidate edge of each observation point.
In order to achieve the above object, the present invention further provides a riding track fitting device based on road network and track data, comprising: the track data cleaning module is used for cleaning track data; the road network data recall module is used for recalling the corresponding road network data according to the cleaned track data; the model building module is used for inputting the cleaned track data and the road network data corresponding to the recalls so as to build a map matching model; the map matching module is used for outputting road information of roads contained in the fitting track.
In a preferred embodiment of the present invention, the model building module comprises: the shortest path table module is used for calculating a shortest path table for inquiring the shortest path value between two points; the candidate point collection module is used for constructing a candidate point collection of the track points; an optimal trajectory module for inferring an optimal trajectory based on the constructed set of candidate points; and the road information module is used for constructing complete road information according to the optimal track.
To achieve the above object, the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the method for fitting a riding track based on road network and track data.
In order to achieve the above object, the present invention further provides an electronic terminal, comprising: a processor and a memory; the memory is used for storing a computer program; the processor is used for executing the computer program stored in the memory so as to enable the terminal to execute the riding track fitting method based on the road network and the track data.
The track fitting method, the device, the terminal and the medium based on the road network and the track data have the following technical effects: according to the invention, the riding track of the user is fitted by cleaning the software track data of the user side and the hardware track data of the vehicle side and combining the road network information, so that more extreme positioning service is displayed, and better riding experience is brought to the user. Important technical support is provided for end point positioning fitting and the like of the vehicle.
The conception, the specific structure and the technical effects of the present invention will be further described with reference to the accompanying drawings to fully understand the objects, the features and the effects of the present invention.
Drawings
Fig. 1 is a schematic flow chart of a trajectory fitting method based on road network and trajectory data according to an embodiment of the present invention.
FIG. 2A is a diagram illustrating track effects before data cleansing according to an embodiment of the present invention.
FIG. 2B is a diagram illustrating track effects after data cleansing according to an embodiment of the present invention.
FIG. 3 is a schematic diagram illustrating candidate point set construction according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a trajectory fitting device based on road network and trajectory data according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an electronic terminal according to an embodiment of the invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
Aiming at the problem that the prior art can not accurately and efficiently fit the riding data of the user, the invention provides a technical scheme for fitting the riding track of the user by using road network data and track data, which can bring better experience for the riding of the user and can also better fit the riding terminal on the basis of a track fitting technology by using a Location Based Service (LBS) technology.
In order to achieve the purpose, firstly, track data of software and hardware are cleaned, then a track fitting model is built, the cleaned data and road network data are input into the track fitting model, and then the output fitting track is preprocessed to obtain the fitted riding track of the user. In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention are further described in detail by the following embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The first embodiment is as follows:
as shown in fig. 1, a flow chart of a trajectory fitting method based on a road network and trajectory data in an embodiment of the invention is shown, which includes steps S11 to S13.
It should be noted that the riding track fitting method in this embodiment is applied to a server, and the server may be arranged on one or more entity servers according to various factors such as functions, loads, and the like, or may be formed by a distributed or centralized server cluster, which is not limited in this embodiment.
Step S11: and cleaning the track data.
It should be noted that the trajectory data to be clarified in this embodiment includes hardware trajectory point data and software trajectory point data. Specifically, the hardware trajectory point data mainly refers to trajectory point data generated by a vehicle in a moving process (such as trajectory point data of a shared bicycle); the software track point data mainly refers to track point data generated by the mobile terminal.
In this embodiment, the process of cleaning the trajectory data includes: and cleaning the abnormal riding track points according to whether the direction angle formed by the continuous track points is abnormal. Considering that a large number of positioning drift points usually exist in the existing track data, abnormal points are removed according to continuous abnormal angle changes, and therefore the track data are cleaned. The mode of cleaning the abnormal riding track points according to whether the direction angles formed by the continuous track points are abnormal comprises the following substeps.
Step S111: and screening out points with abnormal angles of direction angles formed by the front and rear adjacent track points as suspected abnormal points, and forming a suspected abnormal point array.
Specifically, the angle of a direction angle formed by the current track point and the front and rear continuous track points is calculated; if the direction angle is smaller than the preset angle threshold, the current track point is considered as a suspected abnormal point; otherwise, the current trace point may be considered to be a normal point. Taking the continuous track points p1, p2, and p3 as an example, a direction angle between a connecting line of p1 and p2 and a connecting line of p2 and p3 is calculated, and if the direction angle is smaller than a preset angle threshold (e.g. 40 degrees), the track point p2 is considered as a suspected outlier. And continuously calculating the angle formed by the subsequent track points based on the same calculation principle, for example, the direction angle formed by the continuous track points p2, p3 and p4, and if the angle is less than 40 degrees, the track point p3 is considered to be a suspected abnormal point. And placing the suspected abnormal points p2 and p3 into a suspected point array, continuously observing backwards, and if the suspected abnormal points exist, placing the suspected abnormal points into the suspected point array.
Step S112: converting the suspected abnormal point array into a corresponding two-dimensional array; the two-dimensional array is composed of a plurality of one-dimensional arrays, and the one-dimensional arrays comprise a first-class one-dimensional array composed of continuous track points in the suspected abnormal point array and a second-class one-dimensional array formed by isolated track points in the suspected abnormal point array.
Taking a suspected abnormal point array [10,11,12,15,16,19] as an example, the continuous track points 10,11,12 in the array can form a first-class one-dimensional array, the continuous track points 15,16 can also form a first-class one-dimensional array, and the isolated track point 19 is a second-class one-dimensional array, so that the two-dimensional array can be converted into a corresponding two-dimensional array as follows: [[10,11,12],[15,16],[19]].
Step S113: and reserving track points in the second type of one-dimensional array and the first track point in the first type of one-dimensional array, and removing other track points to clean the track points of abnormal riding. Taking the above-mentioned suspected abnormal point array [10,11,12,15,16,19] as an example, after converting into the corresponding two-dimensional array [10,11,12], [15,16], [19], in the one-dimensional array [10,11,12], the trace point 10 is retained, and the trace point 11 and the trace point 12 are removed as abnormal points; in the one-dimensional arrays [15,16], keeping track points 15, and removing the track points 16 as abnormal points; in the one-dimensional array [19], the trace points 19 are retained. Therefore, the abnormal riding track point cleaning work is completed.
To facilitate understanding by those skilled in the art, the comparison of the effects before and after cleaning of the trace data is now compared with fig. 2A and 2B; fig. 2A shows an effect diagram before track data cleaning, and fig. 2B shows an effect diagram after track data cleaning. After comparison, the track before the track data is cleaned has more disordered points, so that the disordered redundancy of the track route is not clear enough; the track after the track data cleaning removes the cluttered points, and the estimated route is very clear and definite.
Step S12: and recalling the corresponding road network data according to the cleaned track data. It should be understood by those skilled in the art that the road network referred to in the present invention is a road network (road network), which is a road system composed of various roads in a certain area, interconnected and meshed to be distributed in a network, and mainly includes a road network and an urban road network; the road network composed of various levels of roads is called a road network, and the road network composed of various roads in the city range is called an urban road network.
In some examples, sampling points are interpolated at intervals of a preset distance between adjacent riding track points, so that the distance between the adjacent points does not exceed the side length of the grid of the located road network, and all road network data in the located road network can be recalled. Taking a geohash7 grid as an example, a geohash7 grid has a side length of 152m, and since the interval between adjacent points of the track data is likely to exceed 152m, in order to recall all the road network data, sampling points may be interpolated at preset intervals between two adjacent track points (for example, a sampling point is interpolated at every 100m between adjacent points), so that all the road network data in the geohash7 grid where the track points are located may be recalled. It should be understood that interpolation sampling may be implemented by those skilled in the art using a mean sampling method, a discrete distribution sampling method, a BOX-Muller sampling method, or a gibbs sampling method, and the present embodiment is not limited thereto.
In some examples, all road network data recalled according to the trajectory data is also subjected to deduplication processing, namely unnecessary calculation is filtered out, and unnecessary waste of space resources is reduced at the same time.
Step S13: constructing a map matching model by taking the cleaned track data and the road network data corresponding to the recall as model input data; and the map matching model outputs the road information of the track. Further, the process of constructing the map matching model specifically includes steps S131 to S133.
Step S131: and calculating a shortest path table for inquiring the shortest path value between the two points and constructing a candidate point set of the track points.
Specifically, in order to accelerate the speed of the map matching model, the starting points of all paragraphs in the road network data are traversed before the model is built, the shortest path from a certain road section starting point pi to a certain point pj of another path in the path is calculated by using the shortest path algorithm, and the result of the shortest path calculation is stored in the shortest path table by using a hash key value pair method. The shortest path refers to a path from a certain vertex to another vertex along an edge of the graph, and the sum of weights on each edge is the smallest; the shortest path algorithm related to the present embodiment includes, but is not limited to, a dijkstra algorithm, a Bellman-Ford algorithm, a Floyd algorithm, an SPFA algorithm, and the like.
In some examples, the manner of constructing the candidate point set of trace points includes: given a track observation point p, searching a road set with the track observation point p as a circle center and r as a radius based on a k-nearest neighbor algorithm to construct a candidate point set of the track observation point p. The K-nearest neighbor (KNN) classification algorithm is a machine learning algorithm, and the principle is that in a feature space, if most of K nearest (i.e., nearest neighbors in the feature space) samples near a sample belong to a certain class, the sample also belongs to the class.
For ease of understanding, reference is now made to FIG. 3: the edge e is a candidate edge of the GPS track observation point p, and the vehicle position is positioned as a projection point of the point p on the edge e
Figure BDA0002653125990000071
Figure BDA0002653125990000072
Is a candidate point C of p points n λ represents a point
Figure BDA0002653125990000073
The offset distance to the starting point of the road section, the length of the side e, the longitude and latitude of the polygon are represented as geom, the starting point is s (source), and the end point is t (target). The edge e may be denoted as e ═ e (eid, s, t, geom, L), where eid is the unique identification of the edge e. Giving a point p, searching a road set with p as a circle center and r as a radius by k neighbors, and constructing a candidate point set CS (p) ═ KNN (p) of p k,r
Step S132: an optimal trajectory is inferred based on the shortest path table and a set of candidate points.
In particular, the step of inferring the optimal trajectory essentially consists of deriving from the current candidate point C n To the next candidate point C n+1 Transition probability tp (C) n ,C n+1 ) A certain GPS point to a candidate point C n Emission probability C of n Calculation of ep and the objective function to be optimized. Where transition probability tp (C) n ,C n+1 ) The calculation of (A) requires first calculating the slave C n To C n+1 The shortest distance of (c).
From C n To C n+1 The shortest distance of
Figure BDA0002653125990000081
The formula of (c) is shown as follows:
Figure BDA0002653125990000082
wherein the content of the first and second substances,
Figure BDA0002653125990000083
representing a point C looked up from said shortest path table n. e.t to point C n+1. e.s, respectively.
Transition probability tp (C) n ,C n+1 ) The formula of (c) is shown as follows:
Figure BDA0002653125990000084
emission probability C n Ep is calculated assuming that the GPS points obey a Gaussian distribution with a mean value of 0 based on the true position of the vehicle, the invention defines a candidate point C n The distribution of the emission probability is shown as follows:
Figure BDA0002653125990000085
wherein, the standard deviation sigma represents the error between the GPS real value and the GPS observation value.
In this embodiment, a trace is regarded as a transition graph, and each node in the graph represents a candidate node C n Each edge represents a candidate node C n To C n+1 And defining each candidate edge as a candidate point C n The edge is located, and the score of each candidate edge is defined as:
Figure BDA0002653125990000086
wherein tp (C) n ,C n+1 ) To transition probabilities, C n Ep is the transmission probability.
Obtaining the highest score of the whole track by using a dynamic programming algorithm, and correspondingly obtaining the optimal candidate point and the optimal candidate edge of each GPS observation point when the score is highest
Figure BDA0002653125990000087
The optimal track can be obtained by corresponding
Figure BDA0002653125990000088
The dynamic programming algorithm is used for solving a problem with certain optimal property, a plurality of feasible solutions may exist in the problem, each solution corresponds to one value, and the solution with the optimal value is found through the dynamic programming algorithm; the basic idea is to decompose the problem to be solved into a plurality of sub-problems, solve the sub-problems first, and then obtain the solution of the original problem from the solutions of the sub-problems. The dynamic programming algorithm may be, for example, a viterbi algorithm, which is not limited in this embodiment.
Step S133: and constructing complete road information according to the optimal track. It should be noted that the road information includes, but is not limited to: latitude and longitude information, geometric shape information, road network grade information, and the like.
In particular, the optimum trajectory O is obtained path Later, complete road information C needs to be constructed path . Complete road information C path The construction method comprises continuously accessing shortest paths between edges in the shortest path table, and connecting the shortest paths to obtain the final product
Figure BDA0002653125990000091
Wherein the shortest path
Figure BDA0002653125990000092
The query for information may be found in a shortest path table. Thus, a complete road letter is obtainedBreath C path
As can be seen from the above, the riding track fitting method based on the road network and the track data provided by this embodiment fits the riding track of the user by cleaning the user-side software track data (such as data in the mobile phone app) and the vehicle-side hardware track data and combining the road network information, so as to display more excellent positioning service and bring better riding experience to the user. Important technical support is provided for end point positioning fitting and the like of the vehicle.
Example two:
fig. 4 is a schematic structural diagram illustrating a riding track fitting device based on road network and track data according to an embodiment of the present invention. The riding track fitting device 400 of the embodiment comprises a track data cleaning module 401, a road network data recalling module 402 and a model building module 403. The track data cleaning module 401 is used for cleaning track data; the road network data recall module 402 is configured to recall corresponding road network data according to the cleaned track data; the model building module 403 is configured to input the cleaned trajectory data and the road network data that is recalled correspondingly, so as to build a map matching model; the map matching module is used for outputting road information of roads contained in the fitting track.
In some examples, the trajectory data cleansing module 401 cleanses the abnormal riding trajectory points according to whether or not the direction angles formed by the continuous trajectory points are abnormal. Considering that a large number of positioning drift points usually exist in the existing track data, abnormal points are removed according to continuous abnormal angle changes, and therefore the track data are cleaned. The track data cleaning module 401 mainly performs the following data cleaning process:
firstly, points with abnormal angles of direction angles formed by the front and rear adjacent track points are screened out as suspected abnormal points, and a suspected abnormal point array is formed. Specifically, the angle of a direction angle formed by the current track point and the front and rear continuous track points is calculated; if the direction angle is smaller than the preset angle threshold, the current track point is considered as a suspected abnormal point; otherwise, the current trace point may be considered to be a normal point. Taking the continuous track points p1, p2 and p3 as an example, the direction angle between the connecting line of p1 and p2 and the connecting line of p2 and p3 is calculated, and if the angle is less than 40 degrees, the track point p2 is considered as a suspected abnormal point. And continuously calculating the angle formed by the subsequent track points based on the same calculation principle, for example, the direction angle formed by the continuous track points p2, p3 and p4, and if the angle is less than 40 degrees, the track point p3 is considered to be a suspected abnormal point. And placing the suspected abnormal points p2 and p3 into a suspected point array, continuously observing backwards, and if the suspected abnormal points exist, placing the suspected abnormal points into the suspected point array.
Secondly, converting the suspected abnormal point array into a corresponding two-dimensional array; the two-dimensional array is composed of a plurality of one-dimensional arrays, and the one-dimensional arrays comprise a first-class one-dimensional array composed of continuous track points in the suspected abnormal point array and a second-class one-dimensional array formed by isolated track points in the suspected abnormal point array. Taking a suspected abnormal point array [10,11,12,15,16,19] as an example, the continuous track points 10,11,12 in the array can form a first-class one-dimensional array, the continuous track points 15,16 can also form a first-class one-dimensional array, and the isolated track point 19 is a second-class one-dimensional array, so that the two-dimensional array can be converted into a corresponding two-dimensional array as follows: [[10,11,12],[15,16],[19]].
And finally, reserving track points in the second type one-dimensional array and the first track point in the first type one-dimensional array, and eliminating other track points to clean the track points abnormal in riding. Taking the above-mentioned suspected abnormal point array [10,11,12,15,16,19] as an example, after converting into the corresponding two-dimensional array [10,11,12], [15,16], [19], in the one-dimensional array [10,11,12], the trace point 10 is retained, and the trace point 11 and the trace point 12 are removed as abnormal points; in the one-dimensional arrays [15,16], keeping track points 15, and removing the track points 16 as abnormal points; in the one-dimensional array [19], the trace points 19 are retained. Therefore, the abnormal riding track point cleaning work is completed.
Fig. 2A and 2B can be referred to for comparison of effects before and after cleaning of the trajectory data, where fig. 2A shows an effect diagram before cleaning of the trajectory data, and fig. 2B shows an effect diagram after cleaning of the trajectory data. After comparison, the track before the track data is cleaned has more disordered points, so that the disordered redundancy of the track route is not clear enough; the track after the track data cleaning removes the cluttered points, and the estimated route is very clear and definite.
In some examples, the road network data recall module 402 interpolates sampling points at preset intervals between adjacent riding track points during the process of recalling the road network data, so that the distance between the adjacent points does not exceed the grid side length of the located road network, and recalls all the road network data in the located road network. Taking a geohash7 grid as an example, a geohash7 grid has a side length of 152m, and since the interval between adjacent points of the track data is likely to exceed 152m, in order to recall all the road network data, sampling points may be interpolated at preset intervals between two adjacent track points (for example, a sampling point is interpolated at every 100m between adjacent points), so that all the road network data in the geohash7 grid where the track points are located may be recalled. It should be understood that interpolation sampling may be implemented by those skilled in the art using a mean sampling method, a discrete distribution sampling method, a BOX-Muller sampling method, or a gibbs sampling method, and the present embodiment is not limited thereto. In some examples, model building module 403 specifically includes the following modules: the system comprises a shortest path table module, a candidate point integration module, an optimal track module and a road information module. The shortest path table module is used for calculating a shortest path table for inquiring the shortest path value between two points; the candidate point set module is used for constructing a candidate point set of the track points; the optimal track module is used for deducing an optimal track based on the constructed candidate point set; and the road information module is used for constructing complete road information according to the optimal track.
The shortest path table module is used for accelerating the speed of a map matching model, traversing the starting points of all paragraphs in the road network data before constructing the model, calculating the shortest path from the starting point pi of a certain road section in the path to a certain point pj of another path by using a shortest path algorithm, and storing the result of the shortest path calculation into the shortest path table by using a hash key value pair method. The shortest path refers to a path from a certain vertex to another vertex along an edge of the graph, and the sum of weights on each edge is the smallest; the shortest path algorithm related to the present embodiment includes, but is not limited to, a dijkstra algorithm, a Bellman-Ford algorithm, a Floyd algorithm, an SPFA algorithm, and the like.
The method for constructing the candidate point set of the track points by the candidate point set module comprises the following steps: given a track observation point p, searching a road set with the track observation point p as a circle center and r as a radius based on a k-nearest neighbor algorithm to construct a candidate point set of the track observation point p. The K-nearest neighbor (KNN) classification algorithm is a machine learning algorithm, and the principle is that in a feature space, if most of K nearest (i.e., nearest neighbors in the feature space) samples near a sample belong to a certain class, the sample also belongs to the class.
For ease of understanding, reference is now made to FIG. 3: the edge e is a candidate edge of the GPS track observation point p, and the vehicle position is positioned as a projection point of the point p on the edge e
Figure BDA0002653125990000111
Figure BDA0002653125990000112
Is a candidate point C of p points n λ represents a point
Figure BDA0002653125990000113
The offset distance to the starting point of the road section, the length of the side e, the longitude and latitude of the polygon are represented as geom, the starting point is s (source), and the end point is t (target). The edge e may be denoted as e ═ e (eid, s, t, geom, L), where eid is the unique identification of the edge e. Giving a point p, searching a road set with p as a circle center and r as a radius by k neighbors, and constructing a candidate point set CS (p) ═ KNN (p) of p k,r
The step of the optimal trajectory module deducing the optimal trajectory mainly comprises the step of deducing the optimal trajectory from the current candidate point C n To the next candidate point C n+1 Transition probability tp (C) n ,C n+1 ) A certain GPS point to a candidate point C n Emission probability C of n Calculation of ep and the objective function to be optimized. Where transition probability tp (C) n ,C n+1 ) The calculation of (A) requires first calculating the slave C n To C n+1 The shortest distance of (c).
From C n To C n+1 The shortest distance of
Figure BDA0002653125990000121
The formula of (c) is shown as follows:
Figure BDA0002653125990000122
wherein the content of the first and second substances,
Figure BDA0002653125990000123
representing a point C looked up from said shortest path table n. e.t to point C n+1. e.s, respectively.
Transition probability tp (C) n ,C n+1 ) The formula of (c) is shown as follows:
Figure BDA0002653125990000124
emission probability C n Ep is calculated assuming that the GPS points obey a Gaussian distribution with a mean value of 0 based on the true position of the vehicle, the invention defines a candidate point C n The distribution of the emission probability is shown as follows:
Figure BDA0002653125990000125
wherein, the standard deviation sigma represents the error between the GPS real value and the GPS observation value.
In this embodiment, a trace is regarded as a transition graph, and each node in the graph represents a candidate node C n Each edge represents a candidate node C n To C n+1 And defining each candidate edge as a candidate point C n The edge is located, and the score of each candidate edge is defined as:
Figure BDA0002653125990000126
wherein tp (C) n ,C n+1 ) To transition probabilities, C n Ep is the transmission probability.
Obtaining the highest score of the whole track by using a dynamic programming algorithm, and correspondingly obtaining the optimal candidate point and the optimal candidate edge of each GPS observation point when the score is highest
Figure BDA0002653125990000127
The optimal track can be obtained by corresponding
Figure BDA0002653125990000131
The dynamic programming algorithm is used for solving a problem with certain optimal property, a plurality of feasible solutions may exist in the problem, each solution corresponds to one value, and the solution with the optimal value is found through the dynamic programming algorithm; the basic idea is to decompose the problem to be solved into a plurality of sub-problems, solve the sub-problems first, and then obtain the solution of the original problem from the solutions of the sub-problems. The dynamic programming algorithm may be, for example, a viterbi algorithm, which is not limited in this embodiment.
The road information constructed by the road information module includes but is not limited to: latitude and longitude information, geometric shape information, road network grade information, and the like. In particular, the optimum trajectory O is obtained path Later, complete road information C needs to be constructed path . Complete road information C path The construction method comprises continuously accessing shortest paths between edges in the shortest path table, and connecting the shortest paths to obtain the final product
Figure BDA0002653125990000132
Wherein the shortest path
Figure BDA0002653125990000133
The query for information may be found in a shortest path table. Thus, the complete road information C is obtained path
Therefore, the riding track fitting device based on the road network and the track data provided by the embodiment fits the riding track of the user by cleaning the track data of the software at the user end and the track data of the hardware at the vehicle end and combining the road network information, so that more extreme positioning service is displayed, and better riding experience is brought to the user. Important technical support is provided for end point positioning fitting and the like of the vehicle.
It should be noted that the riding track fitting device based on the road network and the track data in this embodiment is similar to the implementation of the riding track fitting method based on the road network and the track data in the previous embodiment, and is not described again.
It should be understood that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. And these modules can be realized in the form of software called by processing element; or can be implemented in the form of hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the model building module may be a processing element that is separately installed, or may be implemented by being integrated into a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and a processing element of the apparatus calls and executes the functions of the model building module. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Example three:
fig. 5 is a schematic structural diagram of an electronic terminal according to an embodiment of the present invention. The electronic terminal of the embodiment includes: a processor 51, a memory 52, a communicator 53; the memory 52 is connected with the processor 51 and the communicator 53 through a system bus and completes mutual communication, the memory 52 is used for storing computer programs, the communicator 53 is used for communicating with other devices, and the processor 71 is used for running the computer programs, so that the electronic terminal executes the steps of the riding track fitting method based on the road network and the track data.
The above-mentioned system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The Memory may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
Example four:
the present embodiment provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the road network and trajectory data based riding trajectory fitting method.
Those of ordinary skill in the art will understand that: in the embodiments provided herein, the computer-readable and writable storage medium may include read-only memory, random-access memory, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, a USB flash drive, a removable hard disk, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable-writable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but are intended to be non-transitory, tangible storage media. Disk and disc, as used in this application, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
In summary, the invention provides a track fitting method, a device, a terminal and a medium based on a road network and track data. Important technical support is provided for end point positioning fitting and the like of the vehicle. Therefore, the application effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (9)

1. A riding track fitting method based on road network and track data is characterized by comprising the following steps:
cleaning track data; the track data comprises hardware track point data and software track point data; the hardware track point data comprises track point data generated in the moving process of the vehicle; the software track point data comprises track point data generated by the mobile terminal; the cleaning trajectory data includes: whether direction angle according to continuous track point formation comes unusual track point of riding of washing unusual, include: screening out points with abnormal angles with direction angles formed by the front and rear adjacent track points as suspected abnormal points, and forming a suspected abnormal point array; converting the suspected abnormal point array into a corresponding two-dimensional array; the two-dimensional array is composed of a plurality of one-dimensional arrays, and the one-dimensional arrays comprise a first one-dimensional array composed of continuous track points in the suspected abnormal point array and a second one-dimensional array formed by isolated track points in the suspected abnormal point array; reserving track points in the second type of one-dimensional array and the first track point in the first type of one-dimensional array, and removing other track points to clean the track points of abnormal riding;
Recalling corresponding road network data according to the cleaned track data;
inputting the cleaned track data and the road network data corresponding to the recall to construct a map matching model; the map matching module is used for outputting road information of roads contained in the fitting track.
2. The riding track fitting method according to claim 1, wherein the step of screening out points with abnormal angles of direction angles formed by the front and rear adjacent track points as suspected abnormal points comprises the steps of:
calculating the angle of a direction angle formed by the current track point and the front and rear continuous track points;
and screening out the current track points with the direction angles smaller than the preset angle threshold value as suspected abnormal points.
3. The riding track fitting method of claim 1, wherein the recalling the corresponding road network data according to the cleaned track data comprises: and interpolating sampling points at preset intervals between adjacent riding track points so that the distance between the adjacent points does not exceed the side length of the grid of the road network, and recalling all road network data in the road network.
4. The riding track fitting method of claim 1, wherein the map matching model is constructed in a manner comprising:
Calculating a shortest path table for inquiring the shortest path value between two points and constructing a candidate point set of the track points;
inferring an optimal trajectory based on the shortest path table and a set of candidate points;
and constructing complete road information according to the optimal track.
5. The riding track fitting method of claim 4, wherein the manner of inferring an optimal track based on the shortest path table and the set of candidate points comprises:
calculating a transition probability from a current candidate point to a next candidate point; the transition probability is calculated according to the shortest distance from the current candidate point to the next candidate point; the shortest distance from the current candidate point to the next candidate point is calculated based on the shortest path table;
calculating the emission probability of the current candidate point;
calculating score data of each candidate edge in the track according to the transition probability and the emission probability;
calculating to obtain the highest score of the whole track by using a dynamic programming algorithm based on the score data of each candidate edge, and correspondingly obtaining the optimal candidate point and the optimal candidate edge of each observation point when the score is highest;
and obtaining an optimal track according to the optimal candidate point and the optimal candidate edge of each observation point.
6. The utility model provides a track fitting device rides based on road network and trajectory data which characterized in that includes:
the track data cleaning module is used for cleaning track data; the track data comprises hardware track point data and software track point data; the hardware track point data comprises track point data generated in the moving process of the vehicle; the software track point data comprises track point data generated by the mobile terminal; the cleaning trajectory data includes: whether direction angle according to continuous track point formation comes unusual track point of riding of washing unusual, include: screening out points with abnormal angles with direction angles formed by the front and rear adjacent track points as suspected abnormal points, and forming a suspected abnormal point array; converting the suspected abnormal point array into a corresponding two-dimensional array; the two-dimensional array is composed of a plurality of one-dimensional arrays, and the one-dimensional arrays comprise a first one-dimensional array composed of continuous track points in the suspected abnormal point array and a second one-dimensional array formed by isolated track points in the suspected abnormal point array; reserving track points in the second type of one-dimensional array and the first track point in the first type of one-dimensional array, and removing other track points to clean the track points of abnormal riding;
The road network data recall module is used for recalling the corresponding road network data according to the cleaned track data;
the model building module is used for inputting the cleaned track data and the road network data corresponding to the recalls so as to build a map matching model; the map matching module is used for outputting road information of roads contained in the fitting track.
7. The riding track fitting apparatus of claim 6, wherein the model building module comprises:
the shortest path table module is used for calculating a shortest path table for inquiring the shortest path value between two points;
the candidate point collection module is used for constructing a candidate point collection of the track points;
an optimal trajectory module for inferring an optimal trajectory based on the constructed set of candidate points;
and the road information module is used for constructing complete road information according to the optimal track.
8. A computer readable storage medium having stored thereon a computer program, wherein said computer program when executed by a processor implements the method of road network and trajectory data based ride trajectory fitting of any of claims 1 to 5.
9. An electronic terminal, comprising: a processor and a memory;
The memory is used for storing a computer program;
the processor is used for executing the computer program stored in the memory to enable the terminal to execute the riding track fitting method based on the road network and the track data according to any one of claims 1 to 5.
CN202010877736.2A 2020-08-27 2020-08-27 Track fitting method, device, terminal and medium based on road network and track data Active CN112013856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010877736.2A CN112013856B (en) 2020-08-27 2020-08-27 Track fitting method, device, terminal and medium based on road network and track data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010877736.2A CN112013856B (en) 2020-08-27 2020-08-27 Track fitting method, device, terminal and medium based on road network and track data

Publications (2)

Publication Number Publication Date
CN112013856A CN112013856A (en) 2020-12-01
CN112013856B true CN112013856B (en) 2022-07-29

Family

ID=73504084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010877736.2A Active CN112013856B (en) 2020-08-27 2020-08-27 Track fitting method, device, terminal and medium based on road network and track data

Country Status (1)

Country Link
CN (1) CN112013856B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113485997B (en) * 2021-07-27 2023-10-31 中南大学 Trajectory data deviation rectifying method based on probability distribution deviation estimation

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106595680A (en) * 2016-12-15 2017-04-26 福州大学 Vehicle GPS data map matching method based on hidden markov model
CN110375753B (en) * 2019-07-04 2022-04-29 丰图科技(深圳)有限公司 Map matching method, device, server and storage medium
CN110260870B (en) * 2019-07-18 2021-03-12 北京百度网讯科技有限公司 Map matching method, device, equipment and medium based on hidden Markov model
CN111024098A (en) * 2019-12-27 2020-04-17 江苏欣网视讯软件技术有限公司 Motor vehicle path fitting algorithm based on low-sampling data
CN111343585B (en) * 2020-02-28 2021-11-02 重庆邮电大学 Mobile user track map matching method based on hidden Markov model

Also Published As

Publication number Publication date
CN112013856A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
Dai et al. Path cost distribution estimation using trajectory data
EP2252949B1 (en) Efficient stream sharing for multi-user sensor data collection
CN110008413B (en) Traffic travel problem query method and device
Jan et al. An $\bm {O (n\log n)} $ Shortest Path Algorithm Based on Delaunay Triangulation
WO2015078238A1 (en) Dispatching map matching tasks by cluster server in internet of vehicles
CN108513676A (en) A kind of road conditions recognition methods, device and equipment
JP2023500883A (en) Cold chain delivery route determination method, device, server and storage medium
CN109033340A (en) A kind of searching method and device of the point cloud K neighborhood based on Spark platform
CN112013856B (en) Track fitting method, device, terminal and medium based on road network and track data
CN108280463B (en) Optimization method and device for double-layer path of vehicle-mounted unmanned aerial vehicle
CN112902970A (en) Routing inspection path planning method and routing inspection robot
Mattheis et al. Putting the car on the map: a scalable map matching system for the open source community
Bock et al. Combining Traveling Salesman and Traveling Repairman Problems: A multi-objective approach based on multiple scenarios
CN114579683A (en) Map network updating method and device, computer equipment and storage medium
CN113050660B (en) Error compensation method, error compensation device, computer equipment and storage medium
US10853370B2 (en) Devices and/or methods to provide a query response based on ephemeral data
Cho et al. A basis of spatial big data analysis with map-matching system
Graafland et al. The probabilistic backbone of data-driven complex networks: an example in climate
CN110597248B (en) Park unmanned intelligent inspection method, device, equipment and storage medium
CN107679107A (en) A kind of grid equipment accessibility querying method and system based on chart database
Zhang et al. Toward Large-Scale Graph-Based Traffic Forecasting: A Data-Driven Network Partitioning Approach
Toader et al. A new modelling framework over temporal graphs for collaborative mobility recommendation systems
CN113836681B (en) Power grid single line diagram layout method and device
CN112256811B (en) Map information representation method and device based on map structure
CN113108806A (en) Path planning method, device, equipment and 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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Room 501, building 1, No. 898 Xiuwen Road, Minhang District, Shanghai, 201199

Patentee after: Shanghai Halo Pratt&Whitney Technology Co.,Ltd.

Address before: Room 501, building 1, No. 898 Xiuwen Road, Minhang District, Shanghai, 201199

Patentee before: SHANGHAI JUNZHENG NETWORK TECHNOLOGY Co.,Ltd.