Navigation trajectory prediction method, computer storage medium and program product
By using the route data of historical ship route data to match the route data of historical departure ports in the target ship's current departure port, the accurate prediction of the ship's future trajectory is achieved, the problem of low prediction accuracy in the existing technology is solved, and the maritime traffic safety is improved. Reduces fuel consumption costs.
Patent Information
- Application Number
- CN202111369177.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-11-18
AI Technical Summary
The existing technology is difficult to accurately predict the future navigation trajectory of ships, resulting in increased maritime traffic safety hazards and fuel consumption costs.
By obtaining port location data and historical ship route data, determine the same historical departure port as the target ship's current navigation departure port, and use this historical route data for trajectory prediction.
It improves the safety of marine transportation, prevents ships from entering dangerous waters or hitting walls, reduces the fuel consumption cost of marine transportation, and the prediction results are more accurate, in line with the laws of the ship's large circular route.
Smart Images

Figure CN114077926B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a navigation trajectory prediction method, a computer storage medium, and a program product. Background Art
[0002] With the continuous development of shipping, ocean transportation has become one of the important ways to exchange goods internationally, and the total amount of cargo transported by ocean transportation is still increasing. However, the maritime transportation routes are extremely complicated. If traffic accidents occur frequently, it will cause huge economic losses and will cause huge hidden dangers to the safety of people sailing at sea. In order to improve the safety of ocean transportation, prevent ships from entering dangerous waters or hitting walls, and also to reduce the fuel consumption cost of ocean transportation, it is necessary to accurately predict the future navigation dynamics of ships.
[0003] Generally speaking, when predicting the trajectory of a ship, the future course of the ship is usually predicted based on the current trajectory of the ship. However, the sea is vast and sailing on the sea is affected by various factors, which makes the uncertainty of the ship's navigation extremely high.
[0004] In view of this, a technical problem that needs to be urgently solved in the prior art is to provide a solution that can accurately predict the navigation trajectory of a ship. Summary of the invention
[0005] In view of this, an embodiment of the present application provides a navigation trajectory prediction solution to at least partially solve the above-mentioned problem.
[0006] According to a first aspect of an embodiment of the present application, a navigation trajectory prediction method is provided, comprising: acquiring port position data and historical ship route data, wherein the historical ship route data includes historical navigation trajectory points of the ship; determining historical navigation trajectory points matching the port position from the historical ship route data according to the port position data; taking the historical navigation trajectory points matching the port position as endpoints, segmenting the historical ship route data to obtain historical route data marked with historical departure ports and historical destination ports, so as to determine the historical departure port that is the same as the departure port of the current voyage of the target ship, and predicting the navigation trajectory of the target ship according to the historical route data corresponding to the historical departure port.
[0007] According to a second aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the navigation trajectory prediction method as described above is implemented.
[0008] According to a third aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the navigation trajectory prediction method as described above.
[0009] According to the navigation trajectory prediction scheme provided by the embodiment of the present application, the historical navigation trajectory points matching the port position are determined from the historical ship route data in advance according to the port position data; the historical navigation trajectory points matching the port position are used as endpoints to segment the historical ship route data to obtain historical route data marked with historical departure ports and historical destination ports. When predicting the route, the departure port of the current voyage of the target ship can be determined first, and the historical departure port that is the same as the departure port can be determined, and the navigation trajectory of the target ship can be predicted according to the historical route data corresponding to the historical departure port. Since the destination of a ship departing from a port may be several fixed ports, the navigation trajectory of the target ship can be predicted according to the historical route data corresponding to the historical departure port, and the navigation trajectory closest to the current navigation situation of the target ship can be found from the historical route data, and the trajectory prediction is performed, and the trajectory prediction result obtained is more accurate. In addition, when the above trajectory prediction scheme is applied to shipping, the safety of marine transportation can be greatly improved, and ships can be prevented from entering dangerous waters or hitting walls, etc., and a navigation trajectory with a shorter route can be selected when predicting, which reduces the fuel consumption cost of marine transportation. In addition, in this embodiment, the historical route data used for prediction is the actual existing navigation process. Therefore, the trajectory prediction result obtained by the solution provided by this embodiment conforms to the great circle route law of the ship. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0011] Figure 1A A flowchart of a method for predicting a navigation trajectory according to Embodiment 1 of the present application;
[0012] Figure 1B for Figure 1A A schematic diagram of an example scenario in the illustrated embodiment;
[0013] Figure 2A A flowchart of a method for predicting a navigation trajectory provided by an embodiment of the present application;
[0014] Figure 2B for Figure 2A A flowchart of the steps of a trajectory clustering method in the illustrated embodiment;
[0015] Figure 3AA flowchart of a method for predicting a navigation trajectory provided by an embodiment of the present application;
[0016] Figure 3B for Figure 3A A schematic diagram of the principle of a trajectory compression method in the illustrated embodiment;
[0017] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0019] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0020] Figure 1A A schematic flow chart of a navigation trajectory prediction method provided by this embodiment is shown, as shown in the figure, which includes:
[0021] S101. Acquire port location data and historical ship route data, wherein the historical ship route data includes historical navigation track points of the ship.
[0022] In this embodiment, the port location data may be the latitude and longitude data of the port.
[0023] The historical ship route data may specifically be historical AIS data. AIS (Automatic Identification System) is a shipborne broadcast response system, through which a ship can continuously send its identity, position, heading, speed and other data to nearby ships and shore authorities on a VHF public wireless channel. Each data sent may correspond to a historical navigation track point in the historical ship route data.
[0024] Of course, the above is only an example, and other historical ship route data including historical navigation track points are also within the protection scope of this application.
[0025] S102: According to the port location data, determine a historical navigation track point matching the port location from the historical ship route data.
[0026] In this embodiment, based on the port location data, historical navigation track points whose distance from the port location is less than a preset distance can be determined from the historical ship route data, and historical navigation track points matching the port location can be determined therefrom.
[0027] There may be multiple historical route data, and each historical route data may include multiple historical navigation track points corresponding to a ship's voyage. Each historical route data contains at least two historical navigation track points that match the port location, namely the starting point and the end point of the historical route data. If the ship has passed through a port and stayed there during the voyage, the number of historical navigation track points that match the port location in the historical ship route data is more than two.
[0028] S103: Taking the historical navigation track points matching the port positions as endpoints, segmenting the historical ship route data, and obtaining historical route data marked with historical departure ports and historical destination ports.
[0029] In this embodiment, there may be multiple historical ship route data. For each historical ship route data, the historical navigation track points matching the port location can be used as endpoints for segmentation to obtain historical route data marked with historical departure ports and historical destination ports.
[0030] For example, for a historical ship route data, which includes historical navigation track points matching three ports, which respectively correspond to the starting point, end point and intermediate stop point of the historical ship route data, the three historical navigation track points can be used as endpoints to segment the historical ship route data, and obtain two historical route data marked with historical departure ports and historical destination ports. The historical departure port of the first historical route data is the starting port, and the historical destination port is the intermediate stop point. The historical departure port of the first historical route data is the intermediate stop point, and the historical destination port is the terminal port.
[0031] S104: Determine a historical departure port that is the same as the departure port of the current voyage of the target ship, and predict the navigation track of the target ship according to the historical route data corresponding to the historical departure port.
[0032] Generally speaking, when predicting a route, the future navigation dynamics of the ship are mainly predicted based on the current trajectory of the target ship. There are two main methods for route prediction. One is to predict the future course by route fitting based on the current trajectory of the ship; the other is to extract historical route data using historical AIS data and predict the trajectory of the target ship based on the historical route data. The first method only considers the current trajectory of the target ship, ignoring the predictive effect of the historical trajectory on the future course, which is prone to reduced prediction accuracy or instability; the second method generally fits the traffic network on the sea surface based on the extracted historical route data, and obtains the shortest point-to-point path based on the traffic network when predicting the trajectory. However, this method has low prediction accuracy and cannot consider situations such as reefs at sea. In addition, the predicted line is a broken line, which does not conform to the great circle route law of ship navigation.
[0033] The scheme provided in this embodiment, when predicting the route, can first determine the departure port of the current voyage of the target ship, and determine the historical departure port that is the same as the departure port, and predict the navigation track of the target ship according to the historical route data corresponding to the historical departure port. Since the destination of a ship departing from a port may be several fixed ports, therefore, the navigation track of the target ship is predicted according to the historical route data corresponding to the historical departure port, and the navigation track closest to the current navigation situation of the target ship can be found from the historical route data, and the trajectory prediction is performed, and the obtained trajectory prediction result is more accurate. In addition, when the above-mentioned trajectory prediction scheme is applied to shipping, the safety of marine transportation can be greatly improved, and the ship can be prevented from entering dangerous waters or hitting a wall, etc., and the navigation track with a shorter route can be selected when predicting, which reduces the fuel consumption cost of marine transportation. In addition, in this embodiment, the historical route data used for prediction is the real existence of the navigation process, so the trajectory prediction result obtained by the scheme provided in this embodiment conforms to the great circle route law of the ship.
[0034] For example, see Figure 1B , shows a scene schematic diagram of a navigation trajectory prediction method. The filled area in the figure is land, and the circle is the current position of the target ship.
[0035] like Figure 1B As shown in FIG. 1 , by segmenting the historical ship route data according to the historical navigation track points adapted to the ports, multiple historical route data with historical departure ports and historical destination ports can be obtained. The routes corresponding to the historical route data can be as follows: Figure 1B As shown in the thick solid line.
[0036] When predicting the navigation track of the target ship, the departure port of the target ship can be Port A, and the navigation track of the target ship can be predicted based on some historical route data with the historical departure port marked as Port A. The destination of the ship departing from Port A is relatively fixed, so combined with the current position of the target ship, the destination that the target ship may go to can be determined from multiple destination ports, and the route track can be predicted accordingly.
[0037] The solution provided in the embodiments of the present application can be instructed by any electronic device with data processing capabilities, including but not limited to PCs, mobile phones, PDAs, servers, etc.
[0038] Figure 2A A flowchart of a navigation trajectory prediction method provided in an embodiment of the present application is shown in the figure, which includes:
[0039] S201. Acquire port location data and historical ship route data, wherein the historical ship route data includes historical navigation track points of the ship.
[0040] The specific implementation method of this step can refer to the above embodiment and will not be repeated here.
[0041] S202: According to the port location data, determine a plurality of candidate historical navigation track points matching the port location from the historical ship route data.
[0042] In this embodiment, based on the port location data, historical navigation trajectory points in the historical ship route data whose distance from the port is within a preset distance range can be determined as candidate historical navigation trajectory points; in addition, speed screening conditions can also be set, for example, historical navigation trajectory points whose distance from the port is within a preset distance range and whose speed is less than 0.5 knots are selected as candidate navigation trajectory points.
[0043] The historical navigation track points that match the port location include historical port entry points and historical port exit points. The historical port entry point refers to the historical navigation track point corresponding to when the ship enters the port; the historical port exit point refers to the historical navigation track point corresponding to when the ship leaves the port.
[0044] S203: Determine a historical port entry point and a historical port exit point from the multiple candidate historical navigation trajectory points based on a temporal relationship between the multiple candidate historical navigation trajectory points and the navigation speeds corresponding to the multiple candidate historical navigation trajectory points.
[0045] For the historical port entry point, the multiple candidate historical navigation trajectory points can be traversed in a time sequence relationship. If it is determined that the speed corresponding to multiple adjacent candidate historical navigation trajectory points is less than the first preset speed, the historical port entry point is determined from the multiple adjacent candidate historical navigation trajectory points.
[0046] Multiple candidate historical navigation track points can be traversed from front to back according to the time sequence relationship. Since ships generally enter the port first and then leave the port, the speed of the ship generally changes from large to small and then changes from small to large. When traversing the candidate historical navigation track points according to the time sequence relationship, multiple adjacent candidate historical navigation track points with a speed less than the first preset speed are generally traversed first. At this time, it can be indicated that the speed of the ship has basically stopped decreasing, and the historical port entry point can be determined from multiple adjacent candidate historical navigation track points.
[0047] Specifically, the traversal can be performed according to the time sequence until 5 consecutive candidate historical navigation track points with speeds less than 0.3 knots are obtained, and the first candidate historical navigation track point can be selected as the historical port entry point. Of course, since the speed corresponding to 0.3 knots is relatively small, in order to improve the accuracy, it can be determined that among the multiple adjacent 5 candidate historical navigation track points, if there are 3 historical navigation track points with speeds less than 0.3 knots, one of the 5 candidate historical navigation track points will be determined as the historical port entry point.
[0048] For the historical departure point, the multiple candidate historical navigation trajectory points are traversed according to the time sequence relationship. If it is determined that the speed corresponding to multiple adjacent candidate historical navigation trajectory points is less than the second preset speed, then the point located after the multiple adjacent candidate historical navigation trajectory points and greater than the third preset speed is determined as the historical departure point according to the time sequence relationship.
[0049] Since the speed of a ship generally changes from large to small and then from small to large, therefore, when traversing the candidate historical navigation trajectory points according to the time sequence relationship, if it is determined that the speeds corresponding to multiple adjacent candidate historical navigation trajectory points are less than the second preset speed, the ship may not have left the port yet. At this time, the traversal can continue until a historical navigation trajectory point with a speed greater than the third preset speed is determined, and it is determined as the historical departure point.
[0050] For example, traversal can be performed according to the time sequence relationship. If five consecutive candidate historical navigation trajectory points with speeds less than 0.5 knots are obtained, it can be determined that the ship has not yet left the port. At this time, the traversal continues until the first historical navigation trajectory point with a speed greater than 0.5 knots is determined and used as the historical departure point.
[0051] S204, segmenting the historical ship route data with the extracted historical navigation track points as endpoints to obtain historical route data marked with historical departure ports and historical destination ports.
[0052] Specifically, after determining that there are historical port entry points and historical port exit points, the historical navigation track points between the historical port exit point of the previous port and the historical port entry point of the next port can be segmented into a historical route data according to the time sequence relationship.
[0053] In this embodiment, since the ship still sends AI S data when docked at the port, there are a large number of candidate historical navigation track points at the port, and these historical navigation track points cannot be used for trajectory prediction. In this embodiment, by selecting the historical port entry point and the historical port exit point, the historical navigation track points generated when staying at the port can be directly deleted in the subsequent segmentation process, which greatly reduces the number of historical navigation track points and ensures the availability of the remaining historical navigation track points.
[0054] S205: Filter the historical route data according to preset filtering rules to obtain filtered historical route data.
[0055] Optionally, the preset screening rule includes at least one of the following:
[0056] First, delete the historical route data with fewer historical navigation track points than the preset number.
[0057] In this embodiment, if the number of historical navigation track points is small, it means that the route is short and has no reference significance, so it is deleted. Specifically, if the historical route data has been compressed, the historical route data with less than 100 track points can be deleted.
[0058] Second, if there are multiple continuous historical navigation track points in the braking state in the historical route data, and the distance between the multiple continuous historical navigation track points and the historical departure port and / or historical destination port of the historical route data is greater than the preset distance, the historical route data is deleted.
[0059] In this embodiment, if the historical route data contains multiple continuous historical navigation trajectory points in a braking state, it means that the ship is stationary during the navigation process. If the distance between the stationary position and the historical departure port and / or the historical destination port of the historical route data is greater than the preset distance, it means that during the navigation process corresponding to the historical route data, the ship may have docked at a third port due to maintenance or other reasons, and the historical route data is deleted.
[0060] Specifically, if the historical route data has been compressed, the number of multiple continuous historical navigation track points in the braking state in the historical route data is greater than 10. In addition, the preset distance greater than the distance between the static position and the historical departure port and / or the historical destination port of the historical route data may be 111.2 km.
[0061] Third, if the difference between the predicted sailing time and the actual sailing time corresponding to the historical route data is greater than a preset difference, the historical route data is deleted.
[0062] In this embodiment, the predicted sailing time t1 can be obtained by calculating the sailing distance and the average sailing speed.
[0063] Since ships generally sail at a constant speed when sailing on the sea, if the difference between the predicted sailing time t1 and the actual sailing time t2 is greater than the preset difference, it means that the ship has experienced a large speed change during the sailing of the historical route data. The ship may be stationary due to special reasons, adjust the route beyond expectations, or dock at a third port, etc., and the historical route data will be deleted.
[0064] In addition, different preset differences may be used for short-distance voyages and long-distance voyages. The preset difference corresponding to a short-distance voyage may be smaller than the preset difference corresponding to a long-distance voyage. Specifically, if the actual voyage time t2 is less than 14 days, the historical route data is judged to correspond to a short-distance voyage, and the corresponding preset difference is 0.1, that is, |t1-t2|<0.1*t2; if the actual voyage time is greater than or equal to 14 days, the historical route data is judged to correspond to a long-distance voyage, and the corresponding preset difference is 0.5, that is, |t1-t2|<0.5*t2.
[0065] Fourth, if there are adjacent historical navigation track points in the historical route data whose distance is greater than the preset distance, the historical route data will be deleted.
[0066] In this embodiment, if there are adjacent historical navigation track points whose distance is greater than a preset distance in the historical route data, it means that too many historical navigation track points are missing in the historical route data, and the historical route data is deleted.
[0067] S206: performing trajectory compression on the historical route data, and performing trajectory clustering on the compressed historical route data to obtain a clustered trajectory marked with a historical departure port and a historical destination port.
[0068] In this step, the specific method of trajectory compression can refer to the relevant technology, as long as the trajectory feature points in the historical route data can be effectively extracted, which will not be repeated here. The trajectory feature points are historical navigation trajectory points that can characterize the route changes in the historical route data.
[0069] In this step, the method of performing trajectory clustering can refer to relevant technologies, as long as multiple historical route data can be clustered according to the trajectory.
[0070] For example, the method of performing trajectory clustering may include:
[0071] First, the entire route corresponding to the historical route data is clustered by defining the trajectory similarity function of the entire route, calculating the similarity between each pair of historical route data, and then clustering them according to the calculated similarity.
[0072] Second, the historical route data is segmented to obtain several trajectory segments. By defining a trajectory segment similarity calculation function, the similarity of the trajectory segments between different historical route data is calculated, and clustering is performed based on the calculation results.
[0073] After clustering, cluster trajectories with historical departure ports and historical destination ports can be obtained.
[0074] Optionally, in this embodiment, before performing trajectory clustering, the method further includes: traversing the historical navigation trajectory points in the historical route data after trajectory compression, and for the currently traversed historical navigation trajectory point, if there is another historical navigation trajectory point in the historical route data whose distance to the currently traversed historical navigation trajectory point is less than a preset distance and the number of historical navigation trajectory points separated is greater than a preset number, then deleting the historical route data.
[0075] Specifically, if there is another historical navigation track point in the historical route data whose distance from the currently traversed historical navigation track point is less than a preset distance and the number of historical navigation track points between them is greater than a preset number, it means that the ship may be traveling back and forth between the port and another destination, and the historical route data is deleted.
[0076] Specifically, if there is another historical route data whose distance from the currently traversed historical route point is less than a preset distance of 2 km and the number of historical route points between them is greater than a preset number of 10, the historical route data is deleted.
[0077] Optionally, in any embodiment of the present application, see Figure 2B , shows a flow chart of the steps of a trajectory clustering method of the present application, as shown in the figure, which includes:
[0078] S2061. Group multiple historical route data to obtain multiple groups of historical route data, and cluster the multiple groups of historical route data respectively to obtain multiple route cluster groups with cluster centers.
[0079] Specifically, when clustering, it is necessary to calculate the similarity between two of them, and multiple iterations are required, which is very computationally intensive. In particular, for historical route data, it is necessary to calculate the similarity based on spatial changes, which is computationally difficult. Therefore, if a general clustering algorithm is used to cluster historical route data, the required computing resources are extremely large, and the computational complexity can reach O(TN 2 ), where T is the number of iterations and N is the number of historical route data.
[0080] In order to reduce the computing resources required for clustering, in this embodiment, multiple historical route data are grouped to obtain multiple groups of historical route data, and the multiple groups of historical route data are clustered respectively to obtain multiple route clustering groups with cluster centers. In this way, clustering can be performed in parallel for multiple groups, and the required computing resources are small.
[0081] For example, if the historical route data is divided into 10 groups, the amount of calculation can be reduced to O(10*T(N / 10) 2 ), that is, reduced to one tenth of the original. If you need to further reduce computing resources, you can increase the number of groups.
[0082] For specific clustering methods, please refer to related technologies.
[0083] Optionally, in this embodiment, the first similarity data corresponding to the multiple groups of historical route data can be calculated; according to the first similarity data, the multiple groups of historical route data are clustered by affinity propagation to obtain multiple route cluster groups with cluster centers. Therefore, clustering can be performed by the affinity propagation clustering (AP) algorithm. Compared with other clustering algorithms, the affinity propagation clustering algorithm does not need to pre-specify the number of clusters, and can automatically determine the historical route data as the cluster center from the multiple historical route data, which is convenient for subsequent calculations.
[0084] For example, if the historical route data X is divided into multiple groups, K historical route data groups T are obtained. i , i = 1, 2 ... K, for k historical route data sets T i , the first similarity matrix Si corresponding to each group can be calculated respectively, and AP clustering can be performed according to multiple first similarity matrices Si respectively to obtain multiple route clustering groups.
[0085] S2062. Calculate the similarity between multiple route clustering groups based on the historical route data that serves as the cluster center in the route clustering group.
[0086] Specifically, the cluster centers corresponding to multiple route cluster groups can be grouped into a cluster representative set D, and the similarity matrix S corresponding to the cluster representative set D can be calculated. D As the similarity between multiple route clustering groups, the specific method of calculating the similarity can refer to the relevant technology and will not be repeated here.
[0087] S2063. Obtain similarity data corresponding to the plurality of historical route data according to the similarities between the plurality of route clustering groups and the similarities of the historical route data within each of the route clustering groups.
[0088] Optionally, in this embodiment, the first similarity data corresponding to multiple groups of historical route data can be merged to obtain second similarity data corresponding to the historical route data; for the missing similarity in the second similarity data, two historical route data corresponding to the missing similarity are determined; the route clustering groups to which the two historical route data respectively belong are determined, and the similarity between the determined route clustering groups is used as the similarity corresponding to the two historical route data and added to the second similarity data.
[0089] By combining the similarities between the route cluster groups and the first similarity data, the second similarities corresponding to multiple historical route data can be directly obtained without calculation, which greatly reduces the amount of calculation. In addition, there are a large number of identical similarities in the second similarity data, and multiple calculation results can be directly omitted in subsequent calculations, which greatly reduces the required computing resources.
[0090] In addition, multiple first similarity matrices Si can be used to replace the similarity matrix S D The similarity on the main diagonal is calculated, and the number of rows and columns is adaptively changed to obtain the second similarity matrix.
[0091] S2064: Cluster the plurality of historical route data according to the similarity data corresponding to the plurality of historical route data to obtain the clustering trajectory.
[0092] Specifically, the plurality of historical route data are clustered by neighbor propagation according to the second similarity data to obtain a plurality of trajectory groups having cluster centers, and the historical route data serving as the cluster center in each trajectory group is determined as a cluster trajectory.
[0093] The clustering algorithm is described below through a specific implementation method.
[0094] The inputs to the clustering algorithm include:
[0095] K, number of groups;
[0096] X: a collection of historical route data;
[0097] S: Similarity matrix of historical route data, s[i, k] indicates the similarity of historical route data from i to k;
[0098] P: bias parameter, reflecting the bias of each historical route data to become the cluster center;
[0099] scale1: The scaling factor of the bias parameter after the historical route data is grouped, which is usually an empirical value;
[0100] scale2: The scaling factor of the bias parameter when merging the historical route data after grouping, usually an empirical value.
[0101] The clustering algorithm process includes:
[0102] 1) Divide the set X of historical route data into k groups And, and satisfy That is, there is no duplicate historical route data between any two groups.
[0103] 2) For any group, based on the similarity matrix S and the bias parameter P, calculate the similarity matrix Si and the bias parameter Pi corresponding to the group Ti, and scale the bias parameter Pi according to scale1 to obtain the scaled bias coefficient Pi', i = 1, 2...K.
[0104] 3) For any group, AP clustering is performed based on S_i and Pi'. After clustering all groups, the cluster representative set D = ∪AP(Si, Pi'), i = 1, 2...K corresponding to all groups is obtained, and then the similarity matrix S corresponding to the cluster representative set D is calculated D , which is the similarity matrix between route clustering groups.
[0105] 4) Merge the similarity matrix Si corresponding to each group Ti, i = 1, 2...K, and the similarity matrix S corresponding to the cluster representative set D D , get the similarity matrix S corresponding to the set X of historical route data sparse .
[0106] 5) Scale the bias parameter P according to scale2 to obtain the scaled bias parameter P';
[0107] 6) According to the similarity matrix S sparse And the bias parameter P' is used for AP clustering, and the cluster representative set E = AP (S sparse ,P′), for any historical route data Xi in the set X of historical route data, the cluster number corresponding to Xi in E can be determined to obtain the clustering result.
[0108] The inputs to the clustering algorithm include:
[0109] idx: clustering result, idx[j] represents the clustering number of the historical route data Xj∈X.
[0110] S207: predicting the navigation track of the target ship according to the cluster tracks corresponding to the historical departure port that is the same as the departure port of the current navigation of the target ship.
[0111] For the specific method of predicting the navigation trajectory, please refer to the relevant technology and will not be described in detail here.
[0112] The solution provided in this embodiment greatly reduces the amount of historical route data used to predict the navigation trajectory of the target ship through screening and clustering processes.
[0113] Figure 3A A flowchart of a navigation trajectory prediction method provided in an embodiment of the present application is shown in the figure, which includes:
[0114] S301, trajectory outlier detection.
[0115] Track anomaly detection is used to delete abnormal historical route track points in AIS data.
[0116] The amount of AIS data is large and has time series. When performing trajectory anomaly detection on AIS data with time series, the number of detections should be as small as possible and the computing resources consumed by the detection should be as small as possible.
[0117] When performing the detection, you can: 1) perform trajectory outlier detection based on proximity; 2) perform trajectory outlier detection based on probability distribution density; 3) perform trajectory outlier detection method based on clustering.
[0118] 1) Detecting trajectory outliers based on proximity
[0119] When performing the detection, the historical route track points included in the AIS data may be displayed in a two-dimensional or three-dimensional scatter diagram, and points separated from the majority of points may be found based on proximity, and the separated points may be deleted as abnormal points.
[0120] 2) Trajectory outlier detection can be performed based on probability distribution density
[0121] When performing specific detection, the probability density function p corresponding to AIS can be fitted QAR (X1=x1,X2=x2,…,X n =x n ), where X i is the i-th historical route track point (i=1,2,…,n). Combining the probability density function, the expectation E can be calculated, and then the variance of the historical navigation track points in the AIS data can be used to calculate the expected value E. Constructing anomaly boundaries in, is the abnormal coefficient.
[0122] According to the constructed abnormal boundary, the trajectory abnormal points can be detected and deleted.
[0123] 3) Clustering-based trajectory outlier detection method
[0124] The AIS data is clustered by clustering algorithm to obtain multiple clusters composed of historical route trajectory points, and the central coordinates of the clusters are determined. Then, the trajectory abnormal points are screened out and deleted according to the central coordinates and cluster radius of the clusters.
[0125] Specifically, the DBSCAN clustering algorithm can be used for clustering. Compared with other clustering algorithms, the DBSCAN clustering algorithm does not require pre-division of the number of clusters, has a fast clustering speed and can discover spatial clusters of any shape.
[0126] Specifically, the specific outlier detection method when using the DBSCAN clustering algorithm includes:
[0127] A) Input AIS data, radius parameter ε, and neighborhood density threshold Minpts. The AIS data includes multiple historical route trajectory points.
[0128] B) Based on the radius parameter ε and the neighborhood density threshold Minpts, the AIS data is clustered to obtain n clusters, with the centers of each cluster being c1, c2, ..., c n , the maximum distance between clusters is d1, d2...d n .
[0129] C) For any historical route track point p in the AIS data, if D(c i ,p)>d i (i=1,2……n), then p is considered to be an abnormal point in the trajectory, otherwise it is a normal point in the trajectory. i ,p) is the historical route trajectory point p and the center c of its corresponding cluster i The distance between i is the maximum distance of its corresponding cluster.
[0130] S302: Extracting ship route data.
[0131] The ship route data extraction is a process of determining the historical navigation track points that match the port location from the historical ship route data according to the port location data, and using the historical navigation track points that match the port location as endpoints to segment the historical ship route data. The specific implementation method can refer to the above embodiment and will not be repeated here.
[0132] Specifically, for any historical ship route data, let the ship's AIS data sequence be T = {p1, p2...p n}, where p i It is the historical navigation track point in the historical ship route data.
[0133] First, initialize the historical route data set S; then traverse the historical navigation trajectory points in the data sequence T in chronological order until the historical departure point p is found. j , and record the historical departure point p j .
[0134] Then continue to traverse until the historical entry point p is found k . And create a new trajectory sequence s = {p j ,p j+1 …… k}, and add the newly created trajectory sequence s to the pre-established historical route data set S.
[0135] After that, p k+1 The traversal is continued from the new starting point until all historical navigation track points are traversed. After the traversal is completed, the segmented historical route data can be obtained from the pre-established historical route data set S.
[0136] The specific method for determining the historical arrival point and the historical departure point can refer to the above method, which will not be repeated here.
[0137] S303: trajectory compression.
[0138] Trajectory compression is to extract trajectory feature points that can characterize route changes in the historical route data from multiple historical navigation trajectory points included in the historical route data, thereby reducing the number of trajectory points included in the historical route data.
[0139] Specifically, the DP algorithm (Douglas-Peucker algorithm) may be used to perform trajectory compression. Of course, other trajectory methods are also within the protection scope of this application.
[0140] For example, see Figure 3B , showing a schematic diagram of the principle of trajectory compression.
[0141] like Figure 3B As shown, a straight line segment (the dotted line shown in the figure) can be connected between the two endpoints, and the distances between the remaining trajectory points between the two points and the straight line segment are calculated. The point with the largest distance is selected and compared with the distance threshold (the distance threshold is the diameter of the circle in the figure). If the distance between the point and the straight line segment is greater than the distance threshold, the point is determined to be the split point An-p. If the distance between the point and the straight line segment is less than or equal to the distance threshold, the points between the two points connecting the straight line segment are deleted.
[0142] Then, straight line segments can be connected between two adjacent retained points, and the above steps can be repeated to obtain multiple splitting points An-pq, until no new splitting points can be obtained, and finally the multiple points connected by dotted lines in the figure are retained.
[0143] Through the above method, the number of historical navigation track points included in the historical route data can be greatly reduced, thereby reducing the amount of calculation in the subsequent calculation process.
[0144] S304: Trajectory filtering.
[0145] Trajectory filtering is to filter trajectories according to preset filtering rules.
[0146] The preset filtering rules used for filtering include at least one of the following:
[0147] First, delete the historical route data with fewer historical navigation track points than the preset number.
[0148] Second, if there are multiple continuous historical navigation track points in the braking state in the historical route data, and the distance between the multiple continuous historical navigation track points and the historical departure port and / or historical destination port of the historical route data is greater than the preset distance, the historical route data is deleted.
[0149] Third, if the difference between the predicted sailing time and the actual sailing time corresponding to the historical route data is greater than a preset difference, the historical route data is deleted.
[0150] Fourth, if there are adjacent historical navigation track points in the historical route data whose distance is greater than the preset distance, the historical route data will be deleted.
[0151] Fifth, the historical navigation trajectory points in the historical route data after trajectory compression are traversed. For the currently traversed historical navigation trajectory point, if there is another historical navigation trajectory point in the historical route data whose distance to the currently traversed historical navigation trajectory point is less than a preset distance and the number of historical navigation trajectory points between them is greater than a preset number, then the historical route data is deleted.
[0152] The specific screening method can be referred to the above embodiments, which will not be described in detail here.
[0153] S305: Trajectory representation.
[0154] Specifically, after the trajectory is compressed, the compressed trajectory points may be connected to obtain a trajectory curve, and the map may be gridded, and the trajectory curve may be identified by the position or number of the grid through which the trajectory curve passes.
[0155] The specific identification method can be referred to the relevant technology, which will not be described here.
[0156] S306: Trajectory clustering.
[0157] Trajectory clustering is to cluster multiple historical route data into trajectories, thereby abstracting a large amount of historical route data into several trajectories for representation.
[0158] When clustering is performed, the similarity between two trajectories is generally calculated. In this embodiment, the method for calculating the similarity can be:
[0159] For the two different trajectories T1 and T2, they can be represented by grids and recorded as A and B respectively. Then the similarity calculation formula can be: s = |A∩B| / min(A,B), where |A∩B| represents the number of identical grids in A and B, and min(A,B) represents the minimum length of A and B.
[0160] In this embodiment, the AP (Affinity Propagation) clustering algorithm may be specifically used to perform trajectory clustering on the historical route data.
[0161] The basic idea of the AP clustering algorithm is to regard all samples (historical route data) as nodes of the network, and then calculate the cluster center of each sample through the message transmission of each edge in the network. During the clustering process, there are two types of messages transmitted between nodes, namely, responsibility and availability. The AP algorithm continuously updates the responsibility and availability values of each point through an iterative process until m high-quality exemplars (similar to the centroid) are generated, and the remaining data points are assigned to the corresponding clusters.
[0162]
[0163]
[0164] Among them, r(I,k) is the attraction of historical route data r to historical route data k; a(i,k) is the belonging degree of historical route data i to historical route data k; s(i,k) is the similarity between historical route data i and historical route data k.
[0165] Based on the above method, the historical route data serving as the cluster center can be calculated, and the determined historical route data can be used as the cluster trajectory.
[0166] Of course, the above is only an example of a clustering algorithm, and other clustering methods are also within the protection scope of this application.
[0167] S307: trajectory prediction.
[0168] The trajectory prediction is to predict the navigation trajectory of the target ship according to the clustered trajectories corresponding to the historical departure port which is the same as the departure port of the current navigation of the target ship.
[0169] In a feasible method, the historical route data can be used to perform parameter training using the hidden Markov model. The historical route data and are regarded as the explicit observations of the hidden Markov process. The number of hidden states of the hidden Markov model and the parameter update period are set. The latest hidden Markov model parameters are obtained by rolling based on the most recent position observation (such as the departure port of the current voyage) and the BW algorithm. Then, for each sampling moment of collecting the navigation trajectory data of the target ship during the navigation process, the hidden state corresponding to the current observation value (such as the current navigation position) is obtained by using the Viterbi algorithm according to the hidden Markov model parameters. At each sampling moment, the prediction time domain W is set, and based on the hidden state of the ship at the current moment, the position prediction value of the ship in the future time period is obtained, so that the navigation trajectory of the ship in the future time period is rollingly inferred at each sampling moment.
[0170] Reference Figure 4 , shows a schematic diagram of the structure of an electronic device according to the fourth embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.
[0171] like Figure 4 As shown, the electronic device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0172] in:
[0173] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0174] The communication interface 404 is used to communicate with other electronic devices or servers.
[0175] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above-mentioned navigation trajectory prediction method embodiment.
[0176] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0177] The processor 402 may be a processor CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0178] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0179] The program 410 can be specifically used to enable the processor 402 to perform the operations in the above method embodiment. The specific implementation of each step in the program 410 can refer to the corresponding descriptions in the corresponding steps and units in the above navigation trajectory prediction method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above method embodiment, which will not be repeated here.
[0180] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to perform operations corresponding to any navigation trajectory prediction method in the above-mentioned multiple method embodiments.
[0181] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0182] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the navigation trajectory prediction method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the navigation trajectory prediction method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the navigation trajectory prediction method shown herein.
[0183] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0184] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.
Claims
1. A navigation trajectory prediction method, comprising: Acquire port location data and historical ship route data, wherein the historical ship route data includes historical navigation track points of the ship; According to the port location data, determining a historical navigation track point matching the port location from the historical ship route data; Taking the historical navigation track points matching the port position as endpoints, segmenting the historical ship route data, obtaining historical route data marked with historical departure ports and historical destination ports, so as to determine the historical departure port that is the same as the departure port of the current voyage of the target ship; Performing trajectory compression on the historical route data; Clustering the plurality of historical route data according to the similarity data corresponding to the historical route data after compression of the plurality of trajectories, and obtaining a cluster trajectory marked with a historical departure port and a historical destination port; wherein the similarity data corresponding to the plurality of historical route data is obtained based on the similarity between a plurality of route clustering groups having clustering centers, and the similarity of the historical route data within each of the route clustering groups; the plurality of route clustering groups are obtained by grouping the plurality of historical route data and clustering the plurality of groups of historical route data respectively; The navigation track of the target ship is predicted according to the cluster tracks corresponding to the historical departure port which is the same as the departure port of the current navigation of the target ship.
2. The method according to claim 1, wherein: The historical navigation track points include historical port entry points and historical port exit points. The historical navigation track points matching the port location are determined from the historical ship route data according to the port location data, including: According to the port location data, determining a plurality of candidate historical navigation track points matching the port location from the historical ship route data; Based on the temporal relationship between the multiple candidate historical navigation track points and the navigation speeds corresponding to the multiple candidate historical navigation track points, the historical port entry point and the historical port exit point are determined from the multiple candidate historical navigation track points.
3. The method according to claim 2, wherein: The determining of the historical port entry point and the historical port exit point from the plurality of candidate historical navigation track points according to the temporal relationship between the plurality of candidate historical navigation track points and the navigation speeds corresponding to the plurality of candidate historical navigation track points comprises: Traversing the plurality of candidate historical navigation track points in a time-sequential relationship, if it is determined that the speeds corresponding to the plurality of adjacent candidate historical navigation track points are less than the first preset speed, determining the historical port entry point from the plurality of adjacent candidate historical navigation track points; Alternatively, the multiple candidate historical navigation trajectory points are traversed in a chronological relationship. If it is determined that the speeds corresponding to the multiple adjacent candidate historical navigation trajectory points are less than the second preset speed, then the point located after the multiple adjacent candidate historical navigation trajectory points and greater than the third preset speed is determined as the historical departure point in accordance with the chronological relationship.
4. The method according to claim 1, wherein: Taking the extracted historical navigation track points as endpoints, segmenting the historical ship route data to obtain historical route data marked with historical departure ports and historical destination ports includes: Taking the extracted historical navigation track points as endpoints, segmenting the historical ship route data to obtain historical route data marked with historical departure ports and historical destination ports; The historical route data is filtered according to preset filtering rules to obtain filtered historical route data.
5. The method according to claim 4, wherein: The preset screening rules include at least one of the following: Delete historical route data with fewer historical navigation track points than the preset number; If there are multiple continuous historical navigation track points in the braking state in the historical route data, and the distance between the multiple continuous historical navigation track points and the historical departure port and / or historical destination port of the historical route data is greater than the preset distance, the historical route data is deleted; If the difference between the predicted sailing time and the actual sailing time corresponding to the historical route data is greater than the preset difference, the historical route data will be deleted; If there are adjacent historical navigation track points in the historical route data whose distance is greater than the preset distance, the historical route data will be deleted.
6. The method according to claim 1, wherein: After performing trajectory compression on the historical route data, the method further includes: The historical navigation trajectory points in the historical route data after trajectory compression are traversed. For the currently traversed historical navigation trajectory point, if there is another historical navigation trajectory point in the historical route data whose distance to the currently traversed historical navigation trajectory point is less than a preset distance and the number of historical navigation trajectory points between them is greater than a preset number, the historical route data is deleted.
7. The method according to claim 1, wherein: The step of obtaining similarity data corresponding to the plurality of historical route data comprises: Grouping multiple historical route data to obtain multiple groups of historical route data, and clustering the multiple groups of historical route data respectively to obtain multiple route clustering groups with cluster centers; Calculate the similarity between multiple route clustering groups based on the historical route data that serves as the cluster center in the route clustering group; Obtaining similarity data corresponding to the plurality of historical route data according to the similarities between the plurality of route clustering groups and the similarities of the historical route data within each of the route clustering groups; The plurality of historical route data are clustered according to the similarity data corresponding to the plurality of historical route data to obtain the clustering trajectory.
8. The method according to claim 7, wherein: The clustering of the multiple groups of historical route data respectively to obtain multiple route clustering groups with cluster centers includes: Calculate first similarity data corresponding to each of the multiple groups of historical route data; According to the first similarity data, the multiple groups of historical route data are clustered by neighbor propagation respectively to obtain multiple route clustering groups with clustering centers.
9. The method according to claim 8, wherein: The obtaining, according to the similarities between the plurality of route clustering groups and the similarities of the historical route data within each of the route clustering groups, similarity data corresponding to the plurality of historical route data includes: Merging first similarity data corresponding to a plurality of sets of historical route data to obtain second similarity data corresponding to the historical route data; For the missing similarity in the second similarity data, determining two historical route data corresponding to the missing similarity; The route clustering groups to which the two historical route data respectively belong are determined, and the similarities between the determined route clustering groups are used as the similarities corresponding to the two historical route data and added to the second similarity data.
10. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the navigation trajectory prediction method according to any one of claims 1 to 9 is implemented.
11. A computer program product, comprising computer instructions, wherein the computer instructions instruct a computing device to execute operations corresponding to the navigation trajectory prediction method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Prediction technology for ports of call for ships
CN110706518A
Ship track analysis method based on AIS big data
CN112487116A