Bridge area ship trajectory extraction method and system based on AIS data
By introducing physical constraints and dynamic time warping algorithms into AIS data, the bridge crossing time is identified and the velocity profile symmetry deviation is measured. This solves the problems of trajectory error removal and insufficient identification of interference events in existing technologies, and realizes the accuracy and effectiveness of ship trajectory extraction in bridge areas.
Patent Information
- Application Number
- CN202610865960.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-16
- Publication Date
- 2026-11-03
AI Technical Summary
In existing technologies, methods for extracting ship trajectories in bridge areas cannot distinguish between normal deceleration when crossing a bridge and anchoring when stopped, resulting in the incorrect removal of valid bridge crossing trajectories. Furthermore, these methods cannot identify invalid trajectories containing interfering events from the overall behavioral pattern, affecting the accuracy of trajectory quality filtering.
By introducing hard constraints based on a physically reasonable range into AIS data, the bridge crossing time is identified and velocity sampling points within an equal time window are extracted. The dynamic time warping algorithm is used to measure the velocity profile symmetry deviation value, filter out the valid bridge crossing trajectory, and eliminate the trajectory containing interference events.
This improved the retention rate of effective samples and the accuracy of invalid trajectory removal in the extraction of ship trajectories in the bridge area, ensuring the precision of trajectory quality filtering and avoiding misjudgment of normal deceleration trajectories when crossing the bridge.
Smart Images

Figure CN123033392A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and system for extracting bridge area vessel trajectories based on AIS data. Background Technology
[0002] With the rapid development of the shipping industry, the tonnage and deadweight of ships continue to increase, leading to frequent collisions between ships and water structures such as bridges. Automatic Identification Systems (AIS) acquire dynamic information such as ship position, speed, and heading through GPS or BeiDou navigation systems and transmit it via VHF broadcast according to ITU standards. AIS data has therefore become a primary data source for ship flow analysis, maritime supervision, and accident risk identification in bridge areas. A method for extracting ship trajectories in bridge areas based on AIS data involves processing the original AIS messages, including field cleaning, coordinate transformation, bridge crossing time identification, and trajectory extraction. This process separates the motion trajectory segments of each ship within specific time periods before and after bridge crossing from massive continuous AIS stream data. After quality filtering and interpolation normalization, a structured dataset suitable for trajectory prediction modeling is output, which is of great significance for bridge collision risk identification.
[0003] In existing technologies, methods for extracting ship trajectories in bridge areas typically extract trajectory data one hour before and after the bridge crossing time within a fixed time window, and use a speed deviation exceeding three times the standard error (SEM) by more than 10% as the criterion for trajectory quality filtering. However, the above methods have two shortcomings. First, the fixed time window extraction method does not distinguish which segment of data within the window belongs to the actual bridge crossing maneuvering segment affected by the physical constraints of the bridge area, resulting in a large number of far-end trajectories unrelated to bridge crossing behavior entering the dataset, interfering with the training quality of subsequent prediction models. Second, the filtering criterion of a speed deviation exceeding three times the standard error is based on the speed statistical characteristics of a single trajectory, failing to distinguish the essential difference between normal deceleration during bridge crossing and anchoring / stopping. In the highly constrained scenario of a bridge crossing's navigation channel, this can lead to the misclassification and rejection of normal deceleration trajectories as abnormal trajectories, resulting in the loss of effective bridge crossing samples.
[0004] Because the speed deviation three times the standard error criterion relies on the speed distribution statistics of a single trajectory, its judgment result is strongly correlated with the trajectory's own speed mean and standard deviation. For ships of different types and speed ranges, consistency of the judgment results is difficult to guarantee. Furthermore, this criterion lacks the ability to distinguish between trajectories containing multiple interfering events. When anchoring events and normal deceleration events coexist in the trajectory, the statistical characteristics of the speed distribution are skewed by the interfering events, leading to misjudgments of the normal deceleration segment. A deeper problem is that existing methods have not transformed the physical constraints of the bridge passageway—the objective law that normally passing vessels inevitably produce a deceleration-acceleration symmetrical speed profile with the passage time as the axis—into a quantifiable trajectory validity judgment criterion. This results in trajectory quality filtering remaining at the level of single-point speed anomaly detection, unable to identify invalid bridge-passing trajectories containing interfering events from the perspective of the entire behavioral pattern. Summary of the Invention
[0005] This application provides a method and system for extracting bridge-area vessel trajectories based on AIS data, which solves the problems in the prior art where valid bridge-crossing trajectories are mistakenly removed due to the criterion of single-point speed statistics, and invalid trajectories containing interference events cannot be identified from the perspective of the entire behavioral pattern. This improves the retention rate of effective samples and the accuracy of invalid trajectory removal in bridge-area vessel trajectory extraction.
[0006] Firstly, this application provides a method for extracting vessel trajectories in bridge areas based on AIS data, the method comprising:
[0007] Step S1: Extract the ship number, latitude and longitude, speed, heading and timestamp fields from the original AIS message. After field integrity check and duplicate point removal, obtain the AIS track point set.
[0008] Step S2: Based on the positional relationship between each trajectory point in the AIS trajectory point set and the bridge centerline, identify the time when the ship passes the bridge centerline. Using the time when the ship passes the bridge as the axis of symmetry, extract speed sampling points within equal time windows forward and backward, and obtain uniform sequences of entry speed and exit speed by resampling.
[0009] Step S3: The uniform sequence of the approach speed is time-reversed to obtain the reverse speed sequence. The sequence difference between the reverse speed sequence and the uniform sequence of the exit speed is calculated. After normalization, the speed profile symmetry deviation value is obtained. The speed profile symmetry deviation value is compared with a preset symmetry threshold. The effective bridge crossing trajectory set is obtained by filtering based on the condition that the speed profile symmetry deviation value does not exceed the preset symmetry threshold.
[0010] Step S4: Perform interpolation and normalization processing on each trajectory in the set of valid bridge crossing trajectories to obtain a structured bridge crossing trajectory dataset.
[0011] Secondly, this application provides a bridge area vessel trajectory extraction system based on AIS data, the bridge area vessel trajectory extraction system based on AIS data includes:
[0012] The extraction module is used to extract the ship number, latitude and longitude, speed, heading and timestamp fields from the original AIS message, and obtain the AIS trajectory point set after field integrity check and duplicate point removal;
[0013] The sampling module is used to identify the time when a ship passes the bridge centerline based on the positional relationship between each trajectory point in the AIS trajectory point set and the bridge centerline. Taking the time when the ship passes the bridge as the axis of symmetry, it extracts speed sampling points within an equal time window forward and backward, and obtains a uniform sequence of entry speed and a uniform sequence of exit speed after resampling.
[0014] The filtering module is used to perform time-series flipping on the uniform sequence of the bridge entry speed to obtain a flipped speed sequence, calculate the sequence difference between the flipped speed sequence and the uniform sequence of the bridge exit speed, obtain the speed profile symmetry deviation value after normalization, compare the speed profile symmetry deviation value with a preset symmetry threshold, and obtain a set of valid bridge crossing trajectories by filtering based on the condition that the speed profile symmetry deviation value does not exceed the preset symmetry threshold.
[0015] The processing module is used to perform interpolation and normalization processing on each trajectory in the set of valid bridge crossing trajectories to obtain a structured bridge crossing trajectory dataset.
[0016] Thirdly, a bridge area vessel trajectory extraction device based on AIS data is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the bridge area vessel trajectory extraction device based on AIS data to execute the above-described bridge area vessel trajectory extraction method based on AIS data.
[0017] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the above-described method for extracting bridge area vessel trajectories based on AIS data.
[0018] The technical solution provided in this application introduces a hard constraint based on a physically reasonable range during the field integrity verification stage of the AIS trajectory point set. The range of values for ground velocity, ground heading, and latitude and longitude are used as the basis for cleaning, eliminating abnormal records caused by equipment signal drift and field encoding errors from the data source. Compared to existing cleaning methods that only perform null value removal, the physical range constraint intercepts impossible data at the field level before it enters the bridge crossing time identification process, preventing abnormal trajectory points from participating in the intersection calculation of the determinant cross product method and generating false bridge crossing times. In the bridge crossing time identification stage, the determinant cross product method is used to check the intersection relationship between the line connecting adjacent trajectory points and the bridge centerline. Linear interpolation is performed using the ratio of the absolute values of the cross products on both sides, refining the bridge crossing time to the second level. Using this as a symmetrical axis, equal-length time windows are extracted forward and backward, ensuring that the uniform sequences of entry and exit speeds are strictly symmetrical in time structure with respect to the bridge crossing time. This provides input data with a clear physical correspondence for subsequent speed profile symmetry determination.
[0019] The core contribution of this application lies in transforming the physical constraints of the navigation opening in the bridge area into a quantifiable criterion for velocity profile symmetry deviation. Vessels passing under normal bridge conditions, constrained by the navigation opening, inevitably produce symmetrical velocity profiles characterized by deceleration upon entering the bridge and acceleration upon exiting. By performing a time-series flip on the uniform velocity sequence entering the bridge and then aligning it with the uniform velocity sequence exiting the bridge to form a pair of equal-length aligned velocity sequences, the difference between the two sequences is measured using dynamic time warping distance and normalized by sequence length. The resulting velocity profile symmetry deviation value elevates the determination of trajectory validity from single-point velocity anomaly detection to the level of judging the overall velocity behavior pattern. The application of the dynamic time warping algorithm in this application differs from its general use in trajectory similarity measurement or trajectory clustering scenarios. This application specifically uses it to measure the symmetry deviation between the speed sequence of the bridge approach and the speed sequence of the bridge exit after a rollover. This enables the algorithm's matching path search capability to serve the verification of the physical laws of bridge crossing behavior. By using a preset symmetry threshold to filter the set of valid bridge crossing trajectories, it accurately removes trajectories containing interference events such as anchoring and avoidance while retaining normal deceleration bridge crossing samples. This overcomes the defect in the prior art where the speed deviation of three times the mean error criterion misjudges normal deceleration bridge crossing trajectories as abnormal trajectories. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of an embodiment of the bridge area vessel trajectory extraction method based on AIS data in this application.
[0022] Figure 2 This is a schematic diagram illustrating the generation of equally spaced trajectories from AIS trajectory points after cubic spline interpolation resampling in an embodiment of this application.
[0023] Figure 3 This is a schematic diagram illustrating the identification of ship crossing time and determination of travel direction in an embodiment of this application;
[0024] Figure 4 This is a schematic diagram comparing the latitude and longitude trajectory prediction results during the training and testing phases after the structured bridge trajectory dataset is integrated into the prediction model in this embodiment of the application. Detailed Implementation
[0025] This application provides a method and system for extracting bridge area vessel trajectories based on AIS data. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0026] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the bridge area vessel trajectory extraction method based on AIS data in this application includes:
[0027] Step S1: Extract the ship number, latitude and longitude, speed, heading and timestamp fields from the original AIS message. After field integrity check and duplicate point removal, obtain the AIS track point set.
[0028] Specifically, the AIS track point set is a collection of track points arranged in ascending order of timestamps, grouped by ship number. Each track point contains six fields: ship number, longitude, latitude, ground speed, ground heading, and data update time. Field integrity is checked based on the physical reasonable range of each field. The ground speed range is set to 0 to 30 knots, the ground heading range is set to 0 to 360 degrees, and the latitude and longitude range is set to within the preset boundaries of the study area. Records exceeding these ranges are discarded. Duplicate points are removed when both the timestamp and latitude / longitude coordinates are identical for the same ship number. The record with the earliest timestamp is retained, and all other duplicate records are deleted.
[0029] Step S2: Based on the positional relationship between each trajectory point in the AIS trajectory point set and the bridge centerline, identify the time when the ship passes the bridge centerline. Using the time of passing the bridge as the axis of symmetry, extract speed sampling points within equal time windows forward and backward, and obtain uniform sequences of entry and exit speeds after resampling.
[0030] Specifically, the identification of the bridge crossing time relies on the pre-entry of the coordinates of the endpoints of the bridge centerline. A determinant cross product method is used to check whether the line connecting adjacent trajectory points intersects with the bridge centerline. For trajectory points determined to intersect, linear interpolation is performed using the ratio of the absolute values of the cross products on both sides; the resulting interpolated time is the bridge crossing time. The radius of the equal-length window is set to 3600 seconds, meaning that 60 minutes of velocity sampling points are extracted before and after the bridge crossing time along the axis. Both the uniform velocity sequence entering and exiting the bridge are resampled using cubic spline interpolation at a fixed time step of 10 seconds. After resampling, each sequence contains 360 velocity sampling points, and the sequence length is forced to be uniform to eliminate the influence of uneven sampling intervals in the original AIS data on subsequent symmetry calculations.
[0031] Step S3: The uniform sequence of the approach speed is flipped in time to obtain the flipped speed sequence. The sequence difference between the flipped speed sequence and the uniform sequence of the exit speed is calculated. After normalization, the speed profile symmetry deviation value is obtained. The speed profile symmetry deviation value is compared with the preset symmetry threshold. The effective bridge crossing trajectory set is obtained by filtering the speed profile symmetry deviation value that does not exceed the preset symmetry threshold.
[0032] Specifically, the velocity profile symmetry deviation is a quantitative indicator that measures the degree of symmetry in the velocity changes of the same vessel on both sides of the bridge approach and exit with respect to the bridge passage time. During normal bridge passage, vessels are affected by the physical constraints of the navigation channel; their speed gradually decreases from a high value to a local minimum near the bridge passage time during the approach phase, and gradually recovers from this local minimum during the exit phase. The velocity change trends on both sides are mirror images of the bridge passage time. After time-reversing the uniform velocity sequence approaching the bridge, both the reversed velocity sequence and the uniform velocity sequence exiting the bridge have time starting points corresponding to the bridge passage time and time directions that are far from the bridge passage time. These two sequences form a directly comparable, equally aligned velocity sequence pair. The sequence difference is measured using a dynamic time warping distance metric. The result is the velocity profile symmetry deviation, measured in knots, obtained by dividing the sequence length of the uniform velocity sequence approaching the bridge by 360 times the dynamic time warping distance. The preset symmetry threshold is the 95th percentile of the velocity profile symmetry deviation value distribution corresponding to the normal bridge crossing trajectory samples verified manually in the historical AIS data of the study water area. Trajectories containing interference events are removed because abnormal bridge crossing behaviors such as anchoring and avoidance disrupt the velocity profile symmetry and their velocity profile symmetry deviation value exceeds the preset symmetry threshold. Trajectories with velocity profile symmetry deviation values not exceeding the preset symmetry threshold are retained as the set of valid bridge crossing trajectories.
[0033] Step S4: Perform interpolation and normalization on each trajectory in the valid bridge crossing trajectory set to obtain a structured bridge crossing trajectory dataset.
[0034] Specifically, the interpolation process performs cubic spline interpolation independently on the four fields of north coordinate, east coordinate, ground velocity, and ground heading for each trajectory in the valid bridge crossing trajectory set. The interpolation time step is ten seconds. Before interpolation, the ground heading field undergoes angle expansion processing for cases where the angle difference between adjacent sampling points exceeds 180 degrees. After interpolation, the results are mapped back to the range of 0 to 360 degrees. The normalization process performs maximum-min normalization independently on each field of each trajectory. The sampling points of each field are normalized to the interval between zero and one. The maximum and minimum values corresponding to each field are retained as normalization parameters and stored in conjunction with the unique trajectory number. The unique trajectory number is composed of a nine-digit ship number and a fourteen-digit timestamp. The timestamp is the bridge crossing time minus the integer second corresponding to the time window radius of 3600 seconds, ensuring that each trajectory number in the entire dataset is unique.
[0035] In one specific embodiment, step S1 includes:
[0036] The original AIS message is parsed to extract the ship number, longitude, latitude, ground speed, ground heading, and data update time fields to obtain the original trajectory point record;
[0037] Based on the physical reasonable range of each field in the original trajectory point records, records with ground velocity field values exceeding the range of 0 to 30 knots, ground heading field values exceeding the range of 0 to 360 degrees, and latitude and longitude field values exceeding the preset range of the study water area are removed to obtain qualified trajectory point records.
[0038] Duplicate records with identical timestamps and latitude / longitude coordinates under the same ship number are removed from the qualified trajectory point records. The record with the earliest timestamp is retained to obtain the deduplicated trajectory point records.
[0039] Based on the deduplicated trajectory point records, group them by ship number and sort them in ascending order by data update time to obtain an AIS trajectory point set with ship number as the key and trajectory point list arranged in time sequence as the value.
[0040] Specifically, the original AIS equipment exhibited three types of anomalies during actual data acquisition: missing fields, transmission errors, and equipment drift. These anomalies resulted in negative or abnormally large values for ground speed exceeding the ship's actual navigation capabilities, ground heading values exceeding the 0-360 degree circular range, and latitude and longitude drift points significantly deviating from the study area. A ground speed upper limit of 30 knots was set, based on the physical limits of normal navigation speed for vessels in inland waterways and near-shore channels; records exceeding 30 knots were identified as anomalies caused by equipment signal drift. The ground heading range of 0-360 degrees represents complete circular angle coverage; records exceeding this range were identified as field encoding errors. The preset latitude and longitude range extended 2 degrees outward from the actual boundary of the study area; records exceeding this boundary were identified as position drift points. All three types of anomaly records were uniformly removed during the generation of qualified trajectory point records and were not included in subsequent bridge crossing time identification.
[0041] Duplicate point removal involves removing records with identical timestamps and latitude / longitude coordinates under the same vessel number. These duplicate records are generated by the AIS base station repeatedly receiving the same message. The record with the earliest timestamp is retained, and all other duplicate records are deleted, resulting in deduplicated trajectory point records. After deduplication, the deduplicated trajectory point records are grouped by vessel number. All trajectory points under the same vessel number are sorted in ascending order by the data update time field, forming an AIS trajectory point set with the vessel number as the key and the time-sequential list of trajectory points as the value. Each trajectory point in the AIS trajectory point set contains six fields: vessel number, longitude, latitude, ground speed, ground heading, and data update time. The fields are complete, and the values are all within a physically reasonable range. The time-sequential arrangement ensures that the time interval calculation result of adjacent trajectory points is a non-negative value, meeting the requirement of temporal continuity of trajectory points in the determinant cross product judgment method for bridge crossing time identification.
[0042] In one specific embodiment, step S2 includes:
[0043] The latitude and longitude coordinates in the AIS trajectory point set are converted into plane north coordinates and plane east coordinates according to the three-dimensional Gauss-Kruger projection to obtain the plane coordinate trajectory point set;
[0044] Based on the planar coordinates of two adjacent times under the same ship number in the set of planar coordinate trajectory points, the determinant cross product judgment method is used to check whether the line connecting adjacent trajectory points intersects with the line connecting the endpoints of the bridge centerline. For adjacent trajectory point pairs that are determined to intersect, the timestamps of the adjacent trajectory point pairs are linearly interpolated according to the ratio of the absolute values of the cross products at the two times to obtain the time of crossing the bridge.
[0045] Using the time of crossing the bridge as the axis of symmetry, velocity field sampling points within the same time window are extracted from the set of planar coordinate trajectory points. The sampling points extracted forward are arranged in ascending order of data update time to obtain the original sequence of the speed entering the bridge, and the sampling points extracted backward are arranged in ascending order of data update time to obtain the original sequence of the speed exiting the bridge.
[0046] Based on the original sequences of bridge entry speed and bridge exit speed, cubic spline interpolation is performed at a fixed time step interval to obtain uniform sequences of bridge entry speed and bridge exit speed of equal length.
[0047] Specifically, the latitude and longitude coordinates in the AIS message are based on the WGS-84 geodetic coordinate system. Directly calculating the planar distance between two points using latitude and longitude introduces ellipsoidal errors, and the determinant cross product method requires vector operations to be performed in a Cartesian coordinate system. Therefore, the latitude and longitude must be converted to planar coordinates beforehand. The conversion uses the 3-degree zone Gauss-Kruger projection, with the central meridian taken as the nearest 3-degree zone central meridian within the longitude range of the study water area. For waters near 120 degrees east longitude, the central meridian is taken as 120 degrees east longitude. The coordinates of the bridge centerline endpoints are simultaneously converted to planar north and planar east coordinates according to the above projection parameters, placing them in the same Cartesian coordinate system as the AIS trajectory points, thus obtaining a set of planar coordinate trajectory points. The execution logic of the determinant cross product method is as follows: Take the planar coordinates of two adjacent times under the same ship number, denoted as P1 and P2 respectively. Denote the planar coordinates of the two endpoints of the bridge centerline as A and B respectively. Calculate the cross product D1, which is equal to the cross product of vector AB and vector AP1. Calculate the cross product D2, which is equal to the cross product of vector AB and vector AP2. If the product of D1 and D2 is less than 0, it is determined that line segment P1P2 intersects line segment AB, and the ship passes through the bridge between the corresponding times P1 and P2. The crossing time is derived through linear interpolation. The interpolation formula is: the crossing time equals the timestamp corresponding to P1 plus the absolute value of D1 divided by the sum of the absolute values of D1 and D2, multiplied by the difference between the timestamps of P1 and P2. The result is the crossing time with second-level precision.
[0048] Using the bridge crossing time as the axis of symmetry, velocity field sampling points are extracted within a 3600-second range both forward and backward. The 3600-second time window radius is chosen to reasonably cover the time required for a vessel to complete the entire deceleration, bridge crossing, and acceleration process near the bridge's navigation opening. Too short a window would fail to capture the complete deceleration and acceleration process, while too long a window would introduce distant trajectory segments unrelated to the bridge crossing behavior. The forward-extracted sampling points are arranged in ascending order of data update time to obtain the original sequence of bridge-entry velocity, and the backward-extracted sampling points are arranged in ascending order of data update time to obtain the original sequence of bridge-exit velocity. Both sequences contain only velocity field values and corresponding timestamps, excluding coordinate information. Because the transmission interval of the original AIS messages dynamically varies between 2 seconds and 6 minutes depending on the vessel's navigation status, the sampling intervals of the original bridge-entry and bridge-exit velocity sequences are uneven, and the lengths of the sequences on both sides are unequal, making direct point-by-point comparison impossible. Cubic spline interpolation was performed on both sequences with a fixed time step of 10 seconds. After interpolation, both sequences contained 360 equally spaced velocity sampling points, and the sequence length was forced to be uniformly 360 to eliminate the interference of uneven sampling intervals on the calculation of velocity profile symmetry, resulting in uniform inbound and outbound velocity sequences. The boundary conditions for cubic spline interpolation adopted natural spline conditions, that is, the second derivative at both endpoints was set to 0, ensuring that the interpolation curve did not generate additional curvature constraints at the endpoints.
[0049] Figure 2 This is a schematic diagram of the AIS trajectory points being resampled by cubic spline interpolation to generate equally spaced trajectories in an embodiment of this application. In the diagram, the red dots are the original AIS trajectory points, the blue solid lines are the equally spaced interpolated trajectories obtained after performing cubic spline interpolation with a fixed time step, the horizontal axis is longitude, and the vertical axis is latitude.
[0050] Figure 3 This is a schematic diagram of the identification of the time of ship crossing the bridge and the determination of the direction of travel in the embodiments of this application. The center line of the bridge in the figure is a vertical dashed line, marking the three positions before crossing the bridge, during crossing the bridge, and after crossing the bridge. The included angle α is the angle between the ship's motion direction vector and the channel's upstream direction vector, which is used to determine whether the ship's direction of travel is upstream or downstream.
[0051] In one specific embodiment, step S3 involves performing a time-series flip on the bridge approach speed uniform sequence to obtain a flipped speed sequence, including:
[0052] The velocity sampling points in the uniform sequence of the approaching speed are rearranged in reverse order to obtain the reversed velocity sequence. The first sampling point in the reversed velocity sequence corresponds to the velocity value in the uniform sequence of the approaching speed that is closest to the crossing time in time, and the last sampling point in the reversed velocity sequence corresponds to the velocity value in the uniform sequence of the approaching speed that is furthest from the crossing time in time.
[0053] Based on the consistent alignment between the flipping speed sequence and the uniform exit speed sequence, which both correspond to the bridge crossing time at the starting point and are far away from the bridge crossing time in the time direction, the flipping speed sequence and the uniform exit speed sequence are determined as an equal-length aligned speed sequence pair.
[0054] Specifically, the uniform speed sequence for entering the bridge contains 360 speed sampling points, arranged in ascending order of data update time. The first sampling point corresponds to the speed value at the start of the time window, i.e., 3600 seconds before the bridge crossing time, and the 360th sampling point corresponds to the speed value closest to the bridge crossing time in time. Time-series reversal involves swapping the k-th sampling point with the 361-k-th sampling point in the sequence, iterating through k from 1 to 360. After reversal, the first sampling point becomes the speed value of the 360th sampling point in the original sequence, i.e., the speed value closest to the bridge crossing time in time, and the 360th sampling point becomes the speed value of the first sampling point in the original sequence, i.e., the speed value furthest from the bridge crossing time in time, resulting in the reversed speed sequence. The length of the reversed speed sequence is the same as the uniform speed sequence for entering the bridge, both being 360 sampling points, consistent with the length of the uniform speed sequence for exiting the bridge.
[0055] The physical basis of the flipping operation lies in the fact that the deceleration process of a vessel entering the bridge and the acceleration process of a vessel exiting the bridge are mirror images of each other with respect to the bridge crossing time. The uniform speed sequence entering the bridge is arranged in time from further away from the bridge crossing time to closer to the bridge crossing time, while the uniform speed sequence exiting the bridge is arranged in time from closer to the bridge crossing time to further away from the bridge crossing time. The time directions of the two sequences are opposite, and they cannot be directly compared point by point. After flipping, the first sampling point of the flipped speed sequence and the first sampling point of the uniform speed sequence exiting the bridge both correspond to speed values near the bridge crossing time. The two sequences have the same time starting point and the time direction is both away from the bridge crossing time, forming a pair of equal-length aligned speed sequences that can be directly compared point by point. The pair of equal-length aligned speed sequences is composed of the flipped speed sequence and the uniform speed sequence exiting the bridge. Both sequences are 360 units long, and the two sampling points with the same position index strictly correspond in terms of the time offset from the bridge crossing time, providing a position-aligned input sequence for constructing the cumulative cost matrix of dynamic time warping distance.
[0056] In one specific embodiment, step S3 calculates the sequence difference between the overturning speed sequence and the bridge exit speed uniform sequence, and after normalization, obtains the speed profile symmetry deviation value, including:
[0057] Based on equal-length aligned velocity sequence pairs, a cumulative cost matrix is constructed with the length of the flipping velocity sequence as the number of rows and the length of the uniform outgoing velocity sequence as the number of columns. The first element of the cumulative cost matrix is set to the absolute value of the difference between the velocity values of the first sampling point in the flipping velocity sequence and the first sampling point in the uniform outgoing velocity sequence. For each element in the first row of the cumulative cost matrix from the second to the next, the absolute value of the difference between the velocity value of the sampling point corresponding to the current column position in the flipping velocity sequence and the velocity value of the first sampling point in the uniform outgoing velocity sequence is taken, added to the value of the previous element, and filled in column by column. For each element in the first column of the cumulative cost matrix, take the absolute value of the difference between the speed value of the first sampling point in the flip speed sequence and the speed value of the sampling point corresponding to the current row position in the bridge exit speed uniform sequence, add it to the value of the previous element, and fill it in row by row; for the remaining elements of the cumulative cost matrix, take the minimum value among the three adjacent elements on the left, top, and top left, add it to the absolute value of the difference between the speed value of the sampling point corresponding to the current row position in the flip speed sequence and the speed value of the sampling point corresponding to the current column position in the bridge exit speed uniform sequence, and fill it in row by row and column by column to obtain the filled cumulative cost matrix;
[0058] The value of the lower right element of the cumulative cost matrix is used as the dynamic time warping distance. The dynamic time warping distance is normalized by division with the sequence length of the uniform sequence of bridge entry speed to obtain the velocity profile symmetry deviation value.
[0059] Specifically, the cumulative cost matrix has 360 rows, equal to the length of the flip speed sequence, and 360 columns, equal to the length of the out-of-bridge speed uniform sequence, resulting in a matrix dimension of 360 rows and 360 columns. The first element of the matrix, i.e., the element in the first row and first column, is the absolute value of the difference between the speed value at the first sampling point of the flip speed sequence and the speed value at the first sampling point of the out-of-bridge speed uniform sequence, recording the speed deviation between the two sequences at the starting point of time. Elements in rows 1 through 1 row 360 are then filled by taking the absolute value of the difference between the speed value at the sampling point corresponding to the current column position in the flip speed sequence and the speed value at the first sampling point of the out-of-bridge speed uniform sequence, and summing this value with the value of the element in the previous column of the same row. The filling process in the first row constrains the path to extend unidirectionally only along the direction of the out-of-bridge speed uniform sequence. From row 2 to row 360 of column 1, each element is calculated by taking the absolute value of the difference between the speed value of the first sampling point in the flip speed sequence and the speed value of the sampling point corresponding to the current row position in the uniform outgoing speed sequence. This value is then added to the value of the element in the previous row of the same column. This process is repeated row by row to fill the matrix. The filling process in column 1 restricts the path to extend unidirectionally along the flip speed sequence. For the remaining elements in row i and column j, the minimum value among the elements in row i and column j-1, row i and column j-1, and row i and column j-1 is taken. This minimum value is then added to the absolute value of the difference between the speed value of the first sampling point in the flip speed sequence and the speed value of the first sampling point in the uniform outgoing speed sequence. This summation is then used to fill the matrix. This process is repeated row by row and column by column, traversing i from 2 to 360 and j from 2 to 360, to obtain the filled cumulative cost matrix.
[0060] The value of the bottom right element of the cumulative cost matrix, i.e., the element in row 360 and column 360, records the minimum cumulative velocity deviation between the flipping velocity sequence and the exit velocity uniform sequence under the dynamic time warping alignment path. This value is the dynamic time warping distance. The absolute value of the dynamic time warping distance increases with the sequence length. To eliminate the influence of sequence length on the magnitude of the distance, the dynamic time warping distance is divided by the sequence length 360 of the entering velocity uniform sequence. The quotient is the velocity profile symmetry deviation value, in units of segments, representing the average velocity deviation between the flipping velocity sequence and the exit velocity uniform sequence at each sampling point under the optimal alignment path. The smaller the velocity profile symmetry deviation value, the higher the symmetry of the velocity profiles on both sides of the bridge entry and exit with respect to the bridge crossing time, and the closer the trajectory is to normal bridge crossing behavior. If the velocity profile symmetry deviation value exceeds the preset symmetry threshold, it indicates that there are interference events in the trajectory that disrupt the velocity symmetry, and the trajectory is judged as invalid and discarded.
[0061] In one specific embodiment, step S3 compares the velocity profile symmetry deviation value with a preset symmetry threshold, and obtains a set of valid bridge crossing trajectories by filtering based on the condition that the velocity profile symmetry deviation value does not exceed the preset symmetry threshold, including:
[0062] Based on the manually verified normal bridge crossing trajectory samples in the historical AIS data of the research water area, the velocity profile symmetry deviation value corresponding to each normal bridge crossing trajectory sample is calculated one by one, and the distribution of velocity profile symmetry deviation value of normal bridge crossing trajectory samples is obtained.
[0063] The value corresponding to the 95th percentile in the velocity profile symmetry deviation value distribution is determined as the preset symmetry threshold.
[0064] The velocity profile symmetry deviation value corresponding to each trajectory is compared with the preset symmetry threshold one by one. The corresponding trajectory is selected and retained based on the condition that the velocity profile symmetry deviation value does not exceed the preset symmetry threshold, and the corresponding trajectory is removed based on the condition that the velocity profile symmetry deviation value exceeds the preset symmetry threshold, thus obtaining a set of valid bridge crossing trajectories.
[0065] Specifically, the manually verified normal bridge crossing trajectory samples were derived from historical AIS data of the study waters. The selection criteria were continuous trajectory points, no anchoring or stopping records, no temporary docking records, and no records of sudden speed drops due to emergency avoidance of other vessels. Furthermore, the number of speed sampling points within 3600 seconds before and after the bridge crossing time met the minimum requirement for control points under cubic spline interpolation. For each manually verified normal bridge crossing trajectory sample, the uniform speed sequence entering and exiting the bridge was extracted using the aforementioned method of constructing equal-length aligned speed sequence pairs. A time-series flip was performed to obtain the flipped speed sequence. A cumulative cost matrix was constructed, and the dynamic time-normalized distance was extracted. Normalization was performed with a sequence length of 360 to obtain the speed profile symmetry deviation value corresponding to that sample. The speed profile symmetry deviation values of all normal bridge crossing trajectory samples were arranged in ascending order to obtain the speed profile symmetry deviation value distribution. The value corresponding to the 95th percentile of the velocity profile symmetry deviation value distribution is taken as the preset symmetry threshold. The 95th percentile means that the velocity profile symmetry deviation value of 95% of the normal bridge crossing trajectory samples in the velocity profile symmetry deviation value distribution does not exceed this value. This ensures that the vast majority of normal bridge crossing trajectories are retained while excluding trajectories with extremely poor velocity symmetry.
[0066] For each trajectory in the set of trajectories to be screened, the velocity profile symmetry deviation value is compared with a preset symmetry threshold. Trajectories with velocity profile symmetry deviation values not exceeding the preset symmetry threshold are considered to have symmetry in their velocity profiles with respect to the bridge crossing time that conforms to the physical laws of normal bridge crossing behavior and are retained. Trajectories with velocity profile symmetry deviation values exceeding the preset symmetry threshold are considered to have interference events such as anchoring, temporary stopping, or emergency avoidance that disrupt the symmetry of the velocity profile and are discarded. After summing all retained trajectories, a set of valid bridge crossing trajectories is obtained. Each trajectory in the set of valid bridge crossing trajectories contains time-series sampling points for complete plane north coordinates, plane east coordinates, ground velocity, and ground heading fields, as well as the corresponding bridge crossing time, travel direction markings, and velocity profile symmetry deviation value. It does not include abnormal bridge crossing trajectories with velocity profile symmetry deviation values exceeding the preset symmetry threshold.
[0067] In one specific embodiment, step S4 includes:
[0068] For the north coordinate, east coordinate, ground velocity, and ground heading fields of each trajectory in the effective bridge crossing trajectory set, cubic spline interpolation is performed at a fixed time step interval. Before interpolating the ground heading field, angle expansion processing is performed for cases where the heading difference between adjacent trajectory points exceeds 180 degrees. After interpolation, the results are mapped back to the range of 0 to 360 degrees to obtain the interpolated trajectory where each field is a sampling point at an equal time interval.
[0069] Based on all the sampling points of each field of each trajectory in the interpolation trajectory, the maximum and minimum values of the sampling points of each field are taken respectively. The maximum-minimum normalization is performed on all the sampling points of each field according to the difference between the maximum and minimum values. The maximum and minimum values corresponding to each field are retained as normalization parameters, and the normalized trajectory and the corresponding set of normalization parameters are obtained, in which the sampling points of each field are normalized to the interval between zero and one.
[0070] The normalized trajectory is divided into training set, validation set and test set according to the ship number. All normalized trajectories under the same ship number are grouped into the same subset to obtain training set trajectory, validation set trajectory and test set trajectory.
[0071] The training set trajectory, validation set trajectory, and test set trajectory are bound and stored with the corresponding normalized parameter set according to the unique trajectory number formed by concatenating the ship number and the bridge crossing time, to obtain the structured bridge crossing trajectory dataset.
[0072] Specifically, for each trajectory in the effective bridge crossing trajectory set, the four fields of north coordinate, east coordinate, ground velocity, and ground heading are independently subjected to cubic spline interpolation. The interpolation time step is 10 seconds, consistent with the resampling time step of the uniform velocity sequence entering and exiting the bridge, ensuring that the sampling points of the velocity field in the interpolated trajectory have the same time resolution as the sequence used in the velocity profile symmetry discrimination stage. Before performing cubic spline interpolation, the ground heading field needs to pre-process the jump problem at the 0-degree to 360-degree boundary. The specific execution method is to check the heading difference of adjacent trajectory points one by one. If the absolute value of the difference exceeds 180 degrees, the heading value of the next trajectory point is added or subtracted by 360 degrees to make the absolute value of the difference not exceed 180 degrees. All adjacent points are traversed to complete the angle expansion. The expanded heading value is not limited to the range of 0-degree to 360 degrees. After the interpolation is completed, the modulo operation is performed on all interpolation results to map back to the range of 0-degree to 360 degrees, obtaining the equal time interval interpolation result of the heading field. After interpolation, each trajectory contains 2 multiplied by 3600 divided by 10 plus 1, which is 721 sampling points with equal time intervals. All four fields cover a complete time window of 3600 seconds before and after the bridge crossing time, resulting in the interpolated trajectory.
[0073] Max-min normalization is performed independently for each field of each trajectory in the interpolated trajectory. The normalization formula is that the normalized value equals the original value minus the minimum value of the field, divided by the difference between the maximum and minimum values of the field. The normalized result falls within the range of 0 to 1. The eight values—maximum and minimum values for each field—constitute the normalization parameter set. This set is bound to the corresponding trajectory and stored for inverse normalization of the prediction results. The dataset is divided into units based on ship IDs, with the training, validation, and test sets accounting for 70%, 15%, and 15% respectively. This division by ship ID ensures that trajectories of the same ship do not cross subset boundaries, eliminating the interference of correlation between different bridge crossing records of the same ship on model evaluation. A unique trajectory ID is composed of a 9-digit ship ID and a 14-digit timestamp. The timestamp is the bridge crossing time minus 3600 seconds, in the format yyyymmddhhmmss, ensuring that each trajectory ID is unique across the entire dataset. The training set trajectory, validation set trajectory, and test set trajectory are each bound to their corresponding normalized parameter set and stored with a unique trajectory number, resulting in a structured bridge crossing trajectory dataset. Each record in the structured bridge crossing trajectory dataset contains a 721-by-4 dimensional normalized feature matrix, a unique trajectory number, a normalized parameter set, and a travel direction marker.
[0074] Figure 4This is a schematic diagram comparing the latitude and longitude trajectory prediction results of the training and testing phases after the structured bridge trajectory dataset is integrated into the prediction model in this embodiment of the application. In the diagram, the blue solid line represents the actual trajectory in the training phase, the red dashed line represents the predicted trajectory in the training phase, the green solid line represents the actual trajectory in the testing phase, and the yellow dashed line represents the predicted trajectory in the testing phase. The horizontal axis represents longitude, and the vertical axis represents latitude.
[0075] The above describes the bridge area vessel trajectory extraction method based on AIS data in the embodiments of this application. The following describes the bridge area vessel trajectory extraction system based on AIS data in the embodiments of this application. One embodiment of the bridge area vessel trajectory extraction system based on AIS data in the embodiments of this application includes:
[0076] The extraction module is used to extract the ship number, latitude and longitude, speed, heading and timestamp fields from the original AIS message, and obtain the AIS trajectory point set after field integrity check and duplicate point removal;
[0077] The sampling module is used to identify the time when a ship passes the bridge centerline based on the positional relationship between each trajectory point in the AIS trajectory point set and the bridge centerline. Taking the time when the ship passes the bridge as the axis of symmetry, it extracts speed sampling points within an equal time window forward and backward, and obtains a uniform sequence of entry speed and a uniform sequence of exit speed after resampling.
[0078] The filtering module is used to perform time-series flipping on the uniform sequence of the bridge entry speed to obtain a flipped speed sequence, calculate the sequence difference between the flipped speed sequence and the uniform sequence of the bridge exit speed, obtain the speed profile symmetry deviation value after normalization, compare the speed profile symmetry deviation value with a preset symmetry threshold, and obtain a set of valid bridge crossing trajectories by filtering based on the condition that the speed profile symmetry deviation value does not exceed the preset symmetry threshold.
[0079] The processing module is used to perform interpolation and normalization processing on each trajectory in the set of valid bridge crossing trajectories to obtain a structured bridge crossing trajectory dataset.
[0080] This invention also provides a bridge area vessel trajectory extraction device based on AIS data, which can be a server. The device includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operating system and computer programs in the non-volatile storage medium. The database stores the data corresponding to this embodiment. The network interface communicates with external terminals via a network connection. The computer program is executed by the processor to implement the above-described method.
[0081] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the bridge area vessel trajectory extraction method based on AIS data.
[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0083] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a bridge area vessel trajectory extraction device based on AIS data (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0084] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for extracting ship trajectories in bridge areas based on AIS data, characterized in that, The method includes: Step S1: Extract the ship number, latitude and longitude, speed, heading and timestamp fields from the original AIS message. After field integrity check and duplicate point removal, obtain the AIS track point set. Step S2: Based on the positional relationship between each trajectory point in the AIS trajectory point set and the bridge centerline, identify the time when the ship passes the bridge centerline. Using the time when the ship passes the bridge as the axis of symmetry, extract speed sampling points within equal time windows forward and backward, and obtain uniform sequences of entry speed and exit speed by resampling. Step S3: The uniform sequence of the approach speed is time-reversed to obtain the reverse speed sequence. The sequence difference between the reverse speed sequence and the uniform sequence of the exit speed is calculated. After normalization, the speed profile symmetry deviation value is obtained. The speed profile symmetry deviation value is compared with a preset symmetry threshold. The effective bridge crossing trajectory set is obtained by filtering based on the condition that the speed profile symmetry deviation value does not exceed the preset symmetry threshold. Step S4: Perform interpolation and normalization processing on each trajectory in the set of valid bridge crossing trajectories to obtain a structured bridge crossing trajectory dataset.
2. The method for extracting bridge area vessel trajectories based on AIS data according to claim 1, characterized in that, Step S1 includes: The original AIS message is parsed to extract the ship number, longitude, latitude, ground speed, ground heading, and data update time fields to obtain the original trajectory point record; Based on the physical reasonable range of each field in the original trajectory point record, records with ground velocity field values exceeding the range of 0 to 30 knots, ground heading field values exceeding the range of 0 to 360 degrees, and latitude and longitude field values exceeding the preset range of the study water area are removed to obtain qualified trajectory point records. Duplicate records with identical timestamps and latitude / longitude coordinates under the same ship number are removed from the qualified trajectory point records in the above field. The record with the earliest timestamp is retained to obtain the deduplicated trajectory point records. Based on the deduplication trajectory point records, group them by ship number and sort them in ascending order by data update time to obtain an AIS trajectory point set with ship number as key and trajectory point list arranged in time sequence as value.
3. The method for extracting bridge area vessel trajectories based on AIS data according to claim 1, characterized in that, Step S2 includes: The latitude and longitude coordinates in the AIS trajectory point set are converted into plane north coordinates and plane east coordinates according to the three-dimensional Gauss-Kruger projection to obtain the plane coordinate trajectory point set; Based on the planar coordinates of two adjacent times under the same ship number in the set of planar coordinate trajectory points, the determinant cross product judgment method is used to check whether the line connecting adjacent trajectory points intersects with the line connecting the endpoints of the bridge centerline. For adjacent trajectory point pairs that are determined to intersect, the timestamps of the adjacent trajectory point pairs are linearly interpolated according to the ratio of the absolute values of the cross products at the two times to obtain the bridge crossing time. Using the bridge crossing time as the axis of symmetry, velocity field sampling points within the same time window are extracted from the set of planar coordinate trajectory points, respectively. The sampling points extracted forward are arranged in ascending order of data update time to obtain the original sequence of bridge entry velocity, and the sampling points extracted backward are arranged in ascending order of data update time to obtain the original sequence of bridge exit velocity. Based on the original sequence of bridge entry speed and the original sequence of bridge exit speed, cubic spline interpolation is performed at a fixed time step interval to obtain a uniform sequence of bridge entry speed and a uniform sequence of bridge exit speed with equal length.
4. The method for extracting bridge area vessel trajectories based on AIS data according to claim 1, characterized in that, Step S3 involves performing a time-series flip on the uniform bridge entry speed sequence to obtain a flipped speed sequence, including: The speed sampling points in the uniform sequence of bridge entry speed are rearranged in reverse order to obtain a reverse speed sequence, such that the first sampling point in the reverse speed sequence corresponds to the speed value in the uniform sequence of bridge entry speed that is closest to the bridge crossing time in time, and the last sampling point in the reverse speed sequence corresponds to the speed value in the uniform sequence of bridge entry speed that is furthest from the bridge crossing time in time. Based on the consistent alignment relationship between the flipping speed sequence and the bridge exit speed uniform sequence, which both correspond to the bridge crossing time at the starting point and are both far away from the bridge crossing time in the time direction, the flipping speed sequence and the bridge exit speed uniform sequence are determined as an equal-length aligned speed sequence pair.
5. The method for extracting bridge area vessel trajectories based on AIS data according to claim 4, characterized in that, In step S3, the sequence difference between the overturning speed sequence and the bridge exit speed uniform sequence is calculated, and the normalized result is the speed profile symmetry deviation value, including: Based on equal-length aligned velocity sequence pairs, a cumulative cost matrix is constructed with the length of the flipping velocity sequence as the number of rows and the length of the uniform outgoing velocity sequence as the number of columns. The first element of the cumulative cost matrix is set to the absolute value of the difference between the velocity values of the first sampling point in the flipping velocity sequence and the first sampling point in the uniform outgoing velocity sequence. For each element in the first row of the cumulative cost matrix from the second to the next, the absolute value of the difference between the velocity value of the sampling point corresponding to the current column position in the flipping velocity sequence and the velocity value of the first sampling point in the uniform outgoing velocity sequence is taken, added to the value of the previous element, and filled in column by column. For each element in the first column of the cumulative cost matrix, take the absolute value of the difference between the speed value of the first sampling point in the flip speed sequence and the speed value of the sampling point corresponding to the current row position in the bridge exit speed uniform sequence, add it to the value of the previous element, and fill it in row by row; for the remaining elements of the cumulative cost matrix, take the minimum value among the three adjacent elements on the left, top, and top left, add it to the absolute value of the difference between the speed value of the sampling point corresponding to the current row position in the flip speed sequence and the speed value of the sampling point corresponding to the current column position in the bridge exit speed uniform sequence, and fill it in row by row and column by column to obtain the filled cumulative cost matrix; The value of the lower right element of the cumulative cost matrix is used as the dynamic time warping distance. The dynamic time warping distance is normalized by division with the sequence length of the uniform bridge entry speed sequence to obtain the speed profile symmetry deviation value.
6. The method for extracting bridge area vessel trajectories based on AIS data according to claim 5, characterized in that, In step S3, the velocity profile symmetry deviation value is compared with a preset symmetry threshold. A set of valid bridge crossing trajectories is obtained by filtering based on the condition that the velocity profile symmetry deviation value does not exceed the preset symmetry threshold. This includes: Based on the manually verified normal bridge crossing trajectory samples in the historical AIS data of the research water area, the velocity profile symmetry deviation value corresponding to each normal bridge crossing trajectory sample is calculated one by one, and the distribution of velocity profile symmetry deviation value of normal bridge crossing trajectory samples is obtained. The value corresponding to the 95th percentile in the velocity profile symmetry deviation value distribution is determined as the preset symmetry threshold. The velocity profile symmetry deviation value corresponding to each trajectory is compared with the preset symmetry threshold one by one. The corresponding trajectory is selected and retained based on the condition that the velocity profile symmetry deviation value does not exceed the preset symmetry threshold, and the corresponding trajectory is removed based on the condition that the velocity profile symmetry deviation value exceeds the preset symmetry threshold, so as to obtain a set of effective bridge crossing trajectories.
7. The method for extracting bridge area vessel trajectories based on AIS data according to claim 1, characterized in that, Step S4 includes: For the north coordinate, east coordinate, ground velocity, and ground heading fields of each trajectory in the set of effective bridge crossing trajectories, cubic spline interpolation is performed at a fixed time step interval. Before interpolating the ground heading field, angle expansion processing is performed for cases where the heading difference between adjacent trajectory points exceeds 180 degrees. After interpolation, the result is mapped back to the range of 0 to 360 degrees, resulting in an interpolated trajectory where each field is a sampling point at an equal time interval. Based on all the sampling points of each field of each trajectory in the interpolation trajectory, the maximum and minimum values of the sampling points of each field are taken respectively. The maximum-minimum normalization is performed on all the sampling points of each field according to the difference between the maximum and minimum values. The maximum and minimum values corresponding to each field are retained as normalization parameters to obtain the normalized trajectory and the corresponding set of normalization parameters where the sampling points of each field are normalized to the interval between zero and one. The normalized trajectory is divided into a training set, a validation set, and a test set based on the ship number. All normalized trajectories under the same ship number are grouped into the same subset to obtain the training set trajectory, the validation set trajectory, and the test set trajectory. The training set trajectory, validation set trajectory, and test set trajectory are bound and stored with the corresponding normalized parameter set according to the unique trajectory number formed by concatenating the ship number and the bridge crossing time, to obtain a structured bridge crossing trajectory dataset.
8. A bridge area vessel trajectory extraction system based on AIS data, characterized in that, For implementing the bridge area vessel trajectory extraction method based on AIS data as described in any one of claims 1-7, the bridge area vessel trajectory extraction system based on AIS data comprises: The extraction module is used to extract the ship number, latitude and longitude, speed, heading and timestamp fields from the original AIS message, and obtain the AIS trajectory point set after field integrity check and duplicate point removal; The sampling module is used to identify the time when a ship passes the bridge centerline based on the positional relationship between each trajectory point in the AIS trajectory point set and the bridge centerline. Taking the time when the ship passes the bridge as the axis of symmetry, it extracts speed sampling points within an equal time window forward and backward, and obtains a uniform sequence of entry speed and a uniform sequence of exit speed after resampling. The filtering module is used to perform time-series flipping on the uniform sequence of the bridge entry speed to obtain a flipped speed sequence, calculate the sequence difference between the flipped speed sequence and the uniform sequence of the bridge exit speed, obtain the speed profile symmetry deviation value after normalization, compare the speed profile symmetry deviation value with a preset symmetry threshold, and obtain a set of valid bridge crossing trajectories by filtering based on the condition that the speed profile symmetry deviation value does not exceed the preset symmetry threshold. The processing module is used to perform interpolation and normalization processing on each trajectory in the set of valid bridge crossing trajectories to obtain a structured bridge crossing trajectory dataset.
9. A bridge area vessel trajectory extraction device based on AIS data, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the bridge area vessel trajectory extraction method based on AIS data as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it causes the processor to perform the bridge area vessel trajectory extraction method based on AIS data as described in any one of claims 1 to 7.
