A Method of Ship Trajectory Prediction Based on a C-Informer Model
-
摘要: 船舶在复杂环境中的航行受风浪、水深、船舶性能等多种不确定因素的影响,利用数学模型难以准确定义和反映船舶轨迹变化规律。针对此问题,研究了1种基于特征工程及神经网络的船舶运动轨迹多步预测方法,将轨迹预测任务分为数据处理及模型预测2个部分:①数据处理模块利用特征工程的方法对AIS轨迹数据进行预处理,首先对原始AIS数据进行清洗,然后利用最大信息系数筛选出与位置预测任务高度相关的特征,并引入变步长的时间间隔信息,解决现有模型只能选取固定时间间隔的数据进行训练和预测的问题,最后重构出高质量的船舶轨迹序列;②模型预测模块构建基于C-Informer的船舶轨迹预测模型,利用Informer模型的多头概率稀疏自注意力机制,降低网络模型的时间复杂度,同时基于生成式解码提高预测速度,通过引入因果卷积模块,增加模型对相邻时间轨迹特征的敏感程度,以弥补Informer模型在局部信息抽取时的不足,使模型更适应于船舶轨迹预测任务。基于南京港附近船舶AIS数据的实验结果表明:C-Informer模型的轨迹预测整体均方误差为1.72×10-7,平均绝对误差为2.43×10-4,与原始的Informer模型相比分别降低28.6%和31.9%,且使用筛选后的特征组合训练C-Informer模型,与只包含经纬度的特征组合相比,均方误差和平均绝对误差分别降低57.7%和42.1%。在对不同时间步长的轨迹进行预测时,C-Informer模型预测时间比长短期记忆网络模型最多减少了69.6%,损失最多降低了75.8%。Abstract: The navigation of ships in complex environments is influenced by various uncertain factors, such as wind, waves, water depth, and ship performance, etc. It is challenging to precisely define and reflect the dynamic patterns of ship trajectories simply using mathematical models. To address this issue, a multi-step prediction method for ship trajectories based on feature engineering and neural networks is studied. The task of trajectory prediction is divided into two parts: data processing and model prediction. The data processing module preprocesses AIS trajecto-ry data using feature engineering methods. It starts by cleaning the raw AIS data, then uses the maximal information coefficient to select features highly correlated with the position prediction task. Additionally, a variable time interval information is introduced to address the problem of existing models only being able to select fixed time interval data for training and prediction. This module ultimately reconstructs high-quality ship trajectory sequences. The model prediction module constructs a ship trajectory prediction model based on C-Informer. It utilizes the multi-head Prob-Sparse self-attention mechanism of the Informer model to reduce the time complexity of the network model. Simul-taneously, it enhances prediction speed by generative decoding. By introducing a causal convolution module, the sensitivity of the model to neighboring time trajectory features is increased to compensate for the deficiencies of the Informer model in extracting local information. This adaption makes the model more suitable for ship trajectory prediction tasks. The experimental results based on Automatic Identification System (AIS) data near Nanjing port show that the C-Informer model for trajectory prediction has an overall mean square error (MSE) of 1.72×10-7 and a mean absolute error (MAE) of 2.43×10-4. Compared to the original Informer model, this represents a reduction of 28.6% and 31.9%, respectively. When training the C-Informer model with the selected feature combinations, the MSE and MAE are decreased by 57.7% and 42.1%, respectively, compared to using only latitude and longitude fea-tures. In predicting trajectories at different time steps, the C-Informer model reduces prediction time by up to 69.6% compared to the long short-term memory network model, with a maximum loss reduction of 75.8%.
-
Key words:
- traffic safety /
- AIS data /
- trajectory prediction /
- feature engineering /
- causal convolution network /
- Informer model
-
表 1 船舶AIS动态数据
Table 1. AIS dynamic data of ships
船舶识别码 纬度/(°) 经度/(°) 航速/(m/s) 航向/(°) 船艏向/(°) 转向率/[(°)/min] 时间 413 763 957 31.838 547 118.503 255 2.26 191.2 191 5.25 05-06-2023 12:46:08 413 763 957 31.837 962 118.503 1 2.26 193 193 5.25 05-06-2023 12:46:36 413 763 957 31.837 103 118.502 823 2.31 196.2 196 5.25 05-06-2023 12:47:20 413 764 624 31.861 958 118.539 65 2.727 17.5 17 0 05-06-2023 12:44:27 413 764 624 31.862 71 118.539 903 2.881 16.4 16 0 05-06-2023 12:45:05 413 764 624 31.863 488 118.540 18 2.932 16.6 16 0 05-06-2023 12:45:28 表 2 不同特征组合对轨迹预测影响
Table 2. The impact of different feature combinations on trajectory prediction
特征组合 MSE MAE 组合1 4.07×10-7 4.20×10-4 组合2 1.94×10-7 2.85×10-4 组合3 1.72×10-7 2.43×10-4 表 3 不同模型预测最终结果
Table 3. Final results predicted by different models
预测模型 MSE MAE C-Informer 1.72×10-7 2.43×10-4 Informer 2.41×10-7 3.57×10-4 LSTM 6.21×10-7 5.51×10-4 表 4 预测经纬度偏差
Table 4. Predicted latitude and longitude deviation
航行状态 平均偏差 最大偏差 最小偏差 平均误差距离/m 经度/(°) 纬度/(°) 经度/(°) 纬度/(°) 经度/(°) 纬度/(°) 直行 1.73×10-4 2.28×10-4 4.3×10-4 3.6×10-4 1×10-5 3×10-5 32.86 转向 4.40×10-4 1.06×10-4 7×10-4 1.6×10-4 2.7×10-4 7×10-5 42.68 -
[1] 郁舒昊, 周辉, 叶春杨, 等. SDFA: 基于多特征融合的船舶轨迹聚类方法研究[J]. 计算机科学, 2022, 49(增刊1): 256-260. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJA2022S1039.htmYU S H, ZHOU H, YE Y Q, et al. SDFA: study on ship trajectory clustering method based on multifeature fusion[J]. Computer Science, 2022, 49(S1): 256-260. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JSJA2022S1039.htm [2] SUO Y, CHEN W, CLARAMUNT C, et al. A ship trajectory prediction framework based on a recurrent neural network[J]. Sensors, 2020, 20(18): 5133. doi: 10.3390/s20185133 [3] CHEN L, YANG P, LI S, et al. Online modeling and prediction of maritime autonomous surface ship maneuvering motion under ocean waves[J]. Ocean Engineering, 2023, 276: 114183. doi: 10.1016/j.oceaneng.2023.114183 [4] VOLKOVA T A, BALYKINA Y E, BESPALOV A. Predicting ship trajectory based on neural networks using AIS data[J]. Journal of Marine Science and Engineering, 2021, 9(3): 254. doi: 10.3390/jmse9030254 [5] ZHENG Y, LYU X, QIAN L, et al. An optimal BP neural net-work track prediction method based on a GA-ACO hybrid algorithm[J]. Journal of Marine Science and Engineering, 2022, 10(10): 1399. doi: 10.3390/jmse10101399 [6] 甄荣, 金永兴, 胡勤友, 等. 基于AIS信息和BP神经网络的船舶航行行为预测[J]. 中国航海, 2017, 40(2): 6-10. https://www.cnki.com.cn/Article/CJFDTOTAL-ZGHH201702002.htmZHEN R, JIN Y X, HU Q Y, et al. Vessel behavior prediction based on AIS data and BP neural network[J]. Navigation of China, 2017, 40(2): 6-10. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-ZGHH201702002.htm [7] 胡玉可, 夏维, 胡笑旋, 等. 基于循环神经网络的船舶轨迹预测[J]. 系统工程与电子技术, 2020, 42(4): 871-877. https://cdmd.cnki.com.cn/Article/CDMD-10151-1024310879.htmHU Y K, XIA W, HU X X, et al. Vessel trajectory prediction based on recurrent neural network[J]. Systems Engineering and Electronics, 2020, 42(4): 871-877. (in Chinese) https://cdmd.cnki.com.cn/Article/CDMD-10151-1024310879.htm [8] 王知昊, 元海文, 李维娜, 等. 交汇水域船舶轨迹预测与航行意图识别[J]. 交通信息与安全, 2022, 40(4): 101-109. doi: 10.3963/j.jssn.1674-4861.2022.04.011WANG Z H, YUAN H W, L W, et al. Trajectory prediction and intention identification of ships in confluence waters[J]. Journal of Transport Information and Safety, 2022, 40(4): 101-109. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2022.04.011 [9] ZHANG X, FU X, XIAO Z, et al. Vessel trajectory prediction in maritime transportation: Current approaches and beyond[J]. IEEE Transactions on Intelligent Transportation Systems, 2022, 23(11): 19980-19998. doi: 10.1109/TITS.2022.3192574 [10] 徐瑞龙, 祁云嵩, 石琳. 基于Transformer模型和Kalman滤波预测船舶航迹[J]. 计算机应用与软件, 2021, 38(5): 106-111. https://www.cnki.com.cn/Article/CJFDTOTAL-JYRJ202105019.htmXU R L, QI Y S, SHI L. Predicting ship tracks based on transformer model and Kalman filtering[J]. Computer Applications and Software, 2021, 38(5): 106-111. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JYRJ202105019.htm [11] JIANG D, SHI G, LI N, et al. TRFM-LS: transformer-based deep learning method for vessel trajectory prediction[J]. Journal of Marine Science and Engineering, 2023, 11(4): 880. doi: 10.3390/jmse11040880 [12] 甘少君. 数据驱动的内河限制性单向航道船舶调度模型及方法研究[D]. 重庆: 重庆大学, 2017.GAN S J. Study on data-driven vessel scheduling model and method for restricted one-way inland waterway transportation[D]. Chongqing: Chongqing University, 2017. (in Chinese) [13] 张黎翔, 朱怡安, 陆伟, 等. 基于AIS数据的船舶轨迹修复方法研究[J]. 西北工业大学学报, 2021, 39(1): 119-125. https://www.cnki.com.cn/Article/CJFDTOTAL-XBGD202101015.htmZHANG L X, ZHU Y A, LU W, et al. Research on ship trajectory repair method based on AIS data[J]. Journal of Northwestern Polytechnical University, 2021, 39(1): 119-125. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-XBGD202101015.htm [14] 潘侃, 尹春林, 王磊, 等. 基于特征工程的重要节点挖掘方法[J]. 电子科技大学学报, 2021, 50(6): 930-937. https://www.cnki.com.cn/Article/CJFDTOTAL-DKDX202106020.htmPAN K, YIN C L, WANG L, et al. Identifying critical nodes based on feature engineering[J]. Journal of University of Electronic Science and Technology of China, 2021, 50(6): 930-937. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-DKDX202106020.htm [15] 马杰, 何沐蓉, 贾承丰, 等. 基于上下文自编码的船舶行为语义表征[J]. 交通运输工程学报, 2022, 22(4): 334-347. https://www.cnki.com.cn/Article/CJFDTOTAL-JYGC202204026.htmMA J, HE M R, JIA C F, et al. Semantic representation of ship behavior based on context autoencoder[J]. Journal of Traffic and Transportation Engineering, 2022, 22(4): 334-347. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JYGC202204026.htm [16] 张牧行, 申晓红, 何磊, 等. 1种水下目标识别的最大信息系数特征选择方法[J]. 西北工业大学学报, 2020, 38(3): 471-477. https://www.cnki.com.cn/Article/CJFDTOTAL-XBGD202003003.htmZHANG M X, SHEN X H, HE L, et al. A maximum information coefficient feature selection method for underwater target recognition[J]. Journal of Northwestern Polytechnical University, 2020, 38(3): 471-477. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-XBGD202003003.htm [17] 权波, 杨博辰, 胡可奇, 等. 基于LSTM的船舶轨迹预测模型[J]. 计算机科学, 2018, 45(S2): 126-131. https://www.cnki.com.cn/Article/CJFDTOTAL-JTJS202306006.htmQUAN B, YANG B C, HU K Q, et al. Prediction model of ship trajectory based on LSTM[J]. Computer Science, 2018, 45(S2): 126-131. (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-JTJS202306006.htm [18] 吴建华, 彭虎, 王辰, 等. 基于AIS通信量的水上交通事故检测方法[J]. 交通信息与安全, 2023, 41(5): 83-94. doi: 10.3963/j.jssn.1674-4861.2023.05.009WU J H, PENG H, WANG C, et al. A detection method for maritime traffic accidents based on AIS communication volume[J]. Journal of Transport Information and Safety, 2023, 41(5): 83-94. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2023.05.009 [19] LI S, JIN X, XUAN Y, et al. Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting[C]. 33rd Conference on Neural Information Processing Systems, Vancouver, Canada: NeurIPS, 2019. [20] ZHOU H, ZHANG S, PENG J, et al. Informer: beyond efficient transformer for long sequence time-series forecasting[C]. The 35th AAAI Conference on Artificial Intelligence. Online: AAAI, 2021.