A ship arrival time prediction method and system based on AIS data
By processing AIS data and utilizing neural networks and trajectory clustering algorithms, the problem of large errors in ship arrival time prediction was solved, enabling more efficient port scheduling and information flow, and improving prediction accuracy and real-time performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI JIZHI SHIPPING DEV CO LTD
- Filing Date
- 2023-10-19
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies have excessively large errors in predicting ship arrival times, leading to wasted berth resources and increased scheduling complexity. Furthermore, the lack of real-time information flow results in passive port arrangements.
By processing AIS data, including data cleaning, interpolation, feature extraction, and model building, neural network algorithms are used to fit ship trajectories, and trajectory clustering algorithms are combined to predict ship arrival times, thereby improving data quality and prediction accuracy.
This improved the accuracy of ship arrival time prediction, reducing the average error from 30 hours to 30 minutes, thus enhancing port scheduling efficiency and real-time information flow, and reducing scheduling difficulty.
Smart Images

Figure CN117493794B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of ship arrival time prediction, specifically a method for predicting ship arrival time based on AIS data. Background Technology
[0002] Currently, port terminals receive future vessel berthing information primarily by receiving berthing and departure plans from the ships or shipping schedules from the shipping companies. Based on the arrival information provided, and considering factors such as the vessel's length, width, and draft, berths are allocated. However, due to changes in sea weather, tides, and other hydrological conditions, as well as special circumstances such as encounters with pirates, vessels may not arrive at the terminal according to the berthing plan or schedule. For ports, this results in a waste of berth resources and disrupts the berth arrangements for subsequent vessels, requiring a re-planning of berth allocation, and even berth adjustments across terminals and port areas, increasing the difficulty and complexity of scheduling.
[0003] To alleviate the problem of wasted berth space, the main solution currently is to optimize scheduling by predicting vessel arrival times in advance. The main drawback of this technology is the large time prediction error, which is generally over 30 hours, sometimes even leading to vessels choosing to change ports of call or skipping ports altogether. Furthermore, information flow between terminals, shipping companies, and shipping agents regarding vessel berthing is not real-time; communication only occurs after the captain confirms an inability to arrive on time. This leaves ports in a passive position when allocating berths. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for predicting ship arrival times based on AIS data. By processing the ship's AIS data, including data cleaning, interpolation, feature extraction, and model building, the accuracy of ship arrival time prediction can be improved. By removing duplicate values, handling missing values, and handling outliers, the quality of AIS data can be improved, ensuring the reliability of the data input to the model. By extracting speed features, direction change features, and trajectory shape features, the trajectory characteristics of the ship can be described more comprehensively.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for predicting ship arrival time based on AIS data, comprising the following steps:
[0007] Acquire ship AIS data and process the acquired AIS data;
[0008] A ship trajectory data model is constructed based on the processed data;
[0009] By fitting a ship trajectory data model using a trajectory clustering algorithm, a refined ship trajectory is obtained.
[0010] Predicting ship arrival time based on refined ship trajectories.
[0011] As a preferred embodiment of the ship arrival time prediction method based on AIS data described in this invention, the data processing of the acquired AIS data includes data cleaning and data interpolation. The data cleaning includes removing duplicate values, processing missing values, and processing outliers. The data interpolation estimates the values of missing data points by using the values of known data points and performs linear interpolation on the values of the missing data points.
[0012] The process of removing duplicate values involves uniformly sorting the data and comparing adjacent data one by one to delete duplicate data. The process of handling missing values involves selectively filling in or deleting missing data. The process of handling outliers involves deleting outliers from the overall data. The specific implementation formula is as follows:
[0013]
[0014]
[0015] Among them, X i This represents a random value, and k represents the threshold parameter, which takes a value of 2. This represents the mean of the overall data, when X... i Satisfy the formula When this occurs, it indicates that the data has become abnormal, and the data will be deleted.
[0016] As a preferred embodiment of the ship arrival time prediction method based on AIS data described in this invention, the method of constructing a ship trajectory data model based on processed data involves extracting features from the processed data, dividing the extracted features into datasets, and constructing a ship trajectory data model based on the datasets using a neural network algorithm. The feature extraction involves extracting relevant data features for constructing the ship trajectory model from the processed data, including speed features, direction change features, and trajectory shape features.
[0017] The speed characteristic is used to represent the average speed of a ship traveling per unit time, and the specific formula is as follows:
[0018] v = S / T
[0019] Where S represents the total distance traveled by the ship, and T represents the unit time of measurement;
[0020] The direction change feature is used to represent the change in a ship's heading per unit time, and the specific formula is as follows:
[0021] Δθ=θ t -θ0
[0022] Where, θ t θ represents the ship's direction of travel at time t, and θ0 represents the ship's direction of travel when it sets sail.
[0023] As a preferred embodiment of the ship arrival time prediction method based on AIS data described in this invention, the trajectory shape feature is used to represent the trajectory change pattern of the ship during navigation, including curvature information, convexity information and angle change information.
[0024] The curvature information is used to represent the degree of curvature of the ship's navigation trajectory, and the specific formula is as follows:
[0025] k = 1 / R
[0026] Where R represents the radius of curvature of the ship at any point on the overall trajectory curve;
[0027] The convexity information is used to represent the concavity or convexity of the ship's navigation trajectory and to determine the direction of curvature of the trajectory. The specific determination formula is as follows:
[0028] Δθ′=k / v
[0029] Where k represents the curvature information of the ship during navigation, and v represents the average speed of the ship during navigation;
[0030] The specific rules for determining the direction of curvature of the navigation trajectory are as follows:
[0031] When the convexity information Δθ′ satisfies the formula Δθ′≥0, it indicates that the ship's navigation trajectory is curved outward.
[0032] When the convexity information Δθ′ satisfies the formula Δθ′<0, it indicates that the ship's navigation trajectory is curved inward.
[0033] As a preferred embodiment of the ship arrival time prediction method based on AIS data described in this invention, the angle change information is used to represent the angle change between consecutive points on the ship's navigation trajectory, and the specific implementation formula is as follows:
[0034]
[0035] Where arccos represents the arccosine function, θ i θ i+1 Let ||θ be a vector representing two consecutive points on the trajectory. i ||、||θ i+1|| represents the magnitude of the vector between two consecutive points on the trajectory.
[0036] As a preferred embodiment of the ship arrival time prediction method based on AIS data described in this invention, the step of constructing a ship trajectory data model based on a dataset using a neural network algorithm involves training the dataset information using a neural network algorithm to establish the ship trajectory data model. The training process involves inputting feature information as input data into the neural network and using the calculation result from the neural network as the output. The specific calculation formula is as follows:
[0037]
[0038]
[0039] Among them, a i Let f(x) represent the output of the i-th neuron in the neural network, f(x) represent the activation function used to introduce non-linear relationships, and ω represent the output of the i-th neuron. ij Let x represent the weights of the j-th input feature and the i-th neuron. j Let b represent the value of the j-th input feature. i This represents the deviation of the i-th neuron.
[0040] As a preferred embodiment of the ship arrival time prediction method based on AIS data described in this invention, the prediction of ship arrival time based on the refined ship trajectory is achieved by calculating the ratio between the distance of the ship data point from the target port location in the refined ship trajectory and the ship speed information, thereby completing the prediction of the arrival time.
[0041] The calculation of the specific target port location of the ship data point in the refined ship trajectory is achieved by calculating the spherical distance between the ship data point and the target port, and the specific calculation formula is as follows:
[0042]
[0043] T 预 =L / v
[0044] Where ΔN and ΔE represent the latitude and longitude differences between the current data point and the target port, respectively, N1 and N2 represent the latitude of the current data point and the target port, respectively, and R E Let T represent the Earth's radius, v represent the average speed of the ship during its journey, and T represent the average speed of the ship. 预 This indicates the predicted arrival time of the vessel.
[0045] Another objective of this invention is to provide a ship arrival time prediction system based on AIS data, which can cluster similar routes together through a trajectory clustering algorithm to obtain refined ship trajectories, thus helping to better understand the commonalities and differences of routes.
[0046] As a preferred embodiment of the ship arrival time prediction system based on AIS data according to the present invention, it includes: a data acquisition and processing module, a ship trajectory data model construction module, a ship trajectory refinement module, and a ship arrival time prediction module; the data acquisition and processing module is used to acquire AIS data and process the acquired data; the ship trajectory data model construction module is used to construct a ship trajectory data model using the processed data; the ship trajectory refinement module is used to refine the ship trajectory data model based on a trajectory clustering algorithm; and the ship arrival time prediction module is used to predict the ship arrival time.
[0047] A computer device includes a memory and a processor, the memory storing a computer program, characterized in that the processor executes the computer program to implement the steps of a ship arrival time prediction method based on AIS data.
[0048] A computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of a method for predicting ship arrival times based on AIS data.
[0049] The beneficial effects of this invention are as follows: By processing ship AIS data, including data cleaning, interpolation, feature extraction, and model building, this invention can improve the accuracy of ship arrival time prediction; by removing duplicate values, handling missing values, and processing outliers, it can improve the quality of AIS data and ensure the reliability of the data input to the model; by extracting speed features, direction change features, and trajectory shape features, it can more comprehensively describe the trajectory characteristics of ships; and through trajectory clustering algorithms, it can cluster similar routes together, thereby obtaining refined ship trajectories, which helps to better understand the commonalities and differences of routes. Attached Figure Description
[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, 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. Wherein:
[0051] Figure 1 This is a schematic diagram of the overall method steps of the ship arrival time prediction method based on AIS data of the present invention.
[0052] Figure 2 This is a schematic diagram of the overall structure of the ship arrival time prediction system based on AIS data according to the present invention. Detailed Implementation
[0053] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0054] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0055] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0056] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.
[0057] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0058] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0059] Example 1
[0060] Reference Figure 1 This is the first embodiment of the present invention, which provides a method for predicting ship arrival times based on AIS data, including the following steps:
[0061] S1: Acquire ship AIS data and process the acquired AIS data.
[0062] Specifically, the acquisition of ship AIS data is based on the AIS transmitter device equipped on the ship, and the ship's AIS data, including position data, speed data, and heading data, is received through AIS data receiving equipment installed in the port.
[0063] Furthermore, the data processing of the acquired AIS data includes data cleaning and data interpolation. The data cleaning includes removing duplicate values, handling missing values, and handling outliers. The data interpolation estimates the value of missing data points by using the values of known data points and performs linear interpolation on the values of missing data points.
[0064] Furthermore, the removal of duplicate values involves uniformly sorting the data and comparing adjacent data one by one to delete duplicate data. The handling of missing values involves selectively filling in and deleting missing data. The handling of outliers involves deleting outlier data from the overall data. The specific implementation formula is as follows:
[0065]
[0066]
[0067] Among them, X i This represents a random value, and k represents the threshold parameter, which takes a value of 2. This represents the mean of the overall data, when X... i Satisfy the formula When this occurs, it indicates that the data has become abnormal, and the data will be deleted.
[0068] S2: Construct a ship trajectory data model based on the processed data.
[0069] Specifically, the process of constructing a ship trajectory data model based on the processed data involves extracting features from the processed data, dividing the extracted features into datasets, and then constructing a ship trajectory data model based on the datasets using a neural network algorithm.
[0070] Furthermore, the feature extraction involves extracting relevant data features from the processed data to construct the ship trajectory model, including speed features, direction change features, and trajectory shape features.
[0071] Furthermore, the speed characteristic is used to represent the average speed of the ship per unit time, and the specific formula is as follows:
[0072] v = S / T
[0073] Where S represents the total distance traveled by the ship, and T represents the unit time of measurement;
[0074] The direction change feature is used to represent the change in a ship's heading per unit time, and the specific formula is as follows:
[0075] Δθ=θ t -θ0
[0076] Where, θ t θ represents the ship's direction of travel at time t, and θ0 represents the ship's direction of travel when it sets sail.
[0077] Furthermore, the trajectory shape features are used to represent the trajectory changes of the ship during navigation, including curvature information, convexity information, and angle change information.
[0078] Specifically, the curvature information is used to represent the degree of curvature of the ship's navigation trajectory, and the specific formula is as follows:
[0079] k = 1 / R
[0080] Where R represents the radius of curvature of the ship at any point on the overall trajectory curve;
[0081] The convexity information is used to represent the concavity or convexity of the ship's navigation trajectory and to determine the direction of curvature of the trajectory. The specific determination formula is as follows:
[0082] Δθ′=k / v
[0083] Where k represents the curvature information of the ship during navigation, and v represents the average speed of the ship during navigation;
[0084] The specific rules for determining the direction of curvature of the navigation trajectory are as follows:
[0085] When the convexity information Δθ′ satisfies the formula Δθ′≥0, it indicates that the ship's navigation trajectory is curved outward.
[0086] When the convexity information Δθ′ satisfies the formula Δθ′<0, it indicates that the ship's navigation trajectory is curved inward.
[0087] Furthermore, the angle change information is used to represent the angle change between consecutive points on the ship's navigation trajectory, and the specific implementation formula is as follows:
[0088]
[0089] Where arccos represents the arccosine function, θ i θ i+1 Let ||θ be a vector representing two consecutive points on the trajectory. i ||、||θ i+1 || represents the magnitude of the vector between two consecutive points on the trajectory.
[0090] Furthermore, the construction of the ship trajectory data model based on the dataset using a neural network algorithm involves training the dataset information using a neural network algorithm to establish the ship trajectory data model. The neural network algorithm trains the dataset information by inputting feature information as input data into the neural network and outputting the calculation result after processing by the neural network. The specific calculation formula is as follows:
[0091]
[0092]
[0093] Among them, a i Let f(x) represent the output of the i-th neuron in the neural network, f(x) represent the activation function used to introduce non-linear relationships, and ω represent the output of the i-th neuron. ij Let x represent the weights of the j-th input feature and the i-th neuron. j Let b represent the value of the j-th input feature. i This represents the deviation of the i-th neuron.
[0094] S3: By fitting the ship trajectory data model through trajectory clustering algorithm, the refined ship trajectory is obtained.
[0095] Specifically, the process of fitting a ship trajectory data model using a trajectory clustering algorithm includes performing secondary processing on the ship trajectory data using an area partitioning method, and obtaining a refined ship trajectory using a trajectory clustering algorithm.
[0096] Furthermore, the secondary processing of ship trajectory data using the area partitioning method involves treating the ship trajectory data as vertex coordinates of a polygon, and dividing the polygon formed by the vertex coordinates into multiple triangles for secondary data processing. The specific processing procedure is as follows:
[0097] Arrange the vertex coordinates of the polygon in clockwise order to ensure the polygon is closed; create an empty triangle list to store the decomposed triangles; select the first vertex of the polygon as the starting point; starting from the starting point, traverse each adjacent vertex of the polygon one by one; for each adjacent vertex, construct a triangle consisting of the starting point, the current vertex, and the next vertex; for each constructed triangle, check whether the three vertices are not collinear and the line segment connecting the three vertices does not intersect the edge of the polygon; if the conditions are met, add it to the triangle list; otherwise, do not add it to the triangle list.
[0098] Furthermore, the process of obtaining the refined ship trajectory using the trajectory clustering algorithm involves clustering the data output from the trajectory data model using the K-means clustering algorithm, including cluster analysis and cluster number selection.
[0099] Specifically, the clustering analysis uses Euclidean distance to measure the distance between the vertices of a triangle, and the specific calculation formula is as follows:
[0100]
[0101] Where, L(x) i ,c j ) represents the vertex x of the triangle i To cluster center c j The Euclidean distance, x ik Represents vertex x i The k-th eigenvalue, c jk c represents the cluster center j The kth eigenvalue;
[0102] The number of clusters is selected by calculating the total internal vertex variance under different cluster numbers. The specific calculation formula is as follows:
[0103]
[0104] Where, L(x) i ,c j ) represents the vertex x of the triangle i To cluster center c j The Euclidean distance, where K represents the number of clusters, and C j Represents the set of vertices that appear at the j-th position;
[0105] After multiple drops, when the trend of K′ stabilizes, select the K′ at this point as the final K value.
[0106] S4: Predict ship arrival time based on refined ship trajectory.
[0107] Specifically, the prediction of ship arrival time based on the refined ship trajectory is achieved by calculating the ratio between the distance of the ship data point from the target port in the refined ship trajectory and the ship speed information, thereby completing the prediction of the arrival time.
[0108] Furthermore, the calculation of the specific target port location of the ship data point in the refined ship trajectory involves calculating the spherical distance between the ship data point and the target port, using the following formula:
[0109]
[0110]
[0111] T 预 =L / v
[0112] Where ΔN and ΔE represent the latitude and longitude differences between the current data point and the target port, respectively, N1 and N2 represent the latitude of the current data point and the target port, respectively, and R E Let T represent the Earth's radius, v represent the average speed of the ship during its journey, and T represent the average speed of the ship. 预 This indicates the predicted arrival time of the vessel.
[0113] Example 2
[0114] Reference Figure 2 The second embodiment of the present invention provides a ship arrival time prediction system based on AIS data, including a data acquisition and processing module, a ship trajectory data model construction module, a ship trajectory refinement module, and a ship arrival time prediction module.
[0115] Specifically, the data acquisition and processing module is used to acquire AIS data and process the acquired data; the ship trajectory data model construction module is used to construct a ship trajectory data model using the processed data; the ship trajectory refinement module is used to refine the ship trajectory data model based on a trajectory clustering algorithm; and the ship arrival time prediction module is used to predict the ship arrival time.
[0116] Furthermore, the data acquisition and processing module can acquire data from multiple AIS data sources, including satellites, land-based stations, and the ship's own AIS equipment. This ensures the system can acquire data globally and achieve real-time data updates, enabling the system to process the latest ship position and status information. After data acquisition, the module can also perform basic data preprocessing, such as removing invalid data, handling missing data and outliers, to ensure data quality and consistency. Before constructing the trajectory data model, the ship trajectory data model construction module needs to extract features related to ship motion from the processed data, such as speed, direction changes, and trajectory shape. The dataset is divided into training and testing sets for subsequent model training and validation. Finally, a model is built using a neural network algorithm. The ship trajectory refinement module uses a trajectory similarity algorithm to cluster similar routes together to identify the similarities and differences between different routes. To better understand ship trajectories, this module provides data visualization tools, allowing users to intuitively view the characteristics of different routes. If errors or inconsistencies are found in the trajectory data model, the trajectory can be automatically or semi-automatically corrected. The ship arrival time prediction module provides real-time monitoring, allowing users to track ship positions in real time and predict ETA (Estimated Time of Arrival) based on the latest data.
[0117] To further verify the beneficial effects of the present invention, the technical features of the present invention are compared with the prior art. The specific comparison results are shown in the table below:
[0118]
[0119]
[0120] The comparison table above clearly shows that our invention can more accurately predict ship arrival times, reducing the average error from 3 hours to 30 minutes, greatly improving accuracy; it can better monitor ship trajectories, avoiding potential dangers and contributing to improved safety; it provides more reliable predictions of ship arrival times, with 95% of predictions falling within the error range, improving customer satisfaction; and through data cleaning and outlier processing, the accuracy of AIS data is improved to 95%, avoiding interference from bad data in decision-making.
[0121] Furthermore, if the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0123] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0124] Furthermore, in order to provide a concise description of exemplary embodiments, not all features of actual embodiments (i.e., those features that are not relevant to the currently considered best mode for carrying out the invention, or those features that are not relevant to implementing the invention) may be omitted.
[0125] It should be understood that numerous specific implementation decisions can be made during the development of any practical implementation, such as in any engineering or design project. Such development efforts may be complex and time-consuming, but for those skilled in the art who benefit from this disclosure, the development effort will be a routine work of design, manufacturing, and production without requiring much experimentation.
[0126] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for predicting ship arrival times based on AIS data, characterized in that: Includes the following steps, Acquire ship AIS data and process the acquired AIS data; A ship trajectory data model is constructed based on the processed data; By fitting a ship trajectory data model using a trajectory clustering algorithm, a refined ship trajectory is obtained. Predicting ship arrival time based on refined ship trajectories; The process of constructing a ship trajectory data model based on the processed data involves extracting features from the processed data, dividing the extracted features into datasets, and then using a neural network algorithm to construct the ship trajectory data model based on the datasets. The feature extraction process involves extracting relevant data features from the processed data used to construct the ship trajectory model, including speed features, direction change features, and trajectory shape features. The speed characteristic is used to represent the average speed of a ship traveling per unit time, and the specific formula is as follows: in, This indicates the total distance traveled by the ship. Indicates the unit of time measured; The direction change feature is used to represent the change in a ship's heading per unit time, and the specific formula is as follows: in, Indicates in The ship's direction of travel at any given time. Indicates the direction of navigation when the ship sets sail; The trajectory shape features are used to represent the trajectory changes of a ship during navigation, including curvature information, convexity information, and angle change information. The curvature information is used to represent the degree of curvature of the ship's navigation trajectory, and the specific formula is as follows: Where R represents the radius of curvature of the ship at any point on the overall trajectory curve; The convexity information is used to represent the concavity or convexity of the ship's navigation trajectory and to determine the direction of curvature of the trajectory. The specific determination formula is as follows: in, This indicates the curvature information during ship navigation. This represents the average speed of a ship while it is sailing. The specific rules for determining the direction of curvature of the navigation trajectory are as follows: When convexity information Satisfy the formula When this occurs, it indicates that the ship's trajectory is curved and convex outwards; When convexity information Satisfy the formula When this occurs, it indicates that the ship's trajectory is curved inwards; The process of fitting a ship trajectory data model using a trajectory clustering algorithm includes performing secondary processing on the ship trajectory data using an area partitioning method, and obtaining a refined ship trajectory using a trajectory clustering algorithm. The secondary processing of ship trajectory data using the area partitioning method involves treating the ship trajectory data as vertex coordinates of a polygon, and then dividing the polygon formed by the vertex coordinates into multiple triangles for secondary data processing. The specific processing procedure is as follows: Arrange the vertex coordinates of the polygon in clockwise order to ensure the polygon is closed; create an empty triangle list to store the decomposed triangles; select the first vertex of the polygon as the starting point; starting from the starting point, traverse each adjacent vertex of the polygon one by one; for each adjacent vertex, construct a triangle consisting of the starting point, the current vertex, and the next vertex; for each constructed triangle, check whether the three vertices are not collinear and the line segment connecting the three vertices does not intersect the edge of the polygon; if the conditions are met, add it to the triangle list; otherwise, do not add it to the triangle list.
2. The method for predicting ship arrival time based on AIS data as described in claim 1, characterized in that: The data processing of the acquired AIS data includes data cleaning and data interpolation. Data cleaning includes removing duplicate values, handling missing values, and handling outliers. Data interpolation estimates the value of missing data points by using the values of known data points and performs linear interpolation on the values of missing data points. The process of removing duplicate values involves uniformly sorting the data and comparing adjacent data one by one to delete duplicate data. The process of handling missing values involves selectively filling in or deleting missing data. The process of handling outliers involves deleting outliers from the overall data. The specific implementation formula is as follows: in, Represents a random value. This represents the threshold parameter, with a value of 2. This represents the mean of the overall data. Satisfy the formula When this occurs, it indicates that the data has become abnormal, and the data will be deleted.
3. The method for predicting ship arrival time based on AIS data as described in claim 2, characterized in that: The angle change information is used to represent the angle change between consecutive points on the ship's navigation trajectory, and the specific implementation formula is as follows: in, Represents the inverse cosine function. , A vector representing two consecutive points on a trajectory. , It represents the magnitude of the vector between two consecutive points on the trajectory.
4. The method for predicting ship arrival time based on AIS data as described in claim 3, characterized in that: The construction of a ship trajectory data model based on a dataset using a neural network algorithm involves training the dataset information using a neural network algorithm to establish the ship trajectory data model. This training process involves inputting feature information as input data into the neural network and using the calculation results from the neural network as the output. The specific calculation formula is as follows: in, Represents the first in a neural network The output of each neuron This represents the activation function, used to introduce non-linear relationships. Indicates the first The input features and the first The weights of each neuron, Indicates the first The values of each input feature, Indicates the first The deviation of each neuron.
5. The method for predicting ship arrival time based on AIS data as described in claim 4, characterized in that: The method of predicting the arrival time of a ship based on its refined trajectory is to calculate the ratio between the distance of the ship's data points from the target port in the refined trajectory and the ship's speed information, thereby completing the prediction of the arrival time. The calculation of the specific target port location of the ship data point in the refined ship trajectory is achieved by calculating the spherical distance between the ship data point and the target port, and the specific calculation formula is as follows: in, , These represent the latitude and longitude differences between the current data point and the target port, respectively. , These represent the latitude and longitude of the current data point relative to the target port location, respectively. Represents the Earth's radius. This represents the average speed of a ship during its journey. This indicates the predicted arrival time of the vessel.
6. A system employing the ship arrival time prediction method based on AIS data as described in any one of claims 1 to 5, characterized in that, It includes a data acquisition and processing module, a ship trajectory data model building module, a ship trajectory refinement module, and a ship arrival time prediction module. The data acquisition and processing module is used to acquire AIS data and process the acquired data; The ship trajectory data model building module is used to build a ship trajectory data model using the processed data; The ship trajectory refinement module is used to refine the ship trajectory data model based on the trajectory clustering algorithm; The ship arrival time prediction module is used to predict the arrival time of ships.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.