Ship route extraction method and system based on AIS data
By combining structured processing of AIS data with water depth information, broken segments of the route map are identified and stitched together to construct a multidimensional consistent map. This solves the problems of trajectory breakpoints and insufficient water depth utilization in AIS data, and enables safe and reliable route planning.
Patent Information
- Application Number
- CN202511413500.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-23
AI Technical Summary
Existing methods struggle to handle factors such as trajectory breakpoints, ineffective use of water depth information, and significant differences in trajectory behavior in AIS data. This leads to issues like routes crossing shoals, map breaks, and prediction deviations in route mapping schemes, affecting the reliability of shipping scheduling and route execution.
By transforming AIS trajectory data into a structured trajectory set, combining it with water depth information from a nautical chart database to construct a route map, identifying and stitching together broken segments, and using multi-dimensional fusion indicators to construct a structured map, the optimal path can be obtained, thus achieving trajectory repair and path planning.
It realizes intelligent route construction throughout the entire process from AIS trajectory to route application, ensuring route safety, prediction accuracy and behavior consistency, and solving the problems of physical inaccessibility, structural discontinuity and scheduling unavailability in existing methods.
Smart Images

Figure CN121384014A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of route planning, in particular to a ship route extraction method and system based on AIS data. BACKGROUND
[0002] With the continuous improvement of the intelligent degree of global shipping, the automatic identification system (AIS) has become an important data basis for ship path monitoring, route recommendation and scheduling decision. The AIS data records key information including ship position, speed, heading, draft, estimated time of arrival, etc., providing feasible paths for building a maritime traffic network facing actual business. However, most of the existing methods are still at the stage of graph extraction based on trajectory density or clustering frequency, which is difficult to meet the higher requirements of modern shipping for route passability verification, trajectory structure repair and navigation plan accuracy. In real sea areas, due to frequent AIS data breakpoints, ineffective use of water depth information, and huge differences in trajectory behavior, common graphing schemes are prone to key defects such as "path crossing shallow", "graph breaking", "prediction deviation", etc., which seriously affect the reliability of subsequent scheduling and path execution. There is still a lack of a complete method system covering "trajectory standardization-physical navigability verification-trajectory repair splicing-structured graph generation-real operation navigation scheduling", especially in handling draft-water depth constraints, ETA deviation modeling, and graph behavior stability, etc. There is still a technical gap. SUMMARY
[0003] The purpose of the present application is to disclose a ship route extraction method and system based on AIS data, which solves the technical problems pointed out in the background art.
[0004] In order to achieve the above purpose, the present application adopts the following technical solutions:
[0005] On the one hand, the present application provides a ship route extraction method based on AIS data, comprising:
[0006] Step 1, converting AIS trajectory data into a structured trajectory set;
[0007] Step 2, obtaining a trajectory subset and constructing a route graph based on the structured trajectory set and the water depth information in the chart database;
[0008] Step 3, obtaining a broken segment set based on the trajectory subset and the route graph;
[0009] Step 4, trajectory splicing for the broken segments in the broken segment set to obtain a trajectory repair set;
[0010] Step 5, obtaining a structured graph based on the trajectory repair set;
[0011] Step 6, obtaining an optimal path based on the structured graph.
[0012] Preferably, the AIS trajectory data comprises MMSI, latitude and longitude, time stamp, speed, heading, draft, and ETA.
[0013] Preferably, step 1 comprises:
[0014] grouping the AIS trajectory data by MMSI in ascending order of time;
[0015] regularizing the AIS trajectory data according to a preset sampling time interval to obtain a structured trajectory set.
[0016] Preferably, regularizing the AIS trajectory data according to a preset sampling interval to obtain a structured trajectory set comprises:
[0017] linear interpolation processing:
[0018] Each AIS data corresponds to a trajectory point. It is judged whether the time interval between the time stamps of two adjacent position trajectory points is greater than the preset sampling time interval. If so, a new trajectory point is generated between the two trajectory points using linear interpolation, so that the time interval between any two adjacent trajectory points after linear interpolation is less than or equal to the preset sampling time interval.
[0019] In the process of linear interpolation, the latitude and longitude of the new trajectory point are obtained by linear interpolation of spherical coordinates;
[0020] The speed and heading of the new trajectory point are obtained by linear weight weighted average;
[0021] Draft standardization processing:
[0022] Based on MMSI, the maximum design draft d of the ship is obtained max ;
[0023] The average value of the non-zero draft in the AIS trajectory data recorded in the last 30 days of the ship corresponding to MMSI is obtained If the draft in the AIS trajectory data recorded in the last 30 days is all null, the value of is set to 0.8d max ;
[0024] Obtain dynamic weight α i ;
[0025] Based on α i , and d max , the estimated draft is obtained;
[0026] ETA screening processing:
[0027] Calculate the confidence level of the ETA;
[0028] ETAs are screened based on confidence level;
[0029] Generate a set of structured trajectories:
[0030] T={(x i ,y i ,t i ,v i ,θ i ,d i ,η i ,q i )}
[0031] x i and y i These are the longitude and latitude of trajectory point i, respectively;
[0032] t i The timestamp of trajectory point i;
[0033] v i and θ i These are the velocity and heading of trajectory point i, respectively;
[0034] d i For the estimated draft;
[0035] η i Let i be the ETA of the trajectory point i;
[0036] q i Let be the confidence level of the ETA for trajectory point i.
[0037] Preferably, step 2 includes:
[0038] Calculate the traffic capacity index of the trajectory segment formed by two adjacent trajectory points in the structured trajectory set.
[0039] Based on the traffic capacity index, the trajectory points in the structured trajectory set are removed to obtain the trajectory subset T′;
[0040] Calculate the weights of the path edges formed by adjacent trajectory points in T′;
[0041] The trajectory points in T′ are used as candidate nodes for the route map G;
[0042] Merge candidate nodes that are geographically close in the route map G to obtain the set N of nodes in the route map;
[0043] Obtain the set E of edges that have been airworthiness filtered and weighted;
[0044] The route map is represented as G = (N, E).
[0045] Preferably, step 3 comprises:
[0046] For each pair of position-adjacent track points in T', the following is performed respectively:
[0047] For track points i and i+1, the time interval Δt i , the geographical distance Δs i , the actual speed difference Δv i , and the heading difference Δθ i of track points i and i+1 are obtained respectively;
[0048] An indication item of graph structure is obtained according to whether there is an edge composed of track points i and i+1 in E
[0049] Based on Δt i , Δs i , Δv i , Δθ i , and , a score r of track consistency is calculated i ;
[0050] It is judged whether r i is greater than a set breaking threshold, and if so, a track segment composed of track points i and i+1 is taken as a breaking segment;
[0051] A breaking segment set D is composed of all breaking segments.
[0052] Preferably, step 4 comprises:
[0053] The following is performed respectively for each breaking segment to obtain a track repair set T":
[0054] For a breaking segment (p s , p e ) composed of track points p s and p e , a maximum acceptable splicing time consumption ΔT is calculated;
[0055] A shortest limit length L low and a longest limit length L high of a splicing path are calculated;
[0056] In the flight graph G, based on nodes n1 s and n1 e corresponding to p s and p e , a constrained path search algorithm is performed to obtain a candidate path set;
[0057] After the candidate path set is constructed, a splicing quality score ρ s,e is calculated for each candidate path;
[0058] Select ρ s,e The candidate path with the smallest value and below the set scoring threshold is selected as the concatenation segment S. s,e Insert into T′.
[0059] Preferably, step 5 includes:
[0060] Calculate the consistency score Ψ between the trajectory segment (i,j) formed by two adjacent trajectory points i and j in T″ and the existing edge (n,m). i,j ;
[0061] If Ψ i,j If the score is less than the preset consistency score threshold, then trajectory segment (i,j) will be merged into the edge. And update its structural properties;
[0062] Structured graph node set N * It is extracted from the structurally inflecting positions at the start and end points of the trajectory segment;
[0063] Structured map G * =(N * E * E * It is the set of edges of a structured graph.
[0064] Preferably, step 6 includes:
[0065] Get the departure port n s and target port n e ;
[0066] Loading structured graph G * And screen out edges with mismatched draft.
[0067] The improved shortest path algorithm, which uses path cost as edge weight, is invoked to output the optimal path.
[0068] On the other hand, the present invention provides a ship route extraction system based on AIS data, including a conversion module, a construction module, a first acquisition module, a splicing module, a second acquisition module, and a third acquisition module;
[0069] The conversion module is used to convert AIS trajectory data into a structured trajectory set;
[0070] The building module is used to obtain a subset of trajectories and construct route maps based on water depth information from structured trajectory sets and nautical chart databases;
[0071] The first acquisition module is used to acquire a set of fracture segments based on trajectory subsets and route maps;
[0072] The splicing module is used for trajectory splicing of the broken segments in the broken segment set, to obtain a trajectory repair set.
[0073] The second acquisition module is used for acquiring a structured graph based on the trajectory repair set.
[0074] The third acquisition module is used for acquiring an optimal path based on the structured graph.
[0075] Beneficial effects:
[0076] The application proposes an intelligent route construction method system from AIS original trajectory, via structured standardization, draft-water depth passability constraint, broken segment identification and splicing recovery, structure graph fusion and behavior modeling, to graph-driven scheduling and actual operation whole process. Firstly, the system introduces a draft calculation model based on the fusion estimation of the maximum draft and the historical draft mean value, and combines with the gridded water depth data, to accurately filter the impassable trajectory segment through the passability function, to realize physical feasibility verification. Secondly, in the trajectory broken processing aspect, a composite scoring function combining time, speed, heading change and graph structure consistency is designed, to accurately identify the broken segment and reasonably splice and repair through the ETA-driven path back-propagation mode. Further, the system introduces multi-dimensional fusion indexes such as heading stability, ETA prediction deviation and consistency score in the structure graph construction process, so that the graph has high structure expression and behavior stability when used for scheduling and navigation. Finally, through the path cost function of target task perception, the graph structure is applied to the actual scheduling and navigation path planning, to ensure that the output path is optimal in safety, prediction accuracy and behavior consistency. The application covers the whole process from AIS trajectory processing to path application in the six-stage process, solves the problems of physical impassability, structure discontinuity and scheduling inapplicability in the existing method, and has significant engineering application value and patent creativity. BRIEF DESCRIPTION OF DRAWINGS
[0077] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0078] Figure 1 A schematic diagram of the ship route extraction method based on AIS data according to the application.
[0079] Figure 2 A schematic diagram of the ship route extraction system based on AIS data according to the application. DETAILED DESCRIPTION
[0080] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0081] As shown in an embodiment, Figure 1 The present application provides an AIS data-based ship route extraction method, comprising:
[0082] Step 1: converting AIS trajectory data into a structured trajectory set.
[0083] The purpose of this step is to convert the original AIS trajectory data into a structured trajectory set, providing high-quality input for the path passability analysis and trajectory splicing module in the subsequent graph construction. AIS data is collected from multiple sources, including shore-based AIS receiving stations, enterprise-deployed VHF receivers, satellite AIS systems, etc. The data is received in NMEA0183 / AIVDM format and imported into the enterprise shipping data platform in real time.
[0084] Preferably, the AIS trajectory data includes MMSI, latitude and longitude, timestamp, speed, heading, draft, and ETA (estimated time of arrival).
[0085] Preferably, step 1 comprises:
[0086] Grouping AIS trajectory data by MMSI and arranging in ascending order of time;
[0087] Regularizing AIS trajectory data according to a preset sampling time interval to obtain a structured trajectory set.
[0088] Preferably, regularizing AIS trajectory data according to a preset sampling interval to obtain a structured trajectory set comprises:
[0089] Linear interpolation processing:
[0090] Each AIS data corresponds to a trajectory point. It is determined whether the time interval between the timestamps of the two adjacent position points is greater than the preset sampling time interval. If so, a new trajectory point is generated between the two trajectory points using linear interpolation, so that the time interval between any two adjacent trajectory points after linear interpolation is less than or equal to the preset sampling time interval.
[0091] In the process of linear interpolation, the latitude and longitude of the new trajectory point is linearly interpolated by spherical coordinates;
[0092] The speed and heading of the new trajectory point are obtained by linear weight weighted average, including:
[0093] First, calculate the time ratio of the interpolation point between the start point and the end point, and then determine the speed and heading of each interpolation point according to the ratio. The specific operation is: the speed of each interpolation point is weighted and averaged by the start point and the end point speed according to the ratio of the interpolation point distance from the start point to the total time interval. Similarly, the heading is also calculated in a similar manner. The broadcast frequency of AIS is different in different sea areas, for example, there may be multiple records per minute in the port area, and one record per hour in the ocean area. For example, a uniform sampling interval of 2 minutes can be set to regularize the trajectory data.
[0094] For example, for two adjacent data segments with an interval of more than 5 minutes, linear interpolation is used to generate intermediate points, wherein the interpolation position is determined by the direction of the start-end line and the time ratio, and the speed and heading are linearly weighted and averaged. For example, the time difference between two points is 10 minutes, and 4 points are generated by linear interpolation, each point is inserted according to 2 minutes, the position is linearly interpolated by spherical coordinates, and the speed and heading are smoothed by time weighting.
[0095] The standardization of the draft field is one of the core contents. A large number of records in the original AIS data have the field as 0 or null value, which cannot be directly used, therefore, the draft depth standardization processing is carried out in the present application:
[0096] Based on MMSI, the maximum design draft d of the ship is obtained max ;
[0097] In the China Classification Society (CCS) database or Equasis, the maximum design draft d of the ship is obtained max ;
[0098] The average value of the non-zero draft in the AIS trajectory data recorded in the last 30 days corresponding to the MMSI of the ship is obtained If the draft in the AIS trajectory data recorded in the last 30 days is all null value, the value of is set to 0.8d max ;
[0099] The dynamic weight a is obtained i , including:
[0100] According to the speed of the current trajectory point, the dynamic weight a is set i , which is used for dynamically fusing two draft sources. If the speed is greater than 7 knots, set a i = 0.85, otherwise set to 0.6
[0101] Based on a i , and d max Obtain the estimated draft, comprising:
[0102] The calculation formula is as follows:
[0103]
[0104] d i is the estimated draft of the track point i.
[0105] ETA screening processing:
[0106] Calculate the confidence of ETA, comprising:
[0107] Determine whether the ETA field is empty, whether it meets the ISO time format (such as YYYY-MM-DD hh:mm);
[0108] Subtract the time of the current track point from the time η i represented by ETA to obtain the predicted remaining sailing time;
[0109] Compare with the historical path record in the system (for example: the average sailing time from the current point to the destination port), if the deviation is too large (for example: higher than 200% or lower than 50%), mark it as abnormal;
[0110] The specific construction method of the calculation function of the confidence is: the initial value of the confidence is 1, and a corresponding weight score is deducted for each condition met (such as 0.4 for empty field, 0.3 for format error, and 0.3 for sailing time deviation exceeding threshold), and finally the score is obtained. For example, the ETA field of a record is non-empty, the format is correct, but the sailing time deviation is 300%, and the confidence q i is:
[0111] q i =1-0.3=0.7 (2)
[0112] Screening of ETA based on confidence;
[0113] The value range of the confidence is 0 to 1, and the ETA value of the track point q i >0.7 is retained for subsequent processing;
[0114] Generate a structured track set: x i and y i are the longitude and latitude of track point i, respectively;
[0115] T={(x i ,y i ,t i ,v i, θ i , d i , η i , q i
[0116] t i is the timestamp of trajectory point i;
[0117] v i and θ i are the speed and heading of trajectory point i, respectively;
[0118] d i is the estimated draft;
[0119] η i is the ETA of trajectory point i;
[0120] q i is the confidence of the ETA of trajectory point i. Step 2, obtain trajectory subset and construct route graph based on structured trajectory set and water depth information in the chart database.
[0121] This step is based on the structured trajectory set T = {(x i , y i , t i , v i , θ i , d i , η i , q i} output in step one, combined with the water depth information h(x, y) in the external chart database, to construct a navigable route graph G = (N, E) that satisfies the ship draft-water depth matching constraint.
[0122] The goal of this step is not only to select trajectory segments from trajectories, but also to solve the problems of "crossing shallow water", "directly connecting to the wrong area", and "pseudo connectivity" in traditional graph construction. Therefore, a navigability judgment mechanism and a stability enhancement mechanism are specially designed to ensure that the output graph has physical navigability, behavior consistency, and path availability.
[0123] The input data includes the structured trajectory set T and the chart water depth data h(x, y). The chart data is derived from S-57 or GEBCO standard charts, which index the water depth information of each point in the sea area in the form of fixed interval grid, and the grid interpolation granularity can be configured (such as about 1 kilometer per 0.01 degree). In order to ensure that the trajectory is physically navigable, the system regards the trajectory segment composed of any two consecutive trajectory points i and i+1 in the trajectory as a path edge e i,i+1 , and inserts several intermediate points p k in the segment, about 1 kilometer apart, to extract the actual water depth data and determine whether the entire trajectory segment is passable.
[0124] Preferably, step 2 comprises:
[0125] Step 2.1, respectively calculate the traffic capacity index C of the trajectory segment composed of two adjacent trajectory points in the structured trajectory set i,i+1 :
[0126]
[0127] Wherein:
[0128] h(p k ) represents the sea depth of the middle point p k of the trajectory segment, which is obtained from the chart database;
[0129] d i is the estimated draft of the trajectory point i;
[0130] σ h (p k ) is the standard deviation of the water depth of all middle points in the trajectory segment, reflecting the degree of water depth change;
[0131] λ is an instability penalty factor, and the system default value range is 0.5-2.0, which can be configured.
[0132] The innovation of this traffic capacity index lies in the introduction of the water depth fluctuation penalty term. The traditional method only judges whether the shallowest point meets the draft requirement, ignoring the navigation risk caused by rapid change of water depth. This item adjusts σ h , and punishes the sea area with large water depth fluctuation, thereby effectively avoiding the path with "theoretical traffic but actual risk of grounding".
[0133] Step 2.2, according to the traffic capacity index, the trajectory points in the structured trajectory set are removed to obtain a trajectory subset T', including:
[0134] Set a safe traffic threshold δ (such as 1.5 meters), if C i,i+1 ≥ δ, it means that the trajectory segment meets the traffic requirement; otherwise, the trajectory segment will be determined as not passable, and will be removed from the structured trajectory set.
[0135] Specifically, when removing, only the trajectory point i as the starting point is deleted.
[0136] Step 2.3, calculate the weight of the path edge composed of adjacent trajectory points in T':
[0137] The historical traffic frequency, path distance and behavior stability need to be considered, so the following function is defined:
[0138]
[0139] Wherein:
[0140] l i,i+1 The geographical distance of the trajectory segment is calculated from the spherical coordinates of the start and end points;
[0141] f i,i+1 The historical passing frequency of the trajectory segment is calculated by the system statistics of the number of times the segment is used in the AIS trajectory;
[0142] γ i,i+1 The behavior consistency score of the trajectory segment depends on the degree of change in speed and heading of the ship on the segment, and the higher the consistency, the higher the score (such as the value range [0, 1]);
[0143] ∈ is the minimum stability factor, which is used to prevent division by zero error, and is set to 10 by default -3 .
[0144] w i,i+1 is the weight that can reflect the behavior stability.
[0145] The calculation function of the edge weight integrates the actual length of the path and the historical behavior intensity, and through the introduction of the behavior consistency score, it punishes the path with rapid speed change or frequent direction adjustment, so as to filter out the stable, high-frequency and clear path passing path.
[0146] Specifically, the calculation process of the behavior consistency score is as follows:
[0147] First, the speed change rate and the heading change amplitude on e i,i+1 are standardized, and the speed relative change rate Δv i,i+1 and the normalized heading difference Δθ i,i+1 are calculated:
[0148] The speed change rate is
[0149] The heading change amplitude is normalized to [0, 1].
[0150] Then the system synthesizes the overall consistency score by the following formula: where μ is an adjustable parameter (such as 0.5), which is used to balance the weight of speed and direction in consistency.
[0151] Step 2.4, taking the trajectory points in T' as candidate nodes of the route map G;
[0152] Step 2.5, merging candidate nodes with close geographical positions in the route map G to obtain the node set N of the route map;
[0153] Specifically, when merging, for multiple candidate nodes with extremely close spatial positions, first divide a certain size of spatial grid (for example, every 0.05 degree of latitude and longitude range) by latitude and longitude, and then classify all candidate nodes falling into the same grid range as the same node, and take the average position as the position of the node obtained by final merging. In the graph structure construction process, all trajectory points participating in the graph construction are recorded as nodes as candidate objects, and trajectory points with close geographical positions are merged as graph nodes N. In this case, the clustering algorithm concept is not introduced, and only the spatial merging operation is used to clean up the structure in an engineering way to ensure reasonable node density and stable graph structure.
[0154] Step 2.6, obtaining the set E of edges filtered by airworthiness and assigned with weights;
[0155] The flight route graph is represented as G=(N,E).
[0156] The set E of edges of the graph is obtained by C i,i+1 and w i,i+1 comprehensive screening. The specific operation is that for each path segment composed of a pair of consecutive trajectory points in the AIS trajectory data, the system first inserts several intermediate points, calculates the passage capacity C i,i+1 of the path segment by using the chart depth data, judges whether the path segment meets the requirement of matching the draft and the water depth, and only retains the path segment that meets the safety passage threshold; then, the system further calculates the weight w i,i+1 of the path segment; through the weight, the path segment with high passage frequency and stable behavior has a lower weight, and therefore is preferentially included in the final edge set E, forming the edge structure of the flight route graph with complete and stable structure. The innovation of this step lies in two aspects: first, the complex passage capacity judgment mechanism of draft-water depth difference and chart depth fluctuation is introduced for the first time in path construction, so that the path construction not only meets the shallowest point passage, but also considers the stability of the whole passage, which significantly improves the navigation availability of the graph; second, the passage frequency and behavior consistency are coupled in the edge weight function, so that the system can identify the real path with high heat and stable behavior, and effectively exclude abnormal behavior trajectory segments. Step 3, obtaining the set of broken segments based on the trajectory subset and the flight route graph.
[0157] This step aims to analyze the structural consistency of the trajectory subset T' output in step two and the flight route graph G=(N,E), identify the broken segments existing in the trajectory, and output the set of broken segments D={(p start ,p end )}, i.e. the boundary of the trajectory segment that needs to be spliced, reasoned and reconstructed subsequently.
[0158] Traditional trajectory break detection often relies on fixed time threshold or distance threshold, such as "a time interval exceeding 10 minutes is a break" or "a distance between adjacent trajectory points greater than 5 kilometers is considered as a jump", which cannot adapt to trajectory changes under different ship types, different sea areas and different behavior patterns. The trajectory break in the shipping scenario is not always reflected in time or position mutation. Many real breaks are the result of the destruction of behavior continuity, especially when "jumping positioning" and "false reporting of static state" occur in complex waters, a single indicator is often insufficient to determine.
[0159] Preferably, step 3 comprises:
[0160] Step 3.1, for each pair of adjacent trajectory points in T', respectively:
[0161] For trajectory points i and i+1, respectively, obtain the time interval Δt i , the geographical distance Δs i , the actual speed difference Δv i , and the heading difference Δθ i of the trajectory points i and i+1.
[0162] Δt i = t i+1 - t i ; t i+1 and t i are the timestamps of the trajectory points i and i+1, respectively.
[0163] Δs i is calculated by the spherical distance of the longitude and latitude coordinates (x i , y i ) and (x i+1 , y i+1 ); x i and y i are the longitude and latitude of the trajectory point i, respectively; x i+1 and y i+1 are the longitude and latitude of the trajectory point i+1, respectively.
[0164] The actual speed difference Δv i = |v i+1 - v i |; v i+1 and v i are the speeds of the trajectory points i and i+1, respectively.
[0165] The heading difference Δθ i = min(|θ i+1 - θ i |, 2π-|θ i+1 - θ i |); θ i+1 and θ i are the headings of the trajectory points i and i+1, respectively.heading of the trajectory point i+1 and i respectively;
[0166] graph structure indicator is acquired according to whether there is an edge composed of the trajectory points i and i+1 in E
[0167] The graph structure indicator is used to determine whether a certain trajectory segment exists in the corresponding edge in the existing graph. Specifically, the system searches the edge set constructed in step 2 to determine whether it contains the trajectory segment. If it exists, it is recorded as 1, indicating that it is structurally legal. If it does not exist, it is recorded as 0, indicating that the trajectory segment has no matching edge in the graph and needs to be considered as a structurally abnormal segment.
[0168] based on Δt i , Δs i , Δv i , Δθ i and calculate the score r of trajectory consistency i :
[0169]
[0170] The first term measures the degree of spatial jump between two trajectory points, where represents the segment velocity between the two points. If the actual distance between the two trajectory points is much greater than the distance obtained by multiplying the segment velocity by the time interval, it is determined to be abnormal.
[0171] The second term, the heading difference term, reflects whether the trajectory has a sudden change in direction.
[0172] The third term, the speed fluctuation term, reflects the stability of the trajectory in terms of behavior continuity.
[0173] The fourth term is a structural consistency penalty. If the trajectory segment does not exist in the graph structure (i.e., there is no edge between the two trajectory points), the penalty weight of this term will be activated.
[0174] The parameters κ, η, λ 6 are weight parameters, and the default values are κ = 0.5, η = 0.3, λ = 0.7, which can be adjusted in system deployment.
[0175] is the historical average speed of the ship, which is aggregated and statistically derived from AIS historical data;
[0176] ∈ is a minimum stability factor.
[0177] The innovation of the score calculation function is to design a punishment mechanism based on the participation of the atlas structure: when a trajectory segment does not appear in the atlas, it is considered as a highly abnormal segment, and its score will rise rapidly, even if the time interval or behavior difference is not large, it will also be included in the fracture judgment. This design ensures that the trajectory continuity judgment is not only based on local behavior, but also limited by global structure, which embodies the ability of structural fracture identification. The judgment r i is greater than the set fracture threshold (such as 1.2), if yes, the trajectory segment composed of trajectory points i and i+1 is regarded as a fracture segment, and is recorded as (p start ,p end ); p start is the trajectory point with earlier position in the trajectory point sequence among the two trajectory points corresponding to the fracture segment (for example, i), and p end is the trajectory point with later position among the two trajectory points corresponding to the fracture segment (for example, i+1);
[0178] Step 3.2 forms a fracture segment set D from all fracture segments.
[0179] All fracture segments form a fracture segment set D, which will be used for path reverse recovery in the next stage.
[0180] In particular, in order to avoid repeated fractures or fracture "jitter" caused by occasional small errors, the present application introduces a minimum fracture interval time threshold δ d When the time interval between two fracture segments is less than this value (such as 5 minutes), the present application automatically merges them into a longer fracture segment, improving the robustness of the fracture region boundary.
[0181] Step 4, trajectory splicing is performed on the fracture segments in the fracture segment set to obtain a trajectory repair set.
[0182] The goal of this step is to perform path splicing based on time and speed constraints on the trajectory fracture segment set output by step three, to realize the structural repair of the trajectory. This step is strictly based on the fracture point information output by step three and the flight route atlas constructed in step two, and searches for reasonable trajectory segments from the atlas within a given time window, fills in the missing flight path, and thus restores the discontinuous trajectory to a coherent flight path.
[0183] Preferably, step 4 includes:
[0184] Each fracture segment is processed as follows to obtain a trajectory repair set T":
[0185] For the fracture segment (p s , p e ) composed of trajectory points p s and p e , calculate the maximum acceptable splicing time ΔT;
[0186] ΔT=te -t s , t e and t s p s and p e timestamp;
[0187] Calculate the shortest possible length L for the splicing path low With the longest limit length L high :
[0188] L low =(v s -δ v )·ΔT,L high =(v s +δ v )·ΔT (7)
[0189] v s It is the trajectory point p s The speed is obtained directly from T′;
[0190] δ v For speed fluctuation tolerance (e.g., take 1.5);
[0191] In the route map G, based on p s With p e Corresponding node n1 s With n1 e A constrained path search algorithm is executed to obtain a set of candidate paths. The candidate paths must satisfy the following conditions:
[0192] 1) The passage margin of all edges satisfies the draft-depth condition (i.e., d) s (Less than the shallowest water depth at the edge);
[0193] 2) Total length of candidate paths l s,e ∈[L low ,L high ];
[0194] 3) The candidate path has a feasible solution in the route map.
[0195] After the candidate path set is constructed, a splicing quality score ρ is calculated for each candidate path. s,e ;
[0196]
[0197] in:
[0198] l s,e It is the total length of the candidate paths;
[0199] is the average speed estimation on the candidate path (default to the average of historical values), or v s ;
[0200] is the behavior consistency score γ of all edges on the candidate path i,j ;
[0201] λ8 is the penalty factor of behavior inconsistency (e.g. 0.5-1.0);
[0202] The design innovation of the calculation function of the splicing quality evaluation lies in the introduction of the "expected voyage deviation term" and the "behavior consistency penalty term": the first term measures the proportional error between the actual length of the path and the theoretical distance that should be sailed, the closer to the theoretical value the better; the second term evaluates the stability of the entire path behavior through historical path consistency, thereby avoiding low-quality abnormal paths.
[0203] Select the candidate path with the minimum ρ s,e that is lower than the set score threshold (e.g. 1.2) as the splicing segment S s,e , insert it into T' and re-label its time, speed and behavior data according to the edge structure.
[0204] For example: a ship has a trajectory break at t s = 2023 / 07 / 15 12:00 and t e = 12:20, v s = 14 knots, calculate ΔT = 20 minutes, and the allowed path length interval is L low = 8.3 nautical miles to L high = 10.8 nautical miles. Search all n s → n e paths within this distance interval in the atlas, if there are multiple paths that satisfy the traffic and ρ s,e optimal, then the splicing is completed.
[0205] Step 5, obtain the structured atlas based on the trajectory repair set.
[0206] This step is based on the trajectory repair set T'' obtained by completing the splicing in step four, to construct the structured atlas G * = (N * , E *), realizing the transition from data-driven trajectory restoration to the atlas structure oriented to actual scheduling, navigation, and prediction. Unlike the general atlas which only focuses on the connection relationship of the path, the structured atlas to be constructed in this step needs to meet four types of constraint capabilities: physical passability, historical behavior consistency, passability attribute expressiveness, and structural stability for planning and prediction. Therefore, in this step, the present application introduces an innovative edge state modeling mechanism, a trajectory segment merging function based on multi-dimensional consistency of behavior and physics, and an atlas attribute accumulation method with prediction bias perception capability, thereby constructing a highly engineered, task-oriented, and multi-functional air route atlas.
[0207] Preferably, step 5 comprises:
[0208] To construct the set E of edges of the structured atlas * From each trajectory sequence in T", the trajectory segment (i, j) composed of adjacent trajectory points i and j is extracted in turn, and the following attributes are calculated:
[0209] The distance l between trajectory points i and j i,j (by the spherical distance formula);
[0210] The travel time τ i,j = t j -t i ;
[0211] The average speed
[0212] The change in heading Δθ i,j = |θ j - θ i |;
[0213] The water matching condition: the minimum travel margin min(h i,j -d i ) on the trajectory segment, which is obtained from the chart depth matching on the edge path. h i,j is the shallowest water depth on the trajectory segment; d i is the draft depth of trajectory point i;
[0214] The consistency score Ψ i,j of the trajectory segment (i, j) composed of two adjacent trajectory points i and j in T" and the existing edge (n, m) is calculated respectively:
[0215]
[0216] Wherein:
[0217] Ψ i,j is the consistency score of the trajectory segment (i, j) and the existing edge (n, m), and the lower the score, the more mergable it is;
[0218] are the historical average speed and travel time of edge (n,m) respectively;
[0219] ∈ η i = (η j η , ∈ i is the ETA error, where η j is the recorded time of trajectory point i to arrive j, t i is the timestamp of trajectory point j, reflecting the degree of deviation between plan and actual;
[0220] α9, β9, γ9, ξ9 are weighting coefficients, respectively controlling the importance of speed, direction, time and ETA deviation to the consistency of the path, with an example setting of (0.4, 0.2, 0.3, 0.1);
[0221] The innovation lies in the last item It first introduces ETA prediction error as an element of judging the consistency of the graph structure. Considering that the overall architecture of this patent needs to achieve the unity of "structure-behavior-prediction consistency", this item allows the system to actively identify and isolate trajectory segments with "prediction misleading risk", thereby improving the scheduling accuracy and early warning ability of the entire graph.
[0222] "Existing edges" refers to the edges of the graph that have been identified and temporarily constructed by the system in the process of processing trajectory sequences. This process is a combination of step-by-step traversal and dynamic updating: the system does not wait until all trajectory segments are processed to build the graph uniformly, but immediately attempts to match the consistency of each processed trajectory segment (p i , p i+1 ) with the existing edge set. If it is found that there is an edge (n,m) of the graph that is close enough in attributes to the current trajectory segment (i.e. Ψ i,j score is low enough), the current segment is assigned to this existing edge, otherwise a new edge of the graph is created. This approach can gradually merge the structure when processing a large amount of trajectory data, avoiding the repeated creation of redundant paths.
[0223] If Ψ i,j is less than the preset consistency score threshold, the trajectory segment (i,j) is merged into edge (n,m) and its structural attributes are updated, including:
[0224] the frequency of passing f n,m ;
[0225] the average speed
[0226] the average travel time
[0227] draft adaptation range [d min ,d max ];d min ,d max is the minimum draft value and the maximum draft value among the start points of all trajectory segments on the edge; ETA residual statistics for subsequent path ETA correction;
[0228] direction stability σ θ , which represents the consistency of the heading on the edge and reflects whether there is a large deviation or change of direction; structured graph node set N * extracted from the positions with structural turning points among the start and end points of the trajectory segments;
[0229] For example, path aggregation points, terminal points, and large heading change points are all considered as nodes of the structured graph. The points in T" are aggregated in a geographical coordinate grid division manner, with each 0.05 degree of longitude and latitude aggregated into a single node, in order to maintain structural sparseness and reduce edge overlap.
[0230] Path aggregation points refer to positions where multiple trajectory segments are highly close and converge in space, usually appearing at the intersection of main channels or the entrance of a port; terminal points refer to the start or end points of a trajectory sequence, representing the natural boundary of the voyage; large heading change points refer to positions where the heading changes significantly between adjacent trajectory segments, usually with a threshold of more than 30 degrees, used to identify key turning points of the path structure.
[0231] Structured graph G * = (N * ,E * ), E * is the set of edges of the structured graph.
[0232] Edge (n, m) represents the original connection between two points in the trajectory, which is a candidate path segment and has not been merged or statistically processed. However, E is the edge of the structured graph confirmed by the system after calculating the consistency score between multiple trajectory segments.
[0233] updates its structural attributes, including:
[0234] The number of passes of the edge is increased by 1, and the original statistics are updated using the average speed and pass time of the trajectory segment; the draft value of the trajectory start point is used to update the upper and lower limits of the draft adaptation range of the edge; the ETA error is accumulated for mean and standard deviation statistics to evaluate the accuracy of path prediction; at the same time, the heading change of the trajectory segment is used to update the direction stability of the edge, reflecting whether there is frequent turning or deviation behavior.
[0235] The edge set E *is formed by merging the trajectory segments in T" with the existing edges in G=(N,E) based on the consistency score Ψ i . i+1 and the attributes of the candidate edges (n,m). i,j When the relative difference score of a trajectory segment and an existing edge in the dimensions of speed, direction, time, ETA error, etc. is lower than a pre-set threshold (e.g. 0.25), the system considers it as "behaviorally equivalent" to the edge, and the trajectory segment is merged into the edge , and the statistical attributes of the edge are updated. * .
[0236] Step 6: Obtain the optimal path based on the structured graph.
[0237] This step is the final step of the entire patent scheme, and its core task is to apply the structured graph G * =(N * ,E * ) constructed in step 5 to real scheduling and navigation scenarios, and complete the transformation from graph knowledge modeling to action decision-making. This step emphasizes executability and operability, i.e. in the specific business scheduling process, according to the task target, ship attribute, environmental constraint, etc., the multi-source attribute information in the graph is called to generate a specific feasible navigation path, and this is used to support real business applications such as ship scheduling, route recommendation, and ETA control.
[0238] Preferably, step 6 includes:
[0239] Obtain the departure port n s and the target port n e .
[0240] Load the structured graph G * and filter out the edges that do not match the draft.
[0241] Call the improved shortest path algorithm with path cost as edge weight (e.g. weighted Dijkstra) to output the optimal path P * ={n s ,n1,...,n e}.
[0242] In order to realize the generation of paths with navigation operational significance, define the specific task target c according to the scheduling requirements, such as "time shortest priority", "ETA consistency priority", "fuel efficiency optimization", etc. Correspondingly, design a unified path cost function For example, in the ETA control scenario, the path cost can be set as:
[0243]
[0244] wherein:
[0245] is the average travel time of edge , representing the base time consumption;
[0246] ∈ i,j is the average value of ETA error of edge , reflecting the degree of deviation between the plan and the actual situation;
[0247] is the behavior stability index, reflecting whether there is significant uncertainty in the path;
[0248] λ1, μ1 are scheduling strategy parameters, for example, in the ETA control type task, λ1 = 0.8, μ1 = 0.3.
[0249] The system will collect the heading values of all historical trajectory segments on the edges of the structured graph, and map them uniformly to the [0°, 360°) interval, while considering the periodicity of the angle (i.e. the distance between 359° and 1° should be 2°, not 358°). Then calculate the sample standard deviation σ θ of these angle values, and divide it by the maximum possible standard deviation 180° (representing a completely random distribution), to obtain the normalized behavior stability index Finally, the value is normalized to the [0, 1] interval, and the lower the value, the more stable the heading.
[0250] This cost function innovatively takes the ETA prediction error as the dominant factor in path selection, and uses heading consistency as an auxiliary evaluation dimension, which can effectively avoid paths with high time uncertainty in actual navigation, and improve the overall scheduling reliability.
[0251] Combined with the current ship speed and path edge attributes, generate each segment ETA prediction
[0252] t start represents the starting time of the current task or path planning, usually the AIS timestamp of the ship's current position, and the system takes this time as the reference point for ETA prediction
[0253] represents the average travel time of the edge of the structured graph, which is obtained according to historical trajectory statistics;
[0254] Return the complete scheduling path and ETA schedule, and send it to the ship navigation system or scheduling control platform.
[0255] For example, a certain cargo ship is currently preparing to depart from Singapore port and is heading for Tianjin port with a draft of 11.8 meters. The dispatch target is to ensure that the ETA deviation is not more than 2 hours. The system excludes the edges with insufficient draft from the graph, and gives priority to the navigation path with low ETA deviation and high behavior stability. Finally, a complete path that meets the requirements of safety, stability and punctuality is output, and the estimated arrival time table of each trajectory segment is provided.
[0256] As Figure 2 The application provides a ship route extraction system based on AIS data, which comprises a conversion module, a construction module, a first acquisition module, a splicing module, a second acquisition module and a third acquisition module.
[0257] The conversion module is used for converting AIS trajectory data into a structured trajectory set.
[0258] The construction module is used for obtaining a trajectory subset and constructing a route graph based on the structured trajectory set and the water depth information in the chart database.
[0259] The first acquisition module is used for obtaining a broken segment set based on the trajectory subset and the route graph.
[0260] The splicing module is used for trajectory splicing on the broken segments in the broken segment set to obtain a trajectory repair set.
[0261] The second acquisition module is used for obtaining a structured graph based on the trajectory repair set.
[0262] The third acquisition module is used for obtaining an optimal path based on the structured graph. The above is merely a specific embodiment of the application, but the protection scope of the application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered in the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.
Claims
1. A method for extracting a ship route based on AIS data, characterized by, The method comprises the following steps: Step 1, transforming AIS trajectory data into a structured trajectory set; Step 2, obtaining a trajectory subset and constructing a route graph based on the structured trajectory set and the water depth information in the chart database; Step 3, obtaining a fracture segment set based on the trajectory subset and the route graph; Step 4, trajectory splicing for the fracture segments in the fracture segment set to obtain a trajectory repair set; Step 5, obtaining a structured graph based on the trajectory repair set; Step 6, obtaining an optimal path based on the structured graph.
2. The AIS data-based ship route extraction method according to claim 1, wherein, The AIS trajectory data comprises MMSI, latitude and longitude, time stamp, speed, heading, draft depth and ETA.
3. The AIS data-based ship route extraction method according to claim 2, wherein, Step 1 comprises: Grouping the AIS trajectory data according to MMSI and arranging them in ascending order of time; Regularizing the AIS trajectory data according to a preset sampling time interval to obtain a structured trajectory set.
4. The AIS data-based ship route extraction method according to claim 3, characterized in that, Regularizing the AIS trajectory data according to a preset sampling interval to obtain a structured trajectory set, comprising: Linear interpolation processing: Each AIS data corresponds to a trajectory point, and it is judged whether the time interval between the time stamps of the two adjacent position points is greater than the preset sampling time interval, if yes, a new trajectory point is generated between the two trajectory points by using linear interpolation, so that the time interval between any two adjacent trajectory points after linear interpolation is less than or equal to the preset sampling time interval; In the process of linear interpolation, the latitude and longitude of the new trajectory point are obtained by linear interpolation of the spherical coordinates; The speed and heading of the new trajectory point are obtained by linear weight weighted average; Draft depth standardization processing: Obtaining the maximum design draft d of a ship based on MMSI max ; get the average of non-zero draft in the AIS track data recorded in the last 30 days of the ship corresponding to the MMSI If the draft in the AIS track data recorded in the last 30 days is all null, set the value of 0.8d max ; Acquiring dynamic weight α i ; Based on a i , and d max Obtaining an estimated draft; ETA filtering processing: Calculate the confidence of ETA; Filtering ETA based on the confidence; Generating a structured trajectory set: T = {(x i ,y i ,t i ,v i ,θ i ,d i ,η i ,q i )} x i and y i are the longitude and latitude of the trajectory point i, respectively; t i timestamp for trajectory point i; v i and θ i are the velocity and heading of the trajectory point i, respectively; d i D for estimated draft; η i ETA for trajectory point i; q i Confidence in the ETA for trajectory point i.
5. The AIS data-based ship route extraction method according to claim 4, wherein, Step 2 comprises: Calculating the traffic capacity index of the trajectory segment composed of two adjacent position points in the structured trajectory set; Removing the trajectory points in the structured trajectory set according to the traffic capacity index to obtain a trajectory subset T'; Calculating the weight of the path edge composed of the adjacent position points in T'; Taking the trajectory points in T' as candidate nodes of the route graph G; Merging the candidate nodes with close geographical positions in the route graph G to obtain a node set N of the route graph; Obtaining a set E of edges filtered by navigability and assigned with weights; Expressing the route graph as G=(N,E).
6. The AIS data-based ship route extraction method according to claim 5, wherein, Step 3 comprises: Processing each pair of adjacent position points in T' as follows: For trajectory points i and i+1, obtain the time interval Δt of trajectory points i and i+1, respectively i , the geographical distance Δs i , the actual speed difference Δv i , and the heading difference Δθ i ; According to whether the edge constituted by the track points i and i+1 exists in E, the graph structure indication item is acquired based on Δt i , Δs i , Δv i , Δθ i and calculating a score r of trajectory consistency i ; determining whether r i is greater than a set breaking threshold, and if so, the trajectory segment formed by the trajectory points i and i+1 is considered a breaking segment; All the fracture segments constitute a fracture segment set D.
7. The AIS data-based ship route extraction method according to claim 6, wherein, Step 4 comprises: Processing each fracture segment as follows to obtain a trajectory repair set T": For a broken segment (p s , p e ) consisting of trajectory points p s , p e , the maximum acceptable stitching time ΔT is calculated; The shortest limit length L of the stitching path is calculated low The longest limit length L is calculated high ; In the route map G, based on p s Corresponding to p e The node n1 s Corresponding to n1 e , a constrained path search algorithm is executed to obtain a candidate path set; After the candidate path set is constructed, the splicing quality score p is calculated for each candidate path s,e ; ρ s,e The candidate path with the minimum and below the set score threshold is selected as the stitching segment S s,e is inserted into T'.
8. The AIS data-based ship route extraction method according to claim 7, wherein, Step 5 comprises: Calculate the consistency score Ψ of the trajectory segment (i,j) formed by two trajectory points i and j adjacent in position T" with the existing edge (n,m) i,j ; If Ψ i,j If the consistency score of the trajectory segment (i,j) is less than a pre-set consistency score threshold, then the trajectory segment (i,j) is merged to the edge and its structure attribute is updated. Structured graph node set N * are extracted from the positions with structural turning points among the start and end points of the trajectory segments; structured graph G * = (N * , E * ), E * is a set of edges of the structured graph.
9. The AIS data-based ship route extraction method according to claim 8, wherein, Step 6 comprises: Acquiring a departure port n s and a target port n e ; Loading structured graph G * And filter out edges with mismatched water levels Calling an improved shortest path algorithm with path cost as edge weight to output an optimal path.
10. A vessel route extraction system based on AIS data, characterized by, The method comprises a transformation module, a construction module, a first obtaining module, a splicing module, a second obtaining module and a third obtaining module; The transformation module is used for transforming AIS trajectory data into a structured trajectory set; The construction module is used for obtaining a trajectory subset and constructing a route graph based on the structured trajectory set and the water depth information in the chart database; The first obtaining module is used for obtaining a fracture segment set based on the trajectory subset and the route graph; The splicing module is used for trajectory splicing for the fracture segments in the fracture segment set to obtain a trajectory repair set; The second obtaining module is used for obtaining a structured graph based on the trajectory repair set; The third obtaining module is used for obtaining an optimal path based on the structured graph. The splicing module is configured to splice the trajectories of the broken segments in the broken segment set to obtain a trajectory repair set; The second obtaining module is configured to obtain a structured graph based on the trajectory repair set; The third obtaining module is configured to obtain an optimal path based on the structured graph.