CN110288044B - Trajectory simplification method based on trajectory division and priority queue - Google Patents

Trajectory simplification method based on trajectory division and priority queue Download PDF

Info

Publication number
CN110288044B
CN110288044B CN201910586296.2A CN201910586296A CN110288044B CN 110288044 B CN110288044 B CN 110288044B CN 201910586296 A CN201910586296 A CN 201910586296A CN 110288044 B CN110288044 B CN 110288044B
Authority
CN
China
Prior art keywords
track
point
original
priority
trajectory
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
CN201910586296.2A
Other languages
Chinese (zh)
Other versions
CN110288044A (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 Maritime University
Original Assignee
Shanghai Maritime University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Maritime University filed Critical Shanghai Maritime University
Priority to CN201910586296.2A priority Critical patent/CN110288044B/en
Publication of CN110288044A publication Critical patent/CN110288044A/en
Application granted granted Critical
Publication of CN110288044B publication Critical patent/CN110288044B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Train Traffic Observation, Control, And Security (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a track simplifying method based on track division and priority queue, comprising the following steps: s1, calculating the average speed of the track segment of the original track to obtain the average speed of the whole track; s2, clustering and dividing the average speed of the whole track to generate a class name and speed range table; s3, calibrating the track section in the original track to form a track section set consisting of labels; s4, dividing the calibrated track segment set into sub tracks until the result meets a preset threshold value; s5, generating a simplification rate and tolerance based on the divided sub-tracks; s6, transmitting the parameters and the sub-track segments into a track simplification algorithm based on a priority queue together for simplification processing; and S7, combining the simplified results of each sub track. The invention avoids the problem of performance attenuation of the original algorithm on a larger track set, and meanwhile, the algorithm has better performance in the aspects of space error and synchronous Euclidean distance error and has very high practical value.

Description

Trajectory simplification method based on trajectory division and priority queue
Technical Field
The invention relates to the technical field of mobile computing, in particular to a track simplifying method based on track division and priority queues.
Background
In 2019, the Baselina congress goes to the headquarters telecommunications (Etisalat) of the Arabic headquarters, and the Haodcast thousand gold directly signs the national level 5G deployment bill. The Japan Soft Bank (Softbank)) Future Stride laboratory realizes the single-person driving of three-train marshalling, and fully shows the advantages of 5G communication. The 5G communication has the characteristics of high speed and low time delay. These characteristics play an important role in unmanned driving and the like. However, both 5G and conventional satellite communications are costly. The general sampling method is to install a sensor on a moving object and to transmit position information and time information of a target within a certain time by using an existing satellite or a ground base station in cooperation with an electronic map technology and the like. Due to technical constraints, the obtained location and time information is discrete. And the accurate track has a high sampling rate (one sampling point every 5 seconds), so that a track data set is huge, and great difficulty is brought to the aspects of transmission, storage, analysis, effective information mining and the like of the track data. Therefore, it is necessary to simplify the raw trajectory data given the error.
Storage and mining analysis of moving object trajectory data are important issues in the field of mobile computing. The method is widely applied to automatic driving and intelligent transportation. Among them, the simplification of the trajectory of a moving object is an important component in this technical field. Although a great many trajectory reduction algorithms have been proposed, these algorithms have certain limitations. One of the classical trajectory reduction algorithms is the SQUISH algorithm. The algorithm SQUISH is as follows:
inputting: original trajectory TrawPriority queue size;
and (3) outputting: simplified trajectory Tsim
1. Initializing a priority queue Buffer with the length of size, and simultaneously recording points and weights;
2、forPiin Trawtraverse the entire original trajectory;
3. will PiPress in the last point of Buffer and set pi (P)i)=∞//π(Pj) Redundancy of the trace points and weight.
4、π(Pi-1)=sed(Pi-2Pi-1Pi) V/assigning the penultimate point in the buffer as the initial value of the point to its predecessor successor
// the synchronous euclidean distance of the dot formation;
5. if len (Buffer) > size: v/buffer full, len () is the length of the sequence;
6. find out pi (P)j)0 < j < size minimum;
7、del(Pj);
8. will pi (P)j) The value 0 < j < size is added directly to pi (pred (P)j))andπ(succ(Pj));
9、returnTsim=Buffer;
The SQUISH algorithm is an online algorithm, and points in the track are input one by one in real time. Also required to be input is a buffer (priority queue size) size, and this buffer is called a priority queue. Initially, all the collected trace points are stored in the buffer until the buffer is full. Once the amount of data exceeds the buffer, storing any one point in the buffer requires deleting an existing point in the buffer. The selected deleted points are points that contain little or no "information". I.e. points where the information is highly redundant. The original priority queue based trajectory compression algorithm increases the priority of its neighbors when a point is removed from the priority queue. This approach is a good approximation. Statistically, a motion trajectory can be considered as a markov chain, so that a point is affected only by its predecessors and only by its successors. However, the actual situation is far more complex than the hypothetical situation, and as more and more points are removed from the buffer, error propagation inevitably occurs. The algorithm deficiency is also quite evident. Too coarse of a redundancy allocation results in a systematic error that continues to accumulate. The performance of the algorithm may be quite poor at higher reduction ratios in actual use. One more significant problem is that the simplified algorithm generally allows the user to define the tolerance range by himself, so as to give the final result an instructive error range, but the algorithm does not. The common use habit is not met, so that the degree of freedom of the user is relatively low.
In order to solve the problems of error accumulation possibly occurring in the original trajectory compression algorithm based on the priority queue, performance sharp attenuation possibly occurring when a higher simplification rate or a larger trajectory is faced, lack of tolerance specification with guiding significance and low degree of freedom of a user, the development of a trajectory simplification algorithm based on trajectory division and the priority queue is actually necessary.
Disclosure of Invention
The invention aims to provide a track simplifying method based on track division and priority queues, which is improved aiming at the defects of SQUISH algorithm. And then, calibrating the track section in the original track according to the table to form a calibrated track, and then dividing the sub-track of the calibrated track according to the classification regression tree. And compressing the divided sub-tracks, and merging to obtain a compression result. The invention adopts a k-means clustering algorithm, a classification regression tree algorithm and self-adaptive parameter generation to obtain a more effective track compression algorithm based on a priority queue.
In order to achieve the purpose, the invention is realized by the following technical scheme:
a track simplification method based on track division and priority queues comprises the following steps:
s1, after the input original track is preprocessed, each track segment in the original track is subjected to an operation of calculating an average speed;
s2, performing cluster division on the average speed of the whole track in the step S1 to generate a class name and speed range table;
s3, based on the class name and speed range table, calibrating the average speed of all track segments in the original track to form a track segment set consisting of labels;
s4, dividing the calibrated track segment set into sub tracks until the kiney index of each divided sub segment meets a preset threshold value;
s5, generating a simplification rate and a corresponding tolerance based on the sub-tracks divided in the step S4;
s6, transmitting the simplification rate and tolerance parameters generated in the step S5 together with the sub-track segment into a track simplification algorithm based on a priority queue for simplification processing;
and S7, combining the simplified results of each sub-track to obtain a final result.
Preferably, in step S1, the preprocessing process includes:
taking the data of the original track as Pi=(xi,yi,ti) Where i denotes the ith track point of the original track, PiSpatial position coordinates, x, representing the ith trace pointi,yiRespectively represent PiThrough the abscissa and ordinate, t, projected onto a two-dimensional planeiA time stamp indicating the time of collection of the coordinate point;
the input original trajectory is represented as:
Figure BDA0002114536700000041
wherein n is the number of track points contained in the track, namely len (T)raw),
Figure BDA0002114536700000042
Refers to a track segment.
Preferably, in step S2, the average speed of each track is:
Figure BDA0002114536700000043
wherein,
Figure BDA0002114536700000044
is a track segment
Figure BDA0002114536700000045
The length of (a) of (b),
Figure BDA0002114536700000046
is a track segment
Figure BDA0002114536700000047
The difference of the timestamps of the first and last points;
the average speed velocity _ tab of all track segments of the whole track is recorded as:
Figure BDA0002114536700000048
preferably, in the step S2, the average speed of all track segments of the whole track is determined
The velocity _ tab adopts a K-means algorithm to perform cluster division, and comprises the following steps:
and (3) traversing numerical values in a certain threshold range, taking the numerical values as K values of the clustering coefficients, respectively calculating the contour coefficients, taking the K value with the minimum contour coefficient as the K value used in actual division, and continuously correcting the result of the K-means algorithm to an optimal solution along with the correction of the K value.
Preferably, in the step S2, according to the class name and speed range table, the average speed velocity _ tab of all track segments of the whole track is marked to generate a table _ tab, so as to form a track segment set composed of tags.
Preferably, in step S4, the dividing the sub-trajectory of the calibrated trajectory segment set by using a classification regression tree method includes: by traversing the whole track, sequentially dividing into two parts at each position based on the track segment set, calculating the change of the Gini indexes before and after division, and selecting the division mode with the largest reduction degree of the Gini indexes as the optimal division mode;
wherein, the calculation formula of the Gini index is as follows:
Figure BDA0002114536700000051
in the formula, TsampleRepresenting an example trajectory; split (i) denotes partitioning at point i; t is1-iRepresenting the locus from 1 st point to the ith point in the locus, Ti-nRepresents the ith point to the second pointA trajectory of n points; gini (T)1-i) And Gini (T)i-n) The kini index of the corresponding track;
the formula (4) is a recursive formula, and the sub-tracks are recursively divided until the kini index of each sub-track segment is smaller than the preset threshold value, and the recursive process is ended.
Preferably, in step S5, based on the sub-tracks divided in step S4, an adaptive parameter reduction rate size is generated according to the minimum description length ruleεAnd tolerance errorε(ii) a Wherein, sizeεNumber of trace points, error, representing a simplified traceεRepresenting the maximum synchronization euclidean distance.
Preferably, the step S5 further includes:
s51, constructing a simplified track, wherein the initial simplified track is a straight line segment formed from a starting point to an end point of the track;
s52, searching a searching point with the maximum synchronous Euclidean distance between the inputted original track and the simplified track, and recording the maximum synchronous Euclidean distance as errorεWherein, the maximum synchronous Euclidean distance notation of the initial value is errormax
S53, adding the search point in the step S52 into a simplified track, and calculating a balance parameter fix:
Figure BDA0002114536700000052
in the formula, sizeεTo simplify the number of trace points of the trace, sizemaxThe number of track points of the input original track is obtained;
s54, traversing the whole original track, recording the minimum value min (fix) of the balance parameter fix, and the corresponding size at the momentεAnd errorεThe parameters are optimized for the generated trajectory.
Preferably, in step S6, the trajectory reduction algorithm based on the priority queue includes the following processes:
s61, initializing, constructing the size of the input parameter as the lengthεThe priority queue of (2) simultaneously storing the locus point and the priority, wherein the priority of the starting point and the ending point of the priority queue is always infinite;
s62, continuously pressing the track points into the priority queue, wherein each time one point is added, the current point becomes a new terminal of the priority queue, and the original terminal takes the synchronous Euclidean distance between the original terminal and a track section formed by two adjacent points as the priority of the original terminal by calculating;
s63, determining whether the priority of the original terminal point calculated in the step S62 is less than the input parameter errorεIf yes, deleting the original end point in the priority queue directly, otherwise, keeping the original end point;
s64, after adding a new point, if the length of the priority queue is larger than the size, searching and deleting the point with the minimum priority in the priority queue, and distributing the priority of the point to the priority of the predecessor point and the successor point according to the inverse proportion of the distance between the predecessor point and the successor point;
s65, repeating the adding points process of the steps S63 and S64 until the end of the input original track is processed;
s66, calculating the synchronous Euclidean distance of each point again for the obtained new priority queue and comparing the calculated synchronous Euclidean distance with the maximum synchronous Euclidean distance errorεComparing, deleting less than errorεThe track formed by the remaining points is the final simplified track.
The step S64 further includes:
for track point Pi、Pj、PkIf delPjAnd i < j < k:
Figure BDA0002114536700000061
Figure BDA0002114536700000062
wherein, pi (P)i) Is PiPriority of (d), pi (P)j) Is PjPriority of (d), pi (P)k) Is PkThe priority of (2);
Figure BDA0002114536700000071
are respectively a track segment
Figure BDA0002114536700000072
Length of (d).
Compared with the prior art, the invention has the beneficial effects that: the initial parameters of the original simplified algorithm are closely connected with mathematical information, namely the size of a priority queue, and the initial parameters can be accurately provided only after a certain experience accumulation by a user; the initial parameter required by the new algorithm of the invention is a threshold value of the kini index, which is a perceptual description of the scattered degree of the track division; the invention can be directly given as long as the track is preliminarily understood; in addition, in the aspect of compressing results, the ATNS algorithm of the invention avoids the problem of performance attenuation of the original algorithm on a larger track set to a certain extent, and meanwhile, the algorithm has better performance in the aspects of space error and synchronous Euclidean distance error; in general, the simplified algorithm based on the track division and the priority queue provided by the invention has a good use effect and high practical value.
Drawings
FIG. 1 is a flow chart of a trajectory simplification method ATNS based on trajectory partition and priority queue according to the present invention;
FIG. 2 is a schematic diagram of the comparison of the running times of the improved Algorithm (ATNS) of the present invention and the original algorithm (SQUISH);
FIG. 3 is a schematic diagram of the comparison of the synchronization Euclidean distance error (SED) difference between the improved Algorithm (ATNS) and the original algorithm (SQUISH) of the present invention;
FIG. 4 is a schematic diagram of the comparison of the spatial error (PED) of the improved Algorithm (ATNS) of the present invention with the original algorithm (SQUISH);
FIG. 5 is a table illustrating class names and speed ranges according to an exemplary embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
The invention discloses a trajectory simplification method ATNS based on trajectory division and priority queue, comprising the following steps:
s1, inputting an original track and a threshold value of the Gini index, and calculating the average speed of track sections of the preprocessed original track;
s2, performing clustering division processing based on a K-means algorithm on the calculation result to generate a class name and speed range table;
s3, calibrating the average speed of the track section in the original track based on the class name and speed range table generated in the step S2 to form a track section set consisting of labels;
s4, for the calibrated track section set, dividing the sub-tracks by adopting a classification regression tree method until the kini index of each divided sub-section meets a preset threshold value;
s5, generating proper parameter size for the sub-track divided in the step S4 according to the minimum description length principleεAnd errorε(ii) a Wherein, sizeεTo simplify the number of trace points (also called the reduction rate) of a trace, errorεIs the maximum synchronization euclidean distance (also called tolerance).
S6, transmitting the parameters generated in the step S5 in a self-adaptive mode and the sub-track segments into a track simplifying algorithm based on a priority queue together for simplifying;
and S7, combining the simplified results of each sub-track to form a result.
In step S1, the data preprocessing includes the following steps:
data of an original track is not always in a uniform form, but for calculation convenience, the algorithm recommends the use of a form Pi=(xi,yi,ti) I denotes the ith key point of the original trajectory, PiSpatial location coordinates, x, representing the ith keypointi,yiRespectively represent PiThrough transverse and longitudinal seats projected on two-dimensional planeMarking; location information xi,yiCan be directly obtained according to geographical knowledge or a specified electronic map; last term tiA time stamp indicating the time of collection of the coordinate point; data acquisition usually originates from a GPS sensor, and the algorithm recommends that zero point is 1 month and 6 days zero in 1980 of world standard time, and later timestamps are accumulated on the zero point, so that a uniform format can be used as the input of the algorithm.
In the step S2, the K-means algorithm (K-means clustering algorithm) specifically includes the following: respectively calculating contour coefficients by traversing numerical values in a certain threshold range (namely the number of possible motion modes such as walking, running, riding and the like in an original track) as the k values of the clustering coefficients, and taking the k value with the minimum contour coefficient as the k value used in actual division (namely the optimal clustering coefficient); and the result of the K-means algorithm is continuously corrected to the optimal solution along with the correction of the K value.
For the input original trajectory TrawCan be expressed as:
Figure BDA0002114536700000081
wherein n is the number of track points contained in the track, namely len (T)raw),
Figure BDA0002114536700000082
Is a track segment; the average velocity of each segment of the trajectory is:
Figure BDA0002114536700000083
wherein,
Figure BDA0002114536700000084
is a track segment
Figure BDA0002114536700000085
The length of (a) of (b),
Figure BDA0002114536700000086
is a track segment
Figure BDA0002114536700000087
The difference of the time stamps of the first and last points.
Then the average velocity for the entire trajectory is:
Figure BDA0002114536700000091
in this embodiment, a clustering method is used for the average speed velocity _ tab of the whole track, and no matter the K-means algorithm or the calculation and optimization of the contour coefficient, the clustering method can be simply and directly realized by using a package of TensorFlow and Python, and after the processing of this step, a table similar to a speed range-class name is generated, such as the table of the speed value and the error threshold shown in FIG. 5; the table is used to mark the coordinate _ tab to generate the table _ tab, which is shaped as (000111333.), namely, the combination of the labels of the track segments, wherein the numbers are all class names.
The algorithm for dividing the sub-track of S4 is specifically:
by traversing the whole trajectory, based on the table _ tab (i.e., the trajectory segment set composed of the labels after passing the calibration in step S3), binary division is sequentially performed at each position, and the change of the kini indexes before and after division is calculated, and the division mode with the largest degree of reduction of the kini indexes is selected as the optimal division mode.
The calculation formula of the kini index is as follows:
Figure BDA0002114536700000092
in the formula, TsampleRepresenting an example trajectory; split (i) is division at point i; t is1-iRepresenting the locus from 1 st point to the ith point in the locus, Ti-nSimilarly, a track formed by the ith point to the nth point is represented; gini (T)1-i) And Gini (T)i-n) The kini index of the corresponding track;
if the above formula (4) is a recursive formula, the sub-tracks are recursively divided until the kini index of each sub-track segment is smaller than a predetermined threshold (i.e., the threshold of the kini index is input at the beginning of the algorithm, and the threshold is a number in the range of 0 to 1 selected for the desired segmentation degree of the original track), and the recursive process is terminated.
In step S5, the adaptive parameter generation step is as follows:
s51, constructing a simplified track; the initial simplified track is a straight line segment formed from a starting point to an end point of the track;
s52, finding the point of the input original track with the maximum synchronous Euclidean distance with the simplified track, and marking the maximum synchronous Euclidean distance as errorε(also called tolerance) in which the maximum synchronization Euclidean distance notation of the initial value is errormax
S65, adding the point searched in the step S52 into the simplified track, and calculating a balance parameter fix:
Figure BDA0002114536700000101
wherein, sizeεTo simplify the number of trace points of the trace, sizemaxThe trace point number of the input original trace.
S54, traversing the whole original track, recording the minimum value min (fix) of the balance parameter fix, and the corresponding size at the momentεAnd errorεThe parameters are optimized for the generated trajectory.
In step S6, the trajectory reduction algorithm based on the priority queue is as follows:
s61, initializing, constructing the size of the input parameter as the lengthεThe priority queue can simultaneously store the track point and the priority, and the priority of the starting point and the ending point of the priority queue is always infinite;
s62, continuously pressing the track points into the priority queue, wherein each time one point is added, the current point becomes a new terminal of the priority queue, and the original terminal takes the synchronous Euclidean distance between the original terminal and a track section formed by two adjacent points as the priority of the original terminal by calculating;
s63, determining whether the priority of the original terminal point calculated in the step S62 is less than the input parameter errorεIf yes, the original end point is directly deleted from the priority queue, otherwise, the end point is reserved.
S64, if the length of the priority queue after adding the new point is larger than the parameter sizeεThe point of minimum priority is found in the priority queue and deleted, and the priority of the point is allocated to the priority of the predecessor point and the successor point according to the inverse proportion of the distance between the predecessor point and the successor point.
In the step S64, the tracing point P is determinedi、Pj、PkIf delPjAnd i < j < k:
Figure BDA0002114536700000111
Figure BDA0002114536700000112
wherein, here pi (P)i) Is PiPriority of (d), pi (P)j) Is PjPriority of (d), pi (P)k) Is PkThe priority of (2);
Figure BDA0002114536700000113
are respectively a track segment
Figure BDA0002114536700000114
Length of (d).
S65, repeating the adding points process of the steps S63 and S64 until the end of the input original track is processed;
s66, calculating the synchronous Euclidean distance and the maximum synchronous Euclidean distance error of each point again for the obtained new priority queueεComparing, deleting less than errorεThe track formed by the remaining points is the final simplified track.
Fig. 2 is a schematic diagram showing the comparison of the running time of the improved Algorithm (ATNS) of the present invention and the original algorithm (SQUISH), with the trace on the abscissa and the running time on the ordinate. It can be seen that the difference is not significant in the order of magnitude of the runtime and it is relatively advantageous to improve the algorithm.
Fig. 3 is a schematic diagram showing a comparison between the synchronization euclidean distance error (SED) of the improved Algorithm (ATNS) and the original algorithm (SQUISH), where the abscissa is the trajectory and the ordinate is the synchronization euclidean distance error. As can be seen, with both algorithms increasing in data set, the error accumulation is also increasing but the improved algorithm performs better.
Fig. 4 is a schematic diagram showing the comparison of the spatial error (PED) of the improved Algorithm (ATNS) of the present invention with the original algorithm (squid), the abscissa is the trajectory and the ordinate is the spatial error. As can be seen, with both algorithms increasing in data set, the error accumulation is also increasing but the improved algorithm performs better.
In conclusion, the ATNS algorithm of the invention avoids the problem of performance attenuation of the original algorithm on a larger track set to a certain extent, and meanwhile, the algorithm has better performance in the aspects of space error and synchronous Euclidean distance error; in general, the simplified algorithm based on the track division and the priority queue provided by the invention has a good use effect and high practical value.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.

Claims (2)

1. A track simplification method based on track division and priority queues is characterized by comprising the following steps:
s1, after the input original track is preprocessed, each track segment in the original track is subjected to an operation of calculating an average speed;
s2, performing cluster division on the average speed of the whole track in the step S1 to generate a class name and speed range table;
s3, based on the class name and speed range table, calibrating the average speed of all track segments in the original track to form a track segment set consisting of labels;
s4, dividing the calibrated track segment set into sub tracks until the kiney index of each divided sub segment meets a preset threshold value;
s5, generating a simplification rate and a corresponding tolerance based on the sub-tracks divided in the step S4;
s6, transmitting the simplification rate and tolerance parameters generated in the step S5 together with the sub-track segment into a track simplification algorithm based on a priority queue for simplification processing;
s7, combining the simplified results of each sub-track to obtain a final result;
in step S1, the preprocessing process includes:
taking the data of the original track as Pi=(xi,yi,ti) Where i denotes the ith track point of the original track, PiSpatial position coordinates, x, representing the ith trace pointi,yiRespectively represent PiThrough the abscissa and ordinate, t, projected onto a two-dimensional planeiA time stamp indicating the time of collection of the coordinate point;
the input original trajectory is represented as:
Figure FDA0003014181720000011
wherein n is the number of track points contained in the track, namely len (T)raw),
Figure FDA0003014181720000012
Refers to a track segment;
in step S2, the average speed of each track is:
Figure FDA0003014181720000013
wherein,
Figure FDA0003014181720000021
is a track segment
Figure FDA0003014181720000022
The length of (a) of (b),
Figure FDA0003014181720000023
is a track segment
Figure FDA0003014181720000024
The difference of the timestamps of the first and last points;
the average speed velocity _ tab of all track segments of the whole track is recorded as:
Figure FDA0003014181720000025
in step S2, performing cluster division on the average speed velocity _ tab of all track segments of the whole track by using a K-means algorithm, where the cluster division includes:
respectively calculating contour coefficients by traversing numerical values in a certain threshold range and taking the numerical values as K values of clustering coefficients, taking the K value with the minimum contour coefficient as the K value used in actual division, and continuously correcting the result of a K-means algorithm to an optimal solution along with the correction of the K value;
in step S2, according to the class name and speed range table, marking the average speed velocity _ tab of all track segments of the whole track to generate a table _ tab, and forming a track segment set composed of tags;
in step S4, the dividing the sub-trajectory from the calibrated trajectory segment set by using a classification regression tree method includes: by traversing the whole track, sequentially dividing into two parts at each position based on the track segment set, calculating the change of the Gini indexes before and after division, and selecting the division mode with the largest reduction degree of the Gini indexes as the optimal division mode;
wherein, the calculation formula of the Gini index is as follows:
Figure FDA0003014181720000026
in the formula, TsampleRepresenting an example trajectory; split (i) denotes partitioning at point i; t is1-iRepresenting the locus from 1 st point to the ith point in the locus, Ti-nRepresenting a track formed by the ith point to the nth point; gini (T)1-i) And Gini (T)i-n) The kini index of the corresponding track;
the formula (4) is a recursive formula, and the sub-tracks are recursively divided until the kini index of each sub-track section is smaller than the preset threshold value, and the recursive process is ended;
in step S5, based on the sub-tracks divided in step S4, an adaptive parameter reduction rate size is generated according to the minimum description length ruleεAnd tolerance errorε(ii) a Wherein, sizeεNumber of trace points, error, representing a simplified traceεRepresenting a maximum synchronization euclidean distance;
the step S5 further includes:
s51, constructing a simplified track, wherein the initial simplified track is a straight line segment formed from a starting point to an end point of the track;
s52, searching a searching point with the maximum synchronous Euclidean distance between the inputted original track and the simplified track, and recording the maximum synchronous Euclidean distance as errorεWherein, the maximum synchronous Euclidean distance notation of the initial value is errormax
S53, adding the search point in the step S52 into a simplified track, and calculating a balance parameter fix:
Figure FDA0003014181720000031
in the formula, sizeεTo simplify the number of trace points of the trace, sizemaxThe number of track points of the input original track is obtained;
s54, traversing the whole original track, recording the minimum value min (fix) of the balance parameter fix, and the corresponding size at the momentεAnd errorεOptimal parameters for the generated trajectory;
in step S6, the trajectory reduction algorithm based on the priority queue includes the following processes:
s61, initializing, constructing the size of the input parameter as the lengthεThe priority queue of (2) simultaneously storing the locus point and the priority, wherein the priority of the starting point and the ending point of the priority queue is always infinite;
s62, continuously pressing the track points into the priority queue, wherein each time one point is added, the current point becomes a new terminal of the priority queue, and the original terminal takes the synchronous Euclidean distance between the original terminal and a track section formed by two adjacent points as the priority of the original terminal by calculating;
s63, determining whether the priority of the original terminal point calculated in the step S62 is less than the input parameter errorεIf yes, deleting the original end point in the priority queue directly, otherwise, keeping the original end point;
s64, after adding new point, if the length of priority queue is larger than sizeεIf so, searching and deleting the point with the minimum priority in the priority queue, and distributing the priority of the point to the priority of the precursor point and the subsequent point according to the inverse proportion of the distance between the precursor point and the subsequent point;
s65, repeating the adding points process of the steps S63 and S64 until the end of the input original track is processed;
s66, calculating the synchronous Euclidean distance of each point again for the obtained new priority queue and comparing the calculated synchronous Euclidean distance with the maximum synchronous Euclidean distance errorεComparing, deleting less than errorεThe track formed by the remaining points is the final simplified track.
2. The trajectory reduction method based on trajectory segmentation and priority queuing of claim 1,
the step S64 further includes:
for track point Pi、Pj、PkIf delPjAnd i < j < k:
Figure FDA0003014181720000041
Figure FDA0003014181720000042
wherein, pi (P)i) Is PiPriority of (d), pi (P)j) Is PjPriority of (d), pi (P)k) Is PkThe priority of (2);
Figure FDA0003014181720000043
are respectively a track segment
Figure FDA0003014181720000044
Length of (d).
CN201910586296.2A 2019-07-01 2019-07-01 Trajectory simplification method based on trajectory division and priority queue Active CN110288044B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910586296.2A CN110288044B (en) 2019-07-01 2019-07-01 Trajectory simplification method based on trajectory division and priority queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910586296.2A CN110288044B (en) 2019-07-01 2019-07-01 Trajectory simplification method based on trajectory division and priority queue

Publications (2)

Publication Number Publication Date
CN110288044A CN110288044A (en) 2019-09-27
CN110288044B true CN110288044B (en) 2021-06-08

Family

ID=68021537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910586296.2A Active CN110288044B (en) 2019-07-01 2019-07-01 Trajectory simplification method based on trajectory division and priority queue

Country Status (1)

Country Link
CN (1) CN110288044B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112668239B (en) * 2020-12-30 2022-11-15 山东交通学院 Hybrid power truck fleet experience teaching method based on counterstudy
CN113052265B (en) * 2021-04-26 2024-04-05 上海海事大学 Moving object track simplifying method based on feature selection
CN115775285B (en) * 2022-12-09 2023-09-15 杭州滨电信息技术有限公司 Client self-adaptive map vector line simplifying method and system based on priority queue
CN117194591B (en) * 2023-06-20 2024-05-31 北京和德宇航技术有限公司 Method, device, equipment and medium for displaying sphere track to plane map
CN117874155B (en) * 2024-01-15 2024-06-11 中国共产党四川省委员会党校、四川行政学院(四川长征干部学院) Moving object track simplifying method based on speed immature random value

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794494A (en) * 2015-04-30 2015-07-22 中国地质大学(武汉) Extensible rapid track clustering method
CN104794295A (en) * 2015-04-28 2015-07-22 上海海事大学 Real-time ship trajectory simplifying method
CN104951655A (en) * 2015-06-08 2015-09-30 浙江大学 Vehicle movement pattern mining method based on frequent pattern tree
CN108931795A (en) * 2018-05-21 2018-12-04 千寻位置网络有限公司 Positioning equipment track optimization and boundary extraction method and device
CN109238271A (en) * 2018-08-23 2019-01-18 中国科学院电子学研究所苏州研究院 A kind of time-based line fitting method
CN109739585A (en) * 2018-12-29 2019-05-10 广西交通科学研究院有限公司 The traffic congestion point discovery method calculated based on spark cluster parallelization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794295A (en) * 2015-04-28 2015-07-22 上海海事大学 Real-time ship trajectory simplifying method
CN104794494A (en) * 2015-04-30 2015-07-22 中国地质大学(武汉) Extensible rapid track clustering method
CN104951655A (en) * 2015-06-08 2015-09-30 浙江大学 Vehicle movement pattern mining method based on frequent pattern tree
CN108931795A (en) * 2018-05-21 2018-12-04 千寻位置网络有限公司 Positioning equipment track optimization and boundary extraction method and device
CN109238271A (en) * 2018-08-23 2019-01-18 中国科学院电子学研究所苏州研究院 A kind of time-based line fitting method
CN109739585A (en) * 2018-12-29 2019-05-10 广西交通科学研究院有限公司 The traffic congestion point discovery method calculated based on spark cluster parallelization

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
Compression of Trajectory Data: A Comprehensive Evaluation and New Approach;Jonathan Muckell等;《Geoinformatica》;20140731;第1-25页 *
Spatiotemporal Compression Techniques for Moving Point Objects;Nirvana Meratnia等;《Advances in Database Technology-EDBT 2004》;20041231;第765-782页 *
SQUISH: An Online Approach for GPS Trajectory Compression;Jonathan Muckell等;《Proceedings of the 2nd International Conference on Computing for Geospatial Research & Applications》;20110531;第1-8页 *
一种基于速度的移动对象轨迹简化算法;杨彪等;《计算机应用研究》;20180930;第35卷(第9期);第2666-2670页 *
基于分段的移动对象轨迹简化算法;张甜等;《计算机应用研究》;20180424;第1-8页 *
基于速度约束的轨迹划分方法;王敏芬;《科技创新与应用》;20131231(第26期);第3-4页 *

Also Published As

Publication number Publication date
CN110288044A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
CN110288044B (en) Trajectory simplification method based on trajectory division and priority queue
CN109270927B (en) Road data generation method and device
US8082263B2 (en) Method, apparatus and system for multimedia model retrieval
CN111242180B (en) Image identification method and system based on lightweight convolutional neural network
CN106919957B (en) Method and device for processing data
CN110335507A (en) Flight operation situation law analytical method based on blank pipe track big data
CN109255042B (en) Real-time picture matching geographic positioning method and system based on large-scale street view data
CN111667693B (en) Method, apparatus, device and medium for determining estimated time of arrival
CN112232341B (en) Text detection method, electronic device and computer readable medium
CN105229625A (en) Obtain the mixing Hash scheme of effective HMM
CN112817943A (en) Multi-threshold ship track simplification method based on dead reckoning method
CN115358412A (en) Asynchronous federal optimization method based on edge auxiliary vehicle network
CN109284409A (en) Picture group geographic positioning based on extensive streetscape data
CN110275972A (en) A kind of case retrieval methods based on content introducing dual training
CN115292962B (en) Path similarity matching method and device based on track rarefaction and storage medium
CN110795519A (en) Markov model and probability statistics-based position prediction method and readable storage medium
CN111595353B (en) Real-time map matching method based on GPU and Spark mixed parallel computing architecture
CN112685531B (en) Vehicle matching method and device, computing device and computer-readable storage medium
CN115334167A (en) Angle threshold self-adaptive track compression method
CN115147432A (en) First arrival picking method based on depth residual semantic segmentation network
CN110475198B (en) Urban road user track deviation correction processing method and device
CN113205118A (en) Map matching method, and method and device for determining map matching model
CN114417946A (en) Target detection method and device
CN113361702A (en) Convolutional neural network pruning, reasoning method, device and computer readable medium
CN114241238B (en) Track data trip mode identification method and device based on improvement PointNet

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