A ship trajectory adaptive compression method without threshold setting
Patent Information
- Application Number
- CN202410445427.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2044-04-15
AI Technical Summary
[0004]为了克服现有船舶轨迹压缩方法的不足,本发明提供了一种无需阈值设定的船舶轨迹自适应压缩方法
[0019]本发明的有益效果:本发明提供了一种无需阈值设定的船舶轨迹自适应压缩方法,根据轨迹特征构建船舶轨迹点重要性的树状层级序列;通过动态时间归整(DTW)算子来评估轨迹压缩前后的空间相似度,挖掘轨迹点序列沿树状层级从低到高压缩过程中的相似度变化规律;通过搜寻相似度阶跃变化最大轨迹点来自动调整压缩后的最大阶跃点,以实现自适应压缩。本发明能够有效地解决现有基于固定压缩阈值的方法难以自适应调整的问题,通过确定最佳的压缩最大阶跃点来避免轨迹关键特征的丢失,从而提高了航行轨迹数据的存储效率和分析精度。本发明的方法简单易懂,易于实现,具有较高的实用性和推广价值。
Smart Images

Figure CN118331947B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of marine surveying and mapping technology, and relates to an adaptive compression method for ship trajectories that does not require threshold setting. Background Technology
[0002] With the widespread application of Automatic Identification Systems (AIS), the increasing number of ships, and the rapid development of communication technology, the amount of AIS data generated has increased dramatically, posing a series of challenges to data storage, management, and processing. To achieve efficient utilization of AIS data, the raw data must first be compressed to remove redundant data and retain key trajectory features.
[0003] The commonly used ship trajectory compression method is the Douglas-Peucker (DP) algorithm, which uses a single distance threshold obtained from experience for trajectory compression. However, this method has the following shortcomings: (1) The threshold is an empirical value that needs to be statistically obtained in advance, and this empirical value is based on the statistics of specific ship types and navigation states. When these conditions change, the threshold may not be universally applicable; (2) Simply controlling the spatial similarity of all trajectories before and after compression by a certain input threshold does not regulate the spatial similarity of each trajectory and locality during the compression process. This may result in the accidental deletion of key navigation points in complex sea areas, while retaining too many unnecessary navigation points in open sea areas, causing data redundancy. Summary of the Invention
[0004] To overcome the shortcomings of existing ship trajectory compression methods, this invention provides an adaptive ship trajectory compression method that does not require threshold setting.
[0005] The technical solution of the present invention is as follows:
[0006] An adaptive compression method for ship trajectories without threshold setting includes the following steps:
[0007] a. Construct a hierarchical tree sequence of the importance of ship trajectory points based on trajectory characteristics;
[0008] b. After generating a tree-like hierarchical sequence of trajectory points, less important trajectory points are gradually optimized and removed from low to high levels along the sequence to achieve trajectory compression. During this compression process, the Dynamic Time Warping (DTW) operator is used to evaluate the spatial similarity between the compressed trajectory and the original trajectory. Then, trajectory point removal is stopped at the maximum step point to achieve adaptive trajectory compression. Specifically, the trajectory point that causes the largest step change in similarity is found from the tree-like hierarchical sequence, and other trajectory points with a lower level than that trajectory point are discarded, thereby achieving the goal of automatically adjusting the degree of compression.
[0009] In step a, the method for constructing a hierarchical tree sequence of the importance of ship trajectory points based on trajectory features is as follows:
[0010] (1) Layering of ship trajectory data
[0011] First, determine the point with the largest vertical distance in the trajectory as the initial root node, denoted as node O. 11 and node O 11 Let's set it as the first level, L1. Then, starting with node O... 11 Using the base point as the starting point, divide the trajectory into two parts, and find the point with the largest vertical distance in each part, denoted as node O. 21 and node O 22 Let node O 21 and node O 22 This is the second level, L2. The above segmentation process is repeated for each newly found node until all trajectory points are assigned to the corresponding level, L2-L... n And record the level and vertical distance d of each point.
[0012] (2) Classification of trajectory points at the same level
[0013] After the trajectory points are processed in layers, each node in each layer corresponds to a trajectory point and records the layer number and vertical distance of the trajectory point. Then, the tree structure is traversed by the preorder traversal algorithm of the tree, and all trajectory points at the same level are recorded in a list. Finally, the trajectory point lists of each level are sorted according to the vertical distance of the trajectory points to obtain the generated trajectory point tree hierarchy sequence.
[0014] In step b, the method for achieving adaptive trajectory compression using the maximum step point is as follows:
[0015] In the process of compressing trajectory point sequences from low to high hierarchy in a tree structure, determining the appropriate compression amplitude is crucial for achieving efficient data compression. As the compression amplitude increases, the similarity gradually decreases, and the maximum step point, as a key parameter in the trajectory compression process, can be used to guide the setting of the compression amplitude. Therefore, this invention searches for the trajectory point with the largest step change in similarity in the tree-structured sequence, and then discards other points with a hierarchy lower than that point to achieve compression.
[0016] Find the DTW calculation value with respect to the maximum step point of compression. gradient of change Then, by analyzing the gradient of change The system identifies the abrupt change points where the DTW calculated value changes most significantly during compression, and then calculates the gradient of change. Maximum step point during local maximum :
[0017] (5)
[0018] In the formula, T is the set of original trajectory points. In terms of amplitude Compressed trajectory. Select. As the point of maximum step jump, it can be Remove trajectory points with minor features from T, and retain the key features of the trajectory as much as possible after compression.
[0019] The beneficial effects of this invention are as follows: This invention provides an adaptive compression method for ship trajectories without the need for threshold setting. It constructs a hierarchical tree sequence of the importance of ship trajectory points based on trajectory features; it evaluates the spatial similarity before and after trajectory compression using a Dynamic Time Warping (DTW) operator, and mines the similarity change pattern of the trajectory point sequence along the hierarchical tree from low to high during compression; it automatically adjusts the maximum step point after compression by searching for the trajectory point with the largest similarity step change, thus achieving adaptive compression. This invention effectively solves the problem of existing methods based on fixed compression thresholds being difficult to adaptively adjust. By determining the optimal maximum step point for compression, it avoids the loss of key trajectory features, thereby improving the storage efficiency and analysis accuracy of navigation trajectory data. The method of this invention is simple, easy to understand, and easy to implement, possessing high practicality and promotional value. Attached Figure Description
[0020] Figures 1(a) to 1(g) A schematic diagram illustrating the process of constructing a tree-like hierarchical sequence of trajectory points.
[0021] Figures 2(a) to 2(d) This is a similarity change graph of the trajectory point hierarchical sequence, that is, the similarity and gradient change curves of the four sample cases in the implementation. Detailed Implementation
[0022] The following description, in conjunction with the embodiments and accompanying drawings, further explains the specific implementation of the present invention, but is not intended to limit the present invention.
[0023] This embodiment provides a computer-based adaptive compression method for ship trajectories without threshold setting. This method utilizes a dynamic time-warping (DTW) operator and a tree-structured hierarchical sequence to automatically adjust the compression level, thereby removing redundant data and preserving key trajectory features. The specific steps are as follows:
[0024] a. Collect and prepare raw ship AIS trajectory data. This data includes information such as the timestamp and location (latitude and longitude) of each ship.
[0025] b. Based on the characteristics of ship trajectories, construct a tree-like hierarchical sequence of the importance of trajectory points.
[0026] (1) Layering of ship trajectory data
[0027] The core principle of DP-type algorithms is to divide the trajectory into two parts by the point with the maximum distance to the baseline, and then recursively perform this operation. This logic is consistent with the basic principle of multi-branch tree preorder generation algorithms. Therefore, this invention draws on the idea of multi-branch tree preorder generation algorithms to guide the hierarchical processing of ship trajectories. As shown in Figures 1(a) and 1(b), the initial root node P4 with the largest vertical distance is first obtained and set as the first layer, and its vertical distance L4 (value 5.7) is recorded. Next, the trajectory is divided with P4, as shown in Figures 1(c) and 1(d). Points P2 and P7 with the largest vertical distances are obtained as child nodes of P4 with P1P4 and P4P8 as baselines, respectively, and set as the second layer, and their corresponding vertical distances L2 (value 1.8) and L7 (value 2.7) are recorded. Then, P2 and P7 are divided, and with P1P2, P2P4, P4P7, and P7P8 as baselines, child nodes with the largest vertical distances are searched, and these points are set as the third layer, as shown in Figures 1(e) and 1(f). This process is repeated recursively until all trajectory points are divided, and the number of recursions during the division is defined as the level of the trajectory point in the multi-branch tree.
[0028] (2) Classification of trajectory points at the same level
[0029] After the trajectory points are processed in layers, each node in the tree structure corresponds to a trajectory point and records the level and vertical distance of that point. Next, the tree structure is traversed by the preorder traversal algorithm of the multi-branch tree, and all points at the same level are recorded in a list. Finally, the trajectory point lists of each level are sorted according to the vertical distance of the trajectory points, as shown in Figure 1(g), with arrows pointing from higher levels to lower levels.
[0030] After generating a tree-like hierarchical sequence of trajectory points, less important trajectory points can be gradually optimized and removed from low to high along the sequence based on the maximum step point, so as to achieve spatial similarity control of the trajectory.
[0031] c. Evaluate the changes in trajectory space similarity before and after compression.
[0032] Find the DTW calculation value with respect to the maximum step point of compression. gradient of change Then, by analyzing gradient changes The abrupt change point with the largest change in DTW calculated value during the compression process was identified, and then the result was obtained. Maximum step point during local maximum .
[0033] During the compression of ship trajectory points from low to high, layer by layer, the difference between the compressed trajectory and the original trajectory gradually increases, while the similarity decreases as the number of discarded points increases, and some features of the trajectory are gradually omitted. In this process, the change in similarity is not always smooth. After discarding some important feature points in the trajectory, a significant decrease in similarity can be observed. This invention defines this as a local step phenomenon, and these points are defined as step points.
[0034] This embodiment selects four AIS historical trajectories as sample cases to further demonstrate and discuss the changing patterns of similarity during trajectory point compression. From Figures 2(a) to 2(d) The similarity and gradient curves show that in the initial stage of compression along the tree-like hierarchical sequence, the similarity changes calculated by DTW are quite significant, especially before and after the step point. This is because the trajectory gradually loses key feature points from its complete state, resulting in a significant decrease in the similarity between the compressed trajectory and the original trajectory. After the maximum step point, the similarity change gradually slows down, reflecting that the difference between the compressed trajectory and the original trajectory has expanded to a certain extent, so that subsequent compression has a limited impact on similarity. Therefore, the maximum step point is a key parameter in the trajectory compression process, and it can be used to guide the setting of the compression amplitude to retain as many key features of the trajectory as possible after compression.
[0035] d. Based on the maximum step point obtained in step c, discard other points from bottom to top according to the hierarchy to optimize the compression process. That is, by retaining the trajectory points with higher importance and deleting those with lower importance, the trajectory can be effectively compressed.
[0036] Through the above steps, this invention can automatically adapt to different ship trajectory characteristics without the need for preset fixed thresholds, effectively compressing ship trajectory data while preserving key trajectory information. This method is particularly suitable for processing massive amounts of AIS data, helping to improve data storage and processing efficiency, and has significant application value in fields such as marine monitoring and ship management.
Claims
1. A method for adaptive compression of ship trajectories without threshold setting, characterized in that, Includes the following steps: a. Construct a hierarchical tree sequence of the importance of ship trajectory points based on trajectory characteristics; b. After generating the tree-like hierarchical sequence of trajectory points, the less important trajectory points are gradually optimized and removed from low to high along the sequence to achieve trajectory compression. During the compression process, the Dynamic Time Warping (DTW) operator is used to evaluate the spatial similarity between the compressed trajectory and the original trajectory. Then, the removal of trajectory points is stopped at the maximum step point to achieve adaptive trajectory compression. Specifically, the trajectory point that causes the largest step change in similarity is found from the tree-like hierarchical sequence, and other trajectory points with a lower level than that trajectory point are discarded, thereby achieving the goal of automatically adjusting the degree of compression. In step a, the method for constructing a hierarchical tree sequence of the importance of ship trajectory points based on trajectory features is as follows: (1) Layering of ship trajectory data First, determine the point with the largest vertical distance in the trajectory as the initial root node, denoted as node O. 11 and node O 11 Let's set it as the first level L1; then, with node O... 11 Using the base point as the starting point, divide the trajectory into two parts, and find the point with the largest vertical distance in each part, denoted as node O. 21 and node O 22 Let node O 21 and node O 22 This is the second level, L2; repeat the above segmentation process for each newly found node until all trajectory points are assigned to the corresponding level L2—L. n And record the hierarchy and vertical distance d of each point; (2) Classification of trajectory points at the same level After the trajectory points are processed in layers, each node in each layer corresponds to a trajectory point and records the layer number and vertical distance of the trajectory point. Then, the tree structure is traversed by the tree preorder traversal algorithm to record all trajectory points at the same level in a list. Finally, the trajectory point lists of each level are sorted according to the vertical distance of the trajectory points to obtain the generated trajectory point tree hierarchy sequence. In step b, the method for achieving adaptive trajectory compression using the maximum step point is as follows: Find the DTW value with respect to the maximum step point of compression. gradient of change Then, by analyzing the gradient of change The system identifies the abrupt change points where the DTW calculated value changes most significantly during compression, and then calculates the gradient of change. Maximum step point during local maximum : (5) In the formula, T is the set of original trajectory points. In terms of amplitude The compressed trajectory.