End point oriented ship trajectory rapid prediction method
By segmenting the ship trajectory and generating prediction segments, and selecting the prediction segment with the highest similarity as the prediction trajectory, the problem of lack of end point orientation and insufficient adaptability in the prior art is solved, and more accurate and flexible ship trajectory prediction is achieved.
Patent Information
- Application Number
- CN202510411899.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-02
AI Technical Summary
The existing ship trajectory prediction methods lack clear end-point orientation awareness, it is difficult to achieve accurate end-point navigation in long distances or complex environments, and they are insufficient in adapting to emergencies.
By obtaining the ship's identification information and navigation trajectory, determining the location of the home port, dividing the navigation trajectory into multiple trajectory segments, using the DBSCAN clustering algorithm to generate the prediction segment, and calculating the similarity between the traveling segment and the prediction segment, selecting the prediction segment with the highest similarity as the prediction trajectory before the ship arrives at the home port.
It significantly reduces the cumulative error caused by path forks or uncertainties, improves the directionality and accuracy of track prediction, can adaptively respond to emergencies, and reduces prediction delays and decision-making lags.
Smart Images

Figure CN119920126A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship trajectory prediction, and in particular to a terminal-oriented ship trajectory rapid prediction method. Background Art
[0002] With the continuous growth of global economic trade and the rapid development of the shipping industry, the density of maritime traffic is increasing, and the risk of collision between ships and between ships and marine facilities has also increased significantly, which has put forward higher requirements for ship navigation safety, shipping efficiency and traffic management. In order to more effectively reduce risks and improve efficiency, accurate prediction of ship trajectories has become one of the important contents of maritime intelligent shipping technology. At present, most of the existing ship trajectory prediction methods are based on the historical trajectory data of the ship or the current real-time position, and use traditional methods such as Kalman filtering, particle filtering, neural networks, recursive neural networks (RNN) or deep learning models to predict the position information of the ship at the next moment. Although this type of prediction method can achieve prediction results to a certain extent, it generally has the following shortcomings: On the one hand, the existing technical methods lack a clear sense of destination orientation, that is, when predicting the ship's trajectory, they only make short-term predictions based on the ship's historical trajectory or current position information, and fail to effectively combine the ship's clear destination or endpoint constraints. As a result, the predicted trajectory deviation is large over long distances or in complex environments, making it difficult to achieve accurate destination-oriented navigation requirements.
[0003] On the other hand, the existing trajectory prediction methods are too dependent on a large amount of historical data and are not adaptable enough to the temporary adjustment of the navigation plan in emergency situations. This means that once an emergency occurs or the ship deviates from the original historical track, the method based on historical trajectory data is difficult to provide real-time and effective prediction solutions, resulting in prediction delays and decision lags, affecting the navigation safety of ships and the efficiency of traffic management.
[0004] Therefore, a terminal-oriented rapid ship trajectory prediction method is proposed to solve the above-mentioned problems. Summary of the invention
[0005] The present invention aims to provide a terminal-oriented rapid prediction method for ship trajectories, so as to solve or improve the above-mentioned technical problems that the existing ship trajectory prediction methods lack clear terminal orientation and are insufficiently adaptable to sudden or dynamic navigation scenarios.
[0006] In view of this, a first aspect of the present invention is to provide a destination-oriented rapid ship trajectory prediction method.
[0007] The first aspect of the present invention provides a terminal-guided rapid prediction method for ship trajectories, comprising the following steps: obtaining identification information of the current ship to be tested, and obtaining the navigation trajectory of the ship to be tested within a certain time period based on the identification information; determining the home port passed by the ship to be tested within the time period based on the change relationship between the coordinates of the trajectory points on the navigation trajectory and the time points; dividing the navigation trajectory into a trajectory segment where the ship to be tested has completed its travel and a travel segment where the ship to be tested is currently located through the position coordinates of the home port, and generating b prediction segments through all the trajectory segments; calculating the similarity between the travel segment and each prediction segment, and converting the prediction segment with the highest similarity into the prediction trajectory of the ship to be tested before it arrives at the home port.
[0008] In any of the above technical solutions, the time period includes the time point at which the ship to be tested is currently located.
[0009] In any of the above technical solutions, the step of determining the home port passed by the ship to be tested within the time period includes: judging whether the time point difference between adjacent trajectory points on the navigation trajectory is greater than a first time threshold; converting the coordinates of the trajectory points whose time point difference is greater than the first time threshold into the position coordinates of the home port.
[0010] In any of the above technical solutions, the trajectory segment is determined by the following steps: setting the home port area with the position coordinates as the center, and clearing the trajectory points located in the home port area; dividing all trajectory points between two home port areas into multiple trajectory segments based on the changing relationship between the trajectory point coordinates and the time points.
[0011] In any of the above technical solutions, the step of generating b prediction segments through all the trajectory segments includes: using the DBSCAN clustering algorithm to process a preset number of trajectory points on the trajectory segments to obtain b clusters; in each cluster, fitting the coordinates of the trajectory points contained in the cluster to generate a prediction segment.
[0012] In any of the above technical solutions, the number of predicted sections located between the two home port areas is at least one.
[0013] In any of the above technical solutions, the step of calculating the similarity between the traveling segment and each predicted segment includes: obtaining a plurality of continuous points to be tested on the traveling segment along the traveling direction of the ship to be tested; respectively calculating the Euclidean distance between each of the points to be tested and the corresponding trajectory point on the predicted segment, and obtaining the similarity between all predicted segments and the traveling segment through the Euclidean distance.
[0014] In any of the above technical solutions, the trajectory points corresponding to the test point on the predicted segment are obtained by the following steps: along the change order of the time points corresponding to the test point, one of the test points is used as a reference point; the trajectory point with the minimum Euclidean distance between the reference point and the predicted segment is obtained; and the trajectory points corresponding to the test point are obtained in sequence on the predicted segment according to the change order of the time points corresponding to the test point.
[0015] In any of the above technical solutions, the step of converting the predicted segment with the highest similarity into the predicted trajectory before the ship to be tested arrives at the home port includes: considering the position coordinates of the ship to be tested that is to arrive at the home port, obtaining the deviation value between the predicted segment with the highest similarity and the travel segment, and converting the predicted segment with the highest similarity into the predicted trajectory through the deviation value.
[0016] In any of the above technical solutions, before outputting the predicted trajectory, it is determined whether the similarity corresponding to the predicted trajectory is qualified; if qualified, the predicted trajectory with the highest similarity is output; if unqualified, all predicted segments are cleared, the time period is adjusted and the similarity is recalculated.
[0017] Compared with the prior art, the present invention has the following beneficial effects: The overall navigation trajectory is divided by the coordinates of the home port, so that the route is always inferred around the goal of reaching the home port during prediction, and no longer only focuses on the short-term prediction of the next moment; in long distances or complex sea areas, using the home port as the end point constraint can significantly reduce the cumulative error caused by path bifurcation or uncertain factors, ensuring that the track prediction is more directional and accurate.
[0018] First, the ship's historical trajectory is divided into several completed segments and the current segment according to the home port stop points, and then clustering or fitting methods are used to generate multiple optional prediction segments and evaluate the similarity, so that the most consistent prediction path can be directly selected at the current moment of the ship; it can adaptively respond to emergencies such as sudden changes in the ship's sailing plan and deviation from the existing route, and perform real-time matching between the new trajectory and multiple historical prediction segments, greatly reducing prediction delays and decision lags.
[0019] Additional aspects and advantages of embodiments according to the present invention will become apparent in the following description or may be learned through practice of embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 is a flow chart of the method steps of the present invention; Figure 2 It is a specific solution flow chart of the present invention; Figure 3 This is a structural diagram of the improved Euclidean distance similarity matching algorithm of the present invention; Figure 4 The ship historical track distribution map of the present invention; Figure 5 This is a diagram of the ship's future trajectory prediction result of the present invention; Figure 6 The figure is a schematic diagram of the structure of an electronic device of the present invention. DETAILED DESCRIPTION
[0021] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0022] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0023] See also Figure 1-Figure 6 , the following describes a terminal-guided ship trajectory rapid prediction method according to some embodiments of the present invention.
[0024] The first aspect of the present invention provides a method for rapid prediction of a ship trajectory with terminal orientation. In some embodiments of the present invention, Figure 1-Figure 5 As shown, the method comprises the following steps: S101, obtaining identification information of the current ship to be tested, the identification information including the MSSI ship number of the ship to be tested or the volume and performance parameters related to the hull, and obtaining the navigation track of the ship to be tested within a certain time period in the database according to the identification information.
[0025] Here, the system usually stores or receives multiple forms of ship identification information, the most commonly used of which is the ship MMSI (Maritime Mobile Service Identity), which is the ship mobile service identification code specified by the International Maritime Organization (IMO). Each ship carries this unique identification in the AIS (Automatic Identification System) data. In addition to MMSI, in order to meet the identification needs of target ships in different scenarios, the system may also use ship volume parameters (such as displacement, total length, width, depth, etc.), as well as other characteristics related to ship performance (such as main engine power, maximum speed, fuel consumption characteristics, etc.). This information can assist in determining the possible routes, navigable areas, and driving strategies of ships in some advanced application scenarios. When the user or system issues an instruction to predict the trajectory of a ship, the above identification information (MMSI or other performance characteristics) will be used as input, allowing the system to accurately locate the ship object to be analyzed in subsequent steps. Make a selection based on specific application needs. Historical data from the past week, month, or year may be required, or it may be filtered based on the entry and exit periods of a specific sea area. For example, in some typical prediction scenarios, if the system needs to analyze the ship's navigation pattern in the past three months to estimate its navigation route in the next stage (for example, one week or ten days later), it will extract the historical AIS records of the past three months; or in an emergency, if you only care about the track changes in the past 24 hours, you only need to retrieve the data of the past 24 hours. After receiving the time period query condition, the database will return all AIS information corresponding to the target ship within the time period, usually including: latitude and longitude position (Latitude / Longitude), timestamp (Time Stamp), speed (Speed Over Ground), course (Course Over Ground), ship status (such as underway, anchored, out of control, etc.), etc.
[0026] As can be seen from the above, after S101 is executed, a set of track data of the target ship within the set time period can be obtained. The data set is often saved in the memory or cache in the form of a data frame (DataFrame), array or point sequence for use in subsequent steps (such as trajectory clustering, trajectory fitting, end point prediction, etc.).
[0027] In any of the above embodiments, the time period includes the time point at which the ship to be tested is currently located, and the acquired navigation track includes not only the historical track of the current ship to be tested but also the current navigation track connected to the historical track.
[0028] In this embodiment, a time interval needs to be determined first, and the upper limit of this time interval is usually set to the current moment. If only historical trajectories are selected, the prediction model and subsequent analysis may lack real-time performance; and if only short-term data at the current moment are used, the previous historical operation trajectory information may not be fully utilized. By accurately covering the time period to the current moment, historical data within a longer time range and the latest data of the ship at the moment can be integrated and included in the subsequent trajectory modeling and prediction links.
[0029] When executing the step of obtaining trajectory data, the storage medium (such as AIS database or navigation data set) is searched for the start time ≤ t ≤ the current time. In this way, once the search is completed, a list of records from a certain time in the past to In practical applications, these data may contain hundreds to tens of thousands of AIS records, each of which contains information such as longitude and latitude, timestamp, speed, and heading. Therefore, the obtained trajectory data can not only reflect the previous historical movement patterns, but also show the ship's driving conditions in the last few minutes or even in real time. For example, when If the time period is equal to the current system time (for example, 14:30 on March 19, 2025), and the method is set to the past 72 hours, the database will return all valid track records of the ship from 14:30 on March 16 to 14:30 on March 19. These records not only show the historical movement trajectory of the ship in the previous three days, but also include its latest travel point on March 19.
[0030] Specifically, query the historical trajectory of a specified MMSI ship for a period of time. This solution takes one year as an example and sorts the trajectory by time. The sorted ship trajectory is , the time of the ship track point is Since there are many missing data in AIS track data, it is necessary to interpolate the existing missing tracks before trajectory prediction to ensure the continuity of trajectory data. In view of the irregularity of missing data, this scheme proposes a time-space segmentation smooth trajectory interpolation strategy for interpolation.
[0031] Furthermore, in order to solve the problem of short-term data missing, this solution uses an N-order polynomial smoothing interpolation strategy to interpolate the missing trajectory data, where it is set that when the time interval between two trajectory points exceeds the second preset time threshold, which can be 30 minutes, it is judged that there is data missing. The data interpolation interval is determined according to the average time interval of the trajectory before the data is missing, as shown in the following formula: In the formula, is the sum of the time intervals of the trajectory segments before the data is missing; is the average time interval of the trajectory; m is the number of trajectory points.
[0032] The coordinates of the starting point of the missing data interval are set to , the end point is set to , the time of the interval starting point is set to , the interval end point time is set to , data interpolation trajectory points It is expressed as: The speed at the start of the interval is set to , the speed at the end of the interval is set to , then the N-order polynomial smooth interpolation formula is: Where n represents the nth power; represents the time of the interpolation point.
[0033] S102, according to the changing relationship between the coordinates of the track points on the navigation track and the time points, by judging whether there is a long-term interruption and stay, determine the home port that the ship to be tested passes within the time period.
[0034] Here, step S102 is used to identify the home port that the ship to be tested passes through during the selected time period from the acquired ship navigation trajectory data. Here, the home port usually refers to the main port where the ship is relatively fixed and often docked, and it may also be the registered port of the ship or the base port that often enters and exits. In order to complete this identification, this method will use the temporal and spatial variation relationship of the trajectory points, and observe whether the ship has long-term interruptions or stays in it, so as to infer which major ports the ship has arrived at or docked in the time period. When step S101 has obtained the continuous navigation trajectory of the ship to be tested in a certain time period, these trajectory points are usually arranged into a list recorded in chronological order, and each trajectory point contains information such as timestamp, longitude and latitude coordinates, ship speed, heading, etc. In order to further analyze the home port position that the ship may pass through during this period, S102 will first calculate or check the time interval between each trajectory point from the trajectory data, and whether the ship position has changed significantly within the time interval. If the longitude and latitude coordinates of a ship remain basically unchanged for a long time between certain consecutive track points, or there is no new position data reported during this period, this often means that the ship is in a long-term stationary state of mooring, anchoring or other forms. According to the actual situation of maritime shipping, long-term stationary is usually closely related to the ship's berthing operations at the dock, port maintenance or other similar situations. In the scenario of the present invention, if the ship stays in the same position for a long enough time and the position corresponds to a port area, it is very likely that it can be determined as a stay at the home port or a berthing behavior at a major port.
[0035] As can be seen from the above, the present invention will preload or associate a port coordinate database, which stores information such as the latitude and longitude ranges, administrative names, and port functions of major ports in the world. When it is detected that the ship has stayed for a long time in a certain period of time, step S102 will compare whether the stay position falls within a certain port coordinate range. If the match is successful, this port can be used as a home port or base port where the ship may dock or pass. In addition, in order to maximize the accuracy, the method may set a certain threshold value for the length of stay, such as requiring a stay time of more than 12 hours or a data missing period of more than 24 hours to be judged as a more significant stop, and will not regard a short temporary stop or waiting at sea as a home port behavior.
[0036] In practice, if there is an obvious long-term position repetition or time jump in the AIS data points of the ship to be tested, that is, the adjacent track points span a large interval in time but have the same or almost the same coordinates, the system will regard this track as an intermittent stop record. Because under most navigation conditions, the longitude and latitude of the ship will continue to change slightly or even significantly during the voyage, and the real long-term coordinate invariance usually means that the ship is at berth or anchor. For example, if the trajectory of a bulk carrier is analyzed and it is found that its longitude and latitude from 10:00 on March 10, 2025 to 10:00 on March 12, 2025 (a full 48 hours) are almost fixed in a certain port area, then step S102 will identify the port as a port that it has docked or passed during this period. If the port happens to be the registered port or base port that the ship enters and exits most frequently, it can be marked as the home port.
[0037] It should be emphasized that the purpose of this step S102 is not only pure port identification, but also provides a reference for subsequent trajectory prediction or destination inference: once it is determined that a certain ship has a fixed or high-frequency home port, the method can set the home port as a potential important candidate destination in the subsequent destination-oriented trajectory prediction process, especially when the ship has not made its plan public or its next port is unknown, the home port that has repeatedly appeared in history can become an important basis for inferring its possible destination. At the same time, if it is found that the ship has stayed in the same coordinate area for a long time many times during this period, it means that it has a high frequency of going to and from the port, and the subsequent prediction model can also give priority to this result, so as to better perform terminal path planning or navigation safety assessment.
[0038] Specifically, the steps of determining the home port that the ship to be tested passes through within the time period include: Determine whether the time point difference between track points on adjacent navigation tracks is greater than a first time threshold.
[0039] The coordinates of the trajectory points whose time point difference is greater than the first time threshold are converted into the position coordinates of the home port.
[0040] In view of the above specific description, after obtaining the AIS track of the ship within the specified time period, these tracks are usually arranged in chronological order to form a continuous sequence of track points. Each track point carries a corresponding timestamp (usually with an accuracy of seconds or minutes), longitude and latitude coordinates (Lon / Lat) and other auxiliary information (such as speed, heading, etc.). In order to determine whether the ship has been interrupted or anchored for a long time, it is necessary to first extract the timestamps of adjacent points in the track point sequence and calculate the difference between the two timestamps.
[0041] As can be seen from the above, after determining the time difference, the latitude and longitude coordinates corresponding to the two trajectory points will be focused on. Generally speaking, there are two situations: Case A: If the coordinates of the two track points are basically the same or extremely close (usually set within a certain tolerance radius, such as 1 nautical mile), it means that the ship has most likely stayed in the same position; Case B: If the coordinates of the two track points are not exactly the same, but the drift is not large within a relatively close range, it can also be determined that the ship is hovering or waiting in the local waters and still has the characteristics of mooring.
[0042] In order to simplify the processing, the present invention can take the average longitude and latitude of these two points or select the coordinates of one of the points as the potential berthing coordinates. Thereafter, the potential berthing coordinates are further compared with the pre-stored port location database or the home port information database. Since major ports around the world generally have clear longitude and latitude ranges and port identification IDs in the maritime field, the present invention will match whether the potential berthing coordinates fall within the geographical range of the home port based on a port coordinate library. If the coordinates have a high degree of overlap with a port location, or are within the coverage radius set for a port area (for example, 3 nautical miles, 5 nautical miles, etc.), it can be determined that the ship is likely to have docked or passed the port during this time period. If it is further identified that this port is the ship's permanent or registered port, it can be marked as the home port location.
[0043] Specifically, during the ship's voyage, there will be a short period of data loss due to signals and other reasons. When the ship arrives at the port destination, it will stay for a long time, and the AIS will be turned off, resulting in a long period of data loss, which is set to more than three hours. Therefore, in response to the problem of long-term data loss, this solution proposes the concept of home port, sets the home port location, and designates a certain area around the home port as the home port area of the ship. According to the size of the actual port, this solution sets a 10-kilometer range around the home port as the ship's home port area, and sets that when the missing data interval exceeds 2 hours and the trajectory point is within the home port area, the first point beyond the home port range is set as the starting point and end point of the trajectory, and the ship's navigation trajectory is grouped based on this.
[0044] S103, dividing the navigation track into a track segments where the ship to be tested has completed traveling and a traveling segment where the ship to be tested is currently located according to the position coordinates of the home port, and generating b prediction segments through all the track segments.
[0045] Here, in the previous step (such as S102), the long-term stay between adjacent track points has been judged and compared with the port database to identify the home ports that the ship has docked or passed during the selected time period. These home ports can usually be regarded as natural dividing points in the ship's voyage: once the ship arrives at a home port and stays for a long time (in line with the berthing / anchoring judgment), it means the end of the current complete navigation cycle, and a new voyage will start at the subsequent departure. By considering the coordinates of the home port position as an important cutting mark, the method of the present invention can split a continuous and long AIS track into several independent and easier to analyze navigation segments, each segment usually reflecting a journey from departure to arrival or from one port to another.
[0046] When performing endpoint-oriented trajectory prediction, it is often necessary to learn or model the complete navigation behavior characteristics of the ship. By analyzing multiple completed navigation segments, the ship's speed distribution, route preferences or typical routes in different sea areas, different seasons, and different weather conditions can be extracted; and for the current travel segment that has not yet been completed, it is necessary to include it in the real-time prediction category. Therefore, after segmenting the trajectory, the method of the present invention usually maps or converts each trajectory segment into a prediction segment data structure (which can also be understood as a model input unit, training sample or key path segment) that can be processed by the model to further support the next step of rapid trajectory prediction.
[0047] As can be seen from the above, the entire time-series navigation trajectory (data obtained and corrected from steps S101 and S102) is scanned to locate the position of each home port stop point in the time series (i.e., specific index or timestamp). Whenever a home port stop point is detected, the trajectory is truncated from the previous stop point or the starting point of the trajectory to form a complete historical trajectory segment. From the coordinates recorded after the ship leaves the home port again to the next stop point, a new track segment is formed. Finally, the present invention can obtain a historical trajectory segment (i.e., the navigation segment where the ship to be tested has completed the journey or ended at the home port) and a still-in-progress journey segment (i.e., the unfinished voyage from the last departure from the home port to the current moment when it has not yet arrived at the next home port) within this time period. In some document descriptions, the former can be collectively referred to as completed segments, and the latter as ongoing segments.
[0048] Example scenario: Assume that a bulk carrier has 4 departures and 4 arrivals in the past 30 days. The coordinates of the home port are used to identify that it has entered and left the same home port three times (denoted as ), and once again enters and leaves another home port (denoted as After obtaining the complete trajectory, it is observed that this trajectory has the following stop sequence: Home port Departure → Sail for a few days → Home port Dock; home port Departure → Sail for a few days → Home port Dock; home port Departure → Sail for a few days → Home port Restoration; home port Set out again → Sail to the current time (has not arrived at any port yet, still sailing).
[0049] According to the location of the home port, this step divides the trajectory into several segments: Segment 1: From (Departure) to (arrival); second paragraph: from (Departure) to (arrival); third paragraph: from (Departure) to (arrival); the fourth paragraph: from (last departure) to the current position (not yet at any home port, still moving). The above process can obtain a=3 complete historical trajectory segments (they have all ended at a home port) and 1 moving segment corresponding to the current voyage of the ship. These segmented segments are conducive to the subsequent algorithm to analyze the duration, speed characteristics, sailing distance and path trend of each voyage.
[0050] Specifically, the trajectory segments are determined by the following steps: The home port area is set with the position coordinate as the center, and the trajectory points within the home port area are cleared to reduce the interference between the final home port and the predicted trajectory generation.
[0051] According to the changing relationship between the trajectory point coordinates and the time points, such as the way in which the trajectory coordinates change with the time points, all the trajectory points between the two home port areas are divided into multiple trajectory segments.
[0052] With respect to the above specific description, in the previous steps, the method has determined that certain longitude and latitude positions are the coordinates of the home port, or has identified points with a longer stay time at the home port. In actual maritime scenarios, ships usually carry out operations such as loading and unloading, waiting for berthing or maintenance within the home port. This means that most of the movement trajectories of the ship in the home port do not belong to typical navigation trajectories, but are more like in-situ or short-distance movements; these repeated or densely distributed AIS points, if retained in subsequent analysis, may cause interference and noise to route division and model prediction. In the present invention, the geographic coordinates of the home port are used as the center of the circle (or the center of the polygonal area), and a certain radius or polygonal range is set to approximately define the home port area. The specific range size can be set according to actual needs such as the port area, the boundary of the sea area control area or the maximum anchorage radius, such as the commonly used 1 nautical mile, 3 nautical miles or 5 nautical miles. For example, if the coordinates of the home port are identified as ( ), a radius of r = 3 nautical miles can be set around this point to obtain a circular area. All trajectory points falling within this circular area are considered to be points generated when the ship is docked within the home port. Once the geographical boundary of the home port is determined, the method scans the entire trajectory and all trajectory points within this area (satisfying the distance from the center ) will be considered as port stops. Filtering these points can reduce the interference of invalid movements within the home port (such as small shifts within the berth, tugboat operations, peripheral turns, etc.) on subsequent algorithms, and can also make the subsequent trajectory segment division more purely reflect the actual voyage from one port to the next. In the specific implementation, this method removes the points in these home port areas from the trajectory list, or ignores them after giving special marks (such as port points) to ensure that the final navigation segment only contains the true sea navigation part.
[0053] As can be seen from the above, when a ship leaves home port A (or home port area A) until it arrives at another home port B (or home port area B), the track points generated during this period can usually be regarded as a complete sea voyage segment. Therefore, after removing the points in the home port area, home port A and home port B become two clear boundaries in the trajectory sequence, and all AIS points between the two belong to the same voyage segment. In a complete AIS record, a ship may experience multiple round trips from home port A to home port B, and each round trip should be independently separated by the method of the present invention so that subsequent analysis or prediction is more targeted.
[0054] In order to more accurately characterize or study the speed changes, course adjustments or regional characteristics of ships, the present invention divides the large navigation segments into more detailed segments based on the specific change patterns of trajectory points and time points. For example, when the ship has a significant turn, a sudden change in speed gradient, or a course deviation exceeding a specified threshold in the segment, the segment can be divided into two to obtain more detailed voyage segments. This step can also be used in conjunction with a clustering algorithm. If multiple typical clustering centers are found in a trajectory (such as route bifurcations or main route switches), the trajectory segment can also be further subdivided to ensure that the results better fit the actual navigation status.
[0055] In the simplest case, when there are no special complex route changes from one home port to the next, all AIS points will form a continuous and single track segment. If there is a temporary stopover at other ports during a cross-sea voyage (but the berthing time defined by the home port is not reached or it is not a registered home port), or a long wait somewhere at sea, the algorithm may automatically identify whether these berthing / staying points meet the new segmentation conditions, thereby further splitting into multiple track sub-segments between the two home ports. All points in each track segment will carry time sequence (timestamp), location (latitude and longitude), and possible speed, heading and other information, which roughly reflects the distance and events that the ship has gone through from leaving the starting home port to arriving at the next home port.
[0056] Specifically, the step of generating b prediction segments through all trajectory segments includes: The DBSCAN clustering algorithm is used to process a preset number of trajectory points on a trajectory segment to obtain b clusters.
[0057] Within each cluster, the coordinates of the trajectory points contained in the cluster are fitted to generate a predicted segment.
[0058] In view of the above specific description, in the previous steps, the present invention has segmented the ship trajectory (for example, according to the division of the home port location), and it is possible to implement sampling or filtering on some trajectory segments to control the number of trajectory points within a reasonable range (such as not exceeding a preset upper limit of 1000 points) to make the clustering process more efficient. The point set of these trajectory segments can be regarded as a route feature point set, which contains information such as longitude and latitude, timestamp, speed, and heading in each voyage. In order to facilitate spatial clustering, it is usually necessary to retain at least the longitude and latitude coordinates or convert them into plane coordinates (such as projecting them into a map coordinate system) as the main input features of DBSCAN. The segmented trajectory points are gathered together and recorded as an overall point set P0. If a trajectory segments each contain a number of sampling points, the scale of P may range from hundreds to thousands (depending on the actual application and sampling strategy). Set appropriate ε (such as a number of nautical miles or kilometers) and MinPts (such as 5 points, 10 points, etc.), and the specific value needs to be adjusted according to the sparseness of the distribution of track points at sea and the actual route scale. The DBSCAN algorithm is executed to determine the density accessibility of each point in P, and several clusters are gradually formed. If some points are sparsely distributed or too discrete, they are marked as noise points and do not participate in further prediction segment generation.
[0059] As can be seen from the above, each cluster contains a group of trajectory points that are closely adjacent to each other in geographic space or present similar trends. However, due to the possible presence of noise, uneven sampling and curved turns in AIS data, directly using these discrete points is not convenient for subsequent unified judgment or prediction of the trajectory. In order to simplify the calculation when predicting the end point or planning the path, the present invention further uses a fitting or curve model to represent the point set in each cluster. In this way, a function or a multi-segment piecewise function can be used to describe the typical trend corresponding to the cluster, which is convenient for interpolation or extended prediction when necessary. Common fitting methods include polynomial fitting, spline interpolation, piecewise straight line fitting or nonlinear regression based on neural networks. The present invention does not limit the specific fitting method, which can be flexibly selected according to the target accuracy, algorithm complexity and track shape. For relatively flat or nearly straight routes, piecewise linear fitting can be used; if it is smoother or there are significant turns, polynomial or spline curves can be used. In practical applications, the time dimension can also be taken into consideration to construct a two-dimensional function of longitude and latitude over time so that the influence of ship speed or sailing time can be reflected in the prediction.
[0060] Specifically, the DBSCAN clustering algorithm is used for clustering. However, since the AIS track data points are dense after filling the missing values, the clustering will be very slow. Therefore, in order to improve the speed of track clustering, this scheme proposes a fast clustering method, that is, to take points according to the average distribution of track points. When the track points of the ship do not exceed 1000, all track points are directly clustered; when the track points exceed 1000, the track point interval is a multiple of 1000 of all track points. Points are taken evenly in an equal interval manner, which can achieve fast and accurate track clustering. The public is shown as follows: Where i is the total number of points to be clustered, and j is the number of trajectory points after interpolation.
[0061] Specifically, the linear interpolation method is used for curve fitting first, and the last group of ship trajectories departing from the home port is used as the trajectory to be measured according to the ship trajectories grouping basis. The number of points for curve interpolation is determined by the following formula: In the formula, The number of points for the curve interpolation; is the number of points in a cluster formed after clustering; is the number of points of the trajectory to be measured.
[0062] In any of the above embodiments, the number of prediction segments located between the two home port areas is at least one. Since a ship traveling in an open sea will form multiple driving trajectories between two clear home ports, the number of candidate prediction segments for prediction should also be at least one.
[0063] In this embodiment, in the most basic case, even if the ship strictly adheres to the fixed route and sails along a common route from Port A to Port B, a track data segment that can be analyzed, extracted and predicted will be formed. If the ship deviates slightly due to avoidance, changing anchorages, sea conditions, etc., an actual track will still be generated, but the curve shape or direction is different, so it can also be regarded as a candidate for a prediction segment. For this reason, every time a ship leaves a home port area, at least one travel trajectory segment will be generated, and accordingly at least one alternative prediction segment can be formed in subsequent predictions.
[0064] In open waters, ships face an extremely variable environment, including wind and waves, tides, prohibited passages, navigation congestion and other dynamic factors. Even if the target home port is the same, ships may choose to detour to distant waters due to bad weather, or switch to temporary safe waterways due to traffic density, thus showing different route distributions on AIS data. If the number of predicted sections between two home ports is forcibly set to only one, the opportunity for ships to flexibly change routes in complex waters may be underestimated, thereby affecting the judgment of alternative routes during the forecast.
[0065] Furthermore, the curve is segmented according to the interpolation points, and the slope of each segment is calculated respectively. The slope calculation formula is as follows: In the formula, Represents the slope of a line segment; Indicates the starting coordinates of the line segment from left to right. Indicates the coordinates of the end point of the line segment.
[0066] Compare the slopes of the first and second sections of the route, that is, the slope of the first section The slope of the second segment Multiplication, second paragraph With the third paragraph Multiply, and so on, when the slope multiplied is less than zero, it is judged that the curve has an inflection point. The formula is as follows: In the formula, is the product of the slopes of the line segments; is the slope of the i-th segment.
[0067] When an inflection point appears, the cubic interpolation method is used to interpolate the two line segments separately, and the number of interpolation points is 10. This method makes the fitting curve smoother and more accurate. Using a small number of interpolation points can obtain a curve with higher precision.
[0068] S104, calculating the similarity between the traveling segment and each predicted segment, and converting the predicted segment with the highest similarity into a predicted trajectory before the ship to be tested arrives at the home port.
[0069] Here, after completing the similarity calculation for all prediction segments, the method of the present invention will select the largest one as the optimal matching result. If there are multiple prediction segments with similar similarities, 2 to 3 can also be retained within a certain threshold as candidate routes for further confirmation or real-time tracking. The reason for making such a judgment is that the higher the similarity, the more consistent the coordinate distribution and heading changes of the current ship are with the historical prediction segment, which means that its subsequent driving trend is very likely to continue or approach this known pattern. Once the optimal prediction segment is mapped to the actual situation of the current ship, a predicted route extending from the current time or coordinate forward to the home port area is obtained. At the same time, this method usually also calculates the estimated time of arrival (ETA, Estimated Time of Arrival), sailing distance and possible speed curves to provide core data for smart shipping or maritime department scheduling.
[0070] As can be seen from the above, the predicted segment closest to the current actual navigation status is mapped as the key route that the ship is about to travel, and then the complete predicted trajectory of the ship from the current moment to the home port is derived. This method makes full use of the multiple historical typical routes extracted in the previous clustering and fitting stages, and compares the real-time position and motion characteristics of the ship, so as to achieve fast, accurate and flexible terminal-oriented navigation prediction in complex sea areas and dynamic environments, providing important technical support and practical value for the fields of intelligent shipping, autonomous driving and maritime traffic management.
[0071] Specifically, the steps of calculating the similarity between the traveling segment and each predicted segment include: Acquire multiple continuous points to be measured on the traveling section along the traveling direction of the ship to be measured.
[0072] The Euclidean distance between each point to be tested and the corresponding trajectory point on the predicted segment is calculated respectively, and the similarity between all predicted segments and the traveled segments is obtained through the Euclidean distance.
[0073] With respect to the above specific description, the points to be measured refer to several AIS coordinates selected by the present invention in the current travel segment (i.e., the navigation path that has not yet been completed) for comparison and reference. Usually, these AIS points carry information such as timestamp, longitude and latitude, speed, and heading. The reason for extracting a series of continuous points in the travel segment is that the amount of information of a single point is often insufficient to determine comprehensive characteristics such as the direction of travel and speed change. The relative position or time series distribution of multiple points can better capture the navigation trend of the ship. Each predicted segment (derived from the clustering and fitting of historical trajectories) can be regarded as an approximately continuous curve, or it may be a discrete coordinate sequence. If a fitting curve is used, interpolation can be performed at the same or similar time / space resolution as the travel segment to obtain the predicted trajectory point corresponding to the time or distance of the travel segment.
[0074] As can be seen from the above, by comparing the coordinate differences between the two, it is possible to intuitively determine which predicted segment best matches the current trajectory, thereby providing a decision basis for selecting the best predicted trajectory in subsequent steps, judging the possible home port of the ship or the estimated time of arrival, etc. The similarity calculation method based on Euclidean distance is simple to operate, highly scalable, and has good real-time performance. It is particularly suitable for scenarios with high marine traffic density and frequent changes in ship headings.
[0075] Specifically, according to the ship navigation trajectory grouping criteria, the last group of ship navigation trajectories departing from the home port is used as the trajectory to be tested. The curves fitted after clustering the trajectory to be tested and the historical navigation trajectory are matched for similarity, and the path curve with the highest similarity is the final predicted route.
[0076] The improved Euclidean distance similarity matching algorithm proposed in this scheme is to compare the trajectory to be tested and the curved path in a point-to-point manner, traverse all points of the curved path trajectory from the first point of the route to be tested, and use the Euclidean distance to calculate the distance between the two points. The calculation formula is as follows.
[0077] After the Euclidean distance calculates the closest point on the curve path, the point is recorded as the first matching point of the curve path, and the distance to the point is recorded as According to this method, the second path point to be tested starts traversing the point after the first matching point on the curve path, and the distance calculation is performed. The point with the closest distance is recorded as the second matching point on the curve path, and the distance to this point is recorded as By analogy, the calculation rules are as follows: Figure 3 As shown, the red points represent the trajectory points to be measured, the blue points represent the fitted curve paths, and the yellow points represent the points where the two lines are closest.
[0078] Specifically, according to the above method, the distance between the route to be measured and the curved path is expressed as the average value of the shortest point-to-point distance between the two lines, and the formula is as follows.
[0079] In the formula, is the average distance; For the Matching points.
[0080] The distances between the several curves fitted after clustering and the paths to be measured are calculated respectively, and the similarity between the curve path and the trajectory to be measured is expressed as follows: In the formula, is the similarity between the curve path and the trajectory to be measured.
[0081] The similarities between several curved paths and the trajectory to be tested are compared, and the curved path with the highest similarity is the final predicted route, and the future destination of the ship's voyage is the end point of the curved path with the highest similarity.
[0082] Specifically, the corresponding trajectory point of the test point on the prediction segment is obtained through the following steps: Along the change sequence of the corresponding time points of the points to be measured, one point to be measured is used as a reference point.
[0083] Get the trajectory point with the minimum Euclidean distance between the reference point and the predicted segment.
[0084] According to the change order of the time points corresponding to the points to be measured, the trajectory points corresponding to the points to be measured are obtained in sequence on the prediction segment.
[0085] In view of the above specific description, one of the test points (usually the first or earliest test point in the sequence) is used as the reference point so that this reference point can be used to determine the starting matching position in the prediction segment. The reference point is needed because the distribution of the test points in the moving segment and the trajectory distribution obtained by fitting or clustering the prediction segment in history are not necessarily aligned in time or distance; initial positioning through a reference point can help quickly narrow the search range on the prediction segment. The prediction segment may be stored as a discrete coordinate sequence or a continuous fitting curve function. If it is a discrete sequence, each trajectory point P i It will also carry its timestamp or spatial identifier in the historical track. If it is in function form, the corresponding coordinate point can be interpolated at any time or distance.
[0086] From the above, we can see that the ship trajectory has temporal continuity and spatial continuity. The point to be measured must be after the reference point. We already know that the reference point corresponds to the predicted segment, so the matching trajectory point of the point to be measured should be found near or after the current matching point. Such a sequential association can ensure that the matching process is consistent with the actual sailing direction.
[0087] Specifically, the steps of converting the predicted segment with the highest similarity into the predicted trajectory of the ship to be tested before arriving at the home port include: Considering the position coordinates of the home port to be reached by the ship to be tested, the deviation value between the predicted segment and the moving segment with the highest similarity is obtained, and the predicted segment with the highest similarity is converted into a predicted trajectory through the deviation value. And the deviation value is the arrival of the ship at the home port as the center of the circle, the moving segment and the corresponding predicted segment are two radii, and the angle between the two radii is solved as the deviation value, and the predicted segment is mapped on the moving segment through the angle through this deviation angle, so as to complete the conversion of the current predicted segment into a predicted trajectory.
[0088] In view of the above specific description, before selecting and correcting the prediction segment, it is necessary to first clarify the target home port of the ship to be tested, that is, the port where the ship will eventually arrive. The home port is usually marked by its geographical coordinates or equivalent projection coordinates. Since the core purpose of the destination-oriented prediction is to quickly generate a route for the ship from the current travel position to the target home port, in the subsequent deviation correction, it is necessary to use the home port position as a reference for angle or coordinate adjustment.
[0089] In order to truly map the predicted segment to the current ship's travel status, it is necessary to compare the differences in geographic space and orientation between the travel segment and the predicted segment. The present invention defines and solves the angle between the two radii by taking the home port location as the center of the circle, thereby obtaining a quantifiable deviation value (deviation angle). The home port is the center of the circle: Assume that the coordinates of the home port are . At the end coordinate of the travel segment The end coordinates of the predicted segment Each can be regarded as A radius that diverges. Through vector operations or geodetic coordinate formulas, the angle between the two radii can be calculated. The angle That is the deviation value, which indicates the rotation difference between the traveling segment and the predicted segment in the route direction or the terminal position when the home port is used as the reference center. , the present invention can uniformly describe the difference in direction and orientation between the traveling segment and the optimal predicted segment, thereby providing a quantitative basis for subsequent mapping and correction. is 0, indicating that the two are completely aligned; if If it is large, it means that significant angle adjustment or curve deformation is required to fit the predicted segment to the current ship's travel status.
[0090] From the above, it can be seen that after the home port position is clear, by quantifying the deviation angle between the predicted segment with the highest similarity and the traveling segment and implementing angle offset mapping, the final predicted trajectory generated by the present invention can fully fit the actual navigation status of the ship. This approach has the following advantages: it can switch between different home port coordinates or different similarity segments to quickly generate a variety of candidate routes; the method of calculating the angle with the home port as the center is intuitive and the calculation cost is not high; regardless of the size of the sea area or whether the shape of the route is curved, this method can correct the route through the idea of angle rotation + splicing to provide a prediction result close to the actual situation.
[0091] Furthermore, the predicted trajectory is obtained by the following formula: In the formula, The predicted trajectory obtained after the final mapping or correction is in the parameter The coordinate point at is a parameterized representation of the optimal prediction segment, which is a typical historical path obtained by clustering, fitting and other methods, satisfying ,exist indicates the starting point of this path. When indicates the end point of this path; The coordinates of the end of the travel segment (or the latest known position of the current ship) serve as a translation reference on the final predicted trajectory. Shifting the mapped curve to the end of the travel segment can achieve seamless splicing of the final predicted trajectory and the current travel segment, ensuring It just fits the current position of the ship. is an exponential smoothing factor, which is used to enlarge or reduce the mapped vector, and can also be regarded as a way to smoothly transition the deviation. , is an adjustable parameter; if There is no additional scaling; if , then the second half ( When it is larger) it will be stretched more; is the angle correction function, throughout The interpolation process realizes the rotation from Smooth transition to ; Rotation matrix, performs two-dimensional plane rotation to align the predicted segment direction with the current sailing direction or home port orientation; Home port coordinates, used for positioning rotation and reference end point position.
[0092] Specifically, the angle correction function is calculated by the following formula: In the formula, when hour, ;when hour, In the middle area, press Smooth transition.
[0093] Specifically, the rotation matrix is the following formula: In the formula, ; Rotate the vector counterclockwise on the two-dimensional plane. Combined with , so that each The corresponding points are corrected at an angle based on the azimuth to fit the directional relationship between the current travel section and the home port.
[0094] In any of the above embodiments, before outputting the predicted trajectory, it is determined whether the similarity corresponding to the predicted trajectory is qualified; whether the similarity is qualified is determined by setting a range value. If it is less than the range value, the current prediction deviation is too large to be used and the length of the collected time period should be increased to increase the prediction accuracy. If it is greater than the range value, the current prediction deviation takes too long and the length of the collected time period should be reduced to speed up the prediction.
[0095] If qualified, the predicted trajectory with the highest similarity is output; If it is unqualified, clear all predicted segments, adjust the time period and recalculate the similarity.
[0096] In this embodiment, in the terminal-guided ship trajectory rapid prediction method of the present invention, in order to improve the accuracy and efficiency of the prediction, it is necessary to determine the similarity before generating the final predicted trajectory, and dynamically adjust the length of the data time period used for prediction according to the determination result; specifically, the present invention measures the degree of consistency between the predicted trajectory and the actual travel segment by setting a similarity range value; first, when the system calculates the similarity between the travel segment and each predicted segment, it will select the predicted segment with the highest similarity and map it into the possible future navigation path of the ship, that is, the predicted trajectory. On this basis, it is necessary to further perform a qualification test on the predicted trajectory with the highest similarity: if the similarity corresponding to the predicted trajectory fails to enter the specified range, it means that the currently collected data time period does not match the actual situation, or the sampling strategy is not ideal, and timely adjustment is required to avoid inaccurate or inefficient problems.
[0097] If the similarity is low, for example, a bulk carrier is sailing in nearshore waters. Since only the historical trajectories of the past 30 minutes are collected in the database, the similarity calculation result is only 0.45 (less than Smin=0.60). At this time, the system determines that the prediction is too rough and the accuracy cannot be guaranteed, so it clears all generated prediction segments and extends the collection time period from 30 minutes to 90 minutes or longer. After the new data volume is more sufficient, the system re-clustering and fitting a more accurate prediction segment, then calculates the similarity and outputs a new optimal prediction result.
[0098] If the similarity is too high, a ro-ro ship departs from the port. The system uses large-scale data from the past three days for clustering prediction, and the similarity obtained is as high as 0.98 (exceeding Smax=0.90). Although the accuracy is very good, the calculation process consumes too much CPU time and has high latency. After detecting this situation, the system decides to shorten the time period to 24 hours, reduce the amount of data, and increase the computing speed within an acceptable range. After that, the clustering and similarity calculations are re-executed. If the new result still falls between Smin and Smax, the balance between real-time and accuracy can be met.
[0099] The present invention provides a terminal-oriented rapid prediction method for ship trajectories. The current mainstream ship trajectory prediction algorithms all predict the next moment's position based on the current position of the ship, while terminal-oriented ship trajectory prediction technologies are very rare. To solve the above problems, this solution proposes a terminal-oriented rapid prediction method for ship trajectories, which can quickly and accurately predict the future terminal direction of the ship's navigation. The prediction results are shown in the figure below. Figure 4 This is a distribution map of ship historical trajectories. The blue route in the figure represents the ship's historical trajectory. Figure 5 This is the result diagram of the ship's future trajectory prediction, where the red line represents the predicted trajectory route, and the end point of the red route is the predicted future destination of the ship's voyage.
[0100] Embodiments of the second aspect of the present invention provide electronic equipment. In some embodiments of the present invention, such as Figure 6 As shown, an electronic device is provided, which includes: electronic devices such as desktop computers, notebooks, handheld computers, and cloud servers. The electronic device 3 may include but is not limited to a processor 301 and a memory 302. Those skilled in the art will understand that Figure 6 The electronic device 3 is merely an example and does not limit the electronic device 3 , and may include more or less components than those shown in the figure, or different components.
[0101] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0102] The memory 302 may be an internal storage unit of the electronic device 3, for example, a hard disk or memory of the electronic device 3. The memory 302 may also be an external storage device of the electronic device 3, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 3. The memory 302 may also include both an internal storage unit of the electronic device 3 and an external storage device. The memory 302 is used to store computer programs and other programs and data required by the electronic device.
[0103] The embodiment of the third aspect of the present invention proposes a computer-readable storage medium. In some embodiments of the present invention, a computer-readable storage medium is provided, and when the computer-readable storage medium is executed by the processor 301, the steps of the above method are implemented. Therefore, the computer-readable storage medium provided by the third aspect of the present invention has all the technical effects of the above steps, which will not be repeated here.
[0104] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0105] Those of ordinary skill in the art will appreciate that the units and algorithm 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 this disclosure.
[0106] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
[0107] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0108] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure 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. 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 disclosure, and should all be included in the protection scope of the present disclosure.
Claims
1. A terminal-oriented rapid ship trajectory prediction method, characterized in that: The steps include: Acquire identification information of the current ship to be tested, and acquire the navigation track of the ship to be tested within a certain time period according to the identification information; Determine the home port that the ship to be tested passes through during the time period according to the change relationship between the coordinates of the track points on the navigation track and the time points; The navigation track is divided into a track segments where the ship to be tested has completed traveling and a travel segment where the ship to be tested is currently located according to the position coordinates of the home port, and b prediction segments are generated through all the track segments; The similarity between the traveling segment and each predicted segment is calculated, and the predicted segment with the highest similarity is converted into a predicted trajectory of the ship to be tested before it arrives at the home port.
2. The method for rapid prediction of ship trajectory according to claim 1, characterized in that: The time period includes the time point at which the ship to be tested is currently located.
3. The method for rapid prediction of ship trajectory according to claim 1, characterized in that: The step of determining the home port that the ship to be tested passes through within the time period includes: Determine whether the time point difference between adjacent track points on the navigation track is greater than a first time threshold; The coordinates of the trajectory points whose time point difference is greater than the first time threshold are converted into the position coordinates of the home port.
4. The method for rapid prediction of ship trajectory according to claim 3, characterized in that: The trajectory segment is determined by the following steps: Setting a home port area with the position coordinates as the center, and clearing the track points located in the home port area; According to the changing relationship between the coordinates of the trajectory point and the time point, all trajectory points between the two home port areas are divided into a plurality of trajectory segments.
5. The method for rapid prediction of ship trajectory according to claim 1, characterized in that: The step of generating b prediction segments through all the trajectory segments comprises: Using the DBSCAN clustering algorithm to process a preset number of trajectory points on the trajectory segments to obtain b clusters; Within each of the clusters, the coordinates of the trajectory points contained in the cluster are fitted to generate a predicted segment.
6. The method for rapid prediction of ship trajectory according to claim 5, characterized in that: The number of predicted sections located between the two home port areas is at least one.
7. The method for rapid prediction of ship trajectory according to claim 6, characterized in that: The step of calculating the similarity between the traveling segment and each predicted segment comprises: Acquiring a plurality of continuous points to be measured on the traveling section along the traveling direction of the ship to be measured; The Euclidean distance between each of the points to be measured and the corresponding trajectory point on the predicted segment is calculated respectively, and the similarity between all the predicted segments and the traveling segment is obtained through the Euclidean distance.
8. The method for rapid prediction of ship trajectory according to claim 7, characterized in that: The corresponding trajectory point of the point to be measured on the predicted segment is obtained by the following steps: Along the change sequence of the time points corresponding to the points to be measured, one of the points to be measured is used as a reference point; Obtaining a trajectory point with a minimum Euclidean distance between the reference point and the predicted segment; The trajectory points corresponding to the points to be measured are sequentially acquired on the prediction segment according to the change order of the time points corresponding to the points to be measured.
9. The method for rapid prediction of ship trajectory according to claim 1, characterized in that: The step of converting the predicted segment with the highest similarity into the predicted trajectory of the ship to be tested before arriving at the home port includes: Considering the position coordinates of the home port to be reached by the ship to be tested, the deviation value between the predicted segment with the highest similarity and the travel segment is obtained, and the predicted segment with the highest similarity is converted into the predicted trajectory through the deviation value.
10. The method for rapid prediction of ship trajectory according to any one of claims 1 to 9, characterized in that: Before outputting the predicted trajectory, determining whether the similarity corresponding to the predicted trajectory is qualified; If qualified, the predicted trajectory with the highest similarity is output; If it is unqualified, all predicted segments are cleared, the time period is adjusted and the similarity is recalculated.
Citation Information
Patent Citations
Ship anomaly detection method based on improved trajectory segment DBSCAN clustering
CN113032502A
Navigation trajectory prediction method, computer storage medium and program product
CN114077926A
Ship route extraction and trajectory classification method based on AIS data
CN114647705A
Ship trajectory anomaly detection method based on AIS data
CN114756637A
Track prediction method of first clustering and then discrimination
CN117093889A