Port anchorage ground identification method and system based on machine learning algorithm
By applying machine learning algorithms and clustering algorithms in port anchorage recognition, combining AIS and port data, clustering recognition of anchorage behavior and anchorages is solved, and the problem of insufficient anchorage recognition accuracy in the existing technology is achieved, achieving higher recognition accuracy and reliability.
Patent Information
- Application Number
- CN202510014595.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-05-27
AI Technical Summary
Existing methods for port anchorage identification have shortcomings in accuracy, reliability and accuracy, especially in complex marine environments such as multi-ship convergence and current surges.
Using a machine learning algorithm-based method, the ship AIS data and port data are combined with the DBSCAN clustering algorithm and the K-Means clustering algorithm to cluster and identify anchorages to achieve accurate identification of port anchorages and their types.
The accuracy and reliability of port anchorage identification are improved, and the various anchorages and types of ports can be effectively identified in complex marine environments, solving the problem of insufficient accuracy in the prior art.
Smart Images

Figure CN120045961A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning, and particularly relates to a method and system for identifying port anchorages based on machine learning algorithms. Background Art
[0002] With the gradual warming of maritime trade, more and more ships are put into maritime transportation, and the shipping industry has developed rapidly. As the most important maritime transportation hub in the shipping industry, ports play a crucial role in the shipping economy. An anchorage refers to a water area where ships can drop anchors for safe berthing, sheltering from typhoons, waiting for inspection and pilotage, engaging in offshore transshipment, forming and disassembling fleets, and other operations. The number and size of anchorages are important indicators for measuring a port. Through anchorages, the operation efficiency of a port can be evaluated, etc.
[0003] With the popularization of on-board AIS equipment, the full coverage of AIS base stations, and the maturity of data extraction and management technologies, the shipping industry has entered the big data era. AIS has generated a large amount of ship trajectory data and recorded ship behaviors, including navigation, anchoring, and berthing behaviors.
[0004] Currently, the identification of port anchorages generally mainly includes pattern recognition methods based on ship trajectory data. By extracting relevant features from ship trajectory data and using pattern recognition algorithms based on the extracted features to identify and classify possible anchorage areas, the accuracy and reliability of the anchorage identification performed by this method are insufficient, and the current pattern recognition algorithms have problems with insufficient accuracy in complex marine environments, especially in situations such as multi-ship intersections and ocean currents surging. Summary of the Invention
[0005] To solve the problems of insufficient accuracy, reliability, and precision in the existing port anchorage identification process, the present invention provides a method for identifying port anchorages based on machine learning algorithms. Based on ship AIS data and port data, and using machine learning algorithms (DBSCAN clustering algorithm and K-Means clustering algorithm) and specific judgment methods to identify port anchorages, it can accurately identify each anchorage in the port and its anchorage type. The present invention also relates to a system for identifying port anchorages based on machine learning algorithms.
[0006] The technical solution of the present invention is as follows:
[0007] A method for identifying port anchorages based on machine learning algorithms, characterized by including the following steps:
[0008] Data collection and voyage dynamic calculation step: Collect ship AIS data and port data, and calculate voyage dynamic data based on the AIS data and port data. The voyage dynamic data includes the anchor start time and the anchor end time;
[0009] Steps for clustering anchoring behaviors: Obtain the longitude and latitude coordinates of the anchoring points of all ships in a certain port at each moment from the start time to the end time of anchoring. Use the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the anchoring points at all moments to obtain multiple anchoring behavior clusters, and use the K-Means clustering algorithm to cluster the longitude and latitude coordinates in each anchoring behavior cluster to obtain the center point of each anchoring behavior cluster;
[0010] Steps for screening anchoring behavior clusters: Calculate the distance from each anchoring point in each anchoring behavior cluster to the center point based on the longitude and latitude coordinates of the anchoring points and the longitude and latitude coordinates of the center point in the anchoring behavior cluster. Take the calculated maximum distance as the radius of the anchoring behavior cluster, and compare the radius with the preset range. Retain the anchoring behavior clusters whose radii are within the preset range;
[0011] Steps for clustering anchorages: Use the DBSCAN clustering algorithm to continue clustering the longitude and latitude coordinates of the center points of the remaining anchoring behavior clusters to obtain multiple anchorage clusters, and determine the anchorage type based on the ship types of all ships in the anchorage clusters. If the ship types of all ships in a certain anchorage cluster are the same, then identify this anchorage cluster as an anchorage for a specific ship type. If at least two of the ship types of all ships in a certain anchorage cluster are different, then identify this anchorage cluster as a general anchorage.
[0012] Preferably, in the steps for clustering anchoring behaviors, using the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the anchoring points at all moments includes the following steps:
[0013] S1: Use the DBSCAN clustering algorithm and cluster the longitude and latitude coordinates of the anchoring points at all moments according to the preset initial distance parameter and initial neighborhood parameter to obtain multiple anchoring behavior clusters to be evaluated;
[0014] S2: Use the silhouette coefficient as an evaluation index to evaluate the clustering effect of each anchoring behavior cluster to be evaluated. If the evaluated clustering effect does not reach the optimal, then adjust the initial distance parameter and initial neighborhood parameter, and re-cluster according to step S1;
[0015] S3: Repeat step S2 until the optimal distance parameter and neighborhood parameter are obtained to obtain multiple anchoring behavior clusters.
[0016] Preferably, in the steps for clustering anchorages, after obtaining multiple anchorage clusters, use the K-Means clustering algorithm to cluster each anchorage cluster to obtain the center point of each anchorage cluster, and retain the boundary points of each anchorage cluster.
[0017] Preferably, the ship AIS data includes the Mobile Maritime Service Identity (MMSI), longitude and latitude position information, ship status, and ship type; the port data includes the longitude and latitude position information and port code of the port.
[0018] Preferably, the voyage dynamic data further includes the starting longitude and latitude of anchoring, the ending longitude and latitude of anchoring, and the anchoring port information.
[0019] A port anchorage identification system based on a machine learning algorithm, characterized by comprising a data acquisition and voyage dynamic calculation module, an anchoring behavior clustering module, an anchoring behavior cluster screening module, and an anchorage clustering module, which are connected in sequence.
[0020] The data acquisition and voyage dynamic calculation module collects ship AIS data and port data, and calculates voyage dynamic data based on the AIS data and port data. The voyage dynamic data includes the starting time of anchoring and the ending time of anchoring.
[0021] The anchoring behavior clustering module obtains the longitude and latitude coordinates of the anchoring points of all ships in a certain port at each moment from the starting time of anchoring to the ending time of anchoring, uses the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the anchoring points at all moments, obtains multiple anchoring behavior clusters, and uses the K-Means clustering algorithm to cluster the longitude and latitude coordinates in each anchoring behavior cluster to obtain the center point of each anchoring behavior cluster.
[0022] The anchoring behavior cluster screening module calculates the distance from each anchoring point in each anchoring behavior cluster to the center point according to the longitude and latitude coordinates of the anchoring points and the longitude and latitude coordinates of the center point in the anchoring behavior cluster, takes the calculated maximum distance as the radius of the anchoring behavior cluster, compares the radius with a preset range, and retains the anchoring behavior clusters whose radii are within the preset range.
[0023] The anchorage clustering module continues to cluster the longitude and latitude coordinates of the center points of the remaining anchoring behavior clusters using the DBSCAN clustering algorithm to obtain multiple anchorage clusters, and determines the anchorage type according to the ship types of all ships in the anchorage clusters. If the ship types of all ships in a certain anchorage cluster are the same, the anchorage cluster is identified as a specific ship type anchorage. If at least two of the ship types of all ships in a certain anchorage cluster are different, the anchorage cluster is identified as a general anchorage.
[0024] Preferably, in the anchoring behavior clustering module, clustering the longitude and latitude coordinates of the anchoring points at all moments using the DBSCAN clustering algorithm includes the following steps:
[0025] S1: Using the DBSCAN clustering algorithm and according to the preset initial distance parameter and initial neighborhood parameter, cluster the longitude and latitude coordinates of the anchoring points at all moments to obtain multiple to-be-evaluated anchoring behavior clusters.
[0026] S2: Use the silhouette coefficient as an evaluation index to evaluate the clustering effect of each cluster of anchoring behaviors to be evaluated. If the evaluated clustering effect does not reach the optimal, adjust the initial distance parameter and the initial neighborhood parameter, and re - perform clustering according to step S1;
[0027] S3: Repeat step S2 until the optimal distance parameter and neighborhood parameter are obtained, and multiple clusters of anchoring behaviors are obtained.
[0028] Preferably, in the anchorage clustering module, after obtaining multiple anchorage clusters, the K - Means clustering algorithm is also used to cluster each anchorage cluster, obtain the center point of each anchorage cluster, and retain the boundary points of each anchorage cluster.
[0029] Preferably, the AIS data includes the Mobile Maritime Service Identity (MMSI), longitude and latitude position information, ship status, and ship type; the port data includes the longitude and latitude position information of the port and the port code.
[0030] Preferably, the voyage dynamic data further includes the longitude and latitude at the start of anchoring, the longitude and latitude at the end of anchoring, and the anchorage port information.
[0031] The beneficial effects of the present invention are:
[0032] The present invention provides a method for identifying port anchorage based on machine learning algorithms. First, AIS data and port data are collected, and voyage dynamic data is calculated based on the AIS data and port data. The longitude and latitude coordinates of the anchorage points of all ships at each moment from the start time to the end time of anchoring within a certain period of time in a certain port are obtained to accurately understand the anchorage behavior of each ship in the port. Then, the DBSCAN clustering algorithm is used to cluster the longitude and latitude coordinates of the anchorage points at all moments, obtaining multiple anchorage behavior clusters, which can accurately identify the clustering clusters of anchorage behavior, improving the accuracy and efficiency of data analysis. And the K-Means clustering algorithm is used to cluster the longitude and latitude coordinates in each anchorage behavior cluster to obtain the center point of each anchorage behavior cluster, providing a deeper analysis and classification for the anchorage behavior clusters. Then, according to the longitude and latitude coordinates of the anchorage points and the longitude and latitude coordinates of the center point in the anchorage behavior cluster, the distance from each anchorage point in each anchorage behavior cluster to the center point is calculated, and the calculated maximum distance is used as the radius of the anchorage behavior cluster. The radius is compared with a preset range, and the anchorage behavior clusters with the radius within the preset range are retained to screen out the anchorage behavior clusters that meet the requirements, reducing the complexity of subsequent analysis. Finally, the DBSCAN clustering algorithm is used to continue clustering the longitude and latitude coordinates of the center points of the remaining anchorage behavior clusters, obtaining multiple anchorage clusters, and the anchorage types are judged according to the ship types of all ships in the anchorage clusters, which can accurately identify each anchorage and its anchorage type in the port. The present invention relates to the identification of port-related anchorages and the extraction of related information, mainly based on a large amount of AIS data, using the DBSCAN clustering algorithm (density clustering algorithm) and K-Means clustering algorithm (K-means clustering algorithm) in unsupervised learning of machine learning algorithms, and combining relevant business knowledge. Finally, the identification and calibration of port anchorages are completed, and related information such as the ship types in the anchorages can be retained, solving the problems of insufficient accuracy, reliability, and precision in the existing port anchorage identification process. The method of the present invention improves the accuracy and reliability of port anchorage identification, and the identification effect is good.
[0033] The present invention also relates to a port anchorage identification system based on machine learning algorithms. This system corresponds to the above-mentioned method for identifying port anchorage based on machine learning algorithms and can be understood as a system for implementing the above-mentioned method for identifying port anchorage based on machine learning algorithms. It includes a data collection and voyage dynamic calculation module, an anchorage behavior clustering module, an anchorage behavior cluster screening module, and an anchorage clustering module that are connected in sequence. Each module works in coordination with each other, based on a large amount of ship AIS data and port data, and uses machine learning algorithms (i.e., using the DBSCAN clustering algorithm and K-Means clustering algorithm) and specific judgment methods to identify port anchorages, and can accurately identify each anchorage and its anchorage type in the port. Description of the Drawings
[0034] Figure 1 It is a flowchart of the port anchorage identification method based on the machine learning algorithm of the present invention.
[0035] Figure 2 It is a schematic diagram of the anchorage identification of Qingdao Port of the present invention. Specific Embodiments
[0036] The present invention will be described below with reference to the accompanying drawings.
[0037] The present invention relates to a port anchorage identification method based on a machine learning algorithm, which relates to the identification of relevant anchorages in ports and the extraction of relevant information thereof. Based on a large amount of AIS data, two specific clustering algorithms in the machine learning algorithm are respectively used, and combined with relevant business knowledge, the port anchorages are accurately identified. Preferably, PostgreSQL and Python languages are used. PostgreSQL is used to query the required data, and the Python language is used for the clustering identification of the anchorages. The flowchart of this method is as Figure 1 shown, and successively includes the following steps:
[0038] I. Data collection and voyage dynamic calculation step: or further referred to as data collection, voyage dynamic calculation and preprocessing step: Collect ship AIS data and port data, and preferably perform preprocessing: Specifically, first use psycopg2 in the Python language (which is the PostgreSQL database interface of the Python language) to connect to the PostgreSQL database, query all ship AIS data and port data from the PostgreSQL database. The main fields of the AIS data are: Maritime Mobile Service Identity MMSI, longitude and latitude position information lon and lat, ship status status, ship type and deadweight tonnage dwt, etc.; the port data includes port longitude and latitude position information and port codes; after obtaining the above data, first perform preprocessing on the AIS data, and calculate the voyage dynamic data according to the AIS data. Specifically, it is the ship voyage dynamic data calculated according to the status field of the AIS data, the port position and the berth position in the port data. Among them, the status field is: 1 is at anchor, 5 is berthed, 0 is sailing. When status = 5 (i.e., berthed), obtain the longitude and latitude (lon, lat) of this point, query the ports within a radius of 20 nautical miles with this longitude and latitude point (lon, lat) as the center, and obtain a port list (<port 1 , dist 1 , <port 2 , dist 2 ,..., <port n , dist n(>), sort them in ascending order of distance, take the port with the closest distance as the berthing port, calculate the distance from this longitude and latitude point to the berth of the berthing port, and take the berth with the minimum distance as the berthing berth; when status = 1 (i.e., at anchor), query the ports within 20 nautical miles with this point as the center, take the port with the closest distance as the anchoring port, and determine it as port anchoring. If there is no port within 20 nautical miles, it is determined as mid-course anchoring. Through the obtained anchoring section data and berthing section data, finally obtain the voyage dynamic data of the ship, which are the sailing section, the anchoring section, and the berthing section respectively. And provide details including: ship MMSI, starting and ending longitude and latitude of anchoring, starting and ending times of anchoring, draft at the time of anchoring, anchoring duration, anchoring port, etc. Store the above data in the database for the convenience of subsequent use of machine learning algorithms.
[0039] Specifically, when calculating the above distances, the spherical distance between two points P 1 、P 2 is calculated using the following formula:
[0040]
[0041] In the formula, R takes the radius of the earth, 6372.8 km, is the longitude, λ is the latitude, Δλ is the latitude difference between the two points, is the longitude difference between the two points.
[0042] A voyage includes a sailing section, an anchoring section, and a berthing section. From the end of the previous berthing to the end of this berthing is regarded as a complete voyage. The voyage dynamic data includes sailing section data, anchoring section data, and berthing section data. Preferably, the sailing section data includes the ship mobile service identification code MMSI, the starting port, the starting time, the ending port, the ending time, the draft change, and the sailing distance, etc. The anchoring section data includes the starting and ending longitude and latitude of anchoring, the starting and ending times of anchoring, the anchoring draft, the anchoring duration, and the anchoring port information, etc. The berthing section data includes the starting and ending longitude and latitude of berthing, the starting and ending times of berthing, the berthing draft, the berthing duration, and the berthing port information, etc.
[0043] It should be noted that for the above anchoring duration and berthing duration, the difference between the starting time and the ending time of anchoring / berthing is used as the anchoring / berthing duration and stored in the database for the convenience of subsequent use of machine learning algorithms.
[0044] II. Steps for clustering anchoring behaviors: For clustering the anchoring behaviors of ships based on machine learning algorithms, obtain the longitude and latitude coordinates of the anchoring points at each moment from the start time to the end time of anchoring for all ships in a certain port. Use the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the anchoring points at all moments, that is, perform DBSCAN density clustering on each anchoring record of each ship, to obtain multiple anchoring behavior clusters, and use the K-Means clustering algorithm to cluster the longitude and latitude coordinates in each anchoring behavior cluster to obtain the center points of each anchoring behavior cluster. Among them, both DBSCAN density clustering and K-Means clustering belong to the algorithms in unsupervised learning of machine learning. Compared with other clustering algorithms, the DBSCAN clustering algorithm has a fast clustering speed and can effectively handle noise points and discover spatial clusters of any shape, and does not require specifying the number of clusters. Its parameters only need to focus on the neighborhood parameters (∈, MinPts), which is more convenient and fast when finding the optimal parameters. The K-Means clustering algorithm is a typical partitioning-based clustering algorithm and also an unsupervised learning algorithm. The idea of the K-Means clustering algorithm is very simple. For a given sample set, use the Euclidean distance as the index to measure the similarity between data objects. The similarity is inversely proportional to the distance between data objects. The greater the similarity, the smaller the distance. It is necessary to pre-specify the initial clustering parameters and the initial clustering centers. According to the distance between samples, divide the sample set into clusters. According to the similarity between data objects and the clustering centers, continuously update the positions of the clustering centers, and continuously reduce the sum of squared errors (SSE) of the clusters. When the SSE no longer changes or the objective function converges, the clustering ends and the final result is obtained.
[0045] Specifically, first query the MMSI, the start time of anchoring t1, and the end time of anchoring t2 of all ships that have anchored in a certain port from the PostgreSQL database. For each anchoring record of each ship, query the longitude lon and latitude lat of the anchoring point at each moment within t1 - t2 corresponding to the MMSI. Use the longitude and latitude lon, lat data of the anchoring points at all moments as feature data and input them into the DBSCAN clustering algorithm model to obtain multiple anchoring behavior clusters. For each formed anchoring behavior cluster, use the K-Means clustering algorithm to obtain the center points center_lon, center_lat of each anchoring behavior cluster. Specifically, set the clustering parameter k = 1, cluster the longitude and latitude coordinates lon, lat in each anchoring behavior cluster, and finally cluster each cluster into one class and obtain the center points of each anchoring behavior cluster. Preferably, using the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the anchoring points at all moments includes the following steps:
[0046] S1: Apply the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the anchoring points at all times according to the preset initial distance parameter and initial neighborhood parameter, and obtain multiple anchoring behavior clusters to be evaluated;
[0047] S2: Use the silhouette coefficient as an evaluation index to evaluate the clustering effect of each anchoring behavior cluster to be evaluated. If the evaluated clustering effect does not reach the optimal, adjust the initial distance parameter and initial neighborhood parameter, and re-cluster according to step S1;
[0048] S3: Repeat step S2 until the optimal distance parameter and neighborhood parameter are obtained, and obtain multiple anchoring behavior clusters.
[0049] III. Anchoring behavior cluster screening step: Calculate the distance from each anchoring point in each anchoring behavior cluster to the center point according to the longitude and latitude coordinates of the anchoring points and the longitude and latitude coordinates of the center point in the anchoring behavior cluster, take the calculated maximum distance as the radius of the anchoring behavior cluster, compare the radius with the preset range, and retain the anchoring behavior clusters with the radius within the preset range.
[0050] Specifically, first calculate the distance from each anchoring point in each anchoring behavior cluster to the center point according to the longitude and latitude coordinates of the anchoring points and the longitude and latitude coordinates of the center point in the anchoring behavior cluster, and take the calculated maximum distance as the radius of the anchoring behavior cluster. By querying relevant information, the length of the ship's anchor chain is generally about 100 - 400 meters. Therefore, retain the clusters with a radius within 100 - 400 meters, and save the anchoring behavior clusters formed by each anchoring record of the port in the form of year - month, port, longitude of the center point, latitude of the center point, radius, MMSI, and ship type to the database for subsequent identification of the port anchorage.
[0051] IV. Anchorage clustering step: For the clustering and identification of the port anchorage based on the machine learning algorithm, continue to use the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the center points of the retained anchoring behavior clusters to obtain multiple anchorage clusters, and judge the anchorage type according to the ship types of all ships in the anchorage cluster. If the ship types of all ships in a certain anchorage cluster are the same, identify this anchorage cluster as a specific ship - type anchorage; if at least two of the ship types of all ships in a certain anchorage cluster are different, identify this anchorage cluster as a general anchorage.
[0052] Specifically, query the data of the anchoring behavior clusters formed by a certain designated port from the PostgreSQL database. Take the longitude and latitude coordinates center_lon and center_lat of the center points of all the remaining anchoring behavior clusters as feature data, and input them into the DBSCAN clustering algorithm model to obtain multiple different anchorage clusters. Then, use the K-Means clustering algorithm to obtain the center points of each anchorage cluster. For each anchorage cluster, obtain its boundary points, the number of points in the anchorage cluster, and all the ship types that have anchored in the anchorage cluster. Then, judge the type of the anchorage according to the ship types of all the ships in the anchorage cluster. If the ship types of all the ships in an anchorage cluster are the same (that is, only one type of ship has anchored in an anchorage cluster), then identify this anchorage cluster as an anchorage for a specific ship type. If at least two of the ship types of all the ships in an anchorage cluster are different (that is, multiple types of ships have anchored in an anchorage cluster), then identify this anchorage cluster as a general anchorage. Finally, save it to the database in the form of port, anchorage type, anchorage boundary, anchorage ship type, and anchorage center point.
[0053] Example:
[0054] Query all the anchoring records of Qingdao Port from the PostgreSQL database since 2021, and retain its MMSI, start anchoring time t1, and end anchoring time t2. For each anchoring record of each ship, query the AIS dynamic data MMSI, lon, and lat of the corresponding MMSI within t1 - t2. Take the lon and lat data as feature data and input them into the DBSCAN clustering model. Use the silhouette coefficient as the evaluation index to adjust the parameters. Finally, obtain the optimal clustering parameters as ∈ = 0.2 and minpts = 20 to get the anchoring behavior clusters. Then use the K-Means clustering algorithm to obtain the center points of each anchoring behavior cluster, get the longitude and latitude coordinates of the center points, calculate the distances from all the anchoring points in the cluster to the center point, and return the maximum distance as the radius of the cluster. Since the anchor chain length is about 100 - 400 meters, retain the clusters with a radius within 100 - 400 and save them to the database in the format of Table 1 (Clustering Results of Ship Anchoring Behavior).
[0055] Table 1
[0056] Port Central longitude Central latitude Radius Vessel MMSI Vessel type Qingdao 120.368346 35.973418 348 247283400 Dry bulk
[0057] Then, query all the clustering result data of ship anchoring behaviors in Qingdao Port from the PostgreSQL database, use the longitude and latitude data of the center points as feature data and input them into the DBSCAN model, use the silhouette coefficient as the evaluation index for parameter tuning, and finally obtain the optimal clustering parameters as ∈ = 0.2 and minpts = 25, to get the anchorage clusters, and use K-Means clustering to obtain the center points of each anchorage cluster. If only one type of ship has anchored in an anchorage cluster, then this anchorage is a specific ship type anchorage; if multiple types of ships have anchored, it is identified as a general anchorage. And retain the boundary points of each anchorage cluster, and finally store the anchorages in the database in the format of Table 2 (Anchorage Data of Qingdao Port). The anchorage identification results of Qingdao Port are as Figure 2 shown.
[0058] Table 2
[0059]
[0060] The present invention also relates to a port anchorage identification system based on a machine learning algorithm. This system corresponds to the above-mentioned port anchorage identification method based on a machine learning algorithm and can be understood as a system for implementing the above method. This system includes a data acquisition and voyage dynamic calculation module, an anchoring behavior clustering module, an anchoring behavior cluster screening module, and an anchorage clustering module that are connected in sequence. Specifically,
[0061] The data acquisition and voyage dynamic calculation module collects ship AIS data and port data, and calculates voyage dynamic data based on the AIS data and port data. The voyage dynamic data includes the anchoring start time and the anchoring end time;
[0062] The anchoring behavior clustering module obtains the longitude and latitude coordinates of the anchoring points of all ships in a certain port at each moment from the anchoring start time to the anchoring end time, uses the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the anchoring points at all moments, obtains multiple anchoring behavior clusters, and uses the K-Means clustering algorithm to cluster the longitude and latitude coordinates in each anchoring behavior cluster to obtain the center points of each anchoring behavior cluster;
[0063] The anchoring behavior cluster screening module calculates the distance from each anchoring point in each anchoring behavior cluster to the center point according to the longitude and latitude coordinates of the anchoring points and the longitude and latitude coordinates of the center point in the anchoring behavior cluster, takes the calculated maximum distance as the radius of the anchoring behavior cluster, compares the radius with a preset range, and retains the anchoring behavior clusters whose radii are within the preset range;
[0064] The aforesaid anchorage clustering module continues to cluster the longitude and latitude coordinates of the central points of the remaining anchoring behavior clusters by using the DBSCAN clustering algorithm, obtaining multiple anchorage clusters, and determining the anchorage types according to the ship types of all ships in the anchorage clusters. If the ship types of all ships in a certain anchorage cluster are the same, then this anchorage cluster is identified as an anchorage for specific ship types. If at least two of all ships in a certain anchorage cluster have different ship types, then this anchorage cluster is identified as a general anchorage.
[0065] Preferably, in the anchoring behavior clustering module, clustering the longitude and latitude coordinates of the anchoring points at all times by using the DBSCAN clustering algorithm includes the following steps:
[0066] S1: Using the DBSCAN clustering algorithm and clustering the longitude and latitude coordinates of the anchoring points at all times according to the preset initial distance parameter and initial neighborhood parameter, obtaining multiple anchoring behavior clusters to be evaluated;
[0067] S2: Using the silhouette coefficient as an evaluation index to evaluate the clustering effect of each anchoring behavior cluster to be evaluated. If the evaluated clustering effect does not reach the optimum, then adjust the initial distance parameter and initial neighborhood parameter, and re-cluster according to step S1;
[0068] S3: Repeat step S2 until the optimum distance parameter and neighborhood parameter are obtained, obtaining multiple anchoring behavior clusters.
[0069] Preferably, in the anchorage clustering module, after obtaining multiple anchorage clusters, the K-Means clustering algorithm is also used to cluster each anchorage cluster, obtaining the central point of each anchorage cluster, and retaining the boundary points of each anchorage cluster.
[0070] Preferably, the AIS data includes the Maritime Mobile Service Identity (MMSI), longitude and latitude position information, ship status, and ship type; the port data includes the longitude and latitude position information of the port and the port code.
[0071] Preferably, the voyage dynamic data further includes the longitude and latitude at the start of anchoring, the longitude and latitude at the end of anchoring, and the anchorage port information.
[0072] The present invention provides an objective and scientific method and system for identifying port anchorages based on machine learning algorithms. Based on ship AIS data and port data, and using machine learning algorithms (DBSCAN clustering algorithm and K-Means clustering algorithm) and specific judgment methods to identify port anchorages, it can accurately identify each anchorage in the port and its anchorage type.
[0073] It should be noted that the above-described specific embodiments can enable those skilled in the art to understand the present invention more comprehensively, but do not limit the present invention in any way. Therefore, although this specification has described the present invention in detail with reference to the drawings and embodiments, those skilled in the art should understand that the present invention can still be modified or equivalently replaced. In short, all technical solutions and their improvements that do not depart from the spirit and scope of the present invention should be covered by the protection scope of the patent of the present invention.
Claims
1. A port anchorage identification method based on machine learning algorithm, characterized in that: The following steps are involved: Data collection and voyage dynamic calculation steps: collecting ship AIS data and port data, and calculating voyage dynamic data based on the AIS data and port data, the voyage dynamic data includes the anchoring start time and the anchoring end time; Anchoring behavior clustering step: obtain the longitude and latitude coordinates of the anchoring points of all ships at a port at each moment from the start time to the end time of anchoring, use the DBSCAN clustering algorithm to cluster the longitude and latitude coordinates of the anchoring points at all moments, obtain multiple anchoring behavior clusters, and use the K-Means clustering algorithm to cluster the longitude and latitude coordinates in each anchoring behavior cluster to obtain the center point of each anchoring behavior cluster; Anchoring behavior cluster screening step: Calculate the distance from each anchor point in each anchoring behavior cluster to the center point according to the longitude and latitude coordinates of the anchor points in the anchoring behavior cluster and the longitude and latitude coordinates of the center point, use the calculated maximum distance as the radius of the anchoring behavior cluster, and compare the radius with the preset range, and retain the anchoring behavior clusters with a radius within the preset range; Anchorage clustering step: The DBSCAN clustering algorithm is used to continue clustering the longitude and latitude coordinates of the center points of the retained anchoring behavior clusters to obtain multiple anchorage clusters, and the anchorage type is determined according to the ship types of all ships in the anchorage cluster. If the ship types of all ships in an anchorage cluster are the same, the anchorage cluster is identified as a specific ship type anchorage. If at least two of the ships in an anchorage cluster are of different types, the anchorage cluster is identified as a general anchorage.
2. The method for identifying port anchorages based on machine learning algorithm according to claim 1, characterized in that: In the anchoring behavior clustering step, clustering the longitude and latitude coordinates of anchoring points at all times using the DBSCAN clustering algorithm includes the following steps: S1: The DBSCAN clustering algorithm is used to cluster the longitude and latitude coordinates of the anchoring points at all times according to the preset initial distance parameters and initial neighborhood parameters to obtain multiple anchoring behavior clusters to be evaluated; S2: Use the silhouette coefficient as an evaluation index to evaluate the clustering effect of each anchoring behavior cluster to be evaluated. If it is evaluated that the clustering effect is not optimal, adjust the initial distance parameter and the initial neighborhood parameter, and re-cluster according to step S1; S3: Repeat step S2 until the optimal distance parameter and neighborhood parameter are obtained, and multiple anchoring behavior clusters are obtained.
3. The method for identifying port anchorages based on machine learning algorithm according to claim 1, characterized in that: In the anchorage clustering step, after obtaining a plurality of anchorage clusters, a K-Means clustering algorithm is further used to cluster each anchorage cluster to obtain the center point of each anchorage cluster, and retain the boundary points of each anchorage cluster.
4. The method for identifying a port anchorage based on a machine learning algorithm according to any one of claims 1 to 3, characterized in that: The ship AIS data includes the ship mobile service identification code MMSI, longitude and latitude position information, ship status and ship type; the port data includes the port longitude and latitude position information and port code.
5. The method for identifying port anchorages based on a machine learning algorithm according to any one of claims 1 to 3, characterized in that: The voyage dynamic data also includes the anchoring start longitude and latitude, anchoring end longitude and latitude and anchoring port information.
6. A port anchorage identification system based on machine learning algorithm, characterized in that: It includes a data acquisition and voyage dynamic calculation module, an anchoring behavior clustering module, an anchoring behavior cluster screening module and an anchorage clustering module, which are connected in sequence. The data collection and voyage dynamic calculation module collects ship AIS data and port data, and calculates voyage dynamic data based on the AIS data and port data, wherein the voyage dynamic data includes the start time and the end time of anchoring; The anchoring behavior clustering module obtains the longitude and latitude coordinates of the anchoring points of all ships in a port at each moment from the anchoring start time to the anchoring end time, clusters the longitude and latitude coordinates of the anchoring points at all moments using the DBSCAN clustering algorithm to obtain multiple anchoring behavior clusters, and clusters the longitude and latitude coordinates in each anchoring behavior cluster using the K-Means clustering algorithm to obtain the center point of each anchoring behavior cluster; The mooring behavior cluster screening module calculates the distance from each mooring point in each mooring behavior cluster to the center point according to the longitude and latitude coordinates of the mooring points and the center point in the mooring behavior cluster, takes the calculated maximum distance as the radius of the mooring behavior cluster, compares the radius with a preset range, and retains the mooring behavior clusters with a radius within the preset range; The anchorage clustering module uses the DBSCAN clustering algorithm to continue clustering the longitude and latitude coordinates of the center points of the retained anchoring behavior clusters to obtain multiple anchorage clusters, and determines the anchorage type according to the ship types of all ships in the anchorage cluster. If the ship types of all ships in a certain anchorage cluster are the same, the anchorage cluster is identified as a specific ship type anchorage. If at least two of all ships in a certain anchorage cluster have different ship types, the anchorage cluster is identified as a general anchorage.
7. The port anchorage identification system based on machine learning algorithm according to claim 6 is characterized in that: In the anchoring behavior clustering module, clustering the longitude and latitude coordinates of anchoring points at all times using the DBSCAN clustering algorithm includes the following steps: S1: The DBSCAN clustering algorithm is used to cluster the longitude and latitude coordinates of the anchoring points at all times according to the preset initial distance parameters and initial neighborhood parameters to obtain multiple anchoring behavior clusters to be evaluated; S2: Use the silhouette coefficient as an evaluation index to evaluate the clustering effect of each anchoring behavior cluster to be evaluated. If it is evaluated that the clustering effect is not optimal, adjust the initial distance parameter and the initial neighborhood parameter, and re-cluster according to step S1; S3: Repeat step S2 until the optimal distance parameter and neighborhood parameter are obtained, and multiple anchoring behavior clusters are obtained.
8. The port anchorage identification system based on machine learning algorithm according to claim 6 is characterized in that: In the anchorage clustering module, after obtaining multiple anchorage clusters, a K-Means clustering algorithm is used to cluster each anchorage cluster to obtain the center point of each anchorage cluster and retain the boundary points of each anchorage cluster.
9. The port anchorage identification system based on machine learning algorithm according to any one of claims 6 to 8, characterized in that: The AIS data includes the ship mobile service identification code MMSI, longitude and latitude location information, ship status and ship type; the port data includes the port longitude and latitude location information and port code.
10. The port anchorage identification system based on machine learning algorithm according to any one of claims 6 to 8, characterized in that: The voyage dynamic data also includes the anchoring start longitude and latitude, anchoring end longitude and latitude and anchoring port information.
Citation Information
Patent Citations
Ship anchoring accumulation area identification method and device
CN112613455A
Ship docking repair identification method and system
CN113988213A
AIS-based offshore wind plant identification method and system
CN115310533A
Cited By
Anchorage space-time utilization efficiency evaluation method based on time geography
CN122596771A