A ship trajectory reconstruction method based on AIS data quality optimization
Through the use of the box line diagram method in the rebuilding of the ship's trajectory, setting dynamic thresholds, segmentation-connection-filtering strategies and motion-flatter interpolation models, etc., solve the problem of low AIS data quality, improve the accuracy and Lu of trajectory reconstruction and Lu Lu. Best.
Patent Information
- Application Number
- CN202411579608.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-11-07
AI Technical Summary
The low quality of AIS data leads to problems such as positioning noise, missing values and data noise in ship trajectory reconstruction, affecting the accuracy of maritime data mining.
Use the box line diagram method to set the dynamic speed and steering threshold, process the trajectory data through segmentation-connection-filtering strategy, delete the abnormal trajectory point and perform interpolation processing. For short-range lack of motion-flat meter plug-in models, similar trajectory migration strategies are used for long-distance lack.
Improve the accuracy of the identification of abnormal trajectories, reduce the impact of error data, significantly reduce the differences between the simulation path and the actual path, and ensure the rationality and accuracy of the interpolation result, especially when the noise level is high Essence
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship track reconstruction, and in particular to a ship track reconstruction method based on AIS data quality optimization. Background Art
[0002] More than 60,000 ships sail on the ocean every day. The operation of these ships generates a large amount of traffic data. The Automatic Identification System (AIS) is an advanced digital navigation device that makes it possible to collect this data in real time. Each frame of the AIS message broadcast usually consists of dynamic information (such as the latitude and longitude coordinates, speed, heading, etc. of the ship automatically broadcast by the ship-borne station to the shore-based station) and static information (ship name, ship size, destination port, etc.).
[0003] A Chinese patent application with publication number CN116758403A discloses a shipping AIS data repair method based on a generative adversarial neural network. The method accurately repairs ship data with outliers and missing values by constructing and training a generative adversarial neural network model.
[0004] However, AIS trajectory data is inaccurate and unreliable in many cases. According to surveys, within a specific time interval, the positioning noise of sailing ships is 5.6%, and that of moored ships is 0.31%; the missing values of static AIS data can reach 86%, and the missing values of navigation-related AIS data can reach 48%; and AIS variables are susceptible to failures from multiple sources, such as bad weather and human errors, which lead to data noise and missing data, and may cause erroneous conclusions in maritime data mining. Therefore, improving the quality of AIS data has become a key technical problem that needs to be urgently solved in the maritime field.
[0005] Improving the quality of AIS data is the goal of many researchers. In terms of trajectory denoising, although some studies have applied anomaly detection technology to clean data sets, existing methods still have limitations in dealing with dynamic data anomalies, especially in dealing with outliers caused by positioning errors and signal transmission problems. As for trajectory interpolation, although methods such as Lagrange interpolation and cubic spline interpolation perform well in geometric feature fitting, the problem of accuracy differences when processing AIS data has not been properly solved. In addition, although deep learning methods, such as U-Net and Bidirectional Long Short Term Memory Network (BiLSTM), have shown great potential in trajectory interpolation and prediction, their application is usually limited by the scale and quality of the dataset, and has high requirements for computing resources. Therefore, although these methods have made some progress in the field of ship trajectory reconstruction, an efficient and accurate processing method still needs to be developed when dealing with huge datasets. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a ship track reconstruction method based on AIS data quality optimization, comprising the following steps:
[0007] S1. Use the box plot method to set the speed threshold and turning rate threshold for each ship;
[0008] S2, using the segmentation-connection-filtering strategy to segment the trajectory and delete the abnormal trajectory points in the trajectory data;
[0009] S3. Interpolate the missing trajectories and adopt different interpolation strategies for missing trajectories of different lengths.
[0010] The technical solution further defined in the present invention is:
[0011] Furthermore, in step S1, a historical AIS data set is selected, from which all ship track points of the same MMSI are screened out, and sorted in ascending time order, and the average speed and turning rate between two adjacent track points are calculated; the box plot method is used to set dynamic thresholds on the two features of speed and turning rate, and the formula is:
[0012]
[0013] Where T represents the maximum threshold, Q1 and Q3 represent the 25% quantile and 75% quantile of a set of variables, and IQR represents the interquartile range.
[0014] As described above, in the ship track reconstruction method based on AIS data quality optimization, step S2 specifically includes the following sub-steps:
[0015] S2.1, sub-track segmentation: according to the threshold value set in step S1, the original track is segmented into breakpoints, and a breakpoint is set between two track points greater than the threshold value, so as to segment the original track into several sub-track segments of different sizes;
[0016] S2.2, sub-trajectory connection: Check whether there is a potential connection relationship, so as to integrate the trajectories; judge whether the end point of each sub-trajectory can be connected with the starting point of its subsequent sub-trajectory one by one. The specific judgment standard is to calculate whether the average speed between the two points is less than the speed threshold in step S1. If it is less than, it is considered that the two sub-trajectories can be connected, and the corresponding sub-trajectories are merged into one, and finally a merged sub-trajectory set is obtained;
[0017] S2.3, Sub-trajectory filtering: Incomplete sub-trajectories in the historical AIS data set are screened and deleted. The number of data points of each sub-trajectory is checked in turn. If the number is less than 30, the sub-trajectory is considered abnormal and deleted.
[0018] As described above, a ship trajectory reconstruction method based on AIS data quality optimization, in step S3, a trajectory with a distance between two trajectory points greater than 2km and less than or equal to 10km is regarded as a short-distance missing trajectory, and a trajectory with a distance between two trajectory points greater than 10km is regarded as a long-distance missing trajectory; for short-distance missing, a motion-adjustment interpolation model is used to reconstruct the trajectory through the uniformly accelerated linear motion assumption; for long-distance missing, a strategy of migrating similar historical trajectories is adopted to screen similar trajectory segments in historical data.
[0019] As described above, in a ship trajectory reconstruction method based on AIS data quality optimization, in step S3, the number of points required for interpolation is determined according to the distance difference between two points, and interpolation is performed at equal time intervals, and the timestamp of the interpolation point is calculated using the following formula:
[0020]
[0021] Among them, the set {T u} represents the timestamp set of the interpolation points, T s and T e The timestamps of the start and end points of the missing segment, t e represents the time interval between two interpolation points, n represents the number of interpolation points, S represents the straight-line distance between the start and end points of the missing segment, and St represents the preset distance interval threshold.
[0022] As described above, in a ship trajectory reconstruction method based on AIS data quality optimization, in step S3, for short-distance missing, the ship motion is decomposed into longitude and latitude directions, and the operation in either direction is the same. In either direction, it is assumed that the acceleration of the ship in the missing segment remains constant, and the ship trajectory is simulated using the kinematic principle. The formula is:
[0023]
[0024] Among them, L(t i ) represents the coordinates of the simulated motion in this direction, D s Indicates the coordinates of the starting point of the missing segment in this direction, t i represents the time interval from the interpolation point to the starting point of the missing segment, a represents the acceleration of the missing segment, and v s and v e Respectively represent the speed of the starting point and the end point of the missing segment, T i Indicates that the interpolation point is a timestamp, T s and T e Timestamps indicating the start and end of the missing segment, respectively.
[0025] As described above, in a ship trajectory reconstruction method based on AIS data quality optimization, in step S3, the interpolation result is corrected using the adjustment principle, the cumulative error between the kinematic simulation end point and the actual missing segment end point is calculated, the speed information is used to assign weights to the interpolation points, and the cumulative error is distributed; the speed size is used as the weight to calculate the correction value of each interpolation point, as shown in the following formula:
[0026]
[0027] Among them, u(t i ) represents the correction value of each interpolation point, and b is a constant term; Indicates the cumulative error in this direction, D e represents the coordinates of the end point of the missing segment in this direction, L(t e ) represents the coordinates of the end point of the kinematic model in this direction; therefore, the final difference model is:
[0028]
[0029] Among them, S(t i ) represents the coordinates of the i-th interpolation point, L(t i ) represents the coordinates of the kinematic simulation of the i-th interpolation point, u(t i ) represents the correction value of the i-th interpolation point.
[0030] As described above, in the ship track reconstruction method based on AIS data quality optimization, in step S3, for long-distance missing, the following rules are used to screen candidate tracks:
[0031] Position screening: based on the two end points P of the missing segment start and P end, set a rectangular area within 0.5 km around each endpoint, filter out the trajectory point table in the area, and connect the two tables through MMSI to obtain all candidate trajectory segments C Tracks , as shown below:
[0032]
[0033] Among them, C Tracks represents the set of ship trajectory pairs that meet the conditions; P s and P e Respectively represent the starting and ending trajectory points of the missing segment; Rect(P,0.5) defines an area with a radius of 0.5 km centered at point P; P s MMSI and P e .MMSI indicates the MMSI number of the starting point and the ending point respectively;
[0034] Time screening: using the time difference of missing segments As the expected value, the candidate trajectory segments whose time difference differs from the expected value by more than 60 seconds are excluded, as shown in the following formula:
[0035]
[0036] in, represents the time difference of candidate trajectory segments;
[0037] Points screening: Set the expected value n of points based on the time difference, and exclude the trajectory segments where the difference between the points and the expected value exceeds 5 points, as shown in the following formula:
[0038]
[0039] Among them, n c The number of trajectory points representing the candidate trajectory segment.
[0040] As described above, in a ship trajectory reconstruction method based on AIS data quality optimization, in step S3, for long-distance missing, the left endpoint of the target trajectory and its first four consecutive trajectory points, as well as the right endpoint and its last four consecutive trajectory points are selected to construct the target trajectory segment T g ; For each candidate trajectory, the same method is used to select its starting point, end point and four adjacent points to form a candidate trajectory segment T c ;Each trajectory segment consists of eight trajectory points;
[0041] The similarity between these two trajectories is then calculated using the pairwise sum distance method:
[0042]
[0043] Among them, d(P g,i Pc,i ) represents the i-th point P in the target trajectory segment g,i and the i-th point P in the candidate trajectory segment c,i The Euclidean distance between .
[0044] As described above, in a ship trajectory reconstruction method based on AIS data quality optimization, in step S3, for long-distance missing, firstly, the time from each trajectory point to the starting point and the distance traveled in the x direction and the distance traveled in the y direction are calculated according to the timestamp of the trajectory point; the functional relationship is fitted by using the cubic spline function to migrate the trajectory, and the formula is:
[0045]
[0046] Where x(t) and y(t) represent the abscissa and ordinate of the interpolation point at time t respectively; a3, a2, a1, a0 are the coefficients of the abscissa polynomial; b3, b2, b1, b0 are the coefficients of the ordinate polynomial;
[0047] Then calculate the ratio of the time difference of the migration trajectory to the time difference of the missing segment of the target trajectory , map the timestamp of the interpolation point to the elapsed time, as follows:
[0048]
[0049] in, Indicates the time difference proportional coefficient, t u Indicates the interpolation point timestamp, t start Indicates the missing segment start timestamp.
[0050] The beneficial effects of the present invention are:
[0051] (1) In the present invention, the box plot method is used to set the threshold, combined with the dynamic threshold method of ship speed and heading changes, which is more reasonable and flexible, can effectively avoid the error caused by a single speed threshold, and significantly improve the recognition accuracy of abnormal trajectories;
[0052] (2) In this invention, the “segmentation-connection-filtering” strategy is adopted to deal with the difficulty of outlier detection caused by data quality or diversity of ship types. Through precise sub-trajectory segmentation and integration, the problem of multiple ships sharing MMSI numbers is effectively solved, greatly reducing the impact of erroneous data;
[0053] (3) In the present invention, the interpolation method of the kinematic and adjustment model is combined to deal with the short-distance trajectory loss. This method significantly reduces the difference between the simulated path and the actual path through a reasonable error allocation mechanism, and is significantly better than the traditional method in terms of accuracy.
[0054] (4) In the present invention, a similar trajectory migration strategy is adopted to deal with the missing of long-distance trajectories. By screening and evaluating the similarity of historical trajectories, the rationality and accuracy of the interpolation results are ensured. Especially in the case of high noise levels, this method shows better robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a schematic diagram of the overall process of the present invention;
[0056] Figure 2 Schematic diagram of the scope of the research area and the processing flow of an embodiment of the present invention, wherein (a) is a density map drawn using the original data, (b) is a schematic diagram of the identified noise points, (c) is a schematic diagram of the repaired missing segments, and (d) is a density map drawn using the repaired data;
[0057] Figure 3 A schematic diagram of setting a threshold value using the box plot method in an embodiment of the present invention;
[0058] Figure 4 Schematic diagram of the distribution of speed and turning rate thresholds of different ship types in an embodiment of the present invention;
[0059] Figure 5 A schematic diagram showing a comparison of short-distance interpolation models in an embodiment of the present invention;
[0060] Figure 6 Schematic diagram of interpolation accuracy of various methods under different noise levels in an embodiment of the present invention;
[0061] Figure 7 Schematic diagrams comparing the effects before and after trajectory reconstruction in an embodiment of the present invention, wherein (a) is a schematic diagram of the trajectory of an AIS ship in an inland river area before trajectory reconstruction, (b) is a schematic diagram of the trajectory of an AIS ship in an inland river area after trajectory reconstruction, (c) is a schematic diagram of the trajectory of an AIS ship in a coastal area before trajectory reconstruction, and (b) is a schematic diagram of the trajectory of an AIS ship in a coastal area after trajectory reconstruction;
[0062] Figure 8 Schematic diagram of interpolation effect of trajectory reconstruction example in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] This embodiment provides a ship track reconstruction method based on AIS data quality optimization, such as Figure 1 As shown, the following steps are included:
[0064] S1. Use the box plot method to set the speed threshold and turning rate threshold for each ship; Figure 2As shown, this embodiment selects the historical AIS trajectory data in the study area on September 1, 2016, selects all the ship trajectory points with the same Maritime Mobile Service Identity (MMSI), sorts them in ascending time order, calculates the average speed and turning rate between two adjacent trajectory points; uses the box plot method to set dynamic thresholds on the two features of speed and turning rate, and the formula is:
[0065]
[0066] Where T represents the maximum threshold, Q1 and Q3 represent the 25% quantile and 75% quantile of a set of variables, and IQR represents the interquartile range.
[0067] like Figure 3 As shown in the figure, the speed SOG and turning rate ROT distribution of a ship are displayed. A single speed threshold may misjudge a high-speed trajectory segment as abnormal, as shown by the yellow dots in the figure. To avoid this problem, this embodiment introduces a threshold for heading change ROT to supplement the insufficiency of the speed threshold. According to the dynamic characteristics of the ship, the heading change is usually small during fast sailing, while the speed decreases but the heading change is significant during operations such as turning. Taking into account the average speed and heading change, this embodiment determines the trajectory segment where both exceed the threshold at the same time, as shown by the gray dots in the figure, as abnormal.
[0068] like Figure 4 As shown in the figure, the speed SOG and turning rate ROT threshold distribution of various ship types in the study area. It can be seen from the figure that the speed threshold is mainly concentrated in the range of 3 to 21 knots. This result shows that compared with the fixed threshold method, the dynamic threshold determination method adopted in this embodiment is more reasonable and flexible.
[0069] S2, using the segmentation-connection-filtering strategy to segment the trajectory and delete the abnormal trajectory points in the trajectory data; specifically including the following sub-steps:
[0070] S2.1. Sub-trajectory segmentation: In view of the diversity of ship types and navigation status, using a single threshold value cannot effectively identify outliers. At the same time, due to the influence of data quality, it is impossible to simply assume that the speed and angle changes of all ships obey the normal distribution. To solve this problem, this embodiment adopts a non-parametric statistical method, that is, the original trajectory is segmented according to the threshold set in step S1, and a breakpoint is set between two trajectory points greater than the threshold, so as to segment the original trajectory into several sub-trajectory segments of different sizes.
[0071] S2.2, sub-trajectory connection: Check whether there is a potential connection relationship, so as to integrate the trajectories; determine whether the end point of each sub-trajectory can be connected with the starting point of its subsequent sub-trajectory (skipping the first subsequent one) one by one. The specific judgment standard is to calculate whether the average speed between the two points is less than the speed threshold in step S1. If it is less, it is considered that the two sub-trajectories can be connected, and the corresponding sub-trajectories are merged into one, and finally a merged sub-trajectory set is obtained; when all sub-trajectories are traversed, the outliers can be separated, and the problem of shared MMSI numbers is solved.
[0072] S2.3, Sub-track filtering: Incomplete sub-tracks in the historical AIS data set are screened and deleted. The number of data points of each sub-track is checked in turn. If there are less than 30, the sub-track is considered abnormal and deleted to ensure that the abnormal track points are deleted; if there are multiple normal sub-tracks, it may indicate that multiple ships share the same MMSI number.
[0073] S3. Interpolate the missing trajectories and adopt different interpolation strategies for missing trajectories of different lengths.
[0074] In order to correct the abnormal trajectory points detected in step S2 and address the problem of missing tracks in AIS data, the ship's movement trajectory is interpolated to ensure the integrity and continuity of the data. This method can not only effectively repair the speed and heading characteristics of the ship, but also the repaired data can be accurately applied to key analysis tasks such as ship emissions estimation and speed statistics.
[0075] To identify missing paths, two key thresholds of 2km and 10km are set; the AIS equipment reports data every 3 minutes. When the ship speed is 25 knots, the sailing distance in 3 minutes is about 2.4km. Therefore, the distance between two track points greater than 2km is considered a missing path.
[0076] For missing paths between 2km and 10km, the ship motion conforms to the kinematic laws and can be interpolated using the kinematic fitting method; for missing paths greater than 10km, this usually indicates not only a signal problem but may also involve route changes or nonlinear motion; therefore, a long-distance trajectory interpolation method is used, taking into account historical route data and ship characteristics to handle more complex trajectory reconstruction tasks.
[0077] This embodiment develops corresponding kinematic and adjustment models for different missing track distances to meet the needs of track repair in various scenarios. In this embodiment, the number of points required for interpolation is determined based on the distance difference between two points, and interpolation is performed at equal time intervals. The timestamp of the interpolation point is calculated using the following formula:
[0078]
[0079] Among them, the set {T u} represents the timestamp set of the interpolation points, T s and T e The timestamps of the start and end points of the missing segment, t e represents the time interval between two interpolation points, n represents the number of interpolation points, S represents the straight-line distance between the start and end points of the missing segment, and St represents the preset distance interval threshold.
[0080] For short-distance missing data, this embodiment proposes an innovative "motion-adjustment" interpolation model to reconstruct the lost track segments. First, the track data is projected onto the Mercator coordinate system because the coordinate system can better maintain the geometric characteristics of the local area and facilitate subsequent mathematical processing. Through coordinate transformation, the ship motion in three-dimensional space is converted into a problem on a two-dimensional plane, corresponding to the longitude and latitude directions respectively. Next, according to the ship's ground speed SOG and heading angle COG, the ship speed is decomposed into speed components in the east-west direction and the north-south direction using the following formula:
[0081]
[0082] in, represents the velocity component of the ship in the east-west direction, It represents the velocity component in the north-south direction, SOG represents the speed over the ground (unit: meter per second), and COG represents the coordinate azimuth of the ship's heading.
[0083] For each direction, the kinematic formula is used to simulate the movement path of the ship from the starting point of the missing segment to any time t; let t1 and t2 represent the timestamps of the starting point and the end point of the missing segment respectively, S(t) represents the distance traveled by the ship from t1 to time t, v(t) and a(t) represent the velocity and acceleration of the point respectively; through integration, the following formula is obtained:
[0084] .
[0085] When short-distance trajectory data is missing, the missing part usually appears as a straight line or a simple curve. Therefore, this embodiment proposes an assumption that the ship moves in a straight line with uniform acceleration in the missing section. Although this assumption simplifies the ship's motion and may not cover all actual situations, it provides a starting point for trajectory interpolation.
[0086] Assuming that the acceleration of the ship remains constant within the missing segment, the position of the interpolated point can be calculated using the velocity and timestamp of the endpoint trajectory point:
[0087]
[0088] Among them, L(t i) represents the coordinates of the simulated motion in this direction, D s Indicates the coordinates of the starting point of the missing segment in this direction, t i represents the time interval from the interpolation point to the starting point of the missing segment, a represents the acceleration of the missing segment, and v s and v e Respectively represent the speed of the starting point and the end point of the missing segment, T i Indicates that the interpolation point is a timestamp, T s and T e Timestamps indicating the start and end of the missing segment, respectively.
[0089] In order to reduce the difference between the simulated path and the actual path, this embodiment calculates the cumulative error between the kinematic simulation end point and the actual missing segment end point. This error will be reasonably distributed to each interpolation point according to the adjustment model to ensure the accuracy of the interpolation result, as shown in the following formula:
[0090] .
[0091] The adjustment model constructed by the present embodiment utilizes speed information to assign weights to the interpolation points, and reasonably distributes the accumulated error; Since the time intervals between the interpolation points are the same, but the distance intervals caused by different speeds are different, as the distance increases, uncertainty also increases therewith, therefore, the speed size is used as weight to calculate the correction value of each interpolation point:
[0092]
[0093] Among them, u(t i ) represents the correction value of each interpolation point, and b is a constant term; Indicates the cumulative error in this direction, D e represents the coordinates of the end point of the missing segment in this direction, L(t e ) represents the coordinates of the end point of the kinematic model in this direction.
[0094] Therefore, the final difference model is:
[0095]
[0096] Among them, S(t i ) represents the coordinates of the i-th interpolation point, L(t i ) represents the coordinates of the kinematic simulation of the i-th interpolation point, u(t i ) represents the correction value of the i-th interpolation point.
[0097] like Figure 5As shown, the accuracy comparison between the short-distance interpolation model and other interpolation models is demonstrated. It can be seen that the method of this embodiment is more effective. This is because the interpolation model constructed in this embodiment not only takes into account the motion characteristics of the ship, but also reduces the impact of errors through weight allocation.
[0098] When dealing with the problem of missing long-distance ship trajectory data, it is challenging to directly establish a motion model due to the large intervals between trajectory points and their variable shapes. However, ship trajectories tend to show certain similarities. Studies have found that the trajectory points of a ship and the trajectory points of other ships in a limited area around it have a high consistency in the direction of navigation. This is mainly attributed to the combined effects of factors such as channel conditions, economic benefits and safety considerations. These factors cause ships to tend to travel along specific channels, and maneuvering behaviors (turning, acceleration, deceleration) tend to occur in specific areas, making ship trajectories show a high degree of similarity. Based on this finding, this embodiment adopts a similar trajectory migration strategy to repair the missing segments, and by screening similar trajectory segments in historical data, it ensures that the reconstructed trajectory can accurately reflect the motion characteristics of the ship.
[0099] Since these factors are relatively stable in a short period of time, this embodiment first screens out trajectories similar to the target trajectory from the ship trajectory database of the current month; if no similar trajectory is found, it indicates that the current trajectory is located in an open sea area with few ships, and a short-distance interpolation model is used for repair; the key to screening is to select trajectory segments that meet the following expected values.
[0100] For long-distance deletions, the following rules are used to filter candidate tracks:
[0101] Position screening: based on the two end points P of the missing segment start and P end , set a rectangular area within 0.5 km around each endpoint, filter out the trajectory point table in the area, and connect the two tables through MMSI to obtain all candidate trajectory segments C Tracks , as shown below:
[0102]
[0103] Among them, C Tracks represents the set of ship trajectory pairs that meet the conditions; P s and P e Respectively represent the starting and ending trajectory points of the missing segment; Rect(P,0.5) defines an area with a radius of 0.5 km centered at point P; P s MMSI and P e .MMSI indicates the MMSI number of the starting point and the ending point respectively.
[0104] Time screening: using the time difference of missing segments As the expected value, the candidate trajectory segments whose time difference differs from the expected value by more than 60 seconds are excluded, as shown in the following formula:
[0105]
[0106] in, Represents the time difference of candidate trajectory segments.
[0107] Points screening: Set the expected value n of points based on the time difference, and exclude the trajectory segments where the difference between the points and the expected value exceeds 5 points, as shown in the following formula:
[0108]
[0109] Among them, n c The number of trajectory points representing the candidate trajectory segment.
[0110] In order to score the similarity of the candidate trajectories, this embodiment selects the left endpoint of the target trajectory and its first four consecutive trajectory points, as well as the right endpoint and its last four consecutive trajectory points to construct the target trajectory segment T g ; For each candidate trajectory, the same method is used to select its starting point, end point and four adjacent points to form a candidate trajectory segment T c ; Each trajectory segment consists of eight trajectory points; Then the similarity between the two trajectories is calculated using the pairwise sum distance Sum-of-Pairs Distance method:
[0111]
[0112] Among them, d(P g,i P c,i ) represents the i-th point P in the target trajectory segment g,i and the i-th point P in the candidate trajectory segment c,i The Euclidean distance between .
[0113] For long-distance missing, all trajectory points between the starting point and the end point of the candidate trajectory with the highest score are combined into a migration trajectory T best Migrate to the missing segment of the target trajectory; first calculate the time from each trajectory point to the starting point and the distance traveled in the x direction and the distance traveled in the y direction according to the timestamp of the trajectory point; use the cubic spline function to fit the function relationship for trajectory migration, the formula is:
[0114]
[0115] Wherein, x(t) and y(t) represent the abscissa and ordinate of the interpolation point at time t respectively; a3, a2, a1, a0 are the coefficients of the abscissa polynomial; b3, b2, b1, b0 are the coefficients of the ordinate polynomial, which are obtained by fitting the trajectory point data of the migration trajectory segment.
[0116] Then calculate the ratio of the time difference of the migration trajectory to the time difference of the missing segment of the target trajectory , map the timestamp of the interpolation point to the elapsed time, as follows:
[0117]
[0118] in, Indicates the time difference proportional coefficient, t u Indicates the interpolation point timestamp, t start Indicates the missing segment start timestamp.
[0119] Substitute the mapped timestamp into the cubic spline function, calculate the coordinates of the interpolation point under the Mercator projection, and then project it back to the WGS84 coordinate system to obtain the spatial coordinates of the interpolation point (lon i ,lat i ), complete the interpolation of long distance trajectories.
[0120] like Figure 6 As shown in FIG. 1 , the comparison effect between the comprehensive short-distance and long-distance interpolation method proposed in this embodiment and other interpolation methods is shown. When the noise level is low, the present embodiment has the best accuracy, while other methods perform relatively poorly. As the noise level increases, the present embodiment shows better robustness than other methods. Figure 7 As shown, the comparison of the data before and after processing of the inland river area and the coastal area in this embodiment is shown; Figure 8 As shown, several typical trajectories are displayed, and the implementation method shows superior performance in ship trajectory reconstruction.
[0121] The method of this embodiment uses the box plot method to set the threshold, combined with the dynamic threshold method of ship speed and heading changes, which is more reasonable and flexible, can effectively avoid the error caused by a single speed threshold, and significantly improves the recognition accuracy of abnormal trajectories; at the same time, the "segmentation-connection-filtering" strategy is adopted to cope with the difficulty of outlier detection caused by data quality or diversity of ship types. Through precise sub-trajectory segmentation and integration, the problem of multiple ships sharing MMSI numbers is effectively solved, and the impact of erroneous data is greatly reduced.
[0122] The method of this embodiment combines the interpolation method of kinematics and adjustment model to deal with short-distance trajectory loss. This method significantly reduces the difference between the simulated path and the actual path through a reasonable error allocation mechanism, and is significantly better than the traditional method in terms of accuracy. It also adopts a similar trajectory migration strategy to deal with long-distance trajectory loss. By screening and similarity evaluation of historical trajectories, the rationality and accuracy of the interpolation results are ensured. Especially in the case of high noise levels, this method shows better robustness. Through experimental verification, the method of this embodiment shows superior performance in processing actual AIS data, and can effectively restore the missing ship trajectory, providing reliable data support for maritime traffic safety and waterway management.
[0123] In addition to the above embodiments, the present invention may also have other implementation modes. Any technical solution formed by equivalent replacement or equivalent transformation falls within the protection scope required by the present invention.
Claims
1. A ship track reconstruction method based on AIS data quality optimization, characterized by: The following steps are involved: S1. Use the box plot method to set speed thresholds and turning rate thresholds for each ship; S2, using the segmentation-connection-filtering strategy to segment the trajectory and delete the abnormal trajectory points in the trajectory data; S3, interpolate the missing trajectories, and adopt different interpolation strategies for missing trajectories of different lengths; In step S3, the trajectory with a distance between two trajectory points greater than 2km and less than or equal to 10km is regarded as a short-distance missing trajectory, and the trajectory with a distance between two trajectory points greater than 10km is regarded as a long-distance missing trajectory; for short-distance missing, the motion-adjustment interpolation model is adopted to reconstruct the trajectory by assuming uniformly accelerated rectilinear motion; for long-distance missing, the strategy of migrating similar historical trajectories is adopted to screen similar trajectory segments in historical data; In step S3, the number of points required for interpolation is determined based on the distance difference between the two points, and interpolation is performed at equal time intervals. The timestamp of the interpolation point is calculated using the following formula: Among them, the set {T u } represents the timestamp set of the interpolation points, T s and T e The timestamps of the start and end points of the missing segment, t e represents the time interval between two interpolation points, n represents the number of interpolation points, S represents the straight-line distance between the start and end points of the missing segment, and St represents the preset distance interval threshold; In step S3, for short-distance missing, the ship motion is decomposed into longitude and latitude directions. The operation in either direction is the same. In either direction, assuming that the acceleration of the ship in the missing section remains constant, the kinematic principle is used to simulate the ship trajectory. The formula is: Among them, L(t i ) represents the coordinates of the simulated motion in this direction, D s Indicates the coordinates of the starting point of the missing segment in this direction, t i represents the time interval from the interpolation point to the starting point of the missing segment, a represents the acceleration of the missing segment, and v s and v e Respectively represent the speed of the starting point and the end point of the missing segment, T i Indicates that the interpolation point is a timestamp, T s and T e The timestamps representing the start and end points of the missing segment, respectively; In step S3, the interpolation result is corrected using the adjustment principle, the cumulative error between the kinematic simulation endpoint and the actual missing segment endpoint is calculated, the velocity information is used to assign weights to the interpolation points, and the cumulative error is distributed; the velocity size is used as the weight to calculate the correction value of each interpolation point, as shown in the following formula: Among them, u(t i ) represents the correction value of each interpolation point, and b is a constant term; Indicates the cumulative error in this direction, D e represents the coordinates of the end point of the missing segment in this direction, L(t e ) represents the coordinates of the end point of the kinematic model in this direction; therefore, the final difference model is: Among them, S(t i ) represents the coordinates of the i-th interpolation point, L(t i ) represents the coordinates of the kinematic simulation of the i-th interpolation point, u(t i ) represents the correction value of the i-th interpolation point; In step S3, for long-distance missing, the following rules are used to filter candidate trajectories: Position screening: based on the two end points P of the missing segment start and P end , set a rectangular area within 0.5 km around each endpoint, filter out the trajectory point table in the area, and connect the two tables through MMSI to obtain all candidate trajectory segments C Tracks , as shown below: Among them, C Tracks represents the set of ship trajectory pairs that meet the conditions; P s and P e Respectively represent the starting and ending trajectory points of the missing segment; Rect(P,0.5) defines an area with a radius of 0.5 km centered at point P; P s MMSI and P e .MMSI indicates the MMSI number of the starting point and the ending point respectively; Time screening: using the time difference of missing segments As the expected value, the candidate trajectory segments whose time difference differs from the expected value by more than 60 seconds are excluded, as shown in the following formula: in, represents the time difference of candidate trajectory segments; Points screening: Set the expected value n of points based on the time difference, and exclude the trajectory segments where the difference between the points and the expected value exceeds 5 points, as shown in the following formula: Among them, n c The number of trajectory points representing the candidate trajectory segment; In step S3, for long-distance missing, the left endpoint of the target trajectory and its first four consecutive trajectory points, as well as the right endpoint and its last four consecutive trajectory points are selected to construct the target trajectory segment T g ; For each candidate trajectory, the same method is used to select its starting point, end point and four adjacent points to form a candidate trajectory segment T c ;Each trajectory segment consists of eight trajectory points; The similarity between these two trajectories is then calculated using the pairwise sum distance method: Among them, d(P g,i P c,i ) represents the i-th point P in the target trajectory segment g,i and the i-th point P in the candidate trajectory segment c,i The Euclidean distance between In step S3, for long-distance missing points, firstly, the time from each trajectory point to the starting point and the distance traveled in the x direction and the distance traveled in the y direction are calculated according to the timestamp of the trajectory point; the functional relationship is fitted using the cubic spline function to migrate the trajectory, and the formula is: Where x(t) and y(t) represent the abscissa and ordinate of the interpolation point at time t respectively; a3, a2, a1, a0 are the coefficients of the abscissa polynomial; b3, b2, b1, b0 are the coefficients of the ordinate polynomial; Then calculate the ratio of the time difference of the migration trajectory to the time difference of the missing segment of the target trajectory , map the timestamp of the interpolation point to the elapsed time, as follows: in, Indicates the time difference proportional coefficient, t u Indicates the interpolation point timestamp, t start Indicates the missing segment start timestamp.
2. The method for ship trajectory reconstruction based on AIS data quality optimization according to claim 1, characterized in that: In step S1, a historical AIS data set is selected, all ship track points of the same MMSI are screened out, and the track points are sorted in ascending time order, and the average speed and turning rate between two adjacent track points are calculated; a box plot method is used to set dynamic thresholds on the two features of speed and turning rate, and the formula is: Where T represents the maximum threshold, Q1 and Q3 represent the 25% quantile and 75% quantile of a set of variables, and IQR represents the interquartile range.
3. The method for ship trajectory reconstruction based on AIS data quality optimization according to claim 1, characterized in that: The step S2 specifically includes the following sub-steps: S2.1, sub-track segmentation: according to the threshold value set in step S1, the original track is segmented into breakpoints, and a breakpoint is set between two track points greater than the threshold value, so as to segment the original track into several sub-track segments of different sizes; S2.2, sub-trajectory connection: Check whether there is a potential connection relationship, so as to integrate the trajectories; judge whether the end point of each sub-trajectory can be connected with the starting point of its subsequent sub-trajectory one by one. The specific judgment standard is to calculate whether the average speed between the two points is less than the speed threshold in step S1. If so, it is considered that the two sub-trajectories can be connected, and the corresponding sub-trajectories are merged into one, and finally a merged sub-trajectory set is obtained; S2.3, Sub-trajectory filtering: Incomplete sub-trajectories in the historical AIS data set are screened and deleted. The number of data points of each sub-trajectory is checked in turn. If the number is less than 30, the sub-trajectory is considered abnormal and deleted.
Citation Information
Patent Citations
Navigation AIS data restoration method based on generative adversarial neural network
CN116758403A
A spatio-temporal trajectory compression method based on trajectory dictionary
CN109033141A
A ship trajectory restoration method based on vector interpolation
CN109726355A