Abstract
Understanding complex vessel behaviors in port waters is important for maritime traffic supervision, navigation safety management, and intelligent maritime decision-making. However, existing AIS-based studies often focus on isolated behavior recognition or trajectory-level analysis, with limited integration of vessel attributes, navigation scenarios, motion states, and temporally organized behavioral processes. We develop a knowledge graph-driven framework for complex vessel behavior recognition and frequent behavior sequence pattern mining using AIS data. BehaviorEvents are constructed from continuous-navigation segments and integrated with water-area scenarios, motion states, vessel attributes, and temporal relationships to form a unified semantic representation. Based on this representation, interpretable semantic rules are used for event-level complex behavior recognition, while PrefixSpan is applied to Scene–SpeedState–TurningState token sequences to discover recurrent multi-event behavior patterns. Independent expert evaluation, semantic ablation, and sensitivity analyses are used to assess recognition credibility, contextual semantic constraints, and robustness, while a vessel-level Discovery–Validation strategy evaluates the reproducibility of frequent patterns. Experiments on AIS data from Xiamen Port waters involve 16,400 vessels, 239,877 continuous-navigation segments, and 2,457,965 BehaviorEvents, of which 624,561 match at least one predefined semantic rule or candidate condition. Independent expert evaluation of R1–R7 yields a macro-average confirmation rate of 92.11% and a Cohen’s κ of 0.746. Semantic ablation shows that Scene and VesselTypeClass provide important contextual constraints on broad motion-based rule activations, while sensitivity analyses indicate that the main recognition results remain stable under perturbations of motion-state, duration, and temporal-segmentation parameters. From 75,144 valid compressed behavior-token sequences, PrefixSpan identifies recurrent patterns involving medium-speed transit with course adjustments, low-speed–stop combinations, and maneuvering-related behaviors. The dominant Top-20 patterns showed substantial overlap and broadly consistent ranking across the vessel-level Discovery and Validation subsets, with a Jaccard overlap of 0.9048 and a Spearman rank correlation of 0.9654. Comparative evaluation with a normalized relational representation further shows equivalent analytical results, while the knowledge graph provides explicit organization of semantic relationships, temporal paths, and event-level traceability. These results indicate that the proposed framework provides a unified and interpretable semantic basis for connecting event-level complex vessel behavior recognition with sequence-level frequent behavior pattern mining in complex port environments.
1. Introduction
Maritime traffic plays an essential role in global trade, port operations, and maritime safety [1]. With the continuous increase in vessel density, navigation environments in port waters have become increasingly complex [2,3]. In such environments, vessel movements exhibit diverse dynamic behaviors, including transit, berthing, anchoring, waiting, low-speed maneuvering, and course adjustment. The Automatic Identification System (AIS) provides large-scale spatiotemporal trajectory data together with static vessel attributes, making it an important data source for vessel behavior recognition, maritime situation awareness, and safety supervision [4]. Existing AIS-based studies have extensively investigated trajectory prediction, anomaly detection, risk assessment, and vessel behavior recognition [5,6,7]. However, many existing methods primarily focus on trajectory features, prediction results, or isolated behavior categories, while providing limited semantic modeling of the relationships among vessel attributes, navigation scenarios, motion states, and temporally continuous behavior processes. Consequently, complex vessel behaviors in port waters remain difficult to represent and recognize within a unified and interpretable framework.
Knowledge graphs provide an explicit graph-based representation of entities and their semantic relationships, while knowledge engineering and ontology-based modeling provide systematic mechanisms for organizing domain concepts, relationships, and constraints into machine-interpretable structures [8,9]. In maritime applications, knowledge graph and heterogeneous graph models have been used to organize vessels, fairways, anchorages, berths, and other maritime elements into relational semantic structures, providing a basis for maritime scene understanding and automated decision-making [10,11]. Similar knowledge graph-based approaches have also been applied in intelligent transportation to integrate traffic participants, environmental information, and spatial relationships for semantic trajectory representation [12]. In the maritime domain, ontology-based semantic trajectory models further enable vessel characteristics, trajectory events, and spatial relationships with geographic areas of interest to be represented within a unified semantic structure [13]. At the trajectory-representation level, semantic representation, sub-trajectory segmentation, and feature abstraction transform raw AIS trajectories into higher-level behavioral units and semantic descriptions [14,15]. At the behavior-recognition level, kinematic features and spatial-matching mechanisms associate vessel motion states with navigation environments to improve behavior-pattern recognition [16], while knowledge-based and ontology-based approaches incorporate explicit navigation knowledge and rules to support interpretable collision-avoidance decision-making and abnormal behavior identification [17,18]. Ontology-based collision-situation reasoning and text-mining approaches to maritime navigation and communication have also been explored to support maritime safety [19,20]. However, these approaches generally address maritime element modeling, semantic trajectory representation, or specific behavior recognition as relatively separate tasks. A unified semantic representation that connects vessel attributes, water-area scenarios, motion states, and temporally ordered behavior events remains insufficiently developed, which limits the recognition and interpretation of complex vessel behaviors from continuous AIS trajectories.
Beyond event-level behavior recognition, AIS trajectory analysis has increasingly focused on recurrent behavioral structures embedded in vessel movement sequences. Spatial pattern discovery methods, including trajectory clustering, temporal-density analysis, spatiotemporal co-occurrence mining, region-of-interest discovery, and coded trajectory representation, have been used to identify recurrent navigation patterns, traffic aggregation characteristics, spatial associations, and trajectory similarities [21,22,23,24,25]. Frequent pattern mining provides a general framework for discovering recurrent structures in large datasets, including sequential patterns in temporally ordered data [26]. PrefixSpan further enables efficient sequential pattern mining through prefix-projected pattern growth [27], while semantic trajectory pattern mining demonstrates how recurrent structures can be extracted from semantically enriched movement sequences [28]. Such methods provide a useful means of characterizing recurrent multi-event behavioral structures that cannot be fully described by isolated event labels. However, frequent sequential pattern mining is commonly performed separately from semantic behavior recognition, and sequence elements are often constructed independently of an explicit behavior-oriented semantic representation. As a result, event-level complex behavior recognition and sequence-level recurrent pattern discovery are not naturally connected within the same analytical framework. Moreover, the stability and reproducibility of mined frequent behavior patterns across independent data subsets are not always explicitly evaluated, which limits confidence in whether dominant sequence structures reflect persistent behavioral characteristics rather than sample-specific patterns.
To address these limitations, we develop a knowledge graph-driven framework using AIS data for complex vessel behavior recognition and frequent behavior sequence pattern mining. We first organize AIS trajectories into continuous-navigation segments and construct BehaviorEvents as the basic semantic units of vessel movement. Water-area scenarios, motion states, vessel attributes, and temporal relationships are then integrated into a BehaviorEvent-centered vessel behavior knowledge graph. Based on this unified semantic representation, we perform event-level complex behavior recognition using interpretable rules that jointly consider water-area scenarios, motion states, vessel categories, and behavior durations. The recognition results are independently evaluated by two maritime experts, while semantic ablation and a motion-only comparator are used to examine the contribution of contextual semantic information. Robustness is further evaluated by perturbing motion-state discretization thresholds, behavior-duration thresholds, and temporal segmentation settings. For sequence-level analysis, BehaviorEvents are encoded into ordered behavior-token sequences using their Scene, SpeedState, and TurningState attributes, and PrefixSpan is subsequently applied to identify recurrent frequent multi-event behavior patterns. Pattern stability and reproducibility are evaluated using an independent vessel-level discovery–validation design, together with sensitivity analyses of the minimum support threshold and maximum pattern length. The knowledge graph implementation is additionally compared with a normalized relational representation under equivalent analytical tasks to examine differences in semantic relationship expression, temporal-path navigation, and event-level traceability. The resulting framework therefore connects event-level semantic behavior recognition with sequence-level frequent behavior pattern mining through a common BehaviorEvent-centered semantic representation.
Our main contributions are as follows:
- We develop a BehaviorEvent-centered knowledge graph representation for AIS-derived vessel behavior. The proposed representation integrates vessel attributes, continuous-navigation segments, water-area scenarios, motion states, and temporal relationships within a unified semantic structure, providing a common foundation for event-level behavior recognition and sequence-level pattern mining. The graph-based representation is further compared with a normalized relational implementation under equivalent analytical tasks to examine semantic relationship expression, temporal-path navigation, and event-level traceability.
- We develop an interpretable event-level rule-driven method for complex vessel behavior recognition and systematically evaluate its credibility, semantic contribution, and robustness. The rules jointly use water-area scenarios, motion states, vessel categories, and behavior durations to assign complex behavior labels to BehaviorEvents. Independent expert assessment is used to evaluate the recognition results, while semantic ablation and a motion-only comparator quantify the constraining effects of Scene and VesselTypeClass information. Sensitivity analyses of motion-state discretization, behavior-duration thresholds, and temporal segmentation further evaluate the robustness of BehaviorEvent construction and downstream rule-recognition results.
- We develop a PrefixSpan-based method for frequent multi-event behavior sequence pattern mining and explicitly evaluate pattern reproducibility and parameter robustness. BehaviorEvents are encoded into unified Scene–SpeedState–TurningState token sequences, from which recurrent ordered multi-event patterns are mined at the overall and vessel-type-specific levels. An independent vessel-level discovery–validation evaluation further assesses pattern reproducibility, overlap among top-ranked patterns, rank consistency, and support-rate stability, while additional sensitivity analyses examine the effects of the minimum support threshold and maximum pattern length.
2. Knowledge Graph-Driven Methodology for Complex Vessel Behavior Analysis
We develop a knowledge graph-driven methodology for complex vessel behavior analysis using AIS data (Figure 1). Raw AIS records are first subjected to quality control and divided into continuous-navigation segments, from which BehaviorEvents are constructed as the basic semantic units of vessel movement. Each BehaviorEvent is assigned to a functional water-area Scene and associated with speed, acceleration, and turning states, while vessel attributes, segment membership, and temporal relationships between consecutive events are integrated to construct the vessel behavior knowledge graph. Based on this semantic representation, event-level complex vessel behaviors are recognized using predefined rules that jointly consider Scene, motion states, vessel type, and behavior duration. The recognition process is further evaluated through independent expert validation, semantic ablation and a motion-only comparator, Scene-assignment validation, and robustness analyses of navigation-segmentation, motion-state, and duration thresholds. For sequence-level analysis, BehaviorEvents are encoded as ordered behavior tokens composed of Scene, SpeedState, and TurningState, followed by adjacent-duplicate compression and PrefixSpan-based frequent ordered-subsequence mining. The reproducibility of the extracted patterns is evaluated using a ship-type-stratified vessel-level Discovery–Validation split, while the effects of the minimum support threshold and maximum pattern length are examined through parameter-sensitivity analysis. Finally, the knowledge graph representation is compared with a normalized relational representation using equivalent query tasks to evaluate result equivalence, query structure, temporal-path access, event-level traceability, and descriptive runtime characteristics. Together, these stages form a unified framework that links AIS-derived BehaviorEvent construction, knowledge graph-based semantic representation, event-level complex behavior recognition, frequent sequence-pattern mining, and representation-level evaluation.
Figure 1.
Overall workflow of the proposed framework.
2.1. AIS Data Preprocessing and BehaviorEvent Construction
We preprocess the raw AIS records through a sequence of quality-control, trajectory-segmentation, motion-state discretization, and event-construction procedures to obtain reliable BehaviorEvents for subsequent semantic analysis. After invalid, duplicate, and physically implausible AIS observations are identified and handled, the retained records are organized by vessel and chronological order and divided into continuous-navigation segments according to temporal continuity. Point-level motion features, including speed, acceleration, and turning rate, are then derived from consecutive AIS observations and discretized into predefined motion states. Within each continuous-navigation segment, initial BehaviorEvent boundaries are determined primarily by changes in speed and turning states, while acceleration states are retained as event attributes rather than independently defining event boundaries. Very short initial events are subsequently handled using a deterministic event-merging procedure, after which the retained BehaviorEvents are chronologically reindexed and assigned unique identifiers. Each BehaviorEvent stores its temporal characteristics, representative spatial information, observation characteristics, motion features, and corresponding motion states, thereby providing the basic semantic unit for water-area scene assignment, knowledge graph construction, and subsequent behavior analysis. The AIS quality-control procedures, continuous-navigation segmentation and BehaviorEvent construction, and motion-state discretization and threshold settings are described in Section 2.1.1, Section 2.1.2 and Section 2.1.3, respectively.
2.1.1. AIS Data Cleaning and Quality Control
Raw AIS records were first subjected to validity screening and field standardization to ensure the reliability of subsequent trajectory segmentation and BehaviorEvent construction. Records with invalid MMSI identifiers, missing or invalid timestamps, or longitude and latitude values outside the valid geographic range were excluded. Geographic coordinates were converted to decimal degrees, speed over ground (SOG) was expressed in knots, and course over ground (COG) was expressed in degrees. Records retained for subsequent analysis were required to have SOG values within 0–30 kn and COG values within [0°,360°). Invalid heading values were treated as missing values without removing the corresponding AIS records. Duplicate observations were identified using the combination of MMSI, timestamp, longitude, and latitude, and records sharing the same combination were consolidated into a single observation, with SOG, COG, and heading values averaged within each duplicate group. After cleaning and deduplication, AIS records were chronologically ordered for each vessel, and sampling intervals between consecutive observations were calculated to characterize temporal continuity and support the subsequent trajectory-segmentation procedure. Trajectory plausibility was additionally assessed using the distance and implied speed between adjacent observations as quality-control diagnostics, which were used to characterize potentially implausible spatial jumps rather than as additional record-removal criteria. The resulting cleaned AIS observations were then used for continuous-navigation segmentation and BehaviorEvent construction as described in Section 2.1.2.
2.1.2. Continuous-Navigation Segmentation and BehaviorEvent Construction
We first grouped the cleaned AIS observations by Maritime Mobile Service Identity (MMSI) and ordered them chronologically for each vessel. The ordered observations were then divided into continuous-navigation segments whenever the time interval between two consecutive AIS observations was strictly greater than 60 min. Segments containing at least three observations and having a positive duration were retained as valid continuous-navigation segments, while those used for BehaviorEvent construction were further restricted to 5–5000 observations and durations between 300 s and 7 days. Within each retained segment, point-level motion features and the corresponding discrete motion states were derived according to the definitions in Section 2.1.3. These motion states were used to determine the initial BehaviorEvent boundaries: a new event was created whenever either the speed state or the turning state changed, whereas a change in acceleration state alone did not trigger a new event. The resulting initial BehaviorEvents were then examined for insufficient observation support, and single-point events were iteratively merged with adjacent events. When both neighboring events were available, the single-point event was merged into the neighbor containing more AIS observations; if both neighbors contained the same number of observations, the preceding event was selected; when only one neighboring event was available, that event was used as the merge target. This procedure was repeated until no single-point BehaviorEvents remained. The resulting events were further refined using the low-speed turning-state treatment described in Section 2.1.3. Events with durations of no more than 5 s were merged into the preceding non-short event when available, or otherwise into the following non-short event, after which the corresponding motion features and states were recalculated. Consecutive event units with identical speed, acceleration, and turning states were subsequently merged into a single BehaviorEvent. Finally, the resulting BehaviorEvents were chronologically reindexed within each continuous-navigation segment and assigned unique event identifiers. For each final BehaviorEvent, we retained the start and end times, duration, number of supporting AIS observations, start and end positions, representative mean position, aggregated motion features, and discrete motion states as the event-level information used in subsequent semantic representation and vessel behavior analysis.
2.1.3. Motion-State Discretization and Threshold Settings
We characterized vessel motion at both the AIS-point and BehaviorEvent levels using speed, acceleration, and turning states. Let denote the speed over ground (SOG) of the i-th AIS observation in knots. Based on SOG, the point-level speed state was defined as
These thresholds distinguish stationary or near-stationary movement, low-speed maneuvering, regular transit, and high-speed movement. To derive acceleration, SOG was first converted from knots to meters per second as
where denotes the converted speed of the i-th observation. The acceleration between two consecutive AIS observations was then calculated as
where denotes the time interval between two consecutive observations in seconds.The corresponding acceleration state was defined as
where acceleration is measured in . Turning states were derived from changes in course over ground (COG). Let denote the COG of the i-th observation and let denote the raw angular difference between two consecutive observations. Because course angles are circular, the angular difference was normalized to the interval [−180°,180°) as
The turning rate was subsequently calculated as
where is expressed in degrees per minute and is expressed in seconds. Based on the turning rate, the point-level turning state was defined as
Under this sign convention, negative turning rates indicate left turns and positive turning rates indicate right turns. When acceleration or turning rate could not be calculated, including for the first AIS observation of each continuous-navigation segment where no preceding observation was available, the corresponding states were assigned as ConstantSpeed and Straight, respectively. After BehaviorEvent aggregation, the event-level speed, acceleration, and turning states were recalculated from the aggregated motion features using the same discretization thresholds. To reduce spurious turning states caused by course fluctuations during near-stationary movement, the final turning state of a BehaviorEvent was set to Straight when its average SOG was below 1.0 kn; otherwise, the turning state was determined from its aggregated turning rate according to Equation (7). The above thresholds were treated as operational discretization parameters rather than universal physical boundaries. Their effects on BehaviorEvent construction and subsequent behavior recognition were therefore evaluated through one-at-a-time ±20% perturbations of the speed, acceleration, and turning thresholds, as described in Section 2.3.4.
2.2. Knowledge Graph-Driven Semantic Representation
Building on the BehaviorEvents constructed in Section 2.1, we organize the event-level vessel behavior information into a knowledge graph-driven semantic representation through three connected components. First, each BehaviorEvent is spatially associated with functional water-area scenes, and a semantic priority rule is applied when its representative location overlaps multiple scene polygons to obtain a consistent scene assignment. Second, the speed, acceleration, and turning states derived in Section 2.1.3 are represented as explicit semantic state categories and associated with the corresponding BehaviorEvents, thereby combining spatial context with event-level motion characteristics. Finally, vessels, continuous-navigation segments, BehaviorEvents, water-area scenes, motion states, vessel-type classes, and size classes are organized as graph entities, and semantic relationships are defined to preserve vessel ownership, segment membership, temporal order, spatial context, motion-state associations, and vessel attributes. Section 2.2.1 describes water-area scene assignment and semantic priority, Section 2.2.2 presents the semantic representation of BehaviorEvent states, and Section 2.2.3 defines the knowledge graph schema and the relationships among the corresponding entities.
2.2.1. Water-Area Scene Assignment and Semantic Priority
We associated each BehaviorEvent with a functional water-area scene to incorporate the spatial context of vessel movement into the semantic representation. Five scene types were considered: GeneralWater, Port, Lane, Anchorage, and Berth. For the i-th BehaviorEvent , its representative location was defined by the mean longitude and latitude of its constituent AIS observations,
where and denote the mean longitude and latitude of , respectively. The representative point was spatially matched with the predefined water-area polygons. Let denote the polygon of scene and let denote the scene set. The candidate scene set of was defined as
Because functional water-area polygons may spatially overlap, a predefined semantic priority was used to obtain a unique scene assignment. The priority was specified as Berth > Anchorage > Lane > Port > GeneralWater, reflecting the progression from more function-specific operational areas to broader navigation areas. When the representative point intersected more than one candidate polygon, the candidate with the highest semantic priority was selected; when multiple candidate polygons had the same priority, the polygon with the smaller area was selected. Let denote the priority rank of scene , with a smaller value indicating a higher priority, and let denote the area of its polygon. The final scene assignment was therefore defined as
where the two criteria are evaluated lexicographically, with semantic priority considered before the polygon area. This procedure assigns each BehaviorEvent a single functional water-area context while resolving spatial overlaps consistently. To assess the robustness of using the event representative point, we additionally performed a point-level Scene assignment for all AIS observations contained in each BehaviorEvent using the same spatial-matching and semantic-priority rules. For each event, the alternative Scene was defined as the scene type containing the largest number of its constituent AIS observations, with ties resolved according to the same semantic priority. Events whose constituent observations were assigned to more than one scene type were identified as multi-scene events, and the representative-point assignment was compared with the point-count-dominant assignment at the functional scene-type level. The resulting agreement, multi-scene characteristics, overlap-resolution statistics, and the sensitivity of scene-dependent behavior rules to the alternative assignment are evaluated in Section 4.2.2.
2.2.2. Semantic Representation of BehaviorEvent States
For each BehaviorEvent, we represented the event-level motion characteristics derived in Section 2.1.3 using three categorical semantic states: SpeedState, AccelerationState, and TurningState. Let , , and denote the final event-level speed, acceleration, and turning states of BehaviorEvent , respectively. The motion-state representation of was defined as
The SpeedState categories include Stop, LowSpeed, MediumSpeed, and HighSpeed; the AccelerationState categories include Decelerating, ConstantSpeed, and Accelerating; and the TurningState categories include Straight, LeftTurn, RightTurn, and SharpTurn. These categorical states were represented explicitly as semantic state entities rather than retained only as numerical motion attributes. Each BehaviorEvent was associated with one SpeedState, one AccelerationState, and one TurningState, allowing its motion characteristics to be expressed through a consistent discrete semantic representation. Together with the water-area Scene assigned in Section 2.2.1, this representation combines the spatial context and motion characteristics of each BehaviorEvent and provides the semantic basis for the graph schema and relationship construction described in Section 2.2.3.
2.2.3. Knowledge Graph Schema and Semantic Relationship Construction
Based on the BehaviorEvents, water-area scenes, and semantic motion states defined in the preceding sections, we organized vessel behavior information into a unified graph-based semantic structure. The vessel behavior knowledge graph was defined as
where denotes the node set, denotes the set of relationship types, and denotes the set of directed semantic relationships. At the conceptual level, the graph contains nine entity types: Vessel, ContinuousNavigationSegment, BehaviorEvent, Scene, SpeedState, AccelerationState, TurningState, VesselTypeClass, and SizeClass. Vessel represents an individual vessel, while ContinuousNavigationSegment represents a temporally continuous AIS trajectory segment constructed in Section 2.1.2. BehaviorEvent serves as the central semantic unit linking vessel movement processes with temporal, spatial, and motion-state information. Scene represents the functional water-area context assigned in Section 2.2.1, while SpeedState, AccelerationState, and TurningState represent the event-level semantic motion states defined in Section 2.2.2. VesselTypeClass and SizeClass describe vessel-type and vessel-size attributes, respectively. Semantic relationships are then used to organize these entities into a hierarchical and temporally ordered behavior structure. A Vessel is associated with its ContinuousNavigationSegments, each ContinuousNavigationSegment contains the BehaviorEvents occurring within it, and consecutive BehaviorEvents are connected through NEXT relationships to preserve their chronological order. Each BehaviorEvent is further associated with its corresponding Scene, SpeedState, AccelerationState, and TurningState, while Vessel entities are linked to their vessel-type and size-class information. In the Neo4j implementation, the conceptual entities Vessel and ContinuousNavigationSegment are stored using the node labels Ship and Voyage, respectively, and VesselTypeClass is implemented as ShipTypeClass. Accordingly, the conceptual vessel–segment and segment–event associations illustrated in Figure 2 are implemented through relationships, including HAS_VOYAGE, PERFORMS, and IN_VOYAGE, while vessel-type and size associations are represented by HAS_TYPE_CLASS and HAS_SIZE_CLASS. The remaining event-level semantic associations are implemented through NEXT, OCCURS_IN, HAS_SPEED_STATE, HAS_ACCEL_STATE, and HAS_TURN_STATE. This distinction allows Figure 2 to present the semantic organization of vessel behavior at a clear conceptual level, while the Neo4j implementation preserves the corresponding ownership, segment-membership, temporal, spatial, motion-state, and vessel-attribute relationships using implementation-specific node and relationship labels. The resulting BehaviorEvent-centered graph provides the structured semantic basis for subsequent rule-driven behavior recognition, frequent sequential pattern mining, and knowledge graph-based relational analysis.
Figure 2.
Conceptual semantic schema of the vessel behavior knowledge graph.
2.3. Event-Level Rule-Driven Complex Vessel Behavior Recognition and Validation
We perform interpretable complex vessel behavior recognition at the BehaviorEvent level using the semantic information organized in the vessel behavior knowledge graph. The analysis proceeds from rule-based recognition to independent validation and robustness assessment. First, we define a set of semantic rules by jointly considering water-area Scene, motion states, vessel-type characteristics, and event duration, and apply these rules to individual BehaviorEvents to obtain event-level behavior labels. The resulting recognition outcomes are then independently assessed by domain experts using sampled BehaviorEvents and their corresponding trajectory and contextual information, providing an external evaluation of the semantic consistency and reliability of the rule-defined behavior categories. We further examine the contribution of contextual semantic information by comparing the complete rule formulation with variants in which Scene or vessel-type information is removed, together with a motion-only comparator that retains only motion-related conditions. Finally, we evaluate the sensitivity of the recognition framework to the main motion-state thresholds, duration-dependent rule thresholds, and selected BehaviorEvent construction settings to determine whether the resulting behavior assignments remain stable under reasonable parameter perturbations. Section 2.3.1 describes the semantic rule definitions and event-level recognition procedure, Section 2.3.2 presents the expert-based independent validation, Section 2.3.3 introduces the semantic ablation and motion-only comparator, and Section 2.3.4 describes the threshold and event-construction robustness evaluation.
2.3.1. Semantic Rule Definition and Event-Level Recognition
We designed the event-level rule set by combining the semantic attributes represented in the knowledge graph with interpretable vessel-motion and water-area constraints. Previous AIS-based studies have shown that elementary motion characteristics can be combined with spatial relationships between vessel trajectories and the navigation environment to derive higher-level behavior semantics [14,16], while knowledge- and ontology-based approaches have demonstrated the value of explicit domain knowledge and rule representations for interpretable maritime behavior analysis [17,18]. Following these principles, we defined eight operational semantic rules using water-area Scene, SpeedState, TurningState, ShipTypeClass, and BehaviorEvent duration. Rules R1–R7 represent seven characteristic event-level behavior categories: fairway transit, berthing or staying, anchoring or waiting, low-speed complex maneuvering in port waters, long-duration low-speed behavior of fishing vessels, fast transit of passenger vessels, and task-oriented high-speed maneuvering. R8 is defined separately as an Unclassified Behavior Candidate for supplementary screening of specific high-speed behavior combinations that warrant further inspection. These rules are designed for the BehaviorEvent representation adopted in this study and are not intended as a universal taxonomy of vessel behavior. The detailed recognition criteria are summarized in Table 1.
Table 1.
Semantic rules for event-level complex vessel behavior recognition.
For each BehaviorEvent, we retrieved its Scene, SpeedState, TurningState, ShipTypeClass, and duration and evaluated these attributes against all predefined rule conditions. A rule hit was recorded only when all conditions of the corresponding rule were satisfied. Because the rules are not mutually exclusive, a single BehaviorEvent may satisfy more than one rule; therefore, all matched rules were retained for rule-level statistical analysis. When a single representative label was required for subsequent analysis, the main rule was selected according to the predefined priority R6 > R7 > R5 > R2 > R3 > R4 > R8 > R1. BehaviorEvents that did not satisfy any rule were retained as unlabeled events rather than being discarded. Rules R1–R7 were used as the main event-level behavior categories for subsequent analysis, while R8 was retained only as a supplementary screening category.
2.3.2. Expert-Based Independent Validation
To independently evaluate the semantic reliability of the rule-defined behavior categories, we constructed a stratified expert-validation dataset from the recognized BehaviorEvents. Before sampling, candidate events were required to contain at least 10 AIS observations and have a duration of at least 30 s so that sufficient trajectory evidence was available for expert judgment. We then sampled 50 rule-hit events from each of R1–R8, yielding 400 rule-validation samples, and additionally selected 25 newly matched events from the Without Scene configuration and 25 from the Without VesselType configuration for the semantic-ablation assessment described in Section 2.3.3. The sampling procedure prioritized diversity across vessels and continuous-navigation segments and enforced global event-level uniqueness across all sampling strata, resulting in 450 unique BehaviorEvents. Two domain experts independently reviewed the same set of samples. For each sample, the experts were provided with an anonymized vessel identifier, vessel type, event start and end times, duration, average SOG, AIS observation count, sampling-interval information, and a local trajectory figure showing the target-event AIS geometry, SOG–time variation, and surrounding functional water-area boundaries. The algorithm-assigned Scene and rule-hit information were not disclosed during annotation. Each expert independently assessed the predefined behavior categories using 1 for present, 0 for absent, and ? when the available evidence did not support a definite decision; multiple behavior categories could be selected for the same event. Experts could also mark Insufficient_Evidence when the AIS observations were inadequate for a reliable judgment. A strict two-expert consensus was formed only when both experts considered the evidence sufficient and independently assigned the same binary judgment to the corresponding behavior category. Samples involving uncertain judgments, disagreement between experts, or insufficient evidence identified by either expert were retained as unresolved and excluded from the consensus-based confirmation analysis. For each rule r, expert confirmation was quantified among the resolved rule-hit samples as
where denotes the number of resolved samples for which the two-expert consensus confirmed the corresponding behavior and denotes the total number of resolved samples for rule r. A 95% Wilson confidence interval was calculated for each confirmation rate. Because the validation samples were stratified by rule hits rather than sampled according to the natural positive and negative prevalence of all BehaviorEvents, the confirmation rate was used as the primary rule-level validity measure and was not interpreted as overall recall, specificity, or F1 score. Inter-expert reliability was further evaluated using observed agreement, positive and negative agreement, and Cohen’s kappa. Cohen’s kappa was calculated as
where denotes the observed proportion of agreement between the two experts and denotes the agreement expected by chance. For the primary behavior categories R1–R7, the rule-level confirmation rates were additionally summarized using an unweighted macro-average, while R8 was reported separately as a supplementary screening category.
2.3.3. Semantic Ablation and Motion-Only Comparator
To evaluate how contextual semantic information constrains event-level rule matching, we compared the complete rule formulation with three reduced configurations on the same set of BehaviorEvents. The Full KG-based configuration retained all Scene, ShipTypeClass, motion-state, and duration conditions defined in Section 2.3.1. The Without Scene configuration removed only the Scene condition from rules that explicitly depended on water-area context, while preserving all other conditions. The Without VesselType configuration similarly removed only the ShipTypeClass condition from rules that depended on vessel type. The Motion-only comparator removed both Scene and ShipTypeClass constraints and retained only the motion-state and duration conditions originally included in each rule. For rules that did not depend on a removed semantic attribute, the rule definition remained unchanged. The primary comparison was conducted for Rules R1–R7, whereas R8 was excluded because it serves as a supplementary screening category rather than a primary behavior category. Let denote the set of BehaviorEvents matched by rule under the Full KG-based configuration, and let denote the corresponding set under reduced configuration . The expansion ratio was defined as
and the set of newly matched events introduced after removing semantic constraints was defined as
Removing semantic conditions, such as Scene or ShipTypeClass, relaxes the corresponding rule and therefore generally increases the number of matched BehaviorEvents. These additional matches indicate an expansion of the rule-matching scope and do not by themselves imply improved recognition performance. To quantify the filtering effect of the complete semantic rule on these additional matches, we further defined the semantic filtering rate as
This measure represents the proportion of matches admitted after semantic constraints are removed but excluded when the complete contextual rule is applied. At the overall level, we additionally compared the total number of R1–R7 rule hits, the number and proportion of unique BehaviorEvents matched by at least one rule, and the average number of rule hits per matched event across the four configurations. To further assess whether the additional matches generated by semantic relaxation were behaviorally supported, 25 newly matched events from the Without Scene configuration and 25 from the Without VesselType configuration were independently reviewed by the two experts using the validation protocol described in Section 2.3.2. The expert assessment of these newly matched events was used together with the rule-scope statistics to evaluate the contextual role of Scene and vessel-type information, while the Motion-only configuration was retained as a structural comparator rather than treated as an independent classifier.
2.3.4. Threshold and Event-Construction Robustness Evaluation
We evaluated the robustness of the event-construction and rule-recognition procedures by varying the main temporal and motion-state thresholds while keeping the remaining processing conditions unchanged. First, the 60 min temporal-gap threshold used to construct continuous-navigation segments was compared with alternative thresholds of 30 and 90 min. A new segment was created only when the interval between two consecutive AIS observations was strictly greater than the selected threshold, while the requirements for valid segments and subsequent BehaviorEvent input remained unchanged across the three configurations. The resulting numbers of continuous-navigation segments, retained AIS observations, and BehaviorEvent-input segments were compared with those obtained under the 60 min baseline to evaluate the sensitivity of the input structure to the segmentation threshold. We then examined the motion-state thresholds used in BehaviorEvent construction through a one-at-a-time perturbation design. For a baseline threshold , the perturbed threshold was defined as
The ±20% variation was used only to evaluate parameter sensitivity and did not represent a recalibration of the original motion-state thresholds. The three speed thresholds were jointly varied within the speed-threshold family from the baseline values of 0.5, 5, and 12 kn to 0.4, 4, and 9.6 kn under the −20% configuration and to 0.6, 6, and 14.4 kn under the +20% configuration. The turning thresholds of 5 and 15°/min were similarly changed to 4 and 12°/min and to 6 and 18°/min, while the acceleration threshold of 0.02 For each threshold configuration, the BehaviorEvent construction procedure was reproduced using the same AIS-point input and the same event-processing rules. Speed- and turning-threshold variants were allowed to modify the initial event boundaries because these states determine the initial segmentation, whereas acceleration-threshold variants retained the initial boundaries because acceleration state does not independently trigger a BehaviorEvent boundary. The low-speed turning correction, the single-point merging procedure, and the ≤5 s short-event consolidation were kept unchanged in all configurations so that the analysis isolated the effects of the tested thresholds. Changes in the number and characteristics of the resulting BehaviorEvents were examined, and the consistency of final event boundaries relative to the baseline was quantified using the Jaccard index
where and denote the sets of final BehaviorEvent boundaries under the baseline and perturbed configurations, respectively. Because changes in state thresholds can alter BehaviorEvent boundaries and therefore event identifiers, downstream recognition robustness was evaluated at the AIS-point level rather than by directly comparing event IDs. For each R1–R7 rule, the baseline and perturbed BehaviorEvents were projected to their constituent AIS observations while the formal Scene and ShipTypeClass information was held fixed, and the overlap of rule-covered AIS points was calculated as
where and denote the AIS-point sets covered by rule under the baseline and perturbed configurations, respectively. Finally, the duration thresholds used by R2, R3, and R5 were independently varied by ±20% while their Scene, ShipTypeClass, and motion-state conditions remained unchanged. Accordingly, the 600 s threshold of R2 was evaluated at 480, 600, and 720 s, whereas the 1800 s thresholds of R3 and R5 were evaluated at 1440, 1800, and 2160 s. Changes in rule-hit counts and overlap with the baseline rule-hit sets were then used to assess the sensitivity of these duration-dependent rules. In addition, we assessed the integrity and observation support of the final BehaviorEvents by verifying point conservation, checking for remaining single-point or zero-duration events, and examining the distributions of AIS observation counts and internal time gaps within events. These diagnostics provided a complementary assessment of whether the event-construction procedure preserved the available AIS observations while maintaining adequate temporal continuity.
2.4. Sequence-Level Frequent Behavior Pattern Mining
Building on the chronologically ordered BehaviorEvents within each continuous-navigation segment, we further analyze recurrent vessel behavior patterns at the sequence level. Each BehaviorEvent is encoded as a behavior token using its Scene, SpeedState, and TurningState attributes, and consecutive identical tokens are compressed before PrefixSpan mining. PrefixSpan is then used to identify recurrent ordered multi-event patterns, where the retained tokens preserve their temporal order but are not necessarily adjacent in the original BehaviorEvent sequence. To evaluate pattern stability, vessels are divided into disjoint Discovery and Validation subsets using a ship-type-stratified deterministic 8:2 vessel-level split, and the resulting patterns are compared in terms of reproducibility, Top-K overlap, rank consistency, and support-rate variation. We further examine the sensitivity of the mining results to the minimum support threshold and maximum pattern length. Section 2.4.1, Section 2.4.2, Section 2.4.3 and Section 2.4.4 describe tokenization and sequence construction, PrefixSpan mining, vessel-level reproducibility evaluation, and parameter sensitivity, respectively.
2.4.1. Behavior Tokenization and Sequence Construction
To construct a unified representation for sequence-level behavior analysis, we encoded each BehaviorEvent using its water-area Scene, SpeedState, and TurningState. For the i-th BehaviorEvent in the k-th continuous-navigation segment, the corresponding behavior token was defined as
where denotes the Scene assigned to the BehaviorEvent, and and denote its event-level SpeedState and TurningState, respectively. Each token therefore represents the spatial context and principal motion characteristics of a BehaviorEvent as a single discrete semantic state. AccelerationState was retained in the event-level semantic representation described in Section 2.2.2 but was not included in the behavior token, because the sequence analysis focused on the combined variation in Scene, SpeedState, and TurningState. We then arranged all BehaviorEvents within each continuous-navigation segment according to their chronological order. For the k-th segment containing BehaviorEvents, the resulting behavior-token sequence was expressed as
Consecutive identical tokens in were subsequently compressed into a single occurrence so that a continuously maintained semantic state was represented only once. Let denote this adjacent-duplicate compression operation; the compressed sequence was defined as
This operation preserves the chronological order of distinct behavior states while reducing repeated representations caused by consecutive BehaviorEvents with the same Scene–SpeedState–TurningState combination. The resulting compressed sequences were used as the input for the PrefixSpan-based frequent multi-event pattern mining described in Section 2.4.2.
2.4.2. PrefixSpan-Based Frequent Multi-Event Pattern Mining
Based on the compressed behavior-token sequences constructed in Section 2.4.1, we applied PrefixSpan [27] to identify recurrent ordered multi-event behavior patterns. Only compressed sequences containing at least three tokens were retained for mining. Let denote the resulting sequence database, where is the number of valid compressed sequences. For a candidate pattern , its support was defined as the number of sequences in that contain as an ordered subsequence:
where indicates that the tokens of occur in in the same relative order, but not necessarily at adjacent positions. The corresponding support rate was calculated as
A pattern was regarded as frequent when its support reached the predefined minimum-support threshold. For overall-sample mining, the minimum support count was set to the larger of 1000 sequences and 1% of the valid sequence count. For vessel-type-specific mining, the minimum support count was set to the larger of 50 sequences and 2% of the valid sequence count within the corresponding vessel type. The maximum pattern length was set to . PrefixSpan recursively extends frequent prefixes through prefix-projected sequence databases until no further frequent extension is available or the maximum pattern length is reached. The baseline support and pattern-length settings are further examined through the parameter-sensitivity analysis described in Section 2.4.4. Importantly, PrefixSpan mines ordered subsequences rather than strictly adjacent BehaviorEvent transitions. The compression described in Section 2.4.1 removes only consecutive identical tokens. If the same token occurs again after one or more different states, these repeated occurrences are retained in the sequence. Therefore, the same token may appear multiple times in a PrefixSpan pattern. We performed PrefixSpan mining at both the overall-sample and vessel-type-specific levels to characterize recurrent behavior structures and differences among vessel categories. The resulting patterns were represented by their token sequences, pattern lengths, support values, and support rates and were subsequently analyzed in Section 4.4.
2.4.3. Vessel-Level Stability and Reproducibility Evaluation
To evaluate whether the frequent behavior patterns identified by PrefixSpan remain stable across independent vessel samples, we divided the vessels into Discovery and Validation subsets using a ship-type-stratified deterministic 8:2 vessel-level split. All behavior sequences generated by the same vessel were assigned to only one subset, so the two subsets contained disjoint vessel populations. We then performed PrefixSpan mining independently on the Discovery and Validation subsets using the same behavior-token representation, adjacent-duplicate compression, minimum compressed sequence length, and maximum pattern length defined in Section 2.4.1 and Section 2.4.2. To maintain comparable frequency criteria across the two subsets, both subsets used the same effective relative support threshold derived from the full-data configuration, while the corresponding absolute minimum-support count was adjusted according to the number of valid sequences in each subset. Pattern stability was evaluated for K = 10, 20, and 50, with K = 20 used as the primary setting. Four complementary metrics were used. First, the pattern reproducibility rate measures the proportion of the Discovery Top-K patterns that also satisfy the minimum-support-rate threshold in the independent Validation subset. Let denote the Discovery Top-K pattern set, denote the support rate of pattern in the Validation subset, and denote the corresponding effective minimum-support rate. The pattern reproducibility rate was defined as
where is an indicator function. The Validation support rate of every Discovery Top-K pattern was directly counted from the Validation sequences, regardless of whether that pattern appeared in the independently mined Validation Top-K list. Second, the overlap between the independently mined Top-K pattern sets was measured using the Jaccard index:
where denotes the independently mined Validation Top-K pattern set. Third, Spearman’s rank correlation coefficient was used to evaluate whether the relative support ordering of the Discovery Top-K patterns remained consistent in the Validation subset. Let and denote the support-rate vectors of the same Discovery Top-K patterns measured in the Discovery and Validation subsets, respectively. The rank correlation was defined as
where denotes the rank transformation. Finally, the mean absolute support-rate difference was used to quantify the magnitude of support variation between the two independent subsets:
where and denote the support rates of pattern in the Discovery and Validation subsets, respectively, and is expressed in percentage points. Higher values of , , and , together with a lower , indicate greater stability and reproducibility of the frequent behavior patterns across independent vessel populations. These metrics evaluate pattern reproducibility rather than classification accuracy or behavioral correctness.
2.4.4. Support-Threshold and Pattern-Length Sensitivity
We examined the sensitivity of PrefixSpan to two key parameters using the Discovery subset: the minimum support rate and the maximum pattern length. The minimum support rate was set to 1.0%, 1.3308%, 1.5%, and 2.0%, with 1.3308% used as the baseline effective support rate. The maximum pattern length was set to , 4, and 5, with as the baseline. All parameter configurations were evaluated on the same Discovery sequence dataset. When examining the effect of the minimum support rate, was fixed at 4; when examining the effect of the maximum pattern length, the baseline support rate was fixed. Let denote the baseline Top-K pattern set and PK(v) denote the Top-K pattern set under parameter configuration v. Their overlap was measured using the Jaccard index:
and the retention rate of the baseline Top-K patterns was defined as
Higher values of and indicate greater preservation of the leading pattern set. For patterns appearing in both Top-K sets, we further evaluated ranking consistency using Spearman’s rank correlation coefficient,
where and denote the ranks of the common patterns under the baseline and variant configurations, respectively. The magnitude of rank variation was further quantified using the mean absolute rank displacement,
where , and and denote the ranks of pattern under the baseline and variant configurations. A higher Spearman correlation and a lower indicate greater ranking stability. For more restrictive parameter settings, we distinguished patterns excluded by the maximum pattern length or minimum support threshold from patterns that remained eligible but changed in rank. Overall parameter robustness was evaluated using pattern retention, Top-K pattern-set overlap, rank correlation, and mean absolute rank displacement.
2.5. Comparative Evaluation of Knowledge Graph and Relational Representations
To compare the characteristics of graph-based and relational representations for vessel behavior analysis, we implemented the same underlying data in a Neo4j property graph and a normalized DuckDB relational database. Both representations were evaluated using four equivalent query tasks, including event semantic-context retrieval, cross-dimensional aggregation, NEXT-based temporal multi-hop analysis, and rule-hit event traceability. Query results were first compared to confirm analytical consistency between the two implementations. We then examined how the same information was organized and accessed in each representation, with particular attention to semantic relationships, temporal paths, multi-hop navigation, event traceability, and schema extensibility. Query runtime was also recorded as a descriptive implementation characteristic.
3. Data and Experimental Setup
We conducted the experiments using AIS data collected from Xiamen Port waters between May and July 2025. The dataset contains more than 109 million raw AIS records, vessel static information, and polygon data describing functional water areas. The AIS records include MMSI, timestamp, longitude, latitude, speed over ground (SOG), course over ground (COG), heading, and navigation status, while the static data provide vessel-type and size information. The study area is represented by five predefined water-area scenarios: GeneralWater, Port, Lane, Berth, and Anchorage, covering diverse navigation environments and vessel activities. Before behavior modeling, we performed coordinate transformation, duplicate and noise removal, and trajectory-quality filtering. The cleaned AIS records were then organized into continuous-navigation segments using a 60 min time-gap threshold, from which BehaviorEvents were constructed according to the procedure described in Section 2.1.
AIS preprocessing, BehaviorEvent construction, rule-driven behavior recognition, semantic ablation, threshold robustness evaluation, and PrefixSpan-based frequent pattern mining were implemented in Python 3.12, while Neo4j was used to store and query the vessel behavior knowledge graph. For event-level recognition evaluation, four semantic configurations were compared: Full KG-based, Without Scene, Without VesselType, and Motion-only. Duration-threshold robustness was further evaluated for R2, R3, and R5 by perturbing their original duration thresholds by ±10%. For sequence-level analysis, all constructed BehaviorEvents were encoded using the Scene–SpeedState–TurningState representation defined in Section 2.4.1, and adjacent duplicate tokens were compressed before mining. Only compressed sequences containing at least three tokens were retained for PrefixSpan analysis, and the maximum pattern length was set to four. The full-sample minimum support setting corresponded to an effective support rate of 1.3308%. To evaluate pattern stability and reproducibility, the valid sequences were divided at the continuous-navigation-segment level into independent discovery and validation subsets using a deterministic 8:2 partitioning strategy. The resulting subsets contained 60,067 and 15,077 sequences, with minimum support counts of 800 and 201, respectively, and were evaluated using the metrics defined in Section 2.4.3.
3.1. Study Area and AIS Dataset
The AIS dataset used in this study covers Xiamen Port and its surrounding waters in the western Taiwan Strait (Figure 3). In Figure 3, the blue shaded polygon denotes the spatial extent of the AIS study area, and the four vertex coordinates shown in the upper-right corner of the figure define the boundary of this polygon, allowing the geographic extent of the study area to be located explicitly. The four vertices are (118.86382° E, 23.355828° N), (119.542252° E, 24.06393° N), (118.34473° E, 24.973569° N), and (117.627867° E, 24.338527° N). The dataset was obtained from the Shipping Big Data Research Service Platform of Jimei University and covers the period from May to July 2025. This three-month period was selected as a continuous observation window to provide sufficient temporal coverage and sample size while maintaining consistent data acquisition and processing conditions throughout the analysis. It was used for evaluating the proposed framework rather than for representing annual or seasonal variations in vessel traffic. The dataset contains more than 109 million raw AIS records together with vessel static information. The AIS records include MMSI, timestamp, longitude, latitude, speed over ground (SOG), course over ground (COG), heading, and navigation status, while the static information provides vessel type and size attributes. These data were processed according to the quality-control and BehaviorEvent construction procedures described in Section 2.1.
Figure 3.
Spatial extent of the AIS dataset and the study area in Xiamen Port waters.
3.2. Functional Water-Area Data Sources and Spatial Information
We obtained the functional water-area data primarily from the Shipping Big Data Research Service Platform of Jimei University and used additional spatial information from the E-Navigation BeiDou Integrated Service Platform to complement and verify several functional areas. For functional areas with incomplete or unavailable polygon boundaries, we used the additional spatial information as a reference and digitized the corresponding polygons in QGIS to complete the Scene dataset. The resulting spatial data describe the main navigation and operational areas within Xiamen Port waters and were standardized into five Scene categories: GeneralWater, Port, Lane, Anchorage, and Berth. Each Scene is represented by polygon-based spatial information defining the corresponding functional water-area boundary. These spatial data were then integrated with the BehaviorEvents constructed from AIS observations and provided the geographic basis for the event-level Scene assignment described in Section 2.2.1. For overlapping functional areas, the final Scene assignment followed the semantic-priority rules defined in Section 2.2.1.
3.3. Experimental Configuration and Evaluation Setup
We implemented AIS preprocessing, BehaviorEvent construction, rule-driven behavior recognition, semantic ablation, robustness analysis, and PrefixSpan mining in Python, while Neo4j was used to store and query the vessel behavior knowledge graph. For event-level evaluation, four configurations—Full KG-based, Without Scene, Without VesselType, and Motion-only—were compared for R1–R7, and two domain experts independently evaluated the recognized behavior events. The expert-validation dataset contained 450 unique BehaviorEvents, including 50 samples for each of R1–R8 and 25 additional samples from each of the Without Scene and Without VesselType configurations. Candidate events contained at least 10 AIS observations and had a duration of at least 30 s. Robustness was further examined by comparing continuous-navigation segmentation thresholds of 30, 60, and 90 min and by perturbing the speed, turning, acceleration, and duration-related thresholds by ±20%. For sequence-level analysis, 75,144 valid compressed sequences were retained for PrefixSpan mining. The 16,400 vessels were divided into disjoint Discovery and Validation subsets using a ship-type-stratified deterministic 8:2 vessel-level split, resulting in 13,120 and 3280 vessels and 60,344 and 14,800 valid sequences, respectively. The baseline PrefixSpan configuration used an effective overall support rate of 1.3308% and , and pattern reproducibility was evaluated at K = 10, 20, and 50, with K = 20 as the primary setting. Finally, Neo4j and a normalized DuckDB relational database were evaluated using the same four query tasks defined in Section 2.5 to compare their data organization, query representation, temporal-path access, and event traceability under equivalent analytical conditions.
4. Results
4.1. Data Quality, Semantic Representation, and Knowledge Graph Construction Results
4.1.1. AIS Data Quality and BehaviorEvent Construction Results
The quality-controlled AIS dataset contains 90,786,475 core observations after deduplication from the original 109,213,721 records (Table 2). Among these observations, 90,507,943 AIS points are retained in 317,193 valid continuous-navigation segments, corresponding to 82.87% of the original dataset. Each segment contains a median of 11 AIS observations, while the median positive sampling interval between consecutive observations of the same vessel is 10 s. A total of 503,225 adjacent observation pairs have time gaps greater than 60 min, providing the basis for separating discontinuous trajectories. The trajectory-plausibility audit further identifies 555,337 adjacent pairs with implied speeds above 50 kn; these cases are retained as diagnostic indicators rather than removed through post hoc filtering. The resulting BehaviorEvent dataset contains 2,457,965 events constructed from 239,877 continuous-navigation segments covering 16,400 vessels. Each BehaviorEvent contains a median of six AIS observations and has a median duration of 108 s. No single-point or zero-duration events are present in the final dataset, and no time gaps greater than 60 min occur within individual BehaviorEvents. These characteristics show that the resulting event dataset maintains temporal continuity and provides the basis for subsequent semantic representation, behavior recognition, and sequence-pattern analyses.
Table 2.
Summary of AIS data quality and BehaviorEvent construction.
4.1.2. Knowledge Graph Structure and Scale
The constructed vessel behavior knowledge graph is organized around BehaviorEvent nodes, which connect vessel attributes, continuous-navigation segments, spatial context, and motion states within a unified graph structure (Figure 4). Consistent with the schema defined in Section 2.2.3, Ship nodes represent individual vessels, while Voyage nodes represent continuous-navigation segments rather than conventional complete voyages. Each Ship is associated with the corresponding ShipTypeClass and SizeClass and connected to its Voyage nodes through HAS_VOYAGE relationships. BehaviorEvents are linked to their corresponding Ships and Voyages through PERFORMS and IN_VOYAGE relationships, respectively, and are further associated with Scene, SpeedState, AccelerationState, and TurningState nodes. Consecutive BehaviorEvents within the same Voyage are connected through NEXT relationships, thereby preserving their chronological order. This graph structure organizes vessel identity, segment membership, spatial context, motion characteristics, and temporal relationships at the event level.
Figure 4.
Implementation-level schema of the vessel behavior knowledge graph.
For the vessel with MMSI 413574370, the instance-level vessel behavior subgraph is organized as a chronological sequence of six consecutive BehaviorEvents within one continuous-navigation segment (Figure 5). The six events, E1–E6, occur between 02:05:42 and 02:22:11 on 22 May 2025 and span three functional water-area scenes. E1–E4 occur in Anchorage, followed by E5 in Lane and E6 in Port. Their speed and acceleration states remain MediumSpeed and ConstantSpeed throughout the sequence, while the turning states vary among Straight, RightTurn, and LeftTurn. These event-level relationships jointly represent the temporal progression, spatial context, and motion-state variation in the vessel within the same continuous-navigation segment.
Figure 5.
Instance-level multi-scene vessel behavior subgraph.
The resulting knowledge graph contains 16,400 Ship nodes, 239,877 Voyage nodes, and 2,457,965 BehaviorEvent nodes, corresponding to an average of approximately 10.25 BehaviorEvents per Voyage (Table 3). The graph further contains 245 Scene nodes belonging to five functional water-area categories, together with four SpeedState nodes, three AccelerationState nodes, four TurningState nodes, thirteen ShipTypeClass nodes, and five SizeClass nodes. A total of 2,218,088 NEXT relationships connect consecutive BehaviorEvents within the same Voyage and preserve the chronological organization of event sequences. Each BehaviorEvent is additionally linked to its Scene and motion states through OCCURS_IN, HAS_SPEED_STATE, HAS_ACCEL_STATE, and HAS_TURN_STATE relationships. Together with HAS_VOYAGE, PERFORMS, and IN_VOYAGE, these relationships define the spatial, temporal, motion-state, and vessel-attribute organization of the constructed knowledge graph.
Table 3.
Scale statistics of the vessel behavior knowledge graph.
4.1.3. Water-Area Scenario and Motion-State Characteristics
BehaviorEvents are unevenly distributed across the five functional water-area scenarios (Figure 6). GeneralWater contains 1,209,253 events (49.20%), followed by Port with 854,649 events (34.77%), and these two scenarios together account for 83.97% of all BehaviorEvents. Lane contains 229,668 events (9.34%), while Anchorage and Berth contain 105,305 (4.28%) and 59,090 (2.40%) events, respectively. The event distribution is therefore concentrated mainly in GeneralWater and Port, with relatively smaller proportions occurring in Lane, Anchorage, and Berth.
Figure 6.
Distribution of BehaviorEvents across water-area scenarios.
The speed-state composition and event duration also vary across water-area scenarios (Table 4). Lane has the highest average speed at 8.93 kn and the shortest average event duration at 12.13 min, with MediumSpeed and HighSpeed accounting for 57.81% and 20.10% of its events, respectively. Berth shows the lowest average speed at 1.58 kn and the longest average event duration at 92.02 min, while Stop and LowSpeed together account for 90.44% of Berth events. Port is also dominated by low-speed behavior, with Stop and LowSpeed accounting for 19.70% and 40.33% of its events, respectively, and an average event duration of 49.18 min. GeneralWater is dominated by MediumSpeed events (62.08%), whereas Anchorage shows a more mixed composition, with MediumSpeed, LowSpeed, and Stop accounting for 55.77%, 26.30%, and 10.84%, respectively. These differences reflect distinct vessel motion characteristics across the functional water-area scenarios.
Table 4.
Speed-state statistics across water-area scenarios.
4.1.4. Scene Assignment Validation
The Scene assignment results show a high level of consistency between the mean-coordinate and dominant-Scene methods (Table 5). Among all 2,457,965 BehaviorEvents, 144,694 events (5.89%) span multiple functional water-area scenes. The two methods assign the same Scene type to 2,429,940 events, corresponding to an agreement of 98.86%, while only 28,025 events (1.14%) change Scene type. Under the mean-coordinate method, 372,998 events (15.18%) require the predefined semantic priority to resolve overlaps between different Scene types, and 409,272 events (16.65%) require an additional polygon-area rule to determine the specific Scene. Further examination shows that all 104,032 assignment differences (4.23%) are caused by different Scene IDs within the same functional Scene type, while the functional Scene type itself remains unchanged. After applying the dominant-Scene method, the Jaccard coefficients for R1–R4 are 0.9424, 0.8133, 0.9538, and 0.9762, respectively, indicating that the recognition results of R1, R3, and R4 remain relatively stable, whereas R2 is more sensitive to changes in Scene assignment.
Table 5.
Summary of Scene assignment validation.
4.1.5. Behavioral Characteristics Across Representative Vessel Types English
BehaviorEvents show clear differences in frequency, speed, duration, water-area scenario, and motion characteristics across representative vessel types (Table 6). Cargo contains the largest number of events, with 906,376 BehaviorEvents (36.88%), and is mainly associated with GeneralWater and MediumSpeed–Straight behavior. Tanker shows a similar dominant spatial and motion pattern but has a higher average speed of 8.37 kn compared with 7.49 kn for Cargo. Fishing contains 335,616 events (13.65%) and has the longest average event duration at 125.02 min, with GeneralWater and Stop–Straight as its dominant characteristics. Passenger and PleasureCraft are both mainly associated with Port, although Passenger is dominated by MediumSpeed–Straight behavior, whereas PleasureCraft is characterized by LowSpeed–SharpTurn behavior. PilotVessel has the highest average speed at 13.53 kn and the shortest average event duration at 4.20 min, with HighSpeed–Straight as its dominant motion state. LawEnforcement is also mainly associated with Port and MediumSpeed–Straight behavior, with an average speed of 8.96 kn. Overall, the representative vessel types exhibit distinct combinations of spatial distribution, speed, duration, and motion state.
Table 6.
Behavior characteristics of representative vessel types.
4.2. Event-Level Rule-Driven Complex Vessel Behavior Recognition and Validation Results
4.2.1. Overall Rule Recognition Results
The event-level rule-driven recognition results show clear differences in the occurrence frequencies of the eight behavior rules across the 2,457,965 BehaviorEvents (Table 7). Among the primary behavior rules R1–R7, 582,151 unique BehaviorEvents match at least one rule, accounting for 23.68% of the complete event set. R4 has the largest number of rule hits, with 199,980 events (8.14%), followed by R1 with 178,947 events (7.28%) and R5 with 169,227 events (6.88%). These three rules therefore constitute the main recognized behavior categories. R6 identifies 26,018 events (1.06%), while R2 and R7 identify 22,479 (0.91%) and 12,284 (0.50%) events, respectively. R3 has the smallest number of primary-rule hits, with 9541 events (0.39%). In addition, R8 identifies 58,223 Unclassified Behavior Candidates (2.37%), representing candidate behaviors not covered by R1–R7. The distribution of rule hits reflects clear differences in the semantic and motion conditions represented by the individual rules, with R1 mainly capturing regular channel passage, R4 representing low-speed complex maneuvering in port areas, and R5 characterizing prolonged low-speed behavior of fishing vessels.
Table 7.
Overall results of event-level rule-driven behavior recognition.
4.2.2. Independent Expert Validation Results
The independent expert validation shows a high level of agreement with the rule-driven recognition results for R1–R7 (Table 8). Across the seven primary behavior rules, the macro-average confirmation rate reaches 92.11%, with individual confirmation rates of 85.71% for R1, 87.80% for R2, 84.62% for R3, 93.02% for R4, 97.22% for R5, 96.43% for R6, and 100% for R7. The two experts also show strong consistency in their independent judgments, with an observed agreement of 94.47% and a Cohen’s kappa of 0.746. Among the 450 unique BehaviorEvents included in the validation dataset, 23 events are considered to have insufficient evidence by at least one expert and are therefore treated as unresolved in the strict-consensus evaluation. Compared with R1–R7, R8 receives no positive expert consensus for a specific interpretable behavior category and is therefore retained as an Unclassified Behavior Candidate and excluded from the macro-average confirmation rate.
Table 8.
Independent expert validation results for the event-level behavior rules.
Representative AIS trajectory samples from the expert-validation dataset are shown in Figure 7, Figure 8 and Figure 9. In these figures, “S” and “E” denote the starting and ending positions of the target BehaviorEvent, respectively, and the colored line connecting them represents the AIS trajectory of the target BehaviorEvent. Figure 7 presents a Cargo-vessel sample with clear transit characteristics, Figure 8 shows a long-duration sample dominated by stationary and low-speed motion, and Figure 9 presents a PilotVessel sample characterized by high-speed movement and evident directional changes. Together, these examples illustrate the different trajectory and motion characteristics considered during the expert assessment and complement the quantitative validation results reported in Table 8.
Figure 7.
Representative expert-validation trajectory sample showing transit characteristics.
Figure 8.
Representative expert-validation trajectory sample showing stationary and low-speed characteristics.
Figure 9.
Representative expert-validation trajectory sample showing high-speed maneuvering characteristics.
4.2.3. Semantic Ablation and Motion-Only Comparison
The semantic ablation results show substantial changes in rule-hit counts after removing contextual information (Table 9). In Table 9, the values in parentheses indicate fold changes relative to the Full KG-based configuration. Under the Full KG-based configuration, 582,151 unique BehaviorEvents match at least one of R1–R7, corresponding to 23.68% of all BehaviorEvents. Removing Scene increases the number of uniquely matched events to 2,230,121 (90.73%), while removing VesselTypeClass increases it to 818,757 (33.31%). The Motion-only configuration also matches 2,230,121 unique events (90.73%). At the rule level, removing Scene increases the rule-hit counts of R1, R2, R3, and R4 by factors of 8.00, 21.18, 39.21, and 1.84, respectively, while removing VesselTypeClass increases the rule-hit counts of R5 and R7 by factors of 2.21 and 7.83, respectively. For R6, the rule-hit count increases by factors of 1.34 without Scene, 1.77 without VesselTypeClass, and 6.77 under the Motion-only configuration. The supplementary expert assessment of the ablated results shows that, under the Without Scene configuration, 12 samples are supported, six are unsupported, and seven remain unresolved, corresponding to a support rate of 66.67% among the 18 resolved samples. Under the Without VesselTypeClass configuration, none of the 24 resolved samples are supported, while 24 are unsupported and one remains unresolved, corresponding to a resolved-sample support rate of 0%.
Table 9.
Semantic ablation results of event-level rule-driven behavior recognition.
4.2.4. Robustness of BehaviorEvent Construction and Recognition
The sensitivity of continuous-navigation segmentation to the temporal-gap threshold is shown in Figure 10. With 60 min as the baseline, 239,877 continuous-navigation segments containing 47,460,726 AIS points were retained as input for BehaviorEvent construction. When the threshold was reduced to 30 min, the number of input segments increased to 409,177, corresponding to a 70.58% increase relative to the baseline, while the number of retained AIS points increased to 52,828,986 (+11.31%). When the threshold was increased to 90 min, the number of input segments decreased to 180,566 (−24.73%), and the number of AIS points decreased to 43,818,554 (−7.67%). The 30, 60, and 90 min configurations therefore produced different numbers of continuous-navigation segments and downstream input AIS points.
Figure 10.
Sensitivity of continuous-navigation segmentation to different temporal-gap thresholds.
The robustness of BehaviorEvent construction under ±20% perturbations of the motion-state thresholds is shown in Figure 11. Relative to the baseline of 2,457,965 BehaviorEvents, the Speed −20% and Speed +20% configurations produced 2,499,555 (+1.69%) and 2,423,892 (−1.39%) events, with boundary Jaccard values of 0.7908 and 0.8229, respectively. The Turning −20% and Turning +20% configurations produced 2,685,889 (+9.27%) and 2,254,801 (−8.27%) events, with boundary Jaccard values of 0.5687 and 0.5979. The corresponding Acceleration −20% and Acceleration +20% configurations produced 2,508,556 (+2.06%) and 2,433,940 (−0.98%) events, with boundary Jaccard values of 0.9738 and 0.9871. For downstream R1–R7 recognition, the overall AIS-point-level rule-coverage Jaccard ranged from 0.9202 to 0.9983, while the change in total R1–R7 point coverage ranged from −2.85% to +1.95%. For downstream R1–R7 recognition, the overall AIS-point-level rule-coverage Jaccard ranged from 0.9202 to 0.9983, while the change in total R1–R7 point coverage ranged from −2.85% to +1.95%.
Figure 11.
Sensitivity of duration-dependent rules under ±20% threshold perturbations.
The duration-threshold sensitivity of R2, R3, and R5 is summarized in Table 10. For R2, reducing the duration threshold from 600 to 480 s increased the number of rule hits from 22,479 to 23,809 (+5.92%), whereas increasing the threshold to 720 s reduced the number to 21,665 (−3.62%); the corresponding Jaccard values were 0.9441 and 0.9638. For R3, the 1440, 1800, and 2160 s thresholds produced 10,097, 9541, and 9104 rule hits, respectively, with changes of +5.83% and −4.58% under the two perturbed settings and Jaccard values of 0.9449 and 0.9542. For R5, the corresponding rule-hit counts were 177,069, 169,227, and 161,681, representing changes of +4.63% and −4.46%, with Jaccard values of 0.9557 and 0.9554.
Table 10.
Sensitivity of duration-dependent rules under ±20% threshold perturbations.
4.3. Frequent Behavior Sequence Pattern Mining Results
4.3.1. Overall Frequent Behavior Patterns
A total of 75,144 valid compressed behavior-token sequences were retained for the overall PrefixSpan analysis. Under the baseline configuration, the minimum support count was 1000, corresponding to an effective minimum support rate of 1.3308%, and the maximum pattern length was set to four. Representative frequent behavior sequence patterns are summarized in Table 11. The two GeneralWater patterns show the highest support rates: MediumSpeed navigation with a RightTurn adjustment occurs in 15,173 sequences (20.19%), while recurrent MediumSpeed–Straight navigation occurs in 15,065 sequences (20.05%). In Port, the recurrent LowSpeed–Stop pattern occurs in 10,925 sequences (14.54%), and the LowSpeed pattern involving a SharpTurn occurs in 7713 sequences (10.26%). A Lane-based MediumSpeed pattern with a LeftTurn adjustment has a support of 4808 (6.40%). Additional representative patterns involving a berth stop, cross-scene movement from Anchorage through Lane to Port, and high-speed navigation with turning adjustment in GeneralWater have support rates of 2.85%, 1.68%, and 3.98%, respectively.
Table 11.
Representative frequent behavior sequence patterns identified by PrefixSpan.
The ordered structures and support rates of five representative frequent behavior patterns were examined to characterize the dominant multi-event sequence patterns identified by PrefixSpan (Figure 12). P1, representing MediumSpeed navigation with a RightTurn adjustment in GeneralWater, has the highest support rate of 20.19%, followed by P2, recurrent MediumSpeed–Straight navigation in GeneralWater, at 20.05%. P3, representing the recurrent LowSpeed–Stop combination in Port, has a support rate of 14.54%, while P4, representing LowSpeed maneuvering with a SharpTurn adjustment in Port, reaches 10.26%. P5 represents a Lane-based MediumSpeed pattern with a LeftTurn adjustment and has a support rate of 6.40%. The dashed arrows denote ordered subsequence relations rather than direct adjacency between consecutive BehaviorEvents.
Figure 12.
Changes in BehaviorEvent counts and boundary consistency under ±20% perturbations of motion-state thresholds.
4.3.2. Vessel-Level Reproducibility Results
The vessel-level reproducibility evaluation was conducted using a ship-type-stratified deterministic 8:2 split, resulting in 13,120 Discovery vessels and 3280 Validation vessels with no vessel overlap between the two subsets. The corresponding 75,144 valid compressed behavior-token sequences were divided into 60,344 Discovery sequences and 14,800 Validation sequences, and the effective support rate of 1.3308% corresponded to minimum support counts of 804 and 197, respectively. At the primary evaluation level of K = 20, all 20 Discovery Top-20 patterns remained frequent in the Validation subset, giving a PRR of 100%, while 19 patterns were shared by the two Top-20 sets, corresponding to a Jaccard overlap of 0.9048. The support-rate rankings were also highly consistent, with a Spearman correlation of 0.9654 and a mean absolute support-rate difference of 0.6807 percentage points (Table 12). At the vessel-type level, PRR remained 100% for all seven representative vessel types. Cargo and Tanker achieved complete Top-20 set overlap with Jaccard values of 1.0000, followed by Fishing at 0.8182, Passenger and PleasureCraft at 0.6667, PilotVessel at 0.2903, and LawEnforcement at 0.1111. The corresponding Spearman correlations were 0.9624, 0.9126, 0.9609, 0.7532, 0.7020, 0.2198, and 0.5418 for Cargo, Tanker, Fishing, Passenger, PleasureCraft, PilotVessel, and LawEnforcement, respectively.
Table 12.
Vessel-level reproducibility of Top-20 frequent behavior patterns identified by PrefixSpan.
4.3.3. Support-Threshold and Pattern-Length Robustness
The robustness of PrefixSpan to the minimum support threshold and maximum pattern length was evaluated using the fixed Discovery subset of 60,344 valid compressed behavior-token sequences (Table 13). With fixed, changing the minimum support rate from the baseline 1.3308% to 1.0%, 1.5%, and 2.0% changed the number of frequent patterns from 41,366 to 65,925, 33,961, and 21,110, respectively. With the support rate fixed at 1.3308%, reducing from 4 to 3 decreased the number of frequent patterns to 7338, whereas increasing to 5 increased the number to 200,521. Despite these substantial changes in the total number of extracted frequent patterns, all 20 baseline Top-20 patterns were retained under every tested configuration. The Top-20 pattern set and ranking also remained unchanged across all parameter settings, with Jaccard overlap and Spearman rank correlation both equal to 1.0000 and MARD equal to 0. These results show that the total number of extracted patterns is sensitive to the support threshold and maximum pattern length, whereas the leading Top-20 patterns remain stable within the tested parameter ranges.
Table 13.
Robustness of Top-20 PrefixSpan patterns under different support thresholds and maximum pattern lengths.
4.4. Comparative Evaluation Results of Knowledge Graph and Relational Representations
The Neo4j property graph and the normalized DuckDB relational representation produced equivalent analytical results for all four evaluation tasks, confirming that both data models can represent the underlying vessel behavior information (Table 14). However, their organization and query expression differ substantially. In the knowledge graph, vessel identity, Voyage membership, Scene, motion states, and temporal relationships are represented as explicit nodes and relationships, allowing analytical tasks to be expressed as direct semantic paths. For example, Q1 retrieves the semantic context of a BehaviorEvent through its connected Ship, Voyage, vessel type, size class, Scene, and motion-state nodes; Q3 follows explicit NEXT relationships to analyze temporal multi-event paths; and Q4 traces a recognized event together with its vessel attributes, spatial context, motion states, and neighboring events. The corresponding Neo4j queries involve 8, 7, and 16 relationship hops for Q1, Q3, and Q4, whereas the normalized relational implementation requires 15, 12, and 29 joins, respectively. Q2 similarly uses five graph relationship hops compared with eight relational joins. These counts describe how the same analytical information is expressed in the two representations rather than their universal computational complexity. Runtime results also vary by task: Neo4j has lower median runtime for Q1 and Q4, whereas DuckDB is faster for Q2 and Q3. Therefore, the main value of the knowledge graph in this framework lies not in a universal runtime advantage, but in its explicit representation of semantic relationships, direct temporal-path navigation, event-level traceability, and the ability to extend the existing graph by connecting additional vessel, environmental, or behavioral entities without changing the event-centered analytical structure.
Table 14.
Comparative evaluation of knowledge graph and relational representations.
5. Discussion
5.1. AIS Data Quality, Environmental Context, and Semantic Representation
The reliability of the proposed framework is closely linked to the quality of the AIS trajectories and static vessel information used to construct BehaviorEvents. Missing, erroneous, or inconsistent AIS observations may affect trajectory segmentation, motion-state estimation, and subsequent semantic analysis, and data quality has also been identified as a persistent challenge in AIS-based ship behavior analysis [4]. In the present study, multiple quality-control procedures were applied before BehaviorEvent construction, including basic validity checks, dynamic-field filtering, duplicate aggregation, and temporal segmentation. Nevertheless, transforming continuous vessel motion into discrete semantic states inevitably reduces some fine-grained variability, although this abstraction facilitates interpretable semantic organization and rule-based reasoning. Another limitation is that the current framework relies primarily on AIS-derived motion information and static functional water-area boundaries, while dynamic environmental factors, such as wind, current, and tide, are not directly represented. These factors may influence observed speed, course, turning behavior, and acceleration, particularly during low-speed operations in port, anchorage, and berthing areas. Wind and current, for example, may induce additional course or speed adjustments that are not solely attributable to vessel maneuvering intent, meaning that some low-speed or turning-related BehaviorEvents may reflect both operational behavior and environmental forcing. Maritime semantic trajectory models provide a mechanism for incorporating richer contextual information into ontology-based trajectory representations [13], while situation-aware maritime knowledge models integrate navigational context to support decision-making [29]. Future extensions could therefore incorporate wind, current, tide, and other metocean observations as dynamic semantic context in the knowledge graph, enabling more environment-aware behavior interpretation and potentially supporting adaptive motion-state or rule thresholds.
5.2. Semantic Rule Interpretability and Adaptability
The predefined semantic rules provide a transparent mechanism for combining water-area scenarios, motion states, vessel categories, and behavior durations without requiring a large manually labeled training dataset. The independent expert evaluation provides additional evidence regarding the credibility of the rule-assigned event-level labels within the reviewed rule-hit samples, with the R1–R7 rules achieving a macro-average expert confirmation rate of 92.11%, while the two experts reached an observed agreement of 94.47% and a Cohen’s κ of 0.746. The semantic ablation results further show that Scene and VesselTypeClass act as important contextual constraints on rule-trigger scope, whereas the motion-only comparator produces a substantially broader set of triggered events under purely kinematic conditions. Robustness was further examined by independently perturbing the speed, turning, and acceleration discretization thresholds by ±20%, varying the behavior-duration thresholds by ±20%, and comparing 30-, 60-, and 90-min temporal segmentation gaps. Although these changes affected the exact BehaviorEvent partition, the downstream AIS-point-level coverage of R1–R7 remained highly consistent with the baseline, with Jaccard values ranging from 0.9202 to 0.9983 under the motion-state perturbations. These results indicate that the current rule system remains stable within the tested parameter ranges, although the thresholds should be regarded as operational settings rather than universally optimal physical boundaries. More broadly, rule suitability may vary with local traffic organization, vessel composition, navigation regulations, and operating practices. Existing studies have explored both data-driven abnormal-behavior detection [30] and hybrid strategies combining trajectory modeling with knowledge reasoning [31], suggesting complementary approaches to adaptability and semantic interpretation. Future work could therefore investigate fuzzy semantic rules, data-assisted threshold calibration, or hybrid knowledge–data-driven strategies in which explicit semantic constraints preserve interpretability while data-driven models assist in adapting rule conditions to different maritime environments.
5.3. Generalizability Across Maritime Environments
The present study is based on AIS trajectories and functional water-area information from Xiamen Port during a fixed May–July observation window. Although the dataset covers multiple functional navigation scenarios and diverse vessel activities, the resulting behavior distributions and frequent sequence patterns may still reflect local traffic organization, vessel composition, and seasonal operating conditions and therefore should not be interpreted as annual or universally representative vessel behavior characteristics. Generalizability across different geographic and operational environments remains an important challenge in AIS-based vessel trajectory analysis [32]. Some recent studies have evaluated AIS-based models across multiple real-world maritime regions; for example, GCT-Former was examined using data from Aarhus Bay, Great Belt, and Skagen [5]. Such multi-region designs highlight the importance of evaluating maritime analytical methods under different traffic structures and navigational conditions. Future work should therefore extend the proposed framework to multiple ports, waterways, and seasonal periods to examine whether the BehaviorEvent-centered semantic schema, rule definitions, and dominant frequent sequence patterns remain consistent across environments. Such cross-region and cross-period validation would help distinguish generally recurring vessel behavior structures from patterns that are specific to individual ports or observation periods.
5.4. Temporal and Interaction Limitations of Frequent Sequence Pattern Mining
The present sequence-level analysis focuses on recurrent ordered behavior patterns within individual continuous-navigation segments. PrefixSpan provides an effective means of identifying frequent ordered, but not necessarily adjacent, multi-event subsequences through prefix-projected pattern growth [27]. Accordingly, the mined patterns characterize recurrent event-order structures rather than direct transitions between consecutive BehaviorEvents. The current behavior-token representation primarily preserves Scene, SpeedState, TurningState, and event order; BehaviorEvent duration remains available as an event attribute but is not directly incorporated into the PrefixSpan token, and the time intervals between successive events are likewise not explicitly encoded. Broader sequence-pattern mining research has extended classical sequential patterns to richer data settings [33], including methods that explicitly model time-interval relationships [34]. Future extensions could therefore introduce duration-aware or time-interval-constrained sequence mining to distinguish patterns with similar event orders but different temporal characteristics. In addition, the current sequence analysis primarily characterizes the behavior evolution of individual vessels and does not explicitly encode vessel–vessel interactions. Encounter situations involving crossing, overtaking, following, or coordinated maneuvering may influence the observed BehaviorEvent sequence of a vessel but are not currently represented as interaction states within the sequence model. The BehaviorEvent-centered knowledge graph provides a natural basis for extending this representation by introducing dynamic vessel–vessel relationships and encounter semantics. Future work could therefore combine individual behavior sequences with interaction-aware graph relationships to examine how surrounding traffic and vessel encounters contribute to complex multi-vessel behavior evolution.
6. Conclusions
We developed a knowledge graph-driven framework for complex vessel behavior recognition and frequent behavior sequence pattern mining using AIS data from Xiamen Port waters. The framework integrates vessel attributes, continuous-navigation segments, BehaviorEvents, water-area scenarios, motion states, and temporal relationships within a unified semantic representation, connecting event-level behavior recognition with sequence-level pattern mining. Using AIS data from 16,400 vessels, we constructed 239,877 continuous-navigation segments and 2,457,965 BehaviorEvents. The rule-driven analysis revealed distinct behavioral characteristics across water-area scenarios and vessel types, while independent expert evaluation of R1–R7 achieved a macro-average confirmation rate of 92.11% and a Cohen’s κ of 0.746. Semantic ablation and sensitivity analyses further demonstrated the importance of contextual semantic information and the stability of the main recognition results within the tested parameter ranges. At the sequence level, PrefixSpan identified recurrent multi-event behavior structures from 75,144 valid compressed sequences, and the independent vessel-level Discovery–Validation evaluation showed strong reproducibility of the dominant Top-20 patterns. Comparative evaluation with a normalized relational representation further highlighted the value of the knowledge graph for explicit semantic relationship organization, temporal-path navigation, and event-level traceability. Overall, the proposed framework provides an interpretable and unified approach for connecting semantic behavior recognition with recurrent sequence-pattern discovery. Future work will incorporate dynamic environmental factors, adaptive knowledge–data-driven rules, richer temporal sequence representations, vessel–vessel interactions, and cross-port validation.
Author Contributions
Conceptualization, Y.S., T.Z., Y.L. and L.C.; methodology, Y.S., Y.L. and L.C.; validation, Y.S., Y.L., L.C., Q.M., S.F. and G.L.; writing—review and editing, T.Z., Y.S., Y.L., L.C., Q.M., S.F. and G.L.; funding acquisition, T.Z. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the National Natural Science Foundation of China (No. 42501422), the International Cooperation Project of Fujian Province Science and Technology Program (No. 2025I0018), the Xiamen Natural Science Foundation (No. 3502Z202473059, 3502Z202573055).
Data Availability Statement
The data presented in this study are available from the corresponding author upon reasonable request.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- UNCTAD. Review of Maritime Transport 2024: Navigating Maritime Chokepoints. In Proceedings of the United Nations Conference on Trade and Development, Geneva, Switzerland, 22 October 2024. UNCTAD/RMT/2024. [Google Scholar]
- Ribeiro, C.V.; Paes, A.; de Oliveira, D. AIS-based maritime anomaly traffic detection: A review. Expert Syst. Appl. 2023, 231, 120561. [Google Scholar] [CrossRef] [Scilit]
- Xin, X.; Liu, K.; Liu, J.; Wang, W.; Yang, Z. Modeling, evaluation, and mitigation of maritime traffic complexity in complex waters. IEEE Trans. Intell. Transp. Syst. 2025, 26, 13275–13292. [Google Scholar] [CrossRef] [Scilit]
- Duka, A.; Zhang, H.; Vidan, P.; Li, G. Exploring Recent Maritime Research on AIS-Based Ship Behavior Analysis and Modeling. J. Mar. Sci. Eng. 2026, 14, 712. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Liu, Y.; Zhang, Q.; Ji, X.; Zhang, W. AIS-based ship trajectory prediction using a geometry-consistent trajectory transformer (GCT-Former). J. Mar. Sci. Eng. 2026, 14, 1218. [Google Scholar] [CrossRef] [Scilit]
- Qi, Y.; Yang, J.; Zhao, Y. Dual-modality vessel trajectory anomaly detection for maritime risk prevention based on automatic identification system data. Reliab. Eng. Syst. Saf. 2026, 276, 112905. [Google Scholar] [CrossRef] [Scilit]
- Ma, Q.; Lian, S.; Zhang, D.; Lang, X.; Rong, H.; Mao, W.; Zhang, M. A machine learning method for the recognition of ship behavior using AIS data. Ocean Eng. 2025, 315, 119791. [Google Scholar] [CrossRef] [Scilit]
- Hogan, A.; Blomqvist, E.; Cochez, M.; D’amato, C.; De Melo, G.; Gutierrez, C.; Kirrane, S.; Gayo, J.E.L.; Navigli, R.; Neumaier, S.; et al. Knowledge graphs. ACM Comput. Surv. 2021, 54, 1–37. [Google Scholar] [CrossRef] [Scilit]
- Studer, R.; Benjamins, V.R.; Fensel, D. Knowledge engineering: Principles and methods. Data Knowl. Eng. 1998, 25, 161–197. [Google Scholar] [CrossRef] [Scilit]
- Li, Y.; Liu, X.; Wang, Z.; Mei, Q.; Xie, W.; Yang, Y.; Wang, P. Construction of a large-scale maritime element semantic schema based on knowledge graph models for unmanned automated decision-making. Front. Mar. Sci. 2024, 11, 1390931. [Google Scholar] [CrossRef] [Scilit]
- Liu, X.; Li, Y.; Wang, P.; Mei, Q. Construction of a Large-Scale Maritime Elements Semantic Schema Based on Heterogeneous Graph Models. In International Conference on Spatial Data and Intelligence; Springer Nature: Singapore, 2024; pp. 132–151. [Google Scholar]
- Sun, Z.; Wang, Z.; Halilaj, L.; Luettin, J. SemanticFormer: Holistic and semantic traffic scene representation for trajectory prediction using knowledge graphs. IEEE Robot. Autom. Lett. 2024, 9, 7381–7388. [Google Scholar] [CrossRef] [Scilit]
- Santipantakis, G.M.; Doulkeridis, C.; Vouros, G.A. An ontology for representing and querying semantic trajectories in the maritime domain. In European Conference on Advances in Databases and Information Systems; Springer Nature: Cham, Switzerland, 2023; pp. 224–237. [Google Scholar]
- Xu, S.; Huang, L.; Huang, Y.; Wen, Y.; Cheng, X.; van Gelder, P. A framework for ship semantic behavior representation and indexing. Ocean Eng. 2025, 329, 121023. [Google Scholar] [CrossRef] [Scilit]
- Hu, S.; Chen, G.; Zhou, R.; Qin, X.; Wang, X. Fishing vessel behavior pattern recognition using AIS sub-trajectory prototype learning based on Gramian Angular Field. Complex Intell. Syst. 2026, 12, 68. [Google Scholar] [CrossRef] [Scilit]
- Qi, Y.; Yang, J.; Zhao, Y. A lightweight transformer with kinematics-gated experts and spatial-matching attention for vessel behavior patterns recognition. Ocean Eng. 2026, 363, 126595. [Google Scholar] [CrossRef] [Scilit]
- Zhang, J.; Liu, J.; Hirdaris, S.; Zhang, M.; Tian, W. An interpretable knowledge-based decision support method for ship collision avoidance using AIS data. Reliab. Eng. Syst. Saf. 2023, 230, 108919. [Google Scholar] [CrossRef] [Scilit]
- Zhou, C.; Wen, K.; Zhao, J.; Bian, Z.; Lu, T.; Latt, M.K.K.; Wang, C. Ontology-based method for identifying abnormal ship behavior: A navigation rule perspective. J. Mar. Sci. Eng. 2024, 12, 881. [Google Scholar] [CrossRef] [Scilit]
- Hatlas-Sowinska, P.; Wielgosz, M. Ontology based approach in solving collision situations at sea. Ocean Eng. 2022, 260, 111941. [Google Scholar] [CrossRef] [Scilit]
- Hatłas-Sowińska, P.; Misztal, L. Application of a text mining method in navigation and communication for enhancing maritime safety. PLoS ONE 2024, 19, e0299582. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wu, S.; Zhang, L.; Zhou, Y.; Wei, S.; Chen, C. Ship Trajectory Clustering Method Considering Navigation Behavior Sequences. J. Mar. Sci. Eng. 2026, 14, 837. [Google Scholar] [CrossRef] [Scilit]
- Jiang, D.; Shi, G.; Ma, L.; Li, W.; Wang, X.; Zhu, G. A dynamic trajectory temporal density model for analyzing maritime traffic patterns. J. Mar. Sci. Eng. 2025, 13, 381. [Google Scholar] [CrossRef] [Scilit]
- Feng, C.; Xu, J.; Zhang, J.; Li, H. A spatiotemporal co-occurrence pattern mining algorithm based on ship trajectory data. Adv. Mech. Eng. 2024, 16, 16878132241274449. [Google Scholar] [CrossRef] [Scilit]
- Ghannou, O.; Thuillier, E.; Boucelma, O. Maritime trajectory mining: An automatic zones of interests discovery and annotation framework. Comput. Sci. Inf. Syst. 2024, 21, 1963–1978. [Google Scholar] [CrossRef] [Scilit]
- Fujino, I.; Iphar, C.; Claramunt, C. A code distribution-based trajectory representation and its application to similarity, clustering and classification of AIS big data. Expert Syst. Appl. 2026, 310, 131216. [Google Scholar] [CrossRef] [Scilit]
- Han, J.; Cheng, H.; Xin, D.; Yan, X. Frequent pattern mining: Current status and future directions. Data Min. Knowl. Discov. 2007, 15, 55–86. [Google Scholar] [CrossRef] [Scilit]
- Han, J.; Pei, J.; Mortazavi-Asl, B.; Pinto, H.; Chen, Q.; Dayal, U.; Hsu, M.-C. PrefixSpan: Mining sequential patterns efficiently by prefix-projected pattern growth. In Proceedings of the 17th International Conference on Data Engineering; IEEE: Piscataway, NJ, USA, 2001; pp. 215–224. [Google Scholar]
- Zhang, W.; Wang, X.; Huang, Z. A system of mining semantic trajectory patterns from GPS data of real users. Symmetry 2019, 11, 889. [Google Scholar] [CrossRef] [Scilit]
- Song, R.; Papadimitriou, E.; Negenborn, R.R.; van Gelder, P. Integrating situation-aware knowledge maps and dynamic window approach for safe path planning by maritime autonomous surface ships. Ocean Eng. 2024, 311, 118882. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Liu, J.; Liu, R.W.; Liu, Y.; Yuan, Z. Data-driven methods for detection of abnormal ship behavior: Progress and trends. Ocean Eng. 2023, 271, 113673. [Google Scholar] [CrossRef] [Scilit]
- Zhao, J.; Zhou, C.; Bian, Z.; Latt, M.K.K.; Li, Z. A dual-driven method for ship navigation intention recognition: Integrating trajectory prediction and knowledge reasoning. Ocean Eng. 2026, 353, 124595. [Google Scholar] [CrossRef] [Scilit]
- Jiang, Y.; Chang, Y.; Zhang, B.; Ge, Y.; Zhao, X. A review of vessel trajectory prediction research: Methodological evolution, current challenges, and future directions. Int. J. Nav. Archit. Ocean Eng. 2026, 18, 100754. [Google Scholar] [CrossRef] [Scilit]
- Li, Y.; Han, M.; Ma, C.; Xue, Y.; Ding, J. A survey of sequence pattern mining: From precise data to uncertain data. Neurocomputing 2026, 683, 133529. [Google Scholar] [CrossRef] [Scilit]
- Liang, S.; Chen, L.; Gan, W.; Yu, P.S.; Zhao, S. Targeted mining of time-interval related patterns. IEEE Trans. Neural Netw. Learn. Syst. 2026, 37, 937–950. [Google Scholar] [CrossRef] [Scilit] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.











