Ship abnormal state detection method based on AIS data

Through deep learning models based on AIS data, especially Bi-LSTM, combined with DP algorithm and kernel density estimation, accurate division of ship trajectories and anomaly detection are achieved, solving the problem of traditional maritime safety relying on manual experience, and improving maritime safety and regulatory efficiency.

CN115169527BActive Publication Date: 2025-09-23LANZHOU UNIV +1

Patent Information

Application Number
CN202210641115.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-07
Publication Date
2025-09-23
Estimated Expiration
2042-06-07

AI Technical Summary

Technical Problem

Traditional maritime safety relies on manual experience, resulting in frequent accidents. The existing AIS system has limited coverage and cannot effectively monitor abnormal conditions of high-sea vessels.

Method used

A deep learning model based on AIS data, especially Bi-LSTM, is used, combined with DP algorithm, clustering algorithm and kernel density estimation to perform ship trajectory segmentation and anomaly detection, and monitor the ship's navigation status in real time.

Benefits of technology

It realizes the automated detection of abnormal ship status, reduces the dependence on human intervention, and improves the safety and regulatory efficiency of maritime transportation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115169527B_ABST
    Figure CN115169527B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting abnormal ship status based on AIS data, comprising the following steps: obtaining raw AIS data, preprocessing the raw AIS data to obtain the original trajectory of the ship, and segmenting the original trajectory to obtain straight and curved segments of the original trajectory; after extracting the curved and straight segments, using a trajectory similarity measurement algorithm to eliminate abnormal trajectories, and using a Bi-LSTM model to predict on the basis of the absence of abnormal trajectories; and constructing a prediction-based anomaly detection model based on the straight and curved segments using a Bi-LSTM deep learning model to complete the detection of abnormal ship status. The present invention monitors the ship's navigation status in real time, automatically detects anomalies, and issues timely warnings, effectively reducing the reliance of safety supervision on manpower and having important significance in ensuring the safe navigation of ships and the prosperity and development of maritime trade.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of ship abnormal state detection, and in particular relates to a ship abnormal state detection method based on AIS data. Background Art

[0002] Traditional maritime safety relies primarily on the experience of crew members and safety managers, supplemented by technologies such as radar, electronic charts, ultrasound, and video to predict safety. This approach places excessive reliance on operators, and human error or inexperience can lead to serious accidents. Research shows that 80% of maritime accidents are caused by human error. Therefore, maritime safety must reduce its reliance on human experience. Research into detecting and automatically predicting abnormal vessel conditions can, to a certain extent, reduce manual intervention. To ensure safe navigation, the International Maritime Organization requires that all international vessels of 300 gross tonnage and above, non-international vessels of 500 gross tonnage and above, and all passenger ships must be equipped with an AIS system. The AIS system facilitates information exchange between maritime regulators and vessels, allowing them to monitor their status. The continuous accumulation of AIS data has resulted in a massive dataset. According to statistics from the China Maritime Safety Administration in 2019, my country now has the world's largest shore-based AIS network, covering 99.97% of my country's coastal waters and the high-grade inland waterways of the four major river systems. All 264 base stations are successfully interconnected with the AIS National Data Center. The improvement of the AIS system has laid a solid foundation for ship trajectory big data mining and anomaly detection.

[0003] The information exchange network created by traditional AIS systems between ships and shore-based systems cannot reach ships far from the coast due to limited communication distance. Furthermore, AIS system data transmission is significantly affected by the distribution of ships. Therefore, satellite AIS technology was developed. The satellite AIS automatic identification system primarily consists of satellites, shipboard transponder equipment, satellite ground stations, and data processing and distribution systems. According to incomplete statistics, there are currently approximately 250 satellites in orbit. Satellite AIS systems enable real-time ship data monitoring. By mining historical AIS data and combining it with real-time satellite AIS data, we can determine whether a ship's current behavior poses a safety risk and take real-time preventative measures. Avoiding accidents is a key research direction for ensuring safe navigation.

[0004] In recent years, the value of AIS data has been continuously explored, and many research results have been generated based on AIS data, such as ship track planning, ship trajectory prediction, ship obstacle avoidance, and behavior recognition. Ship abnormal state detection mainly analyzes ship navigation data information to determine whether the ship's driving status is normal, and then make a judgment on the ship's safety. This invention is proposed against the backdrop of the rapid accumulation of AIS data and the rapid development of artificial intelligence application technology. It uses satellite AIS systems to study the real-time detection of ship abnormal states. Detecting ship trajectory anomalies through intelligent algorithms can reduce errors caused by human error and has important practical significance in ensuring the safe navigation of ships. Summary of the Invention

[0005] The purpose of this invention is to propose a method for detecting abnormal ship status based on AIS data, monitor the ship's navigation status in real time, automatically detect abnormalities and issue early warnings in a timely manner, which can effectively reduce the dependence of safety supervision on manpower and is of great significance in ensuring the safe navigation of ships and the prosperous development of maritime trade.

[0006] To achieve the above object, the present invention provides a method for detecting abnormal state of a ship based on AIS data, comprising the following steps:

[0007] Obtaining original AIS data, performing preprocessing on the original AIS data to obtain an original trajectory of the ship, and dividing the original trajectory into trajectory segments to obtain straight line segments and curved line segments of the original trajectory;

[0008] Based on the straight line segment and the curved line segment, a prediction-based anomaly detection model is constructed using the Bi-LSTM deep learning model to complete the abnormal state detection of the ship;

[0009] The trajectory segment division includes DP algorithm, clustering algorithm and kernel density estimation;

[0010] The DP algorithm compresses the ship trajectory, obtains a compression threshold, and uses the Douglas-Peucker algorithm to retain the turning trajectory points more densely;

[0011] The clustering algorithm clusters the turning points of the ship trajectory, obtains the maximum radius and the minimum number of points, and divides the compressed trajectory into turning segments and straight segments;

[0012] The kernel density estimation estimates the turning segments and straight segments of the uncompressed trajectory based on the compressed trajectory;

[0013] The Gaussian kernel density function is used for kernel density estimation to extract the turning trajectory segments and the straight trajectory segments. The calculation is as follows:

[0014]

[0015] Where: is the mean of trajectory data, is the standard deviation of the trajectory data.

[0016] Optionally, the preprocessing includes: performing data cleaning, interpolation processing, and trajectory extraction on the original AIS data;

[0017] The data cleaning deletes abnormal information from the original AIS data and obtains trajectory data information;

[0018] The interpolation process interpolates the missing trajectory points according to the time difference;

[0019] The trajectory extraction extracts a single ship trajectory from the navigation trajectory of the single ship.

[0020] Optionally, the method for extracting a single ship trajectory includes:

[0021] (1) Yes Trajectories are sorted by timestamp;

[0022] (2) Traverse and search for track points with ship status 1 in AIS data ;

[0023] (3) From Start traversing to find the track point with a navigation status of 0 until you encounter the next track point with a navigation status of 1 , will be arrive The trajectory composed of the trajectory points is saved as a one-way trajectory, and a unique trajectory identifier TraId is inserted into it;

[0024] (4) From Start traversing the trajectory points and repeat step (3) until all unidirectional trajectories are extracted.

[0025] Optionally, perform mean-variance normalization on the input data. This will map the data to a fixed interval of the standard normal distribution N(0,1), which is more conducive to model parameter training.

[0026]

[0027] Where: is the normalized value, is the mean value of the data, is the standard deviation of the data.

[0028] The prediction model belongs to the regression problem, and the loss function selected is the root mean square error, which is expressed as follows:

[0029] ;

[0030] in, is the root mean square error.

[0031] Optionally, denormalize the normalized data to obtain quantitative error;

[0032] .

[0033] Optionally, using Bi-LSTM to build a prediction-based anomaly detection model includes:

[0034]

[0035] Where, is the hidden state of the forward LSTM, and is the weight matrix of the forward LSTM, is the bias vector of the forward LSTM;

[0036]

[0037] Where, and is the weight matrix of the reverse LSTM, is the bias vector of the reverse LSTM;

[0038]

[0039] Where, and is the weight matrix of Bi-LSTM, is the bias vector of Bi-LSTM.

[0040] Technical effect of the invention: The present invention discloses a method for detecting abnormal state of a ship based on AIS data, which monitors the navigation state of the ship in real time, automatically detects abnormalities and issues early warnings in a timely manner, which can effectively reduce the dependence of safety supervision on manpower, and is of great significance in ensuring the safe navigation of ships and the prosperous development of maritime trade; the present invention uses satellite communication and 4G communication to send the AIS data of the ship to the server, and the server determines whether the current ship is sailing in a normal state, and transmits the judgment result to the supervisor and crew. If it is in an abnormal state, the abnormal alarm system will be triggered to remind the crew and supervisors to take timely prevention and control measures. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0042] Figure 1The figure is a flow chart of a method for detecting abnormal ship status based on AIS data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0044] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0045] like Figure 1 As shown, this embodiment provides a method for detecting abnormal state of a ship based on AIS data, including the following steps:

[0046] Obtaining original AIS data, performing preprocessing on the original AIS data to obtain an original trajectory of the ship, and dividing the original trajectory into trajectory segments to obtain straight line segments and curved line segments of the original trajectory;

[0047] Based on the straight line segments and the curved line segments, a prediction-based anomaly detection model is constructed using the Bi-LSTM deep learning model to complete the detection of ship abnormal states.

[0048] Data cleaning

[0049] The downloaded open-source AIS data includes all records of U.S. coastal waters. This paper extracted three months of trajectory data from Lake Superior through Sault Ste. Marie to other ports as the research object. The latitude and longitude range of the study area was determined using the Google Maps coordinate system, and then the original trajectory was extracted from the AIS data within this range. However, due to communication problems or subsequent data processing errors, some obvious errors may exist in the original AIS data. These errors will have an unknown impact on the subsequent anomaly detection research. Therefore, this paper first deletes these obvious errors, mainly including:

[0050] (1) Data whose location is outside the latitude and longitude range. Including data whose latitude range is not -90 to +90 The data between and longitude range is not -180 to +180 The data between

[0051] (2) Data with a speed less than 0;

[0052] (3) Data with a time difference of more than 3600s between trajectory points. Although the data will be interpolated later, when too much data is lost, the interpolation algorithm cannot complete the trajectory. Therefore, the present invention marks the data with too much data loss as abnormal and deletes it;

[0053] (4) Duplicate data: Duplicate data refers to data that is exactly the same before and after AIS.

[0054] (5) Delete useless information in AIS data, such as ship length, width, draft, ship name, etc.

[0055] Interpolation

[0056] Because AIS data may contain data loss and data defaults at long intervals, if it is directly used in subsequent algorithm models, it is easy to cause calculation errors and is not easy to mine information and train models. Therefore, the position and speed of the extracted trajectory data need to be interpolated. , the default case of data is to rely on time difference to judge, if the trajectory point and The time difference is greater than 180 seconds, then at the trajectory point and There is a default need for interpolation. Before interpolation, the number of interpolation points must be calculated. The present invention calculates the number of interpolation points with 90 seconds as the time interval of a single trajectory point. The calculation formula is as follows.

[0057]

[0058] Applied to ship trajectory interpolation, in order to measure which interpolation algorithm is more suitable for ship trajectories, the present invention randomly selects 10 straight track segments that do not require interpolation and 10 turning track segments that do not require interpolation, and manually removes some track points to create time intervals. The above three interpolation algorithms are used for interpolation respectively, and the sum of the errors between the interpolated data and the manually removed track points is calculated. The error results of the straight track segments are shown in Table 2-1, and the error results of the turning track segments are shown in Table 2-2.

[0059] Table 2-1

[0060]

[0061] Table 2-2

[0062]

[0063] Comparison reveals that the errors after interpolation using all three interpolation algorithms are relatively small during straight-line driving. However, during curves, the Lagrange interpolation algorithm's error is significantly smaller than that of linear and mean interpolation. This suggests that mean and linear interpolation methods work well for smoothly varying trajectories, but when the data undergoes more dramatic changes, the interpolated value errors are larger. The Lagrange interpolation method's polynomial calculations allow for better nonlinear interpolation of data, resulting in superior performance in both straight and curved trajectory segments. Therefore, the present invention utilizes the Lagrange interpolation algorithm.

[0064] Trajectory extraction

[0065] The MMSI identifier in AIS data can be used to extract the navigation track of a single ship. However, a ship may pass through the study waters multiple times within three months, resulting in the extracted ship track not being a single track. To facilitate the subsequent data mining and algorithm model application, ship tracks need to be further extracted. Ship operating states mainly include: sailing, anchored, out of control, restricted operation, draft restriction, berthed, and stranded. The ship's navigation trajectory data should start from the anchored state, pass through the sailing state and other possible abnormal states, and then end at the anchored state. This feature of the ship can be used to extract the ship's one-way navigation track.

[0066] Assume that a piece of ship AIS data extracted based on MMSI identification is: , where P contains AIS time, ship longitude, ship latitude, ground heading, ground speed and ship status information. The steps for extracting a single ship trajectory are as follows:

[0067] (1) Yes Trajectories are sorted by timestamp;

[0068] (2) Traverse and search for track points where the ship status is 1 ;

[0069] (3) From Start traversing to find the track point with a navigation status of 0 until you encounter the next track point with a navigation status of 1 , will be arrive The trajectory composed of the trajectory points is saved as a one-way trajectory, and a unique trajectory identifier TraId is inserted into it;

[0070] (4) From Start traversing the trajectory points and repeat step (3) until all unidirectional trajectories are extracted. Extract the trajectory with MMSI equal to 316018031 based on TraId, and you can get four trajectories.

[0071] Trajectory segment division

[0072] This section mainly divides the extracted ship trajectory into segments, because anomaly detection based on the entire trajectory tends to overlook the details of local changes in the ship, resulting in inaccurate detection of abnormal states in the ship trajectory. Currently, trajectories are mostly divided using a grid method, but grid division requires consideration of grid size. If the grid is too small, it is easy to cause fragmentation of ship information and high complexity in data analysis and calculation. If the grid is too large, it is easy to overlook the details of local changes in the trajectory. The present invention uses the Douglas-Peucker algorithm to process the ship trajectory, making the trajectory points of the turning part of the ship trajectory dense and the trajectory points of the straight part sparse. Then, the DBSCAN clustering algorithm and kernel density estimation are used to segment the turning and straight segments of the trajectory to divide the trajectory segments.

[0073] DP algorithm

[0074] The DP algorithm is a classic data reduction algorithm, commonly used for data compression in ship trajectory data processing. It preserves the main skeleton of large ship trajectory data, removes redundant data, and improves the efficiency of data information mining. This paper uses the DP algorithm's data reduction principle to make ship trajectory shapes easier to cluster. The DP algorithm performs trajectory compression by comparing a set threshold value (threshold) with the maximum distance dmax between the connection segments connecting the first and last trajectory points. The main execution process of the algorithm is as follows:

[0075] (1) Assuming the ship trajectory A series of trajectory points composition, , the first point of the trajectory and the last trajectory point Connect them into a line and mark the line segment as , and give the threshold value To line segment distance, arrive The distance is dmax.

[0076] (2) Because damx is greater than threshold, The trajectory is divided into two parts at the point, and the starting point and the end point are reconnected. and , find the new dmax respectively arrive The distance and arrive distance

[0077] (4) Because arrive The distance dmax is less than the threshold, so only keep and point, and arrive The distance is less than the threshold, so Continue dividing the track at the point.

[0078] (5) Connect the starting point and the end point of the divided trajectory to obtain the new dmax, because arrive The distance dmax is less than the threshold, so it is retained. point, and arrive The distance dmax is greater than the threshold, so continue to divide the trajectory.

[0079] (6) After the division, the newly generated dmax is less than the threshold, so the first and last trajectory points are retained, and finally the trajectory compressed by the DP algorithm is obtained.

[0080] From the execution process of the DP algorithm, we can see that the trajectory points greater than the threshold value mainly appear in the turning section. This is because the trajectory points at the turning section fluctuate greatly, and more trajectory points will be retained when the algorithm is executed. The trajectory points for straight driving fluctuate less, and there are fewer trajectory points greater than the threshold value, so the trajectory points retained when the algorithm is executed will also decrease accordingly. Therefore, the algorithm will retain the trajectory points at the turning section more densely, and eliminate the trajectory points for straight driving more sparsely. In order to measure the error between the compressed trajectory and the original trajectory, the present invention extracts the eliminated trajectory points and calculates the distance between the chord between each point and its adjacent retained point as the error of the eliminated point.

[0081] The DP algorithm, when applied to ship trajectory compression, requires manual setting of the threshold parameter. This value determines whether the trajectory of a turning section can be effectively preserved. This paper employs the elbow rule to compare the number of trajectory points retained by the DP algorithm under different threshold values. The figure shows that when the threshold value is around 100, the number of trajectory points retained by the algorithm remains essentially stable, making it the optimal compression threshold.

[0082] As can be seen from the error analysis and threshold determination diagrams, while the DP algorithm can compress ship trajectories, improving computational efficiency for subsequent data processing, if the threshold is set too high, the error can increase dramatically. This can easily distort local information about the ship's trajectory, making it impossible to accurately detect abnormal trajectory states. Therefore, the present invention uses the Douglas-Peucker algorithm to extract turning points, rather than compressing them. The subsequent detection of abnormal trajectory states still uses the original trajectory points.

[0083] Clustering algorithm implementation

[0084] To extract the turning segments of the ship's trajectory, this paper uses the DBSCAN clustering algorithm based on the density distribution of the track points. Two parameters are required for clustering: the maximum radius (Epsilon) and the minimum number of points (minPts). The ship's trajectory, compressed by the DP algorithm, is applied to the DBSCAN clustering algorithm. The main steps of the algorithm are as follows:

[0085] Step 1: Randomly select a trajectory point whose number of trajectory points within Epsilon is greater than minPts as the core point, and assign a new cluster label label to all trajectory points within its Epsilon;

[0086] Step 2: Evaluate the remaining trajectory points within the Epsilon of the core point to see if they contain at least minPts trajectory points within the Epsilon. If the minPts criterion is met, the point will be used as the new core point, and the label will be assigned to all trajectory points within the Epsilon of the new core point. If not, all unlabeled points within the Epsilon of the trajectory point will be used as boundary points.

[0087] Step 3: The algorithm continues to expand the cluster with the core point until all the trajectory points in the cluster are surrounded by boundary points, and the current label cluster search is completed;

[0088] Step 4: Find new core points and search for new cluster labels;

[0089] Step 5: Divide the points that are not clustered into clusters into outlier clusters.

[0090] Kernel density estimation

[0091] Kernel density estimation is a non-parametric method that estimates the probability density function based on the frequency of trajectory points without any prior knowledge. Typically, a histogram is used to calculate the frequency of statistical points. However, histograms can produce significantly different visual effects due to different bandwidth choices, making it difficult to estimate new trajectory points. Therefore, the present invention uses kernel density estimation to solve this problem. The principle is to estimate the probability density by setting the bandwidth h of the frequency distribution histogram to a value close to infinitesimal. This process requires defining a kernel density estimation function, and the present invention uses a Gaussian kernel density function for kernel density estimation.

[0092]

[0093] Where: is the mean of trajectory data, is the standard deviation of the trajectory data.

[0094] h is also called the window width. When the window length is too small, the details of the data will be over-magnified, while when the window length is too large, the details of the data will be over-smoothed. This experiment mainly uses the turning points of DBSCAN clustering to estimate the trajectory without DP algorithm compression, which belongs to the data approximation method. The optimal parameter selection formula for this type of kernel density estimation window width h is shown in the following figure.

[0095] .

[0096] Long Short-Term Memory Network (LSTM)

[0097] Long Short-Term Memory (LSTM) networks are a specific form of RNN. Because RNNs establish a connection between the previous input and the current input, they can better process sequential data than conventional neural networks. Compared to conventional neural networks, RNNs add a weight matrix W, the output of the previous hidden layer, between the input layer and the hidden layer. The forward propagation of the RNN applies W to the calculation, using the formula:

[0098]

[0099] Where: yes The weight matrix, is the input at time t, yes weight matrix, yes The output of the hidden layer at time t.

[0100] The two weight matrices jointly determine the output state at time t , and in the next cycle that is time, Will also serve as The parameter state at the moment participates in the calculation, and the cycle continues until the final output state is output. RNN backpropagation is also used to update the weight value and train the network. Its basic principle is similar to that of ordinary neural networks. First, the error term is calculated using the loss function, and then the weight is updated using the gradient descent method to obtain the optimal weight matrix W and bias vector Because RNN recurrent neural networks have memory functions, each time they perform gradient descent through back propagation, the weight matrix calculated by the previous hidden layer is used as a parameter for operation. This calculation method can lengthen the connection between data and ensure the connection between previous and next information. However, when processing longer sequence data, gradient disappearance and gradient explosion are prone to occur.

[63] , which results in the training gradient not being able to be propagated continuously in longer sequences. To solve the problems of vanishing and exploding gradients, the LSTM long short-term memory network was developed.

[0101] Sigmod is the activation function to complete the operation, and the calculation formula is:

[0102]

[0103] Then LSTM decides whether to add new information to the input gate. The state is mainly determined by the sigmoid layer to update the value, and the tanh layer creates a vector containing new information .

[0104]

[0105]

[0106] Calculated 、 and Afterwards, Status updated to State, completed by formula (4-6):

[0107]

[0108] Finally, we get the output gate of the green part in the figure. State, the output gate is also composed of two parts, and the calculation formula is as follows.

[0109]

[0110]

[0111] The LSTM design primarily addresses the information relevance of long-term sequences. Compared to RNNs, it can address the vanishing and exploding gradient problems and perform better on long sequences. Ship trajectory data is a long, timestamped sequence with strong correlations between previous and subsequent trajectory points. Therefore, using LSTM to build a predictive model for anomaly detection offers significant advantages.

[0112] GRU neural network

[0113] GRU is a neural network model proposed in 2014. Compared with LSTM, GRU has one less gate state inside. It is mainly composed of reset gate. and update gate composition, is the input at time t, is the output state at time t, reset gate Determine the output state at time t-1 and The combined output reflects the degree to which the current layer retains the information of the previous moment.

[0114]

[0115] use Reset The calculation formula for the status is as follows.

[0116]

[0117] Update Gate Will The state is updated to the output state at that moment ,

[0118]

[0119]

[0120] Bi-LSTM Neural Network

[0121] The Bi-LSTM neural network consists of a forward LSTM and a reverse LSTM structure. The input sequence is input to the network structure in forward and reverse order respectively. The output value is affected by the input value and the hidden layer state value at the previous and next moments. The output y of the structure is determined by the forward LSTM and the reverse LSTM. At time t, the hidden state of the forward LSTM is It is calculated by the following formula.

[0122]

[0123] Where, and is the weight matrix of the forward LSTM, is the bias vector of the forward LSTM.

[0124] At time t, the hidden state of the reverse LSTM is calculated by the following formula.

[0125]

[0126] Where, and is the weight matrix of the reverse LSTM, is the bias vector of the reverse LSTM.

[0127] Output state at time t Calculated.

[0128]

[0129] Where, and is the weight matrix of Bi-LSTM, is the bias vector of Bi-LSTM.

[0130] To measure the performance of LSTM, GRU, and Bi-LSTM models in trajectory prediction, the experiment set the hidden layer of the model structure within the range of 3 - 25 layers, the number of neurons in each layer within the range of 1 - 50, and the batch-size to 20. After multiple experiments, it was shown that when the hidden layer of the GRU model was set to 6 layers and the number of neurons in the hidden layer was set to 9, the model had the best effect. When the hidden layer of the LSTM model was set to 6 layers and the number of neurons in the hidden layer was set to 8, the model had the best effect. When the hidden layer of the Bi-LSTM model was set to 7 layers and the number of neurons in the hidden layer was set to 11, the model had the best effect. The input layer of all three models used the relu activation function, and the hidden layer used the tanh activation function. The experiment randomly selected a turning trajectory segment data, and the model was built in the Tensorflow environment.

[0131] Randomly select 200 turning trajectory segments for model prediction, and extract the predicted trajectory data and actual trajectory data after inverse normalization. Randomly select 5000 trajectory points from 200 trajectories and convert them into the distance error between two latitude and longitude points, and statistically analyze the error scatter plot. Randomly select 500 trajectories, and subtract the actual speed value after inverse normalization to obtain the quantitative error.

[0132] In the comparison of predicted trajectories, the red points represent the actual ship navigation trajectory points, and the black points represent the predicted trajectory points. The predicted trajectory points of Bi-LSTM are closer to the actual trajectory points compared to GRU and LSTM. Among the randomly selected latitude and longitude error scatter plots, the maximum error of the Bi-LSTM model is 1400m, the maximum error of the GRU and LSTM models is 2000m, and the number of trajectory points with an error greater than 200m in the Bi-LSTM model is significantly less than that of the GRU model and the LSTM model. In the speed error scatter plot, the fluctuation range of the predicted speed error of the Bi-LSTM model is concentrated between ±0.2 knot, and the maximum error is close to 0.4 knot. The maximum errors of the GRU model and the LSTM model are close to 0.6 knot. The number of trajectory points with a predicted speed error greater than 0.2 knot in the Bi-LSTM model is less than that of the GRU model and the LSTM model. After error analysis, the Bi-LSTM model has higher accuracy in both speed and latitude and longitude prediction.

[0133] Take all ship trajectories in Lake Superior within three months, with the latitude and longitude range: 46.365315 < LAT < 49.028699, -92.311943 < LON < -84.548284. After extracting the trajectories, divide the trajectory segments, and the trajectories are divided into 15 groups.

[0134] The root mean square error (RMS) of the latitude and longitude predicted by the Bi-LSTM model for the two trajectory groups was 104 meters and 106 meters, respectively, and the speed errors were 0.0275 knots and 0.0219 knots. In both trajectory groups, the Bi-LSTM model achieved higher prediction accuracy than both the LSTM and GRU models, and the prediction errors did not fluctuate significantly across different trajectory segments. This demonstrates that the Bi-LSTM prediction model can maintain high prediction accuracy across different trajectory segments and is suitable for predicting ship trajectory segments over a wide range.

[0135] In practical applications, the newly generated ship trajectory sequence is extracted in real time, the prediction model is selected according to the longitude and latitude range, and the error between the prediction result and the newly generated trajectory is calculated. If the error is greater than 1.5 times the prediction speed, an early warning is initiated.

[0136] The above description is merely a preferred embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for detecting abnormal ship status based on AIS data, characterized in that: The following steps are involved: Obtaining original AIS data, performing preprocessing on the original AIS data to obtain an original trajectory of the ship, and dividing the original trajectory into trajectory segments to obtain straight line segments and curved line segments of the original trajectory; Based on the straight line segment and the curved line segment, a prediction-based anomaly detection model is constructed using the Bi-LSTM deep learning model to complete the abnormal state detection of the ship; The trajectory segment division includes DP algorithm, clustering algorithm and kernel density estimation; The DP algorithm compresses the ship trajectory, obtains a compression threshold, and uses the Douglas-Peucker algorithm to retain the turning trajectory points more densely; The clustering algorithm clusters the turning points of the ship trajectory, obtains the maximum radius and the minimum number of points, and divides the compressed trajectory into turning segments and straight segments; The kernel density estimation estimates the turning segments and straight segments of the uncompressed trajectory based on the compressed trajectory; The Gaussian kernel density function is used for kernel density estimation to extract the turning trajectory segments and the straight trajectory segments. The calculation is as follows: Where: is the mean of trajectory data, is the standard deviation of the trajectory data.

2. The method for detecting abnormal ship status based on AIS data according to claim 1, characterized in that: The preprocessing includes: performing data cleaning, interpolation processing and trajectory extraction on the original AIS data; The data cleaning deletes abnormal information from the original AIS data and obtains trajectory data information; The interpolation process interpolates the missing trajectory points according to the time difference; The trajectory extraction extracts a single ship trajectory from the navigation trajectory of a single ship.

3. The method for detecting abnormal ship status based on AIS data according to claim 2, characterized in that: The method for extracting a single ship trajectory comprises: (1) Yes Trajectories are sorted by timestamp; (2) Traverse and search for track points with ship status 1 in AIS data ; (3) From Start traversing to find the track point with a navigation status of 0 until you encounter the next track point with a navigation status of 1 , will be arrive The trajectory composed of the trajectory points is saved as a one-way trajectory, and a unique trajectory identifier TraId is inserted into it; (4) From Start traversing the trajectory points and repeat step (3) until all unidirectional trajectories are extracted.

4. The method for detecting abnormal ship status based on AIS data according to claim 1, characterized in that: Perform mean-variance normalization on the input data. Through this process, the data will be mapped to a fixed interval of the standard normal distribution N(0,1), which is more conducive to parameter training of the model; Where: is the normalized value, is the mean value of the data, is the standard deviation of the data; The prediction model belongs to the regression problem, and the loss function selected is the root mean square error, which is expressed as follows: in, is the root mean square error.

5. The method for detecting abnormal ship status based on AIS data according to claim 4, characterized in that: Denormalize the normalized data to obtain the quantitative error; 。 6. The method for detecting abnormal ship status based on AIS data according to claim 5, characterized in that: The prediction-based anomaly detection model built using Bi-LSTM includes: Where, is the hidden state of the forward LSTM, and is the weight matrix of the forward LSTM, is the bias vector of the forward LSTM; Where, and is the weight matrix of the reverse LSTM, is the bias vector of the reverse LSTM; Where, and is the weight matrix of Bi-LSTM, is the bias vector of Bi-LSTM.

Citation Information

Patent Citations

  • Method and apparatus for detecting abnormal movement

    CN104008390A

Cited By

  • Big data anomaly detection system based on deep learning

    CN122365263A