Ship trajectory optimization method and device and storage medium
Patent Information
- Application Number
- CN202611022600.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-10
AI Technical Summary
[0003]现有的轨迹处理技术通常通过噪声剔除算法来去除噪点,缺乏针对AIS信号的轨迹上陆现象进行识别与修复的方案
[0006]在上述船舶轨迹优化方法中,通过融合多源地理空间数据与船舶静态属性,实现对轨迹上陆现象的自动判别,减少因近岸信号漂移引起的误差,替代人工清洗异常点的干预环节,进而简化数据预处理流程并节约计算资源。此外,本申请将修复机制嵌入抽稀算法的迭代流程中,避免传统算法在多边形水域产生的切线误差,结合动态抽稀阈值,进一步增强优化方法对各类环境的适应能力。通过上述方法可以解决船舶轨迹因信号漂移导致的上陆问题,有效实现轨迹数据在高压缩率与高保真度之间的平衡。
Smart Images

Figure CN122527604B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus and storage medium for optimizing ship trajectories. Background Technology
[0002] In fields such as vessel traffic management, marine fisheries supervision, and polar scientific research, vessel trajectory data is fundamental for vessel behavior analysis, waterway planning, and shipping management, and is typically generated by the Automatic Identification System (AIS) or Global Positioning System (GPS). However, due to factors such as signal obstruction, reflections from port structures, equipment malfunctions, or multipath effects, the received trajectory points often experience positional drift. Especially in nearshore or complex waters, this drift can cause the trajectory to spatially appear to cross land, islands, reefs, or unnavigable areas—a phenomenon known as "track landing."
[0003] Existing trajectory processing technologies typically remove noise through noise elimination algorithms, lacking solutions for identifying and repairing landing phenomena in AIS signal trajectories. In nearshore, densely populated port, or complex waters, unprocessed landing trajectories can severely impact the accuracy of trajectory data. Furthermore, traditional thinning algorithms rely primarily on the trajectory's own geometric features, failing to integrate multi-source environmental data such as coastlines, ports, and sea ice. For instance, in polar regions or densely populated port areas, the setting of feature point identification and compression thresholds lacks environmental support, potentially leading to compressed trajectories crossing land or ignoring important environmental interaction points. Simultaneously, traditional thinning methods often employ fixed thinning thresholds, neglecting the varying fidelity requirements of ships at different speeds and in different geographical regions, making it difficult to simultaneously meet the dual standards of high compression ratio and high-fidelity behavioral analysis. Summary of the Invention
[0004] In view of this, embodiments of this application provide a method, apparatus and storage medium for optimizing ship trajectories, so as to output standardized ship trajectories that conform to physical laws and satisfy spatial continuity.
[0005] Firstly, a method for optimizing ship trajectories is provided, comprising: acquiring first trajectory data and auxiliary data of a ship, wherein the first trajectory data includes multiple trajectory points arranged in chronological order, and the auxiliary data corresponds to the first trajectory data and includes: coastline data, aquatic environment data, and ship static data; determining the landing probability of trajectory points based on the spatial relationship between trajectory points and coastline data, the point motion characteristics corresponding to the trajectory points, the matching results between trajectory points and aquatic environment data, and ship static data; determining drift landing points from multiple trajectory points based on the landing probability; performing iterative thinning processing on the first trajectory data and determining the trajectory segment to be thinned in the current processing; when the trajectory segment to be thinned includes drift landing points, generating repair points based on the drift landing points, and using the positions corresponding to the repair points to replace the original positions of the drift landing points in the thinning judgment of the trajectory segment to be thinned; determining the dynamic thinning threshold corresponding to the trajectory segment to be thinned based on the regional attributes and segment motion characteristics corresponding to the trajectory segment to be thinned; and retaining or discarding the trajectory points participating in the thinning judgment based on the dynamic thinning threshold, and generating second trajectory data.
[0006] In the aforementioned ship trajectory optimization method, by fusing multi-source geospatial data with ship static attributes, automatic identification of landfall phenomena in the trajectory is achieved, reducing errors caused by near-shore signal drift and replacing the intervention step of manually cleaning outliers. This simplifies the data preprocessing process and saves computational resources. Furthermore, this application embeds a repair mechanism into the iterative process of the thinning algorithm, avoiding tangent errors generated by traditional algorithms in polygonal waterways. Combined with a dynamic thinning threshold, this further enhances the adaptability of the optimization method to various environments. This method can solve the landfall problem caused by ship trajectory signal drift, effectively achieving a balance between high compression rate and high fidelity in trajectory data.
[0007] Optionally, the probability of a trajectory point landing is determined based on the spatial relationship between the trajectory point and the coastline data, the motion characteristics of the corresponding trajectory point, the matching results between the trajectory point and the aquatic environment data, and the ship's static data. This includes: determining the spatial distance probability of the trajectory point based on the distance between the trajectory point and the coastline data; determining the motion characteristic probability of the trajectory point based on the speed and heading change rate of the corresponding trajectory point; determining the environmental matching probability of the trajectory point based on the positional matching relationship between the trajectory point and the aquatic environment data; determining the static characteristic probability of the trajectory point based on the ship type information and ship tonnage information in the ship's static data; and determining the landing probability of the trajectory point based on the spatial distance probability, motion characteristic probability, environmental matching probability, and static characteristic probability.
[0008] Optionally, the landing probability of a trajectory point is determined based on spatial distance probability, motion feature probability, environment matching probability, and static feature probability, including: weighting and fusing the spatial distance probability, motion feature probability, environment matching probability, and static feature probability according to preset weights to obtain the landing probability of the trajectory point; wherein the preset weights are determined based on training on historical ship trajectory samples with landing annotation results.
[0009] Optionally, generating repair points based on drift landing points includes: determining the landing type corresponding to the drift landing point based on the number of consecutive drift landing points in the trajectory segment to be thinned; generating repair points based on linear interpolation or motion filtering when the landing type is short-term drift landing; and generating repair points based on curve reconstruction or path planning constrained by the water environment when the landing type is long-term crossing landing.
[0010] Optionally, based on the regional attributes and segment motion characteristics corresponding to the trajectory segment to be thinned, a dynamic thinning threshold is determined for the trajectory segment to be thinned, including: determining the regional attributes corresponding to the trajectory segment to be thinned based on the spatial matching results between the midpoint of the trajectory segment to be thinned and the coastline data and aquatic environment data; determining the segment speed characteristics corresponding to the trajectory segment to be thinned based on the speeds corresponding to each trajectory point in the trajectory segment to be thinned; determining the segment heading change characteristics corresponding to the trajectory segment to be thinned based on the heading change rate corresponding to each trajectory point in the trajectory segment to be thinned; and determining the dynamic thinning threshold based on the regional attributes, segment speed characteristics, and segment heading change characteristics.
[0011] Optionally, based on a dynamic thinning threshold, the trajectory points participating in the thinning judgment are retained or discarded, including: determining the target trajectory point and the corresponding offset distance based on the distance between the trajectory point participating in the thinning judgment and the line connecting the start and end points of the trajectory segment to be thinned; retaining the target trajectory point when the offset distance is greater than the dynamic thinning threshold; and discarding the intermediate trajectory points in the trajectory segment to be thinned when the offset distance is less than or equal to the dynamic thinning threshold.
[0012] Optionally, a dynamic thinning threshold is determined based on regional attributes, segment speed characteristics, and segment heading change characteristics, including: when the regional attributes indicate that the trajectory segment to be thinned is located in a port area, and the segment speed characteristics indicate that the trajectory segment to be thinned is in a low-speed navigation state, the dynamic thinning threshold is determined as a first threshold; when the regional attributes indicate that the trajectory segment to be thinned is located in open water, and the segment speed characteristics indicate that the trajectory segment to be thinned is in a high-speed navigation state, the dynamic thinning threshold is determined as a second threshold; wherein the second threshold is greater than the first threshold.
[0013] Optionally, the coastline data includes vector coastline data; the aquatic environment data includes at least one of port area data, anchorage area data, waterway area data, and sea ice concentration data; and the ship static data includes at least one of ship identification information, ship type information, and ship tonnage information.
[0014] Secondly, a ship trajectory optimization device is provided, comprising: an acquisition module configured to acquire first trajectory data and auxiliary data of a ship, wherein the first trajectory data includes multiple trajectory points arranged in chronological order, and the auxiliary data corresponds to the first trajectory data and includes: coastline data, aquatic environment data, and ship static data; a calculation module configured to determine the land landing probability of a trajectory point based on the spatial relationship between the trajectory point and the coastline data, the point motion characteristics corresponding to the trajectory point, the matching result between the trajectory point and the aquatic environment data, and the ship static data; and a judgment module configured to determine the land landing probability of a trajectory point based on the land landing probability. The system employs a probability-based approach to determine drift landing points from multiple trajectory points. An iterative module is configured to iteratively thin the first trajectory data and determine the current trajectory segment to be thinned. When the trajectory segment to be thinned includes a drift landing point, a repair point is generated based on the drift landing point, and the position corresponding to the repair point replaces the original position of the drift landing point in the thinning judgment of the trajectory segment to be thinned. Based on the regional attributes and segment motion characteristics corresponding to the trajectory segment to be thinned, a dynamic thinning threshold is determined for the trajectory segment to be thinned. Based on the dynamic thinning threshold, trajectory points participating in the thinning judgment are retained or discarded, and second trajectory data is generated.
[0015] Thirdly, a computer-readable storage medium is provided having instructions stored thereon, which, when executed by a processor, implement the ship trajectory optimization method as described in any of the first aspects. Attached Figure Description
[0016] The following is a brief introduction to the accompanying drawings used in the description of the embodiments of this application: Figure 1 A flowchart of a ship trajectory optimization method provided in some embodiments of this application is shown; Figure 2 The diagram shows a trajectory schematic of a ship trajectory optimization method provided in some embodiments of this application; Figure 3 A schematic diagram of a ship trajectory optimization device provided in some embodiments of this application is shown. Detailed Implementation
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, examples of implementation methods of this application will be described below with reference to the accompanying drawings. The accompanying drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without creative effort. Adjustments and improvements made without departing from the concept of this application are all within the protection scope of this application.
[0018] To keep the drawings simple, each figure only schematically shows the parts relevant to the embodiment, and they do not represent the actual structure of the product. In addition, for the sake of clarity and ease of understanding, some figures only schematically show parts of components with the same structure or function, and there may actually be more or fewer components with the same structure or function.
[0019] In this application, unless otherwise expressly specified and limited, ordinal numbers, such as "first," "second," etc., are used only to distinguish and describe related objects, and should not be construed as indicating or implying the relative importance or order between related objects; furthermore, they do not represent the quantity of related objects. "Multiple" includes two or more, and other quantifiers are similar. " / " is used to describe the relationship between related objects, indicating an "or" relationship between them. "And / or" is used to describe the relationship between related objects, including any combination relationship between them, such as "a and / or b" including: "a alone," "b alone," or "a and b." "One or more" or "at least one" of multiple objects refers to any object or any combination of multiple objects, such as "one or more of a1, a2, a3" or "at least one of a1, a2, a3" including: "a1 alone," "a2 alone," "a3 alone," "a1 and a2," "a1 and a3," "a2 and a3," or "a1, a2 and a3."
[0020] Ship trajectory data is crucial for analyzing ship navigation patterns and implementing shipping management. It has practical significance for waterway navigation and environmental assessment, making it a key research area in data processing. However, existing trajectory processing methods have many shortcomings in complex scenarios. First, for nearshore and complex waters, they typically only employ noise removal algorithms, lacking mechanisms for identifying and repairing land-related phenomena in the trajectory, resulting in low data accuracy. Second, traditional thinning algorithms do not integrate external environmental data such as coastlines, ports, and sea ice, easily missing key environmental interaction points in specific water scenarios. Furthermore, conventional thinning methods usually use a fixed compression threshold, failing to fully consider the varying requirements for trajectory fidelity at different speeds and geographical areas.
[0021] With the development of geospatial information technology and data fusion algorithms, integrating coastline data, aquatic environment grids, and ship static features into trajectory optimization algorithms has become a feasible approach. By combining multi-dimensional information such as geometric space, kinematic features, and geographical environment, the behavior of trajectory points can be determined more objectively. While identifying drifting landing points, a comprehensive evaluation is conducted based on ship characteristics and regional navigation patterns, providing an effective means for ship trajectory optimization. Therefore, this application provides a ship trajectory optimization method, apparatus, and storage medium. This method determines drifting landing points based on weighted fusion of multi-source data, embeds spatial repair into iterative trajectory thinning, and combines adaptive adjustment of the thinning threshold to ultimately output a standardized ship trajectory that conforms to physical laws and meets the requirements of spatiotemporal continuity queries.
[0022] The specific embodiments of this application are described below with reference to the accompanying drawings: Figure 1 A flowchart of a ship trajectory optimization method provided in some embodiments of this application is shown. The optimization method includes the following steps: S110: Acquire the first trajectory data and auxiliary data of the vessel. The first trajectory data includes multiple trajectory points arranged in chronological order. The auxiliary data corresponds to the first trajectory data and includes: coastline data, water environment data, and vessel static data. S120: Based on the spatial relationship between trajectory points and coastline data, the point motion characteristics corresponding to the trajectory points, the matching results between trajectory points and aquatic environment data, and ship static data, determine the land landing probability of the trajectory points; S130: Determine the drift landing point from multiple trajectory points based on the landing probability; S140: Perform iterative thinning processing on the first trajectory data and determine the trajectory segment to be thinned in the current processing; S150: When the trajectory segment to be thinned includes a drift landing point, a repair point is generated based on the drift landing point, and the position corresponding to the repair point is used to replace the original position of the drift landing point in the thinning judgment of the trajectory segment to be thinned. S160: Based on the regional attributes and segment motion characteristics corresponding to the trajectory segment to be thinned, determine the dynamic thinning threshold corresponding to the trajectory segment to be thinned. S170: Based on the dynamic thinning threshold, the trajectory points involved in the thinning judgment are retained or discarded, and a second trajectory data is generated.
[0023] In the above embodiment of the ship trajectory optimization method, the initial stage of trajectory processing first receives the original trajectory data stream of the ship. The first trajectory data includes multiple trajectory points arranged in chronological order, which are collected in real-time by the ship's AIS or GPS terminal. Each trajectory point contains at least basic attributes such as longitude, latitude, and timestamp. Since the original trajectory coordinates lack constraints from the surrounding environment, this application can simultaneously retrieve external auxiliary data to give the trajectory points geographic semantics. The auxiliary data corresponds to the first trajectory data and includes coastline data, water environment data used to define navigation jurisdictions, and ship static data extracted from a ship static database. After acquiring the auxiliary data, preprocessing operations can be performed on the first trajectory data, such as removing points with reversed timestamps or invalid points with coordinates outside a reasonable range, and establishing a spatial index or hash index between the trajectory points and the auxiliary data to facilitate quick retrieval of the corresponding geographic context through the trajectory points.
[0024] Traditional noise removal methods for determining whether a trajectory point has drifted ashore rely solely on fixed geographical boundaries for segmentation, which can easily lead to misjudgments when dealing with complex sea areas such as nearshore islands and reefs. This embodiment differs from traditional methods by employing a comprehensive evaluation using information from multiple dimensions. Specifically, the spatial relationship between trajectory points and coastline data reflects the distance of the trajectory point from actual land. The point motion characteristics corresponding to the trajectory point include its instantaneous speed and rate of change of course, which can intuitively show whether the vessel is following an illogical route. Furthermore, the matching results between trajectory points and aquatic environmental data can verify whether the vessel is in a legal anchorage or operating area. Static vessel data can incorporate specific ship types and tonnages, and the behavioral patterns of similar vessels in specific waters can be used as experience for comprehensive analysis. By comprehensively calculating the features of these four dimensions, the probability of landing for each trajectory point can be output. Compared to rules based on distance, the probability model combining multi-dimensional data can accurately exclude normal berthing behavior and identify abnormal land crossing phenomena. By setting reasonable probability judgment thresholds, drifting landing points can be accurately screened from a massive number of normal trajectory points. For example, the probability judgment threshold can be set based on historical navigation data or customized by querying a database of similar vessels and considering actual needs. The comprehensive calculation of the above four dimensions can be performed using a weighted summation method, and the specific weight values can be obtained through training on historical trajectory data. Subsequently, based on the landing probability, drifting landing points are accurately selected from multiple trajectory points in the first trajectory data. For example, a landing probability threshold is established. If the landing probability of a trajectory point is greater than or equal to the threshold, the trajectory point is judged as a drifting landing point; conversely, if the landing probability of a trajectory point is less than the threshold, the trajectory point is judged as a normal point. In this way, abnormal landing points caused by multipath effects or hardware failures can be accurately distinguished, thereby avoiding the accidental deletion of normal navigation points and legitimate docking points.
[0025] After identifying the drifting landing point, this application does not delete from the original sequence, but instead iteratively thins the first trajectory data, embedding the repair logic into the candidate point set before each iteration. At the beginning of the iteration loop, the trajectory segment to be thinned is first determined. The initial trajectory segment to be thinned is the entire complete first trajectory data. When processing each trajectory segment to be thinned, it is first identified whether a drifting landing point exists within that segment. If it exists, a repair point conforming to navigation patterns can be generated using the local context, and its spatial location can replace the original drifting landing point in the iteration of that trajectory segment. For example, the average distance between the repair point and the nearest channel centerline can be required to be less than or equal to a preset repair threshold, thereby ensuring that the deviation between the repaired trajectory data and the original trajectory data is within a controllable range. For example, based on electronic nautical chart data, the preset repair threshold can be set to 100 meters. Since the navigation tasks and motion characteristics of ships vary in different geographical areas, using a fixed thinning threshold may lead to the loss of key point data. Therefore, this application adopts a dynamic thinning threshold. For the current trajectory segment to be thinned, a dynamic thinning threshold is set by comprehensively evaluating the regional attributes and the segment motion characteristics of the ships within that segment. For example, the dynamic thinning threshold can be defined according to the standards of the satellite navigation ship monitoring information system, combined with the actual application environment, or it can be optimized through training based on historical navigation data.
[0026] Based on a dynamic thinning threshold, it is determined whether each trajectory point in the trajectory segment to be thinned should be retained. For example, this can be determined by the spatial distance from the trajectory point to the line connecting the start and end points. Redundant points that do not conform to the overall navigation trend and are within the tolerance range are discarded, while feature points that represent changes in ship course or environmental interactions are retained. After traversing and converging all recursive sub-segments, all retained key feature points are reconnected in chronological order, finally outputting standardized, physically consistent, and spatiotemporally continuous second trajectory data, completing the entire optimization process.
[0027] The ship trajectory optimization method in this embodiment utilizes multi-source environmental data and ship static attributes to calculate the probability of landing and accurately identify drifting landing points, effectively eliminating spatial position error interference caused by near-shore signal drift. By embedding a spatial repair mechanism into the iterative process of the thinning algorithm, the thinning threshold for different segments is adaptively adjusted, avoiding tangent errors generated by traditional algorithms at complex water boundaries. This solves the problem of ship erroneous land crossings and effectively achieves a balance between high compression rate and high fidelity in trajectory data. This further improves the accuracy of ship trajectory data processing, meeting the practical application needs of spatiotemporal continuity queries and behavioral feature refinement.
[0028] In some embodiments of this application, the probability of a trajectory point landing is determined based on the spatial relationship between the trajectory point and the coastline data, the motion characteristics of the corresponding trajectory point, the matching results between the trajectory point and the aquatic environment data, and the ship's static data. This includes: determining the spatial distance probability of the trajectory point based on its distance from the nearest coastline; determining the motion characteristic probability of the trajectory point based on the speed and heading change rates calculated from continuous trajectory points; determining the environmental matching probability of the trajectory point based on the positional matching relationship between the trajectory point and the aquatic environment data; determining the static characteristic probability of the trajectory point based on the ship type information and ship tonnage information in the ship's static data; and determining the landing probability of the trajectory point based on the spatial distance probability, motion characteristic probability, environmental matching probability, and static characteristic probability.
[0029] In the above embodiments, when calculating the probability of landing, four independent sub-probabilities can be set for four features: spatial relationship, point motion characteristics, matching results, and ship static data. The spatial distance probability corresponding to a trajectory point can be determined by the distance between the trajectory point and the nearest coastline. For example, the geodesic distance algorithm under the WGS84 ellipsoid is used to calculate the geometric distance between the trajectory point and the nearest coastline boundary. If this geometric distance is less than or equal to 50 meters, the spatial distance probability is set to 0.9; if the geometric distance is between 50 meters and 200 meters, the probability value decreases linearly with increasing distance, from 0.9 at 50 meters to 0.1 at 200 meters; if the geometric distance is greater than 200 meters, the spatial distance probability is 0. The lower the spatial distance probability value, the lower the probability that the trajectory point will drift and land in space.
[0030] Secondly, based on the speed and heading change rate calculated from continuous trajectory points, the motion characteristic probability corresponding to each trajectory point is determined. Based on the timestamps of the continuous trajectory points and the filtered coordinate differences, the instantaneous speed and heading change rate of each trajectory point are calculated. For example, the formula for calculating the motion characteristic probability based on the instantaneous speed and heading change rate is as follows: Formula 1 in, Represents the probability of motion characteristics. v It is the instantaneous speed of the ship at the current point in its trajectory (unit: knots, kn). It is the rate of change of the ship's heading at the current trajectory point (unit: degrees / minute). The probability is the magnitude of the value. This probability reflects the abnormally violent yaw of a ship when it is near a standstill. According to dynamics and sailing inertia, a ship cannot drift at a large angle beyond physical limits in a very short time. If a ship is traveling at a very low speed but experiences a violent change in course in a short period of time, it indicates that the trajectory point is distorted due to multipath effects or other factors, and the corresponding motion characteristic probability is increased.
[0031] Next, based on the location matching relationship between the trajectory points and the aquatic environment data, the environmental matching probability corresponding to the trajectory points is determined. For example, by comparing the trajectory point locations with sea ice concentration data and port polygon data, the calculation formula is as follows: Formula 2 in, Formula 3 Formula 4 in, Indicates the probability of environmental matching. This indicates the port matching probability. This represents the probability of sea ice matching. When a trajectory point is determined to be within a preset port polygon, =0.9, otherwise 0. Simultaneously, the grid sea ice concentration data from the aquatic environment data is read for judgment; if the sea ice concentration at the current location is greater than or equal to 80%, it is considered a non-navigable ice zone. =0.8 otherwise 0. If the trajectory point is within the preset navigation route, even if the trajectory point is geometrically close to the coastline, its environmental matching probability will be set to zero; conversely, if the trajectory point enters a non-navigable area with dense sea ice, a higher environmental matching probability can be set based on the density data of the real-time sea ice grid, indicating that the ship's navigation route is in conflict with the physical environment.
[0032] Finally, based on the ship type and tonnage information in the ship static data, the static feature probability corresponding to the trajectory point is determined by querying a pre-defined mapping table. For example, the mapping table is set according to maritime statistical experience as follows: Formula 5 in, This represents the static feature probability. If the vessel type is a cargo ship with a tonnage greater than 3000 tons, since large cargo ships typically do not linger at low speeds in shallow near-shore waters, they have a higher probability of drifting ashore, so the static feature probability is set to a high value. If the type is a fishing boat or yacht, its docking or lingering ashore is a normal phenomenon, so the corresponding static feature probability is set to a low value. The static feature probabilities for other vessel types can take intermediate values. Furthermore, the mapping table can be dynamically updated based on a Bayesian model trained on historical data, and can also be refined based on the vessel's type, weight, material, or other feature parameters, or adjusted according to actual needs.
[0033] Finally, the spatial distance probability, motion feature probability, environment matching probability, and static feature probability are fused together to comprehensively determine the final landing probability of the trajectory point. There are several ways to calculate the landing probability based on the four feature probabilities mentioned above. For example, a non-linear classifier such as a support vector machine can be used, inputting these four sub-probabilities as feature vectors into the network, and the classification model directly maps and outputs the corresponding confidence scores as the final landing probability. Alternatively, a decision tree model can be used, setting multi-level conditional branches according to specific sea area scenarios. For instance, when the environmental matching probability indicates that the landing is in a high-density sea ice area, the weights of other static features are weakened. Furthermore, linear weighted fusion can be used for comprehensive calculation.
[0034] In some embodiments of this application, the landing probability of a trajectory point is determined based on spatial distance probability, motion feature probability, environment matching probability, and static feature probability, including: weighting and fusing the spatial distance probability, motion feature probability, environment matching probability, and static feature probability according to preset weights to obtain the landing probability of the trajectory point; wherein, the preset weights are determined based on training on historical ship trajectory samples with landing annotation results.
[0035] In the above embodiments, the probability of landing can be determined by weighted summation of probabilities based on multiple features according to preset weights. For example, the calculation formula can refer to the following formula 6: Formula 6 in, Represents the probability of spatial distance. The preset weighting coefficients for spatial distance probabilities. Preset weighting coefficients for the probability of motion features. Preset weighting coefficients for the probability of environmental matching. These are preset weighting coefficients for the static feature probabilities. These weights can be set based on the application scenario and actual needs. Alternatively, they can be determined through training on historical ship trajectory samples with land landing annotation results. For example, 100,000 ship trajectory samples containing manually annotated land landing point labels from the past year are obtained from the maritime administration department, covering types such as fishing boats, cargo ships, and research vessels. The annotation standard is as follows: based on high-resolution satellite imagery and electronic nautical charts, AIS points less than 50 meters from the coastline, with a speed less than 2 knots and irregular headings are marked as "drifting land landing points" (positive samples), and the rest are "normal points" (negative samples). The weighted sum of the probabilities of the four features is used as the discriminant function, and supervised learning training is performed using the cross-entropy loss function. During training, the Adam optimizer can be used, with a learning rate of 0.001, a batch size of 256, and 200 iterations. The final optimal weights are... If the deployment scenario changes, such as adding a polar icebreaker type, the algorithm can be retrained periodically using newly collected labeled data to achieve adaptive updates of the weights. Furthermore, in the early stages of algorithm deployment, a weighting method excluding static ship features can be used. In this case, the weights corresponding to spatial distance probability, motion feature probability, and environment matching probability are trained using historical data fitting, and are respectively... In the later stages, static feature probabilities were introduced to improve the accuracy of identifying drifting of large cargo ships. While maintaining the original relative proportions, the probabilities were normalized and redistributed, and adjusted to four-factor weights, thereby making the probability determination more adaptable.
[0036] In some embodiments of this application, generating repair points based on drift landing points includes: determining the landing type corresponding to the drift landing point based on the number of consecutive drift landing points in the trajectory segment to be thinned; generating repair points based on linear interpolation or motion filtering when the landing type is short-term drift landing; and generating repair points based on curve reconstruction or path planning constrained by the water environment when the landing type is long-term crossing landing.
[0037] In the above embodiments, a differentiated approach is adopted for the repair of drifting landing points. First, connectivity analysis is performed on the continuous trajectory points marked as drifting landing points. By counting the number of consecutive drifting landing points in the spatial point sequence, the landing type corresponding to the drifting landing point is determined. If the number of consecutive drifting landing points in the current sequence is small, for example, within a range of less than 5 consecutive points, the sequence can be identified as a short-term drifting landing type. Short-term drift may be caused by reasons such as satellite signal obstruction, in which case the overall course and speed trend of the ship have not changed substantially. Therefore, a lightweight smoothing repair mechanism can be adopted for short-term drifting landings. For example, based on linear interpolation, spatial position interpolation is performed between the normal trajectory points before and after the drift occurs, or a Kalman filter based on the ship's kinematics model is used to smoothly deduce the coordinates of the repair point using the state of the preceding trajectory point sequence, so that the average distance between the repaired trajectory point and the nearest channel centerline is controlled within 100 meters.
[0038] If a large number of consecutive drifting landing points appear, such as more than five consecutive points, the sequence is considered a long-term land crossing. This situation may occur when ships circumnavigate peninsulas or complex reef systems. If straight-line interpolation is used, the generated trajectory will still cross land. For example, a Bézier curve can be used to smoothly fit the normal trajectory points at both ends, or a path planning algorithm constrained by the aquatic environment can be invoked to optimize the path by combining it with a preset channel polygon, bypassing obstacles, and replanning a bypass path. A series of repair point sequences can then be generated by discrete sampling on this planned path to replace the original long-term drifting landing points.
[0039] In some embodiments of this application, the dynamic thinning threshold corresponding to the trajectory segment to be thinned is determined based on the regional attributes and segment motion characteristics corresponding to the trajectory segment to be thinned, including: determining the regional attributes corresponding to the trajectory segment to be thinned based on the spatial matching results between the midpoint of the trajectory segment to be thinned and the coastline data and aquatic environment data; determining the segment speed characteristics corresponding to the trajectory segment to be thinned based on the speeds corresponding to each trajectory point in the trajectory segment to be thinned; determining the segment heading change characteristics corresponding to the trajectory segment to be thinned based on the heading change rate corresponding to each trajectory point in the trajectory segment to be thinned; and determining the dynamic thinning threshold based on the regional attributes, segment speed characteristics, and segment heading change characteristics.
[0040] In the above embodiments, during trajectory recursive processing, a dynamic thinning threshold can be set for any trajectory sub-segment. The current trajectory segment to be thinned is extracted, and the geometric center point of the latitude and longitude coordinates of all trajectory points within the segment is calculated, serving as the midpoint of the segment. All trajectory points within the segment include the starting point, ending point, and all points sandwiched in between. After obtaining the coordinates of the midpoint, the distance from the point to the coastline data and whether it is located within the port polygon are queried, thereby determining the regional attributes corresponding to the trajectory segment to be thinned. Furthermore, the speeds corresponding to each trajectory point in the trajectory segment to be thinned are statistically analyzed, and the arithmetic mean of the instantaneous speeds of all points within the current segment is calculated, serving as the segment speed feature. Next, the heading change rate corresponding to each trajectory point in the trajectory segment to be thinned is statistically analyzed, and the absolute values of the heading change rates between adjacent points within the current segment are averaged to obtain the average heading change rate, which serves as the segment heading change feature. Then, using the calculated local region attributes, segment speed characteristics, and segment heading change characteristics as input variables, the corresponding threshold mapping table is queried to determine the unique dynamic thinning threshold for the current trajectory segment to be thinned. It is important to note that if the trajectory points within the segment to be thinned span multiple geographical areas, for example, some points are located near the coast and some are located in open sea, the single-point thinning threshold for each point within the segment can be calculated based on the position and instantaneous speed of each trajectory point. The minimum value among these single-point thinning thresholds is then taken as the dynamic thinning threshold for that segment. Furthermore, users can select reference points for the dynamic thinning threshold based on the application scenario, including the aforementioned segment midpoint or the temporal center point within the trajectory segment to be thinned.
[0041] In some embodiments of this application, the trajectory points participating in the thinning judgment are retained or discarded based on a dynamic thinning threshold, including: determining the target trajectory point and the offset distance corresponding to the target trajectory point based on the distance between the trajectory point participating in the thinning judgment and the line connecting the start and end points of the trajectory segment to be thinned; retaining the target trajectory point when the offset distance is greater than the dynamic thinning threshold; and discarding the intermediate trajectory points in the trajectory segment to be thinned when the offset distance is less than or equal to the dynamic thinning threshold.
[0042] In the above embodiments, trajectory points are retained or discarded based on a dynamic thinning threshold. In the current trajectory segment to be processed, the starting and ending points are spatially connected to form a standard spatial geodesic reference segment under the WGS84 ellipsoid. Then, each intermediate trajectory point in the trajectory segment to be thinned is traversed, and the spatial vertical distance from each intermediate trajectory point to the reference line segment is calculated. After traversal, the distance with the largest absolute value of the spatial vertical distance is extracted and defined as the maximum offset distance; the corresponding intermediate trajectory point is determined as the target trajectory point. Subsequently, the maximum offset distance can be compared with the dynamic thinning threshold of the trajectory segment to be thinned. If the calculated maximum offset distance is greater than the dynamic thinning threshold, it indicates that the target trajectory point carries significant ship turning information or interaction characteristics, and it can be retained as a key feature point. Then, using this target trajectory point as the latest segmentation point, the current trajectory segment to be thinned is divided into a left sub-segment and a right sub-segment. The process involves dividing the trajectory into two segments. The left segment starts at the beginning of the original segment to be thinned and ends at the target trajectory point. The right segment starts at the target trajectory point and ends at the end of the original segment to be thinned. Then, the left and right segments are used as new segments to be thinned, and thinning is performed until the maximum offset distance of all segments is less than or equal to the dynamic thinning threshold. If the calculated maximum offset distance is less than or equal to the dynamic thinning threshold, it indicates that the turning and swaying amplitudes of all intermediate points within the current segment to be thinned are small and have little impact on the trajectory data, remaining within the compressible range. In this case, all intermediate trajectory points in the segment to be thinned can be discarded, and the segment can no longer be further divided; only the start and end points of the segment are retained.
[0043] In some embodiments of this application, a dynamic thinning threshold is determined based on regional attributes, segment speed characteristics, and segment heading change characteristics. This includes: when the regional attributes indicate that the trajectory segment to be thinned is located in a port area, and the segment speed characteristics indicate that the trajectory segment to be thinned is in a low-speed navigation state, a first threshold is determined; when the regional attributes indicate that the trajectory segment to be thinned is located in open water, and the segment speed characteristics indicate that the trajectory segment to be thinned is in a high-speed navigation state, a second threshold is determined; wherein the second threshold is greater than the first threshold.
[0044] In the above embodiments, a dynamic thinning threshold is determined based on regional attributes, segment speed characteristics, and segment heading change characteristics. For example, different thresholds can be selected for different regional attributes and segment speed characteristics. When the regional attribute indicates that the current trajectory segment to be thinned is located inside the port polygon, and the segment speed characteristic indicates that the ship is currently in a low-speed navigation state (e.g., average speed less than 5 knots), it indicates that the ship is berthing or departing. In this case, the dynamic thinning threshold can be determined as a first threshold, for example, set to 10 meters. When the regional attribute indicates that the current trajectory segment to be thinned is located in open water (e.g., more than 10 nautical miles from the coastline), and the segment speed characteristic indicates that the ship is in a high-speed navigation state (e.g., average speed greater than 10 knots), the ship is mostly in a straight-line state, and the trajectory is mostly linear. In this case, the dynamic thinning threshold is determined as a second threshold. The second threshold is greater than the first threshold, and the specific value can be set according to the actual navigation conditions. For example, the second threshold can be set to 100 meters according to the specifications of the satellite navigation ship supervision information system regarding the allowable positioning error in open sea areas.
[0045] Furthermore, the dynamic thinning threshold can be refined based on regional attributes and segment speed characteristics. When the regional attribute indicates that the current trajectory segment to be thinned is located inside the port polygon, if the average speed is greater than 10 knots, the dynamic thinning threshold can be set to 50 meters; if the average speed is greater than or equal to 5 knots and less than or equal to 10 knots, the dynamic thinning threshold can be calculated by linear interpolation, rounding down between 10 and 50 meters. When the regional attribute indicates that the current trajectory segment to be thinned is located in nearshore waters less than or equal to 10 nautical miles from the coastline and not within the port, if the average speed is greater than or equal to 5 knots and less than or equal to 10 knots, a weighted combination is performed based on the distance of the ship from the coastline and the ship's speed, using the port threshold of 10 meters and the open water threshold of 100 meters as endpoints. The derivation formula can be found here: Formula 7 in, Indicates the dynamic thinning threshold. This indicates the distance of a ship from the coastline, expressed in nautical miles. This indicates the speed of a ship, measured in knots. The first adjustment coefficient controls the sensitivity of the dynamic thinning threshold to changes in the distance between the ship and the coastline. This is the second adjustment coefficient, which controls the sensitivity of the dynamic thinning threshold to changes in the ship's speed. For example, as a set of preferred empirical values, The value is 0.5. The value is 0.8. It is the dividing line between the distance of ships from the coastline in nearshore and offshore areas. This is the dividing line between low-speed and high-speed ship navigation. For example, The value is 5. The value is 7.5. Substituting the values, we obtain an intermediate value of 55 meters, and the dynamic thinning threshold is rounded down to 50 meters. This function ensures a smooth transition of the dynamic thinning threshold in nearshore areas. Furthermore, the function parameters can be optimized using a Bayesian algorithm, calibrated based on the fidelity assessment of historical trajectories, or updated online adaptively over a preset time. When the regional attribute indicates that the current trajectory segment to be thinned is located in nearshore waters less than or equal to 10 nautical miles from the coastline and not within a port, and if the average speed is less than 5 knots or greater than 10 knots, the dynamic thinning threshold can also be solved using linear interpolation or set according to the actual situation. Figure 2 The diagram illustrates a trajectory diagram of a ship trajectory optimization method provided in some embodiments of this application. Region 1 corresponds to the trajectory data of a ship navigating in a low-threshold mapping zone in a port area, where the ship speed is less than 5 knots. In this case, combined with the aforementioned dynamic threshold setting rules, the dynamic thinning threshold is set to 10 meters. Region 2 corresponds to the trajectory data of a ship navigating in a high-threshold mapping zone in open sea, where the ship speed is greater than 10 knots. In this case, the dynamic thinning threshold is set to 100 meters. Region 3 corresponds to the trajectory data of a ship navigating in a threshold mapping zone in polar ice areas, where the dynamic thinning threshold is set to 50 meters. Trajectory 4 represents the original drift trajectory line of this segment, trajectory 5 represents the smoothed trajectory line after repair, and trajectory 6 represents the sequence of key points after thinning. It should be noted that, to reduce the computational cost caused by cross-coordinate system transformation, the iterative thinning process can be directly executed in the original WGS84 geographic coordinate system. In this case, the mathematical unit of the dynamic thinning threshold is degrees. An adaptive conversion rule can be adopted, based on the latitude of the current trajectory segment, and using the mapping relationship between the Earth's curvature and latitude and longitude and physical distance, to convert the above-set physical tolerance distance (e.g. 10 meters, 100 meters) into a degree threshold in the geographic coordinate system in real time, thereby ensuring the consistency of physical semantics.
[0046] In some embodiments of this application, the coastline data includes vector coastline data; the aquatic environment data includes at least one of port area data, anchorage area data, waterway area data, and sea ice concentration data; and the ship static data includes at least one of ship identification information, ship type information, and ship tonnage information.
[0047] In the above embodiments, coastline data can employ high-precision vector coastline data to accurately depict the polygonal boundaries of continental boundaries, offshore peninsulas, and near-shore islands and reefs. Port area data, anchorage area data, and channel area data are represented in the geographic information engine as standard two-dimensional polygonal spatial grid elements, containing legal maritime jurisdiction boundaries and buffer zones for the main channel centerline. Sea ice concentration data is primarily used for polar scientific research or high-latitude navigation areas, and is represented as a real-time updated coverage raster matrix, with each raster cell storing a sea ice coverage percentage value to identify navigable area boundaries. Vessel static data includes at least one of vessel identification information, vessel type information, and vessel tonnage information. Vessel identification information may include a globally unique Automatic Identification System (AIS) code. Vessel type information is used to distinguish between large cargo ships, tankers, container ships, passenger ships, special-purpose fishing vessels, and research icebreakers. Vessel tonnage information stores registered gross tonnage, net tonnage, or deadweight tonnage values. The aforementioned static characteristic parameters define the waterline depth and maneuverability of a vessel, helping the decision-making model to apply differentiated criteria to vessels with different characteristics.
[0048] In some embodiments of this application, before outputting the second trajectory data, the thinned trajectory can be compared with the first trajectory data to ensure that the trajectory data has no landing points and the segment intervals are uniform. For example, the variance of the time interval between adjacent trajectory points can be compared with a preset interval threshold. If the actual calculated variance of the time interval between adjacent points is less than the threshold, it is determined to be uniform. Conversely, the dynamic thinning threshold can be appropriately reduced or forced retention points can be added before re-thinning. The preset interval threshold can be derived from statistical analysis of the time intervals of multiple ships under different navigation states. Furthermore, when outputting the second trajectory data, intermediate parameters such as the dynamic thinning threshold, the original number of drift landing points, the time interval variance, and the first trajectory data can be output together to provide underlying data support and provide a reference for subsequent parameter optimization.
[0049] Figure 3The diagram illustrates a ship trajectory optimization device provided in some embodiments of this application. The optimization device 300 includes: an acquisition module 310 configured to acquire first trajectory data and auxiliary data of the ship, wherein the first trajectory data includes multiple trajectory points arranged in chronological order, and the auxiliary data corresponds to the first trajectory data and includes: coastline data, aquatic environment data, and ship static data; a calculation module 320 configured to determine the land landing probability of a trajectory point based on the spatial relationship between the trajectory point and the coastline data, the point motion characteristics corresponding to the trajectory point, the matching result between the trajectory point and the aquatic environment data, and the ship static data; and a judgment module 330 configured to determine the land landing probability based on the land landing probability. The system identifies drift landing points from multiple trajectory points; an iterative module 340 is configured to iteratively thin the first trajectory data and determine the trajectory segment to be thinned; when the trajectory segment to be thinned includes a drift landing point, a repair point is generated based on the drift landing point, and the position corresponding to the repair point replaces the original position of the drift landing point in the thinning judgment of the trajectory segment to be thinned; based on the regional attributes and segment motion characteristics corresponding to the trajectory segment to be thinned, a dynamic thinning threshold corresponding to the trajectory segment to be thinned is determined; based on the dynamic thinning threshold, the trajectory points participating in the thinning judgment are retained or discarded, and second trajectory data is generated.
[0050] The aforementioned ship trajectory optimization device embeds the repair logic into the iterative process of thinning, and with the adaptive adjustment of the dynamic thinning threshold, it further enhances the device's adaptability to various environments, solves the problem of ship trajectories drifting due to signal drift, effectively achieves a balance between high compression rate and high fidelity in trajectory data, and finally outputs standardized trajectory data that conforms to physical laws and meets the requirements of spatiotemporal continuity query.
[0051] Based on the same technical concept, this application also provides a computer-readable storage medium storing instructions thereon, which, when executed by a processor, implement the ship trajectory optimization method as described in any of the above embodiments.
[0052] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not described in detail or in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Furthermore, the above embodiments can be freely combined as needed.
Claims
1. A method for optimizing ship trajectories, characterized in that, include: Acquire first trajectory data and auxiliary data of the vessel, wherein the first trajectory data includes multiple trajectory points arranged in chronological order, and the auxiliary data corresponds to the first trajectory data and includes: coastline data, aquatic environment data and vessel static data; Based on the spatial relationship between the trajectory point and the coastline data, the point motion characteristics corresponding to the trajectory point, the matching result between the trajectory point and the aquatic environment data, and the ship static data, the land landing probability of the trajectory point is determined; Based on the landing probability, the drift landing point is determined from the plurality of trajectory points; The first trajectory data is iteratively thinned, and the trajectory segment to be thinned is determined for the current processing. When the trajectory segment to be thinned includes the drift landing point, a repair point is generated based on the drift landing point, and the position corresponding to the repair point replaces the original position of the drift landing point in the thinning judgment of the trajectory segment to be thinned. Based on the regional attributes and segment motion characteristics corresponding to the trajectory segment to be thinned, the dynamic thinning threshold corresponding to the trajectory segment to be thinned is determined. Based on the dynamic thinning threshold, the trajectory points involved in the thinning judgment are retained or discarded, and second trajectory data is generated.
2. The ship trajectory optimization method according to claim 1, characterized in that, The determination of the land landing probability of the trajectory point based on the spatial relationship between the trajectory point and the coastline data, the point motion characteristics corresponding to the trajectory point, the matching result between the trajectory point and the aquatic environment data, and the ship static data includes: Based on the distance between the trajectory point and the coastline data, determine the spatial distance probability corresponding to the trajectory point; Based on the speed and heading change rate corresponding to the trajectory point, determine the motion feature probability corresponding to the trajectory point; Based on the positional matching relationship between the trajectory points and the aquatic environment data, the environmental matching probability corresponding to the trajectory points is determined; Based on the ship type information and ship tonnage information in the ship static data, the static feature probability corresponding to the trajectory point is determined; The landing probability of the trajectory point is determined based on the spatial distance probability, the motion feature probability, the environment matching probability, and the static feature probability.
3. The ship trajectory optimization method according to claim 2, characterized in that, Determining the landing probability of the trajectory point based on the spatial distance probability, the motion feature probability, the environment matching probability, and the static feature probability includes: According to preset weights, the spatial distance probability, the motion feature probability, the environment matching probability, and the static feature probability are weighted and fused to obtain the landing probability of the trajectory point; The preset weights are determined based on training with historical ship trajectory samples that have land landing annotation results.
4. The ship trajectory optimization method according to claim 1, characterized in that, The generation of repair points based on the drift landing points includes: Based on the number of consecutive drifting landing points in the trajectory segment to be thinned, the landing type corresponding to the drifting landing point is determined; In the case where the landing type is short-term drift landing, the repair points are generated based on linear interpolation or motion filtering. In the case of a long-term land crossing, the repair points are generated based on a curve reconstruction method or a path planning method constrained by the aquatic environment.
5. The ship trajectory optimization method according to claim 1, characterized in that, Based on the region attributes and segment motion characteristics corresponding to the trajectory segment to be thinned, the dynamic thinning threshold corresponding to the trajectory segment to be thinned is determined, including: Based on the spatial matching results between the midpoint of the trajectory segment to be thinned and the coastline data and the aquatic environment data, the regional attributes corresponding to the trajectory segment to be thinned are determined. Based on the speed of each trajectory point in the trajectory segment to be thinned, the segment speed characteristics of the trajectory segment to be thinned are determined. Based on the heading change rate corresponding to each trajectory point in the trajectory segment to be thinned, the heading change characteristics of the segment to be thinned are determined. The dynamic thinning threshold is determined based on the region attributes, the segment speed characteristics, and the segment heading change characteristics.
6. The ship trajectory optimization method according to claim 1, characterized in that, Based on the dynamic thinning threshold, the trajectory points participating in the thinning judgment are retained or discarded, including: Based on the distance between the trajectory point participating in the thinning judgment and the line connecting the start and end points of the trajectory segment to be thinned, the target trajectory point and the offset distance corresponding to the target trajectory point are determined. When the offset distance is greater than the dynamic thinning threshold, the target trajectory point is retained; When the offset distance is less than or equal to the dynamic thinning threshold, the intermediate trajectory points in the trajectory segment to be thinned are discarded.
7. The ship trajectory optimization method according to claim 5, characterized in that, Determining the dynamic thinning threshold based on the region attributes, the segment speed characteristics, and the segment heading change characteristics includes: When the regional attribute indicates that the trajectory segment to be thinned is located in the port area, and the segment speed characteristic indicates that the trajectory segment to be thinned is in a low-speed navigation state, the dynamic thinning threshold is determined to be the first threshold. When the area attribute indicates that the trajectory segment to be thinned is located in open water, and the segment speed characteristic indicates that the trajectory segment to be thinned is in a high-speed navigation state, the dynamic thinning threshold is determined as the second threshold. Wherein, the second threshold is greater than the first threshold.
8. The ship trajectory optimization method according to any one of claims 1 to 7, characterized in that, The coastline data includes vector coastline data; The aquatic environment data includes at least one of the following: port area data, anchorage area data, waterway area data, and sea ice concentration data; The ship static data includes at least one of ship identification information, ship type information, and ship tonnage information.
9. A ship trajectory optimization device, characterized in that, include: The acquisition module is configured to acquire first trajectory data and auxiliary data of the vessel. The first trajectory data includes multiple trajectory points arranged in chronological order. The auxiliary data corresponds to the first trajectory data and includes: coastline data, aquatic environment data, and vessel static data. The calculation module is configured to determine the land landing probability of the trajectory point based on the spatial relationship between the trajectory point and the coastline data, the point motion characteristics corresponding to the trajectory point, the matching result between the trajectory point and the aquatic environment data, and the ship static data. The determination module is configured to determine the drift landing point from the plurality of trajectory points based on the landing probability; An iterative module is configured to perform iterative thinning processing on the first trajectory data and determine the trajectory segment to be thinned in the current processing; when the trajectory segment to be thinned includes the drift landing point, a repair point is generated based on the drift landing point, and the position corresponding to the repair point replaces the original position of the drift landing point in the thinning judgment of the trajectory segment to be thinned; based on the regional attributes and segment motion characteristics corresponding to the trajectory segment to be thinned, a dynamic thinning threshold corresponding to the trajectory segment to be thinned is determined; based on the dynamic thinning threshold, the trajectory points participating in the thinning judgment are retained or discarded, and second trajectory data is generated.
10. A computer-readable storage medium, characterized in that, It stores instructions that, when executed by a processor, implement the ship trajectory optimization method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Improved ship track data processing method, device, equipment and medium
CN120236431A
Ship trajectory state recognition method and system, electronic equipment and storage medium
CN120564468A