Method and apparatus for trajectory matching of a ship target

CN123030981APending Publication Date: 2026-11-03AEROSPACE INFORMATION RES INST CAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611533831.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-30
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing technologies, ocean vessel target trajectory matching methods rely on high-dimensional semantic features and do not incorporate the kinematic laws unique to ocean targets as strong priors, resulting in low matching accuracy in normal scenarios such as straight-line navigation and formation.

Method used

By employing self-attention processing combined with kinematic prior processing, the correlation is enhanced through spatial distance and relative position, and the kinematic laws of marine targets are introduced to improve matching accuracy.

Benefits of technology

It improves the accuracy of target trajectory matching for marine vessels and reduces the risk of mismatch in straight-line and formation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030981A_ABST
    Figure CN123030981A_ABST
Patent Text Reader

Abstract

The application provides a ship target trajectory matching method and device, and relates to the technical field of target tracking trajectory, which comprises the following steps: extracting a feature vector of a to-be-matched position and feature vectors of a plurality of historical trajectories; combining the feature vector of the to-be-matched position and feature vectors of a plurality of candidate effective trajectories into a candidate vector sequence; performing self-attention processing on the candidate vector sequence; performing kinematic prior processing on the candidate vector sequence after the self-attention processing, so as to enhance the correlation between the to-be-matched position and the plurality of candidate effective trajectories through spatial distance and relative position; determining a matching degree of the to-be-matched position with each enhanced effective trajectory; and determining a target trajectory of a ship target matched with the to-be-matched position from the plurality of candidate effective trajectories according to a plurality of matching degrees. The application can improve the defect that only relying on semantic feature matching in the related art is prone to false matching, and improve the trajectory matching accuracy of the ship target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of target trajectory tracking technology, and in particular to a method and apparatus for trajectory matching of ship targets. Background Technology

[0002] With the rapid development of the marine economy and the increasing demand for marine security, higher requirements have been placed on the real-time tracking and trajectory management of marine targets. Currently, various detection methods such as satellite remote sensing, shore-based radar, and AIS (Automatic Identification System) are widely used for marine target detection, which can periodically acquire status information such as latitude and longitude, heading, speed, and timestamps of targets.

[0003] Trajectory matching is a core component of marine target tracking systems. Its task is to match newly detected target points with existing historical trajectories in the database, and then update the trajectory status using the new points. Matching methods used in related technologies include LSTM (Long Short Term Memory) and GRU (Gated Recurrent Unit). These methods rely on high-dimensional semantic features for matching and do not incorporate the unique kinematic laws of marine targets as strong priors into the association process. This results in a risk of mismatches and low matching accuracy even in normal scenarios such as straight-line movement and formation tracking. Summary of the Invention

[0004] In view of this, this application provides a method and apparatus for trajectory matching of ship targets. This can solve the technical problem of low accuracy in matching marine ship targets in related technologies.

[0005] According to a first aspect of this application, a method for trajectory matching of a ship target is provided, comprising: acquiring the target position to be matched and data stored in a historical trajectory database containing multiple historical trajectories; extracting feature vectors from the target position and the data stored in the multiple historical trajectories; selecting multiple candidate valid trajectories that meet preset conditions from the multiple historical trajectories; merging the feature vectors of the target position and the multiple candidate valid trajectories into a candidate vector sequence; performing self-attention processing on the candidate vector sequence to obtain the correlation between the target position and the multiple candidate valid trajectories; performing kinematic prior processing on the candidate vector sequence after self-attention processing to enhance the correlation between the target position and the multiple candidate valid trajectories through spatial distance and relative position, obtaining an enhanced vector sequence, the enhanced vector sequence including an enhanced target position corresponding to the target position and multiple enhanced valid trajectories corresponding to the multiple candidate valid trajectories; determining the matching degree between the enhanced target position and each enhanced valid trajectory according to the enhanced vector sequence; and determining the target trajectory of the ship target to be matched from the multiple candidate valid trajectories based on the multiple matching degrees.

[0006] According to an embodiment of this application, self-attention processing is performed on a candidate vector sequence to obtain the association between the position to be matched and multiple candidate valid trajectories, including: linearly mapping the candidate vector sequence to obtain a query matrix, a key matrix, and a value matrix; calculating the attention weights of the candidate vector sequence based on the query matrix, the key matrix, and the value matrix; and weighting the position to be matched and multiple candidate valid trajectories according to the attention weights to obtain the association between the position to be matched and multiple candidate valid trajectories.

[0007] According to an embodiment of this application, kinematic prior processing is performed on the candidate vector sequence after self-attention processing, including: calculating a spatial distance bias term based on the spatial distance between the position to be matched and each candidate valid trajectory, and calculating a relative position bias term based on the relative position between the position to be matched and each candidate valid trajectory; fusing the spatial distance bias term and the relative position bias term into the attention weight to obtain enhanced attention weight; and weighting the position to be matched and multiple candidate valid trajectories according to the enhanced attention weight to obtain an enhanced vector sequence.

[0008] According to an embodiment of this application, a spatial distance offset term is calculated based on the spatial distance between the position to be matched and each candidate valid trajectory, and a relative position offset term is calculated based on the relative position between the position to be matched and each candidate valid trajectory. This includes: obtaining the spatial distance between the position to be matched and each candidate valid trajectory, normalizing multiple spatial distances corresponding to multiple candidate valid trajectories to obtain a spatial distance offset term; obtaining the relative position between the position to be matched and each candidate valid trajectory, normalizing multiple relative positions corresponding to multiple candidate valid trajectories to obtain a relative position offset term.

[0009] According to an embodiment of this application, selecting multiple candidate valid trajectories that meet preset conditions from the multiple historical trajectories includes: determining a screening time range based on the occurrence time of the location to be matched; selecting multiple first historical trajectories within the screening time range from the multiple historical trajectories; storing multiple first historical trajectories in a time-series storage unit according to a preset capacity until the time-series storage unit reaches the preset capacity; deleting the first historical trajectory with the earliest storage time in the time-series storage unit to obtain multiple second historical trajectories; for any second historical trajectory among the multiple second historical trajectories, if the time distribution of multiple trajectory points contained in any second historical trajectory is uniform, and the feature vector of any second historical trajectory contains the turning record and speed change record of the ship target, then any second historical trajectory that meets the conditions is determined as a candidate valid trajectory.

[0010] According to an embodiment of this application, determining the matching degree between the enhanced position to be matched and each enhanced effective trajectory based on the enhanced vector sequence includes: obtaining the similarity between the enhanced position to be matched and the plurality of enhanced effective trajectories, the spatial deviation between the enhanced position to be matched and the plurality of enhanced effective trajectories, and the difference between the enhanced position to be matched and the plurality of enhanced effective trajectories; and combining the similarity, spatial deviation and difference to determine the matching degree between the position to be matched and each enhanced effective trajectory.

[0011] According to an embodiment of this application, determining the matching degree between the enhanced position to be matched and each enhanced effective trajectory based on the enhanced vector sequence further includes: identifying the motion scene of the ship target, the motion scene including a preset trajectory motion scene and an intersecting trajectory scene; and determining the matching degree between the position to be matched and each enhanced effective trajectory by comprehensively considering the motion scene, similarity, spatial deviation, and difference.

[0012] According to an embodiment of this application, determining the target trajectory of a ship target to be matched from multiple candidate valid trajectories based on multiple matching degrees includes: determining the minimum matching degree among multiple matching degrees, and determining the candidate valid trajectory corresponding to the minimum matching degree as the target trajectory to be matched.

[0013] According to an embodiment of this application, there are multiple ship targets. After determining the target trajectory of the ship target to be matched from multiple candidate valid trajectories based on multiple matching degrees, the method further includes: for any two ship targets among the multiple ship targets, if the target trajectories determined by the two ship targets are the same target trajectory, determining the second smallest matching degree among multiple matching degrees of the first ship target, excluding the minimum matching degree, wherein the second smallest matching degree is less than or equal to any other matching degree among multiple matching degrees excluding the minimum matching degree; and re-determining the candidate valid trajectory corresponding to the second smallest matching degree as the target trajectory of the first ship target.

[0014] According to a second aspect of this application, an apparatus for trajectory matching of a ship target is proposed, comprising: a target acquisition module, used to acquire the position to be matched of the ship target and a historical trajectory library containing multiple historical trajectories, and extract feature vectors of the position to be matched and feature vectors of the multiple historical trajectories respectively; a vector construction module, used to filter multiple candidate valid trajectories that meet preset conditions from the multiple historical trajectories, and merge the feature vectors of the position to be matched and the feature vectors of the multiple candidate valid trajectories into a candidate vector sequence; an association module, used to perform self-attention processing on the candidate vector sequence to obtain the association relationship between the position to be matched and the multiple candidate valid trajectories; a feature enhancement module, used to perform kinematic prior processing on the candidate vector sequence after self-attention processing to enhance the association relationship between the position to be matched and the multiple candidate valid trajectories through spatial distance and relative position, to obtain an enhanced vector sequence, the enhanced vector sequence including an enhanced position to be matched corresponding to the position to be matched and multiple enhanced valid trajectories respectively corresponding to the multiple candidate valid trajectories; a matching degree calculation module, used to determine the matching degree between the enhanced position to be matched and each enhanced valid trajectory according to the enhanced vector sequence; and a trajectory matching module, used to determine the target trajectory of the ship target matched by the position to be matched from the multiple candidate valid trajectories according to the multiple matching degrees.

[0015] The trajectory matching method for ship targets provided in this application has at least the following beneficial effects:

[0016] By using self-attention processing to mine the feature association between the position to be matched and the candidate valid trajectory, and introducing kinematic prior processing, the association is enhanced by relying on spatial distance and relative position information. The motion law of the ship target is integrated into the matching process, which improves the defect of relying solely on semantic feature matching in related technologies, which is prone to mismatch, and improves the accuracy of trajectory matching of ship targets. Attached Figure Description

[0017] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0018] Figure 1A flowchart illustrating a method for trajectory matching of a ship target according to an embodiment of this application is shown schematically.

[0019] Figure 2 A flowchart illustrating step S20 according to an embodiment of this application is shown schematically;

[0020] Figure 3 A flowchart illustrating step S30 according to an embodiment of this application is shown schematically;

[0021] Figure 4 A flowchart illustrating step S40 according to an embodiment of this application is shown schematically;

[0022] Figure 5 A flowchart illustrating step S50 according to an embodiment of this application is shown schematically;

[0023] Figure 6 A schematic block diagram of a device for trajectory matching of a ship target according to an embodiment of this application is shown. Detailed Implementation

[0024] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0027] Trajectory matching is a core component of marine target tracking systems. Its task is to match newly detected target points with existing historical trajectories in the database, and then update the trajectory status using the new points. Matching methods used in related technologies include LSTM (Long Short Term Memory) and GRU (Gated Recurrent Unit). These methods rely on high-dimensional semantic features for matching and do not incorporate the unique kinematic laws of marine targets as strong priors into the association process. This results in a risk of mismatches and low matching accuracy even in normal scenarios such as straight-line movement and formation tracking.

[0028] In view of this, this application provides a method for trajectory matching of ship targets, which can improve the accuracy of trajectory matching of ship targets.

[0029] Figure 1 A flowchart illustrating a method for trajectory matching of a ship target according to an embodiment of this application is shown schematically.

[0030] like Figure 1 As shown, the trajectory matching method for ship targets provided in this application includes steps S10 to S60.

[0031] Step S10: Obtain the target location to be matched and the data stored in the historical trajectory database containing multiple historical trajectories, and extract the feature vectors of the target location and the data stored in the multiple historical trajectories respectively.

[0032] Ships can be various types of civilian merchant ships, fishing boats, government vessels, and offshore operation platforms, etc., which are mobile carriers at sea.

[0033] In this step, the location to be matched is the latest single point track of the ship collected by detection equipment such as radar, AIS (Automatic Identification System), and satellite remote sensing. This location to be matched carries the original status information such as original longitude, latitude, speed, heading, track angular velocity, collection timestamp, and ship type. The historical trajectory database stores the historical trajectories of multiple ships, and each historical trajectory stores data, which records the continuous trajectory points collected at different times for each historical trajectory.

[0034] Feature extraction is performed on the location to be matched and each historical trajectory, converting the raw detection information into feature vectors that the model can compute.

[0035] Step S20: Select multiple candidate valid trajectories that meet the preset conditions from multiple historical trajectories, and merge the feature vector of the position to be matched and the feature vectors of multiple candidate valid trajectories into a candidate vector sequence.

[0036] It should be noted that directly using all trajectories in the historical trajectory database for matching would result in a huge computational burden. Therefore, the historical trajectories are first filtered to remove those that are unlikely to match, resulting in candidate valid trajectories. After filtering, the feature vector of a single position to be matched is combined with the feature vectors of all candidate valid trajectories to generate a candidate vector sequence. This vector sequence is then selected as the input data for subsequent self-attention processing.

[0037] Step S30: Perform self-attention processing on the candidate vector sequence to obtain the correlation between the position to be matched and multiple candidate valid trajectories.

[0038] In this step, self-attention processing can break the constraints of temporal sequence and directly establish the association between the position to be matched and each candidate valid trajectory, fully exploring the long-distance spatiotemporal dependency features between the position to be matched and the candidate valid trajectory. Compared with the time-by-time recursive computation mode of recurrent networks such as LSTM and GRU in related technologies, self-attention processing can complete the association weight calculation in parallel, while avoiding the gradient vanishing problem that is prone to occur in long temporal trajectory sequences, and accurately obtaining the preliminary association between the position to be matched and the candidate valid trajectory based solely on temporal semantic features.

[0039] Step S40: Perform kinematic prior processing on the candidate vector sequence after self-attention processing to enhance the correlation between the position to be matched and multiple candidate valid trajectories through spatial distance and relative position, and obtain an enhanced vector sequence. The enhanced vector sequence includes an enhanced position to be matched corresponding to the position to be matched and multiple enhanced valid trajectories corresponding to multiple candidate valid trajectories.

[0040] Self-attention processing relies solely on the feature vectors themselves to mine the semantic association between the position to be matched and the candidate valid trajectories, and the learned association lacks constraints from physical motion laws. Kinematic prior processing, on the other hand, introduces constraints from the target's actual motion, compensating for the shortcomings of pure semantic feature modeling, suppressing unreasonable association weights, strengthening associations that conform to the motion characteristics of marine targets, and reducing the probability of mismatches in straight-line and formation navigation scenarios. In step S40, marine target kinematic prior information is introduced, and the initial association is corrected and enhanced by combining the spatial distance between the position to be matched and the candidate valid trajectories, as well as the target's relative position information.

[0041] Kinematic information, including spatial distance and relative position, is transformed into prior bias terms and superimposed on the preliminary association results obtained through self-attention, thus fusing semantic feature association with physical motion laws. After correction and enhancement, an enhanced vector sequence is output, containing enhanced match positions after feature enhancement and multiple enhanced effective trajectories, providing a high-quality representation of the fused semantic and motion features for subsequent matching metric calculations.

[0042] Step S50: Determine the matching degree between the enhanced position to be matched and each enhanced effective trajectory based on the enhanced vector sequence.

[0043] In step S50, a comprehensive matching difference metric is used to characterize the matching degree in reverse: the smaller the comprehensive matching difference value, the higher the degree of fit between the spatiotemporal features and motion patterns of the two, and the higher the matching degree; the larger the comprehensive matching difference value, the lower the matching degree.

[0044] The role of matching degree is to transform the abstract relationship between semantic features and kinematic priors in the enhanced vector sequence into a calculable and comparable quantitative value, providing a unified evaluation basis for subsequent global optimal trajectory pairing, and intuitively distinguishing the suitability of different candidate effective trajectories with the current position to be matched.

[0045] Step S60: Based on multiple matching degrees, determine the target trajectory of the ship target whose position is to be matched from multiple candidate valid trajectories.

[0046] The target trajectory is a sequence of historical trajectories that has the highest degree of fit with the current position to be matched and can belong to the same marine vessel target. The quantified matching degree can be used to determine the attribution of the point to be matched to the historical trajectory. The core function of the matching degree is to provide a unified quantitative evaluation standard for the pairing selection of all positions to be matched and candidate valid trajectories in the global scope, avoiding the one-sidedness problem caused by direct matching based on a single local feature.

[0047] In some embodiments, step S10 further includes: performing spatiotemporal alignment processing on the target location of the ship and a historical trajectory library containing multiple historical trajectories.

[0048] Spatiotemporal alignment processing is used to unify the spatiotemporal reference of data from different detection sources, eliminate differences in coordinate system, sampling time, and sampling frequency in the output data of various detection devices such as radar, AIS, and satellite remote sensing, remove erroneous points, and ensure data consistency for subsequent feature extraction and trajectory association calculation.

[0049] The spatiotemporal alignment process includes three steps: coordinate system optimization, timestamp standardization, and outlier correction. Coordinate system optimization converts the location data from all detection sources (the location to be matched and multiple historical trajectories) into a geodetic coordinate system (e.g., WGS84). For the polar coordinate data output by radar, the corresponding latitude and longitude coordinates are obtained through orthogonal projection transformation. Timestamp standardization uses the acquisition time of the location to be matched as a reference, converting the timestamps of each historical trajectory into relative time intervals, and aligning the data acquired at different sampling frequencies using linear interpolation. Outlier correction utilizes an autoencoder to identify outliers that deviate from the motion trend by more than three standard deviations (different multipliers can be set depending on the situation). Repairable outliers are corrected, while unrepairable outliers are directly removed, reducing the interference of erroneous detection data on the trajectory matching results.

[0050] Furthermore, in step S10, the feature vectors of the position to be matched and the feature vectors of multiple historical trajectories are extracted, including feature embedding processing, time encoding processing and type labeling processing.

[0051] First, feature embedding processing is performed on the position to be matched and multiple historical trajectories. The original features (such as longitude, latitude, speed, heading, track angular velocity, turning rate, target type, etc.) corresponding to the trajectory points corresponding to the position to be matched and the trajectory points corresponding to multiple historical trajectories are converted into 128-dimensional dense embedding vectors through a linear mapping layer, realizing the mapping of the original heterogeneous motion parameters to a unified dimensional feature space.

[0052] Then, time encoding is performed. A time encoding vector with the same dimension as the embedding vector is generated using a sine and cosine periodic function. The time encoding vector is added to the feature embedding vector element by element to give the feature temporal information, so that the subsequent model can perceive the temporal order of each trajectory point.

[0053] Finally, a type label is added. A one-dimensional type label is added to each point feature. The value "1" represents the position to be matched as a new detection point, and the value "0" represents the trajectory point in the historical trajectory. This setting makes it easier to distinguish between two different types of input objects, and finally form the feature vector corresponding to the position to be matched and the feature vector corresponding to each historical trajectory.

[0054] In related technologies, statistical association methods are employed, such as nearest neighbor algorithms, probabilistic data association, and joint probabilistic data association. These methods are based on the spatial distance and statistical probability between points, and are computationally simple and have good real-time performance. However, they cannot effectively utilize long-term historical data, cannot strictly filter historical trajectory points, resulting in excessive computational overhead or the introduction of invalid interference information.

[0055] Figure 2 A flowchart illustrating step S20 according to an embodiment of this application is shown schematically. Figure 2 As shown, step S20 may also include steps S21 to S23.

[0056] Step S21: Determine the filtering time range based on the occurrence time of the location to be matched, and filter out multiple first historical trajectories within the filtering time range from multiple historical trajectories.

[0057] The screening time range is a time interval defined based on the time of data collection at the location to be matched. Its purpose is to initially eliminate historical trajectories that are too far apart in time and have virtually no possibility of belonging to the same vessel target, thus achieving coarse-grained screening. The screening time range can be flexibly selected based on the monitored sea area, the target's sailing speed, and the sampling cycle of the detection equipment. For example, for near-shore low-speed fishing vessels and vessels within ports, whose target movement range is limited, a shorter screening time range can be selected; for ocean-going high-speed merchant ships, whose target has a stronger ability to navigate across regions, a longer screening time range can be selected.

[0058] In this embodiment, considering various ship navigation characteristics, the screening time range is set to 1~24h. Using the acquisition time of the current location to be matched as the time base, all historical trajectories are reviewed, and historical trajectories within the intervals of 1 hour and 24 hours prior to the time of the location to be matched are retained as multiple first historical trajectories. If all trajectory points of a historical trajectory are more than 24 hours earlier than the location to be matched, it is directly discarded. If historical trajectory points are less than 1 hour away from the location to be matched, the trajectory information is too insufficient, and it is also directly discarded. By using the 1~24h time interval constraint, sufficient temporal motion data can be retained to support subsequent self-attention modeling and kinematic prior analysis, while significantly reducing invalid historical trajectory data and lowering the computational cost of subsequent temporal storage and feature calculation.

[0059] Step S22: Based on the time-series storage unit with a preset capacity, multiple first historical trajectories are stored in the time-series storage unit in chronological order until the time-series storage unit reaches the preset capacity. The first historical trajectory with the earliest storage time in the time-series storage unit is deleted to obtain multiple second historical trajectories.

[0060] The time-series storage unit is used to orderly store multiple first historical trajectories. Its function is to limit the maximum total storage of candidate trajectory points, avoiding a surge in computational power for subsequent self-attention and matching due to the continuous accumulation of a large number of first historical trajectories. The preset capacity can be flexibly configured according to hardware computing power, system real-time indicators, and the concurrency of trajectories in a single matching task. For example, a smaller capacity is selected for low computing power, millisecond-level real-time monitoring scenarios; the capacity can be appropriately increased for high-performance offline analysis scenarios on servers; and the capacity can be appropriately reduced to control the sequence length in near-shore vessel intensive monitoring scenarios due to the large number of trajectories.

[0061] In this embodiment, the preset capacity of the time-series storage unit is set to 20. The time-series storage unit can be a FIFO (First In First Out) queue. Specifically, all first historical trajectories are stored sequentially into the time-series storage unit according to their acquisition time from earliest to latest, continuously filling the trajectory points. Whenever a new first historical trajectory is stored, if the total number of trajectory points in the unit exceeds 20, the earliest stored first historical trajectory is automatically removed. If the total number after storage is less than 20, all are retained without removal. Through this capacity constraint mechanism, the upper limit of trajectory points entering the resampling stage is strictly limited. While retaining ship time-series data that is closer to the location to be matched and has higher timeliness, the input sequence size is fixed, ensuring that the multi-head self-attention processing and kinematic prior enhancement modules can stably achieve millisecond-level real-time calculations, adapting to the core requirement of real-time trajectory matching of marine targets in this solution.

[0062] Step S23: For any second historical trajectory among multiple second historical trajectories, if the time distribution of multiple trajectory points contained in any second historical trajectory is uniform, and the feature vector of any second historical trajectory contains the turning record and speed change record of the ship target, then any second historical trajectory that meets the conditions is determined as a candidate valid trajectory.

[0063] Step S23 involves motion-aware resampling of multiple second historical trajectories to further thin out the trajectories. This process maximizes the retention of key information that characterizes the ship's motion pattern while controlling the total number of trajectory points, thus avoiding imbalances in the temporal distribution of trajectory points and loss of motion mutation features, which could lead to distortions in subsequent self-attention and kinematic prior processing.

[0064] In this embodiment, after resampling, 8-20 trajectories are retained as candidate valid trajectories. The time intervals of all trajectory points within each second historical trajectory are checked for uniform distribution. Simultaneously, the feature vector corresponding to the trajectory is read to determine if there are any records of sudden motion changes corresponding to ship turning or speed changes within the vector. If a second historical trajectory simultaneously meets both conditions of uniform time distribution and containing turning and speed change records, it is fully retained and determined as a candidate valid trajectory usable in this scheme. If the time distribution of trajectory points has a large gap, or if the entire trajectory only contains records of uniform straight-line movement without any information on sudden motion changes, it is directly eliminated and not considered a candidate valid trajectory. This resampling and filtering logic can compress the length of the input sequence to reduce computational overhead, while ensuring that each candidate valid trajectory carries complete ship motion features. This provides sufficient and effective motion evidence for subsequent self-attention association and kinematic prior enhancement based on the position to be matched, further improving the matching accuracy of this scheme in ship straight-line and formation scenarios.

[0065] Figure 3A flowchart illustrating step S30 according to an embodiment of this application is shown schematically. Figure 3 As shown, step S30 may also include steps S31 to S33.

[0066] Step S31: Perform linear mapping on the candidate vector sequence to obtain the query matrix, key matrix and value matrix respectively.

[0067] The query matrix is ​​obtained by mapping the features of the target to be identified and is used to initiate a similarity query; the key matrix serves as the feature index of all elements in the sequence and is used to perform similarity matching with the query matrix; the value matrix carries the original feature information that can be extracted in a weighted manner and outputs the corresponding features after the matching is completed.

[0068] In step S31, the individual vectors in the candidate vector sequence have a dimension of 128. The encoder consists of 6 stacked serial coding layers, each configured with 8 self-attention submodules. Using three sets of independent linear mapping layers, linear transformations are performed on the candidate vector sequence element by element to generate a query matrix, a key matrix, and a value matrix, respectively. The dimensions of the three matrices are kept consistent. The vector corresponding to the position to be matched is used as the query subject and matched one by one with the key vectors corresponding to each candidate valid trajectory to realize the preparation of the association measurement between the features of the position to be matched and the features of each candidate valid trajectory.

[0069] Step S32: Calculate the attention weights of the candidate vector sequence based on the query matrix, key matrix, and value matrix.

[0070] In this embodiment, a scaled dot product approach is used for multi-head attention computation. The query matrix and key matrix are subjected to a dot product operation and then scaled to obtain the original attention score. The standardized attention weight is then obtained through normalization. Specifically, since this embodiment sets up eight independent attention heads to compute in parallel, each attention head can capture the correlation features between the position to be matched and the candidate valid trajectory from different feature perspectives, thereby fully exploring the multi-temporal dependencies of ship trajectories.

[0071] Step S33: Weight the position to be matched and multiple candidate valid trajectories according to the attention weight to obtain the association between the position to be matched and multiple candidate valid trajectories.

[0072] In this embodiment, the obtained attention weights and value matrices are used to perform weighted operations to obtain the output features corresponding to the 8 attention heads respectively. The output features of the 8 attention heads are concatenated and fused, and then mapped to the 128-dimensional original feature space through linear transformation to obtain the preliminary correlation between temporal semantic features, the position to be matched and each candidate effective trajectory. This correlation is modeled based only on the trajectory's own features and has not yet introduced the physical constraints of ship motion. It will be used as the input data for the kinematic prior processing in subsequent steps.

[0073] Figure 4 A flowchart illustrating step S40 according to an embodiment of this application is shown schematically. Figure 4 As shown, step S40 may also include steps S41 to S43.

[0074] Step S41: Calculate the spatial distance offset term based on the spatial distance between the position to be matched and each candidate valid trajectory, and calculate the relative position offset term based on the relative position between the position to be matched and each candidate valid trajectory.

[0075] Spatial distance offset and relative position offset are kinematic prior information. Both spatial distance offset and relative position offset are used to quantify the physical motion constraints of the target. The scaling factor and normalization method of spatial distance offset and relative position offset can be flexibly adjusted according to the monitoring sea area and the target navigation characteristics.

[0076] In step S41, spatial distance refers to the geodetic distance between the location to be matched and each trajectory point on the candidate valid trajectory. After calculating the geodetic distance, normalization is performed to generate a spatial distance bias term, guiding the model to prioritize historical trajectories whose spatial positions conform to navigation logic. Relative position characterizes the orientation, relative heading, and other motion states between the target corresponding to the location to be matched and the target on the candidate valid trajectory. Based on the motion characteristic of "the relative positions between targets remain stable over a long period" in formation navigation, the formation motion bias, i.e., the relative position bias term, is calculated to enhance the ability to identify the motion patterns of ships in a group. The two types of bias terms together constitute complete kinematic prior information.

[0077] Step S42: The spatial distance bias term and the relative position bias term are fused into the attention weights to obtain enhanced attention weights.

[0078] The spatial distance bias and relative position bias are weighted and superimposed onto the original attention weights obtained from self-attention processing as correction terms, thus fusing physical motion constraints and semantic association information to obtain enhanced attention weights. By using the spatial distance bias and relative position bias to correct the original weights, the association weights of candidate valid trajectories with obviously unreasonable spatial distances and conflicting motion states are reduced, while the association weights of trajectories with suitable motion states are increased, overcoming the limitations of relying solely on deep semantic feature modeling.

[0079] Step S43: The position to be matched and multiple candidate valid trajectories are weighted according to the enhanced attention weights to obtain the enhanced vector sequence.

[0080] By leveraging enhanced attention weights to perform weighted feature aggregation on candidate vector sequences, a feature representation that integrates deep semantic features, spatial distance constraints, and formation relative motion constraints is generated, forming an enhanced vector sequence. The sequence contains enhanced matching positions after feature enhancement and multiple enhanced effective trajectories, while also carrying temporal semantic information and the specific motion patterns of marine vessels. This provides high-quality fusion features for subsequent multi-dimensional matching quantification calculations, effectively improving the trajectory mismatch problem in straight formations and target-dense scenarios.

[0081] Further, step S41 includes: obtaining the spatial distance between the position to be matched and each candidate valid trajectory, normalizing the multiple spatial distances corresponding to the multiple candidate valid trajectories to obtain a spatial distance offset term; obtaining the relative position between the position to be matched and each candidate valid trajectory, normalizing the multiple relative positions corresponding to the multiple candidate valid trajectories to obtain a relative position offset term.

[0082] In this embodiment, the geodetic distance between the target location and the trajectory points of each candidate valid trajectory is first calculated to obtain a set of raw distance values. These distance values ​​are then converted into standardized spatial distance bias terms through normalization. Closer distances result in biases that are more conducive to improving the association weight. Subsequently, relative motion information such as bearing and relative heading between the target location and the candidate valid trajectory targets is extracted and similarly normalized to obtain relative position bias terms. For vessels in formation navigation, a positive bias incentive is generated to reasonably associate the target when the relative position remains stable. After normalization, the spatial distance bias term and the relative position bias term have the same numerical scale, preventing one type of constraint from dominating due to different dimensions. This ensures that both types of kinematic prior information are used in a balanced manner to correct the attention weight, better reflecting the actual navigation patterns of marine vessels.

[0083] By combining the actual motion scenario of the target with dynamic weighted fusion of three dimensions—feature similarity, spatial deviation, and kinematic difference—to calculate the matching degree, it can overcome the limitations of single-dimensional evaluation and comprehensively consider multi-dimensional information of features, space, and motion, so that the quantification result of the matching measurement fits the real motion logic of marine vessels.

[0084] Figure 5 A flowchart illustrating step S50 according to an embodiment of this application is shown schematically. Figure 5 As shown, step S50 may also include steps S51 to S52.

[0085] Step S51: Obtain the similarity between the enhanced matching position and the multiple enhanced effective trajectories, the spatial deviation between the enhanced matching position and the multiple enhanced effective trajectories, and the difference between the enhanced matching position and the multiple enhanced effective trajectories.

[0086] Similarity reflects the level of fit between the enhanced features of the target location and the historical depth features of the enhanced effective trajectory. Spatial deviation characterizes the geographical deviation between the coordinates of the target location and the predicted trajectory location. Difference reflects the difference between the target and the historical trajectory target in terms of navigation movement patterns such as speed and heading. In step S51, for each enhanced effective trajectory, three sets of quantitative indicators (similarity, spatial deviation, and difference) are calculated to comprehensively characterize the correlation features between the current target location and each historical trajectory from three dimensions: features, space, and motion. This compensates for the lack of information from single-dimensional indicators and provides multi-dimensional raw evaluation data for subsequent fusion calculation of matching degree.

[0087] Step S52: Based on the combined similarity, spatial deviation and difference, determine the matching degree between the position to be matched and each enhanced effective trajectory.

[0088] In step S52, similarity, spatial deviation, and motion state difference are normalized to the same numerical range and then weighted fusion is performed. The comprehensive matching difference between the position to be matched and each enhanced effective trajectory is obtained by integrating multi-dimensional information. The matching degree is then determined in reverse. By simultaneously fusing feature, spatial, and motion information, the limitations of the traditional single-dimensional matching cost calculation method are overcome. This effectively improves the ability to distinguish ship trajectories with different motion modes in scenarios with dense targets and intersecting trajectories. The obtained matching degree can better fit the real navigation law of marine ships and provide a more reliable quantitative benchmark for subsequent target trajectory attribution determination.

[0089] Step S51 further includes: obtaining the feature vector corresponding to each enhanced effective trajectory, calculating the average value of multiple feature vectors, and obtaining the average feature vector; obtaining the similarity between the feature vector of the enhanced matching position and the average feature vector; obtaining the spatial deviation between the enhanced matching position and each enhanced effective trajectory; and obtaining the difference in target motion state parameters between the enhanced matching position and each enhanced effective trajectory.

[0090] Specifically, for any enhanced effective trajectory, the feature vectors corresponding to all historical trajectory points included in the enhanced effective trajectory are obtained, and the average feature vector is calculated. Cosine similarity is used to measure the feature fit between the feature vector of the enhanced position to be matched and the average feature vector, thus obtaining the similarity between the two. Kalman filtering is used to estimate the motion state of the enhanced effective trajectory, predicting the target position at the time of matching. Geographical deviation is calculated by combining the true coordinates of the position to be matched, obtaining the degree of spatial deviation. Airspeed, heading, track angular velocity, and turning rate are extracted as motion state parameters. The absolute difference between the average motion parameters of the position to be matched and the historical trajectory is calculated, obtaining the degree of difference in motion state parameters.

[0091] The three types of indicators—similarity, spatial deviation, and difference—complement each other, enabling the characterization of the correlation features between the position to be matched and the enhanced effective trajectory from three dimensions: features, space, and motion. This provides a multi-dimensional evaluation basis for subsequent fusion calculation of the matching degree.

[0092] Step S50 further includes: identifying the motion scene of the ship target, including preset trajectory motion scenes and intersecting trajectory scenes; and determining the matching degree between the position to be matched and each enhanced effective trajectory by comprehensively considering the motion scene, similarity, spatial deviation and difference.

[0093] Specifically, the recognition logic for motion scenarios and the weight allocation scheme for various dimensions of indicators under different scenarios can be flexibly configured. For example, preset trajectory motion scenarios correspond to scenarios of ships sailing straight or in formation, while intersecting trajectory scenarios correspond to scenarios where targets are densely intersecting and multiple trajectories intersect. By assigning weight values ​​through motion scenarios, it is possible to adapt to the diverse navigation conditions of marine vessels, further improve the reliability of matching results, and alleviate the mismatch and omission problems that are prone to occur in scenarios of ship formations and waterway intersections.

[0094] Furthermore, based on the motion scenario, weighted coefficients for similarity, spatial deviation, and difference are obtained, respectively, wherein the sum of these three weighted coefficients is 1. In one embodiment, the motion scenario is a straight-line, formation-based scenario, with a similarity weighted coefficient of 0.2, a spatial deviation weighted coefficient of 0.3, and a difference weighted coefficient of 0.5. In another embodiment, the motion scenario is a dense target, intersecting trajectory scenario, with a similarity weighted coefficient of 0.5, a spatial deviation weighted coefficient of 0.3, and a difference weighted coefficient of 0.2.

[0095] In some embodiments, when there are multiple ship targets, each ship target has multiple matching degrees corresponding to its position to be matched. The multiple ship targets are set as a set to obtain a matching degree set.

[0096] In some embodiments, step S60 includes: determining the minimum matching degree among multiple matching degrees, and determining the candidate valid trajectory corresponding to the minimum matching degree as the target trajectory to be matched at the position to be matched.

[0097] The minimum matching degree represents the highest degree of fit between the current location to be matched and the candidate valid trajectory. In scenarios with a single location to be matched and a single trajectory, this nearest-neighbor matching strategy can be directly adopted. The matching degree filtering threshold and judgment rules can be flexibly set according to the marine monitoring scenario. In scenarios with dense port monitoring, the matching degree threshold can be tightened, while in scenarios with sparse open ocean monitoring, the threshold constraint can be appropriately relaxed. For any location to be matched, the matching degree values ​​of all enhanced valid trajectories corresponding to that location are used to select the candidate valid trajectory corresponding to the minimum matching degree, and this is initially determined as the target trajectory corresponding to the current location to be matched.

[0098] When there are multiple ship targets, in a scenario with multiple ship targets and multiple matching positions, independently selecting the trajectory corresponding to the minimum matching degree for each matching position can easily lead to one-to-many matching conflicts. Step S60 further includes: for any two ship targets among the multiple ship targets, if the target trajectories determined by the two ship targets are the same target trajectory, determine the second largest matching degree among the multiple matching degrees of the first ship target, excluding the largest matching degree, wherein the second largest matching degree is greater than or equal to any other matching degree among the multiple matching degrees excluding the largest matching degree; and re-determine the candidate valid trajectory corresponding to the second largest matching degree as the target trajectory of the first ship target.

[0099] In scenarios with multiple ship targets and multiple locations to be matched, independently selecting the trajectory corresponding to the minimum matching degree for each location can easily lead to one-to-many matching conflicts. This matching problem can be abstracted as a bipartite graph optimal matching problem. Figure 1One side represents the position to be matched, and the other side represents the candidate valid trajectory. The matching degree is used as the weight of the edge in the bipartite graph. The Hungarian algorithm is a classic way to solve this type of bipartite graph assignment problem.

[0100] In step S60, a bipartite graph is constructed with the set of locations to be matched and the set of candidate valid trajectories as nodes on both sides, and the edge weights between nodes are represented by the matching degree. First, for each location to be matched, the candidate valid trajectory corresponding to the minimum matching degree is selected as the initial target trajectory. All initial matching results are traversed for conflict detection. When two or more locations to be matched are found to be simultaneously bound to the same candidate valid trajectory, indicating a contention for nodes in the bipartite graph, a conflict adjustment mechanism is triggered. One of the locations to be matched that is in conflict is selected, the minimum matching degree currently occupying that trajectory is discarded, and the second minimum matching degree is selected from all remaining matching degrees. The candidate valid trajectory corresponding to the second minimum matching degree is then redefined as the target trajectory for that location. Through iterative adjustment, matching conflicts are gradually eliminated, approaching the globally reasonable allocation effect sought by the Hungarian algorithm, and avoiding the unreasonable result of a historical trajectory being associated with multiple probe points simultaneously. After conflict resolution, a one-to-one matching relationship is obtained. Subsequently, the successfully matched positions are sent to the Kalman filter to update the ship's position, speed, heading and other trajectory status. At the same time, unmatched trajectories and unmatched new detection points are distinguished and operations such as target loss archiving and new target trajectory creation are performed respectively to adapt to the trajectory association requirements in the scenario of dense navigation of multiple ships at sea.

[0101] Furthermore, after the locations to be matched are matched one-to-one with the target trajectories, the matching results need to be categorized and processed into three cases: successful matching, unmatched trajectories, and no new detection points matched. Trajectories status updates, target loss determination, and new target trajectory initialization operations are then performed accordingly, ultimately completing trajectory status persistence and result output. The matching result determination threshold and the consecutive frame count threshold can be flexibly configured based on the monitoring system's sampling frame rate and the intensity of interference in the marine environment: in marine areas with high detection noise and numerous false alarms, the consecutive frame count threshold can be appropriately increased; in high real-time, low false alarm scenarios, the frame count threshold can be lowered to accelerate target response.

[0102] In one embodiment, the matching results are categorized as follows:

[0103] The first category is the successful matching scenario. A matching threshold is set. If the matching result between the position to be matched and the target trajectory meets the preset adaptation conditions, the matching is determined to be successful. The current position to be matched is sent to the Kalman filter. The position, speed, heading, track angular velocity and other state estimation parameters corresponding to the target trajectory are updated using the detection point. At the same time, the continuous unmatched counter corresponding to the target trajectory is reset to continuously maintain the target's active state.

[0104] The second category is the unmatched trajectory scenario. The matching status of each existing target trajectory is continuously monitored, and the number of consecutive frames in which the trajectory fails to be associated with a valid position to be matched is accumulated. When the number of consecutive unmatched frames exceeds 5, the ship target is determined to be lost, and the trajectory is transferred from the active trajectory to the historical archive trajectory list and will no longer participate in subsequent association calculations.

[0105] The third category is the scenario where no new detection point is matched. The positions to be matched that do not match any existing target trajectory are first stored in a temporary candidate point set for temporary storage. If the detection information corresponding to the same target cannot match any existing active trajectory for 3 consecutive frames, it is identified as a newly appeared ship target, and a brand new target trajectory is created accordingly.

[0106] After completing various matching branch processing, the trajectory update and result output operations are performed. The trajectory status of all active vessels after the update is written to the database for persistent storage. The standardized matching results are output to the outside world. The results include the unique trajectory identifier ID, the updated vessel position and motion status, and the matching confidence level corresponding to this match. These results can be used by the upper-level monitoring, situation analysis, and alarm modules to realize the closed loop of the entire process of continuous tracking of marine vessels.

[0107] According to a second aspect of this application, a device for trajectory matching of ship targets is also proposed. Figure 6 A schematic block diagram of a device for trajectory matching of a ship target according to an embodiment of this application is shown. Figure 6 As shown, the device 600 includes a target acquisition module 610, a vector construction module 620, an association module 630, a feature enhancement module 640, a matching degree calculation module 650, and a trajectory matching module 660.

[0108] The target acquisition module 610 is used to acquire the position to be matched of the moving target and a historical trajectory library containing multiple historical trajectories, and extract the feature vector of the position to be matched and the feature vector of the multiple historical trajectories respectively. In one embodiment, the target acquisition module 610 can also be used to perform the operation S10 described above, which will not be repeated here.

[0109] The vector construction module 620 is used to filter out multiple candidate valid trajectories that meet preset conditions from multiple historical trajectories, and merge the feature vector of the position to be matched and the feature vectors of multiple candidate valid trajectories into a candidate vector sequence. In one embodiment, the vector construction module 620 can also be used to perform the operation S20 described above, which will not be repeated here.

[0110] The association module 630 is used to perform self-attention processing on the candidate vector sequence to obtain the association between the position to be matched and multiple candidate valid trajectories. In one embodiment, the association module 630 can also be used to perform the operation S30 described above, which will not be repeated here.

[0111] The feature enhancement module 640 is used to perform kinematic prior processing on the candidate vector sequence after self-attention processing, so as to enhance the correlation between the position to be matched and multiple candidate valid trajectories through spatial distance and relative position, and obtain an enhanced vector sequence. The enhanced vector sequence includes an enhanced position to be matched corresponding to the position to be matched and multiple enhanced valid trajectories corresponding to multiple candidate valid trajectories respectively. In one embodiment, the feature enhancement module 640 can also be used to perform the operation S40 described above, which will not be repeated here.

[0112] The matching degree calculation module 650 is used to determine the matching degree between the enhanced position to be matched and each enhanced effective trajectory according to the enhanced vector sequence; in one embodiment, the matching degree calculation module 650 can also be used to perform the operation S50 described above, which will not be repeated here.

[0113] The trajectory matching module 660 is used to determine the target trajectory of the ship target to be matched from multiple candidate valid trajectories based on multiple matching degrees; in one embodiment, the trajectory matching module 660 can also be used to perform the operation S60 described above, which will not be repeated here.

[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0115] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. Furthermore, the word "a" or "an" preceding an element does not exclude the presence of multiple such elements.

[0116] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.

[0117] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.

Claims

1. A method for trajectory matching of ship targets, characterized in that, include: The target ship location to be matched and the data stored in the historical trajectory database containing multiple historical trajectories are obtained. The feature vectors of the target ship location and the feature vectors of the data stored in the multiple historical trajectories are extracted respectively. Multiple candidate valid trajectories that meet preset conditions are selected from the multiple historical trajectories, and the feature vector of the position to be matched and the feature vectors of the multiple candidate valid trajectories are merged into a candidate vector sequence; Self-attention processing is performed on the candidate vector sequence to obtain the correlation between the position to be matched and the multiple candidate valid trajectories; The candidate vector sequence after the self-attention processing is subjected to kinematic prior processing to enhance the correlation between the position to be matched and the multiple candidate effective trajectories through spatial distance and relative position, thereby obtaining an enhanced vector sequence, which includes an enhanced position to be matched corresponding to the position to be matched and multiple enhanced effective trajectories respectively corresponding to the multiple candidate effective trajectories; The matching degree between the enhanced position to be matched and each enhanced effective trajectory is determined based on the enhanced vector sequence. Based on multiple matching degrees, the target trajectory of the ship target matching the position to be matched is determined from the multiple candidate valid trajectories.

2. The method for trajectory matching of ship targets according to claim 1, characterized in that, The step of performing self-attention processing on the candidate vector sequence to obtain the association between the position to be matched and the multiple candidate valid trajectories includes: The candidate vector sequence is linearly mapped to obtain the query matrix, key matrix, and value matrix, respectively. The attention weights of the candidate vector sequence are calculated based on the query matrix, the key matrix, and the value matrix. The position to be matched and the multiple candidate valid trajectories are weighted according to the attention weight to obtain the association between the position to be matched and the multiple candidate valid trajectories.

3. The method for trajectory matching of ship targets according to claim 2, characterized in that, The kinematic prior processing of the candidate vector sequence after the self-attention processing includes: Based on the spatial distance between the position to be matched and each of the candidate valid trajectories, a spatial distance offset term is calculated, and based on the relative position between the position to be matched and each of the candidate valid trajectories, a relative position offset term is calculated. The spatial distance bias term and the relative position bias term are fused into the attention weight to obtain the enhanced attention weight; The enhanced attention weights are applied to the position to be matched and the multiple candidate valid trajectories to obtain the enhanced vector sequence.

4. The method for trajectory matching of ship targets according to claim 3, characterized in that, The step of calculating a spatial distance offset term based on the spatial distance between the position to be matched and each of the candidate valid trajectories, and calculating a relative position offset term based on the relative position between the position to be matched and each of the candidate valid trajectories, includes: Obtain the spatial distance between the position to be matched and each of the candidate valid trajectories, and normalize the spatial distances corresponding to the multiple candidate valid trajectories to obtain a spatial distance bias term; Obtain the relative position of the position to be matched and each of the candidate valid trajectories, and normalize the relative positions corresponding to the multiple candidate valid trajectories to obtain the relative position bias term.

5. The method for trajectory matching of ship targets according to any one of claims 1 to 4, characterized in that, The step of selecting multiple candidate valid trajectories that meet preset conditions from the multiple historical trajectories includes: The filtering time range is determined based on the occurrence time of the location to be matched, and multiple first historical trajectories within the filtering time range are filtered from the multiple historical trajectories. Based on a time-series storage unit with a preset capacity, the multiple first historical trajectories are stored in the time-series storage unit in chronological order until the time-series storage unit reaches the preset capacity. Then, the first historical trajectory with the earliest storage time in the time-series storage unit is deleted to obtain multiple second historical trajectories. For any of the plurality of second historical trajectories, if the time distribution of the multiple trajectory points contained in the second historical trajectory is uniform, and the feature vector of the second historical trajectory contains the turning record and speed change record of the ship target, then the second historical trajectory that satisfies the above conditions is determined as the candidate valid trajectory.

6. The method for trajectory matching of ship targets according to any one of claims 1 to 4, characterized in that, Determining the matching degree between the enhanced position to be matched and each enhanced effective trajectory based on the enhanced vector sequence includes: The similarity between the enhanced matching position and the multiple enhanced effective trajectories, the spatial deviation between the enhanced matching position and the multiple enhanced effective trajectories, and the difference between the enhanced matching position and the multiple enhanced effective trajectories are obtained respectively. By combining the similarity, spatial deviation, and difference, the matching degree between the position to be matched and each of the enhanced effective trajectories is determined.

7. The method for trajectory matching of ship targets according to claim 6, characterized in that, The step of determining the matching degree between the enhanced position to be matched and each enhanced effective trajectory based on the enhanced vector sequence further includes: Identify the motion scenario of the ship target, the motion scenario including a preset trajectory motion scenario and an intersecting trajectory scenario; By combining the motion scene, the similarity, the degree of spatial deviation, and the degree of difference, the matching degree between the enhanced position to be matched and each enhanced effective trajectory is determined.

8. The method for trajectory matching of ship targets according to any one of claims 1 to 4, characterized in that, The step of determining the target trajectory of the ship target matching the position to be matched from the plurality of candidate valid trajectories based on the plurality of matching degrees includes: Determine the minimum matching degree among the multiple matching degrees, and determine the candidate valid trajectory corresponding to the minimum matching degree as the target trajectory for matching the position to be matched.

9. The method for trajectory matching of ship targets according to claim 8, characterized in that, The ship targets are multiple; After determining the target trajectory of the ship target matching the position to be matched from the plurality of candidate valid trajectories based on the plurality of matching degrees, the method further includes: For any two ship targets among the plurality of ship targets, if the target trajectories determined by the two ship targets are the same target trajectory, determine the second smallest matching degree among the plurality of matching degrees of the first ship target, excluding the minimum matching degree, wherein the second smallest matching degree is less than or equal to any other matching degree among the plurality of matching degrees except the minimum matching degree. The candidate valid trajectory corresponding to the second smallest matching degree is redefined as the target trajectory of the first ship target.

10. A device for trajectory matching of a ship target, characterized in that, include: The target acquisition module is used to acquire the target location to be matched and a historical trajectory library containing multiple historical trajectories, and to extract the feature vectors of the target location and the multiple historical trajectories respectively. The vector construction module is used to filter out multiple candidate valid trajectories that meet preset conditions from the multiple historical trajectories, and merge the feature vector of the position to be matched and the feature vectors of the multiple candidate valid trajectories into a candidate vector sequence; The association module is used to perform self-attention processing on the candidate vector sequence to obtain the association between the position to be matched and the multiple candidate valid trajectories; The feature enhancement module is used to perform kinematic prior processing on the candidate vector sequence after the self-attention processing, so as to enhance the correlation between the position to be matched and the multiple candidate effective trajectories through spatial distance and relative position, and obtain an enhanced vector sequence, wherein the enhanced vector sequence includes an enhanced position to be matched corresponding to the position to be matched and multiple enhanced effective trajectories respectively corresponding to the multiple candidate effective trajectories; The matching degree calculation module is used to determine the matching degree between the enhanced position to be matched and each enhanced effective trajectory based on the enhanced vector sequence; The trajectory matching module is used to determine the target trajectory of the ship target whose position is matched from the plurality of candidate valid trajectories based on the plurality of matching degrees.