Data-driven ship abnormal behavior online detection and early warning method and system

Through cleaning, compression and clustering analysis of AIS trajectory data, combined with boundary extraction and prediction algorithms, real-time and efficient detection and early warning of ship abnormal behavior is achieved, real-time and accuracy of ship abnormal recognition in inland waterways is solved, and the waterway safety and management efficiency is improved.

CN120449027APending Publication Date: 2025-08-08WUHAN UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510473643.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

It is difficult for the existing technology to achieve real-time and accurate identification of ship abnormal behavior in inland waterways. Especially in night or harsh weather conditions, the effectiveness of manual monitoring and radar systems is greatly reduced, resulting in false alarms or missed reports, affecting the safety and smooth flow of the waterway.

Method used

By cleaning the original AIS trajectory data, a similarity matrix is constructed using the trajectory data compression algorithm and the time series similarity algorithm, combining the trajectory clustering and boundary extraction algorithm, a ship prediction trajectory is generated, and abnormal behavior detection and early warning are achieved through the analysis of angle difference change and matching with the navigation area.

Benefits of technology

Real-time, efficient and accurate detection and early warning of ship trajectory is achieved, the accuracy of abnormal identification and the timeliness of early warning are improved, and the safe navigation of ships is guaranteed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449027A_ABST
    Figure CN120449027A_ABST
Patent Text Reader

Abstract

The invention discloses a data-driven ship abnormal behavior online detection and early warning method and system. The method comprises the following steps: carrying out data cleaning on original ship AIS (Automatic Identification System) trajectory data; compressing the cleaned trajectory data by adopting a trajectory data compression algorithm, calculating trajectory similarity with all ships based on a time sequence similarity algorithm, and constructing a trajectory similarity measurement matrix; performing clustering analysis on the trajectory similarity measurement matrix by using a trajectory clustering algorithm to obtain a clustering result; backtracking the cleaned trajectory data based on a clustering result, and determining a ship navigation area by using a boundary extraction algorithm; utilizing a historical average ship trajectory prediction algorithm to generate a ship prediction trajectory under a time length threshold value; and in combination with the ship navigation area and the ship prediction trajectory, ship abnormal behavior detection is realized through angle difference change analysis and matching of the ship trajectory point and the ship navigation area, and early warning is carried out. According to the invention, real-time, efficient and accurate judgment and early warning of the ship trajectory can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of transportation engineering, and in particular to a data-driven online detection and early warning method and system for abnormal ship behavior. Background Art

[0002] With the increasing volume of inland waterway shipping and the accelerated transformation to intelligent shipping, the application of vessel anomaly identification technology in inland waterways has become a hot topic in research and practice. As crucial links connecting major waterways and economic regions, inland waterways not only carry a large volume of cargo but also face multiple challenges, including narrow waterways, complex and volatile currents, and high traffic density. Against this backdrop, improving vessel navigation safety and optimizing waterway management efficiency have become pressing challenges.

[0003] Traditional ship monitoring and management methods rely primarily on manual inspections and radar monitoring. However, in the specific environment of inland waterways, these methods are often limited by factors such as line of sight obstruction, weather fluctuations, and equipment accuracy, making it difficult to immediately and accurately identify abnormal ship behavior. Manual monitoring is particularly ineffective at night or under adverse weather conditions, while radar systems can also cause false or missed alerts due to factors such as water reflections and obstructions, impacting inland waterway safety and smooth navigation. This creates higher requirements for efficient, real-time, and accurate analysis of ship behavior data.

[0004] With the widespread adoption of Automatic Identification Systems (AIS) and the rapid development of artificial intelligence (AI), the ability to fully intelligently perceive and analyze ship behavior has significantly improved. In particular, identifying anomalies in ship trajectories has become a crucial tool for ensuring navigation safety. Traditionally, identifying anomalous ship trajectories relies primarily on a comprehensive evaluation of the similarity of trajectory sets. However, this approach has significant limitations, including the inability to determine a ship's current behavior in real time. Furthermore, its accuracy and efficiency are significantly reduced in waters with high ship traffic. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a data-driven online detection and early warning method and system for abnormal ship behavior in response to the shortcomings of the existing technology, which can realize real-time, efficient and accurate judgment and early warning of ship trajectory.

[0006] To achieve the above objectives, according to one aspect of the present invention, a data-driven online detection and early warning method for abnormal ship behavior is provided, comprising:

[0007] Perform data cleaning on the original ship AIS trajectory data;

[0008] The cleaned trajectory data is compressed using a trajectory data compression algorithm, and the trajectory similarity with all ships is calculated based on the time series similarity algorithm to construct a trajectory similarity measurement matrix;

[0009] Performing cluster analysis on the trajectory similarity measurement matrix using a trajectory clustering algorithm to obtain a clustering result;

[0010] Backtracking the cleaned trajectory data based on the clustering results, and determining the ship's navigation area using a boundary extraction algorithm;

[0011] The historical average ship trajectory prediction algorithm is used to generate the ship's predicted trajectory under the time length threshold;

[0012] Combining the ship's navigation area with the predicted ship trajectory, abnormal ship behavior detection is achieved through angle difference change analysis and matching of ship trajectory points with the ship's navigation area, and early warning is issued.

[0013] In the above scheme, the specific method of data cleaning of the original ship AIS data includes: removing duplicate records, filling missing data and removing outliers.

[0014] In the above solution, the original ship AIS data includes: time, MMSI, latitude, longitude, direction, true heading, and speed.

[0015] In the above solution, the method of using the trajectory clustering algorithm to perform cluster analysis on the trajectory similarity measurement matrix to obtain the clustering result is:

[0016] Determine the input trajectory similarity measurement matrix, neighborhood distance value Eps, and neighborhood density threshold MinPts;

[0017] Traversing the values of the trajectory similarity measurement matrix, searching for a core trajectory according to the neighborhood distance value and the neighborhood density threshold, and adding the core trajectory to a core trajectory set;

[0018] Select each core trajectory in the core trajectory set in turn, find the ship trajectories that are densely connected to the core trajectory, connect them to form a trajectory cluster and assign a cluster label;

[0019] Trajectories that are not included in any trajectory cluster are identified as noise trajectories.

[0020] In the above solution, the method of backtracking the cleaned trajectory data based on the clustering results and determining the ship navigation area using a boundary extraction algorithm is as follows:

[0021] The cleaned trajectory data is extracted using the MMSI as the unique identifier of the ship; all the ship trajectory data with the same cluster label are input into the boundary extraction algorithm to ensure that the navigation area is judged based on complete and accurate trajectory information.

[0022] In the above scheme, the method of generating the predicted ship trajectory under the time length threshold using the historical average ship trajectory prediction algorithm is:

[0023] The historical average ship trajectory prediction algorithm uses historical automatic identification system data to analyze historical ship paths under specific routes, traffic patterns and environmental conditions, calculates the average trajectory and its changes, and generates the predicted ship trajectory under the time length threshold.

[0024] In the above solution, the trajectory data compression algorithm is the Douglas-Peucker algorithm or the sliding window algorithm.

[0025] In the above solution, the time series similarity algorithm includes one of a dynamic time warping (DTW) algorithm, a Hausdorff distance, and an edit distance algorithm (EDR).

[0026] In the above solution, the trajectory clustering algorithm includes one of the DBSCAN algorithm, K-means algorithm, spectral clustering algorithm, and hierarchical clustering algorithm.

[0027] In the above solution, the boundary extraction algorithm includes one of the Alpha Shapes algorithm, the Delaunay triangulation algorithm, and the Graham Scan algorithm.

[0028] According to another aspect of the present invention, a data-driven online detection and early warning system for abnormal ship behavior is provided, comprising:

[0029] Data cleaning module, used to clean the original ship AIS trajectory data;

[0030] The trajectory compression module is used to compress the cleaned trajectory data using a trajectory data compression algorithm, calculate the trajectory similarity with all ships based on the time series similarity algorithm, and construct a trajectory similarity measurement matrix;

[0031] A clustering analysis module, configured to perform cluster analysis on the trajectory similarity measurement matrix using a trajectory clustering algorithm to obtain a clustering result;

[0032] a ship navigation area determination module, configured to trace back the cleaned trajectory data based on the clustering result and determine the ship navigation area using a boundary extraction algorithm;

[0033] A trajectory prediction module is used to generate a predicted ship trajectory under a time length threshold using a historical average ship trajectory prediction algorithm;

[0034] The behavior detection and warning module is used to combine the ship's navigation area with the ship's predicted trajectory, and detect abnormal ship behavior through angle difference change analysis and matching of ship trajectory points with the ship's navigation area, and issue an early warning.

[0035] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0036] (1) The present invention provides a data-driven online detection and early warning method for abnormal ship behavior. This method deeply integrates multiple technologies such as ship trajectory clustering, prediction, and point cloud boundary reconstruction, and can achieve real-time, efficient, and accurate judgment and early warning of ship trajectories.

[0037] (2) The present invention provides a data-driven online detection and early warning method for abnormal ship behavior. In terms of ship trajectory clustering, the method deeply mines and analyzes massive historical navigation data to classify ship trajectories with similar navigation characteristics, which not only simplifies the subsequent processing flow but also significantly improves the accuracy of abnormality identification. In the trajectory prediction link, the method uses advanced machine learning technology to predict the navigation trajectory of the ship in the future. It can more accurately predict the future navigation trend of the ship. By conducting comparative analysis with the actual navigation trajectory, potential abnormal behaviors can be discovered and warned in a timely manner, providing strong protection for the safe navigation of the ship. The method improves the point cloud data processing technology and proposes a variable step-size adaptive Alpha Shapes algorithm to achieve high-precision boundary reconstruction of the navigation area and establish a navigation area model with higher accuracy and better effectiveness. When the navigation trajectory of the ship deviates from the model, the system can determine the abnormal trajectory in real time and automatically trigger the early warning mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. Throughout the drawings, the same reference figures denote the same components. In the drawings:

[0039] Figure 1 The figure is a flow chart of a data-driven online detection and early warning method for abnormal ship behavior in Example 1 of the present invention.

[0040] Figure 2 This is a schematic diagram of the DP algorithm in Example 1 of the present invention.

[0041] Figure 3This is a spatial representation diagram of the time series in Example 1 of the present invention.

[0042] Figure 4 This is a diagram showing the results of the DTW algorithm in Example 1 of the present invention.

[0043] Figure 5 This is a diagram showing the clustering effect of ship trajectories in Example 1 of the present invention.

[0044] Figure 6 This is a schematic diagram of the ship navigation area in Example 1 of the present invention.

[0045] Figure 7 This is a principle diagram of the variable step size adaptive Alpha Shapes algorithm in Example 1 of the present invention.

[0046] Figure 8 This is a flow chart of the operation of the variable step size adaptive Alpha Shapes algorithm in Example 1 of the present invention.

[0047] Figure 9 This is a box diagram of the angle difference in Example 1 of the present invention. DETAILED DESCRIPTION

[0048] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0049] It should be understood that the size of the serial numbers of the steps in the embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0050] Example 1

[0051] The present invention provides a data-driven online detection and early warning method for abnormal ship behavior. Figure 1 ,include:

[0052] S1, data cleaning of the original ship AIS trajectory data.

[0053] Specifically, in this embodiment, the specific method of performing data cleaning on the original ship AIS data includes: removing duplicate records, filling missing data, and removing outliers.

[0054] In this example, data cleaning is the first step in data processing, ensuring data integrity, accuracy, and consistency, providing high-quality data input for subsequent trajectory analysis and anomaly detection. Data cleaning is particularly important in ship trajectory analysis because AIS (Automatic Identification System) data can be affected by various factors, such as signal interference, equipment failure, and data transmission delays, leading to issues such as duplicate records, missing data, and outliers. Table 1 shows the raw AIS data from this example.

[0055] Table 1 Original AIS data

[0056]

[0057]

[0058] If duplicate records, missing data, and outliers are not effectively addressed, the accuracy of trajectory analysis will be affected, thereby reducing the reliability of abnormal behavior detection. Therefore, during the data cleaning phase, a series of methods are needed to remove redundant data, fill missing values, and identify and remove outliers. The specific steps for data cleaning are as follows:

[0059] S11, remove duplicate records.

[0060] In ship trajectory data, duplicate records are usually caused by the update frequency of AIS equipment, data transmission delays, or data storage mechanisms. For example, the same ship may be received by multiple AIS base stations at the same time, or the same track point may be recorded multiple times due to repeated writing to the data storage system. These duplicate records not only increase the redundancy of data storage, but may also affect the accuracy of trajectory analysis, resulting in unnecessary duplicate points or abnormal inflection points in the calculated ship trajectory. The following are the types of duplicate ship data records and the steps to deal with them:

[0061] (1) Find whether there are identical records in the trajectory data, including all fields such as timestamp, location (latitude and longitude), speed, and heading. In the above case, directly remove all duplicates and only keep one unique record.

[0062] (2) Search for records with the same timestamp but slightly different positions. If the same ship is received by multiple AIS base stations at the same time, the same timestamp may correspond to multiple positions. In this case, the data of the base station with the strongest signal can be selected to determine the only valid position.

[0063] S12, fill in missing data.

[0064] Missing data is an inevitable problem in AIS trajectory data processing. Missing data may be caused by a variety of factors, such as AIS equipment failure, signal interference, data transmission loss, or storage system errors. When a ship is sailing in an area far away from an AIS base station, there may be long track interruptions, resulting in discontinuous data. If these missing values are not processed, the track may be broken, affecting subsequent track clustering and anomaly detection analysis. Therefore, appropriate methods are needed to fill or process missing data to maintain the integrity of the track. The steps for processing missing data are as follows:

[0065] (1) Clarify the type of data missing. Based on the time information in the AIS data, the type of trajectory data missing can be determined.

[0066] (2) For short-term gaps in the data, if the heading and speed changes are stable, linear interpolation estimation is performed based on the coordinates of the previous and next position points; if the heading and speed are unstable, quadratic polynomial interpolation is used to fill the missing points.

[0067] (3) If there are serious missing trajectory points within a certain time period (such as missing data for several hours in a row), the trajectory data of this section may no longer have analytical value. In this case, this part of the data should be directly deleted to avoid affecting the accuracy of the overall trajectory analysis.

[0068] S13, remove outliers.

[0069] Outliers refer to abnormal data points that deviate significantly from the normal trajectory. They may be caused by AIS system false alarms, GPS signal loss, data transmission errors, or environmental factors (such as thunderstorms). The presence of outliers may cause sudden changes or unreasonable deviations in the trajectory, thereby affecting the accuracy of trajectory clustering and abnormal behavior detection. Therefore, during the data cleaning process, appropriate methods need to be used to detect and remove outliers. The steps for abnormal data processing are as follows:

[0070] (1) Position anomaly. First, for a specific waterway, the ship's navigation activity area should be within a certain range. If a trajectory point is far beyond the reasonable navigation area, it can be determined as an outlier and removed. Second, if the displacement of a point far exceeds the range that can be achieved at normal speed, it is determined as an outlier.

[0071] (2) Speed anomaly. First, consider the overall speed anomaly and calculate the speed change between the trajectory points. If the speed of a certain point significantly exceeds the maximum speed of the ship (the speed of inland ships usually does not exceed 30km / h), it can be considered that there is an anomaly at that point. Secondly, consider the ship acceleration anomaly and calculate the acceleration change of the previous and next trajectory points. If the acceleration change of a certain point is abnormally drastic (such as accelerating from 0 to 50km / h), it can be considered as a data error and should be deleted.

[0072] (3) Heading abnormality. Heading abnormality generally refers to the situation where the heading value exceeds 180. This part of the data is deleted through screening.

[0073] S2, compresses the cleaned trajectory data using the trajectory data compression algorithm, calculates the trajectory similarity with all ships based on the time series similarity algorithm, and constructs the trajectory similarity measurement matrix.

[0074] Specifically, in this embodiment, the trajectory data compression algorithm is the Douglas-Peucker (DP) algorithm, and the time series similarity algorithm is the Dynamic Time Warping (DTW) algorithm.

[0075] This step specifically includes the following steps:

[0076] S21, ship trajectory compression based on DP algorithm.

[0077] Since the ship trajectory has a lot of redundant data, in order to improve the efficiency of similarity calculation and ship trajectory clustering algorithm, it is necessary to remove the redundant data first. DP algorithm is a classic trajectory compression algorithm. It is widely used to simplify trajectory data because it can better preserve the overall shape characteristics of the trajectory. The principle of this algorithm is to recursively segment the curve data, such as Figure 2 As shown, in this embodiment, the AIS trajectory is a set D, which contains 14 trajectory points {T1, ..., T 14}, the algorithm runs as follows:

[0078] S21-1: Input trajectory set D and select distance threshold ε according to accuracy requirements;

[0079] S21-2: If Figure 2 As shown in (a), connect the first and last points in the set D to form a straight line L, and calculate the maximum vertical distance d from the remaining points to the straight line L. max Corresponding to position T9, when d max >ε, the farthest point T9 is retained, and then the trajectory is split into {T1, ..., T9} and {T9, ..., T 14}two parts;

[0080] S21-3: Repeat step 2 recursively, and finally transform the set D into {T1, T3, T6, T9, T 11 ,T 14}.

[0081] S22, calculate the DTW distance between trajectories.

[0082] When using the DTW algorithm to calculate the similarity of ship trajectories, it is first necessary to compare each spatiotemporal coordinate point in the trajectory and use the dynamic programming algorithm to find the shortest distance between the two paths. The advantage of this algorithm is that it can calculate trajectory data of different lengths. Suppose two time series data S and T are input into the DTW algorithm, where S = {s1, s2, ..., s m}, T={t1,t2,…,t n The distance matrix constructed by} is shown in formula (2-1):

[0083]

[0084] Among them, d(s i ,t j ) is s i With t j The Euclidean distance between them is expressed in matrix space as Figure 3 shown.

[0085] The calculation process of the twist path is expressed using formulas (2-2) to (2-5):

[0086] W={w1,w2,…,w t ,…,w k},max(m,n)≤k≤m+n-1 (2-2)

[0087] w1=d(s1,t1),w k =d(s m ,t n ) (2-3)

[0088] Where W is the twisted path; assuming w t =d(s i ,t j )hour,

[0089] w t+1 =min(d(s i+1 ,t j+1 ),d(s i+1 ,t j ),d(s i ,t j+1 )) (2-4)

[0090]

[0091] Therefore, the final dynamic path is as follows Figure 4 shown.

[0092] S23, construct the trajectory similarity measurement matrix.

[0093] By calculating the DTW distance, we can determine the similarity between a pair of trajectories. Generally, a smaller DTW distance indicates a higher similarity between the two trajectories, demonstrating similar navigation patterns; conversely, a smaller DTW distance indicates significant differences between the two trajectories. By calculating the DTW distance for all ship trajectories, we construct a trajectory similarity matrix for subsequent cluster analysis.

[0094] S3, use the trajectory clustering algorithm to perform cluster analysis on the trajectory similarity measurement matrix to obtain the clustering results.

[0095] Specifically, in this embodiment, the trajectory clustering algorithm is the DBSCAN algorithm. In ship trajectory analysis, the DBSCAN algorithm can group trajectories with similar navigation patterns into the same cluster by calculating the similarity between trajectories.

[0096] In this embodiment, the DBSCAN algorithm is used to perform cluster analysis on the trajectory similarity measurement matrix, and the clustering result is obtained as follows:

[0097] Determine the input trajectory similarity measurement matrix, neighborhood distance value Eps, and neighborhood density threshold MinPts;

[0098] Traverse the values of the trajectory similarity measure matrix, search for core trajectories based on the neighborhood distance value and neighborhood density threshold, and add the core trajectories to the core trajectory set;

[0099] Select each core trajectory in the core trajectory set in turn, find the ship trajectories that are densely connected to the core trajectory, connect them to form a trajectory cluster and assign a cluster label;

[0100] Trajectories that are not included in any trajectory cluster are identified as noise trajectories.

[0101] It is understandable that after DBSCAN is run, each ship track will be assigned a cluster label. Identical cluster labels represent tracks with similar navigation patterns, while noise points represent abnormal tracks or data errors. By evaluating the clustering results, the Eps and MinPts parameters can be modified to obtain the clustering effect that best suits the actual situation. The ship track clustering effect diagram of this embodiment is shown in the figure below. Figure 5 At the same time, according to the clustering results, the normal navigation pattern and potential abnormal behaviors in the channel can be obtained.

[0102] S4, based on the clustering results, the cleaned trajectory data is back-tracked and the ship navigation area is determined using the boundary extraction algorithm.

[0103] Specifically, in this embodiment, the boundary extraction algorithm is a variable step adaptive Alpha Shapes algorithm. Determining the navigation area of a ship is a crucial step for implementing online warning of ship navigation. In order to reduce the interference of human factors, a variable step adaptive Alpha Shapes algorithm is introduced. The algorithm can accurately analyze the trajectory data set and automatically identify and define its shape, thereby accurately delineating the navigation area of the ship. The schematic diagram of the ship navigation area is shown in FIG. Figure 6 shown.

[0104] Specifically, in this embodiment, based on the clustering results, the cleaned trajectory data is traced back and the method of using the boundary extraction algorithm to determine the ship's navigation area is as follows:

[0105] Using the cluster labels obtained from the clustering results, we trace back to the cleaned trajectory data: using the MMSI as the unique identifier of the ship, we extract the cleaned trajectory data. All ship trajectory data with the same cluster label are input into the boundary extraction algorithm to ensure that navigation area determination is based on complete and accurate trajectory information. This is because compression operations during ship trajectory processing may result in partial data loss, which can adversely affect the accurate determination of a ship's navigation area.

[0106] In this embodiment, the Alpha Shapes algorithm parameters are determined as follows:

[0107] The Alpha Shapes algorithm plays a key role in determining a vessel's navigation area, and its input parameter, the Alpha radius (A), determines the complexity and precision of the generated shape. If A is set too large, the navigation area may unreasonably cross land, affecting the accuracy of the judgment. Conversely, if A is too small, the boundary data becomes too complex, making it difficult to reflect the actual characteristics of the vessel's navigation, which may lead to frequent warnings during navigation.

[0108] The principle diagram of the variable step size adaptive Alpha Shapes algorithm in this embodiment is as follows Figure 7 As shown, the variable step size adaptive Alpha Shapes algorithm operation flow chart is as follows Figure 8 As shown. To optimize the selection of the Alpha radius, this embodiment uses the principle of gradient descent, combined with the area of the graph generated by the Alpha Shapes algorithm for judgment. To further improve the efficiency of gradient descent, a variable step size method is selected. This method can dynamically adjust the step size according to the current situation, thereby finding the optimal parameters more quickly. The steps of the variable step size adaptive Alpha Shapes algorithm are as follows:

[0109] S41, the determined neighborhood distance value Eps parameter is used as Amin , and the maximum Euclidean distance between all ship trajectory points is taken as A max .

[0110] S42, calculate input A min With A max When the Alpha Shapes algorithm determines the area S of the region min With S max , and use the parameter value as the horizontal coordinate and the area value as the vertical coordinate to determine the reference slope K' (such as Figure 7 (as shown in (a)).

[0111] S43, A min With A max Divide it into 10 parts, and divide {A1,A2,…,A 10} is input into the Alpha Shapes algorithm to obtain the area of the navigation area {S1, S2, ..., S 10}, and at the same time, calculate the slope between adjacent points to obtain {K1, K2,…, K 10}(like Figure 7 (as shown in (b)).

[0112] S44, {K1,K2,…,K 10 Subtract K' from all of them and multiply the adjacent K values to get the point where the slope changes for the first time based on K' (A f ),like Figure 7 As shown in (b), K9 is greater than K' for the first time, so let K9 = K f , at this time A9=A f .

[0113] S45, [A f-1 , A f+1 ]As A min With A max , repeat the third step again until there is K f =K'(such as Figure 7 (c)) or {S1,S2,…,S 10}When there are more than 5 repeated data (such as Figure 7 (d)), stop the iteration and output K f Represents parameter A f .

[0114] S5, using the historical average ship trajectory prediction algorithm to generate the ship prediction trajectory under the time length threshold.

[0115] Understandably, the navigational environment encountered by ships during navigation is dynamic and changes in real time, making ship trajectory prediction challenging. Long-term ship trajectory prediction is not only extremely difficult, but also requires significant computational complexity. In practical applications, this significantly reduces the timeliness and practicality of trajectory prediction algorithms. To overcome these challenges, ship trajectory prediction is performed under the assumption that the ship's speed and heading do not change significantly. This effectively reduces the difficulty of ship trajectory prediction, ensures algorithm accuracy and speed, and improves the algorithm's practicality in detecting and warning abnormal behavior.

[0116] The historical average ship trajectory prediction (HASP) algorithm is a data-driven technology that uses historical Automatic Identification System (AIS) data to predict ship trajectories. By analyzing historical ship paths for specific routes, traffic patterns, and environmental conditions, the algorithm calculates the average trajectory and its changes to make predictions. Specifically, in this embodiment, the online ship trajectory data is H = {T1, T2, ..., T n}, where each trajectory Ti consists of ordered space-time points, as shown in the formula:

[0117] T i ={(x i1 ,y i1 ,t i1 ),(x i2 ,y i2 ,t i2 ),...,(x im ,y im ,t im )} (3-1)

[0118] Where x and y represent longitude and latitude, and t represents time. i The prediction of is calculated as the weighted average of historical trajectories, and the average trajectory is defined as:

[0119]

[0120] Where: p i (t) is the position of the trajectory Ti at time t. The weight can be calculated based on different factors and represented by ωi, where μ T (t) is the predicted trajectory point:

[0121]

[0122] The frequency of AIS transmissions varies significantly depending on the vessel's speed and state, impacting the accuracy and timeliness of warnings. To better assist ship operators in making warning decisions, a 1-minute threshold is set, taking into account their average reaction time. This ensures that the warning system can fully capture changes in a vessel's navigational state, while ensuring the real-time and effectiveness of warnings, providing strong support for safe navigation.

[0123] S6, combining the ship's navigation area with the ship's predicted trajectory, detects abnormal ship behavior through angle difference change analysis and matches the ship's trajectory points with the ship's navigation area, and issues an early warning.

[0124] Specifically, in this embodiment, by obtaining the standard navigation area of the ship and the predicted trajectory of the ship, the ship abnormal behavior detection method is divided into two parts, including: historical trajectory judgment and online trajectory warning, among which the historical trajectory judgment is based on the heading and speed change information in the historical trajectory of the ship, combined with the navigation area judgment; the online trajectory warning is determined comprehensively through the ship trajectory prediction result and the ship navigation area.

[0125] For a given ship trajectory, anomaly recognition is mainly divided into two parts. One part is to determine whether there is an anomaly in the ship's historical navigation process. This part is generated by calculating the angle difference between adjacent ship trajectory points, such as Figure 9 As shown in Figure 2, if the angle difference distribution is wide, the vessel may be in an abnormal situation. This example uses the inpolygon function to determine whether the currently changing ship trajectory point is within the navigation area. If so, it is determined to be an abnormal trajectory and a timely warning is issued. If it is not within the navigation area, it is also considered an abnormal trajectory.

[0126] Specifically, this embodiment obtains predicted ship trajectory points and uses the inpolygon function to perform judgment. As shown in Table 2, in this embodiment, four navigation areas are obtained and the number of predicted trajectory points is 5. In the table, 1 represents that the trajectory point is within the navigation area, and 0 represents that it is not within the navigation area.

[0127] Table 2 Ship online alarm table

[0128]

[0129] As shown in Table 2, when predicted track points 1 and 2 appear consecutively within area 1, the vessel is operating normally. However, when track point 3, not within area 1 but within area 2, indicates that the vessel is about to leave area 1 and enter area 2, it also issues an early warning to incoming and outgoing vessels. Whenever a change in the online warning table is about to occur, an early warning is issued and abnormal trajectory detection is performed simultaneously to ensure normal vessel operation.

[0130] In summary, the present invention provides a data-driven online detection and early warning method for abnormal ship behavior, which can achieve real-time, efficient and accurate judgment and early warning of ship trajectories.

[0131] Example 2

[0132] On the one hand, an embodiment of the present application provides a data-driven online detection and early warning method for abnormal ship behavior. The method provided in this embodiment is basically the same as the method provided in Example 1, except that: the time series similarity algorithm is the edit distance algorithm, the trajectory clustering algorithm is the K-means algorithm, and the boundary extraction algorithm is the Delaunay triangulation algorithm.

[0133] Another aspect of the present application provides a data-driven online detection and early warning system for abnormal ship behavior, including:

[0134] Data cleaning module, used to clean the original ship AIS trajectory data;

[0135] The trajectory compression module is used to compress the cleaned trajectory data using a trajectory data compression algorithm, calculate the trajectory similarity with all ships based on the time series similarity algorithm, and construct a trajectory similarity measurement matrix;

[0136] Cluster analysis module, used to perform cluster analysis on the trajectory similarity measurement matrix using trajectory clustering algorithm to obtain clustering results;

[0137] The ship navigation area determination module is used to trace back the original ship AIS trajectory data based on the clustering results and determine the ship navigation area using the boundary extraction algorithm;

[0138] A trajectory prediction module is used to generate a predicted ship trajectory under a time length threshold using a historical average ship trajectory prediction algorithm;

[0139] The behavior detection and early warning module is used to combine the ship's navigation area with the ship's predicted trajectory, and detect abnormal ship behavior through angle difference change analysis and matching of ship trajectory points with the ship's navigation area, and issue early warnings.

[0140] It should be pointed out that, according to the needs of implementation, the various steps described in this application can be split into more steps, or two or more steps or partial operations of the steps can be combined into new steps to achieve the purpose of the present invention.

[0141] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data-driven online detection and early warning method for abnormal ship behavior, characterized in that: include: Perform data cleaning on the original ship AIS trajectory data; The cleaned trajectory data is compressed using a trajectory data compression algorithm, and the trajectory similarity with all ships is calculated based on the time series similarity algorithm to construct a trajectory similarity measurement matrix; Performing cluster analysis on the trajectory similarity measurement matrix using a trajectory clustering algorithm to obtain a clustering result; Backtracking the cleaned trajectory data based on the clustering results, and determining the ship's navigation area using a boundary extraction algorithm; The historical average ship trajectory prediction algorithm is used to generate the ship's predicted trajectory under the time length threshold; Combining the ship's navigation area with the predicted ship trajectory, abnormal ship behavior detection is achieved through angle difference change analysis and matching of ship trajectory points with the ship's navigation area, and early warning is issued.

2. A data-driven online detection and early warning method for abnormal ship behavior according to claim 1, characterized in that: The method of performing cluster analysis on the trajectory similarity measurement matrix using the trajectory clustering algorithm to obtain the clustering result is: Determine the input trajectory similarity measurement matrix, neighborhood distance value, and neighborhood density threshold; Traversing the values of the trajectory similarity measurement matrix, searching for a core trajectory according to the neighborhood distance value and the neighborhood density threshold, and adding the core trajectory to a core trajectory set; Select each core trajectory in the core trajectory set in turn, find the ship trajectories that are densely connected to the core trajectory, connect them to form a trajectory cluster and assign a cluster label; Trajectories that are not included in any trajectory cluster are identified as noise trajectories.

3. A data-driven online detection and early warning method for abnormal ship behavior according to claim 1, characterized in that: The method of backtracking the cleaned trajectory data based on the clustering result and determining the ship navigation area using a boundary extraction algorithm is as follows: The cleaned trajectory data is extracted using the MMSI as the unique identifier of the ship; all the ship trajectory data with the same cluster label are input into the boundary extraction algorithm to ensure that the navigation area is judged based on complete and accurate trajectory information.

4. A data-driven online detection and early warning method for abnormal ship behavior according to claim 1, characterized in that: The method for generating a predicted ship trajectory under a time length threshold using the historical average ship trajectory prediction algorithm is as follows: The historical average ship trajectory prediction algorithm uses historical automatic identification system data to analyze historical ship paths for specific routes, traffic patterns and environmental conditions, calculates average trajectories and their variations, and generates predicted ship trajectories within a time length threshold.

5. A data-driven online detection and early warning method for abnormal ship behavior according to claim 1, characterized in that: The original ship AIS data includes: time, MMSI, latitude, longitude, direction, true heading, and speed.

6. A data-driven online detection and early warning method for abnormal ship behavior according to claim 1, characterized in that: The specific method of data cleaning the original ship AIS data includes: removing duplicate records, filling missing data and removing outliers.

7. A data-driven online detection and early warning method for abnormal ship behavior according to claim 1, characterized in that: The trajectory data compression algorithm is a Douglas-Peucker algorithm or a sliding window algorithm; the time series similarity algorithm includes one of a dynamic time warping algorithm, a Hausdorff distance, and an edit distance algorithm.

8. A data-driven online detection and early warning method for abnormal ship behavior according to claim 1, characterized in that: The trajectory clustering algorithm includes one of a DBSCAN algorithm, a K-means algorithm, a spectral clustering algorithm, and a hierarchical clustering algorithm.

9. A data-driven online detection and early warning method for abnormal ship behavior according to claim 1, characterized in that: The boundary extraction algorithm includes one of an Alpha Shapes algorithm, a Delaunay triangulation algorithm, and a Graham Scan algorithm.

10. A data-driven online detection and early warning system for abnormal ship behavior, characterized in that: include: Data cleaning module, used to clean the original ship AIS trajectory data; The trajectory compression module is used to compress the cleaned trajectory data using a trajectory data compression algorithm, calculate the trajectory similarity with all ships based on the time series similarity algorithm, and construct a trajectory similarity measurement matrix; A clustering analysis module, configured to perform cluster analysis on the trajectory similarity measurement matrix using a trajectory clustering algorithm to obtain a clustering result; a ship navigation area determination module, configured to trace back the cleaned trajectory data based on the clustering result and determine the ship navigation area using a boundary extraction algorithm; A trajectory prediction module is used to generate a predicted ship trajectory under a time length threshold using a historical average ship trajectory prediction algorithm; The behavior detection and warning module is used to combine the ship's navigation area with the ship's predicted trajectory, and detect abnormal ship behavior through angle difference change analysis and matching of ship trajectory points with the ship's navigation area, and issue an early warning.

Citation Information

Cited By

  • Ship abnormal behavior determination method and device, storage medium and electronic equipment

    CN121260045A

  • Ship platform abnormal behavior detection method based on ADS-B big data

    CN121923940A