A Ship Abnormal Behavior Detection Method Based on Distance Measurement and Isolation Mechanism

Through preprocessing and trajectory compression of AIS data, combined with multi-dimensional density clustering and isolated forest algorithm, real-time abnormal detection of ship location and speed is achieved, solving the problem of the inability to detect ship abnormal behavior in the existing technology in real time, and improving the safety of maritime ships.

CN115457300BActive Publication Date: 2025-07-22NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111570578.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-07-22
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

The prior art cannot realize the detection of ship abnormal behavior in real time, especially in online detection, where distance threshold selection has a great impact and low scalability, and only position abnormalities are detected but speed abnormalities are not detected.

Method used

By preprocessing and trajectory compression of AIS data, using multi-dimensional density clustering and isolated forest algorithms, ship position and velocity information models are extracted, and real-time anomaly detection is performed in combination with distance measurement and isolation mechanism.

Benefits of technology

Real-time abnormality detection of ship position and speed is realized, the safety of maritime ships is improved, and early warning and route adjustment can be carried out in a timely manner to improve safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115457300B_ABST
    Figure CN115457300B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting abnormal behaviors of ships based on distance measurement and isolation mechanism. This method analyzes based on ship AIS data. First, the AIS data is preprocessed and trajectory compressed. Then, a position information model of the ship is extracted from the trajectory clusters after multi-dimensional density clustering. By comparing the difference between the ship trajectory points and the ship position information model, real-time abnormal detection of the ship's position information is achieved. Next, the isolation forest algorithm is used to detect abnormal ship speeds, and a functional relationship between the speed weight and the score value for determining abnormal speeds is established. The abnormal speed values are detected and eliminated to obtain an accurate ship speed set. Finally, the speed to be detected is added to the speed set, and whether there is a speed abnormality is judged by calculating the abnormal score value of the speed to be detected. The present invention can improve the driving safety of ships at sea and timely detect and warn against abnormal behaviors of ships at sea.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data mining, and particularly relates to a method for detecting abnormal behaviors of ships. Background Art

[0002] The safety and security issues of the ocean have always been the focus of maritime navigation. Especially with the sharp increase in the number of maritime traffic, the safety and security issues of the ocean have become particularly important. To ensure the safety of ships during navigation, we need to monitor the navigation information of ships in real time, such as position information and speed information, etc. Currently, most ships are equipped with the Automatic Identification System (AIS), which can record the navigation information of ships in real time. This navigation information includes the Maritime Mobile Service Identify (MMSI), longitude, latitude, speed, and heading of the ship, etc. Utilizing this information can help us analyze the navigation status of ships and detect abnormal trajectories of ships, so as to give early warnings and prompt ships to take corresponding measures, such as adjusting the ship's route in real time, reducing or increasing the ship's speed, etc., to further improve the safety of ship navigation.

[0003] However, currently, the general detection of abnormal ship behaviors is offline detection, that is, it is impossible to detect abnormal ship behaviors in real time. Although the effect of abnormal detection is good in experiments, it cannot be applied to actual engineering. In the methods for online detection of abnormal ship behaviors, the methods of distance measurement and mathematical modeling are generally adopted. Both of these methods judge whether there are abnormal behaviors of the object to be detected by measuring the distance between the object to be detected and the correct object. However, the problem is that the selection of the distance threshold has a great influence on judging whether the object to be detected is abnormal, and the method for detecting abnormal ship behaviors based on mathematical modeling has low scalability. At the same time, in most other current online methods for detecting abnormal ship behaviors, only position abnormal information is mined in the detection of abnormal ship trajectories, and speed abnormal information is not mined.

[0004] In summary, it is of great research significance to study the method for online detection of abnormal ship behaviors. Summary of the Invention

[0005] In order to overcome the deficiencies of the prior art, the present invention provides a method for detecting abnormal behaviors of ships based on distance measurement and isolation mechanism. This method analyzes based on ship AIS data. First, it preprocesses the AIS data and compresses the trajectory. Then, it extracts the position information model of the ship from the trajectory clusters after multi-dimensional density clustering. By comparing the differences between the ship trajectory points and the ship position information model, it realizes real-time abnormal detection of the ship's position information. Next, it uses the Isolation Forest algorithm to detect abnormal ship speeds, establishes a functional relationship between the speed weight and the score value for determining abnormal speeds, detects and eliminates abnormal speed values, and thus obtains the correct set of ship speeds. Finally, it adds the speed to be detected to the speed set and determines whether there is a speed anomaly by calculating the abnormal score value of the speed to be detected. The present invention can improve the driving safety of ships at sea and detect and give early warnings in a timely manner for the abnormal behaviors of ships at sea.

[0006] The technical solution adopted by the present invention to solve its technical problems includes the following steps:

[0007] Step 1: Preprocess the AIS data points of the ship and screen out the typical trajectories of the ship;

[0008] Step 1-1: For AIS data points, if there are two or more AIS data points with exactly the same values, only retain any one of the AIS data points;

[0009] Step 1-2: Convert the longitude and latitude coordinates of each AIS data point into plane rectangular coordinates according to the Miller projection, and map the coordinates to the range of 0 to 10 through the standardized method to obtain the plane rectangular coordinate x and the plane rectangular coordinate y of the AIS data point;

[0010] Step 1-3: Sort the AIS data points of each ship in chronological order and construct the typical trajectory TR(p1, p2...p n ), p i is the data point on the typical trajectory of the ship at the i-th moment, i = 1, 2,...n; the time interval between any two adjacent AIS data points on the typical trajectory of the ship is less than T minutes; if the time interval between two AIS data points is greater than or equal to T minutes, then the point with the earlier time among the two AIS data points is the end point of a typical trajectory, and the point with the later time is the starting point of the next typical trajectory;

[0011] Step 2: Compress the typical trajectory of the ship and divide the ship sub-trajectory;

[0012] Step 2-1: Use the AMDL method based on the minimum length description criterion of acceleration to compress the trajectory of the ship;

[0013] Step 2-1-1: Mark the first AIS data point in the trajectory as a feature point; set startIndex = 1 and length = 1; start traversing all points on a ship's trajectory, and let currentIndex = startIndex + length;

[0014] Step 2-1-2: Determine whether the acceleration of any data point p i in the trajectory of the ship from the startIndex point to the currentIndex point changes from positive to negative or from negative to positive, that is or are the velocities of the previous data point, the current data point, and the next data point respectively; if currentIndex - startIndex < 2, it is considered that there is no data point where the acceleration changes from positive to negative or from negative to positive;

[0015] Step 2-1-3: If there is no data point where the acceleration changes from positive to negative or from negative to positive, use the MDL method for trajectory compression, that is, calculate the splitting cost and non-splitting cost in this section of the trajectory; if the splitting cost is greater than the non-splitting cost and currentIndex - startIndex ≥ 2, mark the point at currentIndex - 1 as a trajectory feature point, and let startIndex = currentIndex - 1 and length = 1; otherwise, let length = length + 1;

[0016] If there is a data point where the acceleration changes from positive to negative or from negative to positive, mark the position of this point as currentIndex and mark this point as a trajectory feature point, and at the same time let startIndex = currentIndex and length = 1;

[0017] Step 2-1-4: If startIndex + length > n, output all feature points; the trajectory points after compression based on the AMDL method are represented as Its compressed trajectory is represented as

[0018] Step 2-2: On the compressed trajectory, use the line segment formed by two adjacent trajectory points as the sub-trajectory of the ship, represented as

[0019] Step 3: Perform multi-dimensional density clustering on the ship's sub-trajectory and remove noise at the same time;

[0020] Step 3-1: Use the DBSCAN algorithm. Change the clustering objects in the algorithm to the sub-trajectories of the ship, and change the similarity measure to the angular distance, vertical distance, parallel distance, and speed difference between sub-trajectories;

[0021] The similarity measure of two sub-trajectories is expressed as:

[0022]

[0023] where ω ⊥ 、ω || 、ω θ are the vertical distance weight, parallel distance weight, and angular distance weight respectively; d ⊥ 、d || 、d θ represent the vertical distance, parallel distance, and angular distance between any two sub-trajectories respectively; ω v represents the speed weight; represents the sub-trajectory of the ship formed by the line segment formed by two adjacent trajectory points ; the speed of the sub-trajectory is represent the speeds of two adjacent trajectory points respectively, represent the speeds of two adjacent trajectory points respectively;

[0024] Step 3-2: Determine the speed weight value ω v < 0.25 according to the relationship diagram between different dimensional weights and the number of noise points;

[0025] Step 4: Perform grid division on the trajectory clusters of multi-dimensional density clustering, and extract the center vector on each grid at the same time;

[0026] The grid division method is as follows: Sort the x values of the plane rectangular coordinates of the trajectory points in the compressed trajectory from small to large, and evenly divide them into 10 grids; each grid is represented as , 1 ≤ k ≤ 10, and the number of trajectory points in each grid is represented as

[0027] Extract the center vector of the trajectory on each grid. The center vector is composed of the average value avgX of the x coordinates, the average value avgY of the y coordinates, and the median distance mediumD of all the trajectory points in the grid, and is represented as CV = (avgX, avgY, mediumD). The median distance where len represents the Euclidean distance between two trajectory points;

[0028] Step 5: Calculate the speed anomaly threshold score(ω v ) through the speed weight of multi-dimensional density clustering. The calculation formula is:

[0029]

[0030] where k = 1.26787944 is the harmonic number;

[0031] Step 6: Detect the abnormal speed values in each grid through the Isolation Forest algorithm and remove them;

[0032] Calculate the abnormal score value of the speed of each trajectory point in the grid through the Isolation Forest algorithm. If the abnormal score value is greater than the speed anomaly threshold score(ω v ), then remove this point to obtain the set of correct speeds of the ship trajectory points in all grids;

[0033] Step 7: Detect whether the ship has abnormal position or speed.

[0034] Step 7-1: Calculate the distance threshold between the point to be detected and the central vector in each grid;

[0035] Calculate the mean μ and standard deviation σ of the relative distance of each trajectory point in the grid to the central vector, and define the distance threshold as μ + 3σ and μ - 3σ;

[0036] The calculation formula of the relative distance is as follows:

[0037]

[0038] where p represents the trajectory point; CV represents the central vector, including the average value of the x coordinate CV.avgX, the average value of the y coordinate CV.avgY, and the median distance CV.mediumD;

[0039] Step 7-2: Calculate the rectangular coordinates of the ship trajectory point to be detected, and determine the grid to which the ship to be detected belongs; then calculate the relative distance between the trajectory point where the ship to be detected is located and the central vector of this grid. If the relative distance is greater than μ + 3σ or less than μ - 3σ, it is determined that the ship's position is abnormal;

[0040] Step 7-3: Calculate the abnormal score value of the speed to be detected through the Isolation Forest algorithm. If the abnormal score value is greater than the speed anomaly threshold score(ω v ), it is determined that the ship's speed is abnormal.

[0041] Preferably, the values of the AIS data points include MMSI, Longitude, Latitude, Year, Month, Day, Hour, Minute, Second, SOG, COG.

[0042] Preferably, T = 6.

[0043] The beneficial effects of the present invention are as follows:

[0044] The present invention proposes a new trajectory compression method - the minimum length description criterion based on acceleration. By compressing the ship trajectory in this way, not only can the position feature points of the original trajectory be retained, but also its speed feature points can be retained. At the same time, the present invention can not only detect abnormal position information in ship trajectory anomaly detection, but also judge whether the ship has abnormal speed on the basis of normal position information, so as to warn the ship to take corresponding measures, such as adjusting the ship route in real time, reducing or increasing the ship speed, etc., further improving the safety of ship navigation. Description of the Drawings

[0045] Figure 1 It is a block diagram of the method of the present invention.

[0046] Figure 2 It is a typical trajectory of a certain ship in the embodiment of the present invention.

[0047] Figure 3 It is a compressed trajectory in the embodiment of the present invention.

[0048] Figure 4 It is the relationship between weights and noise points in the embodiment of the present invention.

[0049] Figure 5 It is a trajectory cluster after multi-dimensional density clustering in the embodiment of the present invention.

[0050] Figure 6 It is the relationship between the speed anomaly threshold and the detection rate and false alarm rate in the embodiment of the present invention. Detailed Embodiment

[0051] The present invention will be further described below in conjunction with the drawings and embodiments.

[0052] The present invention designs a ship abnormal behavior detection method based on distance measurement and isolation mechanism, which can not only detect abnormal position information of ship trajectories in real time, but also detect abnormal speed information of ships in real time. The method includes the following steps:

[0053] Step 1: Perform data preprocessing on the AIS data points of the ship and screen out the typical trajectories of the ship;

[0054] Step 1-1: For the AIS data points, if there are more than or equal to two AIS data points with exactly the same values, only retain any one of the AIS data points;

[0055] Step 1-2: Convert the longitude and latitude coordinates of each AIS data point into plane rectangular coordinates according to the Miller projection, and through In a standardized manner, map the coordinates to the range from 0 to 10 to obtain the rectangular coordinates x and rectangular coordinates y of the AIS data points;

[0056] Step 1-3: Sort the AIS data points of each ship in chronological order to construct the typical trajectory TR(p1, p2...p n ), p i is the data point on the typical trajectory of the ship at the i-th moment, i = 1, 2,...n; the time interval between any two adjacent AIS data points on the typical trajectory of the ship is less than 6 minutes; if the time interval between two AIS data points is greater than or equal to T minutes, then the earlier of the two AIS data points is the end point of a typical trajectory, and the later one is the starting point of the next typical trajectory;

[0057] Step 2: Compress the typical trajectory of the ship and divide the ship sub-trajectory;

[0058] Step 2-1: Use the minimum length description criterion based on acceleration AMDL method to compress the trajectory of the ship;

[0059] Step 2-1-1: Mark the first AIS data point in the trajectory as a feature point; set startIndex = 1, length = 1; start traversing all points on a trajectory of the ship, and let currentIndex = startIndex + length;

[0060] Step 2-1-2: Judge whether the acceleration of any data point p i in the trajectory of the ship from the startIndex point to the currentIndex point changes from positive to negative or from negative to positive, that is or are the velocities of the previous data point, the current data point, and the next data point respectively; if currentIndex - startIndex < 2, it is considered that there is no data point where the acceleration changes from positive to negative or from negative to positive;

[0061] Step 2-1-3: If there is no data point where the acceleration changes from positive to negative or from negative to positive, use the MDL method for trajectory compression, that is, calculate the segmentation cost and non-segmentation cost in this section of the trajectory; if the segmentation cost is greater than the non-segmentation cost and currentIndex - startIndex ≥ 2, mark the point at currentIndex - 1 as a trajectory feature point, and let startIndex = currentIndex - 1, length = 1; otherwise, let length = length + 1;

[0062] If there are data points where the acceleration changes from positive to negative or from negative to positive, mark the position of this point as currentIndex and mark this point as a trajectory feature point. At the same time, set startIndex = currentIndex and length = 1;

[0063] Step 2-1-4: If startIndex + length > n, output all feature points; the trajectory points represented after compression based on the AMDL method are , and its compressed trajectory representation is

[0064] Step 2-2: On the compressed trajectory, take the line segment formed by two adjacent trajectory points as the sub-trajectory of the ship, which is represented as

[0065] Step 3: Perform multi-dimensional density clustering on the ship's sub-trajectories and remove noise at the same time;

[0066] Step 3-1: Adopt the DBSCAN algorithm, change the clustering object in the algorithm to the ship's sub-trajectories, and change the similarity measure to the angular distance, vertical distance, parallel distance, and speed difference between sub-trajectories;

[0067] The similarity measure of two sub-trajectories is expressed as:

[0068]

[0069] where ω ⊥ , ω || , ω θ are the vertical distance weight, parallel distance weight, and angular distance weight respectively; d ⊥ , d || , d θ represent the vertical distance, parallel distance, and angular distance between any two sub-trajectories respectively; ω v represents the speed weight; represents the sub-trajectory of the ship formed by the line segment formed by two adjacent trajectory points ; the speed of the sub-trajectory is represent the speeds of two adjacent trajectory points respectively, represent the speeds of two adjacent trajectory points respectively;

[0070] Step 3-2: Determine the speed weight value ω v < 0.25 according to the relationship diagram between different dimensional weights and the number of noise points;

[0071] Step 4: Conduct grid division on the trajectory clusters obtained by multi-dimensional density clustering, and extract the central vectors on each grid simultaneously;

[0072] The grid division method is as follows: Sort the x values of the plane rectangular coordinates of the trajectory points in the compressed trajectory in ascending order, and evenly divide them into 10 grids; each grid is represented as , 1 ≤ k ≤ 10, and the number of trajectory points in each grid is represented as

[0073] Extract the central vector of the trajectory on each grid. The central vector is composed of the average value avgX of the x coordinates, the average value avgY of the y coordinates, and the median distance mediumD of all the trajectory points in this grid, and is represented as CV = (avgX, avgY, mediumD). The median distance where len represents calculating the Euclidean distance between two trajectory points;

[0074] Step 5: Calculate the speed anomaly threshold score(ω v ) through the speed weight of multi-dimensional density clustering. The calculation formula is:

[0075]

[0076] where k = 1.26787944 is the harmonic number;

[0077] Step 6: Detect the abnormal speed values in each grid through the Isolation Forest algorithm and remove them;

[0078] Calculate the anomaly score value of the speed of each trajectory point in the grid through the Isolation Forest algorithm. If this anomaly score value is greater than the speed anomaly threshold score(ω v ), then remove this point, and thus obtain the set of correct speeds of the ship trajectory points in all grids;

[0079] Step 7: Detect whether the ship has position anomalies or speed anomalies.

[0080] Step 7-1: Calculate the distance threshold between the point to be detected and the central vector in each grid;

[0081] Calculate the mean μ and standard deviation σ of the relative distances of each trajectory point in the grid to the central vector, and define the distance threshold as μ + 3σ and μ - 3σ;

[0082] The calculation formula of the relative distance is as follows:

[0083]

[0084] Where p means ...; CV means ..., including the average value of the x-coordinate CV.avgX, the average value of the y-coordinate CV.avgY and the median distance CV.mediumD;

[0085] Step 7-2: Calculate the plane rectangular coordinates of the trajectory point of the ship to be detected, and determine the grid to which the ship to be detected belongs; then calculate the relative distance between the trajectory point of the ship to be detected and the center vector of the grid. If the relative distance is greater than μ+3σ or less than μ-3σ, it is determined that the ship position is abnormal;

[0086] Step 7-3: Calculate the abnormal score of the speed to be detected by the isolation forest algorithm. If the abnormal score is greater than the speed abnormal threshold score(ω v ), it is determined that the ship speed is abnormal. Specific embodiment:

[0088] 1. Preprocess the AIS data points of the ship and filter out the typical trajectory of the ship. Figure 2 is a typical trajectory of a ship;

[0089] 2. Compress the typical trajectory of the ship and divide it into ship sub-trajectories. Figure 3 This is the compressed trajectory of the ship.

[0090] 3. Perform multi-dimensional density clustering on the ship sub-trajectories and remove noise at the same time. The selection of speed weight in multi-dimensional density clustering can be done by Figure 4 If the increase of speed weight has the most obvious effect on the decrease of noise points compared with the increase of other weights, it means that the speed of ships in this area is relatively average. Then the speed weight value less than 0.25 can be used as a reference for the speed weight value. Figure 5 It is the trajectory cluster after multi-dimensional density clustering of sub-trajectories, where gray represents trajectory clusters and black represents noise points.

[0091] 4. Grid division is performed in the trajectory cluster of multi-dimensional density clustering, and the correct position model of the ship is extracted on each grid. After grid division, the Figure 5 There are 10 grids in total, 0-1, 1-2....9-10.

[0092] 5. Determine the score value for the speed to be abnormal by the isolation forest algorithm through the speed weight of multi-dimensional density clustering. Substitute the speed weight into the formula In the above figure, we can get the score value of the speed that the isolation forest algorithm determines as abnormal.

[0093] 6. The abnormal speed value in each grid is detected through the isolation forest algorithm and eliminated.

[0094] 7. Detect whether the ship has abnormal position or speed.

[0095] The detection effect can be measured by the detection rate and the false alarm rate. The detection rate, also known as the true positive rate, refers to the percentage of the number of abnormal ship trajectories (speeds) detected by the ship trajectory (speed) anomaly detection algorithm during the ship trajectory (speed) anomaly detection period, accounting for the number of actual existing abnormal ship trajectories (speeds). The false alarm rate, also known as the false positive rate, refers to the percentage of the number of false abnormal ship trajectories (speeds) detected by the ship trajectory (speed) anomaly detection algorithm during the ship trajectory (speed) anomaly detection period, accounting for the number of actual existing normal ship trajectories (speeds).

[0096] In this embodiment, a total of 246 ship speed values in a certain grid area are selected. They are labeled, among which 5 are abnormal values and 241 are normal values. Figure 6 Then it describes the relationship between different values of the score value for determining abnormal speed and the detection rate and the false alarm rate. From Figure 6 it can be seen that the score value for determining abnormal speed selected by score(ω) has a good balance between the detection rate and the false alarm rate.

Claims

1. A method for detecting abnormal behaviors of ships based on distance measurement and isolation mechanism, characterized in that, The steps include: Step 1: Preprocess the AIS data points of the ship and filter out the typical trajectory of the ship; Step 1-1: For AIS data points, if there are two or more AIS data points with exactly the same values, only one of the AIS data points is retained; Step 1-2: Convert the longitude and latitude coordinates of each AIS data point into plane rectangular coordinates according to the Miller projection, and map the coordinates to the range of 0 to 10 through the standardization method to obtain the plane rectangular coordinate x and the plane rectangular coordinate y of the AIS data point; Step 1-3: Sort the AIS data points of each ship in chronological order to construct the typical trajectory TR(p1, p2…p n ), where p i is the data point on the typical trajectory of the ship at the i-th moment, i = 1, 2, … n; the time interval between any two adjacent AIS data points on the typical trajectory of the ship is less than T minutes; if the time interval between two AIS data points is greater than or equal to T minutes, then the earlier of the two AIS data points is the end point of a typical trajectory, and the later of the two AIS data points is the starting point of the next typical trajectory; Step 2: Compress the typical trajectory of the ship and divide it into sub-trajectories; Step 2-1: Compress the trajectory of the ship using the acceleration-based minimum length description criterion AMDL method; Step 2-1-1: Mark the first AIS data point in the track as a feature point; set startIndex = 1, length = 1; start traversing all points on a track of the ship, and set currentIndex = startIndex + length; Step 2-1-2: Determine whether the acceleration of any data point p in the trajectory of the ship from the startIndex point to the currentIndex point changes from positive to negative or from negative to positive, that is i or or are the velocities of the previous data point, the current data point, and the next data point respectively; if currentIndex - startIndex < 2, it is considered that there is no data point where the acceleration changes from positive to negative or from negative to positive. Step 2-1-3: If there is no data point where the acceleration changes from positive to negative or from negative to positive, the MDL method is used to compress the trajectory, that is, the segmentation cost and non-segmentation cost in this trajectory are calculated; if the segmentation cost is greater than the non-segmentation cost and currentIndex-startIndex≥2, the point at currentIndex-1 is marked as a trajectory feature point, and startIndex=currentIndex-1, length=1; Otherwise, let length = length + 1; If there is a data point indicating whether the acceleration changes from positive to negative or from negative to positive, mark the position of the point as currentIndex and mark the point as a trajectory feature point, and set startIndex = currentIndex, length = 1; Step 2-1-4: If startIndex + length > n, output all feature points; the trajectory points represented after compression based on the AMDL method are Its trajectory representation after compression is Step 2-2: On the compressed trajectory, use the line segment formed by two adjacent trajectory points as the sub-trajectory of the ship, denoted as Step 3: Perform multi-dimensional density clustering on the ship sub-trajectories and remove noise at the same time; Step 3-1: Use the DBSCAN algorithm, change the clustering object in the algorithm to the sub-trajectory of the ship, and change the similarity measurement to the angular distance, vertical distance, parallel distance and speed difference between the sub-trajectories; The similarity measure of two sub-trajectories is expressed as: Among them, ω || and ω θ are the vertical distance weight, the parallel distance weight, and the angular distance weight respectively; d || and d θ represent the vertical distance, the parallel distance, and the angular distance between any two sub-trajectories respectively; ω v represents the speed weight; represents the sub-trajectory of the ship formed by the line segment formed by two adjacent trajectory points ; the speed of the sub-trajectory is represent the speeds of two adjacent trajectory points respectively, represent the speeds of two adjacent trajectory points respectively; Step 3-2: Determine the velocity weight value ω according to the relationship graph between different dimensional weights and the number of noise points v < 0.25; Step 4: Grid division is performed in the trajectory clusters of multi-dimensional density clustering, and the center vector is extracted on each grid; The grid division method is as follows: sort the x values of the rectangular coordinates of the trajectory points in the compressed trajectory from smallest to largest, and evenly divide them into 10 grids; each grid is represented as The number of trajectory points in each grid is represented as Extract the center vector of the trajectory on each grid. The center vector is composed of the average value avgX of the x coordinates of all trajectory points in the grid, the average value avgY of the y coordinates, and the median distance mediumD, denoted as CV = (avgX, avgY, mediumD). The median distance where len represents calculating the Euclidean distance between two trajectory points; Step 5: Calculate the speed anomaly threshold score(ω v ) through the speed weight of multi-dimensional density clustering. The calculation formula is as follows: Among them, k = 1.26787944 is the harmonic number; Step 6: Detect the abnormal speed value in each grid through the isolation forest algorithm and eliminate it; Calculate the anomaly score value of the speed of each trajectory point in the grid through the Isolation Forest algorithm. If the anomaly score value is greater than the speed anomaly threshold score(ω v ), then remove this point to obtain the set of correct speeds of the ship trajectory points in all grids; Step 7: Detect whether the ship has abnormal position or speed; Step 7-1: Calculate the distance threshold between the point to be detected and the center vector in each grid; Calculate the mean μ and standard deviation σ of the relative distance from each trajectory point in the grid to the center vector, and define the distance thresholds as μ+3σ and μ-3σ; The calculation formula of relative distance is as follows: Where p represents the trajectory point; CV represents the center vector, which includes the average value of the x-coordinate CV.avgX, the average value of the y-coordinate CV.avgY, and the median distance CV.mediumD. Step 7-2: Calculate the plane rectangular coordinates of the trajectory points of the ship to be detected, and determine the grid to which the ship to be detected belongs; then calculate the relative distance between the trajectory point where the ship to be detected is located and the center vector of the grid. If the relative distance is greater than μ + 3σ or less than μ - 3σ, it is determined that the ship's position is abnormal; Step 7-3: Calculate the anomaly score value of the speed to be detected by the Isolation Forest algorithm. If this anomaly score value is greater than the speed anomaly threshold score(ω v ), it is determined that the ship speed is abnormal.

2. The ship abnormal behavior detection method based on distance metric and isolation mechanism according to claim 1, characterized in that The values of the AIS data points include MMSI, Longitude, Latitude, Year, Month, Day, Hour, Minute, Second, SOG, and COG.

3. The ship abnormal behavior detection method based on distance metric and isolation mechanism according to claim 1, characterized in that The T = 6.

Citation Information

Patent Citations

  • Ship track abnormity detection method based on navigation channel model

    CN110210352A

  • Ship abnormal behavior detection method based on AIS data

    CN112699315A