# VEPO-S2S: A VESsel Portrait Oriented Trajectory Prediction Model Based on S2S Framework
## 4 Definitions and Problem Statement
### VEPO-S2S Model
#### 4.3.1 Multi-Level Vessel Trajectory Representation Module  
The Multi-level Vessel Trajectory Representation Module is designed to acquire trajectory information and Multi-level Vessel Characteristics and apply distinct encoders for encoding. In this subsection, we introduce the Multi-level Vessel Trajectory Representation Module, which consists of the Feature Acquisition Component and the Feature Representation Component. For the Feature Acquisition Component, we obtained trajectory information and Multi-level Vessel Characteristics through data preprocessing, as described in Section 4.1, and vessel portrait construction, as described in Section 4.2. Simultaneously, building on the RNN and Seq2 Seq models, we introduced the Feature Representation Component, consisting of three distinct encoders. Those encoders are designed to separately handle different input characteristics from the Feature Acquisition Component. The trajectory encoder is responsible for encoding the trajectory information (including the longitude, latitude, speed, course, and navigation distance). This process can be expressed by the following Equation (4)  
\[\begin{split} X_{traj}&=(x_{1},x_{2},\dots,x_{10}) \\ x_{n}&=(lon_{n},lat_{n},sog_{n},cog_{n},dis_{n})\\ H,h,h^{*}&=Enc_{traj}(X_{traj})\end{split} \tag{4}\]  
where \(X_{traj}\) represents the trajectory information, including the normalized longitude, latitude, speed, course, and navigation distance for ten trajectory points. \(H=[h_{1},h_{2},\dots,h_{10}]\) signifies the hidden state at each time step, \(h^{*}\) denotes the hidden state at the final time step, and \(h\) represents the ultimate hidden state. Similar to the trajectory encoder, the task of the label encoder \(Enc_{label}\) is to encode the gold trajectory and output the encoded state \(H_{y}\), where \(Y_{label}\) represents five trajectory points containing the longitude and latitude.  
\[\begin{split} Y_{label}&=(x_{11},x_{12},\dots,x_{15 })\\ y_{n}&=(lon_{n},lat_{n})\\ H_{y}&=Enc_{traj}(Y_{label})\end{split} \tag{5}\]  
The task of the Portrait Feature Encoder is to embed Multi-level Vessel Characteristics into a high-dimensional vector. First, the normalized continuous numerical values (including the length, width, and draft) were concatenated and embedded into an eight-dimensional semantic vector. Second, the discrete vessel type was transformed into a continuous value for model input and individually embedded into another semantic vector. Third, we encoded two 24-dimensional Deep-level Features to capture the Voyage Time Preference and the Anchoring Time Preference (as mentioned in Section 4.2.2), while the Sailing Location Preference was encoded separately. Finally, they were concatenated to form a seven-dimensional feature vector, which was input into the Portrait Feature Encoder for encoding. This process can be expressed by the following Equation (6)  
\[\begin{split} sp&=concat(l,w,d)\\ \widehat{sp}&=embed_{sp}(sp)\\ \widehat{type}&=embed_{type}(type)\\ tim&=concat(\alpha,\beta)\\ \widehat{tim}&=embed_{tim}(tim)\\ \widehat{\gamma}&=embed_{\gamma}(\gamma)\\ por&=concat(Enc_{por}(\widehat{sp},\widehat{type}, \widehat{tim},\widehat{\gamma}))\end{split} \tag{6}\]  
where _por_ represents the portrait feature, and \(embed_{sp}\), \(embed_{type}\), \(embed_{tim}\), and \(embed_{\alpha}\) are the embedding layers. \(Enc_{por}\) is the Portrait Feature Encoder. \(l\), \(w\), and \(d\) represent the length, width, and draft, respectively, \(t\) is the type, \(\alpha\) represents the Voyage Time Preference,\(\beta\) represents the Anchoring Time Preference, and \(\gamma\) is the Sailing Location Preference (as mentioned in Equation (3)).