This study presents a comprehensive end-to-end framework for recognizing vessel behaviors aimed at preventing vessel-bridge collisions in complex maritime environments. Current monitoring approaches that rely on Automatic Identification Systems or external tracking mechanisms often suffer from class imbalance, cross-domain variability, and limited capability to detect previously unseen high-risk behaviors. To address these challenges, the proposed framework directly analyzes video streams and introduces a standardized behavioral taxonomy, classifying vessel activities into eleven categories while incorporating temporal continuity and behavior transition modeling. A robust dataset construction pipeline is established, consisting of fixed-length frame sequences and mechanisms for cross-domain generalization. The framework integrates a spatio-temporal feature extraction module based on deformable convolution and multi-scale attention, coupled with a cross-instance mutual enhancement mechanism to capture domain-invariant representations. An open-set recognition strategy, grounded in class anchor clustering, enables accurate identification of previously unobserved high-risk behaviors. Furthermore, an adaptive frame sampling strategy dynamically adjusts sampling density around behavior transitions, enhancing recall and capturing infrequent events while minimizing computational cost. Extensive evaluations on both single-domain and multi-domain benchmark datasets, as well as real-world bridge video streams, demonstrate superior performance in terms of overall accuracy, F1-score, detection of rare behaviors, and recall compared with baseline methods. Ablation studies confirm the contribution of each component, and comparisons with open-set recognition methods underscore the practical utility of the proposed approach for anomaly detection. This framework provides a scalable, artificial intelligence-driven solution for vessel behavior recognition, anomaly detection, and cross-domain generalization, supporting intelligent monitoring and early warning in safety-critical maritime operations.