How to extract a collection of trajectories for different vessels from the raw AIS data to discover vessel meeting knowledge is a heavily studied focus. Here, the AIS database is created based on the raw AIS data after parsing, noise reduction and dynamic Ramer-Douglas-Peucker compression. Potential encountering trajectory pairs will be recorded based on the candidate meeting vessel searching algorithm. To ensure consistent features extracted from the trajectories in the same time period, time alignment is also adopted. With statistical analysis of vessel trajectories, sailing segment labels will be added to the input feature. All motion features and sailing segment labels are combined as input to one trajectory similarity matching method based on convolutional neural network to recognize crossing, overtaking or head-on situations for each potential encountering vessel pair, which may lead to collision if false actions are adopted. Experiments on AIS data show that our method is effective in classifying vessel encounter situations to provide decision support for collision avoidance.