A State-Adaptive Track Interpolation Method for Sparse AIS Trajectories
Patent Information
- Application Number
- CN202610097401.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-23
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2046-01-23
AI Technical Summary
本发明有效解决了传统插值方法在稀疏条件下产生的落陆、漂移、终点偏移及异常轨迹误用等问题,显著提升AIS航迹数据的完整性、地理合规性、分析可靠性与高精度定位水平,可广泛应用于海事监管、船舶行为建模与智能航运系统
[0014]1,传统方法将低速航行与真实停泊(靠泊/锚泊)混为一谈,导致对停泊段进行不必要的“插值”或保留GPS高频漂移噪声,造成轨迹抖动、泊位模糊,严重影响高精度定位能力;同时将统计鲁棒估计(经纬度中位数)引入AIS静止段处理,而非沿用传统均值,是针对GPS噪声特性的独创对策。引入双阈值判据(公式:且
),首次在插值前精准分离“减速”与“停泊”,避免对有效停泊段误操作;创新性采用中位数聚合公式(
与
,而非均值或首末点平均,中位数对异常跳变点(如GPS突跳)具有强鲁棒性,能有效抑制漂移,精确锁定真实泊位,显著提升港口行为分析精度与高精度定位水平。
Smart Images

Figure CN122388334B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent shipping and maritime big data processing technology, and relates to a state-adaptive track interpolation method for sparse AIS trajectories. Background Technology
[0002] Automatic Identification System (AIS) output data is of indispensable value in areas such as real-time ship monitoring, navigation safety assurance, maritime traffic situation analysis, port scheduling optimization, and even maritime emergency rescue. However, in practical applications, raw AIS data often exhibits high sparsity due to communication interruptions, equipment hibernation, or signal obstruction, resulting in severe trajectory breaks, necessitating robust interpolation methods to complete the data.
[0003] Current AIS trajectory interpolation techniques have limited application scenarios and lack state awareness. There is a lack of trajectory interpolation methods that are state-adaptive for sparse AIS trajectories. Specifically, this is reflected in the following:
[0004] (1) Limitations of applicable scenarios: Existing methods are mainly designed for tracks with dense points and good continuity. Under highly sparse conditions where tracks are not updated for several hours, the performance drops sharply and may even cause serious distortion. At the same time, they generally lack land-sea mask verification and dynamic avoidance mechanisms, and the interpolation points may fall on land, which violates the basic common sense of ship navigation. For example, in application number: 202310948548.8, invention title: A method, electronic device and storage medium for repairing ship navigation tracks, the interpolation method or historical track clustering algorithm is selected according to the missing distance. In scenarios with extremely high sparsity or multiple navigation state transitions, this method still lacks fine modeling of state transitions and geographical compliance guarantee mechanisms, and it is difficult to fully adapt to the high robustness and high realism of track repair requirements in actual maritime supervision and navigation analysis.
[0005] (2) Lack of state perception: It is unable to distinguish between different motion states such as "navigation" and "berthing / anchoring". For sparse trajectories containing state transitions (such as high-speed navigation → stationary berthing), a single model interpolation is still used, resulting in the generation of false trajectories with unreasonable physical properties. For example, in application number: 202511263543.7, invention title: A method for fitting and optimizing the full-range trajectory of a ship with refined perception, although the trajectory is separated into straight and curved stages and fitted in segments by deep learning to improve the fitting accuracy, its model still mainly relies on the historical trajectory shape for division and fitting. It fails to fully combine the real-time motion state of the ship (such as sudden changes in speed, berthing signs) for dynamic state discrimination and interpolation constraints. In the case of frequent state transitions or sparse segments, trajectory segments that do not conform to the actual navigation logic may still be generated. Summary of the Invention
[0006] To address the issue of trajectory discontinuity caused by sparse, missing, or long-term unupdated AIS data, this invention discloses a state-adaptive trajectory interpolation method for sparse AIS trajectories. First, the invention identifies stationary points in the original trajectories of the ship's AIS trajectory dataset. For long-term berthing segments, the median latitude and longitude is used to suppress GPS drift, and the final heading is retained to reflect the berthing direction, thereby improving high-precision positioning capabilities. Subsequently, a trajectory validity verification mechanism is introduced. If the time interval between transitions from moving state to stationary state or from stationary state to moving state exceeds a preset threshold, the entire trajectory is deemed invalid, avoiding the generation of physically unreasonable interpolation results. For valid trajectories, a state-adaptive recursive strategy is used for interpolation. Internal interpolation is based on a uniformly accelerated motion model, combined with dynamic constraints on the advancement step size using the remaining great circle distance from the current point to the endpoint, ensuring consistency between displacement, velocity, and time. Forward and backward extrapolation interpolations employ point-by-point recursive strategies using the reverse heading and the final heading, respectively. All interpolation points are verified using a land-sea mask. If a point falls on land, it starts from the previous valid position and attempts to deflect its course in both directions to find a feasible point at sea. If avoidance fails, a circuit breaker mechanism is triggered. This invention effectively solves the problems of landing, drifting, endpoint offset, and misuse of abnormal trajectories caused by traditional interpolation methods under sparse conditions. It significantly improves the integrity, geographical compliance, analytical reliability, and high-precision positioning level of AIS track data, and can be widely used in maritime supervision, ship behavior modeling, and intelligent shipping systems.
[0007] The objective of this invention is specifically achieved through the following technical solutions:
[0008] This invention discloses a state-adaptive trajectory interpolation method for sparse AIS trajectories, the method comprising:
[0009] Step 1: Based on the ship speed threshold, identify stationary points in the ship AIS trajectory dataset; identify continuous stationary points that meet the sailing time threshold as stationary segments, use the median of latitude and longitude to denoise the stationary segments and mark them as stationary; mark the remaining data as moving to obtain the preprocessed trajectory data.
[0010] Step 2: In chronological order, the preprocessed track data of moving and stationary states are combined into a state sequence. Tracks in the state sequence with a time interval between adjacent state transitions that is greater than the transition time threshold are removed, and the remaining state sequences are retained as valid tracks.
[0011] Step 3: A state adaptive recursive strategy is formed by the internal interpolation method, the forward interpolation method, and the backward interpolation method. The position of the interpolation point in the effective track is used as the adaptive triggering condition of the adaptive recursive strategy to interpolate the effective track and obtain the target track.
[0012] Step 4: Perform land-sea mask verification on the target track. If it falls into the land area, start from the previous valid position and try to deflect the course in both directions to find a feasible point in the sea area. If the avoidance fails, the circuit breaker mechanism is triggered, and the target track is verified as an invalid verification track; otherwise, the target track is verified as a valid verification track.
[0013] The beneficial effects of this invention are:
[0014] 1. Traditional methods conflate low-speed navigation with actual berthing (berthing / anchoring), leading to unnecessary "interpolation" of the berthing segment or the retention of high-frequency GPS drift noise, causing trajectory jitter and berth ambiguity, severely impacting high-precision positioning capabilities. Meanwhile, introducing statistical robust estimation (median latitude and longitude) into the AIS stationary segment processing, instead of using the traditional mean, is a unique countermeasure targeting GPS noise characteristics. A dual-threshold criterion is introduced (formula: and For the first time, it accurately separates "deceleration" and "parking" before interpolation, avoiding misoperation of the effective parking segment; it innovatively adopts the median aggregation formula ( and Instead of the mean or the average of the first and last points, the median is more robust to abnormal jumps (such as GPS jumps), effectively suppressing drift, accurately locating the real berth, and significantly improving the accuracy of port behavior analysis and high-precision positioning.
[0015] 2. This invention is the first to use a "jump time threshold" as a criterion for track validity, rather than relying solely on point density or velocity continuity, representing a paradigm shift in sparse AIS data quality assessment. For extremely sparse tracks, traditional methods still force interpolation, generating a false straight-line track that "jumps directly from navigation to berth," severely violating the physical process of ship deceleration and turning during berthing, leading to misjudgments of ship behavior. This invention uses a "jump time threshold" as a track reliability criterion (formula: if...). (If the trajectory is invalid, then the trajectory is invalid). Based on the typical berthing duration of ships, a reasonable threshold is set. It can effectively filter long-interval data caused by communication interruptions, eliminate false trajectory pollution analysis system from the source, and ensure the reliability of high-precision positioning output.
[0016] 3. Traditional interpolation (such as linear interpolation) assumes uniform linear motion throughout the entire path, leading to endpoint offset (integral displacement ≠ actual path length), velocity distortion (the uniform speed assumption does not match the actual deceleration and berthing process), and abrupt heading changes (it does not consider dynamic heading adjustments "towards the endpoint"). In contrast, the state-adaptive recursive interpolation strategy meets the interpolation requirements of sparse tracks with different motion modes. Within the track-internal recursive strategy, the "uniform acceleration + remaining distance" dual-constraint model is the core formula innovation of this step, unifying kinematic rationality and geometric endpoint alignment into a concise framework, far surpassing traditional interpolation methods. This is based on the remaining great circle distance constraint (…). The system innovatively incorporates the "whether it exceeds the endpoint" criterion into each step of the recursive judgment, ensuring that the trajectory strictly terminates at the original point and that the velocity automatically decays as it approaches the endpoint. This overcomes the inherent flaw of traditional methods where the interpolation endpoint does not coincide with the original point, achieving kinematic self-consistency. The forward extrapolation strategy for the trajectory employs a reverse heading formula (…). The generated trajectory conforms to the "backtracking navigation" logic. The trajectory extrapolation strategy is simple and effective, and is suitable for short-term prediction after departure.
[0017] 4. Interpolation points may fall on land due to GPS errors or model simplification, violating basic maritime navigation principles and leading to errors in nautical chart visualization and ineffective risk assessment. This invention combines a search strategy (bidirectional + stepwise) with a circuit breaker mechanism to form a "trial-failure-circuit breaker" closed loop, providing a complete solution for handling geographical constraints in AIS interpolation. Land and sea mask verification utilizes a global high-precision mask library to ensure geographical compliance. This is achieved through bidirectional stepwise deflection (formula: The method involves simultaneously attempting left / right deflections to avoid getting stuck in local land areas during a one-way search. The deflection process starts from a small angle, prioritizing the preservation of the original course, which aligns with the ship's fine-tuning obstacle avoidance behavior. Ultimately, it ensures that 100% of the output point is located at sea, and that the avoidance path conforms to navigational logic.
[0018] 5. The technical solution disclosed in this invention forms a complete technical closed loop of "preprocessing → filtering → modeling → verification". Through a number of original formulas and judgment logics, it systematically solves the core pain points of sparse AIS interpolation, generates high-quality trajectories with smooth continuity, endpoint alignment and clear state from effective sparse trajectories, and has the integrity, reliability and geographic authenticity required for high-precision positioning. It can be directly used in high-reliability scenarios such as maritime supervision and ship behavior mining. Attached Figure Description
[0019] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0020] Figure 1 This is a flowchart of a state-adaptive trajectory interpolation method for sparse AIS trajectories provided in an embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of the interpolation effect provided in an embodiment of the present invention. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0023] like Figure 1 As shown, this embodiment of the invention provides a state-adaptive trajectory interpolation method for sparse AIS trajectories, the method comprising:
[0024] Step 1: Based on the ship speed threshold, identify stationary points in the ship AIS trajectory dataset; identify continuous stationary points that meet the sailing time threshold as stationary segments, use the median of latitude and longitude to denoise the stationary segments and mark them as stationary; mark the remaining data as moving to obtain the preprocessed trajectory data.
[0025] Track preprocessing data provides a reliable data foundation for subsequent interpolation of sparse AIS tracks.
[0026] Step 2: In chronological order, the preprocessed track data of moving and stationary states are combined into a state sequence. Tracks in the state sequence with a time interval between adjacent state transitions that is greater than the transition time threshold are removed, and the remaining state sequences are retained as valid tracks.
[0027] Based on the moving and stationary states, the validity of the tracks is verified, tracks with excessively large time intervals between adjacent state transitions are eliminated, unreasonable interpolation of extremely sparse tracks is prevented, and the reliability of the data is ensured.
[0028] Step 3: A state adaptive recursive strategy is formed by the internal interpolation method, the forward interpolation method, and the backward interpolation method. The position of the interpolation point in the effective track is used as the adaptive triggering condition of the adaptive recursive strategy to interpolate the effective track and obtain the target track.
[0029] The internal interpolation method is based on a uniformly accelerated motion model and combines the remaining great circle distance from the current point to the end point to dynamically constrain the step size, ensuring that displacement, velocity and time are consistent. The forward interpolation method takes the first point as the starting point and uses the initial heading in reverse, i.e., the initial heading + 180°, to perform point-by-point recursion. The backward interpolation method takes the last point as the starting point and performs point-by-point recursion along the heading of the last point.
[0030] Step 4: Perform land-sea mask verification on the target track. If it falls into the land area, start from the previous valid position and try to deflect the course in both directions to find a feasible point in the sea area. If the avoidance fails, the circuit breaker mechanism is triggered, and the target track is verified as an invalid verification track; otherwise, the target track is verified as a valid verification track.
[0031] After generating each track interpolation point, a land-sea mask verification is immediately performed. A global high-precision land mask library (such as global-land-mask) is called, using the point's latitude and longitude as input, to determine if it is located in a land area. If the verification result is "on land," an avoidance process is initiated. Starting from the previous valid sea position (i.e., the recursive starting point), maintaining the original speed and time step, a "two-way step deflection" attempt is made on the original heading: that is, sequentially using... , … (For example , Generate a new symmetrical heading, with a maximum of [number missing] headings. In each attempt, the landing point is recalculated for each new course, and its location is verified one by one to ensure it is at sea. Once a calculated point passes the sea-land mask verification (i.e., it is at sea), that point is immediately adopted as the final interpolation result, and the course used is recorded. If all... If all attempts fail to find a feasible point at sea, the avoidance is deemed a failure. At this point, the circuit breaker mechanism is triggered, immediately terminating the entire track interpolation process of the current vessel and returning an empty track with a complete structure but no data rows. A clear warning containing MMSI is also output (e.g., "MMSI 413697940: Unable to avoid land, track invalid"), thus ensuring that the output track is 100% located at sea and preventing misjudgments caused by landing points. If it is determined that the target track is located in a sea area, the current latitude and longitude are immediately adopted as the final interpolation result, and the heading used is recorded to verify that the target track is a valid verification track.
[0032] In step one, the method for determining the stationary point in the ship's AIS trajectory dataset based on the ship speed threshold is as follows:
[0033] ;
[0034] In the formula, This indicates whether the data to be judged in the ship AIS trajectory dataset D is a stationary point. If the ship speed in D is... , then is a stationary point; where,
[0035] , ;
[0036] In the formula, For ship AIS trajectory data, Where N is the sequence number, and N is the total number of sequence numbers; For timestamps, Longitude Latitude For speed, For the course.
[0037] Determine the stationary phase of the vessel based on its speed and travel time. Differentiate between navigation and berthing / anchoring activities to avoid mistaking berthing for low-speed navigation.
[0038] In step one, consecutive stationary points that meet the flight time threshold are identified as stationary segments. After denoising the stationary segments using the median latitude and longitude, they are marked as stationary. The remaining data are marked as moving. The method for obtaining the track preprocessing data is as follows:
[0039] S11 will meet the flight time threshold. Continuous stationary points are identified as stationary segments. In the formula, The time of the last point of a series of stationary points. The starting time of the continuous stationary points, The minimum continuous static duration threshold; This is the starting point data for the stationary segment. This represents the data at the end of the stationary segment;
[0040] S12, using the median of latitude and longitude to unify the stationary segment The coordinates, and retain the heading of the final point of the stationary segment. Subsequently, a denoised stationary segment with reduced GPS drift noise is obtained. The point states in the denoised stationary segment are marked as stationary, while the point states outside the denoised stationary segment are marked as moving, thus obtaining the track preprocessing data. Among these, the median latitude and longitude is used to unify the stationary segment. The method for obtaining coordinates is as follows:
[0041] ;
[0042] ;
[0043] In the formula, The median latitude and longitude coordinates of the denoised stationary segment. The median longitude of the stationary segment after noise reduction. It is a function of the median of latitude and longitude. The longitude of the starting point of the stationary segment. The longitude of the last point of the stationary segment; The median latitude of the denoised stationary segment. The latitude of the starting point of the stationary segment. The latitude of the last point of the stationary segment.
[0044] For stationary sections, the median latitude and longitude coordinates are used to unify the coordinates, retain the heading at the end point, suppress GPS drift noise, and preserve the true berthing position and bow direction information.
[0045] In step two, the method for determining a valid track is as follows:
[0046] S21, in chronological order, combine the preprocessed track data of the moving state and the stationary state into a state sequence. :
[0047] ;
[0048] S22, Construct an index set of adjacent state transition points in the state sequence. :
[0049] ;
[0050] S23, identify tracks in the state sequence corresponding to the index set whose time interval between adjacent state transitions is greater than the transition time threshold. If a track is deemed invalid, the processing is terminated and the track is removed. The remaining state sequence with the time interval between adjacent different state transitions meeting the transition time threshold is retained as a valid track. Among them, adjacent different state transitions include: moving state transitioning to stationary state or stationary state transitioning to moving state.
[0051] In the formula, Among adjacent jump points timestamp, Among adjacent jump points timestamp, Indicates the sequence number of adjacent state transition times, and The threshold for the transition time of the maximum transition interval. This is the (i-1)th state sequence.
[0052] Tracks with excessively long intervals between adjacent state transitions are removed to prevent unreasonable interpolation of extremely sparse trajectories and ensure data reliability.
[0053] In step three, the adaptive triggering conditions include:
[0054] S31, when the interpolation point is at the starting point of the valid track. and the end point During this period, interpolation points are generated at fixed time intervals to perform track-interpolation, triggering the track-interpolation method in the adaptive recursive strategy.
[0055] S32, when the interpolation point is earlier than the starting point of the valid track. At that time, forward interpolation of the trajectory is performed, triggering the forward interpolation method in the adaptive recursive strategy;
[0056] S33, when the interpolation point is later than the end point of the valid track. At that time, backward interpolation of the trajectory is performed, triggering the backward interpolation method in the adaptive recursive strategy;
[0057] in, ; ;
[0058] In the formula, The start time of the valid track is the start time of the interpolated track segment within the entire ship's AIS trajectory. The starting longitude of the valid track, The starting latitude of the valid track. The initial speed of the effective track, The starting heading of a valid track; The termination time of the valid track, i.e., the termination time of the interpolated track segment within the entire ship's AIS track. The longitude at which the valid track terminates. The latitude at which the valid track terminates. The speed at which the effective track terminates. The termination heading of a valid track.
[0059] This step only applies to valid tracks (track state='moving'), and uses a state-adaptive recursive strategy for interpolation. Internal interpolation is based on a uniformly accelerated motion model, combined with the dynamic constraint of the remaining great circle distance from the current point to the endpoint to advance the step size, ensuring consistency between displacement, velocity, and time; forward and backward extrapolation use a point-by-point recursive strategy based on the reverse heading and the final heading, respectively, to form a complete interpolated trajectory.
[0060] In step three, the steps of the track-interpolation method are as follows:
[0061] S311, Calculate linear velocity when interpolating within a track:
[0062] ;in,
[0063] ;
[0064] In the formula, The linear velocity during interpolation within the trajectory represents the target velocity; Indicates the proportion of time. Indicates the target time. Indicates the total interpolation duration;
[0065] S312, Calculation of displacement distance based on linear velocity :
[0066] ;
[0067] In the formula, The ship's current speed, The current moment; Indicates the time step. Parameters for speed unit conversion; ;
[0068] S313, distance The remaining distance is called the great circle distance. The calculation method is as follows:
[0069] ;
[0070] In the formula, For the Earth's radius, , ; The current longitude, The current latitude;
[0071] S314, Calculate the actual propulsion distance of the ship from the displacement distance and the great circle distance. ,Depend on Generate latitude and longitude positions of candidate points for interpolation within the flight path. The calculation method is as follows:
[0072] ;
[0073] ;
[0074] in, ;
[0075] In the formula, Indicates that the ship is , Indicates from Pointing to the destination The initial azimuth (in degrees, 0° for true north, and the angle increases clockwise);
[0076] Scenario 1, if The distance the ship traveled was actual speed ;
[0077] Scenario 2, if Only promote And recalculate the actual speed:
[0078] ;
[0079] S315, Interpolation for Land and Sea Avoidance:
[0080] like Located on the sea surface, the target time New interpolation points for internal interpolation of the flight path ;
[0081] like Located on land, then from Starting from the point, the heading increases or decreases each time. They jointly attempted to deflect the object. Each time, the internal interpolated heading angle for each avoidance maneuver... for:
[0082] ;
[0083] In the formula, k is the deflection number. This represents the maximum number of deflections. Indicates the deflection parameter. , Indicates the heading angle index;
[0084] Depend on Update the latitude and longitude positions of candidate points for interpolation within the track. until Located on the sea surface; then the target time Update interpolation points for internal interpolation of the trajectory ;in, The calculation method is as follows:
[0085] ;
[0086] ;
[0087] S316, Determine the interpolation time:
[0088] Repeat steps S311 to S315, performing interpolation recursion within the cyclic track until... .
[0089] In S314, The calculation method is as follows:
[0090] °;will Normalization to ;
[0091] ;
[0092] ;
[0093] In the formula, From point to The instantaneous azimuth angle, for and The difference in longitude.
[0094] In step three, the steps of the forward interpolation method for the track are as follows:
[0095] S321, Set the initial state for forward interpolation of the track. ;in,
[0096] Initial heading for forward interpolation of track °;
[0097] The initial position and velocity of the interpolation are the same as the ship's starting point parameters. The initial heading for interpolation is the reverse of the initial point track, and interpolation is performed in reverse of the track.
[0098] S322, based on the current recursive starting point position of latitude and longitude. At present Target time Time step Current speed Current heading Construct the forward interpolation point of the current trajectory as , The first point value and Similarly, starting with the first point value, the track is extrapolated forward to obtain the latitude and longitude positions of the candidate points for forward interpolation. The calculation method is as follows:
[0099] ;
[0100] ;
[0101] S323, Interpolation for Land-Sea Collision Avoidance:
[0102] like Located on the sea surface, the target time New interpolation point for forward interpolation of the trajectory Among them, the new course °;
[0103] like Located on land, then from Starting from the point, the heading increases or decreases each time. A total of 2 deflection attempts were made. Each time, the forward interpolation heading angle for each avoidance maneuver is... The calculation is as follows:
[0104] ;
[0105] in, ;
[0106] Depend on Update the latitude and longitude positions of candidate points for forward interpolation of the track. until Located on the sea surface, target time The updated interpolation point for the forward interpolation of the trajectory is ;in, The calculation method is as follows:
[0107] ;
[0108] ;
[0109] S324, Determine the interpolation time:
[0110] Repeat steps S322 and S323, performing forward interpolation recursion on the cyclic track until... , This is the end time of the recursion in the forward interpolation of the trajectory, i.e., the time of the first point of the entire ship's AIS trajectory.
[0111] In step three, the steps of the backward interpolation method for the flight path are as follows:
[0112] S331, Set the initial state for track backward interpolation: ;
[0113] The initial position and velocity of the interpolation are the same as the parameters of the ship's termination point. ;
[0114] S332, based on the current recursive starting point position of latitude and longitude. At present Target time Time step Current speed Current heading Construct the backward interpolation point of the current trajectory as , The first point value and Similarly, starting with the initial point value, the trajectory is extrapolated outwards to obtain the latitude and longitude positions of candidate points for backward interpolation. The calculation method is as follows:
[0115] ;
[0116] ;
[0117] S333, Interpolation for Land and Sea Avoidance:
[0118] like Located on the sea surface, the target time The new interpolation point for backward interpolation of the trajectory is ;
[0119] like Located on land, then from Starting from the point, the heading increases or decreases each time. A total of 2 deflection attempts were made. Each time, the backward interpolation heading angle for each avoidance maneuver. The calculation method is as follows:
[0120] ;
[0121] in, ;
[0122] Depend on Update the latitude and longitude positions of candidate points for backward interpolation of the track. Until Located on the sea surface, target time The updated interpolation point for the backward interpolation of the trajectory is ;in, The calculation method is as follows:
[0123] ;
[0124] ;
[0125] S334, Determine the interpolation time:
[0126] Repeat steps S332 and S333, performing cyclical backward interpolation until... , This is the end time of the recursion in the backward interpolation of the trajectory, i.e., the end time of the entire ship's AIS trajectory.
[0127] In step four, the method for verifying the target track using land and sea masking is as follows:
[0128] By using masking technology to separate land and sea areas in the target trajectory, and calling up a land mask library, the system determines whether the target trajectory is located in a land area using its current latitude and longitude as input.
[0129] If the target track falls into the land area at the current moment, the position where it fell into the sea area at the previous moment is taken as the valid position. The original speed and time step remain unchanged, and the vessel attempts to deflect its course in both directions to find a feasible point in the sea area. If both deflections result in the vessel falling into the land area, the avoidance is marked as a failure, triggering the circuit breaker mechanism. The entire track interpolation process of the current vessel is immediately terminated, and an empty track with a complete structure but no data is returned. The target track is then verified as an invalid verification track. If the target track falls into the sea area at the current moment, the current latitude and longitude are immediately adopted as the final interpolation result, and the heading used is recorded. The target track is then verified as a valid verification track.
[0130] The circuit breaker mechanism prevents the generation of false land trajectories, improving the reliability and security of output data.
[0131] Verification experiment:
[0132] To verify the effectiveness of the technical solution of the present invention, a verification experiment is provided for illustration:
[0133] To verify the effectiveness and inventiveness of this invention, typical sparse AIS trajectory data (Table 1: simulated ship track points in the circuit breaker trigger scenario, Table 2: simulated ship track points in the effective interpolation scenario) were selected for experiments.
[0134] Table 1
[0135]
[0136] As shown in Table 1, Segment 1→2: 2 hours of constant speed navigation (effective interpolation segment); Segment 2→3: 4 hours of no data (navigation → berthing jumps to 4 hours). =3 hours); Section 3→4: 30-minute stop (noise reduction during the still section) =300 seconds). The interpolation period is from 8:00:00 on June 1, 2025 to 14:30:00 on June 1, 2025. The specific steps are as follows:
[0137] Step 1: Stationary point identification and stationary segment denoising.
[0138] Identification: The speed of points 3 and 4 is 0 knots, and the interval is 1800 seconds, which is greater than the minimum continuous static duration threshold. Therefore, it is determined to be a static segment.
[0139] Noise reduction: Median longitude = median(122.3000, 122.3001) = 122.30005, median latitude = median(29.5000, 29.4999) = 29.49995, heading end point preserved = 90.0°, tag state = 'stationary'.
[0140] Effect: Eliminates GPS drift and accurately locates berths.
[0141] Step 2: Trajectory validity check (circuit breaker trigger). Traditional methods will forcibly generate interpolation points (straight line + constant speed) between 10:00 and 14:00, resulting in serious distortion.
[0142] State sequence: [moving, moving, stationary, stationary];
[0143] Jump point: Index 2 (point 2 → point 3);
[0144] Jump interval: 4 hours between 10:00 and 14:00, which is greater than the jump time threshold;
[0145] Judgment: The entire trajectory is invalid.
[0146] Output: Empty data and message "Invalid track".
[0147] Table 2
[0148]
[0149] As shown in Table 2, the interpolation period is from 8:00:00 on June 1, 2025 to 9:30:00 on June 1, 2025. The specific steps are as follows:
[0150] Step 1: No stationary segments were found and no noise reduction is required.
[0151] Step 2: The jump time interval is 1 hour, which is less than the minimum continuous static duration threshold, so the trajectory is valid.
[0152] Step 3: Internal Interpolation: Interpolate at 10-minute intervals between 08:00 and 09:30: Use a distance-driven model, with the dynamic heading pointing to the endpoint as the interpolation is recursively applied; the remaining distance constraint ensures accurate alignment at 09:00; Interpolate at 10-minute intervals between 09:00 and 09:30: Use a distance-driven model, with the dynamic heading pointing to the endpoint as the interpolation is recursively applied; the remaining distance constraint ensures accurate alignment at 09:30.
[0153] Step 4: All points pass the land and sea verification and the complete trajectory is output.
[0154] The visualization effect of interpolating massive sparse AIS data on a global scale is as follows: Figure 2 As shown in the figure, each colored line segment represents the complete trajectory of a ship, which is generated from the original sparse points using the "state-adaptive trajectory interpolation" method of this invention. Figure 2 It can be clearly observed in the middle:
[0155] (1) High track integrity: Even in open sea areas such as the Pacific and Atlantic Oceans, tracks that might have been broken due to signal loss are now smoothly and continuously connected to form a complete navigation path, which significantly improves the global ship dynamic perception capability.
[0156] (2) Strong geographical compliance: All tracks are strictly located in the ocean area, with no line segments extending to the land. This directly verifies the effectiveness of the "sea and land mask verification" and "two-way deflection avoidance" mechanism of the present invention, and ensures the physical authenticity of the data.
[0157] (3) Clear state distinction: In densely populated port areas (such as East Asia and Western Europe), changes in the color or density of the track reflect the transition between the "navigation" and "berthing / anchoring" states of the ship. This is thanks to the "stationary segment identification and noise reduction" function of this invention, which provides a high-quality data foundation for port behavior analysis.
[0158] Depend on Figure 2 As can be seen, through the "state-adaptive interpolation" of this invention, fragmented AIS data worldwide can be transformed into a continuous, complete, geographically compliant, and state-clear high-quality trajectory network. This not only solves the problems of landing, drift, and endpoint offset that arise under sparse conditions in traditional methods, but also directly serves core applications such as global maritime supervision, shipping safety situational awareness, port efficiency optimization, and high-precision trajectory positioning, fully demonstrating the enormous benefits and creativity of this invention in enhancing the value of AIS data.
[0159] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A state-adaptive trajectory interpolation method for sparse AIS trajectories, characterized in that, The method includes: Step 1: Based on the ship speed threshold, identify stationary points in the ship AIS trajectory dataset; identify continuous stationary points that meet the sailing time threshold as stationary segments, use the median of latitude and longitude to denoise the stationary segments and mark them as stationary; mark the remaining data as moving to obtain the preprocessed trajectory data. Step 2: In chronological order, the preprocessed track data of moving and stationary states are combined into a state sequence. Tracks in the state sequence with a time interval between adjacent state transitions that is greater than the transition time threshold are removed, and the remaining state sequences are retained as valid tracks. Step 3: A state adaptive recursive strategy is formed by interpolating the internal trajectory, forward trajectory interpolation, and backward trajectory. The position of the interpolation point in the valid trajectory is used as the adaptive trigger condition for the adaptive recursive strategy. The valid trajectory is interpolated to obtain the target trajectory. The adaptive trigger conditions include: S31, when the interpolation point is at the starting point of the valid track. and the end point During this period, interpolation points are generated at fixed time intervals to perform track-interpolation, triggering the track-interpolation method in the adaptive recursive strategy. S32, when the interpolation point is earlier than the starting point of the valid track. At that time, forward interpolation of the trajectory is performed, triggering the forward interpolation method in the adaptive recursive strategy; S33, when the interpolation point is later than the end point of the valid track. At that time, backward interpolation of the trajectory is performed, triggering the backward interpolation method in the adaptive recursive strategy; in, ; ; In the formula, The start time of the valid track is the start time of the interpolated track segment within the entire ship's AIS trajectory. The starting longitude of the valid track, The starting latitude of the valid track. The initial speed of the effective track, The starting heading of a valid track; The termination time of the valid track, i.e., the termination time of the interpolated track segment within the entire ship's AIS track. The longitude at which the valid track terminates. The latitude at which the valid track terminates. The speed at which the effective track terminates. The termination heading of a valid track; Step 4: Perform land-sea mask verification on the target track. If it falls into the land area, start from the previous valid position and try to deflect the course in both directions to find a feasible point in the sea area. If the avoidance fails, the circuit breaker mechanism is triggered, and the target track is verified as an invalid verification track; otherwise, the target track is verified as a valid verification track.
2. The state-adaptive trajectory interpolation method for sparse AIS trajectories as described in claim 1, characterized in that, In step one, the method for determining the stationary point in the ship's AIS trajectory dataset based on the ship speed threshold is as follows: ; In the formula, This indicates whether the data to be judged in the ship AIS trajectory dataset D is a stationary point. If the ship speed in D is... , then is a stationary point; where, , ; In the formula, For ship AIS trajectory data, Where N is the sequence number, and N is the total number of sequence numbers; For timestamps, Longitude Latitude For speed, For the course.
3. The state-adaptive trajectory interpolation method for sparse AIS trajectories as described in claim 2, characterized in that, In step one, consecutive stationary points that meet the flight time threshold are identified as stationary segments. After denoising the stationary segments using the median latitude and longitude, they are marked as stationary. The remaining data are marked as moving. The method for obtaining the track preprocessing data is as follows: S11 will meet the flight time threshold. Continuous stationary points are identified as stationary segments. In the formula, The time of the last point of a series of stationary points. The starting time of the continuous stationary points, The minimum continuous static duration threshold; This is the starting point data for the stationary segment. This represents the data at the end of the stationary segment; S12, using the median of latitude and longitude to unify the stationary segment The coordinates, and retain the heading of the final point of the stationary segment. Subsequently, a denoised stationary segment with reduced GPS drift noise is obtained. The point states in the denoised stationary segment are marked as stationary, while the point states outside the denoised stationary segment are marked as moving, thus obtaining the track preprocessing data. Among these, the median latitude and longitude is used to unify the stationary segment. The method for obtaining coordinates is as follows: ; ; In the formula, The median latitude and longitude coordinates of the denoised stationary segment. The median longitude of the stationary segment after noise reduction. It is a function of the median of latitude and longitude. The longitude of the starting point of the stationary segment. The longitude of the last point of the stationary segment; The median latitude of the denoised stationary segment. The latitude of the starting point of the stationary segment. The latitude of the last point of the stationary segment.
4. The state-adaptive trajectory interpolation method for sparse AIS trajectories as described in claim 3, characterized in that, In step two, the method for determining a valid track is as follows: S21, in chronological order, combine the preprocessed track data of the moving state and the stationary state into a state sequence. : ; S22, Construct an index set of adjacent state transition points in the state sequence. : ; S23, identify tracks in the state sequence corresponding to the index set whose time interval between adjacent state transitions is greater than the transition time threshold. If a track is deemed invalid, the processing is terminated and the track is removed. The remaining state sequence with the time interval between adjacent different state transitions meeting the transition time threshold is retained as a valid track. Among them, adjacent different state transitions include: moving state transitioning to stationary state or stationary state transitioning to moving state. In the formula, Among adjacent jump points timestamp, Among adjacent jump points timestamp, Indicates the sequence number of adjacent state transition times, and The threshold for the transition time of the maximum transition interval. This is the (i-1)th state sequence.
5. The state-adaptive trajectory interpolation method for sparse AIS trajectories as described in claim 4, characterized in that, In step three, the steps of the track-interpolation method are as follows: S311, Calculate linear velocity when interpolating within a track: ;in, ; In the formula, The linear velocity during interpolation within the trajectory represents the target velocity; Indicates the proportion of time. Indicates the target time. Indicates the total interpolation duration; S312, Calculation of displacement distance based on linear velocity : ; In the formula, The ship's current speed, The current moment; Indicates the time step. Parameters for speed unit conversion; S313, distance The remaining distance is called the great circle distance. The calculation method is as follows: ; In the formula, For the Earth's radius, The latitude and longitude of the current recursive starting point. The current longitude, The current latitude; S314, Calculate the actual propulsion distance of the ship from the displacement distance and the great circle distance. ,Depend on Generate latitude and longitude positions of candidate points for interpolation within the flight path. The calculation method is as follows: ; ; in, ; In the formula, Indicates that the ship is , Indicates from Pointing to the destination The initial azimuth angle, The radius of the Earth; Scenario 1, if The distance the ship traveled was actual speed ; Scenario 2, if Only promote And recalculate the actual speed: ; S315, Interpolation for Land and Sea Avoidance: like Located on the sea surface, the target time New interpolation points for internal interpolation of the flight path ; like Located on land, then from Starting from the point, the heading increases or decreases each time. A total of 2 deflection attempts were made. Each time, the internal interpolated heading angle for each avoidance maneuver... for: ; In the formula, k is the deflection number. This represents the maximum number of deflections. Indicates the deflection parameter. , Indicates the heading angle index; Depend on Update the latitude and longitude positions of candidate points for interpolation within the track. until Located on the sea surface; then the target time Update interpolation points for internal interpolation of the trajectory ;in, The calculation method is as follows: ; ; S316, Determine the interpolation time: Repeat steps S311 to S315, performing interpolation recursion within the cyclic track until... .
6. The state-adaptive trajectory interpolation method for sparse AIS trajectories as described in claim 5, characterized in that, In S314, The calculation method is as follows: °; ; ; In the formula, From point to The instantaneous azimuth angle, for and The difference in longitude.
7. The state-adaptive trajectory interpolation method for sparse AIS trajectories as described in claim 6, characterized in that, In step three, the steps of the forward interpolation method for the track are as follows: S321, Set the initial state for forward interpolation of the track. ;in, Initial heading for forward interpolation of track °; S322, based on the current recursive starting point position of latitude and longitude. At present Target time Time step Current speed Current heading Construct the forward interpolation point of the current trajectory as , The first point value and Similarly, starting with the first point value, the track is extrapolated forward to obtain the latitude and longitude positions of the candidate points for forward interpolation. The calculation method is as follows: ; ; S323, Interpolation for Land-Sea Collision Avoidance: like Located on the sea surface, the target time New interpolation point for forward interpolation of the trajectory Among them, the new course °; like Located on land, then from Starting from the point, the heading increases or decreases each time. A total of 2 deflection attempts were made. Each time, the forward interpolation heading angle for each avoidance maneuver is... The calculation is as follows: ; in, ; Depend on Update the latitude and longitude positions of candidate points for forward interpolation of the track. until Located on the sea surface, target time The updated interpolation point for the forward interpolation of the trajectory is ;in, The calculation method is as follows: ; ; S324, Determine the interpolation time: Repeat steps S322 and S323, performing forward interpolation recursion on the cyclic track until... , This is the end time of the recursion in the forward interpolation of the trajectory, i.e., the time of the first point of the entire ship's AIS trajectory.
8. The state-adaptive trajectory interpolation method for sparse AIS trajectories as described in claim 7, characterized in that, In step three, the steps of the backward interpolation method for the flight path are as follows: S331, Set the initial state for track backward interpolation: ; S332, based on the current recursive starting point position of latitude and longitude. At present Target time Time step Current speed Current heading Construct the backward interpolation point of the current trajectory as , The first point value and Similarly, starting with the initial point value, the trajectory is extrapolated outwards to obtain the latitude and longitude positions of candidate points for backward interpolation. The calculation method is as follows: ; ; S333, Interpolation for Land and Sea Avoidance: like Located on the sea surface, the target time The new interpolation point for backward interpolation of the trajectory is ; like Located on land, then from Starting from the point, the heading increases or decreases each time. A total of 2 deflection attempts were made. Each time, the backward interpolation heading angle for each avoidance maneuver. The calculation method is as follows: ; in, ; Depend on Update the latitude and longitude positions of candidate points for backward interpolation of the track. Until Located on the sea surface, target time The updated interpolation point for the backward interpolation of the trajectory is ;in, The calculation method is as follows: ; ; S334, Determine the interpolation time: Repeat steps S332 and S333, performing cyclical backward interpolation until... , This is the end time of the recursion in the backward interpolation of the trajectory, i.e., the end time of the entire ship's AIS trajectory.
9. The state-adaptive trajectory interpolation method for sparse AIS trajectories as described in claim 8, characterized in that, In step four, the method for verifying the target track using land and sea masking is as follows: By using masking technology to separate land and sea areas in the target trajectory, and calling up a land mask library, the system determines whether the target trajectory is located in a land area using its current latitude and longitude as input. If the target track falls into the land area at the current moment, the position where it fell into the sea area at the previous moment is taken as the valid position. The original speed and time step remain unchanged, and the vessel attempts to deflect its course in both directions to find a feasible point in the sea area. If both deflections result in the vessel falling into the land area, the avoidance is marked as a failure, triggering the circuit breaker mechanism. The entire track interpolation process of the current vessel is immediately terminated, and an empty track with a complete structure but no data is returned. The target track is then verified as an invalid verification track. If the target track falls into the sea area at the current moment, the current latitude and longitude are immediately adopted as the final interpolation result, and the heading used is recorded. The target track is then verified as a valid verification track.
Citation Information
Patent Citations
Ship navigation track repairing method, electronic equipment and storage medium
CN117073680A
Full-voyage track fitting and optimizing method for ship fine perception
CN121121270A
Kernel adaptive fractional order complex value neural network AIS interpolation method considering channel constraint
CN115223398A
Mass ship trajectory adaptive reconstruction method considering ship motion state
CN117494017A
