A Fast Prediction Method for End-Point Oriented Ship Trajectories

Through home port coordinate segmentation and cluster fitting technology, the end-point-oriented ship trajectory prediction method is generated, which solves the problem of lack of end-point-oriented and emergency adaptability in the existing technology, and realizes accurate navigation prediction in complex environments.

CN119920126BActive Publication Date: 2025-07-08DAODATIANJI SOFTWARE TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510411899.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-08
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

The existing ship trajectory prediction methods lack clear end-point orientation awareness, making it difficult to achieve accurate end-point navigation in long distances or complex environments, and lack adaptability to emergencies.

Method used

By obtaining the ship's identification information and navigation trajectory, using the home port coordinates to segment the navigation trajectory, using DBSCAN clustering algorithm and fitting technology to generate prediction segments, calculate the similarity, and select the most suitable prediction segment as the trajectory for the ship to arrive at the home port.

Benefits of technology

Reducing the cumulative error caused by path bifurcation and uncertain factors in complex sea areas can achieve adaptive real-time path matching, improve the directionality and accuracy of track prediction, and can cope with sudden changes in ship navigation plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119920126B_ABST
    Figure CN119920126B_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of ship trajectory prediction, and specifically discloses a terminal-oriented rapid prediction method for ship trajectory, comprising: obtaining identification information of a current ship to be tested, and obtaining the navigation trajectory of the ship to be tested within a certain time period according to the identification information; determining the home port passed by the ship to be tested within the time period according to the change relationship between the coordinates of the track points on the navigation trajectory and the time points; dividing the navigation trajectory into a track segment where the ship to be tested has completed the travel and the travel 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; calculating the similarity between the travel segment and each prediction segment, and converting the prediction segment with the highest similarity into the prediction trajectory before the ship to be tested arrives at the home port; the method has the following advantages: matching the trajectory in real time based on the segmented clustering of the home port, accurately realizing the terminal-oriented prediction and quickly responding to sudden changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship trajectory prediction, and in particular, to a fast ship trajectory prediction method with end-point guidance. Background Art

[0002] With the continuous growth of global economic trade and the rapid development of the shipping industry, the density of maritime traffic has been increasing day by day, and the collision risks between ships and between ships and marine facilities have also increased significantly, posing 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. Currently, most existing ship trajectory prediction methods are based on ship historical trajectory data or current real-time positions, and use traditional methods or deep learning models such as Kalman filtering, particle filtering, neural networks, and recurrent neural networks (RNNs) to predict the position information of ships at the next moment. Although such prediction methods can achieve certain prediction effects to a certain extent, they generally have the following deficiencies:

[0003] On the one hand, the existing technical methods lack a clear end-point guidance awareness, that is, when predicting ship trajectories, only short-term predictions are made based on the historical trajectories or current position information of ships, and the clear destination or end-point constraints of ships are not effectively combined. As a result, in long-distance or complex environments, the predicted trajectories deviate greatly, making it difficult to meet the requirements of accurate end-point guided navigation.

[0004] On the other hand, the existing trajectory prediction methods rely too much on a large amount of historical data and lack the ability to adapt to temporarily adjusted navigation plans in case of emergencies. This means that once an emergency occurs or a ship deviates from its original historical track, the method based on historical trajectory data is difficult to provide a real-time and effective prediction scheme, resulting in prediction delays and decision-making lags, affecting the navigation safety of ships and the efficiency of traffic management.

[0005] Therefore, a fast ship trajectory prediction method with end-point guidance is proposed to solve the above-mentioned problems. Summary of the Invention

[0006] The present invention aims to provide a fast ship trajectory prediction method with end-point guidance to solve or improve the problems in the above-mentioned technical problems that the existing ship trajectory prediction methods lack clear end-point guidance and have insufficient adaptability to sudden or dynamic navigation scenarios.

[0007] In view of this, the first aspect of the present invention is to provide a fast ship trajectory prediction method with end-point guidance.

[0008] The first aspect of the present invention provides an end - oriented fast prediction method for ship trajectories, including the following steps: obtaining the identification information of the current ship to be measured, and obtaining the navigation trajectory of the ship to be measured within a certain time period according to the identification information; determining the home port passed by the ship to be measured within the time period according to the change relationship between the trajectory point coordinates and time points on the navigation trajectory; dividing the navigation trajectory into a trajectory segments completed by the ship to be measured and the current moving segment of the ship to be measured through the position coordinates of the home port, and generating b prediction segments through all the trajectory segments; calculating the similarity between the moving segment and each prediction segment, and converting the prediction segment with the highest similarity into the prediction trajectory before the ship to be measured reaches the home port.

[0009] In any of the above - mentioned technical solutions, the time period includes the time point at which the ship to be measured is currently located.

[0010] In any of the above - mentioned technical solutions, the step of determining the home port passed by the ship to be measured 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 trajectory point coordinates with a time point difference greater than the first time threshold into the position coordinates of the home port.

[0011] In any of the above - mentioned technical solutions, the trajectory segments are determined by the following steps: setting a home port area centered on the position coordinates, and clearing the trajectory points located within the home port area; dividing all the trajectory points between two home port areas into multiple trajectory segments according to the change relationship between the trajectory point coordinates and the time points.

[0012] In any of the above - mentioned technical solutions, the step of generating b prediction segments through all the trajectory segments includes: processing the trajectory points within a preset number on a trajectory segments by using the DBSCAN clustering algorithm to obtain b clusters; fitting the trajectory point coordinates included in each cluster to generate a prediction segment.

[0013] In any of the above - mentioned technical solutions, the number of prediction segments between two home port areas is at least one.

[0014] In any of the above - mentioned technical solutions, the step of calculating the similarity between the moving segment and each prediction segment includes: along the moving direction of the ship to be measured, obtaining multiple consecutive points to be measured on the moving segment; respectively calculating the Euclidean distance between each point to be measured and the corresponding trajectory point on the prediction segment, and obtaining the similarity between all prediction segments and the moving segment through the Euclidean distance.

[0015] In any of the above technical solutions, the trajectory point corresponding to the point to be measured on the prediction segment is obtained through the following steps: along the change order of the time points corresponding to the point to be measured, taking one of the points to be measured as a reference point; obtaining the trajectory point with the minimum Euclidean distance on the prediction segment from the reference point; and sequentially obtaining the trajectory points corresponding to the point to be measured on the prediction segment according to the change order of the time points corresponding to the point to be measured.

[0016] In any of the above technical solutions, the step of converting the prediction segment with the highest similarity into the prediction trajectory before the ship to be measured reaches the home port includes: considering the position coordinates of the home port to which the ship to be measured is to reach, obtaining the deviation value between the prediction segment with the highest similarity and the travel segment, and converting the prediction segment with the highest similarity into the prediction trajectory through the deviation value.

[0017] In any of the above technical solutions, before outputting the prediction trajectory, it is judged whether the similarity corresponding to the prediction trajectory is qualified; if it is qualified, the prediction trajectory with the highest similarity is output; if it is unqualified, all prediction segments are cleared, the time period is adjusted and the similarity is recalculated.

[0018] Advantages of the present invention compared with the prior art:

[0019] By segmenting the overall navigation trajectory through the home port coordinates, the route inference is always carried out around the goal of reaching the home port during prediction, rather than only focusing on the short-term prediction of the next moment; in long-distance or complex sea areas, using the end-point constraint of the home port can significantly reduce the cumulative error caused by path bifurcation or uncertain factors, ensuring that the track prediction is more directional and accurate.

[0020] First, the historical trajectory of the ship is divided into several completed travel segments and the current travel segment according to the home port docking points, and then multiple optional prediction segments are generated and the similarity is evaluated by using clustering or fitting methods, so as to directly select the most suitable prediction path at the current moment of the ship; it can adaptively cope with sudden situations such as the ship suddenly changing the navigation plan and deviating from the existing route, and perform real-time matching between the new travel trajectory and multiple historical prediction segments, greatly reducing the prediction delay and decision lag.

[0021] The additional aspects and advantages of the embodiments according to the present invention will become apparent in the following description part, or will be understood through the practice of the embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and / or additional aspects and advantages of the present invention will become apparent and be easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0023] Figure 1 is a flowchart of the method steps of the present invention;

[0024] Figure 2 is the flowchart of the specific solution of the present invention;

[0025] Figure 3 is the structural diagram of the improved Euclidean distance similarity matching algorithm of the present invention;

[0026] Figure 4 is the distribution diagram of the historical tracks of ships of the present invention;

[0027] Figure 5 is the prediction result diagram of the future tracks of ships of the present invention;

[0028] Figure 6 is the structural schematic diagram of an electronic device of the present invention. Specific embodiments

[0029] In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments may be combined with each other.

[0030] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention may be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.

[0031] Please refer to Figures 1-6 , and a terminal-oriented fast ship track prediction method for some embodiments of the present invention will be described below.

[0032] An embodiment of the first aspect of the present invention proposes a terminal-oriented fast ship track prediction method. In some embodiments of the present invention, as Figures 1-5 shown, the method includes the following steps:

[0033] S101. Obtain the identification information of the currently measured ship, where the identification information includes the MSSI ship number of the measured ship or the volume and performance parameters related to the hull, and obtain the navigation track of the measured ship within a certain time period according to the identification information in the database.

[0034] Here, the system usually stores or receives various forms of ship identification information. The most commonly used one is the ship's MMSI (Maritime Mobile Service Identity), which is the ship mobile service identification code stipulated by the International Maritime Organization (IMO). Each ship carries this unique identifier in the AIS (Automatic Identification System) data. In addition to MMSI, to meet the identification requirements of target ships in different scenarios, the system may also use ship volume parameters (such as displacement, overall length, molded breadth, molded depth, etc.), and other characteristics related to ship performance (such as main engine power, maximum speed, fuel consumption characteristics, etc.). These information can assist in judging the possible sailing routes, seaworthy areas, and sailing strategies of the ship in some advanced application scenarios. When a user or the system issues an instruction to predict the trajectory of a certain ship, the above identification information (MMSI or other performance characteristics) will be used as input, enabling this system to accurately locate the ship object to be analyzed in the subsequent steps. The selection is based on specific application requirements. It may require historical data for the most recent week, month, or year, or it may be filtered according to the entry and exit times of a specific sea area. For example, in some typical prediction scenarios, if the system needs to analyze the sailing pattern of the ship in the past three months to estimate its sailing route in the next stage (such as one week or ten days later), it will extract the historical AIS records for the past three months; or in case of an emergency, only concerned about the track changes within the most recent 24 hours, only the data for the most recent 24 hours needs to be retrieved. After receiving the time period query condition, the database will return all AIS information corresponding to the target ship within this time period, usually including: latitude / longitude position, time stamp, speed over ground, course over ground, ship status (such as underway, at anchor, out of control, etc.).

[0035] 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. This data set is often stored in memory or cache in the form of a data frame, array, or point sequence for use in subsequent steps (such as track clustering, track fitting, end point prediction, etc.).

[0036] In any of the above embodiments, the time period includes the time point at which the ship to be measured is currently located. The obtained sailing track not only includes the historical track of the current ship to be measured but also the current sailing track connected to the historical track.

[0037] In this embodiment, it is necessary to first determine a time interval, and the upper limit of this time interval is usually set to the current moment. If only historical trajectories are selected, it may lead to a lack of real-time performance in the prediction model and subsequent analysis; while if only short-term data at the current moment is used, it may not be possible to fully utilize the information of the previous operating historical trajectories. By precisely covering the time period to the current moment, historical data over a long time range and the latest data of the ship at this moment can be integrated and incorporated into the subsequent trajectory modeling and prediction processes.

[0038] When performing the step of obtaining trajectory data, all records satisfying start time ≤ t ≤ current moment will be queried in the storage medium (such as the AIS database or the navigation dataset). In this way, once the retrieval is completed, a complete trajectory from a certain moment in the past to this moment will be returned. In practical applications, these data may contain hundreds to tens of thousands of AIS records, and each record contains information such as longitude, latitude, timestamp, speed, and course. Thus, the obtained trajectory data can not only reflect the previous historical movement patterns but also show the ship's driving conditions in the most recent few minutes and even in real-time. For example, when is equal to the current system time (such as 14:30 on March 19, 2025), and the time period set by the method is 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 trajectories of the ship in the previous three days but also contain its latest driving points on March 19. Specifically, when querying the historical trajectory of a specified MMSI ship for a period of time, taking one year as an example in this solution, the trajectory is sorted according to time, and the sorted ship trajectory is

[0039] , and the time of the ship trajectory point is . Since there are many missing data in the AIS track data, it is necessary to interpolate the existing missing trajectories before performing trajectory prediction to ensure the coherence of the trajectory data. Regarding the irregularity of the missing data, this solution proposes a spatio-temporal segmentation smoothing trajectory interpolation strategy for interpolation. .

[0040] Furthermore, for the problem of short-term data loss, this solution uses an Nth-order polynomial smoothing interpolation strategy to interpolate the missing trajectory data. Among them, it is set that when the time interval between two trajectory points exceeds the second preset time threshold, specifically 30 minutes, it is determined that there is data loss at this place. The data interpolation interval is determined according to the average time interval of the trajectory before the data loss, as shown in the following formula:

[0041]

[0042] In the formula, is the sum of the time intervals of the trajectory segments before data loss; is the average time interval of the trajectory; m is the number of trajectory points.

[0043] The starting point coordinates of the missing data interval are set to and the ending point is set to The time of the starting point of the interval is set to and the time of the ending point of the interval is set to The number of trajectory points of data interpolation is expressed as:

[0044]

[0045] The speed of the starting point of the interval is set to and the speed of the ending point of the interval is set to Then the Nth-order polynomial smoothing interpolation formula is:

[0046]

[0047] In the formula, n represents the nth power; represents the time of the interpolation point.

[0048] S102. According to the change relationship between the trajectory point coordinates and time points on the navigation trajectory, by judging whether there is a long-term interruption and stay, determine the home port passed by the ship to be measured within the time period.

[0049] Here, step S102 is used to identify the home port that the ship to be measured passed through during the selected time period from the obtained ship navigation trajectory data. Here, the home port usually refers to the main port where the ship is relatively fixed and often docks, and it may also be the registration port of the ship or the base port that the ship often enters and exits. To complete this identification, this method will utilize the spatio-temporal variation relationship of the trajectory points and observe whether there are characteristics of long-term interruption or stay of the ship, so as to infer which main ports the ship reached or docked at during this time period. When step S101 has obtained the continuous navigation trajectory of the ship to be measured during a certain time period, these trajectory points are usually arranged in a list recorded in chronological order, and each trajectory point contains information such as timestamp, longitude and latitude coordinates, ship speed, and heading. To further analyze the possible location of the home port that the ship may pass through during this time, S102 will first calculate or check the time interval between each trajectory point from the trajectory data, and whether the ship's position has changed significantly within the time interval. If between some consecutive trajectory points, the longitude and latitude coordinates of the ship remain basically unchanged for a long time, or there is no new position data report during this period, this usually means that the ship is in a state of berthing, anchoring, or other forms of long-term stillness. According to the actual situation of maritime shipping, long-term stillness is usually closely related to the ship's berthing operation at the dock, port maintenance, or other similar situations. In the scenario of the present invention, if the ship stays at the same position for a long enough time and this position corresponds to a port area, it is very likely to be determined as a home port stay or a main port berthing behavior.

[0050] As can be seen from the above, the present invention will pre-load or associate a port coordinate database, which stores information such as the longitude and latitude ranges, administrative names, and port functions of the world's main ports. When it is detected that the ship has a long-term stay during a certain period of time, step S102 will compare whether the stay position falls within the range of a certain port coordinate. If the match is successful, this port can be used as the home port or base port that the ship may dock at or pass through. In addition, in order to maximize the accuracy, this method may set a certain threshold value for the stay duration, such as requiring the stay duration to exceed 12 hours or the data missing period to exceed 24 hours to be determined as a relatively significant berthing, and will not regard a short-term temporary stay or waiting at sea as a home port behavior.

[0051] In practice, if there are obvious long-term position repetitions or time jumps in the AIS data points of the ship to be measured, that is, there is a large interval in time between adjacent track points but the coordinates are the same or almost the same, the system will regard this section of the track as a discontinuous stay record. Because under most navigation conditions, the longitude and latitude of a ship will continuously change slightly or significantly during navigation, and a truly unchanged coordinate for a long time usually means that the ship is in a berth or at anchor. For example, when analyzing the trajectory of a bulk carrier, if it is found that its longitude and latitude are almost fixed within a certain port area from 10:00 on March 10, 2025 to 10:00 on March 12, 2025 (a full 48 hours), then step S102 will identify this port as the port where it has stopped or passed through during this period. If this port happens to be the registered port or base port where the ship most frequently enters and exits, it can be marked as the home port.

[0052] 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 end point inference: Once it is determined that a certain ship has a fixed or frequently visited home port, in the subsequent trajectory prediction process oriented to the end point, the method can set the home port as a potentially important candidate destination. Especially when the ship does not disclose its plan or its next port cannot be known, the home port that has repeatedly appeared in history can become an important basis for inferring its possible end point. At the same time, if it is found that the ship has stayed in the same coordinate area for a long time multiple times during this period, it means that its frequency of traveling to and from this port is relatively high, and the subsequent prediction model can also give priority to this result, so as to better carry out terminal path planning or navigation safety assessment.

[0053] Specifically, the steps to determine the home port passed by the ship to be measured during the time period include:

[0054] Judge whether the time difference between the time points of adjacent track points on the adjacent navigation trajectories is greater than the first time threshold.

[0055] Convert the coordinate of the track point with a time difference greater than the first time threshold into the position coordinate of the home port.

[0056] For 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 a precision of seconds or minutes), longitude and latitude coordinates (Lon / Lat), and other auxiliary information (such as speed, heading, etc.). In order to judge whether the ship has a long-term interruption or berthing, it is necessary to first extract the timestamps of adjacent points in the track point sequence and calculate the difference between these two timestamps.

[0057] As can be seen from the above, after determining the time difference, the longitude and latitude coordinates corresponding to these two track points will be focused on. Generally speaking, there are the following two situations:

[0058] Case A: If the coordinates of two trajectory points are basically the same or extremely close (usually set within a certain tolerance radius, such as 1 nautical mile), it indicates that the ship is most likely staying at the same position all the time.

[0059] Case B: If the coordinates of two trajectory points are not exactly the same, but the drift is not significant within a relatively close range, it can also be determined that the ship is hovering or waiting in a local water area and still has the characteristics of berthing.

[0060] For the sake of simplified 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 a pre-stored port location database or a home port information database. Since the 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 coincide highly with a certain port location or are within the coverage radius set for a certain port area (such as 3 nautical miles, 5 nautical miles, etc.), it can be determined that the ship is very likely to have docked at or passed by this port during this time period. If it is further identified that this port is the ship's resident or registered port, it can be marked as the home port location.

[0061] Specifically, during the ship's voyage, there will be a short-term data loss problem due to reasons such as signals. When the ship arrives at the port destination and stays for a long time with the AIS turned off, there will be a long-term data loss situation, which is set to be more than three hours. Therefore, in response to the long-term data loss problem, this solution proposes the concept of a home port, sets the home port location, and designates a certain area range around the home port as the ship's home port area. According to the actual size of the port, this solution sets a 10-kilometer range around the home port as the ship's home port area, and sets that when the data loss interval exceeds 2 hours and the trajectory points are within the home port area range, the first point beyond the home port range is set as the starting point and the ending point of this section of the trajectory, and the ship's navigation trajectory is grouped based on this.

[0062] S103, divide the navigation trajectory into a trajectory segments completed by the ship to be measured and the current traveling segment of the ship to be measured through the position coordinates of the home port, and generate b prediction segments through all the trajectory segments.

[0063] Here, in the previous step (such as S102), the home port where the ship has docked or passed through during the selected time period has been determined and compared with the port database based on the long stops between adjacent trajectory points. These home ports can generally be regarded as natural demarcation points in the ship's voyage: once the ship arrives at a home port location and stays for a long time (meeting the docking / anchoring judgment), it means the end of the current complete navigation cycle, and a new voyage starts when it departs subsequently. By regarding the home port location coordinates as important cutting marks, the method of the present invention can split a continuous and long AIS trajectory into several independent and more easily analyzable navigation segments, and each segment usually reflects a journey from leaving the port to arriving at the port or from one port to another port.

[0064] When performing end-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, patterns such as the speed distribution, route preference, or typical routes of the ship under different sea areas, different seasons, and different weather conditions can be extracted; for the current ongoing segment that has not been completed, it needs to be included in the scope of real-time prediction. Therefore, after splitting the trajectory, the method of the present invention usually maps or converts each trajectory segment into a prediction segment data structure that can be processed by the model (which can also be understood as a model input unit, training sample, or key path segment) to further support the next fast trajectory prediction.

[0065] As described above, scan the entire time-series navigation trajectory (the data obtained and corrected in steps S101 and S102), and locate the position of each home port stop point in the time series (i.e., the specific index or timestamp). Whenever a home port stop point is detected, truncate the trajectory from the previous stop point or the trajectory start point to form a complete historical trajectory segment. From the coordinates recorded after the ship leaves the home port again until the next stop point, a new track segment is formed. Finally, the present invention can obtain a historical trajectory segments (i.e., the navigation segments that the ship to be measured has completed or ended at the home port) and an ongoing segment (i.e., the unfinished voyage part between leaving the last home port and not arriving at the next home port until the current moment) within this time period. In some document descriptions, the former can be collectively referred to as the completed segments, and the latter as the ongoing segment.

[0066] Example scenario: Suppose a bulk carrier has 4 departure records and 4 arrival records in the past 30 days, and it is identified through the home port coordinates that it has entered and left the same home port three times (denoted as ), and entered and left another home port once (denoted as ). After obtaining the complete trajectory, the following stop sequence is observed for this trajectory: Home port Departure → Sailing for several days → Home port Docking; Home port Departure → Sailing for several days → Home port Docking; Home port Departure → Sailing for several days → Home port Redocking; Home port Redeparture → Sailing to the current moment (has not reached any port yet, still sailing).

[0067] Based on the location of the home port where the ship docks, this step divides the trajectory into several segments: The first segment: from (departure) to (arrival); The second segment: from (departure) to (arrival); The third segment: from (departure) to (arrival); The fourth segment: from (the last departure) to the current ship position (has not reached any home port yet, in transit). The above process yields a = 3 complete historical trajectory segments (all of which end at a home port), and 1 segment corresponding to the current voyage of the ship. These segmented paragraphs facilitate subsequent algorithms to analyze the duration, speed characteristics, sailing distance, and path trends of each segment of the voyage respectively.

[0068] Specifically, the trajectory segments are determined through the following steps:

[0069] Set the home port area centered on the position coordinates, and remove the trajectory points within the home port area to reduce interference in the generation of the final home port and predicted trajectory.

[0070] According to the change relationship between the trajectory point coordinates and the time points, for example, the way the trajectory coordinates change with the time points, all the trajectory points between two home port areas are divided into multiple trajectory segments.

[0071] For the above specific description, in the previous steps, the method has determined certain longitude and latitude positions as home port coordinates, or has identified points with a long 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 area, which means that most of the movement trajectories of the ship within the home port do not belong to typical sailing trajectories, but are more like in-place or short-range movements; these repeated or densely distributed AIS points, if retained in subsequent analysis, may cause interference and noise to the route division and model prediction. In the present invention, a certain radius or polygon range will be set with the geographical coordinates of the home port as the center (or the center of the polygon area) to approximately define the home port area. The specific range size can be set according to actual requirements such as the port area range, 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 identified home port coordinates are ( ), a circular area can be set with a radius r = 3 nautical miles around this point. Any trajectory points that fall within this circular area are considered to be the points generated when the ship is docked within the home port area. Once the geographical boundary of the home port is confirmed, the method will scan the entire trajectory. Any trajectory points within this area (satisfying the spherical distance ≤ r from the center or within the polygon) will be regarded as stop port points. Filtering these points can reduce the interference of invalid movements within the home port area (such as minor displacements within the berth, tugboat operations, and turning maneuvers around the perimeter) on subsequent algorithms, and also enable the subsequent trajectory segment division to more purely reflect the actual voyage from one port to the next. In the specific implementation, this method removes these points within the home port area from the trajectory list, or ignores them after giving a special mark (such as in-port points) to ensure that the finally formed voyage segments only contain the actual sea voyage part in the true sense.

[0072] As can be seen from the above, when a ship leaves the home port A (or the home port area A) until it arrives at another home port B (or the home port area B), the trajectory points generated during this period can generally be regarded as a complete sea voyage segment. Therefore, after removing the points within the home port area, the home ports A and B become two clear demarcations in the trajectory sequence, and all AIS points between them belong to the same voyage segment. In the complete AIS record, the ship may experience multiple round trips from the home port A to the home port B. Each round trip should be independently split by the method of the present invention so that subsequent analysis or prediction is more targeted.

[0073] To more precisely depict or study the speed changes, course adjustments, or regional characteristics of the ship, after dividing the large voyage segments, the present invention further divides this segment in more detail based on the specific change patterns of the trajectory points and time points. For example, when the ship shows significant turning, sudden changes in speed gradient, or course deviations exceeding a specified threshold in this segment, this segment can be split into two, thus obtaining more refined voyage fragments. This step can also be combined with a clustering algorithm. If multiple typical clustering centers (such as route bifurcations or main route switches) are found within a segment of the trajectory, the trajectory segment can also be further subdivided to ensure that the result better fits the actual voyage state.

[0074] In the simplest case, when there are no special complex route changes between one home port and the next, all AIS points will form a continuous and single trajectory segment. If there are temporary transit stops at other ports during a sea voyage (but the docking duration does not meet the definition of a home port or it is not a registered home port), or if there is a long wait at a certain point at sea, the algorithm may automatically identify whether these docking / staying points meet the new segmentation conditions, thus splitting them into multiple sub-trajectory segments between two home ports. All points within each trajectory segment will carry information such as time sequence (timestamp), location (latitude and longitude), and possibly speed and heading, which generally reflects the journey and events of the ship from leaving the starting home port to reaching the next home port.

[0075] Specifically, the steps of generating b prediction segments from all trajectory segments include:

[0076] Using the DBSCAN clustering algorithm to process the trajectory points within a preset number on a trajectory segments to obtain b clusters.

[0077] Within each cluster, fitting the coordinates of the trajectory points included in the cluster to generate a prediction segment.

[0078] Regarding the above specific description, in the previous steps, the present invention has segmented the ship trajectory (such as according to the division of home port locations), and may have sampled or filtered 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 set of points of these trajectory segments can be regarded as a set of route feature points, containing information such as latitude and longitude, timestamp, speed, and heading in each voyage segment. To facilitate spatial clustering, usually at least the latitude and longitude coordinates need to be retained or converted into plane coordinates (such as projected onto a certain map coordinate system) as the main input features of DBSCAN. Gathering the segmented trajectory points together, denoted as a whole point set P0. If each of the a trajectory segments contains a number of sampled points, the scale of P may vary from a few hundred to several thousand (depending on the actual application and sampling strategy). Set appropriate ε (such as several nautical miles or kilometers) and MinPts (such as 5 points, 10 points, etc.), and the specific values need to be adjusted according to the sparsity of the distribution of the track points at sea and the scale of the actual route. Execute the DBSCAN algorithm to judge the density reachability of each point in P, and gradually form several clustering clusters. If some points are sparsely distributed or too discrete, they are marked as noise points and do not participate in the generation of further prediction segments.

[0079] As can be seen from the above, each clustering cluster contains a batch of trajectory points that are closely adjacent to each other or show a similar trend in the geographical space. However, due to the possible existence of noise, uneven sampling, and bending and turning in AIS data, directly using these discrete points is not convenient for subsequent unified determination or prediction of trajectories. To facilitate simplified calculations during end-point prediction or path planning, the present invention further represents the point set in each clustering cluster using a fitting or curve model. In this way, a function or multiple piecewise functions can be used to describe the typical trend corresponding to the cluster, facilitating interpolation or extended prediction when needed. Common fitting methods include polynomial fitting, spline interpolation, piecewise linear fitting, or neural network-based non-linear regression. The present invention does not limit the specific fitting method, and can be flexibly selected according to the target accuracy, algorithm complexity, and track shape. For relatively gentle or approximately straight routes, piecewise linear fitting can be used; if smoother or significant turning exists, polynomials or spline curves can be used. In practical applications, the time dimension can also be considered, and a two-dimensional function of longitude and latitude over time can be constructed to reflect the influence of ship speed or navigation duration during prediction.

[0080] Specifically, the DBSCAN clustering algorithm is used for clustering. However, since the AIS track data points are relatively dense after filling in missing values, the speed will be very slow when clustering. Therefore, to improve the speed of trajectory clustering, this solution proposes a fast clustering method, that is, points are taken according to the average distribution of trajectory points. When the number of trajectory points of the ship does not exceed 1000, all trajectory points are directly used for clustering calculation; when the number of trajectory points exceeds 1000, the sampling interval of the trajectory is a multiple of 1000 of all trajectory points, and points are evenly taken at equal intervals, which can achieve fast and accurate trajectory clustering. The formula is as follows:

[0081]

[0082] In the formula, i is the total number of points for clustering, and j is the number of trajectory points after interpolation.

[0083] Specifically, it is set to first use the linear interpolation method for curve fitting. According to the grouping basis of the ship's navigation trajectory, the navigation trajectory of the last group of ships departing from the home port is used as the trajectory to be measured. The number of points for curve interpolation is taken as follows:

[0084]

[0085] In the formula, is the number of points for curve interpolation; is the number of points in a certain cluster formed after clustering; is the number of points of the trajectory to be measured.

[0086] In any of the above embodiments, the number of prediction segments located between two home port areas is at least one. Since a ship will form multiple travel trajectories between two distinct home ports when sailing in open waters, the alternative prediction segments for prediction should also be at least one.

[0087] In this embodiment, in the most basic case, even if the ship strictly adheres to a fixed route and sails completely along a customary waterway from Port A to Port B, a track data segment that can be analyzed, extracted, and predicted will still be formed. If the ship deviates slightly due to requirements such as avoidance, changing anchorage, or sea conditions, an actual track will still be generated, only with a different curve shape or direction, so it can also be regarded as a candidate for a prediction segment. For this reason, whenever a ship leaves a home port area, at least one travel trajectory segment will definitely be generated, and correspondingly, at least one alternative prediction segment can be formed in subsequent predictions.

[0088] In open waters, the environment faced by ships is extremely variable, including multiple dynamic factors such as wind and waves, tides, waterway closures, and navigation congestion. Even if the target home port is the same, a ship may choose to bypass a farther sea area due to bad weather or switch to a temporary safe waterway due to traffic density, resulting in different line distributions in AIS data. If the number of prediction segments located between two home ports is forcibly set to only one, it may underestimate the ship's opportunity to flexibly change its route in complex waters, thereby affecting the judgment of alternative routes during prediction.

[0089] Furthermore, the curve is segmented according to the interpolation points, and the slope of each segment of the line is calculated separately. The slope calculation formula is as follows:

[0090]

[0091] In the formula, represents the slope of the line segment; represents the starting coordinate of the line segment from left to right, represents the ending position coordinate of the line segment.

[0092] The slopes of the front and rear segments of the route are compared separately, that is, the slope of the first segment is multiplied by the slope of the second segment, the second segment is multiplied by the slope of the third segment, and so on. When the product of the slopes is less than zero, it is determined that there is an inflection point on the curve. The formula is as follows:

[0093]

[0094]

[0095] In the formula, is the product of the line segment slopes; is the slope of the i-th segment.

[0096] When there is an inflection point, the cubic interpolation method is used to perform curve interpolation on the two line segments respectively. The number of interpolation points is 10. By this method, the fitted curve is smoother and more accurate, and a higher-precision curve can be obtained with a small number of interpolation points.

[0097] S104, calculate the similarity between the traveling segment and each predicted segment, and convert the predicted segment with the highest similarity into the predicted trajectory before the ship to be measured reaches the home port.

[0098] Here, after calculating the similarity of all predicted segments, the method of the present invention will select the maximum value as the optimal matching result. If there are multiple predicted segments with similar similarities, 2-3 can also be retained within a certain threshold as candidate routes for subsequent further confirmation or real-time tracking. The reason for making such a determination is that the higher the similarity, the more consistent the coordinate distribution and heading change of the current ship are with this historical predicted segment, which means that its subsequent driving trend is very likely to continue or approach this known pattern. Once the optimal predicted segment is mapped to the actual situation of the current ship, a predicted route extending forward from the current time or coordinate is obtained until the home port area. At the same time, this method usually also calculates the estimated time of arrival (ETA), the sailing distance, and the possible speed curve, providing core data for intelligent shipping or maritime department scheduling.

[0099] As can be seen from the above, the predicted segment closest to the current actual sailing state is mapped as the key route for the ship to sail, and then the complete predicted trajectory of the ship from the current moment to before reaching the home port is deduced. This method makes full use of multiple historical typical routes refined in the previous clustering and fitting stages, and compares the real-time position and motion characteristics of the ship, so as to realize fast, accurate and flexible end-point oriented sailing prediction in complex sea areas and dynamic environments, providing important technical support and practical value for fields such as intelligent shipping, autonomous driving and maritime traffic management.

[0100] Specifically, the steps of calculating the similarity between the traveling segment and each predicted segment include:

[0101] Along the traveling direction of the ship to be measured, obtain multiple consecutive points to be measured on the traveling segment.

[0102] Calculate the Euclidean distance between each point to be measured and the corresponding trajectory point on the predicted segment respectively, and obtain the similarity between all predicted segments and the traveling segment through the Euclidean distance.

[0103] For the above specific description, the points to be measured refer to a number of AIS coordinates selected by the present invention in the current travel segment (i.e., the uncompleted navigation path) for comparison and reference. Usually, these AIS points carry information such as timestamp, longitude and latitude, speed, and course. The reason for extracting a series of consecutive points in the travel segment is that the information volume of a single point is often insufficient to judge comprehensive features such as travel direction and speed change. The relative position or time series distribution of multiple points can better capture the ship navigation trend. Each prediction segment (derived from the clustering and fitting of historical trajectories) can be regarded as an approximately continuous curve, or may also be a discrete coordinate sequence. If a fitted curve is adopted, interpolation can be performed at the same or similar time / space resolution as the travel segment to obtain the predicted trajectory points corresponding to the corresponding time or distance of the travel segment.

[0104] As can be seen from the above, by comparing the coordinate differences between the two, it is possible to intuitively determine which prediction segment best matches the current travel trajectory, thereby providing a decision-making basis for subsequent steps such as selecting the best prediction trajectory, judging the possible home port that the ship may reach, or estimating the expected arrival time. The similarity calculation method based on the Euclidean distance is simple to operate, highly scalable, and has good real-time performance, and is particularly suitable for scenarios with high maritime traffic density and frequent changes in ship courses.

[0105] Specifically, according to the basis for grouping ship navigation trajectories, the last group of ship navigation trajectories starting from the home port is used as the trajectory to be measured. After clustering the trajectory to be measured and the curve fitted from the historical navigation trajectories, similarity matching is performed respectively. The path curve with the highest similarity is the final predicted route.

[0106] The improved Euclidean distance similarity matching algorithm proposed in this scheme traverses all points of the curve path in a point-to-point manner for the trajectory to be measured and the curve path. The Euclidean distance is used to calculate the distance between two points. The calculation formula is as follows.

[0107]

[0108] After calculating the point on the curve path with the closest distance using the Euclidean distance, this point is recorded as the first matching point on the curve path, and the distance from this point is recorded as ; According to this method, the second point of the trajectory to be measured starts traversing from the point after the first matching point on the curve path, calculates the distance, and finds the point with the closest distance, which is recorded as the second matching point on the curve path, and the distance from this point is recorded as . And so on, the calculation rule is as Figure 3 shown. The red points represent the points of the trajectory to be measured, the blue points represent the fitted curve path, and the yellow points represent the points with the closest distance between the two lines.

[0109] Specifically, the distance between the route to be measured and the curved path according to the above method is expressed as the average value of the nearest distances from point to point between the two lines, and the formula is as follows.

[0110]

[0111] In the formula, is the average distance; is the th matching point.

[0112] Calculate the distances between the several curves fitted after clustering and the route to be measured respectively. Then, the similarity between the curved path and the trajectory to be measured is expressed as follows.

[0113]

[0114] In the formula, is the similarity between the curved path and the trajectory to be measured.

[0115] Compare the similarities between several curved paths and the trajectory to be measured. The curved path with the highest similarity is the finally predicted route, and the end point of the future navigation of the ship is the end point of the curved path with the highest similarity.

[0116] Specifically, the trajectory points corresponding to the points to be measured on the prediction segment are obtained through the following steps:

[0117] Along the change order of the time points corresponding to the points to be measured, use one point to be measured as the reference point.

[0118] Obtain the trajectory point with the minimum Euclidean distance between the reference point and the prediction segment.

[0119] According to the change order of the time points corresponding to the points to be measured, sequentially obtain the trajectory points corresponding to the points to be measured on the prediction segment.

[0120] For the above specific description, use one point to be measured (usually the first or the earliest point to be measured in the sequence) as the reference point, so as to use this reference point to determine the starting matching position in the prediction segment later. The reason for the need of the reference point is that the distribution of the points to be measured in the traveling segment and the trajectory distribution obtained by fitting or clustering the prediction segment historically may not be aligned in time or distance; initial positioning through a reference point can help quickly narrow the search range in 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 will also carry its time stamp or spatial identifier in the historical track. If it is in the form of a function, the corresponding coordinate points can be interpolated at any time or distance.

[0121] As described above, the ship trajectory has temporal and spatial continuity. The point to be measured must be after the reference point. We already know that the reference point corresponds to the prediction segment. Therefore, the matching trajectory point of the point to be measured should be found near or after the current matching point. Such sequential association can ensure that the matching process is consistent with the actual navigation direction.

[0122] Specifically, the steps of converting the prediction segment with the highest similarity into the predicted trajectory before the ship to be measured reaches the home port include:

[0123] Considering the position coordinates of the home port that the ship to be measured is going to reach, obtaining the deviation value between the prediction segment with the highest similarity and the travel segment, and converting the prediction segment with the highest similarity into a predicted trajectory through the deviation value. And the deviation value is to take the point to reach the home port as the center, the travel segment and the corresponding prediction segment as two radii, and solve the included angle between the two radii as the deviation value. And through this deviation angle, the prediction segment is mapped onto the travel segment by angle translation to complete the conversion of the current prediction segment into a predicted trajectory.

[0124] For the above specific description, before selecting and correcting the prediction segment, it is first necessary to clarify the target home port of the ship to be measured - that is, the port that the ship will finally reach. This home port is usually marked by its geographical position coordinates or equivalent projection coordinates. Since the core purpose of end-point oriented prediction is to quickly generate a route for the ship from the current travel position to the target home port, in subsequent deviation corrections, angle or coordinate adjustments need to be made with reference to the home port position.

[0125] To truly map the prediction segment to the current ship travel state, it is necessary to compare the differences between the travel segment and the prediction segment in geographical space and orientation. The present invention defines and solves the included angle between two radii by taking the home port position as the center, thereby obtaining a quantifiable deviation value (deviation angle). Taking the home port as the center: Assume the home port coordinates are . At the end coordinate of the travel segment and the end coordinate of the prediction segment , each can be regarded as a radius diverging from . Through vector operations or geodetic coordinate formulas, the included angle between the two radii can be calculated. This included angle is the deviation value, indicating the rotational difference between the travel segment and the prediction segment in the route direction or end position when taking the home port as the reference center. Through this deviation angle , the present invention can uniformly describe the gap between the travel segment and the optimal prediction segment in terms of direction and orientation, thereby providing a quantitative basis for subsequent mapping and correction. If is 0, it means the two are completely aligned; if is large, it means significant angle adjustment or curve deformation is required to fit the prediction segment to the current ship travel state.

[0126] As can be seen from the above, after determining the position of the home port, by quantifying the deviation angle between the prediction segment with the highest similarity and the travel segment and implementing angle offset mapping, the final prediction trajectory generated by the present invention can fully conform to the actual navigation state of the ship. This approach has the following advantages: it can switch between different home port coordinates or different similarity segments to quickly generate multiple candidate routes; calculating the included angle with the home port as the center is intuitive and has a low computational cost; regardless of the size of the sea area or whether the route shape 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.

[0127] Furthermore, the prediction trajectory is obtained through the following formula:

[0128]

[0129] In the formula, is the coordinate point of the final mapped or corrected prediction trajectory at parameter ; is the parametric representation of the optimal prediction segment, which is a historical typical path obtained by methods such as clustering and fitting, satisfying , when represents the starting point of this path, and when represents the end point of this path; The coordinates at the end of the travel segment (or the latest known position of the current ship), on the final prediction trajectory, play the role of a translation reference. Translating the mapped curve to can make the final prediction trajectory seamlessly spliced with the current travel segment, ensuring that it just conforms to the current position of the ship at ; is the exponential smoothing factor, used to amplify or reduce the mapped vector, and can also be regarded as a way to smoothly transition the deviation, and , is an adjustable parameter; if there is no additional scaling; if , then the second half (when is larger) will be stretched more; is the angle correction function, which runs through the interpolation process to achieve a smooth transition of rotation from to ; is the rotation matrix, which performs two-dimensional plane rotation to align the direction of the prediction segment with the current navigation direction or the home port azimuth; is the home port coordinate, used to locate the rotation and reference the end position.

[0130] Specifically, the angle correction function is calculated by the following formula:

[0131]

[0132] Wherein, when when ; when when ; in the middle region, it is smoothly transitioned according to smooth transition.

[0133] Specifically, the rotation matrix is the following formula:

[0134]

[0135] Wherein, ; perform a counterclockwise rotation of the vector on the two-dimensional plane. Combining , it can make each corresponding point make an angle correction on the basis of, so as to fit the direction relationship between the current travel segment and the home port.

[0136] In any of the above embodiments, before outputting the predicted trajectory, it is judged whether the similarity corresponding to the predicted trajectory is qualified; the similarity is judged by setting a range value. If it is less than the range value, the current prediction deviation is too large and cannot be adopted, and the length of the acquisition time period should be increased to improve the prediction accuracy. If it is greater than the range value, the current prediction deviation takes too long and the length of the acquisition time period should be reduced to speed up the prediction speed.

[0137] If it is qualified, output the predicted trajectory with the highest similarity;

[0138] If it is unqualified, clear all predicted segments, adjust the time period and recalculate the similarity.

[0139] In this embodiment, in the method for quickly predicting the ship trajectory with end guidance of the present invention, in order to improve the prediction accuracy and efficiency, it is necessary to judge the similarity of the predicted trajectory before generating the final predicted trajectory, and dynamically adjust the length of the data time period used for prediction according to the judgment result; specifically, the present invention measures the degree of coincidence 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 from them 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 it needs to be adjusted in time to avoid inaccurate or inefficient problems.

[0140] If the similarity is low, a bulk carrier is sailing in inshore waters. Since only the historical tracks 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. Therefore, all the generated prediction segments are cleared, and the collection time period is extended from 30 minutes to 90 minutes or longer. After the new data volume is more sufficient, the system reclusters and fits out more accurate prediction segments, then calculates the similarity and outputs the new optimal prediction result.

[0141] If the similarity is high, a ro-ro ship departs from the port. The system uses a large amount of data in the past three days for clustering prediction, and the obtained similarity is unexpectedly as high as 0.98 (exceeding Smax = 0.90). Although the accuracy is good, the calculation process consumes too much CPU time and has a high latency. After the system detects this situation, it decides to shorten the time period to 24 hours, reduce the data volume, and improve the operation speed within an acceptable range. Then, reclustering and similarity calculation are performed again. If the new result still falls between Smin and Smax, the balance between real-time performance and accuracy can be satisfied.

[0142] A method for fast prediction of ship trajectories oriented to the end point provided by the present invention. The current mainstream ship trajectory prediction algorithms all predict the position of the ship at the next moment based on the current position of the ship, while the ship trajectory prediction technology oriented to the end point is very rare. To solve the above problems, this solution proposes a method for fast prediction of ship trajectories oriented to the end point, which can quickly and accurately predict the future end point direction of ship navigation. The prediction results are shown in the following figure. Figure 4 It is a distribution diagram of ship historical trajectories. In the figure, the blue route represents the ship historical trajectories. Figure 5 It is a prediction result diagram of ship future trajectories. Among them, the red line represents the predicted trajectory route, and the end point of the red route is the predicted future end point of ship navigation.

[0143] Embodiments of the second aspect of the present invention propose an electronic device. In some embodiments of the present invention, as Figure 6 shown, an electronic device is provided. The electronic device may include electronic devices such as a desktop computer, a notebook, a palm computer, and a cloud server. The electronic device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art can understand that Figure 6 this is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3. It may include more or fewer components than those shown in the figure, or different components.

[0144] The processor 301 can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0145] The memory 302 can be an internal storage unit of the electronic device 3. For example, the hard disk or memory of the electronic device 3. The memory 302 can also be an external storage device of the electronic device 3. For example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., equipped on the electronic device 3. The memory 302 can also include both an internal storage unit and an external storage device of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device.

[0146] Embodiments of the third aspect of the present invention propose a computer-readable storage medium. In some embodiments of the present invention, a computer-readable storage medium is provided. 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 and will not be elaborated here.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In practical applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0148] Those of ordinary skill in the art will realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this disclosure.

[0149] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus / electronic device and method can be implemented in other ways. For example, the apparatus / electronic device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation. Multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of the apparatus or unit can be in an electrical, mechanical or other form.

[0150] 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, to implement all or part of the processes in the above-described embodiment methods of this disclosure, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. The computer program can include computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included 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 electrical carrier signals and telecommunication signals.

[0151] 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 foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate 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 rapid prediction method for the trajectory of an end-point oriented ship, characterized in that, It includes the following steps: Obtain the identification information of the current ship to be measured, and obtain the navigation track of the ship to be measured within a certain time period according to the identification information; Determine the home port passed by the ship to be measured within the time period according to the change relationship between the track point coordinates and the time points on the navigation track; Divide the navigation track into a track segments completed by the ship to be measured and the current traveling segment of the ship to be measured through the position coordinates of the home port, and generate b prediction segments through all the track segments; Calculate the similarity between the traveling segment and each prediction segment, consider the position coordinates of the home port to which the ship to be measured is to arrive, solve the angle between the prediction segment with the highest similarity and the traveling segment with the position to which the ship is to arrive as the center of the circle, and use the angle as the deviation value between the prediction segment with the highest similarity and the traveling segment. Convert the prediction segment with the highest similarity into a prediction track through the deviation value; and the prediction track is converted by the following formula: ; In the formula, is the coordinate point of the obtained predicted trajectory at parameter ; is the parametric representation of the predicted segment with the highest similarity; is the coordinate at the end of the travel segment; is the exponential smoothing factor; is the angle correction function; is the rotation matrix used to perform two-dimensional plane rotation; is the home port coordinate used to locate the rotation and reference the end position.

2. The ship trajectory rapid prediction method according to claim 1, wherein The time period includes the current time point of the ship to be measured.

3. The method for rapid prediction of ship trajectories according to claim 1, characterized in that, The step of determining the home port passed by the ship to be measured within the time period includes: Judge whether the time point difference between adjacent track points on the navigation track is greater than the first time threshold; Convert the track point coordinates with the time point difference greater than the first time threshold into the position coordinates of the home port.

4. The ship trajectory rapid prediction method according to claim 3, characterized in that The track segments are determined through the following steps: Set a home port area with the position coordinates as the center, and clear the track points within the home port area; Divide all the track points between two home port areas into multiple track segments according to the change relationship between the track point coordinates and the time points.

5. The rapid ship trajectory prediction method according to claim 1, wherein The step of generating b prediction segments through all the track segments includes: Use the DBSCAN clustering algorithm to process the track points within the preset number on a track segments to obtain b clusters; Within each cluster, fit the track point coordinates included in the cluster to generate a prediction segment.

6. The ship trajectory rapid prediction method according to claim 5, characterized in that The number of prediction segments between two home port areas is at least one.

7. The method for quickly predicting the ship trajectory according to claim 6, characterized in that The step of calculating the similarity between the traveling segment and each prediction segment includes: Along the traveling direction of the ship to be measured, obtain multiple consecutive measurement points on the traveling segment; Calculate the Euclidean distance between each measurement point and the corresponding track point on the prediction segment respectively, and obtain the similarity between all the prediction segments and the traveling segment through the Euclidean distance.

8. The method for rapid prediction of ship trajectories according to claim 7, characterized in that The corresponding track point of the measurement point on the prediction segment is obtained through the following steps: Take a measurement point as a reference point along the change order of the time point corresponding to the measurement point; Obtain the track point with the minimum Euclidean distance between the reference point and the prediction segment; Obtain the track points corresponding to the measurement points on the prediction segment in turn according to the change order of the time point corresponding to the measurement points.

9. The rapid ship trajectory prediction method according to any one of claims 1-8, characterized in that, Before outputting the prediction track, judge whether the similarity corresponding to the prediction track is qualified; If it is qualified, output the prediction track with the highest similarity; If it is unqualified, clear all the prediction segments, adjust the time period and recalculate the similarity.

Citation Information

Patent Citations

  • Navigation trajectory prediction method, computer storage medium and program product

    CN114077926A

  • Track prediction method based on ship data

    CN117312891A