CN115334167B - An Angle Threshold Adaptive Trajectory Compression Method - Google Patents

An Angle Threshold Adaptive Trajectory Compression Method Download PDF

Info

Publication number
CN115334167B
CN115334167B CN202210771945.8A CN202210771945A CN115334167B CN 115334167 B CN115334167 B CN 115334167B CN 202210771945 A CN202210771945 A CN 202210771945A CN 115334167 B CN115334167 B CN 115334167B
Authority
CN
China
Prior art keywords
track
data
point
trajectory
target
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.)
Expired - Fee Related
Application number
CN202210771945.8A
Other languages
Chinese (zh)
Other versions
CN115334167A (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.)
Guangzhou Institute of Technology of Xidian University
Original Assignee
Guangzhou Institute of Technology of Xidian 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 Guangzhou Institute of Technology of Xidian University filed Critical Guangzhou Institute of Technology of Xidian University
Priority to CN202210771945.8A priority Critical patent/CN115334167B/en
Publication of CN115334167A publication Critical patent/CN115334167A/en
Application granted granted Critical
Publication of CN115334167B publication Critical patent/CN115334167B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Instructional Devices (AREA)
  • Traffic Control Systems (AREA)

Abstract

本发明公开了一种角度阈值自适应的轨迹压缩方法,涉及数据压缩技术领域。获取矢量地图数据提取原始道路数据并进行网格划分,得到包含多个网格区域的目标道路数据;对目标道路数据进行网络拓扑分析,统计网格区域内所包含的道路交点数目分配角度阈值;计算原始行驶轨迹中各个轨迹点的偏转角度值,将满足预设条件的轨迹点存入缓存队列,得到缓存行驶轨迹;计算缓存行驶轨迹中各个轨迹点的偏转累积值,根据偏转累积值进行采样和存储,得到目标车辆压缩后的目标行驶轨迹。通过上述方法可以有效地对轨迹数据进行压缩,同时有效地保留车辆转弯的轨迹数据,并根据偏转角度值和偏转累积值进行两次数据压缩,减小轨迹数据量。

Figure 202210771945

The invention discloses an angle threshold adaptive trajectory compression method, which relates to the technical field of data compression. Obtain vector map data to extract the original road data and perform grid division to obtain target road data containing multiple grid areas; perform network topology analysis on the target road data, count the number of road intersections contained in the grid area and assign angle thresholds; Calculate the deflection angle value of each track point in the original driving track, store the track points that meet the preset conditions in the cache queue, and obtain the cached driving track; calculate the deflection cumulative value of each track point in the cached driving track, and sample according to the deflection cumulative value and storage to obtain the compressed target driving trajectory of the target vehicle. The above method can effectively compress the trajectory data, and at the same time effectively retain the trajectory data of the vehicle turning, and perform two data compressions according to the deflection angle value and the deflection cumulative value to reduce the amount of trajectory data.

Figure 202210771945

Description

一种角度阈值自适应的轨迹压缩方法An angle threshold adaptive trajectory compression method

技术领域Technical Field

本发明涉及数据压缩技术领域,具体涉及一种角度阈值自适应的轨迹压缩方法。The invention relates to the technical field of data compression, and in particular to an angle threshold adaptive trajectory compression method.

背景技术Background Art

轨迹数据包含了在一定的时空环境下,一个或者多个移动对象其运动过程中所产生的位置信息、时间信息、速度信息等,这些信息按照时间序列进行排序即构成了移动对象的运动轨迹。例如应用在智能手机上的定位系统可以通过GPS信号或基站信号定位手机所处位置信息进行收集和采样,车辆可以通过车载的定位系统对车辆行驶过程中的轨迹点进行持续采集。这些采集到的轨迹数据按时间排序即可绘制出运动对象在一段时间内的运动轨迹数据,其中包含了丰富的语义信息等。Trajectory data includes the location information, time information, speed information, etc. generated by one or more moving objects during their movement in a certain space-time environment. This information is sorted in time series to form the movement trajectory of the moving object. For example, the positioning system used in smart phones can collect and sample the location information of the mobile phone through GPS signals or base station signals, and the vehicle can continuously collect trajectory points during the vehicle's driving process through the on-board positioning system. These collected trajectory data can be sorted by time to draw the movement trajectory data of the moving object over a period of time, which contains rich semantic information.

随着5G与物联网的发展,配备存储硬件的GPS在各类车辆上得到了广泛使用,因此也产生了海量的轨迹数据。这些应用方便了车辆的位置跟踪、预测和分析,同时也随着轨迹数据重要性的增强,定位设备采集轨迹点的频率也在不断地提高,它们以秒级的速率采集位置信息,这导致了轨迹数据量大、传输与存储代价高昂、数据存在冗余等问题。With the development of 5G and the Internet of Things, GPS equipped with storage hardware has been widely used in various vehicles, thus generating a massive amount of trajectory data. These applications facilitate the tracking, prediction and analysis of vehicle locations. At the same time, as the importance of trajectory data increases, the frequency of tracking points collected by positioning devices is also increasing. They collect location information at a rate of seconds, which leads to problems such as large amounts of trajectory data, high transmission and storage costs, and data redundancy.

发明内容Summary of the invention

本发明的目的就在于解决上述背景技术的问题,而提出一种角度阈值自适应的轨迹压缩方法。The purpose of the present invention is to solve the above-mentioned problems in the background technology and to propose a trajectory compression method with adaptive angle threshold.

本发明的目的可以通过以下技术方案实现:The purpose of the present invention can be achieved through the following technical solutions:

本发明实施例提供了一种角度阈值自适应的轨迹压缩方法,所述方法包括:An embodiment of the present invention provides a trajectory compression method with an angle threshold self-adaptation, the method comprising:

在预设地图库内获取目标车辆当前行驶区域的矢量地图数据,从所述矢量地图数据中提取原始道路数据并进行网格划分,得到包含多个网格区域的目标道路数据;Obtaining vector map data of the current driving area of the target vehicle in a preset map library, extracting original road data from the vector map data and performing grid division to obtain target road data including a plurality of grid areas;

对所述目标道路数据进行网络拓扑分析,针对每一网格区域,统计该网格区域内所包含的道路交点数目,为该网格区域分配角度阈值;Performing a network topology analysis on the target road data, counting the number of road intersections contained in each grid area, and assigning an angle threshold to the grid area;

在所述目标车辆的原始行驶轨迹采集过程中,计算所述原始行驶轨迹中各个轨迹点的偏转角度值,根据各个轨迹点的位置和偏转角度值,将满足预设条件的轨迹点存入缓存队列,得到缓存行驶轨迹;During the acquisition of the original driving trajectory of the target vehicle, the deflection angle value of each trajectory point in the original driving trajectory is calculated, and according to the position and deflection angle value of each trajectory point, the trajectory points that meet the preset conditions are stored in a cache queue to obtain a cached driving trajectory;

计算所述缓存行驶轨迹中各个轨迹点的偏转累积值,根据所述偏转累积值进行采样和存储,得到所述目标车辆压缩后的目标行驶轨迹。The deflection accumulation value of each track point in the cached driving track is calculated, and sampling and storage are performed according to the deflection accumulation value to obtain the compressed target driving track of the target vehicle.

可选地,在预设地图库内获取目标车辆当前行驶区域的矢量地图数据,从所述矢量地图数据中提取原始道路数据并进行网格划分,得到包含多个网格区域的目标道路数据,包括:Optionally, vector map data of the current driving area of the target vehicle is obtained in a preset map library, original road data is extracted from the vector map data and gridded to obtain target road data containing multiple grid areas, including:

使用开源地图OSM地图数据库,获取目标车辆当前行驶城市或行驶区域的矢量地图数据,修改所述矢量地图数据的编码格式为UTF-8编码格式,得到矢量道路数据;Using the open source map OSM map database, obtaining vector map data of the city or area where the target vehicle is currently traveling, modifying the encoding format of the vector map data to the UTF-8 encoding format, and obtaining vector road data;

选取矢量道路数据中的矢量线数据,并根据预设字段属性选取矢量线数据,导出为OSM格式的原始道路数据;Select vector line data from vector road data, select vector line data according to preset field attributes, and export them to original road data in OSM format;

对所述原始道路数据进行栅格化处理,根据所述原始道路数据的图层大小新建栅格,在像元高度和宽度处将矢量地图按照预设尺寸进行网格划分,得到包含多个网格区域的目标道路数据。The original road data is rasterized, a new grid is created according to the layer size of the original road data, and the vector map is gridded according to a preset size at the pixel height and width to obtain target road data containing multiple grid areas.

可选地,所述原始道路数据包括字段属性为primary、secondary、tertiary、motoway、service的矢量线数据中的至少一种。Optionally, the original road data includes at least one of vector line data with field attributes of primary, secondary, tertiary, motoway, and service.

可选地,对所述目标道路数据进行网络拓扑分析,针对每一网格区域,统计该网格区域内所包含的道路交点数目,为该网格区域分配角度阈值,包括:Optionally, a network topology analysis is performed on the target road data, and for each grid area, the number of road intersections contained in the grid area is counted, and an angle threshold is allocated to the grid area, including:

新建所述目标车辆的个人地理数据库,在所述个人地理数据库中建立要素数据集并将所述目标道路数据导入,使用所述要素数据集新建拓扑规则,根据所述拓扑规则去除所述目标道路数据中的悬挂点和重叠数据,得到中间目标道路数据;Create a personal geographic database for the target vehicle, create a feature dataset in the personal geographic database and import the target road data, create a topology rule using the feature dataset, remove hanging points and overlapping data in the target road data according to the topology rule, and obtain intermediate target road data;

使用所述中间目标道路数据建立新的道路数据集得到道路交点数据,针对每一网格区域,根据道路交点数据所在的网格字段的不同,统计该网格区域内所包含的道路交点数目;Using the intermediate target road data to establish a new road data set to obtain road intersection data, for each grid area, according to the different grid fields where the road intersection data is located, counting the number of road intersections contained in the grid area;

针对每一网格区域,计算该网格区域的角度阈值:For each grid area, calculate the angle threshold of the grid area:

Figure BDA0003724523740000031
Figure BDA0003724523740000031

其中,βi为第i个网格区域的角度阈值,ci为第i个网格区域中所包含的道路交点数目,

Figure BDA0003724523740000032
为基于固定角度压缩时角度阈值的取值,l为所述目标道路数据包含的网格区域的数目。Where β i is the angle threshold of the i-th grid area, c i is the number of road intersections contained in the i-th grid area,
Figure BDA0003724523740000032
is the value of the angle threshold when the fixed angle is compressed, and l is the number of grid areas included in the target road data.

可选地,在所述目标车辆的原始行驶轨迹采集过程中,计算所述原始行驶轨迹中各个轨迹点的偏转角度值,根据各个轨迹点的位置和偏转角度值,将满足预设条件的轨迹点存入缓存队列,得到缓存行驶轨迹,包括:Optionally, during the original driving trajectory acquisition process of the target vehicle, the deflection angle value of each trajectory point in the original driving trajectory is calculated, and according to the position and deflection angle value of each trajectory point, the trajectory points that meet the preset conditions are stored in a cache queue to obtain a cache driving trajectory, including:

对所述目标车辆的行驶轨迹数据以预设频率进行采集,得到原始行驶轨迹;The driving trajectory data of the target vehicle is collected at a preset frequency to obtain an original driving trajectory;

针对所述原始行驶轨迹的每一轨迹点,若该轨迹点为所述原始行驶轨迹的起始轨迹点或者结束轨迹点,则将该轨迹点加入到缓存队列中进行缓存;For each trajectory point of the original driving trajectory, if the trajectory point is a starting trajectory point or an ending trajectory point of the original driving trajectory, the trajectory point is added to a cache queue for caching;

针对所述原始行驶轨迹的每一轨迹点,若该轨迹点为所述原始行驶轨迹的中间轨迹点,则计算该中间轨迹点的偏转角度值;For each trajectory point of the original driving trajectory, if the trajectory point is an intermediate trajectory point of the original driving trajectory, calculating the deflection angle value of the intermediate trajectory point;

针对每一中间轨迹点,将该中间轨迹点的偏转角度值与该中间轨迹点所在网格区域对应的角度阈值进行对比,若满足偏转角度值大于角度阈值,则将该中间轨迹点选取为候选点并加入到缓存队列中进行缓存,得到缓存行驶轨迹,否则,将该中间轨迹点暂时保留,在计算完下一个中间轨迹点的角度偏转角度值后丢弃;For each intermediate track point, the deflection angle value of the intermediate track point is compared with the angle threshold corresponding to the grid area where the intermediate track point is located. If the deflection angle value is greater than the angle threshold, the intermediate track point is selected as a candidate point and added to the cache queue for caching to obtain a cached driving trajectory. Otherwise, the intermediate track point is temporarily retained and discarded after calculating the angle deflection angle value of the next intermediate track point.

针对所述原始行驶轨迹的每一轨迹点,若该轨迹点为所述原始行驶轨迹的结束轨迹点,则获取缓存队列中保存的轨迹点,组合得到缓存行驶轨迹。For each trajectory point of the original driving trajectory, if the trajectory point is the end trajectory point of the original driving trajectory, the trajectory points stored in the cache queue are obtained and combined to obtain a cache driving trajectory.

可选地,计算该中间轨迹点的偏转角度值,包括:Optionally, calculating the deflection angle value of the intermediate trajectory point includes:

计算该中间轨迹点Pcur与其前一个轨迹点Ppre和后一个轨迹点Pfol为顶点构成的三角形的边长:Calculate the side length of the triangle formed by the intermediate trajectory point P cur and its previous trajectory point P pre and the next trajectory point P fol as vertices:

Figure BDA0003724523740000041
Figure BDA0003724523740000041

Figure BDA0003724523740000042
Figure BDA0003724523740000042

Figure BDA0003724523740000043
Figure BDA0003724523740000043

其中,

Figure BDA0003724523740000044
Figure BDA0003724523740000045
分别为Ppre和Pcur、Pfol和Pcur以及Ppre和Pfol所构成三角形的边长,Lonpre和Latpre为Ppre的经度和维度;Loncur和Latcur为Pcur的经度和纬度;Lonfol和Latfol为Pfol的经度和纬度;MLoni和MLati代表经过转换的经纬度数据,i为pre,或者i为cur,或者i为fol,经度为东经时取MLoni=Loni,经度范围为西经时取MLati=-Loni,纬度范围为北纬MLoni=90-Loni,纬度范围为南纬时取MLati=90+Lati;in,
Figure BDA0003724523740000044
and
Figure BDA0003724523740000045
are respectively the side lengths of the triangle formed by P pre and P cur , P fol and P cur, and P pre and P fol , Lon pre and Lat pre are the longitude and latitude of P pre ; Lon cur and Lat cur are the longitude and latitude of P cur ; Lon fol and Lat fol are the longitude and latitude of P fol ; MLon i and MLat i represent the converted longitude and latitude data, i is pre, or i is cur, or i is fol, MLon i =Lon i when the longitude is east longitude, MLat i =-Lon i when the longitude range is west longitude, MLon i =90- Lon i when the latitude range is north latitude, and MLat i =90+Lat i when the latitude range is south latitude;

计算Pcur与Ppre和Pfol之间的距离:Calculate the distance between P cur and P pre and P fol :

Figure BDA0003724523740000046
Figure BDA0003724523740000046

Figure BDA0003724523740000047
Figure BDA0003724523740000047

Figure BDA0003724523740000048
Figure BDA0003724523740000048

其中,l1代表Ppre和Pcur的距离;l2代表Pfol和Pcur的距离;l3代表Ppre和Pfol的距离;R代表地球的平均半径,取R=6371.004km;Among them, l 1 represents the distance between P pre and P cur ; l 2 represents the distance between P fol and P cur ; l 3 represents the distance between P pre and P fol ; R represents the average radius of the earth, R = 6371.004 km;

计算Pcur的偏转角度值θkCalculate the deflection angle θ k of P cur :

Figure BDA0003724523740000051
Figure BDA0003724523740000051

可选地,计算所述缓存行驶轨迹中各个轨迹点的偏转累积值,根据所述偏转累积值进行采样和存储,得到所述目标车辆压缩后的目标行驶轨迹,包括:Optionally, calculating the deflection cumulative value of each track point in the cached driving track, sampling and storing according to the deflection cumulative value, and obtaining the compressed target driving track of the target vehicle, comprises:

针对所述缓存行驶轨迹中的每一轨迹点,计算偏转角度值与平角的差值:For each track point in the cached driving track, the difference between the deflection angle value and the straight angle is calculated:

Figure BDA0003724523740000052
Figure BDA0003724523740000052

其中,

Figure BDA0003724523740000053
代表当前点与平角的差值,θk为该轨迹点的偏转角度值;in,
Figure BDA0003724523740000053
represents the difference between the current point and the straight angle, and θ k is the deflection angle value of the trajectory point;

将连续的N个轨迹点的角度差值进行计算并累加:Calculate and accumulate the angle differences of N consecutive trajectory points:

Figure BDA0003724523740000054
Figure BDA0003724523740000054

根据N值确定角度累积阈值

Figure BDA0003724523740000055
Figure BDA0003724523740000056
Figure BDA0003724523740000057
进行比较,若满足
Figure BDA0003724523740000058
则将所述缓存行驶轨迹中的全部轨迹点存储,得到所述目标车辆压缩后的目标行驶轨迹,否则,将所述缓存行驶轨迹中的全部轨迹点进行1/2的等间隔采样,得到所述目标车辆压缩后的目标行驶轨迹。Determine the angle accumulation threshold according to the N value
Figure BDA0003724523740000055
Will
Figure BDA0003724523740000056
and
Figure BDA0003724523740000057
Compare, if satisfied
Figure BDA0003724523740000058
All the trajectory points in the cached driving trajectory are stored to obtain the compressed target driving trajectory of the target vehicle; otherwise, all the trajectory points in the cached driving trajectory are sampled at equal intervals of 1/2 to obtain the compressed target driving trajectory of the target vehicle.

本发明实施例提供了一种角度阈值自适应的轨迹压缩方法,在预设地图库内获取目标车辆当前行驶区域的矢量地图数据,从矢量地图数据中提取原始道路数据并进行网格划分,得到包含多个网格区域的目标道路数据;对目标道路数据进行网络拓扑分析,针对每一网格区域,统计该网格区域内所包含的道路交点数目,为该网格区域分配角度阈值;在目标车辆的原始行驶轨迹采集过程中,计算原始行驶轨迹中各个轨迹点的偏转角度值,根据各个轨迹点的位置和偏转角度值,将满足预设条件的轨迹点存入缓存队列,得到缓存行驶轨迹;计算缓存行驶轨迹中各个轨迹点的偏转累积值,根据偏转累积值进行采样和存储,得到目标车辆压缩后的目标行驶轨迹。通过目标车辆行驶网格区域的道路交点的密集程度动态分配角度阈值,在道路交点数目较小的区域车辆转弯的概率相对偏小,采用更大的角度阈值可以有效地对轨迹数据进行压缩,同时对道路交点数目较多地区域采用较小的角度阈值,可以有效地保留车辆转弯的轨迹数据,保留车辆行驶中的特征轨迹点,并根据偏转角度值和偏转累积值进行两次数据压缩,减小轨迹数据量,解决了传输与存储代价高昂、数据存在冗余等问题。The embodiment of the present invention provides a trajectory compression method with adaptive angle threshold, which obtains vector map data of the current driving area of a target vehicle in a preset map library, extracts original road data from the vector map data and performs grid division to obtain target road data containing multiple grid areas; performs network topology analysis on the target road data, and for each grid area, counts the number of road intersections contained in the grid area, and allocates an angle threshold to the grid area; in the process of collecting the original driving trajectory of the target vehicle, calculates the deflection angle value of each trajectory point in the original driving trajectory, stores the trajectory points that meet the preset conditions into a cache queue according to the position and deflection angle value of each trajectory point, and obtains a cached driving trajectory; calculates the deflection cumulative value of each trajectory point in the cached driving trajectory, samples and stores according to the deflection cumulative value, and obtains the compressed target driving trajectory of the target vehicle. The angle threshold is dynamically allocated according to the density of road intersections in the target vehicle driving grid area. In areas with a small number of road intersections, the probability of vehicle turning is relatively small. Using a larger angle threshold can effectively compress the trajectory data. At the same time, using a smaller angle threshold in areas with a large number of road intersections can effectively retain the trajectory data of vehicle turns and the characteristic trajectory points of the vehicle during driving. Data compression is performed twice according to the deflection angle value and the deflection cumulative value to reduce the amount of trajectory data and solve the problems of high transmission and storage costs and data redundancy.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

下面结合附图对本发明作进一步的说明。The present invention will be further described below in conjunction with the accompanying drawings.

图1为本发明实施例提供的一种角度阈值自适应的轨迹压缩方法的流程图;FIG1 is a flow chart of a trajectory compression method with adaptive angle threshold provided by an embodiment of the present invention;

图2为本发明实施例提供的另一种角度阈值自适应的轨迹压缩方法的流程图;FIG2 is a flow chart of another angle threshold adaptive trajectory compression method provided by an embodiment of the present invention;

图3为本发明实施例提供的轨迹压缩方法和基于DP改进的轨迹压缩方法的仿真图;FIG3 is a simulation diagram of a trajectory compression method provided by an embodiment of the present invention and a trajectory compression method improved based on DP;

图4为本发明实施例提供的轨迹压缩方法和不引入缓存队列的轨迹压缩方法的仿真图。FIG. 4 is a simulation diagram of a trajectory compression method provided by an embodiment of the present invention and a trajectory compression method without introducing a cache queue.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

本发明实施例提供了一种角度阈值自适应的轨迹压缩方法。参见图1,图1为本发明实施例提供的一种角度阈值自适应的轨迹压缩方法的流程图。该方法可以包括以下步骤:The embodiment of the present invention provides a trajectory compression method with an angle threshold adaptive. Referring to FIG1 , FIG1 is a flow chart of a trajectory compression method with an angle threshold adaptive provided by an embodiment of the present invention. The method may include the following steps:

S101,在预设地图库内获取目标车辆当前行驶区域的矢量地图数据,从矢量地图数据中提取原始道路数据并进行网格划分,得到包含多个网格区域的目标道路数据。S101, obtaining vector map data of a current driving area of a target vehicle in a preset map library, extracting original road data from the vector map data and performing grid division to obtain target road data including a plurality of grid areas.

S102,对目标道路数据进行网络拓扑分析,针对每一网格区域,统计该网格区域内所包含的道路交点数目,为该网格区域分配角度阈值。S102, performing network topology analysis on the target road data, counting the number of road intersections contained in each grid area, and assigning an angle threshold to the grid area.

S103,在目标车辆的原始行驶轨迹采集过程中,计算原始行驶轨迹中各个轨迹点的偏转角度值,根据各个轨迹点的位置和偏转角度值,将满足预设条件的轨迹点存入缓存队列,得到缓存行驶轨迹。S103, during the collection of the original driving trajectory of the target vehicle, the deflection angle value of each trajectory point in the original driving trajectory is calculated, and according to the position and deflection angle value of each trajectory point, the trajectory points that meet the preset conditions are stored in a cache queue to obtain a cached driving trajectory.

S104,计算缓存行驶轨迹中各个轨迹点的偏转累积值,根据偏转累积值进行采样和存储,得到目标车辆压缩后的目标行驶轨迹。S104, calculating the deflection cumulative value of each track point in the cached driving track, sampling and storing according to the deflection cumulative value, and obtaining a compressed target driving track of the target vehicle.

基于本发明实施例提供的一种角度阈值自适应的轨迹压缩方法,通过目标车辆行驶网格区域的道路交点的密集程度动态分配角度阈值,在道路交点数目较小的区域车辆转弯的概率相对偏小,采用更大的角度阈值可以有效地对轨迹数据进行压缩,同时对道路交点数目较多地区域采用较小的角度阈值,可以有效地保留车辆转弯的轨迹数据,保留车辆行驶中的特征轨迹点,并根据偏转角度值和偏转累积值进行两次数据压缩,减小轨迹数据量,解决了传输与存储代价高昂、数据存在冗余等问题。An angle threshold adaptive trajectory compression method provided by an embodiment of the present invention dynamically allocates an angle threshold according to the density of road intersections in a target vehicle driving grid area. In an area with a small number of road intersections, the probability of a vehicle turning is relatively small. A larger angle threshold can be used to effectively compress trajectory data. At the same time, a smaller angle threshold is used for an area with a large number of road intersections, which can effectively retain the trajectory data of vehicle turns and the characteristic trajectory points of the vehicle during driving. The data is compressed twice according to the deflection angle value and the deflection cumulative value, thereby reducing the amount of trajectory data and solving the problems of high transmission and storage costs and data redundancy.

一种实现方式中,预设地图库可以使用自行开发的地图库,或者,使用现有的开源地图库。In one implementation, the preset map library may use a self-developed map library, or use an existing open source map library.

一种实现方式中,当前网格区域道路交点的密集程度,决定了在网格区域内车辆可能转弯行驶的概率,在道路交点数目较小的区域车辆转弯的概率相对偏小,其连续的N个采样点形成的轨迹更可能趋于直线,可以为该网格区域分配更大的角度阈值,进而可以减少该网格区域内缓存行驶轨迹中的轨迹点,最终减小目标行驶轨迹的数据量。同时对道路交点数目较多的网格区域,在该网格区域内车辆转弯行驶的概率更大,采用较小的角度阈值,可以有效地保留车辆转弯的轨迹数据,保留车辆行驶中的特征轨迹点。In one implementation, the density of the road intersections in the current grid area determines the probability that the vehicle may turn in the grid area. In areas with a small number of road intersections, the probability of a vehicle turning is relatively small, and the trajectory formed by its N consecutive sampling points is more likely to be a straight line. A larger angle threshold can be assigned to the grid area, thereby reducing the number of trajectory points in the cached driving trajectory in the grid area, and ultimately reducing the amount of data on the target driving trajectory. At the same time, for grid areas with a large number of road intersections, the probability of a vehicle turning in the grid area is greater. Using a smaller angle threshold can effectively retain the trajectory data of the vehicle turning and retain the characteristic trajectory points of the vehicle during driving.

一种实现方式中,在对数据压缩过程中,一次仅需要对缓存队列中的缓存行驶轨迹进行处理,可以满足实时采集并压缩的需求,实现对轨迹的在线压缩,减小目标行驶轨迹的传输和存储压力。In one implementation, during the data compression process, only the cached driving trajectories in the cache queue need to be processed at a time, which can meet the needs of real-time collection and compression, realize online compression of the trajectory, and reduce the transmission and storage pressure of the target driving trajectory.

在一个实施例中,步骤S101包括以下步骤:In one embodiment, step S101 includes the following steps:

步骤一,使用开源地图OSM地图数据库,获取目标车辆当前行驶城市或行驶区域的矢量地图数据,修改矢量地图数据矢量地图数据矢量地图数据矢量地图数据的编码格式为UTF-8编码格式,得到矢量道路数据。Step 1: Use the open source map OSM map database to obtain the vector map data of the city or area where the target vehicle is currently traveling, modify the encoding format of the vector map data to the UTF-8 encoding format, and obtain the vector road data.

步骤二,选取矢量道路数据中的矢量线数据,并根据预设字段属性选取矢量线数据,导出为OSM格式的原始道路数据。Step 2: Select the vector line data in the vector road data, and select the vector line data according to the preset field attributes, and export it as the original road data in OSM format.

步骤三,对原始道路数据进行栅格化处理,根据原始道路数据的图层大小新建栅格,在像元高度和宽度处将矢量地图按照预设尺寸进行网格划分,得到包含多个网格区域的目标道路数据。Step three, rasterize the original road data, create a new raster according to the layer size of the original road data, divide the vector map into grids according to the preset size at the pixel height and width, and obtain the target road data containing multiple grid areas.

一种实现方式中,可以将矢量地图数据导入QGIS软件,在属性-源数据中修改矢量地图数据的编码格式为UTF-8编码格式,得到矢量道路数据。In one implementation, the vector map data may be imported into QGIS software, and the encoding format of the vector map data may be modified to UTF-8 encoding format in Properties-Source Data to obtain vector road data.

一种实现方式中,可以使用ARCGIS程序中的数据导出工具,可以在矢量道路数据中导出矢量线数据。In one implementation, a data export tool in an ARCGIS program may be used to export vector line data from vector road data.

一种实现方式中,可以使用ARCGIS程序对提取到的原始道路数据进行栅格化处理,使用数据管理工具中的渔网工具,根据道路数据的图层大小新建栅格,在像元高度和宽度处将矢量地图按照预设尺寸进行网格划分,即可得到包含多个网格区域的目标道路数据。预设尺寸可以由技术人员根据实际情况进行设置,在此不作限定,例如,预设尺寸可以为500m×500m,或者预设尺寸可以为100m×100m等等。In one implementation, the extracted original road data can be rasterized using the ARCGIS program, and the fishnet tool in the data management tool can be used to create a new grid according to the layer size of the road data, and the vector map can be gridded according to the preset size at the pixel height and width to obtain the target road data containing multiple grid areas. The preset size can be set by the technician according to the actual situation and is not limited here. For example, the preset size can be 500m×500m, or the preset size can be 100m×100m, etc.

在一个实施例中,原始道路数据包括字段属性为primary、secondary、tertiary、motoway、service的矢量线数据中的至少一种。In one embodiment, the original road data includes at least one of vector line data with field attributes of primary, secondary, tertiary, motoway, and service.

在一个实施例中,步骤S102包括以下步骤:In one embodiment, step S102 includes the following steps:

步骤一,新建目标车辆的个人地理数据库,在个人地理数据库中建立要素数据集并将目标道路数据导入,使用要素数据集新建拓扑规则,根据拓扑规则去除目标道路数据中的悬挂点和重叠数据,得到中间目标道路数据。Step 1: Create a personal geographic database for the target vehicle, create a feature dataset in the personal geographic database and import the target road data, use the feature dataset to create a new topology rule, remove the hanging points and overlapping data in the target road data according to the topology rule, and obtain the intermediate target road data.

步骤二,使用中间目标道路数据建立新的道路数据集得到道路交点数据,针对每一网格区域,根据道路交点数据所在的网格字段的不同,统计该网格区域内所包含的道路交点数目;Step 2: Use the intermediate target road data to establish a new road data set to obtain road intersection data. For each grid area, count the number of road intersections contained in the grid area according to the different grid fields where the road intersection data is located.

步骤三,针对每一网格区域,计算该网格区域的角度阈值:Step 3: For each grid area, calculate the angle threshold of the grid area:

Figure BDA0003724523740000091
Figure BDA0003724523740000091

其中,βi为第i个网格区域的角度阈值,ci为第i个网格区域中所包含的道路交点数目,

Figure BDA0003724523740000092
为基于固定角度压缩时角度阈值的取值,l为目标道路数据包含的网格区域的数目。Where β i is the angle threshold of the i-th grid area, c i is the number of road intersections contained in the i-th grid area,
Figure BDA0003724523740000092
is the value of the angle threshold based on fixed angle compression, and l is the number of grid areas contained in the target road data.

在一个实施例中,参见图2,在图1的基础上步骤S103可以包括以下步骤:In one embodiment, referring to FIG. 2 , based on FIG. 1 , step S103 may include the following steps:

S1031,对目标车辆的行驶轨迹数据以预设频率进行采集,得到原始行驶轨迹。S1031, collecting the driving trajectory data of the target vehicle at a preset frequency to obtain an original driving trajectory.

S1032,针对原始行驶轨迹的每一轨迹点,若该轨迹点为原始行驶轨迹的起始轨迹点或者结束轨迹点,则将该轨迹点加入到缓存队列中进行缓存;S1032, for each trajectory point of the original driving trajectory, if the trajectory point is the starting trajectory point or the ending trajectory point of the original driving trajectory, add the trajectory point to the cache queue for caching;

S1033,针对原始行驶轨迹的每一轨迹点,若该轨迹点为原始行驶轨迹的中间轨迹点,则计算该中间轨迹点的偏转角度值。S1033: For each trajectory point of the original driving trajectory, if the trajectory point is an intermediate trajectory point of the original driving trajectory, calculate the deflection angle value of the intermediate trajectory point.

S1034,针对每一中间轨迹点,将该中间轨迹点的偏转角度值与该中间轨迹点所在网格区域对应的角度阈值进行对比,若满足偏转角度值大于角度阈值,则将该中间轨迹点选取为候选点并加入到缓存队列中进行缓存,得到缓存行驶轨迹,否则,将该中间轨迹点暂时保留,在计算完下一个中间轨迹点的角度偏转角度值后丢弃。S1034, for each intermediate trajectory point, the deflection angle value of the intermediate trajectory point is compared with the angle threshold corresponding to the grid area where the intermediate trajectory point is located. If the deflection angle value is greater than the angle threshold, the intermediate trajectory point is selected as a candidate point and added to the cache queue for caching to obtain a cached driving trajectory. Otherwise, the intermediate trajectory point is temporarily retained and discarded after the angle deflection angle value of the next intermediate trajectory point is calculated.

S1035,针对原始行驶轨迹的每一轨迹点,若该轨迹点为原始行驶轨迹的结束轨迹点,则获取缓存队列中保存的轨迹点,组合得到缓存行驶轨迹。S1035: For each trajectory point of the original driving trajectory, if the trajectory point is the end trajectory point of the original driving trajectory, the trajectory points stored in the cache queue are obtained and combined to obtain a cached driving trajectory.

在一个实施例中,步骤S1033中计算该中间轨迹点的偏转角度值具体为:In one embodiment, the deflection angle value of the intermediate track point is calculated in step S1033 as follows:

步骤一,计算该中间轨迹点Pcur与其前一个轨迹点Ppre和后一个轨迹点Pfol为顶点构成的三角形的边长:Step 1: Calculate the side length of the triangle formed by the intermediate trajectory point P cur and its previous trajectory point P pre and the next trajectory point P fol as vertices:

Figure BDA0003724523740000101
Figure BDA0003724523740000101

其中,

Figure BDA0003724523740000102
Figure BDA0003724523740000103
分别为Ppre和Pcur、Pfol和Pcur以及Ppre和Pfol所构成三角形的边长,Lonpre和Latpre为Ppre的经度和维度;Loncur和Latcur为Pcur的经度和纬度;Lonfol和Latfol为Pfol的经度和纬度;MLoni和MLati代表经过转换的经纬度数据,i为pre,或者i为cur,或者i为fol,经度为东经时取MLoni=Loni,经度范围为西经时取MLati=-Loni,纬度范围为北纬MLoni=90-Loni,纬度范围为南纬时取MLati=90+Lati。in,
Figure BDA0003724523740000102
and
Figure BDA0003724523740000103
are respectively the side lengths of the triangle formed by P pre and P cur , P fol and P cur, and P pre and P fol , Lon pre and Lat pre are the longitude and latitude of P pre ; Lon cur and Lat cur are the longitude and latitude of P cur ; Lon fol and Lat fol are the longitude and latitude of P fol ; MLon i and MLat i represent the converted longitude and longitude data, i is pre, or i is cur, or i is fol, MLon i =Lon i when the longitude is east longitude, MLat i =-Lon i when the longitude range is west longitude, MLon i =90- Lon i when the latitude range is north latitude, and MLat i =90+Lat i when the latitude range is south latitude.

步骤二,计算Pcur与Ppre和Pfol之间的距离:Step 2: Calculate the distance between P cur , P pre and P fol :

Figure BDA0003724523740000111
Figure BDA0003724523740000111

其中,l1代表Ppre和Pcur的距离;l2代表Pfol和Pcur的距离;l3代表Ppre和Pfol的距离;R代表地球的平均半径。Among them, l 1 represents the distance between P pre and P cur ; l 2 represents the distance between P fol and P cur ; l 3 represents the distance between P pre and P fol ; R represents the average radius of the earth.

步骤三,计算Pcur的偏转角度值θkStep 3: Calculate the deflection angle θ k of P cur :

Figure BDA0003724523740000112
Figure BDA0003724523740000112

一种实现方式中,取R=6371.004km。In one implementation, R=6371.004 km.

在一个实施例中,步骤S104可以包括以下步骤:In one embodiment, step S104 may include the following steps:

步骤一,针对所述缓存行驶轨迹中的每一轨迹点,计算偏转角度值与平角的差值:Step 1: For each track point in the cached driving track, calculate the difference between the deflection angle value and the straight angle:

Figure BDA0003724523740000113
Figure BDA0003724523740000113

其中,

Figure BDA0003724523740000114
代表当前点与平角的差值,θk为该轨迹点的偏转角度值。in,
Figure BDA0003724523740000114
Represents the difference between the current point and the straight angle, and θk is the deflection angle value of the trajectory point.

步骤二,将连续的N个轨迹点的角度差值进行计算并累加:Step 2: Calculate and accumulate the angle differences of N consecutive trajectory points:

Figure BDA0003724523740000115
Figure BDA0003724523740000115

步骤三,根据N值确定角度累积阈值

Figure BDA0003724523740000116
Figure BDA0003724523740000117
Figure BDA0003724523740000118
进行比较,若满足
Figure BDA0003724523740000119
则将缓存行驶轨迹中的全部轨迹点存储,得到目标车辆压缩后的目标行驶轨迹,否则,将缓存行驶轨迹中的全部轨迹点进行1/2的等间隔采样,得到目标车辆压缩后的目标行驶轨迹。Step 3: Determine the angle accumulation threshold based on the N value
Figure BDA0003724523740000116
Will
Figure BDA0003724523740000117
and
Figure BDA0003724523740000118
Compare, if satisfied
Figure BDA0003724523740000119
All the trajectory points in the cached driving trajectory are stored to obtain the compressed target driving trajectory of the target vehicle. Otherwise, all the trajectory points in the cached driving trajectory are sampled at equal intervals of 1/2 to obtain the compressed target driving trajectory of the target vehicle.

一种实现方式中,根据N值可以选取角度累积阈值

Figure BDA00037245237400001110
例如,当N=5时,
Figure BDA00037245237400001111
当N=10时,
Figure BDA00037245237400001112
等等。In one implementation, the angle accumulation threshold can be selected according to the N value
Figure BDA00037245237400001110
For example, when N=5,
Figure BDA00037245237400001111
When N = 10,
Figure BDA00037245237400001112
etc.

一种实现方式中,

Figure BDA00037245237400001113
反映当前轨迹点的偏转程度,
Figure BDA00037245237400001114
越大表示当前车辆行驶中转弯的幅度也越大,
Figure BDA00037245237400001115
反映当前连续的N个轨迹点的偏转程度,
Figure BDA00037245237400001116
越大表示连续的N个轨迹点组成的轨迹的转弯的幅度也越大。当
Figure BDA0003724523740000121
可以将该连续的N个轨迹点全部存储,有效地保留车辆转弯的轨迹数据,保留车辆行驶中的特征轨迹点,否则,连续的N个轨迹点组成的轨迹的转弯的幅度不大,即可对N个轨迹点进行1/2的等间隔采样,压缩轨迹数据,降低目标行驶轨迹的数据量。In one implementation,
Figure BDA00037245237400001113
Reflects the deflection degree of the current trajectory point.
Figure BDA00037245237400001114
The larger the value, the greater the turning range of the vehicle.
Figure BDA00037245237400001115
Reflects the deflection degree of the current N consecutive trajectory points,
Figure BDA00037245237400001116
The larger the value, the greater the turning range of the trajectory composed of N consecutive trajectory points.
Figure BDA0003724523740000121
The continuous N trajectory points can all be stored to effectively retain the trajectory data of the vehicle turning and the characteristic trajectory points of the vehicle during driving. Otherwise, the turning amplitude of the trajectory composed of the continuous N trajectory points is not large, and the N trajectory points can be sampled at 1/2 equal intervals to compress the trajectory data and reduce the data volume of the target driving trajectory.

本发明的效果可通过下面仿真实验进一步说明。The effect of the present invention can be further illustrated by the following simulation experiment.

仿真实验条件:本发明的仿真实验平台为:处理器为Intel i7-9750 CPU,主频为2.6GHz,内存16GB。Simulation experiment conditions: The simulation experiment platform of the present invention is: the processor is Intel i7-9750 CPU, the main frequency is 2.6GHz, and the memory is 16GB.

本发明的仿真实验的软件平台为:Windows 10系统,IntelliJ IDEA 2020.1.1和ArcMap 10.6。The software platforms for the simulation experiment of the present invention are: Windows 10 system, IntelliJ IDEA 2020.1.1 and ArcMap 10.6.

仿真所用的对比方法是Liu J,Li H,Yang Z在其发表的论文“Adaptive Douglas-Peucker Algorithm With Automatic Thresholding for AIS-Based Vessel TrajectoryCompression”(IEEE Access,2019,7:150677-150692.)中提出的一种改进的DP算法。The comparison method used in the simulation is an improved DP algorithm proposed by Liu J, Li H, and Yang Z in their paper “Adaptive Douglas-Peucker Algorithm With Automatic Thresholding for AIS-Based Vessel Trajectory Compression” (IEEE Access, 2019, 7: 150677-150692.).

仿真实验的轨迹数据来自GeoLife GPS Trajectories的Geolife项目生产的182位用户于2007年04月至2012年08月期间的轨迹数据,记录了用户多种户外活动过程中所发生的移动信息,使用WGS 84坐标系。地图数据来自OSM地图提供的北京矢量地图数据,仿真过程中使用了轨迹数据集中编号030用户在2009年2月10日的轨迹数据,对行驶范围进行了500m×500m的网格划分,累积角度阈值设置为

Figure BDA0003724523740000122
缓冲队列长度N=5。The trajectory data for the simulation experiment comes from the GeoLife project of GeoLife GPS Trajectories, which records the movement information of users during various outdoor activities, using the WGS 84 coordinate system. The map data comes from the Beijing vector map data provided by OSM map. The simulation process uses the trajectory data of user No. 030 in the trajectory data on February 10, 2009. The driving range is divided into 500m×500m grids, and the cumulative angle threshold is set to
Figure BDA0003724523740000122
The buffer queue length N=5.

仿真内容及其结果分析:Simulation content and result analysis:

仿真1,在上述仿真条件下,利用本发明和改进的DP算法分别对030号用户在2009年2月10日的轨迹数据进行轨迹压缩,结果如图3所示,其中:Simulation 1: Under the above simulation conditions, the trajectory data of user No. 030 on February 10, 2009 are compressed using the present invention and the improved DP algorithm. The results are shown in FIG3 , where:

图3(a)表示改进的DP算法对轨迹数据压缩的结果;Figure 3(a) shows the result of trajectory data compression by the improved DP algorithm;

图3(b)表示本发明基于角度阈值自适应的轨迹压缩方法对轨迹数据压缩的结果。FIG3( b ) shows the result of trajectory data compression based on the angle threshold adaptive trajectory compression method of the present invention.

由图3可见,改进的DP算法基于全部的轨迹数据进行压缩,所获得的数据结果分布均匀,本发明的压缩结果则在压缩结果保持均匀的同时有着更高的压缩效率,此外本发明在对数据压缩过程中,一次仅需要N个轨迹点数据即可运行,可以满足实时采集并压缩的需求,实现对轨迹的在线压缩,但改进的DP算法则需要一次获取完整轨迹,现有技术并不能满足在线压缩的需求因而会产生更多的传输和存储压力。As can be seen from FIG3 , the improved DP algorithm performs compression based on all trajectory data, and the obtained data results are evenly distributed. The compression results of the present invention have higher compression efficiency while maintaining uniform compression results. In addition, during the data compression process, the present invention only requires N trajectory point data at a time to run, which can meet the needs of real-time acquisition and compression and realize online compression of the trajectory. However, the improved DP algorithm needs to obtain the complete trajectory at one time. The existing technology cannot meet the needs of online compression and thus will generate more transmission and storage pressure.

仿真2,在上述仿真条件下,对本发明提出的缓存队列的作用进行了验证,结果如图4所示,其中:Simulation 2: Under the above simulation conditions, the effect of the cache queue proposed by the present invention is verified, and the result is shown in FIG4 , where:

图4(a)表示不引入缓存队列的角度阈值自适应的轨迹压缩方法对轨迹数据的压缩结果;FIG4( a ) shows the compression result of trajectory data by the trajectory compression method with angle threshold adaptiveness without introducing a cache queue;

图4(b)表示本发明中引入缓存队列的角度阈值自适应的轨迹压缩方法对轨迹数据的压缩结果。FIG. 4( b ) shows the compression result of trajectory data by the trajectory compression method with adaptive angle threshold of the buffer queue introduced in the present invention.

由图4可见,在不引入缓存队列的方法对车辆轨迹在直行情况下的压缩结果表现较差,出现了连续且密集的近似直线的轨迹段,而本发明通过引入缓存队列,在保持算法复杂度不变的情况下提高了对直行路段处车辆轨迹的压缩效率。As can be seen from Figure 4, the method without introducing the cache queue performs poorly in compressing the vehicle trajectory in the straight-ahead situation, and continuous and dense trajectory segments that are approximately straight lines appear. The present invention, by introducing the cache queue, improves the compression efficiency of the vehicle trajectory in the straight-ahead section while keeping the algorithm complexity unchanged.

以上对本发明的一个实施例进行了详细说明,但所述内容仅为本发明的较佳实施例,不能被认为用于限定本发明的实施范围。凡依本发明申请范围所作的均等变化与改进等,均应仍归属于本发明的专利涵盖范围之内。The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims (7)

1. A method of track compression with adaptive angle threshold, the method comprising:
acquiring vector map data of a current running area of a target vehicle in a preset map library, extracting original road data from the vector map data, and performing grid division to obtain target road data comprising a plurality of grid areas;
performing network topology analysis on the target road data, counting the number of road intersection points contained in each grid area, and distributing an angle threshold value for the grid area;
calculating deflection angle values of all track points in the original running track during the original running track acquisition process of the target vehicle, and storing the track points meeting preset conditions into a cache queue according to the positions and the deflection angle values of all track points to obtain a cache running track;
and calculating a deflection accumulation value of each track point in the cache running track, and sampling and storing according to the deflection accumulation value to obtain the target running track of the target vehicle after compression.
2. The method for compressing a track with adaptive angle threshold according to claim 1, wherein obtaining vector map data of a current driving area of a target vehicle in a preset map library, extracting original road data from the vector map data and performing meshing to obtain target road data including a plurality of meshing areas, comprises:
using an open source map OSM map database to obtain vector map data of a current running city or running area of a target vehicle, and modifying the coding format of the vector map data into a UTF-8 coding format to obtain vector road data;
vector line data in the vector road data are selected, and the vector line data are selected according to preset field attributes, so that original road data in an OSM format are derived;
and carrying out rasterization processing on the original road data, creating a grid according to the layer size of the original road data, and carrying out grid division on a vector map at the pixel height and width according to preset dimensions to obtain target road data comprising a plurality of grid areas.
3. The method of claim 2, wherein the raw road data comprises at least one of vector line data with a field attribute of primary, secondary, tertiary, motoway, service.
4. The method for track compression with adaptive angle threshold according to claim 1, wherein performing network topology analysis on the target road data, counting the number of road intersections included in each grid area, and assigning an angle threshold to the grid area comprises:
newly establishing a personal geographic database of the target vehicle, establishing an element data set in the personal geographic database, importing the target road data, creating a topology rule by using the element data set, and removing hanging points and overlapping data in the target road data according to the topology rule to obtain intermediate target road data;
establishing a new road data set by using the intermediate target road data to obtain road intersection point data, and counting the number of road intersection points contained in each grid area according to the difference of grid fields in which the road intersection point data are located for each grid area;
for each grid region, calculating an angle threshold for the grid region:
Figure FDA0004199945500000021
wherein ,βi An angle threshold, c, for the ith grid region i For the number of road intersections included in the ith mesh region,
Figure FDA0004199945500000022
for the value of the angle threshold value based on fixed angle compression, l is the number of grid areas contained in the target road data.
5. The track compression method of claim 1, wherein in the process of acquiring the original running track of the target vehicle, calculating the deflection angle value of each track point in the original running track, and storing the track points meeting the preset condition into a cache queue according to the positions and the deflection angle values of each track point to obtain the cache running track, comprising:
acquiring the driving track data of the target vehicle at a preset frequency to obtain an original driving track;
for each track point of the original running track, if the track point is a starting track point or an ending track point of the original running track, adding the track point into a cache queue for caching;
for each track point of the original running track, if the track point is a middle track point of the original running track, calculating a deflection angle value of the middle track point;
comparing the deflection angle value of each intermediate track point with an angle threshold value corresponding to the grid region where the intermediate track point is located, selecting the intermediate track point as a candidate point and adding the candidate point into a cache queue for caching if the deflection angle value is larger than the angle threshold value, so as to obtain a cache driving track, otherwise, temporarily retaining the intermediate track point, and discarding the intermediate track point after the angle deflection angle value of the next intermediate track point is calculated;
and aiming at each track point of the original running track, if the track point is the ending track point of the original running track, acquiring the track points stored in the cache queue, and combining to obtain the cache running track.
6. The method of claim 5, wherein calculating the deflection angle value of the intermediate track point comprises:
calculate the intermediate track point P cur With the previous trace point P pre And the latter locus point P fol Side length of triangle formed by vertexes:
Figure FDA0004199945500000031
Figure FDA0004199945500000032
Figure FDA0004199945500000033
wherein ,
Figure FDA0004199945500000034
and
Figure FDA0004199945500000035
Respectively P pre and Pcur 、P fol and Pcur P pre and Pfol Side length of triangle formed and Lon pre and Latpre Is P pre Longitude and latitude of (a); lon (Lon) cur and Latcur Is P cur Longitude and latitude of (a); lon (Lon) fol and Latfol Is P fol Longitude and latitude of (a); MLon i and MLati Representing the converted longitude and latitude data, i is pre, i is cur, i is fos, and longitude is the east longitude time MLon i =Lon i Taking MLat with longitude range of Western time i =-Lon i The latitude range is North latitude MLon i =90-Lon i Taking MLat when latitude is in south latitude i =90+Lat i
Calculation of P cur And P pre and Pfol Distance between:
Figure FDA0004199945500000041
Figure FDA0004199945500000042
Figure FDA0004199945500000043
wherein ,l1 Represents P pre and Pcur Is a distance of (2); l (L) 2 Represents P fol and Pcur Is a distance of (2); l (L) 3 Represents P pre and Pfol Distance of (2)The method comprises the steps of carrying out a first treatment on the surface of the R represents the average radius of the earth, taking r= 6371.004km;
calculation of P cur Deflection angle value theta of (2) k
Figure FDA0004199945500000044
7. The track compression method of claim 1, wherein calculating a deflection accumulation value of each track point in the buffered running track, sampling and storing according to the deflection accumulation value, and obtaining the target running track after the target vehicle is compressed, comprises:
calculating a difference value between a deflection angle value and a flat angle for each track point in the buffer running track:
Figure FDA0004199945500000045
wherein ,
Figure FDA0004199945500000046
representing the difference between the current point and the flat angle, θ k A deflection angle value for the track point;
calculating and accumulating angle differences of N continuous track points:
Figure FDA0004199945500000047
determining an angle accumulation threshold from the N value
Figure FDA0004199945500000048
Will->
Figure FDA0004199945500000049
And->
Figure FDA00041999455000000410
Comparing if it meets->
Figure FDA00041999455000000411
And storing all track points in the cache running track to obtain a target running track after the target vehicle is compressed, otherwise, sampling all track points in the cache running track at 1/2 equal intervals to obtain the target running track after the target vehicle is compressed. />
CN202210771945.8A 2022-06-30 2022-06-30 An Angle Threshold Adaptive Trajectory Compression Method Expired - Fee Related CN115334167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210771945.8A CN115334167B (en) 2022-06-30 2022-06-30 An Angle Threshold Adaptive Trajectory Compression Method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210771945.8A CN115334167B (en) 2022-06-30 2022-06-30 An Angle Threshold Adaptive Trajectory Compression Method

Publications (2)

Publication Number Publication Date
CN115334167A CN115334167A (en) 2022-11-11
CN115334167B true CN115334167B (en) 2023-06-09

Family

ID=83917693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210771945.8A Expired - Fee Related CN115334167B (en) 2022-06-30 2022-06-30 An Angle Threshold Adaptive Trajectory Compression Method

Country Status (1)

Country Link
CN (1) CN115334167B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076593A (en) * 2023-10-18 2023-11-17 中微智创(北京)软件技术有限公司 A multi-level construction and storage method of dynamic target trajectories based on memory database
TWI910503B (en) * 2023-11-30 2026-01-01 智易科技股份有限公司 Vehicle trajectory recording system and method for vehicles with a sensor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312335A (en) * 2013-05-20 2013-09-18 四川智行电子科技有限公司 Space route vector data accumulation offset real-time compression method for mobile GIS (Geographic Information System) technology
CN104467866A (en) * 2014-10-14 2015-03-25 福建师范大学 Angle-based track data compression method and device
CN105469435A (en) * 2016-01-20 2016-04-06 北京格灵深瞳信息技术有限公司 Track compression method and device
CN106877875A (en) * 2017-01-22 2017-06-20 齐鲁工业大学 A Vehicle Trajectory Compression Method Based on Threshold Combined Algorithm
CN112163166A (en) * 2020-10-27 2021-01-01 腾讯科技(深圳)有限公司 Method and device for detecting road attribute, computer readable medium and electronic equipment
CN112817943A (en) * 2021-02-26 2021-05-18 上海海事大学 Multi-threshold ship track simplification method based on dead reckoning method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114667437B (en) * 2019-08-31 2025-12-19 辉达公司 Map creation and positioning for autonomous driving applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312335A (en) * 2013-05-20 2013-09-18 四川智行电子科技有限公司 Space route vector data accumulation offset real-time compression method for mobile GIS (Geographic Information System) technology
CN104467866A (en) * 2014-10-14 2015-03-25 福建师范大学 Angle-based track data compression method and device
CN105469435A (en) * 2016-01-20 2016-04-06 北京格灵深瞳信息技术有限公司 Track compression method and device
CN106877875A (en) * 2017-01-22 2017-06-20 齐鲁工业大学 A Vehicle Trajectory Compression Method Based on Threshold Combined Algorithm
CN112163166A (en) * 2020-10-27 2021-01-01 腾讯科技(深圳)有限公司 Method and device for detecting road attribute, computer readable medium and electronic equipment
CN112817943A (en) * 2021-02-26 2021-05-18 上海海事大学 Multi-threshold ship track simplification method based on dead reckoning method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于运动状态改变的在线全球定位系统轨迹数据压缩;刘磊军;房晨;张磊;鲍苏宁;;计算机应用(第01期);全文 *

Also Published As

Publication number Publication date
CN115334167A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN111291776B (en) Waterway Information Extraction Method Based on Crowdsourced Trajectory Data
CN115334167B (en) An Angle Threshold Adaptive Trajectory Compression Method
CN112015835B (en) Geohash compressed map matching method
Tang et al. A network Kernel Density Estimation for linear features in space–time analysis of big trace data
CN109815993B (en) Regional Feature Extraction, Database Establishment and Intersection Recognition Method Based on GPS Trajectory
Chen et al. Compression of GPS trajectories
CN111292356A (en) Method and device for matching motion trajectory and road
CN110288044B (en) A Trajectory Simplification Method Based on Trajectory Division and Priority Queue
CN108022006B (en) Data-driven accessibility probability and region generation method
CN110502596A (en) A Trajectory Online Sliding Window Compression Method Based on Pedestrian Trajectory Features
CN116543310B (en) Road line extraction method based on Voronoi diagram and kernel density
CN111740981A (en) Automobile GPS track data compression method
CN117011692B (en) A method and related device for road recognition
CN110162997A (en) Anonymous method for secret protection based on interpolation point
CN118035342A (en) Urban model display method, system and storage medium based on cloud computing
CN115238834B (en) User group space-time abnormal pattern recognition method based on trajectory data
CN115909545A (en) Vehicle track data compression method and device based on fuzzy coding
CN116775784B (en) Spatial data retrieval method, apparatus, equipment, and storage medium based on Siamese network
Mirvahabi et al. A Flexible Trajectory Compression Algorithm for Multi-Modal Transportation
Liu et al. A method for online trajectory simplification by enclosed area metric
CN116610646A (en) Data compression method, device, equipment and computer readable storage medium
CN114460613A (en) A Compression Method of Vehicle Trajectory
TW201211509A (en) Navigation devices
CN117313033B (en) A method for fusing and compressing multi-source trajectory information
CN117202106B (en) Regional space place attribute labeling method, system and medium based on signaling data

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20230609

CF01 Termination of patent right due to non-payment of annual fee