A method for detecting ship trajectory anomalies based on AIS data

By segmenting ship trajectories using the line segment distance formula based on AIS data and the minimum description principle, and combining it with the LTRAOD algorithm, the problems of high computational load and insufficient accuracy in existing technologies are solved, and efficient abnormal trajectory detection is achieved.

CN114756637BActive Publication Date: 2025-11-14XIAN UNIV OF FINANCE & ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210277745.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2025-11-14
Estimated Expiration
2042-03-21

AI Technical Summary

Technical Problem

Existing technologies involve large computational loads and time costs when detecting abnormal ship trajectories over long distances, and the accuracy of calculation results is insufficient for dense trajectory regions, making it difficult to effectively identify abnormal trajectories with mismatched behavioral characteristics.

Method used

By combining AIS data, the ship trajectory is segmented using the line segment distance formula and the minimum description principle, location feature points are extracted, the LTRAOD algorithm is used to determine the proportion of trajectory segments, and the local density method is used to identify abnormal trajectories.

Benefits of technology

It reduces the number of trajectory searches, improves detection efficiency and accuracy, solves the problems of high computational load and high time cost, and can effectively identify abnormal trajectories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114756637B_ABST
    Figure CN114756637B_ABST
Patent Text Reader

Abstract

This invention provides a method for detecting anomalies in ship trajectories based on AIS data, belonging to the field of ship data processing technology. This invention divides the trajectory using the principle of minimum description, describing local features of the trajectory in segments. Combined with a local density method, it uses the criterion that "the number of trajectory segments in the neighborhood does not meet a set threshold" as the criterion for anomaly trajectory classification, thereby reducing the number of trajectory searches and improving detection efficiency. Finally, it determines whether a trajectory is abnormal based on the proportion of the abnormal trajectory segments within the entire trajectory. This invention solves the problems of high computational load, high time consumption, and insufficient accuracy of calculation results for dense trajectory regions in existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ship data processing technology, and specifically relates to a method for detecting ship trajectory anomalies based on AIS data. Background Technology

[0002] Currently, the number of ships engaged in ocean transportation is increasing, and the density of ship traffic in coastal and port areas is growing. Furthermore, some ships do not follow the prescribed routes, making the navigation safety situation in coastal and port waters increasingly severe.

[0003] Knorr first proposed a distance-based method for detecting anomalous trajectories. In this algorithm, a trajectory is described as an object represented by three key features: start (end) position, direction (with average, minimum, and maximum values), and velocity (with average, minimum, and maximum values). The weighted average of the differences in feature values ​​between trajectories is chosen as the trajectory similarity criterion, and anomalous trajectories are detected based on the similarity between trajectories. This algorithm uses the entire trajectory as the basic unit for anomaly detection. However, for long and complex trajectories in practical applications, anomalous trajectory segments are easily averaged out by the entire trajectory. Therefore, this algorithm is only suitable for detecting isolated points with directions, start (end) positions, and velocities completely different from other trajectories and is not suitable for detecting long trajectories. To address this problem with long trajectories, Lee et al. proposed the TRAOD detection algorithm based on a segmentation detection framework. It divides the trajectory into a set of line segments using a two-level trajectory partitioning strategy (coarse-grained and fine-grained), using these line segments to describe the local features of the trajectory. However, this algorithm has low execution efficiency and poor performance for certain trajectories. Furthermore, the TRAOD algorithm requires calculating the density adjustment coefficient after the ship trajectory is partitioned, resulting in high computational cost, high time overhead, and insufficient accuracy in dense trajectory regions. Summary of the Invention

[0004] To overcome the shortcomings of the existing technology, the present invention provides a method for detecting ship trajectory anomalies based on AIS data.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for detecting ship trajectory anomalies based on AIS data includes the following steps:

[0007] A ship trajectory dataset is obtained by combining AIS (Automatic Identification System) broadcast information and ship route coordinate system; multiple primary position feature points are obtained from the ship trajectory dataset.

[0008] The first position feature points are divided into groups according to their positions, and multiple first trajectory segments are divided in each group of first position feature points based on their positions.

[0009] The similarity between the first trajectory segments in each group is determined by the line segment distance formula, and the navigation segment trajectory at that position is determined based on the similarity.

[0010] Several secondary location feature points were extracted from each segment of the navigation trajectory;

[0011] The principle of minimum description is used to divide all the second position feature points, and the divided second position feature points are connected to obtain multiple second trajectory segments;

[0012] The LTRAOD algorithm is used to obtain any second trajectory segment within the ship's navigation trajectory TR. i The proportion of the second trajectory segment is used to determine whether the second trajectory segment is abnormal; multiple second trajectory segments constitute the ship's navigation trajectory TR. i .

[0013] Preferably, it further includes: preprocessing the ship's route coordinate system; the preprocessing step of the ship's route coordinate system includes:

[0014] The coordinate system of satellite imagery is set based on the WGS84 coordinate system to obtain a bitmap containing the coordinate system;

[0015] The bitmap is offset using GCJ02 coordinates;

[0016] The offset bitmap is projected onto a Cartesian coordinate system to complete the processing of the ship's route coordinate system.

[0017] Preferably, the step of obtaining multiple first location feature points from the ship trajectory dataset includes:

[0018] Remove out-of-order and isolated points from the ship trajectory dataset;

[0019] Multiple first ship trajectories are sorted out by location from the ship trajectory dataset;

[0020] The first ship trajectory selected from multiple first ship trajectories has a number of trajectory points exceeding a threshold, and the data points therein are the first position feature points.

[0021] Preferably, the steps for obtaining the line segment distance formula include:

[0022] The perpendicular distance d between two line segments is calculated using the following formula. ⊥ ,

[0023]

[0024] The parallel distance d between two line segments is calculated using the following formula. || ,

[0025] d ||=min(l ||1 ,l ||2 )

[0026] l ||1 =min(dist(s) i ,p s ),dist(e i ,p s ))

[0027] l ||2 =min(dist(e i ,p e ),dist(s i ,p e ))

[0028] The angular distance d between two line segments is calculated using the following formula. θ ,

[0029]

[0030] The projection point p is calculated using the following formula. s and p e ,

[0031]

[0032]

[0033] in,

[0034]

[0035]

[0036] The angle θ is obtained by the following formula.

[0037]

[0038] Among them, l i and l j Let l represent two line segments respectively. i >l j ;s i and e i For line segment l i The two endpoints, s j and e j For line segment l j The two endpoints, p s For point s j On segment l i The projection point on p e For point e j On segment l i The projection point on, l⊥1 For point p s and s j The Euclidean distance between them, l ⊥2 For point p e and e j The Euclidean distance between them, ||L j ‖ is line segment l j The length;

[0039] The perpendicular distance d between the two line segments ⊥ Parallel distance d || angular distance d θ The formula for obtaining the distance between two line segments is dist(L). i ,L j ),

[0040] dist(L i ,L j )=ω ⊥ ·d ⊥ (L i ,L j )+ω || ·d || (L i ,L j )+ω θ ·d θ (L i ,L j )

[0041] Where, ω ⊥ ω is the vertical distance weighting ratio. || ω is the parallel distance weight ratio. θ The angular distance weighting ratio.

[0042] Preferred,

[0043] ω ⊥ =1

[0044] ω || =1

[0045] ω θ =1.

[0046] Preferably, the step of dividing all the second position feature points using the principle of minimum description to obtain multiple second trajectory segments includes:

[0047] Determining the ship's trajectory TR using the principle of minimum description i Simplicity and accuracy; among which, the ship's navigation trajectory TR is composed of multiple second trajectory segments. i ;

[0048] With simplicity and accuracy as constraints, the principle of minimum description is used to divide several second position feature points, resulting in multiple second trajectory segments.

[0049] Preferably, the method of determining the ship's navigation trajectory TR using the principle of minimum description is... i The steps to ensure simplicity and accuracy include:

[0050] The ship's navigation trajectory TR is formulated by the following formula. i Assuming the bit length L(H),

[0051]

[0052] Where len(p cj p cj+1 Let p be a point. cj and p cj p cj+1 The Euclidean distance between them;

[0053] The ship's trajectory TR under the assumed conditions is formulated by the following formula. i The data length L(D|H),

[0054]

[0055] By ship navigation track TR i The assumed bit length L(H) and data length L(D|H) values ​​determine the ship's navigation trajectory TR. i Simplicity and accuracy.

[0056] Preferably, the step of dividing several second position feature points using the principle of minimum description to obtain multiple second ship trajectory segments includes:

[0057] Select several points from the first position feature points as preliminary feature points;

[0058] Calculate the MDL of all preparatory feature points in each navigation segment trajectory. par and MDL nopar ;

[0059] Compare the MDL of each preparatory feature point par and MDL nopar When a preparatory feature point's MDL par MDL nopar If the first position feature point preceding the preparatory feature point is used as the preparatory feature point, the operation on the preparatory feature point is repeated; otherwise, the partition length of the navigation segment trajectory where the preparatory second position feature point is located is increased.

[0060] All the preparatory feature points are second position feature points. Connecting the second position feature points of each navigation segment trajectory yields multiple second trajectory segments.

[0061] Preferably, the steps for detecting multiple second vessel trajectory segments using the LTRAOD algorithm to obtain abnormal vessel trajectory segments include:

[0062] The second trajectory, satisfying the following condition, is divided into segments L to form a neighborhood N, dist(L,O). <D

[0063] Where O represents the second trajectory segment other than the second trajectory segment L, and D represents the distance threshold;

[0064] Based on the domain N, construct MinPts nearest neighbor sets for the second trajectory segment L; where MinPts satisfies: there are at least MinPts second trajectory segments α∈N such that dist(L,α)≤MinPts-distance(L); and at most MinPts-1 second trajectory segments α∈N such that dist(L,α). <MinPts-distance(L);

[0065] The MinPts nearest neighbor sets of the second trajectory segment L are collectively referred to as the MinPts neighborhood MNB(L) of the second trajectory segment L, where,

[0066] ‖MNB(L)‖=MinPts

[0067] Calculate the reachable distance of the second trajectory segment L for all second trajectory segments O.

[0068] reach-dist(L,O)=max{MinPts-distance(O),dist(L,O)}

[0069] Using the reachability distances of all second trajectory segments O and the MinPts neighborhood MNB(L) of the second trajectory segment L, the local reachability density llrd(L) of the second trajectory segment L is calculated.

[0070]

[0071] The local anomaly factor llof(L) of the second trajectory segment L is calculated using the local reachability density llrd(L) of each second trajectory segment L and the MinPts neighborhood MNB(L) of the second trajectory segment L.

[0072]

[0073] Anomalies in the second trajectory segment L are determined by the local anomaly factor llof(L) of the second trajectory segment L.

[0074]

[0075] Among them, outlier(TR) i The second trajectory segment is located on the ship's navigation trajectory TR. i The proportion in, len(llof) is the ship's navigation trajectory TR i The number of segments identified as abnormal trajectories, where F is the threshold parameter, and len(TR) is the length of the segment. i (TR is the ship's navigation trajectory) i The number of trajectories.

[0076] The ship trajectory anomaly detection method based on AIS data provided by this invention has the following beneficial effects: This invention divides the trajectory using the principle of minimum description, describing local features of the trajectory in segments. Combined with the local density method, it uses "the number of trajectory segments in the neighborhood not meeting a set threshold" as the criterion for anomaly trajectory division, thereby reducing the number of trajectory searches and improving detection efficiency. Furthermore, it determines whether a trajectory is abnormal based on the proportion of the abnormal trajectory segments within the entire trajectory. This invention solves the problems of high computational load, high time consumption, and insufficient accuracy of calculation results for dense trajectory regions in existing technologies. Attached Figure Description

[0077] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0078] Figure 1 This is a flowchart of the ship trajectory anomaly detection method based on AIS data according to Embodiment 1 of the present invention;

[0079] Figure 2 This is the message data storage format of Embodiment 1 of the present invention;

[0080] Figure 3 This is a schematic diagram of the Miller projection in Embodiment 1 of the present invention;

[0081] Figure 4 This is a schematic diagram of line segments used for calculating line segment distance in Embodiment 1 of the present invention;

[0082] Figure 5 This is a schematic diagram of line segment division according to Embodiment 1 of the present invention;

[0083] Figure 6 This is a schematic diagram of the line segment division result processed by the principle of minimum description in Embodiment 1 of the present invention;

[0084] Figure 7 This is a schematic diagram of the processing result of the TRAOD algorithm in Embodiment 1 of the present invention;

[0085] Figure 8 This is a map showing the actual AIS data of Port A and its surrounding waters during a certain time period from Hotel B to Point C in Embodiment 1 of the present invention.

[0086] Figure 9 This is a schematic diagram of the actual AIS data from Hotel B to Point C in Port A and the surrounding waters during a certain time period in Embodiment 1 of the present invention, arranged by time intervals.

[0087] Figure 10 This is a schematic diagram showing the number of isolated points in the ship trajectory data in Embodiment 1 of the present invention;

[0088] Figure 11 This is a schematic diagram of the trajectories of multiple first ships in Embodiment 1 of the present invention;

[0089] Figure 12 This is a schematic diagram showing the number of trace points in the multiple first ship trajectories in Embodiment 1 of the present invention;

[0090] Figure 13 This is a schematic diagram of a flight path in Embodiment 1 of the present invention, which retains only the number of trajectory points within 100.

[0091] Figure 14 These are the multiple second trajectory segments after being divided according to the MDL principle in Embodiment 1 of the present invention;

[0092] Figure 15 This is a comparison diagram of the number of first position feature points and the number of second position feature points in Embodiment 1 of the present invention. Detailed Implementation

[0093] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0094] Example 1

[0095] See Figure 1This invention provides a method for detecting ship trajectory anomalies based on AIS data, comprising the following steps: obtaining a ship trajectory dataset by combining AIS ship automatic identification broadcast information and a ship route coordinate system; obtaining multiple first position feature points from the ship trajectory dataset; dividing the first position feature points into groups according to their positions, and dividing each group of first position feature points into multiple first trajectory segments based on their positions; determining the similarity between each group of first trajectory segments using the line segment distance formula, and determining the navigation segment trajectory at that position based on the similarity; mining several second position feature points in each navigation segment trajectory; dividing all the second position feature points using the minimum description principle, and connecting the divided second position feature points to obtain multiple second trajectory segments; obtaining the position of any second trajectory segment on the ship's navigation trajectory TR using the LTRAOD algorithm. i The proportion of the second trajectory segment is used to determine whether the second trajectory segment is abnormal; multiple second trajectory segments constitute the ship's navigation trajectory TR. i .

[0096] Automatic Identification System (AIS) is a new type of navigation aid. The basic function of AIS is to automatically and periodically broadcast dynamic information such as the precise position, heading, speed (vector line), turning speed, and nearest encounter distance of the vessel and other vessels, as well as static information such as vessel name, call sign, type, length, and beam, via VHF. Vessels equipped with AIS within the VHF coverage area (20 nautical miles) can automatically receive this information. The advantages of AIS are: the time interval between two AIS messages automatically decreases as the vessel's speed increases, providing an effective collision avoidance measure and greatly enhancing radar capabilities; AIS navigation information is transmitted in the air and can be received by local VTS stations, requiring only an AIS base station for the VTS to provide operators with complete traffic dynamics information for all AIS-equipped vessels; and because AIS is completely independent of radar, AIS-based VTS systems do not require radar installation.

[0097] AIS broadcast messages are divided into two types: VDM (Video Direct Message) and VDO (Video Direct Message). Because AIS messages are large and direct transmission is inefficient, AIS data is preprocessed by compression. The preprocessing steps include: compressing the messages using a compression algorithm during transmission; and then, after the decoding tool obtains the compressed data, extracting the necessary data. Figure 2The data format shown stores the data in MySQL, and the decoded results are structured into a Position table according to the ACID principles of databases. Using the MyBatis framework, ORM (Object Relational Mapping) is used to map database tables to entity classes and their attributes; therefore, manipulating entity classes directly manipulates database tables.

[0098] The Earth is an irregular ellipsoid, and the coordinate system definition in GIS is determined by two sets of parameters: the datum plane and the map projection. The WGS84 (World Geodetic System 1984) coordinate system used in AIS data is a coordinate system established for use with the GPS global positioning system, collected through observations from satellite stations around the world using GPS devices. The raw satellite imagery data is a bitmap without a coordinate system, therefore its coordinate system needs to be manually defined. GCJ02 is a state-secret plugin that artificially biases the real coordinate system; if the AIS geographic location data is not processed, the drawn trajectory will have a certain offset. Since the distance used in this embodiment is calculated using Euclidean distance, a projection is used to project the GPS coordinates onto a Cartesian coordinate system for ease of calculation. Based on this, the preprocessing steps for the ship route coordinate system include: setting the coordinate system of the satellite imagery based on the WGS84 coordinate system to obtain a bitmap containing the coordinate system; offsetting the bitmap using GCJ02 coordinates; and projecting the offset bitmap onto a Cartesian coordinate system to complete the processing of the ship route coordinate system.

[0099] The offset bitmap is projected onto a Cartesian coordinate system using Miller projection. The Earth's surface is uneven; in geodesy, it's a curved surface that cannot be accurately expressed mathematically and therefore cannot serve as a reference surface for measurement and mapping. An imaginary ellipse with extremely small flattening, rotated around the Earth's minor axis, forms a regular ellipsoid called the Earth ellipsoid. The surface of the Earth ellipsoid is a regular mathematical surface, used in measurement and mapping to replace the Earth's natural surface. Maps and measurement spaces in daily life are usually two-dimensional planes; therefore, curved surfaces are transformed into planes in cartography and linear measurements. Since the position of any point on the sphere is represented by geographic coordinates... The geographic coordinates are represented by Cartesian coordinates (x, y) or polar coordinates, while the positions of points on the plane are represented by Cartesian coordinates (x, y). The relationship between geographic coordinates and Cartesian or polar coordinates is determined by map projection methods. In this embodiment, the map projection method used is the Miller projection, such as... Figure 3 As shown, the principle of Miller projection is as follows: Imagine a cylinder perpendicular to the equator placed on the Earth. A lamp is lit at the Earth's center, and the light projects various points on the Earth onto the cylinder. When the cylinder is unfolded, a planar projection of the Earth is obtained.

[0100] In this embodiment, the step of obtaining multiple first position feature points from the ship trajectory dataset includes: removing out-of-order points and isolated points from the ship trajectory dataset; sorting multiple first ship trajectories from the ship trajectory dataset according to their positions; and selecting first ship trajectories from the multiple first ship trajectories where the number of trajectory points exceeds a threshold, wherein the data points are the first position feature points.

[0101] This invention addresses abnormal trajectory judgment by identifying trajectories with mismatched behavioral characteristics, rather than abnormal trajectories caused by objective reasons. Abnormal trajectories caused by objective reasons refer to situations such as ship anomalies due to AIS equipment recording problems. Since ships cannot maintain their course for extended periods, normal ship trajectories cannot be perfectly straight. Such situations may arise from the AIS equipment's reception of information. For ship radios transmitting AIS data sequentially, the AIS data may be reflected or blocked by various obstructions during transmission and propagation, leading to varying propagation times to the same receiving radio station. It's also possible that AIS data transmitted during the ship's voyage is blocked and not received by the AIS base station. This can result in long intervals between received AIS data. When ship time differences are significant, the received AIS sequence may differ from the transmitted AIS sequence.

[0102] In this invention, a point is defined as an isolated point if the time interval between it and its preceding and following trajectory points is greater than 400 seconds. If the time interval between a point and its preceding point is greater than 400 seconds, but the time interval between it and its following point is less than 400 seconds, then this point is considered the starting point of the next continuous trajectory segment. Because the data transmitted by AIS devices currently still has a high error rate, and the data is easily affected by the environment during reception, it can cause problems such as breakpoints, duplications, and timing errors in the received data. Failure to process out-of-order and isolated points will significantly impact subsequent results.

[0103] Furthermore, in this embodiment, the step of sorting out multiple first ship trajectories from the ship trajectory dataset by position includes: for the ship trajectory dataset I = {TR1, TR2, ..., TR...} n}, if the trajectory points satisfy (p n .getTIME-p n-1 If .getTIME)>400s, define p n For the first ship trajectory TR m The starting point, p n-1 For the first ship trajectory TR m-1The endpoint. By identifying the start and end points of each segment of the first ship trajectory, multiple first ship trajectories are sorted out from the ship trajectory dataset by location.

[0104] The definition of line segment distance consists of three parts: perpendicular distance d ⊥ Parallel distance d || angular distance d θ See Figure 4 These three parts are used to identify the similarity of trajectory segments. In this embodiment, the steps to obtain the line segment distance formula include:

[0105] The perpendicular distance d between two line segments is calculated using the following formula. ⊥ ,

[0106]

[0107] The parallel distance d between two line segments is calculated using the following formula. || ,

[0108] d || =min(l ||1 ,l ||2 )

[0109] l ||1 =min(dist(s) i ,p s ),dist(e i ,p s ))

[0110] l ||2 =min(dist(e i ,p e ),dist(s i ,p e ))

[0111] The angular distance d between two line segments is calculated using the following formula. θ ,

[0112]

[0113] Angular distance helps distinguish the angular distance between line segments with significantly different directions. When dealing with undirected line segments, the angular distance can be simply defined as d. θ =||L j ||×sinθ0≤θ<π.

[0114] The projection point p is calculated using the following formula. s and p e ,

[0115]

[0116]

[0117] in,

[0118]

[0119]

[0120] The angle θ is obtained by the following formula.

[0121]

[0122] See Figure 4 , l i and l j Let l represent two line segments respectively. i >l j ;s i and e i For line segment l i The two endpoints, s j and e j For line segment l j The two endpoints, p s For point s j On segment l i The projection point on p e For point e j On segment l i The projection point on, l ⊥1 For point p s and s j The Euclidean distance between them, l ⊥2 For point p e and e j The Euclidean distance between them, ||L j ‖ is line segment l j The length.

[0123] The perpendicular distance d between the two line segments ⊥ Parallel distance d || angular distance d θ The formula for obtaining the distance between two line segments is dist(L). i ,L j ),

[0124] dist(L i ,L j )=ω ⊥ ·d ⊥ (L i ,L j )+ω || ·d || (L i ,L j )+ω θ ·dθ (L i ,L j )

[0125] Where, ω ⊥ ω is the vertical distance weighting ratio. || ω is the parallel distance weight ratio. θ ω represents the angular distance weight ratio. The values ​​of the vertical distance weight ratio, horizontal distance weight ratio, and angular distance weight ratio are selected based on the specific characteristics of the trajectory dataset. In this embodiment, ω is set... ⊥ =1, ω || =1ω θ =1.

[0126] In this embodiment, the step of dividing all the second position feature points into multiple second trajectory segments using the principle of minimum description includes: determining the ship's navigation trajectory TR using the principle of minimum description. i Simplicity and accuracy; among which, the ship's navigation trajectory TR is composed of multiple second trajectory segments. i With simplicity and accuracy as constraints, the principle of minimum description is used to divide several second position feature points to obtain multiple second trajectory segments.

[0127] See Figure 5 This displays the division of a line segment. Ideally, line segment division should possess two properties: accuracy and simplicity. Accuracy requires that the difference between a line segment and its corresponding set of segment partitions be as small as possible. Simplicity requires that the number of segment partitions be as small as possible. Achieving high accuracy requires that line segments be divided where behavior changes rapidly; otherwise, accuracy cannot be obtained. However, accuracy and simplicity are contradictory. In this embodiment, if the ship's navigation trajectory TR is selected... i All points in the second position feature point are used as the second position feature point, and the ship's navigation trajectory TR is composed of the second position feature point as the dividing point. i This will offer the highest accuracy, but correspondingly, its simplicity will be minimized. Conversely, if only the starting and ending points are selected as the ship's trajectory TR... i If the second position feature point is selected, simplicity is maximized, but accuracy is minimized.

[0128] In this embodiment, the ship's navigation trajectory TR is determined using the principle of minimal description. i The simplicity and accuracy are used to achieve the ship's navigation trajectory TR iThe goal is to strike a balance between simplicity and accuracy in trajectory partitioning. The Minimal Description Principle (MDL) is the optimal method for finding a balance between accuracy and simplicity in trajectory partitioning. The cost of MDL consists of two elements: L(H) and L(D|H), where (H) represents the hypothesis and (D) represents the data. L(H) is the length of the hypothesis bits, and L(D|H) is the length of the data after encoding with the help of the hypothesis.

[0129] Determining the ship's trajectory TR using the principle of minimum description i The steps to ensure simplicity and accuracy include:

[0130] The ship's navigation trajectory TR is formulated by the following formula. i Assuming the bit length L(H),

[0131]

[0132] Where len(p cj p cj+1 Let p be a point. cj and p cj p cj+1 The Euclidean distance between them.

[0133] The ship's trajectory TR under the assumed conditions is formulated by the following formula. i The data length L(D|H) is calculated using the sum of the vertical distance and angular distance to differentiate measurements. This is because the ship's trajectory TR... i It is partitioned around its trajectory, so parallel distance is not considered here.

[0134]

[0135] By ship navigation track TR i The assumed bit length L(H) and data length L(D|H) values ​​determine the ship's navigation trajectory TR. i Simplicity and accuracy.

[0136] Determining the ship's trajectory TR using the principle of minimum description i In the process of simplifying and improving accuracy, the reason for defining L(H) using the length of the line segment rather than its endpoints is as follows: This invention divides the trajectory based on the relative distances of the line segments (sub-trajectories). The length (reflected by L(H)) and the distance function, i.e., the perpendicular, parallel, and angular distances between the line segments (reflected by L(D|H)), are better measured relative distances than the endpoints. Not using endpoints makes the segmentation result unaffected by the line segment coordinate values; that is, a bundle of line segments can move from a lower coordinate position to a higher coordinate position. However, the distance function should still accurately measure the relative distances. If the coordinate values ​​of the endpoints are used to formulate L(H), the segmentation result may be distorted due to this bias.

[0137] In this embodiment, the step of dividing several second position feature points into multiple second ship trajectory segments using the minimum description principle includes: selecting several points from the first position feature points as preliminary feature points; and calculating the MDL of all preliminary feature points in each navigation segment trajectory. par and MDL nopar Compare the MDL of each preparatory feature point. par and MDL nopar When a preparatory feature point's MDL par MDL nopar If the previous first position feature point of the prepared feature point is used as the prepared feature point, the operation on the prepared feature point is repeated; otherwise, the partition length of the navigation segment trajectory where the prepared second position feature point is located is increased; all prepared feature points are second position feature points, and connecting the second position feature points of each navigation segment trajectory yields multiple second trajectory segments. Figure 6 It can be seen that the principle of minimum description can ensure the accuracy of compression while compressing the trajectory.

[0138] The TRAOD algorithm is a classic anomalous trajectory detection algorithm. This algorithm first preprocesses the trajectory data. This method can effectively identify anomalous trajectory segments. To address the limitation of the TRAOD algorithm in effectively detecting accurate anomalous trajectory segments when processing dense trajectory datasets, the LTRAOD algorithm proposes a local anomalous trajectory segmentation detection algorithm based on distance and density. The steps for obtaining anomalous ship trajectory segments by detecting multiple second ship trajectory segments using the LTRAOD algorithm include:

[0139] The second trajectory, satisfying the following condition, is divided into segments L to form a neighborhood N, dist(L,O). <D

[0140] Where O represents the second trajectory segment other than L, and D represents the distance threshold.

[0141] Based on the domain N, construct MinPts nearest neighbor sets for the second trajectory segment L; where MinPts satisfies: there are at least MinPts second trajectory segments α∈N such that dist(L,α)≤MinPts-distance(L); and at most MinPts-1 second trajectory segments α∈N such that dist(L,α). <MinPts-distance(L)。

[0142] The MinPts nearest neighbor sets of the second trajectory segment L are collectively referred to as the MinPts neighborhood MNB(L) of the second trajectory segment L, where,

[0143] ‖MNB(L)‖=MinPts

[0144] Calculate the reachable distance of the second trajectory segment L for all second trajectory segments O.

[0145] reach-dist(L,O)=max{MinPts-distance(O),dist(L,O)}

[0146] Using the reachability distances of all second trajectory segments O and the MinPts neighborhood MNB(L) of the second trajectory segment L, the local reachability density llrd(L) of the second trajectory segment L is calculated.

[0147]

[0148] The local anomaly factor llof(L) of the second trajectory segment L is calculated using the local reachability density llrd(L) of each second trajectory segment L and the MinPts neighborhood MNB(L) of the second trajectory segment L.

[0149]

[0150] Anomalies in the second trajectory segment L are determined by the local anomaly factor llof(L) of the second trajectory segment L.

[0151]

[0152] Among them, outlier(TR) i The second trajectory segment L is located on the ship's navigation trajectory TR. i The proportion in, len(llof) is the ship's navigation trajectory TR i The number of segments identified as abnormal trajectories, where F is the threshold parameter, and len(TR) is the length of the segment. i (TR is the ship's navigation trajectory) i The number of trajectories. See also Figure 7 ,in, Figure 7 (a) is the dataset of all first-position feature points. Figure 7 (b) is the dataset of all second-position feature points. Figure 7 (c) Segmenting the identified abnormal trajectory.

[0153] The following uses a set of real AIS data from Hotel B to Point C in Port A and its surrounding waters over a certain period of time to further illustrate the content of this invention.

[0154] In this embodiment, the map API used is the Baidu Maps API, which uses the BD09 coordinate system obtained by further encrypting the GCJ02 coordinates. See also... Figure 3 ,from Figure 3 (b) It can be seen that the Earth's poles are elongated. Since the coordinates of the data used in this embodiment are mostly located in Port A, which is close to the equator, they are almost unaffected. Therefore, the impact of projection is not considered in this embodiment.

[0155] Figure 8 This shows how the AIS data is displayed on the map. Figure 8 (a) shows the ship trajectory data before removing out-of-order and isolated points. Figure 8 (b) shows the ship trajectory data after removing out-of-order and isolated points. In real-world scenarios, the received AIS data is not real-time and continuous; there are often significant time intervals, such as when a ship turns off its AIS radio after docking and then turns it back on after leaving port. This results in a considerable time difference between the preceding and following data. Figure 8 (a) One reason why some trajectories are straight.

[0156] See Figure 9 , Figure 9 (a) is the ship trajectory data displayed by time intervals without removing out-of-order and isolated points from the AIS data. Figure 9 (b) is the ship trajectory data displayed at time intervals after removing out-of-order and isolated points from the AIS data. Figure 9 As can be seen in (a), the trajectory data with time intervals greater than 400 seconds is dense and contains continuous isolated points. Figure 9 As can be seen in (b), although there are still trajectory points with time intervals greater than 400s, these trajectory points are not isolated points, but rather the starting points of the next segment of continuous trajectory data. Figure 10 The data displayed shows the number of isolated points in the ship trajectory data. (See attached image.) Figure 10 It can be seen that isolated points account for 27.73% of the original ship trajectory data. If this part of the data is not processed, it will have a significant impact on subsequent experiments. Moreover, it can be seen from this that the data sent by the AIS device still has a high error rate. The data is easily affected by the environment during the reception process, resulting in problems such as breakpoints, duplication, and timing errors in the received data.

[0157] Figure 11 The number of trace points in multiple first-ship trajectories is displayed. Figure 11In the data, some track data points are too few, less than 20. This is because the ship's AIS data belongs to Class B, meaning it transmits AIS data once every 30 seconds. Therefore, 20 data points only represent approximately 10 minutes of track recording. Distance measurements on the map show that the distance from Hotel B to point C is approximately 18 kilometers. The ship's average speed is 20 knots, or approximately 37 kilometers per hour. Under ideal conditions, the ship can only travel a maximum of about 6 kilometers in 10 minutes. Therefore, a track with approximately 20 data points cannot represent the ship's typical behavioral characteristics. (See also...) Figure 12 The chart shows the number of first vessel tracks with different numbers of track points. It can be seen that 49 tracks, accounting for 26.5% of the total, have fewer than 20 track points. This proportion is not low, and these tracks may be due to problems with AIS data transmission and reception, resulting in some data not being received. Meanwhile, from... Figure 12 The data shows that 101 tracks have 20-100 track points, accounting for 54.5% of the total; 35 tracks have more than 100 track points, accounting for 19% of the total. Based on the above analysis, it can be determined that the first ship track with fewer than 20 track points needs to be excluded.

[0158] Figure 13 Tracks with more than 100 track points were removed, and only tracks with fewer than 100 track points were retained. Figure 13 As can be seen, most of the tracks with fewer than 100 points are generated by lingering in ports, rather than by actual navigation. Therefore, in this embodiment, the detection of trajectory anomalies for the vessel is mainly focused on tracks with more than 100 points, as these tracks are more representative of the vessel's behavioral characteristics.

[0159] Figure 14 The image shows a scatter plot of the second position feature points after MDL (Mean Difference of Positions) partitioning and a line graph connecting multiple second trajectory segments. The trajectory formed by connecting the feature points obtained using the MDL partitioning method is nearly identical to the original trajectory. This demonstrates that the MDL partitioning approximation algorithm used in the experiment is realistic and reliable, and can well describe the trajectory characteristics of the ship. Figure 15 The image shows a comparison of the number of feature points at the first location and the number of feature points at the second location. From... Figure 15As can be seen, the number of first position feature points is 144, while only 54 second position feature points extracted after segmentation are needed to describe the original trajectory, utilizing only 37.5% of the number of first position feature points. Among these second position feature points, some trajectory points are formed at the ship's departure and navigation points. Due to the significant variations in the behavioral characteristics of these second position feature points, the feature point extraction effect is not very significant. If these points are discarded, the compression efficiency of the algorithm can reach about 90%. Therefore, it can be seen that the present invention has a more significant compression effect on trajectories with longer trajectories and more trajectories.

[0160] The above embodiments are merely preferred embodiments of the present invention, and the scope of protection of the present invention is not limited thereto. Any simple changes or equivalent substitutions of the technical solutions that can be obviously obtained by those skilled in the art within the scope of the technology disclosed in the present invention shall fall within the scope of protection of the present invention.

Claims

1. A method for detecting ship trajectory anomalies based on AIS data, characterized in that, Includes the following steps: A ship trajectory dataset is obtained by combining AIS (Automatic Identification System) broadcast information and ship route coordinate system. Multiple first-position feature points are obtained from the ship trajectory dataset; The first position feature points are divided into groups according to their positions, and multiple first trajectory segments are divided in each group of first position feature points based on their positions. The similarity between the first trajectory segments in each group is determined by the line segment distance formula, and the navigation segment trajectory at that position is determined based on the similarity. Several secondary location feature points were extracted from each segment of the navigation trajectory; The principle of minimum description is used to divide all the second position feature points, and the divided second position feature points are connected to obtain multiple second trajectory segments; The LTRAOD algorithm is used to obtain any second trajectory segment within the ship's navigation trajectory. The proportion of the second trajectory segment is used to determine whether the second trajectory segment is abnormal; multiple second trajectory segments constitute the ship's navigation trajectory. ; The steps for obtaining anomalous ship trajectory segments by detecting multiple second ship trajectory segments using the LTRAOD algorithm include: The second trajectory segments L that satisfy the following condition are used to form a neighborhood N. in, For the other second trajectory segments besides the second trajectory segment L, Distance threshold; Based on the domain N, construct 𝑀𝑖𝑛𝑃𝑡𝑠 sets of the nearest neighbors of the second trajectory segment 𝐿; where... Satisfy: at least one Second trajectory segment ,satisfy At most Second trajectory segment ,satisfy ; The set of 𝑀𝑖𝑛𝑃𝑡𝑠 nearest neighbors of the second trajectory segment 𝐿 is called the second trajectory segment 𝐿. field ,in, Calculate the second trajectory segment 𝐿 for all second trajectory segments The reachable distance, Using the second trajectory segment 𝐿 for all second trajectory segments The reachable distance and the second trajectory segment of 𝐿 field Calculate the local reachability density of the second trajectory segment L. , Using the local reachability density of each second trajectory segment L The second trajectory segment L field Calculate the local anomaly factor of the second trajectory segment L. , Local anomaly factors through the second trajectory segment L Anomaly detection is performed on the second trajectory segment L. in, The second trajectory segment L is in the ship's navigation trajectory The proportion in For the ship's navigation trajectory The number of segments identified as abnormal trajectories. For threshold parameters, For the ship's navigation trajectory The number of trajectories.

2. The method for detecting ship trajectory anomalies based on AIS data according to claim 1, characterized in that, Also includes: Preprocessing of the ship's route coordinate system; The steps for preprocessing the ship's route coordinate system include: The coordinate system of satellite imagery is set based on the WGS84 coordinate system to obtain a bitmap containing the coordinate system; The bitmap is offset using GCJ02 coordinates; The offset bitmap is projected onto a Cartesian coordinate system to complete the processing of the ship's route coordinate system.

3. The method for detecting ship trajectory anomalies based on AIS data according to claim 1, characterized in that, The step of obtaining multiple first location feature points from the ship trajectory dataset includes: Remove out-of-order and isolated points from the ship trajectory dataset; Multiple first ship trajectories are sorted out by location from the ship trajectory dataset; The first ship trajectory selected from multiple first ship trajectories has a number of trajectory points exceeding a threshold, and the data points therein are the first position feature points.

4. The method for detecting ship trajectory anomalies based on AIS data according to claim 1, characterized in that, The steps to obtain the formula for line segment distance include: The perpendicular distance between two line segments can be calculated using the following formula. , The parallel distance between two line segments can be calculated using the following formula. , The angular distance between two line segments can be calculated using the following formula. , The projection point is calculated using the following formula. and , in, The angle is obtained using the following formula. , in, and Let each represent a line segment, and ; and For line segments The two endpoints, and For line segments The two endpoints, For point Online segment Projection points on, For point Online segment Projection points on, For point and The Euclidean distance between them For point and The Euclidean distance between them For line segments The length; The perpendicular distance between two line segments parallel distance Angular distance Formula for obtaining the distance between two line segments , in, The vertical distance weighting ratio This is the weighting ratio of parallel distances. The angular distance weighting ratio.

5. The method for detecting ship trajectory anomalies based on AIS data according to claim 4, characterized in that, 。 6. The method for detecting ship trajectory anomalies based on AIS data according to claim 4, characterized in that, The step of dividing all the second position feature points using the minimum description principle to obtain multiple second trajectory segments includes: Determining the ship's trajectory using the principle of minimal description Simplicity and accuracy; among which, the ship's navigation trajectory is composed of multiple second trajectory segments. ; With simplicity and accuracy as constraints, the principle of minimum description is used to divide several second position feature points, resulting in multiple second trajectory segments.

7. The method for detecting ship trajectory anomalies based on AIS data according to claim 6, characterized in that, The principle of minimum description is used to determine the ship's navigation trajectory. The steps to ensure simplicity and accuracy include: The ship's navigation trajectory is formulated using the following formula. Assumed bit length , in, For point and The Euclidean distance between them; The ship's trajectory under assumed conditions is formulated by the following formula. Data length , By ship navigation trajectory Assumed bit length and data length The value determines the ship's navigation trajectory Simplicity and accuracy.

8. The method for detecting ship trajectory anomalies based on AIS data according to claim 1, characterized in that, The step of dividing several second position feature points using the principle of minimum description to obtain multiple second ship trajectory segments includes: Select several points from the first position feature points as preliminary feature points; Calculate all preliminary feature points in each navigation segment trajectory. and ; Compare each preparatory feature point and When a preparatory feature point If the first position feature point preceding the preparatory feature point is used as the preparatory feature point, the operation on the preparatory feature point is repeated; otherwise, the partition length of the navigation segment trajectory where the preparatory second position feature point is located is increased. All the preparatory feature points are second position feature points. Connecting the second position feature points of each navigation segment trajectory yields multiple second trajectory segments.

Citation Information

Patent Citations

  • Ship anomaly detection method based on improved trajectory segment DBSCAN clustering

    CN113032502A

  • Multi-step clustering fishing boat behavior identification method based on AIS trajectory data

    CN114139608A