An optimal route planning method and system based on clustering algorithm

By collecting, preprocessing and planning ship AIS data, and using clustering algorithms to generate multi-attribute routes, the problems of insufficient information coverage and discontinuous trajectories in route planning in existing technologies are solved, and the accuracy and visualization of route planning are improved.

CN115062812BActive Publication Date: 2025-09-16COSCO SHIPPING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210465625.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-09-16
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Existing route planning technology has the problem that a single route cannot cover all attribute information, the route trajectory is prone to sharp turning points, burrs and obvious splicing marks, and the route planning may include unnecessary tracks.

Method used

Through track marking technology, cluster number definition technology and cluster analysis and processing technology, and using the clustering algorithm in the 3D image mapping library of the object-oriented scripting language, ship AIS data is collected, preprocessed and route planned, multi-attribute routes are generated, unnecessary tracks are avoided, and route clustering results are optimized.

Benefits of technology

The route statistically covers all attribute information, eliminates track turning points and splicing traces, and improves the accuracy and visualization of route planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115062812B_ABST
    Figure CN115062812B_ABST
Patent Text Reader

Abstract

The present invention provides an optimal route planning method and system based on a clustering algorithm. The method includes data collection and preprocessing steps, a cluster number definition step, and a route planning processing step. Through track marking technology, a cluster number definition technology based on previous and next nodes, and a cluster analysis processing technology, a cluster route based on departure / arrival node statistics is obtained. The route statistically has arrival and departure node information and can be effectively used as part of route planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of shipping information technology, and in particular to an optimal route planning method and system based on a clustering algorithm. Background Art

[0002] In recent years, the increasing maturity and popularity of 5G and satellite communications, coupled with advances in computer algorithms and the proliferation of cloud computing, have made it possible to collect large amounts of ship AIS information and store it in the cloud for analysis. This vast amount of AIS information holds enormous potential, allowing for deep mining of its potential for understanding shipping and commercial value. Clustering, a process that categorizes entities or concepts based on their unique attributes, is a widely accepted method for AIS data mining.

[0003] However, there are many problems with the AIS clustering methods used so far: (1) Existing technologies mostly focus on optimizing the clustering algorithm itself, and their data extraction, cleaning, and final calculation parts are relatively disconnected, and they cannot form a unified and effective system. This makes existing technologies mostly able to achieve certain effects within a specific data set but unable to be promoted; (2) Existing technologies mostly classify the results into a single route, but in route planning and actual use, the routes in the same pair of nodes may be quite different for different attributes (destination, cargo type, etc.), and a single route cannot cover all attribute information; (3) After route clustering, in order to cover more information, the trajectory of the route itself is prone to sharp "inflection points and burrs", which is not conducive to route planning and data visualization; (4) The selected route may contain information that is not required for route planning, such as refueling operations, resulting in unnecessary tracks in the route itself, and obvious splicing marks are likely to appear when splicing tracks between nodes. Summary of the Invention

[0004] To address current route planning issues, such as a single route failing to capture all attribute information, the tendency to experience inflection points, glitches, and noticeable splicing artifacts, the present invention provides an optimal route planning method based on a clustering algorithm. By utilizing track marking technology, defining cluster numbers based on preceding and following nodes, and cluster analysis and processing techniques, a clustered route is generated based on departure / arrival node statistics. This route statistically incorporates arrival and departure node information and can be effectively used as part of route planning. The present invention also relates to an optimal route planning system based on a clustering algorithm.

[0005] The technical solutions of the present invention are as follows:

[0006] An optimal route planning method based on a clustering algorithm is characterized by comprising the following steps:

[0007] Data collection and preprocessing steps: collecting ship AIS data information, filtering out abnormal tracks, and labeling each filtered track;

[0008] In the step of defining the number of clusters, the previous and next nodes of all the tracks between the labeled nodes are counted, the departure port node information and the destination port node information are regenerated, the number of the departure port node information and the destination port node information of the track are counted and sorted, and then the number of clusters is defined;

[0009] The route planning processing step uses a clustering algorithm in a 3D image mapping library of an object-oriented scripting language to cluster the tracks between the selected nodes based on the minimum horizontal flip distance of the central route of the cluster, and obtains the route planning according to the defined number of clusters.

[0010] Preferably, in the data collection and preprocessing step, filtering abnormal tracks is filtering out tracks whose heading of adjacent AIS data is greater than a first set threshold and / or whose AIS data loss rate is greater than a second set threshold.

[0011] Preferably, in the data collection and preprocessing steps, each filtered track is labeled by directly generating a label using a field identifying the route, or by classifying two adjacent records according to their departure time and MMSI code and labeling them as different categories if the MMSI codes are different.

[0012] Preferably, in the step of defining the number of clusters, all key strait / bay nodes that the track passes through are first counted;

[0013] Regenerate the departure port node information and the destination port node information: calculate the position of the first strait / bay among all key strait / bay nodes, and when it is in the first position, record the departure node of the track as the departure port, otherwise record the departure node of the track as the strait / bay before the first strait / bay; calculate the position of the second strait / bay among all key strait / bay nodes, and when it is in the last position, record the end node of the track as the destination port, otherwise record the end node of the track as the strait / bay next to the second strait / bay;

[0014] Then, the departure port node information and destination port node information of the track are counted respectively, and the number is sorted in descending order;

[0015] Finally, the number of clusters is defined: if all departure port nodes appear only once, the number of clusters is the number of departure port nodes; if the departure port node appears more than once, the number of occurrences of all departure port nodes is traversed in descending order. If the number of occurrences of the latter node is greater than the ratio threshold of the number of occurrences of the previous node, the number of clusters is increased by one, and the final defined number of clusters is obtained.

[0016] Preferably, in the route planning processing step, a clustering algorithm is used to perform streamline clustering, each track is resampled and indexed, and a cluster is defined as a set including the track index within the cluster, the AIS latitude and longitude set of the track within the cluster, and the number of tracks within the cluster. When the minimum flip distance of the central route of the cluster is less than a third set threshold, the route is added to the cluster and the cluster information is updated. When the minimum flip distance of the central route of the cluster is greater than the third set threshold, a new cluster is added to obtain classified clusters and the central route of the cluster. When the number of central routes is greater than the required number of clusters, the distance between the central routes is calculated again and similar clusters are merged to obtain route planning.

[0017] An optimal route planning system based on clustering algorithm is characterized by comprising a data acquisition and preprocessing module, a cluster number definition module and a route planning processing module connected in sequence.

[0018] The data acquisition and preprocessing module collects ship AIS data information, filters abnormal tracks, and labels each filtered track;

[0019] The module for defining the number of clusters counts the previous and next nodes of all tracks between the labeled nodes, regenerates the departure port node information and the destination port node information, counts the number of the departure port node information and the destination port node information of the track respectively, and sorts the number, thereby defining the number of clusters;

[0020] The route planning processing module clusters the selected nodes' tracks based on the minimum horizontal flip distance of the cluster's center routes using a clustering algorithm in a 3D image mapping library of an object-oriented scripting language, and obtains route planning based on the defined number of clusters.

[0021] Preferably, the data acquisition and pre-processing module filters out abnormal tracks by filtering out tracks whose heading of adjacent AIS data is greater than a first set threshold and / or whose AIS data loss rate is greater than a second set threshold.

[0022] Preferably, the data acquisition and preprocessing module labels each filtered track by directly generating a label using a field identifying the route, or classifies two adjacent records according to their departure time and MMSI code and labels them as different categories if the MMSI codes are different.

[0023] Preferably, the module for defining the number of clusters includes a node statistics module, a module for regenerating departure / arrival port nodes, a sorting module and a cluster number processing module which are connected in sequence.

[0024] The node statistics module is used to count all key strait / bay nodes that the track passes through;

[0025] The regeneration departure / arrival port node module is used to regenerate the departure port node information and the destination port node information, calculate the position of the first strait / bay among all key strait / bay nodes, and when it is in the first position, record the departure node of the track as the departure port, otherwise record the departure node of the track as the strait / bay before the first strait / bay; calculate the position of the second strait / bay among all key strait / bay nodes, and when it is in the last position, record the end node of the track as the destination port, otherwise record the end node of the track as the strait / bay next to the second strait / bay;

[0026] The sorting module counts the departure port node information and the destination port node information of the track respectively, and sorts the quantity in descending order;

[0027] The cluster number processing module is used to define the number of clusters. If all departure port nodes appear only once, the number of clusters is the number of departure port nodes. If the departure port node appears more than once, the number of occurrences of all departure port nodes is traversed in descending order. If the number of occurrences of the latter node is greater than the ratio threshold of the number of occurrences of the previous node, the number of clusters is increased by one, thereby obtaining the final defined number of clusters.

[0028] Preferably, the route planning processing module includes an algorithm definition module and an algorithm process module. The algorithm definition module resamples each track and indexes each track, and defines a cluster as a set including the track index within the cluster, the AIS latitude and longitude set of the track within the cluster, and the number of tracks within the cluster; the algorithm process module uses a clustering algorithm to perform streamline clustering. When the minimum flip distance of the central route of the cluster is less than a third set threshold, the route is added to the cluster and the cluster information is updated. When the minimum flip distance of the central route of the cluster is greater than the third set threshold, a new cluster is added to obtain a classified cluster and the central route of the cluster. When the number of central routes is greater than the required number of clusters, the distance between the central routes is calculated again and similar clusters are merged to obtain route planning.

[0029] The beneficial effects of the present invention are:

[0030] The present invention provides an optimal route planning method based on a clustering algorithm. First, ship AIS data information is collected in a data collection and preprocessing step, abnormal tracks are filtered, and each filtered track segment is labeled. Then, in a cluster number definition step, the previous node and the next node of all tracks between the labeled nodes are counted and the departure port node information and the destination port node information are regenerated to define the number of clusters. Finally, in a route planning processing step, the tracks between the selected nodes are clustered based on the minimum horizontal flip distance of the cluster center route using a clustering algorithm in a 3D image mapping library of an object-oriented scripting language. A route plan is obtained according to the defined number of clusters. The present invention is essentially a method for clustering routes between nodes based on AIS track data between important nodes. By extracting, cleaning, and completing track data, modifying parameters in the clustering algorithm, and subsequently optimizing the generated multi-attribute track clustering results, an algorithm is designed to obtain clustered routes based on departure / arrival node statistics using track labeling technology, a technology for defining the number of clusters based on previous and next nodes, and a cluster analysis processing technology. This route statistically has arrival and departure node information and can be effectively used as part of route planning.

[0031] The present invention also relates to an optimal route planning system based on a clustering algorithm. The system corresponds to the above-mentioned optimal route planning method based on a clustering algorithm, and can be understood as a system for implementing the above-mentioned optimal route planning method based on a clustering algorithm, including a data acquisition and preprocessing module, a cluster quantity definition module, and a route planning processing module. The modules work together and can use AIS data, combined with marking technology, a neural bundle clustering algorithm in a 3D image mapping library of an object-oriented scripting language, and integrate relevant business logic to generate routes between nodes with multiple attributes, avoiding unnecessary tracks of the route itself. The route has statistically all attribute information of the arrival and departure nodes, solves the problems of "inflection points, burrs" and obvious splicing marks in the track, improves the accuracy of route planning, and is conducive to promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flow chart of the optimal route planning method based on clustering algorithm of the present invention.

[0033] Figure 2 The results of clustering routes between important nodes based on AIS are shown, taking the Bohai Bay to Taiwan Strait as an example.

[0034] Figure 3 It is a schematic diagram of the preferred structure of the optimal route planning system based on clustering algorithm of the present invention. DETAILED DESCRIPTION

[0035] The present invention will be described below with reference to the accompanying drawings.

[0036] The present invention relates to an optimal route planning method based on clustering algorithm. The flow chart of the method is as follows: Figure 1 As shown, the following steps are included:

[0037] 1. Data collection and preprocessing steps: collect ship AIS data information, filter out abnormal tracks, and label each track after filtering. AIS data includes ship static data and ship dynamics data. Among them, the key node information of the track is required in the ship dynamics data: departure port (start_port_code), destination port (end_port_code), track start node (leg_start_code_), track end node (leg_end_code); obtain AIS data with latitude and longitude, mmsi, bow direction cog, issuance time postimeAIS, pre_postime fields (time span 1 to 6 months), and single cargo category (otherwise the data volume is too large). It is best to add fields that can identify the route, such as leg_start_postime+leg_end_positme in the dynamics table. SQL is sorted in ascending order by mmsi and postime fields.

[0038] Taking the route from Bohai Bay to the Taiwan Strait as an example: Connect to a PostgreSQL database, query AIS data for all ships, and calculate voyage dynamics. Query the tracks of dry bulk carriers entering Bohai Bay and exiting the Taiwan Strait over the past year. Filter out abnormal tracks by filtering out tracks where the heading of adjacent AIS data exceeds a first threshold and / or the AIS data loss rate exceeds a second threshold. For example, tracks where the heading of adjacent AIS points is greater than 60 degrees and the AIS loss rate is greater than 0.1 are discarded. Each track segment is labeled based on MMSI, postimg, and other information. All AIS data is labeled with a track (traj) according to the route it belongs to. Track label generation can be done using two logics: directly using fields that identify the route, or by categorizing two adjacent records based on postimg = pre_postime && mmsi = mmsi. Alternatively, two adjacent records are categorized based on their departure time and MMSI code, with different MMSI codes assigned different labels.

[0039] 2. Define the number of clusters. Count the previous and next nodes of all tracks between labeled nodes, regenerate the departure port node information and destination port node information, count the number of departure port node information and destination port node information of the track respectively, sort the numbers, and then define the number of clusters.

[0040] Let's take the example of passing through Bohai Bay to reach the Taiwan Strait:

[0041] a) Count all the important nodes (leg_cross_node) that the track passes through. These important nodes have strait / bay information but no ports;

[0042] b) Regenerate departure / arrival node information:

[0043] i) Calculate the location of Bohai Bay at leg_cross_node position n:

[0044] If n=0, that is, it is in the first position, the departure node of the track is recorded as the departure port (leg_start_port_code);

[0045] If n>0, that is, it is not in the first position, the starting node of the recorded track is the previous strait / bay leg_cross_node[n-1].

[0046] ii) Calculate the location of the Taiwan Strait at leg_cross_node:

[0047] If n = len(leg_cross_node), that is, it is at the last digit, then the end node of the track is recorded as the destination port (leg_end_port_code);

[0048] If n!=len(leg_cross_node), that is, it is not the last digit, then the end node of the track is recorded as the next strait / bay leg_cross_node[n+1].

[0049] c) Count the information of the starting and ending nodes of the track respectively, and sort the numbers in descending order;

[0050] d) Define the number of clusters g (taking the departure node as an example):

[0051] i) If all departure nodes appear only once, then g = the number of departure nodes; this is the worst case, as the number is too large.

[0052] ii) If the starting node is not 1, first set g = 0, and then traverse all the starting nodes in descending order. The first node in the ranking is set to g = 1. If the number of occurrences of the subsequent node is greater than 20% of the number of occurrences of the previous node, then g = g + 1. In other words, if the number of occurrences of the subsequent node exceeds the ratio threshold of the number of occurrences of the previous node (preferably 20%, but other values ​​are also possible), the number of clusters is increased by one, and the final number of clusters is obtained.

[0053] The number g of required classifications is calculated according to the above method. As shown in Table 1, in the embodiment, g=3.

[0054] Table 1

[0055] Node Name Occurrences SINGAPORE_STRAIT 1242 ZHUJIANG_ESTUARY 728 SUNDA_STRAIT',497 497

[0056] For example, let's say the number of times the nodes appear is 1000 times, 800 times, 1 time, 1 time, 1 time..., then the number of times the third node appears is less than 20% of the second node's number of times, and the number of clusters no longer increases. At this time, g = 2.

[0057] 3. A route planning process step, using a clustering algorithm in a 3D image mapping library of an object-oriented scripting language to cluster the selected node tracks based on the minimum horizontal flip distance of the cluster's center routes, and obtaining a route plan based on the defined number of clusters. Preferably, a clustering algorithm is used to perform streamline clustering, resample each track and index each track, and define a cluster as a set including the cluster track index, the cluster track AIS latitude and longitude set, and the number of cluster tracks. When the minimum flip distance of the cluster's center route is less than a third set threshold, the track is added to the cluster and the cluster information is updated. When the minimum flip distance of the cluster's center route is greater than the third set threshold, a new cluster is added to obtain classified clusters and the cluster's center routes. When the number of center routes is greater than the required number of clusters, the distances between the center routes are recalculated and similar clusters are merged to obtain a route plan.

[0058] The Quick Bundles clustering algorithm in the object-oriented scripting language DIPY 3D image mapping library is used to cluster the tracks between the selected nodes. DIPY is a third-party open source library for pattern recognition in the Python language for 3D / 4D images. It contains functions for multiple methods such as graphics standardization, signal processing, and machine learning. The Quick Bundles (QB) is a fiber bundle imaging (tractography) method, which is generally used in medical magnetic resonance imaging. The present invention uses QuickBundles (QB) to perform streamline clustering on the tracks, treating each track as a white matter fiber, and then merging "similar" tracks in the same cluster. It mainly includes two parts: algorithm definition and algorithm process.

[0059] The algorithm is defined as follows:

[0060] a) First, resample each track into K points (the number of points in each track is the same, and increasing the value of K can make the density of the formed track points higher, but it will also increase the calculation time);

[0061] b) Each track (s) is indexed with i=1,2...n, such as s i is a K×2 matrix (2 is the longitude and latitude information), representing the i-th track;

[0062] c) Define a cluster (c) as a Python tuple c = (I,h,n), where I is the index of the track in the cluster, h is the set of tracks in the cluster, and n is the total number of tracks in the cluster. The h matrix can be updated at any time and is defined as (n is the current number of tracks in the cluster):

[0063]

[0064] d) The central route (v) of each cluster is defined as:

[0065] v=h / n

[0066] e) The distance between routes is calculated using the minimum average direct flip (MDF) distance, which is calculated as follows: Let a route be s = [s1, s2...s K ], and its horizontal flipping route is s F =[s K ,...,s2,s1], then the MDF can be defined as:

[0067]

[0068] d flipped (s,t)=d(s,t F )=d(s F ,t)

[0069] MDF(s,t)=min(d direct (s,t),d flipped (s,t))

[0070] Where || is the Euclidean distance between two points, and t should be added. The advantage of using MDF is that it is fast and can consider both the forward and reverse directions of the track.

[0071] The algorithm process is as follows:

[0072] a) During the algorithm, we assume that we have M clusters;

[0073] b) Select the longitude and latitude of the first track s1 and put it into the first cluster: c1←({1},s1,1). At this time, MDF=1

[0074] c) For the remaining track s i :

[0075] i) Calculate s i With other clusters c e The center line v e The minimum horizontal flip distance m e(minimum average direct flip, MDF), where e = 1, 2...M

[0076] ii) If any MDF value m e If it is less than the set threshold p, then the route will be added to cluster c e And update the cluster information c e ←(append(I,i),h+s,n+1) changed to c e ←(append(I,i),h+s i ,n+1)

[0077] iii) If m e If the value is greater than the set threshold p, a new cluster c is added. M+1 ←([i],s i ,1),M←M+1

[0078] iv) Get the classified cluster c e and cluster center route v e , where e=1,2...M

[0079] v) If the number of M is greater than the number of clusters g required, calculate v again e The distance between them is calculated and similar clusters are merged.

[0080] The present invention uses the Quick Bundles clustering algorithm in the DIPY 3D image mapping library to cluster the tracks between the selected nodes. All routes are input into the DIPY algorithm for clustering calculation. The threshold p is set to 10 and the number of clusters defined is g = 3. As a result, three routes are generated, as shown in the following figure. Figure 2 As shown in Figure 1, they represent three paths to the important nodes in Table 1.

[0081] The present invention also relates to an optimal route planning system based on a clustering algorithm. The system corresponds to the optimal route planning method based on a clustering algorithm, and can be understood as a system that implements the optimal route planning method based on a clustering algorithm. The preferred structure is as follows: Figure 3 As shown, it includes a data acquisition and preprocessing module, a cluster number definition module, and a route planning processing module connected in sequence.

[0082] The data collection and preprocessing module collects ship AIS data information, filters abnormal tracks, and labels each filtered track. Furthermore, filtering abnormal tracks is to filter out tracks whose heading of adjacent AIS data is greater than a first set threshold and / or whose AIS data loss rate is greater than a second set threshold. Labeling each filtered track is to directly generate a label using a field identifying the route, or to classify two adjacent records according to their departure time and MMSI code and label them as different categories if the MMSI codes are different.

[0083] The module for defining the number of clusters counts the previous node and the next node of all tracks between the labeled nodes, regenerates the departure port node information and the destination port node information, counts the number of the departure port node information and the destination port node information of the track respectively and sorts the number, thereby defining the number of clusters.

[0084] Furthermore, the module for defining the number of clusters includes a node statistics module, a module for regenerating departure / arrival port nodes, a sorting module and a cluster quantity processing module connected in sequence. The node statistics module is used to count all key strait / bay nodes that the track passes through; the module for regenerating departure / arrival port nodes is used to regenerate departure port node information and destination port node information, calculate the position of the first strait / bay through all key strait / bay nodes, and when it is in the first position, record the track departure node as the departure port, otherwise record the track departure node as the strait / bay before the first strait / bay; calculate the position of the second strait / bay through all key strait / bay nodes Position, when it is in the last position, the end node of the track is recorded as the destination port, otherwise the end node of the track is recorded as the next strait / bay of the second strait / bay; the sorting module counts the departure port node information and the destination port node information of the track respectively, and sorts the number in descending order; the cluster number processing module is used to define the number of clusters, if all departure port nodes appear only once, the number of clusters is the number of departure port nodes; if the departure port node appears more than once, the number of occurrences of all departure port nodes is traversed in descending order, if the number of occurrences of the latter node is greater than the ratio threshold of the number of occurrences of the previous node, the number of clusters is increased once, and the final defined number of clusters is obtained.

[0085] The route planning processing module clusters the selected nodes' tracks based on the minimum horizontal flip distance of the cluster's center routes using a clustering algorithm in a 3D image mapping library of an object-oriented scripting language, and obtains route planning based on the defined number of clusters.

[0086] Furthermore, the route planning processing module includes an algorithm definition module and an algorithm process module. The algorithm definition module resamples each track and indexes each track, and defines a cluster as a set including the track index within the cluster, the AIS latitude and longitude set of the track within the cluster, and the number of tracks within the cluster; the algorithm process module uses a clustering algorithm to perform streamline clustering. When the minimum flip distance of the central route of the cluster is less than a third set threshold, the route is added to the cluster and the cluster information is updated. When the minimum flip distance of the central route of the cluster is greater than the third set threshold, a new cluster is added to obtain a classified cluster and the central route of the cluster. When the number of central routes is greater than the required number of clusters, the distance between the central routes is calculated again and similar clusters are merged to obtain route planning.

[0087] The present invention uses PostgreSQL and Python languages, and is based on AIS data, mainly static ship data and dynamic AIS ship data (node ​​crossing information) in AIS historical data. It cleans and integrates the data through relevant algorithms, and then uses a clustering algorithm for analysis. After integrating relevant business logic, it generates routes between nodes with multiple attributes, avoiding unnecessary tracks of the routes themselves. The routes have statistically all attribute information of arrival and departure nodes, and solve the problems of track "inflection points, burrs" and obvious splicing marks, thereby improving the accuracy of route planning and facilitating popularization and application.

[0088] It should be noted that the specific embodiments described above can enable those skilled in the art to more fully understand the present invention, 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 replaced with equivalents. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be included in the scope of protection of the patent for the present invention.

Claims

1. An optimal route planning method based on clustering algorithm, characterized in that: The following steps are involved: Data collection and preprocessing steps: collecting ship AIS data information, filtering out abnormal tracks, and labeling each filtered track; In the step of defining the number of clusters, the previous and next nodes of all tracks between labeled nodes are counted, the departure port node information and the destination port node information are regenerated, and the number of departure port node information and destination port node information of the track are counted and sorted respectively, thereby defining the number of clusters. Specifically, all key straits / bay nodes passed by the track are counted first; Regenerate the departure port node information and destination port node information: calculate the position of the first strait / bay among all key strait / bay nodes, and when it is in the first position, record the departure node of the track as the departure port, otherwise record the departure node of the track as the strait / bay before the first strait / bay; calculate the position of the second strait / bay among all key strait / bay nodes, and when it is in the last position, record the end node of the track as the destination port, otherwise record the end node of the track as the strait / bay next to the second strait / bay; then count the departure port node information and destination port node information of the track respectively, and sort the number in descending order; finally define the number of clusters: if all departure port nodes appear only once, then the number of clusters is the number of departure port nodes; If the departure port node appears more than once, the number of occurrences of all departure port nodes is traversed in descending order. If the number of occurrences of the latter node is greater than the ratio threshold of the number of occurrences of the former node, the number of clusters is increased once, and the final number of clusters is obtained. The route planning processing step uses a clustering algorithm in a 3D image mapping library of an object-oriented scripting language to cluster the tracks between the selected nodes based on the minimum horizontal flip distance of the central route of the cluster, and obtains the route planning according to the defined number of clusters.

2. The optimal route planning method based on clustering algorithm according to claim 1, characterized in that: In the data collection and preprocessing steps, filtering abnormal tracks is to filter out tracks whose heading of adjacent AIS data is greater than a first set threshold and / or whose AIS data loss rate is greater than a second set threshold.

3. The optimal route planning method based on clustering algorithm according to claim 1, characterized in that: In the data collection and preprocessing steps, each filtered track is labeled by directly generating a label using the field identifying the route, or classifying two adjacent records according to the departure time and MMSI code and labeling them as different categories when the MMSI codes are different.

4. The optimal route planning method based on clustering algorithm according to claim 1, characterized in that: In the route planning processing step, a clustering algorithm is used to perform streamline clustering, each track is resampled and indexed, and a cluster is defined as a set including the track index within the cluster, the AIS latitude and longitude set of the track within the cluster, and the number of tracks within the cluster. When the minimum flip distance of the central route of the cluster is less than a third set threshold, the route is added to the cluster and the cluster information is updated. When the minimum flip distance of the central route of the cluster is greater than the third set threshold, a new cluster is added to obtain classified clusters and the central route of the cluster. When the number of central routes is greater than the required number of clusters, the distance between the central routes is calculated again and similar clusters are merged to obtain route planning.

5. An optimal route planning system based on clustering algorithm, characterized in that: It includes the data acquisition and preprocessing module, the cluster number definition module and the route planning processing module connected in sequence. The data acquisition and preprocessing module collects ship AIS data information, filters abnormal tracks, and labels each filtered track; The module for defining the number of clusters counts the preceding node and the succeeding node of all tracks between the labeled nodes, regenerates the departure port node information and the destination port node information, counts the number of the departure port node information and the destination port node information of the track respectively and sorts the number, thereby defining the number of clusters; specifically, the module for defining the number of clusters comprises a node statistics module, a module for regenerating departure / arrival port nodes, a sorting module and a cluster quantity processing module connected in sequence, the node statistics module is used to count all key strait / bay nodes passed by the track; the module for regenerating departure / arrival port nodes is used to regenerate the departure port node information and the destination port node information, calculate the position of the first strait / bay passed through among all key strait / bay nodes, and when it is in the first place, record the track departure node as the departure port, otherwise The departure node of the track is recorded as the previous strait / bay of the first strait / bay; the position of the second strait / bay among all key strait / bay nodes is calculated, and when it is in the last position, the end node of the track is recorded as the destination port, otherwise the end node of the track is recorded as the next strait / bay of the second strait / bay; the sorting module counts the departure port node information and the destination port node information of the track respectively, and sorts the number in descending order; the cluster number processing module is used to define the number of clusters. If all departure port nodes appear only once, the number of clusters is the number of departure port nodes; if the departure port node appears more than once, the number of occurrences of all departure port nodes is traversed in descending order. If the number of occurrences of the latter node is greater than the ratio threshold of the number of occurrences of the previous node, the number of clusters is increased once, thereby obtaining the final defined number of clusters; The route planning processing module clusters the selected nodes' tracks based on the minimum horizontal flip distance of the cluster's center routes using a clustering algorithm in a 3D image mapping library of an object-oriented scripting language, and obtains route planning based on the defined number of clusters.

6. The optimal route planning system based on clustering algorithm according to claim 5, characterized in that: The data acquisition and preprocessing module filters abnormal tracks by filtering out tracks whose heading of adjacent AIS data is greater than a first set threshold and / or whose AIS data loss rate is greater than a second set threshold.

7. The optimal route planning system based on clustering algorithm according to claim 5, characterized in that: The data acquisition and preprocessing module labels each filtered track by directly generating a label using the field identifying the route, or classifying two adjacent records according to the departure time and MMSI code and labeling them as different categories when the MMSI codes are different.

8. The optimal route planning system based on clustering algorithm according to claim 5, characterized in that: The route planning processing module includes an algorithm definition module and an algorithm process module. The algorithm definition module resamples each track and indexes each track, and defines a cluster as a set including the track index within the cluster, the AIS latitude and longitude set of the tracks within the cluster, and the number of tracks within the cluster; the algorithm process module uses a clustering algorithm to perform streamline clustering. When the minimum flip distance of the central route of the cluster is less than a third set threshold, the route is added to the cluster and the cluster information is updated. When the minimum flip distance of the central route of the cluster is greater than the third set threshold, a new cluster is added to obtain a classified cluster and the central route of the cluster. When the number of central routes is greater than the required number of clusters, the distance between the central routes is calculated again and similar clusters are merged to obtain route planning.

Citation Information

Patent Citations

  • A ship optimal route automatic generation method based on AIS big data

    CN112906830A