Vehicle track similarity calculation method based on dynamic graph alignment and POI enhancement
By employing dynamic graph alignment and POI enhancement, this method addresses the error and robustness issues of existing vehicle trajectory similarity calculations in complex traffic environments. It achieves the fusion of multi-scale geometric details and regional semantics, improving the accuracy and robustness of trajectory similarity calculations and supporting various traffic management applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 湖南工商大学
- Filing Date
- 2026-03-11
- Publication Date
- 2026-04-10
AI Technical Summary
Existing vehicle trajectory similarity calculation methods cannot effectively integrate multi-scale geometric details, regional semantic connotations, and road topological patterns in complex and dynamic traffic environments, resulting in insufficient calculation errors and robustness, making it difficult to achieve efficient and accurate trajectory similarity calculation in complex traffic environments.
A method based on dynamic graph alignment and POI enhancement is adopted. The grid resolution is dynamically adjusted through a three-dimensional spatiotemporal octree structure. Combined with the distribution density and functional weight of POI data, a multimodal semantic alignment mechanism is constructed. The graph attention network is used to perform iterative cross-modal information propagation and feature alignment to generate a unified trajectory multimodal representation.
It achieves efficient and robust similarity calculation of trajectories in complex traffic environments, improves the accuracy of similarity calculation and semantic understanding capabilities, and supports applications such as path recommendation, anomaly detection and travel profiling.
Smart Images

Figure CN121834375A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent transportation, and in particular to a vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement. BACKGROUND
[0002] With the rapid development of global positioning system, mobile communication and Internet of Things technology, the urban transportation system generates a large amount of vehicle trajectory data. These trajectory data not only record the spatiotemporal position changes of vehicles, but also imply multi-dimensional information such as driving behavior, road network structure, regional functional characteristics and urban dynamics. Trajectory similarity calculation, as a basic task of trajectory data processing and analysis, widely supports key applications in intelligent transportation systems, such as real-time route recommendation, traffic flow anomaly, traffic monitoring, traffic management, personalized navigation and urban planning. Current trajectory similarity calculation methods can be mainly divided into methods based on geometric distance, methods based on grid or raster, methods based on road network matching and methods based on deep learning representation. However, in a complex and dynamic urban transportation environment, the existing methods still face the following challenges and limitations: Traditional similarity measurement methods, such as dynamic time warping (DTW), longest common subsequence (LCSS), edit distance (EDR) and Fréchet distance, mainly calculate based on the geometric shape of point sequences in Euclidean space. Although these methods can effectively depict the shape similarity and temporal alignment of trajectories, they generally ignore the topological constraints (such as one-way streets, prohibited turns and interchange layer traffic) and semantic attributes (such as road grades and speed limit information) of urban road networks, often leading to misjudgments such as geometric proximity but road network inaccessibility or geometric dissimilarity but path equivalence, limiting their practicality in real navigation and path reasoning. To reduce the computational complexity of continuous trajectory data and enhance the robustness to noise, grid or raster methods are widely used to discretize continuous space, effectively solving the instability problem of pure geometric distance or pure point sequence encoding in boundary areas, sharp turns and U-turns. However, traditional methods usually use uniform grid division, and the resolution often needs to be pre-set. High resolution can lead to long and sparse sequences in high-density areas (such as city centers), increasing storage and computing overhead, while low resolution can lose key details in low-density areas or complex geometric areas (such as sharp turns, roundabouts and ramps), leading to distorted representation. Although adaptive data structures such as quadtree and octree are introduced, the division criteria mostly rely on the distribution density of spatial points, without fully considering the local geometric characteristics (such as curvature and turning angle) of trajectories themselves. Therefore, in areas with dense turns and other key areas, the division may be insufficient, affecting the accuracy of similarity judgment. The trajectory similarity depends not only on its spatial geometry, but also on the functional semantics of the route area, such as the distribution of POI categories around the start and end points, the functional area attributes and the activity purposes, and the POI data is an important source of carrying the functional semantics of the area. In the existing methods, the POI information is usually fused by globally aggregating the POI categories associated with the whole trajectory or by using the POI at the start and end points of the trajectory as the feature, which lacks precise association with the internal fine-grained space of the trajectory, and is difficult to depict the functional changes of the route area in the process of the trajectory, and cannot distinguish the different influences of different POI categories in the same area on the travel behavior, resulting in limited performance in the similarity retrieval based on travel intention. Mapping the GPS trajectory to the road network through map matching and then learning the road segment representation by using the graph neural network is an effective way to introduce topological constraints. However, the existing road network representation methods based on graph neural networks mainly rely on the static topological connection relationship and road attributes (length, type, number of lanes, etc.) provided by OpenStreetMap and other platforms, and fail to fully exploit and utilize the dynamic traffic rules emerging from large-scale historical trajectory data, ignoring these "behavior priors" obtained from data, which makes the learned road network representation lack the ability to depict the actual traffic patterns and has weak generalization ability in the face of temporary traffic control, congestion detour and other scenarios. The existing vehicle trajectory similarity calculation methods still have significant deficiencies in adaptive multi-scale geometric representation, fine-grained semantic fusion, data-driven road network behavior semantic modeling, dynamic robust multi-modal alignment, and multi-level collaborative supervision. Therefore, there is an urgent need for a new technical framework that can efficiently compress data while accurately depicting complex trajectory patterns, deeply understanding regional functional semantics, and organically integrating real traffic rules, and has the ability to dynamically adjust the fusion strategy according to data conditions, thereby improving the accuracy and robustness of trajectory similarity calculation in real complex traffic environments. SUMMARY
[0003] Therefore, the present application provides a vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement, which solves the problems of existing vehicle trajectory similarity calculation methods, such as distortion of complex geometric patterns and sparse area representation caused by fixed grid division, separation of geometric features and regional functional semantics, lack of real traffic rule priors in road representation, and rigid multi-modal information fusion, and provides a method that balances multi-scale geometric details, regional semantic connotations and road topological rules while ensuring efficiency, which can meet the demand for efficient, robust and interpretable similarity calculation of large-scale trajectory data in complex dynamic traffic environments and support path recommendation, anomaly detection, travel profiling and traffic management scenarios.
[0004] To achieve the above object, the application provides a vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement, characterized by comprising the following steps: S1, performing cleaning on an original vehicle trajectory point sequence to extract the spatiotemporal features of the GPS point sequence, constructing a road network topology graph based on OpenStreetMap, and mapping the GPS point sequence into a structured road sequence through a map matching algorithm; S2, dynamically adjusting the grid resolution according to the density constraint and geometric curvature constraint of the vehicle trajectory points in each candidate grid cell through a three-dimensional spatiotemporal octree structure, extracting the multi-level grid coding of the leaf grid node and the parent node to which each vehicle trajectory point belongs, and generating a geometric grid representation sequence of the vehicle trajectory points through a multi-scale gating fusion mechanism; S3, obtaining POI data of different categories in each grid cell and counting the POI data distribution density and functional weight, constructing a semantic feature vector of the grid cell, dynamically fusing the semantic feature vector with the features of the corresponding points in the grid representation sequence, and generating an enhanced semantic grid representation sequence; S4, using a double-probability-guided graph attention mechanism to count the transition probability between adjacent road segments and the co-occurrence probability of road segments in a sliding time window as learnable prior knowledge, and outputting a final road topology semantic representation that fuses static road attributes, topology connection and dynamic traffic rules through a multi-layer multi-head attention mechanism; S5, constructing a multi-modal semantic alignment mechanism of dynamic graph interaction, and generating a unified trajectory multi-modal representation through global aggregation nodes; S501, using the GPS point sequence of step S1, the enhanced semantic grid representation sequence of step S3, and the final road topology semantic representation of step S4 to calculate the cross-modal association weight between the GPS modal feature, the grid modal feature and the road modal feature, and obtaining the GPS modal trajectory-level representation, the Grid modal trajectory-level representation and the road modal trajectory-level representation through a sequence reading module, and taking them as the initial features of the dynamic Figure Three S501, using the GPS point sequence of step S1, the enhanced semantic grid representation sequence of step S3, and the final road topology semantic representation of step S4 to calculate the cross-modal association weight between the GPS modal feature, the grid modal feature and the road modal feature, and obtaining the GPS modal trajectory-level representation, the Grid modal trajectory-level representation and the road modal trajectory-level representation through a sequence reading module, and taking them as the initial features of the dynamic The sequence reading module uses average pooling and attention pooling; S502, constructing a fully connected dynamic graph with three modalities as nodes and association weights as edges, and performing iterative cross-modal information propagation and feature alignment through a multi-layer graph attention network to generate a unified trajectory multi-modal representation; S6, constructing a joint loss function including a local structure alignment loss, a global contrastive learning loss and a modal fusion gating regularization loss, and performing supervised training and optimization on the unified trajectory multi-modal representation generated in step S5; S7, extract the unified multi-modal representation of the two trajectories to be compared using the optimized model and calculate the similarity, which is output as the final similarity score of the two trajectories.
[0005] Preferably, the preprocessing and map matching specifically include the following steps: S101, clean the original vehicle trajectory point sequence For trajectories with less than 20 and more than 200 trajectory points, extract the GPS modal features of the vehicle trajectory; S102, extract the road network topology graph from OpenStreetMap data , where the node set represents road intersections and endpoints, and the edge set represents directed road segments connecting nodes, and each road segment initial vector includes road segment length, road type, number of lanes, and speed limit, and all road segment initial vectors are stacked into a matrix; S103, project the original vehicle trajectory point sequence onto the road network topology graph, and perform map matching using a hidden Markov model, where the state transition probability is determined by the topological connectivity and direction consistency between road segments, and the emission probability is determined by the distance between the GPS point and the candidate road segment.
[0006] Preferably, generating the final grid representation sequence of the vehicle trajectory points specifically includes the following steps: S201, map the vehicle trajectory points to a normalized three-dimensional space-time coordinate system to construct a standardized trajectory point sequence ; S202, calculate the density constraint and geometric curvature constraint, and map the standardized trajectory point sequence to a large unit three-dimensional space-time cubic space; The density constraint is obtained by counting the total number of trajectory points within the node; Extract and arrange the ordered point sequence of a single trajectory within the grid cell, calculate the local curvature of the trajectory within the node, and aggregate the curvatures of multiple trajectories within the node across trajectories to obtain the geometric curvature constraint of the node. Divide the grid whose density constraint or geometric curvature constraint exceeds the preset threshold into 8 small grids by octree; S203, calculate the vehicle trajectory points belonging to the leaf grid node and the parent node, and calculate the relative position deviation of the vehicle trajectory points in the belonging leaf network; S204, linearly fuse the leaf grid node features, parent node features, and micro-displacement features through a multi-scale gating fusion mechanism to generate the geometric grid representation sequence of the vehicle trajectory points.
[0007] Preferably, generating the semantic enhanced grid representation sequence specifically comprises: S301, according to each grid cell The spatial range statistics the distribution density of the internal K class POI data, fuses the distribution density with the corresponding preset POI data function weight, and forms a semantic feature vector; S302, acquiring each trajectory point The POI semantic feature vector of the leaf node where the trajectory point is located And the POI semantic feature vector of the parent node The semantic fusion weight is calculated through a bilinear attention mechanism; The bilinear attention mechanism performs outer product operation on the POI semantic feature vectors of the leaf node and the parent node where the trajectory point is located, and then calculates the fusion weight through a learnable weight matrix and an activation function. After the two semantic vectors are weighted and fused, they are added to the geometric grid representation sequence; S303, the POI semantic feature vector of the leaf node where the trajectory point is located and the POI semantic feature vector of the parent node are fused with the geometric semantic feature in multiple modalities, and the semantic enhanced representation of all trajectory points is combined to generate a semantic enhanced grid representation sequence.
[0008] Preferably, the double probability guided graph attention mechanism is used for road topology representation learning to generate the final trajectory road topology semantic representation, which specifically comprises: S401, the initial feature vector corresponding to the structured road sequence is obtained by searching, the initial feature matrix of the road sequence of the current trajectory is constructed, and the transition probability between adjacent road segments and the co-occurrence probability of the road segments in the sliding time window are counted from the historical road trajectory data; S402, the attention coefficient between adjacent road segments is calculated, the attention weight is obtained by Softmax normalization, K attention heads are used for parallel calculation, the outputs of all attention heads are spliced and processed, and then linear transformation is performed, and the final trajectory road topology semantic representation is obtained after repeating L times.
[0009] Preferably, the indicators of the cross-modal association weight between the GPS modal feature, the grid modal feature and the road modal feature include: GPS-grid edge weight, grid-road edge weight and road-GPS edge weight; The GPS-grid edge weight is obtained by weighting and synthesizing two sub-indicators of spatial coverage and time synchronicity. The spatial coverage represents the spatial coverage concentration of the GPS point in the grid, and the time synchronicity represents the synchronicity of the access time mode and the historical time mode of the grid. The grid-road edge weight is obtained by weighted synthesis of three sub-indicators of spatial alignment degree, functional consistency and topological constraint strength, the spatial alignment degree represents the proportion of geometric coverage length of road segments in the grid, the functional consistency represents the functional consistency of grid POI semantics and road attributes, and the topological constraint strength represents the density of grid penetration or connection by road network. The road-GPS edge weight is obtained by weighted synthesis of three sub-indicators of matching accuracy, motion rationality and topological constraint satisfaction degree, the matching accuracy represents the projection accuracy of map matching, the motion rationality includes speed rationality and direction consistency, the speed rationality represents the rationality of GPS instantaneous speed and road segment speed limit, the direction consistency represents the motion direction consistency, and the topological constraint satisfaction degree represents the topological connectivity of the matching path.
[0010] Preferably, the attention coefficient of the multi-layer graph attention network is determined by the point feature similarity and the dynamic edge weight.
[0011] Preferably, the joint loss function expression is: ; Wherein, represents the joint loss function, represents the local structure alignment loss, represents the global contrastive learning loss, represents the modal gating regularization loss, , represents the super parameter for balancing the contribution of the three losses; The joint loss function is minimized by the back propagation method , and all the learnable parameters of the trajectory representation network and the dynamic fusion gating network are optimized synchronously.
[0012] Preferably, the cosine similarity is used to calculate the similarity of the two trajectories to be compared, and the expression is: ; Wherein, , represents two trajectories to be compared, , respectively represent the representation vectors of trajectories , , represents the dot product, represents the norm of the vector, and the value range of the similarity is , the greater the value, the higher the trajectory semantic similarity.
[0013] Preferably, an adjustable temperature parameter is introduced The trajectory similarity is scaled and offset, and the expression is: ; Wherein, Indicates a temperature parameter, For controlling the distribution sharpness of the score.
[0014] Compared with the prior art, the beneficial effects of the present application are: The present application simultaneously introduces two types of constraints of local geometric curvature change and spatial distribution density in the trajectory grid representation, drives the three-dimensional space-time octree to perform recursive division, realizes the "on-demand refinement" perception of complex geometric shapes such as sharp turns and U-turns, and maintains a relatively coarse granularity in the trajectory sparse or flat area to reduce redundancy, and further introduces the relative position deviation coding within the grid cell to compensate the continuous accuracy of the discrete grid representation, effectively overcoming the quantization error and boundary discontinuity problem while significantly compressing the data size, realizing high-fidelity and stable trajectory geometric representation. The present application innovatively sinks the POI distribution density and the function weight to the grid cell, constructs fine-grained semantic features and dynamically fuses them with geometric embedding, so that the model can understand the regional function, effectively distinguish the trajectories with similar geometric shapes but different travel purposes, make the trajectory representation have geometric structure and regional function connotation, and improve the effectiveness of semantic similarity calculation in function area retrieval, travel intention similarity evaluation and result interpretation tasks. The present application is based on the structured road sequence obtained by OSM road network and map matching, uses the transition probability and co-occurrence probability statistically obtained from real trajectories as learnable priori, guides the road representation learning of the graph attention network, which makes the model not only encode the static topology, the high-frequency turning preference of the driver at the intersection and the stable co-occurrence mode of the continuous road segment, but also enhances the robustness, generalization and interpretability of the road semantic representation, and shows stronger robustness to noise trajectories and temporary detours. The present application constructs a decentralized dynamic graph structure with GPS, Grid and Road as nodes, calculates and adjusts the fusion weight between modes in real time according to fine-grained indexes such as spatial coverage, functional consistency and matching accuracy, performs equal and iterative information propagation through the graph attention network, realizes adaptive, robust alignment and collaborative enhancement of three-modal semantics, and compared with the fixed weight or single-modal centered fusion strategy, this mechanism can adaptively adjust the contribution of each mode according to the scene and data quality, realize deep semantic alignment and collaborative enhancement without presetting the central mode, and finally output a unified, stable and efficient trajectory-level multi-modal representation for retrieval. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1This is a flowchart of a vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement proposed in this invention; Figure 2 This is a schematic diagram of the adaptive octree mesh generation based on density constraints and geometric curvature constraints of the present invention; Figure 3 This is a schematic diagram of the biprobability-guided graph attention mechanism of the present invention. Detailed Implementation
[0016] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0017] To address the issues of "semantic coordinate system" misalignment between continuous trajectory signals (GPS / grid) and road topological semantics and POI functional semantics, representation instability caused by fixed-resolution grids and discretization quantization errors, similarity ranking shifts due to reliance solely on ensemble distance supervision, and fusion bias and training instability resulting from fixed weights / centralized alignment in multimodal fusion, this embodiment provides a vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement, specifically including the following steps: S1. Trajectory Data Preprocessing and Multimodal Feature Extraction: Obtaining the Original Vehicle Trajectory Point Sequence The original vehicle trajectory points are cleaned, the spatiotemporal features of the GPS point sequence are extracted, a road network topology map is constructed based on OpenStreetMap, and the GPS point sequence is mapped into a structured road sequence through a map matching algorithm; S101, Clean the original vehicle trajectory point sequence For trajectories with fewer than 20 and more than 200 trajectory points, extract the GPS modal features of the vehicle trajectory. S102. Extracting the road network topology map from OpenStreetMap data , where the node set The set of edges represents the intersections and endpoints of roads. This represents a directed path segment connecting nodes, with each segment including a static attribute vector. =[length, road_type, lanes, max_speed], representing the road segment length, road type, number of lanes, and speed limit, respectively. A learnable mapping (MLP / Embedding) is used to encode the static attributes into... A 3D vector, expressed as: ; Stack all the initial vectors of the road segments into a matrix (or look up a table), the expression is: ; in, This represents the initial road feature vector of all road segments in the road network. The resulting set or matrix of road features is used to index road features based on road segment identifiers obtained through map matching. Subsequent trajectories can then be retrieved from the matched road segment ID sequence. Quickly extract the corresponding road feature sequence; S103, The original vehicle trajectory point sequence Projected onto the road network topology map, map matching is performed using a Hidden Markov Model, expressed as: ; in, Indicates candidate road segments, The probability of a road segment transition during the Hidden Markov Model (HMM) phase is determined by the topological connectivity and directional consistency between road segments. The probability of transmission is determined by the distance between the GPS point and the candidate road segment; For the matched road sequence, extract the feature representation corresponding to each road segment: ; in, This represents a multilayer perceptron. This represents the road feature dimension and outputs the trajectory road sequence after map matching. The expression is: ; in, This indicates the number of matched road segments, which serves as the input to the subsequent road topology representation learning module.
[0018] S2. Curvature-Density Constraint Adaptive Mesh Generation and Representation: Based on the density and geometric curvature constraints of vehicle trajectory points within each candidate mesh cell, the mesh resolution is dynamically adjusted using a 3D spatiotemporal octree structure. The leaf mesh nodes and multi-level mesh codes of each trajectory point falling into the mesh are extracted. A multi-scale gating fusion mechanism is used to generate a geometric mesh representation sequence of vehicle trajectory points that combines global generalization with local displacement details. Specifically, this includes: S201. Map the vehicle trajectory points to a normalized three-dimensional spatiotemporal coordinate system to construct a continuous and uniform sequence of standardized trajectory points. ,in Indicates the first Normalized spatiotemporal coordinates of a moment; S202, Standardize the trajectory point sequence Mapped to a unit three-dimensional spacetime cube In the middle, initialize the root node of the octree, and the root node covers the entire space region. And associate all trajectory points with the root node; Define any grid node to be processed. The set of cross-track points included: ; in, Represents the set of all trajectory points. Indicates falling into a grid cell The set of trajectory points within the trajectory (this set may contain trajectory points from different trajectories); Calculate the density constraint and geometric curvature constraint separately: density constraint The access intensity across trajectory statistical grid cells is calculated by directly counting the total number of trajectory points contained within a node, expressed as: ; Geometric curvature constraints are derived because curvature depends on the temporal order of the same trajectory. This is achieved by extracting and arranging the ordered sequence of points within a single trajectory within a grid cell, calculating the local curvature of the trajectory within a node, and then aggregating the curvatures of multiple trajectories within a node across trajectories. The expression for this is: ; By time Sort in ascending order, if Define a unit direction vector for its adjacent points: ; And calculate the local curvature index of the trajectory within the node, expressed as: ; in, The dot product represents the property that when the trajectory is approximately a straight line within a node, adjacent direction vectors are approximately parallel, and the dot product is close to 1. Approaching 0; when the trajectory has sharp turns or severe vibrations. Increase; When a node contains multiple trajectories, cross-trajector aggregation of the curvature within the trajectories is performed to obtain the node curvature constraint: ; in, It can be the mean, weighted mean (by...) (Weighted) or maximum value; Set density threshold (In this embodiment, it is set to 10), curvature threshold (This embodiment is set to) ) and maximum tree depth (In this embodiment, it is set to 7), for the current node Perform the following division determination: ; As long as the trajectory points within the current grid are too dense ( > Or the trajectory shape is too complex ( > If the minimum grid precision limit is not met, further subdivision is necessary. like If true, then the node will be... The spatial extent is divided in half along the x, y, and t dimensions, generating 8 child nodes of equal size. The trajectory points are reassigned to their corresponding child nodes; the above steps are repeated for all newly generated child nodes until all nodes are marked as leaf nodes, and the partitioning result is as follows. Figure 2 As shown; This results in a non-uniform grid structure that is "well-spaced and dynamic." Larger grids are retained on straight highway sections (low curvature, moderate density) to maintain the macro topology; while the grid is automatically refined at intersections, overpasses (high curvature), or congested areas (high density) to capture micro-behavior. S203. Calculate vehicle trajectory points through multi-level coding and micro-displacement. The leaf grid nodes and their parent nodes are identified, and the vehicle trajectory points are calculated. The relative positional deviation within the leaf network; Multi-level discrete grid coding is represented as a quadruple: ; in, Indicates the leaf node level. This represents a globally unique index for a leaf node. Represents the globally unique index of the parent node; relative position deviation within the grid. The difference between the coordinates of the trajectory point and the center coordinates of the leaf node is expressed as: ; S204. By using a multi-scale gating fusion mechanism, the leaf grid node features, parent node features, and micro displacement features are linearly fused to generate a geometric grid representation sequence of vehicle trajectory points. Map leaf node indices to parent node indices as embedding vectors and and relative position deviation The displacement feature vector is mapped through a multilayer perceptron. Then calculate the adaptive gating coefficient. The adaptive gating coefficient, used to measure the weighting of microscopic details and macroscopic structure, is expressed as follows: ; in, This represents the Sigmoid activation function. This represents a vector concatenation operation. , All of these represent learnable gating parameters; The fused geometric mesh representation sequence is calculated based on adaptive gating coefficients. The expression is: ; in, Indicates element-wise multiplication, representing a sequence. As input to subsequent models.
[0019] Step S2 breaks through the traditional grid partitioning that relies solely on spatial density, and constructs a recursive partitioning mechanism with dual constraints of "curvature-density". This enables "on-demand fine-grained" perception of complex trajectory geometry (such as sharp turns and U-turns). To address the quantization error problem caused by grid discretization, it innovatively introduces relative position deviation encoding within the grid, achieving accuracy compensation from discrete units to continuous values. Combined with a multi-scale gating aggregation strategy, the model can intelligently adjust the feature weights of local micro-details and macro-spatial topology, thereby significantly compressing the data scale while constructing a trajectory representation base that combines global structural robustness with high-fidelity local geometry.
[0020] S3. Obtain POI data of different categories within each grid cell and calculate the distribution density and functional weight of POI data. Construct the semantic feature vector of the grid cell and dynamically fuse the semantic feature vector with the features of corresponding points in the grid representation sequence to generate a semantically enhanced grid representation sequence. S301, Based on each grid cell The distribution density of K types of POI data within a spatial range is expressed as follows: ; in, Indicates the first POI-like data in grid cells The number inside, Represents the area of a grid cell; The distribution density is correlated with the corresponding preset POI data function weights. The elements are fused to form a semantic feature vector, expressed as: ; in, Represents grid cells semantic feature vectors, Indicates the first Functional weights of POI-like data Represents the grid cell number Distribution density of POI-like data; S302, Obtain each trajectory point POI semantic feature vector of the leaf node and the semantic feature vector of the parent node's POI The semantic fusion weights are calculated using a bilinear attention mechanism. This mechanism performs an outer product operation on the semantic feature vectors of the leaf node and parent node of the trajectory point, and then calculates the fusion weights using a learnable weight matrix and activation function. The weighted fusion of the two semantic vectors is then added to the geometric mesh representation sequence. The expression is as follows: ; in, This indicates the outer product operation. This represents the Sigmoid activation function; S303. Combine the POI semantic feature vector of the leaf node where the trajectory point is located with the POI semantic feature vector of the parent node and the geometric semantic feature vector. Multimodal fusion is performed using the following expression: ; The semantically enhanced representations of all trajectory points are combined to generate a semantically enhanced mesh representation sequence: ; This sequence includes both multi-scale set structure features and regional functional semantic information, providing a rich semantic foundation for subsequent multimodal alignment.
[0021] Step S3 proposes a statistically enhanced grid semantic injection method. By introducing POI distribution density and functional weight, the semantic feature vector of the grid cell is constructed and dynamically fused with the grid geometric embedding. This breaks through the limitation of traditional grid partitioning relying solely on spatial topology and realizes a semantic upgrade from "geometric partitioning" to "functional understanding". This enhances the regional semantic perception capability of trajectory representation and provides a grid representation with both geometric structure and semantic connotation for trajectory similarity calculation.
[0022] S4. A dual-probability-guided graph attention mechanism is adopted. The transition probability between adjacent road segments and the co-occurrence probability of road segments within the sliding time window are statistically analyzed from the structured road sequence to model the single-step transition frequency between adjacent road segments and the path co-occurrence relationship within the local sliding window. The transition probability and co-occurrence probability are used as learnable prior knowledge, so that the model can transmit information based on topological connectivity and statistically obtained traffic patterns when aggregating neighborhood information. The final trajectory road topological semantic representation, which integrates static road attributes, topological connectivity and dynamic traffic patterns, is output through a multi-layer multi-head attention mechanism. S401. Obtain the initial feature vector corresponding to the structured road sequence by searching, that is, the road sequence of trajectory matching. ,in Indicates time The matched road segment identifier is used to retrieve the initial feature vector of the corresponding road segment from the initial feature matrix of the entire road network, and the initial feature matrix of the road sequence of the current trajectory is constructed as follows: ; From the historical road trajectory data obtained from map-matching, the transition probability between adjacent road segments and the co-occurrence probability of road segments within the sliding time window are statistically analyzed for the road network map. any adjacent road segment and Based on trajectory dataset The statistical transition probability is expressed as: ; in, Represents any adjacent road segment in the road network topology map and The transition probability, Indicates road segment Directly transferred to Number of times, Indicates the route passed through Total number of times; For the local path co-occurrence probability, given a window size s (set to 3 in this embodiment), the co-occurrence relationship within the trajectory sliding window is statistically expressed as follows: ; in, Indicates any adjacent road segment and Co-occurrence probability within the sliding time window This represents a road segment within a given window size s. and The number of times they appear together; S402, Calculate adjacent road segments and The attention coefficients are normalized using Softmax to obtain the attention weights. For the Layered graph attention network, road segment The input is represented as Its adjacent road segments are The expression for the attention coefficient is: ; in, , For learnable parameters, This indicates the input feature dimension (64 in this example). This indicates the dimension of the hidden layer (128 in this embodiment). The attention weights are obtained through Softmax normalization, expressed as follows: ; S403. Using K attention heads for parallel computation, the output of the kth attention head is: ; in, Represents the activation function of the exponential linear unit. This represents the parameter matrix of the k-th attention head; After concatenating all attention head outputs and performing a linear transformation, the first result is obtained. The road representation of a layer is expressed as: ; After repeating L times, the final trajectory road topological semantic representation is obtained, expressed as: ; The final road topological semantic representation integrates road static attributes, topological connectivity, and real-world travel pattern semantics. A biprobabilistic guided graph attention mechanism is used, such as... Figure 3 As shown.
[0023] Step S4 proposes a dual-probability-guided graph attention mechanism, which breaks through the limitation of traditional road representation methods that rely solely on static topological structures. By statistically analyzing transition probabilities and co-occurrence probabilities from real trajectory data, the model can simultaneously model drivers' high-frequency turning preferences at intersections (micro-decision) and stable co-occurrence patterns between consecutive road segments (macro-path). This design upgrades road representation learning from simple "structural encoding" to "behavioral semantic understanding," which not only significantly enhances the model's ability to characterize actual traffic patterns but also effectively filters out interference from noisy trajectories such as temporary detours through probabilistic priors. This results in outputting more generalizable, robust, and interpretable road semantic features, providing a solid semantic foundation for subsequent cross-modal trajectory analysis.
[0024] S5. Construct a multimodal semantic alignment mechanism for dynamic graph interaction, and generate a unified trajectory multimodal representation through global aggregation nodes; S501. The GPS point sequence described in step S1, the enhanced grid representation sequence of semantics in step S3, and the final road topology semantic representation in step S4 are used to calculate the cross-modal association weights between the three modalities: GPS modal features (GPS), grid modal features (Grid), and road modal features (Road). Road modal features are the set of semantic vectors of each road segment (or node) in the road network map. For any trajectory, the road sequence obtained by map matching ,from Extract the semantic vector sequence of the road segment corresponding to the trajectory by index. Trajectory-level representations of road network modes are obtained through the sequence readout module. The sequence reading module is implemented using average pooling or attention pooling. The average pooling expression is as follows: ; Attention pooling is: ; ; in, Indicates attention weights. This represents a learnable scoring function; Similarly, the GPS modal features and grid modal features are respectively aggregated through the sequence readout module to obtain the GPS modal trajectory-level representation. Grid Modal Trajectory Level Representation ,by , , As dynamic Figure Three The initial features of each modality are used to calculate the cross-modal association weights, which guide the construction of dynamic edge weights between modalities, including: GPS-grid edge weights, grid-road edge weights, and road-GPS edge weights. GPS-grid edge weights Through spatial coverage and time synchronization The weighted combination of the two sub-indices yields: Spatial coverage represents the spatial concentration of GPS points within a grid. To assess the distribution concentration and integrity of GPS points within their assigned grid cells, first, the area of the two-dimensional convex hull of the trajectory point sequence is calculated. Then, the ratio of this area to the area of the grid cell is calculated, and weighted by considering the proportion of actual trajectory points within the grid. The expression is as follows: ; in, This indicates the indicator function, when the GPS point Located in the grid Internal time The value is 1 if it is not 1, otherwise it is 0. This represents the area calculation function. This indicates the number of GPS points in the current window. The closer it is to 1, the more compact the distribution of GPS points within the grid and the more complete the coverage. Time synchronization represents the synchronization between the access time pattern and the grid's historical time pattern. It quantifies the similarity between the timestamp distribution pattern of GPS points and the historical access time pattern of grid cells. The day is divided into several discrete time periods, and the distribution probability of the current GPS point in each time period is statistically analyzed. And the probability of the grid being accessed in each time period, learned from historical data. The Jensen-Shannon divergence (JSD) is used to measure the difference between two distributions and is converted into a similarity score, expressed as: ; JSD is a symmetric, bounded divergence measure that is more robust than Kullback-Leibler divergence. A higher JSD score indicates that the current trajectory's temporal pattern of accessing the grid is more consistent with historical norms. The final dynamic weight of the GPS-grid edge is determined by spatial coverage. and time synchronization The two sub-indices are obtained by weighting them with learnable weights and then normalizing them using the Sigmoid function. The expression is as follows: ; in, This represents the Sigmoid chance function. , This represents learnable weight parameters that are optimized through training and are typically constrained to be... ; Grid-roadside weights Spatial alignment Functional consistency and topological constraint strength The three sub-indicators are weighted and combined to obtain: Spatial alignment represents the proportion of a road segment's geometric coverage length within a grid. It is calculated as the ratio of a road segment's geometric coverage length within the grid cells it traverses to the total length of the road. The expression is: ; Spatial alignment It reflects the degree of overlap between the road and the grid in geometric space; Functional consistency refers to the functional consistency between the semantics of grid POIs and road attributes. It evaluates the degree of matching between the semantic functions of grid cells (derived from the POI distribution) and road attributes (such as road grade and speed limit), and converts the POI semantic vectors of the grid into a single vector. road attribute vector The cosine similarity is calculated using the following expression: ; Topological constraint strength represents the density of a grid being penetrated or connected by a road network. It measures the density of the current grid cell being penetrated or connected by a road network, calculates the number of all road segments intersecting with the grid cell, and divides it by the total number of road segments within a certain buffer zone around the grid (for normalization). The final dynamic weight expression for the grid-road transition is: ; in, , , Represents the learnable weight parameters; Road-GPS Side Weights The result is obtained by weighted synthesis of three sub-indicators: matching accuracy, motion rationality, and topological constraint satisfaction. Matching accuracy This represents the projection accuracy of map matching. After projecting the GPS point sequence onto the road network using a map matching algorithm, the average Euclidean distance error between the projected points and the original GPS points is calculated. And convert it into a precision score. ; in, Indicates the scale parameter; The rationality of movement includes the rationality of speed. and direction consistency Speed rationality indicates the rationality of GPS instantaneous speed and road segment speed limit. It counts the proportion of GPS point instantaneous speeds that exceed the current matching road segment speed limit. Directional consistency indicates the consistency of movement direction. It calculates the average cosine similarity between the GPS point movement direction vector and the matching road segment direction vector. Topological constraint satisfaction It represents the topological connectivity of the matched path, checks whether the path matched on the map constitutes a connected path in the road network, and calculates the proportion of connected road segments to the total number of matched road segments. The final dynamic weight expression for the road-GPS edge is: ; in, , , , Represents the learnable weight parameters; S502. Construct a fully connected dynamic graph with three modalities as nodes and association weights as edges. A set of nodes, a trajectory-level representation vector of the modality corresponding to the node features, and a set of edges. Edge weight matrix ,in This represents the dynamic weights calculated earlier; S503. Input the previously constructed dynamic graph into a K-layer graph attention network (GAT). Iterative cross-modal information propagation and feature alignment are performed through the multi-layer graph attention network to aggregate and generate a unified trajectory multimodal representation. The initial characteristics of a three-modal node are defined as follows: ; For each layer, the node Update features The expression is: ; in, Represents a node The set of neighbors (including itself). Represents the learnable weight matrix. This represents the attention coefficient for fusing dynamic edge weights; ; ; in, This represents a learnable attention vector. This represents a vector concatenation operation. This represents the corresponding dynamic edge weight. =1; After K-layer graph attention propagation, the features of each modality node are updated as follows: Global average pooling is performed on the final features of the three modal nodes, and a unified multimodal aligned representation of the trajectory is generated through a linear projection layer. The expression is: ; in, , This represents the learnable parameters, which serve as input for subsequent similarity calculations.
[0025] Step S5 creatively constructs a decentralized dynamic graph interaction architecture. By calculating fine-grained association weights between multimodalities in real time (such as spatial coverage, functional consistency, motion rationality, etc.) and using a multi-layer graph attention network for peer-to-peer and iterative information propagation, it achieves adaptive alignment and collaborative enhancement of trimodal semantics. This breaks through the limitations of traditional fixed-weight fusion or star-shaped alignment, enabling the model to dynamically form the optimal interaction topology based on the spatiotemporal characteristics of the trajectory and data quality. This allows for more flexible, robust, and generalizable cross-modal trajectory representation learning under different scenarios and data conditions.
[0026] S6. Construct a joint loss function that includes local structure alignment loss, global contrastive learning loss and modality fusion gating regularization loss, and perform supervised training and optimization on the unified trajectory multimodal representation generated in step S5; Calculate local structural alignment loss This loss aims to keep the trajectory similarity in the embedding space consistent with the local geometry based on traditional metrics; for a batch containing N trajectories, for any two trajectories and Calculate distances based on classical metrics such as SSPD, Hausdorff, or discrete Fréchet. It is converted into target similarity through exponential decay, and the expression is: ; in, The temperature coefficient is used to adjust the sensitivity of similarity and, within the embedding space, to calculate a unified representation of the two trajectories. and The cosine similarity between them is used as the predicted similarity, and the expression is: ; To avoid global The comparison calculation emphasizes the local structure for each trajectory. According to the target distance Select its K-nearest neighbors (K-NN) to form a local neighborhood. The local structural alignment loss is defined as the mean square error between the predicted similarity and the target similarity in the local neighborhood: ; in, This represents the set of trajectory indices in the current training batch; Calculate the global contrastive learning loss This loss is designed to enhance the discriminative power of the representation across the global batch, bringing positive samples that are similar to the target trajectory closer together and pushing away dissimilar negative samples. Positive and negative sample construction: for anchor point trajectories Its positive sample set Directly defined as local structural alignment loss The selected K-nearest neighbors (K-NN) form the local neighborhood. The remaining trajectories within the batch constitute the negative sample set. ; The loss function, in the form of InfoNCE (Noise-Contrastive Estimation), is expressed as follows: ; in, Indicates the predicted cosine similarity. The temperature parameter represents the contrastive learning parameter, which is used to adjust the degree of attention given to difficult negative samples; Calculate the modal gating regularization loss This loss is designed to constrain the multimodal fusion weights in dynamic graph interactions, improve the interpretability and generalization ability of the model, and avoid over-reliance on a single modality. From the dynamic graph interaction module in step 5, extract the dynamic fusion weight vector for each trajectory used to fuse the three modalities of GPS, grid, and road when calculating the final unified representation. And satisfy ; To encourage sparsity in the fusion weights (i.e., clearer multimodal decision-making) and prevent overfitting, a gating weight is applied. Sparse regularization and entropy regularization are expressed as follows: ; in, The first term represents the norm (sparse constraint), and the second term represents negative entropy (encouraging a more concentrated weight distribution). and This is the regularization intensity coefficient; The local structure alignment loss, global contrastive learning loss, and modality fusion gating regularization loss are weighted and summed to form the final joint loss function, which is expressed as follows: ; in, Denotes the joint loss function. This represents the local structural alignment loss. This represents the global contrastive learning loss. This represents the modal gating regularization loss. , Hyperparameters representing the balance between the contributions of the three loss factors; Minimize the joint loss function using backpropagation. Simultaneously optimize all learnable parameters of the trajectory representation network and the dynamic fusion gating network.
[0027] Step S6 constructs a joint loss function with multi-granularity collaborative supervision. By organically combining local geometric alignment loss, global contrastive learning loss, and modal gating regularization loss, it achieves multi-level optimization from microstructure preservation to macro discriminative enhancement. It not only uses traditional trajectory metrics to guide the local geometric structure of the embedding space, but also improves the global discriminative ability of the representation through cross-batch contrastive learning. At the same time, it introduces a gating regularization term to optimize the multimodal fusion weights, thereby significantly improving the accuracy, robustness, and interpretability of trajectory similarity calculation while ensuring multimodal semantic consistency.
[0028] S7. Use the optimized model to extract the unified multimodal representation of the two trajectories to be compared and calculate the similarity. The similarity is used as the final similarity score of the two trajectories. For the two trajectories to be compared and From the model trained in step 6, extract its unified multimodal representation optimized by the joint loss function, denoted as... ; Calculate the representation vector and The cosine similarity between the two trajectories, expressed as a similarity measure in the semantic embedding space, is as follows: ; in, , This represents two trajectories to be compared. , Representing trajectories , The representation vector, Represents the dot product. Representing vectors Norm, similarity The range of values is The larger the value, the higher the semantic similarity of the trajectories; To map similarity scores to a more intuitive (0, 1) interval, or to align them with the target scale during training, an adjustable temperature parameter is introduced. The scaling and offset of trajectory similarity are expressed as follows: ; in, Indicates temperature parameter, This step controls the sharpness of the score distribution; if omitted, the score is output directly. As the final score.
[0029] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for calculating vehicle trajectory similarity based on dynamic graph alignment and POI enhancement, characterized in that, Includes the following steps: S1. The original vehicle trajectory point sequence Preprocessing is performed to extract the spatiotemporal features of the GPS point sequence, a road network topology map is constructed based on OpenStreetMap, and the GPS point sequence is mapped into a structured road sequence through a map matching algorithm; S2. Based on the density constraints and geometric curvature constraints of vehicle trajectory points in each candidate grid cell, the grid resolution is dynamically adjusted through a three-dimensional spatiotemporal octree structure. The multi-level grid codes of the leaf grid nodes and parent nodes of each vehicle trajectory point are extracted. The geometric grid representation sequence of vehicle trajectory points is generated through a multi-scale gating fusion mechanism. S3. Obtain POI data of different categories within each grid cell and calculate the distribution density and functional weight of POI data. Construct the semantic feature vector of the grid cell and dynamically fuse the semantic feature vector with the features of corresponding points in the grid representation sequence to generate a semantically enhanced grid representation sequence. S4. A dual-probability-guided graph attention mechanism is adopted to statistically analyze the transition probability between adjacent road segments and the co-occurrence probability of road segments within the sliding time window from the structured road sequence as learnable prior knowledge. The final road topological semantic representation, which integrates static road attributes, topological connections and dynamic traffic patterns, is output through a multi-layer multi-head attention mechanism. S5. Construct a multimodal semantic alignment mechanism for dynamic graph interaction, and generate a unified trajectory multimodal representation through global aggregation nodes; S501. The GPS point sequence from step S1, the enhanced grid representation sequence of semantics from step S3, and the final road topology semantic representation from step S4 are used to calculate the cross-modal association weights between the three modalities: GPS modal features, grid modal features, and road modal features. The GPS modal trajectory-level representation, grid modal trajectory-level representation, and road modal trajectory-level representation are then aggregated through the sequence readout module and used as the initial features of the three modalities of the dynamic graph. Dynamic edge weights between modalities are constructed based on the cross-modal association weights. The sequence readout module employs average pooling and attention pooling. S502. Construct a fully connected dynamic graph with three modalities as nodes and associated weights as edges. Use a multi-layer graph attention network to perform iterative cross-modal information propagation and feature alignment, and aggregate to generate a unified trajectory multimodal representation. S6. Construct a joint loss function that includes local structure alignment loss, global contrastive learning loss and modality fusion gating regularization loss, and perform supervised training and optimization on the unified trajectory multimodal representation generated in step S5; S7. Using the optimized model, extract the unified multimodal representation of the two trajectories to be compared and calculate the similarity. The similarity is output as the final similarity score of the two trajectories.
2. The vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement according to claim 1, characterized in that, The preprocessing and map matching specifically include the following steps: S101. Clean the original vehicle trajectory point sequence For trajectories with fewer than 20 and more than 200 trajectory points, extract the GPS modal features of the vehicle trajectory. S102. Extracting the road network topology map from OpenStreetMap data , where the node set The set of edges represents the intersections and endpoints of roads. This represents a directed road segment connecting nodes. Each road segment's initial vector includes the road segment length, road type, number of lanes, and speed limit. All road segment initial vectors are stacked into a matrix. S103, The original vehicle trajectory point sequence Projected onto the road network topology map, a hidden Markov model is used for map matching. The state transition probability is determined by the topological connectivity and directional consistency between road segments, and the transmission probability is determined by the distance between the GPS point and the candidate road segment.
3. The vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement according to claim 1, characterized in that, The process of generating the final mesh representation sequence of vehicle trajectory points includes the following steps: S201. Map vehicle trajectory points to a normalized three-dimensional spatiotemporal coordinate system to construct a standardized trajectory point sequence. ; S202, Calculate the density constraint and geometric curvature constraint, and then apply the standardized trajectory point sequence... Mapping large-unit three-dimensional spacetime cube space; The density constraint is obtained by counting the total number of trajectory points within a node; The ordered point sequence of a single trajectory within a grid cell is extracted and arranged, and the local curvature of the trajectory within the node is calculated. Then, the curvature of multiple trajectories within the node is aggregated across trajectories to obtain the geometric curvature constraint of the node. Grids with density constraints or geometric curvature constraints exceeding a preset threshold are divided into 8 three-dimensional small grids using an octree. S203. Calculate vehicle trajectory points through multi-level coding and micro-displacement. The leaf grid nodes and their parent nodes are identified, and the vehicle trajectory points are calculated. The relative positional deviation within the leaf network; S204. By using a multi-scale gating fusion mechanism, the leaf grid node features, parent node features, and micro displacement features are linearly fused to generate a geometric grid representation sequence of vehicle trajectory points.
4. The vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement according to claim 1, characterized in that, The generation of semantically enhanced mesh representation sequences specifically includes: S301, Based on each grid cell The distribution density of K types of POI data within the spatial range is statistically analyzed, and the distribution density is fused with the corresponding preset POI data functional weights to form a semantic feature vector. S302, Obtain each trajectory point POI semantic feature vector of the leaf node and the semantic feature vector of the parent node's POI Semantic fusion weights are calculated using a bilinear attention mechanism; The bilinear attention mechanism performs an outer product operation on the POI semantic feature vectors of the leaf node and the parent node where the trajectory point is located, and then calculates the fusion weight through a learnable weight matrix and activation function. The weighted fusion of the two semantic vectors is then added to the geometric grid representation sequence. S303. Multimodal fusion of the POI semantic feature vector of the leaf node where the trajectory point is located and the POI semantic feature vector of the parent node with the geometric semantic features, and combination of the semantic enhancement representations of all trajectory points to generate a semantic enhancement grid representation sequence.
5. The method for calculating vehicle trajectory similarity based on dynamic graph alignment and POI enhancement according to claim 1, characterized in that, The road topology semantic representation for learning and generating the final trajectory is achieved using a dual-probability-guided graph attention mechanism. Specifically, this includes: S401. Obtain the initial feature vector corresponding to the structured road sequence by searching, construct the initial feature matrix of the road sequence of the current trajectory, and statistically analyze the transition probability between adjacent road segments and the co-occurrence probability of road segments within the sliding time window from historical road trajectory data. S402. Calculate the attention coefficients between adjacent road segments, obtain the attention weights through Softmax normalization, use K attention heads to calculate in parallel, concatenate all attention head outputs and perform linear transformation, repeat L times to obtain the final trajectory road topology semantic representation.
6. The method for calculating vehicle trajectory similarity based on dynamic graph alignment and POI enhancement according to claim 1, characterized in that, The cross-modal correlation weights among the three modes—GPS modal features, grid modal features, and road modal features—include the following indices: GPS-grid edge weight, grid-road edge weight, and road-GPS edge weight. The GPS-grid edge weights are obtained by weighting two sub-indicators: spatial coverage and temporal synchronization. Spatial coverage represents the concentration of GPS points within the grid, and temporal synchronization represents the synchronization between the access time pattern and the grid's historical time pattern. The grid-road edge weight is obtained by weighted synthesis of three sub-indicators: spatial alignment, functional consistency, and topological constraint strength. The spatial alignment represents the proportion of geometric coverage length of road segments within the grid, the functional consistency represents the functional consistency between the grid POI semantics and the road attributes, and the topological constraint strength represents the density of the grid being penetrated or connected by the road network. The road-GPS edge weights are obtained by weighted synthesis of three sub-indicators: matching accuracy, motion rationality, and topological constraint satisfaction. The matching accuracy represents the projection accuracy of map matching. The motion rationality includes speed rationality and direction consistency. The speed rationality represents the rationality of GPS instantaneous speed and road segment speed limit. The direction consistency represents the consistency of motion direction. The topological constraint satisfaction represents the topological connectivity of the matching path.
7. The method for calculating vehicle trajectory similarity based on dynamic graph alignment and POI enhancement according to claim 6, characterized in that, The attention coefficients of the multi-layer graph attention network are determined by the similarity of several features and the dynamic edge weights.
8. The method for calculating vehicle trajectory similarity based on dynamic graph alignment and POI enhancement according to claim 1, characterized in that, The joint loss function is expressed as follows: ; in, Denotes the joint loss function. This represents the local structural alignment loss. This represents the global contrastive learning loss. This represents the modal gating regularization loss. , Hyperparameters representing the balance between the contributions of the three loss factors; Minimize the joint loss function using backpropagation. Simultaneously optimize all learnable parameters of the trajectory representation network and the dynamic fusion gating network.
9. The method for calculating vehicle trajectory similarity based on dynamic graph alignment and POI enhancement according to claim 1, characterized in that, The similarity between two trajectories to be compared is calculated using cosine similarity, expressed as: ; in, , This represents two trajectories to be compared. , Representing trajectories , The representation vector, Represents the dot product. Representing vectors Norm, similarity The range of values is The larger the value, the higher the semantic similarity of the trajectories.
10. The vehicle trajectory similarity calculation method based on dynamic graph alignment and POI enhancement according to claim 9, characterized in that, Introduce an adjustable temperature parameter The scaling and offset of trajectory similarity are expressed as follows: ; in, Indicates temperature parameter, Used to control the sharpness of the score distribution.
Citation Information
Patent Citations
Robot alarm processing method and system based on target detection algorithm and cloud platform
CN119418174A
Variable header and object payload
US20220282994A1