AIS trajectory clustering method, device, electronic device and storage medium

By preprocessing AIS historical data and generating route density image, combined with clustering algorithms such as DBSCAN, AIS trajectory is clustered, which solves the problems of low clustering adaptability and efficiency of AIS data in the prior art, and achieves more Efficient track category recognition.

CN117611862BActive Publication Date: 2024-08-27AEROSPACE INFORMATION RES INST CAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311694425.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2024-08-27
Estimated Expiration
2043-12-11

AI Technical Summary

Technical Problem

When the prior art uses conventional clustering algorithms to cluster massive AIS data, it has poor adaptability and low efficiency, making it difficult to effectively process AIS trajectory data with large data volume, high noise, uneven density and complex distribution.

Method used

By obtaining the AIS historical data of the ship automatic identification system, pre-processing, generating a route density image, extracting the main channel area from the image, and clustering algorithms such as DBSCAN are used to cluster pixels, combining similarity calculations and merging similar channel areas , and finally cluster and identify the target AIS trajectory, which is transformed into image processing problems to improve adaptability and efficiency.

Benefits of technology

The clustering problem of complex AIS trajectories is transformed into image processing problems, which improves the adaptability and efficiency of clustering, can effectively process complex AIS trajectory data, and provides more accurate category recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117611862B
    Figure CN117611862B
Patent Text Reader

Abstract

The present invention provides an AIS track clustering method, device, electronic device and storage medium, belonging to the field of data clustering technology, wherein the method comprises: obtaining AIS historical data of an automatic identification system for ships, preprocessing the AIS historical data, and obtaining the preprocessed AIS historical data; generating a route density image based on the preprocessed AIS historical data; extracting all main channel areas from the route density image, clustering the pixels in the main channel area, and obtaining multiple channel areas; obtaining multiple target AIS tracks to be identified, clustering and identifying the multiple target AIS tracks based on the multiple channel areas, and obtaining the categories of the multiple target AIS tracks. The AIS track clustering method, device, electronic device and storage medium provided by the present invention have strong adaptability and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data clustering, and in particular to an AIS trajectory clustering method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of ship information technology, Automatic Identification System (AIS) equipment has been applied to ship navigation and has become one of the main navigation aids for ships. Clustering AIS trajectories can provide traffic flow information and traffic management references for maritime traffic regulatory departments. AIS data has the characteristics of large data volume, high noise, uneven density, and complex distribution. The existing technology uses conventional clustering algorithms to cluster massive AIS data, which has poor adaptability and low efficiency. Summary of the invention

[0003] The present invention provides an AIS trajectory clustering method, device, electronic device and storage medium, which are used to solve the defects of poor adaptability and low efficiency in the prior art of clustering massive AIS data using conventional clustering algorithms.

[0004] In a first aspect, the present invention provides an AIS trajectory clustering method, comprising:

[0005] Acquire historical data of an automatic identification system (AIS) of a ship, and preprocess the historical data of the AIS to obtain the preprocessed historical data of the AIS;

[0006] generating a route density image based on the preprocessed AIS historical data;

[0007] Extracting all main channel areas from the route density image, and performing clustering processing on pixel points in the main channel areas to obtain multiple channel areas;

[0008] A plurality of target AIS tracks to be identified are obtained, and based on the plurality of channel areas, the plurality of target AIS tracks are clustered and identified to obtain categories of the plurality of target AIS tracks.

[0009] In some embodiments, clustering the pixels in the main channel area to obtain multiple channel areas includes:

[0010] Extracting a plurality of target pixel points from the main channel area;

[0011] Extracting features from the plurality of target pixels to obtain a feature vector for each target pixel;

[0012] Based on the feature vector of each target pixel point, a density-based clustering algorithm DBSCAN with noise is used to perform clustering processing on each target pixel point to obtain a plurality of channel areas.

[0013] In some embodiments, after obtaining the plurality of channel areas, the method further includes:

[0014] Calculating the similarity between any two adjacent channel areas, and determining whether the similarity between the two adjacent channel areas exceeds a preset threshold;

[0015] When it is determined that the similarity between the two adjacent channel areas exceeds the preset threshold, the two adjacent channel areas are merged.

[0016] In some embodiments, the calculating the similarity between any two adjacent channel areas includes:

[0017] Calculating the area distance index, heading similarity and density similarity of the two adjacent channel areas;

[0018] Based on the area distance index, the heading similarity and the density similarity, the similarity between the two adjacent channel areas is obtained.

[0019] In some embodiments, clustering and identifying the multiple target AIS tracks based on the multiple channel areas to obtain the categories of the multiple target AIS tracks includes:

[0020] Extracting the main center line of each channel area from each channel area, performing feature extraction on the main center line of each channel area, and obtaining a feature direction curve of each channel area;

[0021] Performing feature extraction on each target AIS trajectory to obtain a feature vector of each target AIS trajectory;

[0022] Based on the characteristic vector of each target AIS track and the characteristic direction curve of each channel area, calculating the distance between each target AIS track and the characteristic direction curve of each channel area;

[0023] Based on the distance between each target AIS track and the characteristic direction curve of each channel area, each target AIS track is clustered and identified to determine the category of each target AIS track.

[0024] In some embodiments, extracting features from each target AIS trajectory to obtain a feature vector of each target AIS trajectory includes:

[0025] Dividing each target AIS track into a plurality of sub-tracks, performing feature extraction on the plurality of sub-tracks, and obtaining a feature matrix of each target AIS track;

[0026] The characteristic matrix of each target AIS track is matched with the characteristic direction curve of each channel area to obtain the characteristic vector of each target AIS track.

[0027] In some embodiments, preprocessing the AIS historical data to obtain the preprocessed AIS historical data includes:

[0028] Converting the geographic coordinates of the AIS historical data into Mercator projection coordinates to obtain converted AIS historical data;

[0029] Performing data cleaning on the converted AIS historical data to obtain cleaned AIS historical data;

[0030] The cleaned AIS historical data are clustered using a k-means algorithm to remove low-speed AIS historical data to obtain filtered AIS historical data;

[0031] The filtered AIS historical data is subjected to linear interpolation processing to obtain the pre-processed AIS historical data.

[0032] In a second aspect, the present invention provides an AIS trajectory clustering device, comprising:

[0033] An acquisition unit is used to acquire AIS historical data of a ship automatic identification system, and preprocess the AIS historical data to obtain the preprocessed AIS historical data;

[0034] A generating unit, configured to generate a route density image based on the preprocessed AIS historical data;

[0035] A first clustering unit is used to extract all main channel areas from the route density image, and perform clustering processing on pixel points in the main channel area to obtain multiple channel areas;

[0036] The second clustering unit is used to obtain a plurality of target AIS tracks to be identified, and cluster and identify the plurality of target AIS tracks based on the plurality of channel areas to obtain categories of the plurality of target AIS tracks.

[0037] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned AIS trajectory clustering methods is implemented.

[0038] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the AIS trajectory clustering method described in any one of the above is implemented.

[0039] The present invention provides an AIS trajectory clustering method, device, electronic device and storage medium. The method obtains AIS historical data of an automatic identification system of a ship, pre-processes the AIS historical data, generates a route density image based on the pre-processed AIS historical data, extracts all main channel areas from the route density image, clusters the main channel areas to obtain multiple channel areas, clusters and identifies multiple target AIS trajectories based on the multiple channel areas, obtains categories of the multiple target AIS trajectories, and converts the clustering problem of complex AIS trajectories into an image processing problem. The method has strong adaptability and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 It is a flow chart of a method for clustering trajectory of an automatic ship identification system provided by an embodiment of the present invention;

[0042] Figure 2 It is a schematic diagram of a process of generating a route density image based on pre-processed historical data of an automatic ship identification system provided by an embodiment of the present invention;

[0043] Figure 3 It is a schematic diagram of a process of extracting all main channel areas from a route density image and performing clustering processing on pixel points in the main channel areas provided by an embodiment of the present invention;

[0044] Figure 4 This is an example of target ship automatic identification system trajectory coding provided by an embodiment of the present invention;

[0045] Figure 5 It is a structural schematic diagram of a trajectory clustering device for a ship automatic identification system provided by the present invention;

[0046] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] At present, AIS trajectory clustering methods are mainly divided into two categories: point-based clustering and trajectory-based clustering. The difference between the two lies in the different measurement methods of trajectory similarity or trajectory distance. The point-based clustering method calculates the similarity of each trajectory point. Although the operation is simple, it often ignores the spatiotemporal correlation of the ship's trajectory points, which is not conducive to characterizing the overall motion characteristics of the ship. The trajectory-based clustering method selects the entire trajectory or a trajectory segment composed of continuous trajectory points as the clustering object, and calculates the similarity of the entire trajectory or the similarity of the sub-trajectory segment. The dynamic time warping (DTW) algorithm, Hausdorff distance and Frechet distance are commonly used methods to measure the similarity between trajectories. However, the DTW algorithm does not consider the characteristics of the local trajectory segment, which may lead to over-stretching and over-compression. The Hausdorff distance can identify the trajectory shape, but ignores the temporal characteristics and direction of the trajectory. The Frechet distance can reflect the temporal characteristics of the trajectory and has a good clustering effect, but due to its high computational complexity, it is not suitable for clustering analysis of long trajectory segments.

[0049] Commonly used clustering algorithms are divided into the following categories: spatial clustering, hierarchical clustering, density-based clustering, grid clustering, and model-based independent clustering algorithms. The k-means algorithm has the advantages of simple calculation process and fast calculation speed, and is suitable for clustering large-scale data sets. However, it has poor processing ability for non-spherical clusters, is easily affected by the selection of initial cluster centers, and requires the number of clusters to be specified in advance. Density-Based Spatial Clustering of Applications with Noise (DBSCAN) is considered to be one of the most widely used density-based clustering algorithms in AIS data analysis. The DBSCAN method can effectively discover clusters of arbitrary shapes and can handle noisy data; in addition, it can automatically identify the number of clusters without specifying the number of clusters in advance. However, the DBSCAN algorithm faces the challenges of parameter sensitivity and time complexity.

[0050] To this end, an embodiment of the present invention provides an AIS trajectory clustering method, device, electronic device and storage medium, which obtains AIS historical data of an automatic identification system of a ship, preprocesses the AIS historical data, generates a route density image based on the preprocessed AIS historical data, extracts all main channel areas from the route density image, clusters the main channel areas to obtain multiple channel areas, clusters and identifies multiple target AIS trajectories based on the multiple channel areas, obtains categories of the multiple target AIS trajectories, and converts the clustering problem of complex AIS trajectories into an image processing problem, which has strong adaptability and high efficiency.

[0051] Figure 1 The following is a flow chart of a method for clustering the trajectory of an automatic ship identification system provided by an embodiment of the present invention. Figure 1 As shown, an AIS trajectory clustering method is provided, comprising the following steps: step 110, step 120, step 130 and step 140. The steps of the method flow are only a possible implementation of the present invention.

[0052] Step 110: Acquire historical data of the Automatic Identification System (AIS) of a ship, pre-process the historical data of the AIS, and obtain the pre-processed historical data of the AIS.

[0053] Among them, AIS historical data includes at least: ship identification information, ship location information, timestamp, navigation status, ship type, ship size, ship navigation status, navigation destination, speed and heading.

[0054] It should be noted that by preprocessing the AIS historical data, the data quality can be improved, thereby improving the accuracy and reliability of the route density image.

[0055] In some embodiments, preprocessing the AIS historical data to obtain the preprocessed AIS historical data includes:

[0056] The geographical coordinates of the AIS historical data are converted into Mercator projection coordinates to obtain the converted AIS historical data;

[0057] Performing data cleaning on the converted AIS historical data to obtain cleaned AIS historical data;

[0058] The k-means algorithm is used to cluster the cleaned AIS historical data, and the low-speed AIS historical data is eliminated to obtain the filtered AIS historical data;

[0059] The filtered AIS historical data are subjected to linear interpolation processing to obtain the preprocessed AIS historical data.

[0060] Among them, geographic coordinates use longitude and latitude to describe the location of a point on the earth, and the unit is usually degrees.

[0061] Among them, Mercator projection coordinates refer to the coordinates obtained by projecting the longitude and latitude coordinates on the earth's surface onto a plane. Mercator projection coordinates are in meters and have the property of equidistant distance, that is, in the projection coordinate system, the corresponding distances of equidistant line segments on the earth's surface are also equal.

[0062] Optionally, the calculation formula for converting the geographic coordinates of AIS historical data into Mercator projection coordinates is as follows:

[0063]

[0064] Where, (lo,la) is the geographic coordinates of AIS historical data; (x,y) is the Mercator projection coordinates; r 0 Indicates the radius of the circle parallel to the standard latitude; la 0 represents the standard latitude in the Mercator projection; a represents the equatorial radius of the earth ellipsoid, e 1 is the first eccentricity of the earth ellipsoid, and q is the equivalent latitude.

[0065] It can be understood that converting the geographic coordinates of AIS historical data into Mercator projection coordinates can improve data processing efficiency, optimize visualization effects, and increase spatial analysis accuracy.

[0066] Optionally, data cleaning can be performed based on the Maritime Mobile Service Identify (MMSI), ship navigation heading and ship navigation speed in the converted AIS historical data to exclude AIS data points with abnormal speed and acceleration and too long data interval.

[0067] Among them, the k-means algorithm can divide a set of data points into multiple clusters. The similarity of data points in the same cluster is high, and the similarity of data points between different clusters is low.

[0068] It can be understood that the k-means algorithm is used to cluster the cleaned AIS historical data and eliminate the low-speed AIS historical data, thereby reducing the impact of the AIS data of docked ships on density statistics.

[0069] Optionally, the filtered AIS historical data may be sorted in chronological order, and for two adjacent AIS data points, the time interval and distance interval between them may be calculated, and the time interval may be divided into a number of equal parts according to the interpolation interval, each of which is a part of the interpolation interval, such as 0.5 times the grid side length, and for each equally divided time interval, the corresponding distance step may be calculated.

[0070] Optionally, a linear interpolation method may be used to calculate the position of an interpolation point based on the known position, time and distance information of two AIS data points, and the position and time information of the interpolation point may be added to the filtered AIS historical data.

[0071] It can be understood that by performing linear interpolation processing on the filtered AIS historical data, continuous track information can be provided, which helps to generate a more accurate route density image.

[0072] Step 120: Generate a route density image based on the pre-processed AIS historical data.

[0073] Among them, the route density image is an image generated by processing and visualizing the pre-processed AIS historical data, which is used to show the distribution of ship navigation density at sea.

[0074] Optionally, the sea area can be divided into grids of equal size, the preprocessed AIS historical data can be traversed, the number of ships contained in each grid can be counted, the route density of each grid can be calculated based on the number of ships in each grid, the route density of each grid can be visualized, and a route density image can be generated.

[0075] Optionally, in the process of generating the route density image, the boundary range that needs to be filled can be calculated based on the given sea area range, and the sea area range to be analyzed can be expanded to include additional data required for boundary filling.

[0076] For example, taking the areas of 28°N~29°N and 89°W~90°W as an example, it expands to (28-Δ)N~(28+Δ)N in the latitude direction and to (89-Δ)W~(90+Δ)W in the longitude direction.

[0077] Optionally, a Gaussian filter may be used to smooth the preprocessed AIS historical data, and the data range after boundary filling may be adjusted according to actual needs to adapt it to the selected filter variance.

[0078] Figure 2 The present invention provides a flow chart of generating a route density image based on the pre-processed historical data of the automatic ship identification system. Figure 2 As shown, determine the area of ​​interest and divide the time period t 1 and time period t 2 The track data is gridded to obtain t 1 The route density image and t 2 The two route density images are fused to obtain the route density image within time T.

[0079] It should be noted that the pixel value of the route density image is the count value of the AIS reporting point in the pixel area. For a certain relevant area, the route density image has the following linear characteristics:

[0080]

[0081] Among them, Img(t i ) is the time period t i The route density map constructed in i represents the i-th time period. By directly adding the route density maps of different time periods, a full-time route density image with a fixed dimension size can be obtained. One pixel of the route density image represents an area of ​​100m*100m (about 0.001° longitude and latitude).

[0082] It can be understood that based on the pre-processed AIS historical data, a route density image is generated, which can better show the route usage, traffic flow distribution and ship activity characteristics.

[0083] Step 130: extract all main channel areas from the route density image, perform clustering processing on the pixel points in the main channel areas, and obtain multiple channel areas.

[0084] Among them, the main channel area refers to a specific area determined as the main navigation route in shipping. Within the main channel area, ships usually need to abide by certain navigation rules, including restrictions on heading, speed, etc.

[0085] Optionally, the route density image may be preprocessed by denoising, edge detection, image enhancement, etc.

[0086] Optionally, Gaussian filtering can be used to suppress the area where the secondary navigation track is located in the route density image. The filtered route density image is expressed as follows:

[0087] Img 1 =G f (σ)*Img 0

[0088] Among them, Img 1 is the route density image after Gaussian filtering, σ is the G of the filter f Variance, G f (σ) represents the transfer function of the filter, Img 0 is the original route density image.

[0089] Optionally, an image segmentation algorithm (such as threshold-based segmentation, edge detection segmentation, region growing method, etc.) may be used to extract the outline or binary image of the main channel area from the route density image.

[0090] Optionally, based on the idea of ​​constant false alarm rate (CFAR), the main channel area extraction method is as follows:

[0091] R L ={x L :x L ≥T b},P(T b )=α

[0092] Where R L represents the main channel area, x L Img 1 The pixel value in T b is the extraction threshold; P is Img 1 The empirical cumulative distribution function of ; α is the selected significance level.

[0093] Optionally, the intersection area outside the main channel is eliminated by morphological processing and connected domain analysis, and the calculation formula is as follows:

[0094] A(R 0 )≤A 0 OR Ec(R 0 )≤Ec 0

[0095] Among them, R 0 YesR L The connected area in A(R 0 ) and Ec(R 0 ) are respectively the regions R 0 The area and eccentricity of A 0 and Ec 0 is the corresponding threshold constant.

[0096] Optionally, a clustering algorithm can be used to cluster the pixels into multiple channel areas, and the clustered channel areas can be further analyzed and post-processed, such as removing unreasonable areas, merging adjacent areas, filling holes, etc., to obtain more accurate channel area division results.

[0097] Step 140: Acquire multiple target AIS tracks to be identified, cluster and identify the multiple target AIS tracks based on multiple channel areas, and obtain categories of the multiple target AIS tracks.

[0098] Optionally, AIS track data of multiple targets to be identified may be acquired through AIS, and meaningful features such as the movement mode, speed, and heading change of the ship may be extracted from the target AIS track data.

[0099] Optionally, the extracted features can be applied to a clustering algorithm to group the target AIS trajectories according to similarity to obtain multiple clusters, which are further processed and analyzed, for example, to distinguish different target AIS trajectory types based on features such as trajectory shape and speed change.

[0100] Figure 3 The present invention provides a schematic diagram of a process for extracting all main channel areas from a route density image and performing clustering processing on the pixels in the main channel areas. Figure 3 As shown in (a) of FIG, the original route density image is filtered to obtain a filtered route density image, as shown in FIG. Figure 3 As shown in (b) in the figure, the main channel area is extracted based on the filtered route density image, and the following is obtained: Figure 3 The main channel area shown in (c) in FIG. 1 is shown in FIG. 2 ; the intersection area outside the main channel is eliminated, and the result is as follows Figure 3 The main channel area shown in (d) in FIG; routes with similar navigation directions are clustered into the same navigation mode, such as Figure 3 As shown in (e) in the figure, the position is added to the image features, and each navigation mode is clustered to further obtain the spatially isolated channels, such as Figure 3 As shown in (f) in the figure, the similarity of adjacent channel areas is calculated and the areas are merged according to the preset threshold, and the following is obtained: Figure 3 Multiple channel areas shown in (g) and (h).

[0101] In an embodiment of the present invention, by acquiring historical data of an automatic identification system (AIS) of a ship, the AIS historical data is preprocessed, a route density image is generated based on the preprocessed AIS historical data, all main channel areas are extracted from the route density image, the main channel areas are clustered to obtain a plurality of channel areas, and based on the plurality of channel areas, a plurality of target AIS trajectories are clustered and identified to obtain categories of the plurality of target AIS trajectories, and the clustering problem of complex AIS trajectories is converted into an image processing problem, without the need to calculate the similarity between all trajectories, and the local and global features of the trajectories can be effectively considered, and the system has strong adaptability and high efficiency.

[0102] It should be noted that each implementation of the present invention can be freely combined, the order can be changed, or it can be executed separately, and does not need to rely on or depend on a fixed execution order.

[0103] In some embodiments, pixel points in the main channel area are clustered to obtain multiple channel areas, including:

[0104] Extract multiple target pixel points from the main channel area;

[0105] Extract features of multiple target pixels to obtain a feature vector of each target pixel;

[0106] Based on the feature vector of each target pixel, the DBSCAN density-based clustering algorithm with noise is used to cluster each target pixel to obtain multiple channel areas.

[0107] Optionally, each pixel in the main channel area may be traversed to determine whether it is a target pixel point based on features such as pixel value, color, texture, etc.

[0108] The feature vector of each target pixel includes the position, color histogram, texture features, etc. of the target pixel.

[0109] Optionally, the main channel area can be convolved with the Gabor filter to obtain a feature vector set of each target pixel point, and the calculation formula is as follows:

[0110]

[0111]

[0112] H G =[h g (1),...,h(m)]

[0113]

[0114] Among them, H G Represents the feature vector set of each target pixel, h g (i) represents the i-th feature vector of each target pixel, x represents the x-coordinate of each target pixel, y represents the y-coordinate of each target pixel, and is the coordinate after rotation and scale transformation, ψ represents the phase offset, σ represents the variance parameter of the Gaussian envelope function, γ represents the spatial scale aspect ratio, and Img M represents the main channel area, g(x,y|λ,θ,ψ,σ,γ) represents the filter response value of each target pixel, θ i The value of can be Any one of them, k The value of can be any one of [2,4,8].

[0115] Among them, DBSCAN is a density-based clustering algorithm that performs clustering by calculating the neighborhood density of sample points. It is suitable for processing data with noise and outliers. It does not require pre-specifying the number of clusters and is adaptable to channel areas of different densities and shapes.

[0116] It can be understood that by extracting target pixels from the main channel area and performing feature extraction and DBSCAN-based clustering processing, it is helpful to extract key information and segment different channel areas.

[0117] In some embodiments, after obtaining the plurality of channel areas, the method further includes:

[0118] Calculate the similarity between any two adjacent channel areas, and determine whether the similarity between the two adjacent channel areas exceeds a preset threshold;

[0119] When it is determined that the similarity between two adjacent channel areas exceeds a preset threshold, the two adjacent channel areas are merged.

[0120] Optionally, the preset threshold may be determined based on application requirements, historical data, or domain knowledge.

[0121] It can be understood that by calculating the similarity of adjacent channel areas and merging the areas according to a preset threshold, redundant information can be removed, a larger channel area can be extracted, and the efficiency of path planning can be improved.

[0122] In some embodiments, calculating the similarity between any two adjacent channel areas includes:

[0123] Calculate the area distance index, heading similarity and density similarity of two adjacent channel areas;

[0124] Based on the regional distance index, heading similarity and density similarity, the similarity between two adjacent channel areas is obtained.

[0125] The criteria for judging whether two adjacent waterway areas are merged are as follows:

[0126]

[0127] The larger the value of MI is, the greater the similarity between two adjacent channel areas is. i ∈[0,1] represents the normalized index generated by the image features of the channel area, w i is the weight of the corresponding indicator, MI 0 is the merging threshold, MI>MI 0 The two adjacent waterway areas are merged.

[0128] Optionally, the area distance index I 1 The maximum-minimum distance is used to calculate the spatial distance between two adjacent channel areas. The calculation formula is as follows:

[0129]

[0130] I 1=(1+exp(a 1 (D 1 -b 1 ))) -1

[0131] Among them, D 1 Represents the spatial distance between two adjacent channel areas, A 1 and A 2 is the adjacent channel area; x i and j is the spatial coordinate of the pixel; a 1 and b 1 is a calculation parameter.

[0132] Optionally, the heading similarity I 2 The calculation formula is as follows:

[0133]

[0134]

[0135] I 2 =(1+exp(a 2 (D 2 -b 2 ))) -1

[0136] Where θ is the direction of the Gabor filter and m is the dimension of θ; For channel area A k The average Gabor eigenvector of 2 and b 3 is the calculation parameter; is the fuzzy membership vector, and the fuzzy membership function takes the following exponential function form:

[0137]

[0138] Among them, α and β are the shape parameters of the fuzzy membership function.

[0139] Optionally, the density similarity I 3 The calculation formula is as follows:

[0140]

[0141] I 3 =(1+exp(a 3 (D 3 -b 3 ))) -1

[0142] Among them, t i For channel area A iThe average density (grayscale); is the average standard deviation of the grayscale in the channel area; a 3 and b 3 is a calculation parameter.

[0143] It can be understood that by calculating the regional distance index, heading similarity and density similarity of two adjacent channel areas to obtain the similarity of two adjacent channel areas, the accuracy and comprehensiveness of the similarity calculation can be improved, thereby being able to more accurately judge the similarity of two adjacent channel areas.

[0144] In some embodiments, based on multiple channel areas, multiple target AIS tracks are clustered and identified to obtain categories of multiple target AIS tracks, including:

[0145] Extract the main center line of each channel area from each channel area, perform feature extraction on the main center line of each channel area, and obtain a feature direction curve of each channel area;

[0146] Perform feature extraction on each target AIS trajectory to obtain a feature vector of each target AIS trajectory;

[0147] Based on the characteristic vector of each target AIS track and the characteristic direction curve of each channel area, the distance between each target AIS track and the characteristic direction curve of each channel area is calculated;

[0148] Based on the distance between each target AIS track and the characteristic direction curve of each channel area, each target AIS track is clustered and identified to determine the category of each target AIS track.

[0149] Among them, the main centerline of the waterway area refers to a centerline in the waterway area that has a waterway guiding function.

[0150] Optionally, sampling points are selected from the main center line of each channel area, the curvature is calculated for each sampling point, the direction of the curve at each sampling point is calculated, and the curvature and direction information at each sampling point are combined to form a characteristic direction curve for each channel area.

[0151] make is a target AIS track, x i is the sequential time position of the ship, {A i} is the divided channel area, then The feature matrix is ​​expressed as:

[0152]

[0153] Among them, F 1 is the mode feature vector, which is the integer category code of the waterway area; F2 is a quantitative feature vector, reflecting the degree to which the target AIS track belongs to a specific type of channel area, which is a floating point data; k i is the local trajectory mode, +k i Indicates that the angle between the ship's heading and the characteristic direction of the channel is an acute angle, -k i Indicates that the angle between the ship's heading and the characteristic direction of the channel is an obtuse angle; L i Indicates the length of a local trajectory belonging to a certain mode.

[0154] Optionally, when the length of the merged trajectory belonging to the pattern exceeds 70%, the local trajectories with the same pattern are merged.

[0155] Figure 4 This is an example of target ship automatic identification system trajectory coding provided by an embodiment of the present invention. Figure 4 As shown, is the characteristic direction curve of a certain channel area, and are two target AIS tracks, The characteristic matrices of the two local tracks are and The characteristic matrix of the local track is

[0156] In some embodiments, feature extraction is performed on each target AIS trajectory to obtain a feature vector of each target AIS trajectory, including:

[0157] Divide each target AIS track into multiple sub-tracks, extract features from the multiple sub-tracks, and obtain a feature matrix of each target AIS track;

[0158] The characteristic matrix of each target AIS trajectory is matched with the characteristic direction curve of each channel area to obtain the characteristic vector of each target AIS trajectory.

[0159] Optionally, the Smith-Waterman algorithm is used to match the characteristic matrix of each target AIS track with the characteristic direction curve of each channel area. The scoring criteria are as follows:

[0160]

[0161] Among them, a i express The i-th trajectory segment in b j express The jth trajectory segment in Indicates each target AIS track, Represents the characteristic direction curve of each channel area, ai &b j =0 means a i Does not belong to any waterway area, a i &b j ≠0 means a i Belongs to a certain waterway area.

[0162] Based on the above scoring criteria, the characteristic matrix of each target AIS trajectory is matched with the characteristic direction curve of each channel area to obtain the local trajectory segment with the highest matching degree. The characteristic vector of this local trajectory segment is used as the characteristic vector of each target AIS trajectory (denoted as ), will be The characteristic vector of the characteristic direction curve of each matching channel area is recorded as

[0163] The calculation formula for the distance between each target AIS track and the characteristic direction curve of each channel area is as follows:

[0164]

[0165] Among them, y k ,y i ,y j Represents the symbolic function of local matching different conditions, when When k =1; when When i =1; when When j =1; In addition, y k, y i, y j =0; α 1, α 2, α 3 is the weight factor, F l1 Indicates each target AIS track The characteristic matrix, F l0 Characteristic direction curves representing each channel area The characteristic vector of express The feature vector of , k represents the kth local trajectory, express The feature vector of the kth local trajectory of express The feature vector of the kth local trajectory of Respectively represent F l1 ,F l0 , Length, L 1,k express The quantitative feature vector of the kth local trajectory, L 0,k express The quantitative feature vector of the kth local trajectory, L 1,i express The quantitative feature vector of the i-th local trajectory, L 0,i express The quantitative feature vector of the i-th local trajectory.

[0166] Optionally, DL≤Th 0 The target AIS tracks are grouped into one category, where Th 0 is the preset distance threshold.

[0167] Optionally, different types of target AIS trajectories are identified to obtain types of different types of target AIS trajectories.

[0168] It can be understood that by using the characteristic direction curve of the channel area, it is possible to more accurately determine whether the target AIS track matches a specific channel area, avoiding the misjudgment that may be caused by simply classifying based on the position relationship. By calculating the distance between the target AIS track and the characteristic direction curve of the channel area, the degree of fit between the target AIS track and the channel can be quantified, so that the target AIS track can be more accurately classified into the channel area that is most similar to its shape and direction, thereby improving the accuracy of classification.

[0169] The following describes an AIS trajectory clustering device provided by an embodiment of the present invention. The AIS trajectory clustering device described below and the AIS trajectory clustering method described above can correspond to each other.

[0170] Figure 5 The schematic diagram of the structure of the track clustering device of the ship automatic identification system provided by the present invention is as follows: Figure 5 As shown, the device 500 includes:

[0171] The acquisition unit 510 is used to acquire the AIS historical data of the ship automatic identification system, and pre-process the AIS historical data to obtain the pre-processed AIS historical data;

[0172] A generating unit 520, configured to generate a route density image based on the preprocessed AIS historical data;

[0173] A first clustering unit 530 is used to extract all main channel areas from the route density image, and perform clustering processing on the pixel points in the main channel area to obtain multiple channel areas;

[0174] The second clustering unit 540 is used to obtain multiple target AIS tracks to be identified, cluster and identify the multiple target AIS tracks based on multiple channel areas, and obtain categories of the multiple target AIS tracks.

[0175] Optionally, pixel points in the main channel area are clustered to obtain multiple channel areas, including:

[0176] Extract multiple target pixel points from the main channel area;

[0177] Extract features of multiple target pixels to obtain a feature vector of each target pixel;

[0178] Based on the feature vector of each target pixel, the DBSCAN density-based clustering algorithm with noise is used to cluster each target pixel to obtain multiple channel areas.

[0179] Optionally, the AIS trajectory clustering device further includes:

[0180] A calculation unit, used to calculate the similarity between any two adjacent channel areas, and determine whether the similarity between the two adjacent channel areas exceeds a preset threshold;

[0181] The merging unit is used to merge the two adjacent channel areas when it is determined that the similarity between the two adjacent channel areas exceeds a preset threshold.

[0182] Optionally, the similarity between any two adjacent channel areas is calculated, including:

[0183] Calculate the area distance index, heading similarity and density similarity of two adjacent channel areas;

[0184] Based on the regional distance index, heading similarity and density similarity, the similarity between two adjacent channel areas is obtained.

[0185] Optionally, based on multiple channel areas, multiple target AIS tracks are clustered and identified to obtain categories of multiple target AIS tracks, including:

[0186] Extract the main center line of each channel area from each channel area, perform feature extraction on the main center line of each channel area, and obtain a feature direction curve of each channel area;

[0187] Perform feature extraction on each target AIS trajectory to obtain a feature vector of each target AIS trajectory;

[0188] Based on the characteristic vector of each target AIS track and the characteristic direction curve of each channel area, the distance between each target AIS track and the characteristic direction curve of each channel area is calculated;

[0189] Based on the distance between each target AIS track and the characteristic direction curve of each channel area, each target AIS track is clustered and identified to determine the category of each target AIS track.

[0190] Optionally, feature extraction is performed on each target AIS trajectory to obtain a feature vector of each target AIS trajectory, including:

[0191] Divide each target AIS track into multiple sub-tracks, extract features from the multiple sub-tracks, and obtain a feature matrix of each target AIS track;

[0192] The characteristic matrix of each target AIS trajectory is matched with the characteristic direction curve of each channel area to obtain the characteristic vector of each target AIS trajectory.

[0193] Optionally, the AIS historical data is preprocessed to obtain the preprocessed AIS historical data, including:

[0194] The geographical coordinates of the AIS historical data are converted into Mercator projection coordinates to obtain the converted AIS historical data;

[0195] Performing data cleaning on the converted AIS historical data to obtain cleaned AIS historical data;

[0196] The k-means algorithm is used to cluster the cleaned AIS historical data, and the low-speed AIS historical data is eliminated to obtain the filtered AIS historical data;

[0197] The filtered AIS historical data are subjected to linear interpolation processing to obtain the preprocessed AIS historical data.

[0198] It should be noted that the AIS trajectory clustering device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned AIS trajectory clustering method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment will not be specifically described here.

[0199] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the AIS track clustering method, which includes: obtaining the AIS historical data of the automatic identification system of ships, preprocessing the AIS historical data, and obtaining the preprocessed AIS historical data; generating a route density image based on the preprocessed AIS historical data; extracting all the main channel areas from the route density image, clustering the pixels in the main channel area, and obtaining multiple channel areas; obtaining multiple target AIS tracks to be identified, clustering and identifying the multiple target AIS tracks based on the multiple channel areas, and obtaining the categories of the multiple target AIS tracks.

[0200] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0201] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the AIS trajectory clustering method provided by the above-mentioned methods, the method comprising: acquiring AIS historical data of an automatic identification system of a ship, preprocessing the AIS historical data, and obtaining preprocessed AIS historical data; generating a route density image based on the preprocessed AIS historical data; extracting all main channel areas from the route density image, clustering the pixels in the main channel area, and obtaining a plurality of channel areas; acquiring a plurality of target AIS trajectories to be identified, clustering and identifying the plurality of target AIS trajectories based on the plurality of channel areas, and obtaining categories of the plurality of target AIS trajectories.

[0202] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0203] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for clustering AIS trajectories, characterized in that: include: Acquire historical data of an automatic identification system (AIS) of a ship, and preprocess the historical data of the AIS to obtain the preprocessed historical data of the AIS; generating a route density image based on the preprocessed AIS historical data; Extracting all main channel areas from the route density image, and performing clustering processing on pixel points in the main channel areas to obtain multiple channel areas; Acquire multiple target AIS tracks to be identified, cluster and identify the multiple target AIS tracks based on the multiple channel areas, and obtain categories of the multiple target AIS tracks; The clustering and identifying the multiple target AIS tracks based on the multiple channel areas to obtain the categories of the multiple target AIS tracks includes: Extracting the main center line of each channel area from each channel area, performing feature extraction on the main center line of each channel area, and obtaining a feature direction curve of each channel area; Performing feature extraction on each target AIS trajectory to obtain a feature vector of each target AIS trajectory; Based on the characteristic vector of each target AIS track and the characteristic direction curve of each channel area, calculating the distance between each target AIS track and the characteristic direction curve of each channel area; Based on the distance between each target AIS track and the characteristic direction curve of each channel area, clustering and identifying each target AIS track, and determining the category of each target AIS track; The process of determining the characteristic direction curve of each channel area includes: Selecting sampling points from the main center line of each channel area, calculating the curvature of each sampling point, calculating the direction of the curve at each sampling point, and combining the curvature and direction information at each sampling point to form a characteristic direction curve of each channel area; The calculation formula for the distance between each target AIS track and the characteristic direction curve of each channel area is as follows: Among them, y k ,y i ,y j Represents the symbolic function of local matching different conditions, when When k =1; when When i =1; when When j =1; In addition, y k ,y i ,y j =0; α1, α2, α3 are weight factors, F l1 Indicates each target AIS track The characteristic matrix, F l0 Characteristic direction curves representing each channel area The characteristic vector of express The feature vector of , k represents the kth local trajectory, express The feature vector of the kth local trajectory of express The feature vector of the kth local trajectory, L(F l1 ),L(F l0 ), Respectively represent F l1 ,F l0 , Length, L 1,k express The quantitative characteristic vector of the kth local trajectory reflects the degree to which the target AIS trajectory belongs to a specific type of channel area. 0,k express The quantitative feature vector of the kth local trajectory, L 1,i express The quantitative feature vector of the i-th local trajectory, L 0,i express is the quantitative feature vector of the i-th local trajectory, and j represents the j-th trajectory segment.

2. The AIS trajectory clustering method according to claim 1, characterized in that: The pixel points in the main channel area are clustered to obtain a plurality of channel areas, including: Extracting a plurality of target pixel points from the main channel area; Extracting features of the plurality of target pixels to obtain a feature vector of each target pixel; Based on the feature vector of each target pixel point, a density-based clustering algorithm DBSCAN with noise is used to perform clustering processing on each target pixel point to obtain a plurality of channel areas.

3. The AIS trajectory clustering method according to claim 2, characterized in that: After obtaining the multiple channel areas, the method further includes: Calculating the similarity between any two adjacent channel areas, and determining whether the similarity between the two adjacent channel areas exceeds a preset threshold; When it is determined that the similarity between the two adjacent channel areas exceeds the preset threshold, the two adjacent channel areas are merged.

4. The AIS trajectory clustering method according to claim 3, characterized in that: The calculating the similarity of any two adjacent channel areas comprises: Calculating the area distance index, heading similarity and density similarity of the two adjacent channel areas; Based on the area distance index, the heading similarity and the density similarity, the similarity between the two adjacent channel areas is obtained.

5. The AIS trajectory clustering method according to claim 1, characterized in that: The extracting features of each target AIS track to obtain a feature vector of each target AIS track includes: Dividing each target AIS track into a plurality of sub-tracks, performing feature extraction on the plurality of sub-tracks, and obtaining a feature matrix of each target AIS track; The characteristic matrix of each target AIS track is matched with the characteristic direction curve of each channel area to obtain the characteristic vector of each target AIS track.

6. The AIS trajectory clustering method according to any one of claims 1 to 5, characterized in that: The preprocessing of the AIS historical data to obtain the preprocessed AIS historical data includes: Converting the geographic coordinates of the AIS historical data into Mercator projection coordinates to obtain converted AIS historical data; Performing data cleaning on the converted AIS historical data to obtain cleaned AIS historical data; The cleaned AIS historical data are clustered using a k-means algorithm to remove low-speed AIS historical data to obtain filtered AIS historical data; The filtered AIS historical data is subjected to linear interpolation processing to obtain the pre-processed AIS historical data.

7. An AIS trajectory clustering device, the AIS trajectory clustering device is used to execute the AIS trajectory clustering method according to any one of claims 1 to 6, characterized in that: include: An acquisition unit is used to acquire AIS historical data of a ship automatic identification system, and preprocess the AIS historical data to obtain the preprocessed AIS historical data; A generating unit, configured to generate a route density image based on the preprocessed AIS historical data; A first clustering unit is used to extract all main channel areas from the route density image, and perform clustering processing on pixel points in the main channel area to obtain multiple channel areas; The second clustering unit is used to obtain a plurality of target AIS tracks to be identified, and cluster and identify the plurality of target AIS tracks based on the plurality of channel areas to obtain categories of the plurality of target AIS tracks.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the AIS trajectory clustering method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the AIS trajectory clustering method according to any one of claims 1 to 6 is implemented.