Vehicle track completion method and device based on prototype prior and closed-loop condition augmented diffusion model
By constructing a unified manifold representation of trajectory products and a closed-loop conditional augmentation and diffusion model, the problems of inconsistent geometric metrics and insufficient group priors in trajectory recovery at low sampling rates are solved, achieving high-precision, stable, and interpretable trajectory completion, which is suitable for intelligent transportation and personalized travel services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-13
AI Technical Summary
Existing trajectory recovery methods suffer from problems such as inconsistent geometric metrics, lack of population priors, and static rigidity in the conditional diffusion process under low sampling rate conditions, leading to error accumulation and unstable results.
A method based on prototype priors and closed-loop condition augmented diffusion models is adopted. By constructing a unified manifold representation of trajectory products, an interpretable trajectory prototype prior library, and a closed-loop condition augmented diffusion recovery mechanism, and combining the trajectory product manifold representation, trajectory prototype prior library, and closed-loop condition augmented diffusion recovery mechanism, high-precision, high-robustness, and high-interpretability completion of low-sampled trajectories can be achieved.
By integrating individual observation information with group travel patterns in a unified geometric metric space, the problem of error accumulation and instability in traditional methods is alleviated, and the accuracy, stability and interpretability of low-sampling trajectory completion are improved. This method is applicable to fields such as intelligent transportation and personalized travel services.
Smart Images

Figure CN121658566A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation and trajectory data mining technology, and in particular to a vehicle trajectory completion method and system based on prototype prior and closed-loop condition augmented diffusion model, as well as corresponding devices, electronic devices, storage media and computer program products. Background Technology
[0002] With the advancement of policies related to "artificial intelligence + transportation," a large number of vehicle positioning terminals in urban transportation systems continuously generate massive amounts of trajectory data. This trajectory data is a crucial foundation for applications such as navigation and route planning, travel time estimation, traffic flow prediction, anomaly detection, and commuting pattern mining. However, in actual data collection environments, to reduce terminal power consumption or due to factors such as communication barriers and obstructions, vehicles often report positioning information at intervals of several minutes. This results in the obtained trajectories exhibiting significant characteristics such as low sampling rates, long-range missing data, and uneven temporal distribution.
[0003] Low-sampling-rate trajectory recovery (also known as trajectory completion) aims to restore sparse trajectories into high-resolution continuous vehicle paths under road network constraints, while ensuring that the restored results conform to road accessibility, directional consistency, and traffic rule constraints. Traditional statistical learning methods (such as map matching methods based on Hidden Markov Models and trajectory interpolation methods based on shortest paths) have clear structures and are easy to deploy, but they are prone to candidate state explosion and path ambiguity in scenarios such as long-interval missing sections, complex interchanges, and multi-branch road sections, and are highly sensitive to prior knowledge and parameter settings.
[0004] In recent years, deep learning and graph neural networks have been widely used for trajectory recovery and map matching, significantly improving the model's fitting ability in complex road networks through techniques such as sequence modeling, graph structure fusion, and multi-task learning. However, most of these methods aim for a "deterministic optimal solution" for point-to-point or single-path paths, making it difficult to explicitly model the multimodal uncertainties under low-sampled trajectories, and thus difficult to simultaneously balance accuracy, rationality, and diversity.
[0005] Diffusion models, with their powerful generative modeling capabilities, have been gradually introduced into spatiotemporal data completion and trajectory generation tasks. By gradually adding and denoising data to learn complex distributions, they can theoretically generate diverse trajectories that are consistent with the real distribution. However, existing trajectory diffusion models still have the following shortcomings: (1) Inconsistent geometric metrics: They often use a single Euclidean embedding to measure the similarity between trajectories or road segments, which makes it difficult to simultaneously characterize multiple intrinsic geometries such as topological reachability, directional period, driving scale, and spatial distribution, and is prone to metric distortion and training instability. (2) Lack of interpretable group priors: Existing methods mostly model directly at the level of a single trajectory, which does not make sufficient use of high-frequency travel patterns and prototype paths within the city. In scenarios with only origin and destination points or long gaps, the generated results are prone to semantic sparsity and ill-posed multiple solutions. (3) Conditional diffusion is static or naive dynamic: Most conditional diffusion models use fixed conditions throughout the denoising process, or simply splice the current prediction results at each step, which leads to problems such as insufficient use of intermediate information or positive error feedback and contamination of observation anchor points. It is difficult to make full use of the structural information that gradually emerges during the denoising process while maintaining observation constraints.
[0006] To address this, this invention proposes a vehicle trajectory completion scheme based on product manifold representation, prototype priors, and closed-loop condition augmented diffusion models. It constructs interpretable trajectory prototype priors under unified geometric metrics and designs a dynamically controllable closed-loop condition augmented diffusion completion process, thereby effectively solving problems such as inconsistent geometric metrics, lack of group priors, and static condition modeling in low-sampling trajectory completion. Summary of the Invention
[0007] In view of the common problems in existing low-sampling trajectory recovery methods, such as geometric metric distortion, difficulty in fully utilizing group travel priors, and static rigidity and error accumulation in the conditional diffusion process, the purpose of this invention is to propose a vehicle trajectory completion method, device, electronic device, storage medium, and program product based on prototype priors and a closed-loop conditional augmented diffusion model, which at least partially solves the above-mentioned technical problems. By introducing trajectory product manifold representation, trajectory prototype prior library, and closed-loop conditional augmented diffusion recovery mechanism into a unified geometric metric space, this invention achieves high-precision, high-robustness, and high-interpretability completion of low-sampling vehicle trajectories.
[0008] To achieve the above objectives, an exemplary embodiment of the present invention provides, in a first aspect, a vehicle trajectory completion method based on a prototype prior and a closed-loop condition augmented diffusion model, the method comprising:
[0009] Acquire sparse vehicle trajectory data to be recovered and corresponding road network data. The sparse trajectory data contains a series of geospatial coordinate points with timestamps, and the road network data contains the geometric shape, topology, and semantic attribute information of roads. Denoise, drift correction, and breakpoint repair are performed on the original trajectory. Map matching technology is used to align the trajectory points to the road network to obtain a standardized sparse trajectory representation consisting of "road segment identifier + relative position within the road segment".
[0010] Based on the preprocessed trajectory and road network data, a trajectory product manifold representation framework is constructed. Trajectory segments are embedded into topological subspace, orientation subspace, scale subspace and spatial distribution subspace respectively. Corresponding distance functions are defined in each subspace, and product manifold distances that satisfy the metric properties are constructed by weighted combination. This allows the similarity between trajectories to be characterized under a unified geometric scale, providing a unified metric basis for subsequent prototype clustering, prior retrieval and generative evaluation.
[0011] Using large-scale historical high-quality trajectory data, trajectory segments are clustered in the product manifold space according to region, travel time, and origin-destination relationship. A set of representative trajectory prototypes is extracted, and their support, coverage, and typical semantic information are recorded to construct an interpretable trajectory prototype prior library. During the online completion process, the sparse trajectory to be restored is embedded into the product manifold space, and Top-k nearest neighbor search is performed in the prototype prior library. Weights are calculated based on product manifold distance, prototype support, and time matching degree to obtain a hybrid prototype prior vector used to generate constraints.
[0012] A conditional diffusion trajectory recovery model based on a closed-loop conditional augmentation mechanism is constructed, taking the observation mask, hybrid prototype prior, and intermediate prediction context as conditional inputs. During the diffusion reverse denoising process, a conditional vector is dynamically constructed for each time step: the observation mask is used to lock the true value of the observation position, and the intermediate prediction results of several adjacent steps are aggregated through the cross-step aggregation module to form a contextual representation. This is then adaptively weighted and fused with the hybrid prototype prior according to factors such as time step and noise level to generate a closed-loop condition that evolves with the diffusion step.
[0013] Within the denoising network, a unidirectional information flow constraint is introduced to enhance the information transmission path from "observation location to missing location" and suppress the reverse contamination from "missing location to observation location". After each denoising update, a data consistency projection is applied to force the observation location back to the neighborhood of the original observation value. This ensures that the observation constraint is not destroyed while absorbing intermediate structural information and prototype priors, thus achieving a stable and controllable closed-loop diffusion recovery process.
[0014] During the inference phase, multiple diffusion samplings are performed on the same sparse trajectory to generate multiple candidate completion trajectories. A joint evaluation function is constructed based on indicators such as product manifold distance, velocity and curvature smoothness, and consistency with prototype priors to sort and filter the candidate trajectories, and select several representative and complementary completion results.
[0015] The final selected completion trajectory is converted into a high-resolution continuous spatiotemporal trajectory containing road segment identifiers, relative positions within road segments, and timestamps, and then output. This trajectory can be widely used in fields such as intelligent transportation, travel time estimation, urban planning, and personalized travel services.
[0016] Based on the same inventive concept, a second aspect of an exemplary embodiment of the present invention provides a vehicle trajectory completion device based on a prototype prior and a closed-loop condition augmented diffusion model, comprising:
[0017] The data acquisition and preprocessing module is used to acquire sparse vehicle trajectory data and road network data to be recovered, and to perform noise reduction, drift correction, breakpoint repair and map matching on the trajectory data to generate a standardized sparse trajectory representation.
[0018] The product manifold representation module is used to map trajectory fragments to subspaces such as topology, orientation, scale, and spatial distribution, and to construct product manifold distances that satisfy metric properties, which are used to measure the similarity between trajectories and between trajectories and prototypes.
[0019] The prototype prior construction and retrieval module is used to cluster in the product manifold space based on historical trajectory data, build a trajectory prototype prior library, and perform prototype retrieval and weight calculation on the target sparse trajectory during the online completion process, and output a hybrid prototype prior vector.
[0020] The closed-loop conditional augmentation and diffusion recovery module is used to construct a conditional diffusion trajectory recovery model. It integrates the observation mask, hybrid prototype prior, and intermediate prediction context into a dynamic conditional vector, introduces unidirectional information flow constraints and data consistency projection, and realizes closed-loop diffusion completion of missing trajectory segments.
[0021] The training and evaluation module is used to train the diffusion recovery module under a unified metric, construct a joint loss function that includes noise prediction error, boundary smoothing constraints, and product manifold consistency constraints, and achieve end-to-end optimization of the model; and evaluates and ranks multiple candidate completion trajectories during the inference phase.
[0022] The trajectory output module is used to select the final completed trajectory based on the evaluation results, complete the formatted trajectory output, and provide interfaces with downstream applications such as intelligent transportation, route planning, and anomaly detection.
[0023] Based on the same inventive concept, a third exemplary embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the various steps of the vehicle trajectory completion method based on the prototype prior and closed-loop condition augmented diffusion model as described in the first aspect.
[0024] Based on the same inventive concept, a fourth aspect of an exemplary embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause a computer to execute the vehicle trajectory completion method based on the prototype prior and closed-loop condition augmented diffusion model as described in the first aspect.
[0025] Based on the same inventive concept, a fifth aspect of an exemplary embodiment of the present invention provides a computer program product, including computer program instructions, which, when executed on a computer, cause the computer to perform the vehicle trajectory completion method based on the prototype prior and closed-loop condition augmented diffusion model as described in the first aspect.
[0026] As can be seen from the above, this invention, by constructing a unified trajectory product manifold representation framework, an interpretable trajectory prototype prior library, and a closed-loop conditional augmentation and diffusion recovery mechanism, deeply integrates individual observation information with group travel patterns within a unified geometric metric space. This fundamentally alleviates the error accumulation and instability problems caused by metric distortion, lack of strong priors, and static rigidity of conditional diffusion in traditional methods. Through a globally consistent metric space and closed-loop conditional control, this invention ensures the geometric consistency and semantic rationality of trajectory recovery results in terms of topological reachability, directional rationality, and travel scale. This significantly improves the overall performance of low-sampling trajectory completion in complex road network scenarios, providing more reliable and accurate technical support for fields such as intelligent transportation, personalized travel services, and urban computing.
[0027] The innovation of this invention is mainly reflected in the following aspects:
[0028] (1) Unified trajectory measurement framework driven by product manifold: Unlike the existing trajectory representation based on a single Euclidean embedding, this invention integrates topological accessibility, directional periodicity, travel scale difference and spatial distribution difference into the product manifold measurement framework in the trajectory recovery scenario, effectively alleviating the geometric distortion and training instability problems in traditional representation, and providing a self-consistent and unified similarity scale for prototype clustering, prior retrieval and generation evaluation.
[0029] (2) Interpretable trajectory prototype prior library and prototype-guided recovery mechanism: By clustering historical trajectories in the product manifold space, this invention constructs a trajectory prototype prior library with statistical attributes and semantic labels, and realizes soft retrieval and hybrid encoding of prototypes in the online completion process, forming a trajectory generation paradigm of "prototype guidance + observation constraint", which effectively alleviates the problems of multiple ill-posed solutions and semantic sparsity in low-sampling scenarios and improves the interpretability of the generation results.
[0030] (3) Closed-loop condition augmented diffusion modeling mechanism: The closed-loop condition augmented diffusion modeling framework proposed in this invention dynamically integrates the observation mask, intermediate prediction context and prototype prior during the diffusion reverse process, introduces unidirectional information flow constraints and data consistency projection, avoids error positive feedback and observation anchor point contamination caused by static conditions or naive splicing, and improves the controllability and stability of the diffusion generation process.
[0031] (4) Diverse sampling and result rearrangement strategy based on unified metric: Under the unified product manifold metric, this invention designs a joint evaluation function that takes into account accuracy, smoothness and prior consistency, sorts and filters candidate trajectories obtained by multiple diffusion sampling, and provides structurally reasonable and diversified completion results while ensuring high accuracy of the main output trajectory, providing a rich set of candidate paths for downstream tasks such as path planning, travel time estimation and anomaly detection.
[0032] (5) Integrated closed-loop system architecture from representation to generation: This invention integrates trajectory representation, prototype prior construction, diffusion recovery and result evaluation at the system level to form a closed-loop architecture of "representation-prior-diffusion-evaluation". It can iteratively update the prototype library and model parameters by combining newly collected data and evaluation results, and has good engineering feasibility and expansion potential. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of this invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0034] Figure 1 This is a schematic diagram of an application scenario for the vehicle trajectory completion method based on prototype prior and closed-loop condition augmented diffusion model provided in an embodiment of the present invention.
[0035] Figure 2 A flowchart illustrating a vehicle trajectory completion method based on a prototype prior and a closed-loop condition augmented diffusion model provided in an embodiment of the present invention.
[0036] Figure 3A schematic diagram of a vehicle trajectory completion device based on a prototype prior and closed-loop condition augmented diffusion model provided in an embodiment of the present invention.
[0037] Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention; Detailed Implementation
[0038] Existing trajectory recovery techniques often face numerous challenges when dealing with sparse trajectory data, long time intervals, uneven sampling, and a lack of unified geometric metrics and strong prior constraints. On the one hand, traditional methods often involve simple embedding of trajectories in Euclidean space, making it difficult to simultaneously characterize road topology accessibility, travel direction periodicity, travel scale differences, and spatial distribution differences. This can easily lead to geometric metric distortion, affecting the stability and accuracy of trajectory completion. On the other hand, existing methods generally lack explicit modeling of group travel patterns. In scenarios where only origin and destination points or long distances are missing, it is difficult to promptly introduce prior information on "common travel routes," resulting in poor interpretability of the completion results and a tendency to include unreasonable paths. Furthermore, traditional conditional diffusion or generative models typically employ static conditions or simple splicing, ignoring the intermediate contextual information that gradually emerges during denoising. This can easily generate positive feedback errors and even contaminate observation anchor points, affecting the consistency and robustness of the final completion results.
[0039] The inventors of this invention have discovered that by representing trajectories in a unified product manifold metric space and constructing an interpretable trajectory prototype prior library within this space, combined with a closed-loop conditional augmented diffusion modeling mechanism, the diffusion process can be guided to gradually denoise and generate trajectories along the direction of "high-frequency travel patterns + reasonable road network topology" while ensuring observation constraints. This significantly improves the accuracy, stability, and diversity of low-sampling trajectory completion. Specifically, through product manifold representation, trajectory similarity can be measured simultaneously in four subspaces: topology, direction, scale, and spatial distribution, alleviating the geometric distortion problem of a single Euclidean embedding. Through the prototype prior library, a "prototype path skeleton" matching its travel scenario can be provided for each trajectory to be completed. Through the closed-loop conditional augmented diffusion mechanism, observation information, intermediate prediction context, and prototype priors can be dynamically fused at each step of denoising, and error propagation can be controlled through unidirectional information flow and data consistency projection, thereby obtaining a high-quality recovered trajectory that combines global rationality and local detail.
[0040] To overcome the limitations of existing technologies, this invention proposes a novel vehicle trajectory completion method based on prototype priors and a closed-loop conditional augmentation diffusion model. The method first preprocesses and performs map matching on the collected sparse trajectories, constructing a unified trajectory metric within the product manifold space. Then, it utilizes historical trajectories to form a trajectory prototype prior library within this space, and performs prototype retrieval and weighted fusion for the trajectory to be completed, obtaining the corresponding hybrid prototype prior. Based on this, a conditional diffusion trajectory recovery model is constructed. During the reverse denoising process, a closed-loop conditional augmentation mechanism dynamically fuses observation masks, intermediate prediction contexts, and hybrid prototype priors to achieve stable denoising and trajectory generation under observation constraints. Finally, a unified metric and boundary smoothing index are used to evaluate and rearrange candidate trajectories obtained from multiple samplings, outputting high-precision and diverse completion results. This invention's method exhibits strong practicality and robustness, particularly in complex urban road networks, low sampling rates, and long gap scenarios, showing broad application prospects and providing a reliable data foundation for intelligent transportation, urban planning, and personalized travel services.
[0041] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention will be described in detail below.
[0042] refer to Figure 1 This is a schematic diagram illustrating an application scenario of the vehicle trajectory completion method based on a prototype prior and a closed-loop condition augmented diffusion model, provided by an exemplary embodiment of the present invention. The application scenario includes a trajectory data acquisition device 101, a trajectory processing server 102, a trajectory data storage system 103, and a user device 104. The trajectory data acquisition device 101, the trajectory processing server 102, the trajectory data storage system 103, and the user device 104 can all be connected via wired or wireless trajectory data communication networks to achieve data interaction.
[0043] The trajectory data acquisition device 101 can be a device located close to the user side for collecting vehicle trajectory point data, including but not limited to an in-vehicle GPS terminal, OBD vehicle diagnostic equipment, smartphone, tablet computer, or other electronic devices with positioning and communication functions. The trajectory data acquisition device 101 periodically or event-drivenly reports trajectory point information during vehicle operation, providing sparse input data for trajectory completion. The collected trajectory data may include, but is not limited to, timestamps, latitude and longitude coordinates, speed, direction, and other trajectory-related attribute information (such as vehicle ID, order ID, etc.).
[0044] Both the trajectory processing server 102 and the trajectory data storage system 103 can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud computing devices providing cloud services. The trajectory processing server 102 is mainly responsible for executing the trajectory completion algorithm process proposed in this invention, including: trajectory preprocessing and map matching, product manifold embedding, trajectory prototype prior construction and online retrieval, closed-loop condition augmentation and diffusion trajectory recovery, candidate result evaluation and rearrangement, etc. In the method of this invention, the trajectory processing server 102 first maps the received sparse trajectory to a product manifold space composed of topology, direction, scale, and spatial distribution, and calls the prototype prior library in this space to obtain a hybrid prototype prior that matches the current travel scenario; then, a conditional diffusion model is constructed, and through a closed-loop conditional augmentation mechanism, the observation mask, intermediate prediction context, and hybrid prototype prior are jointly encoded into a dynamic conditional vector, driving the diffusion reverse process to gradually generate a high-resolution trajectory that conforms to the road network topology and group pattern; after generating multiple candidate trajectories, the trajectory processing server 102 also sorts and filters the candidate results based on a unified metric, speed and curvature smoothness, and prototype consistency index, and finally obtains one or more preferred complete trajectories.
[0045] The trajectory data storage system 103 is used to store multi-source data required for trajectory recovery, as well as model parameters and intermediate results related to the method of this invention. Specifically, the trajectory data storage system 103 may include: a road data sub-library for providing road network information (e.g., road geometry, topological connectivity, number of lanes, and speed limit information); a historical trajectory sub-library for storing historical trajectory data and supporting product manifold learning and prototype clustering; a model prior sub-library for storing product manifold parameters, trajectory prototype prior libraries, and nearest neighbor retrieval indexes; and a sample data sub-library for storing training samples (including sparse trajectories and their corresponding high-resolution ground truth trajectories) and training logs. The trajectory data storage system 103 can provide online query and batch read / write capabilities to the trajectory processing server 102 to support efficient data access during model training, prototype retrieval, and trajectory recovery processes.
[0046] User device 104 can be a smartphone, tablet, in-vehicle infotainment system, or other electronic device that supports human-computer interaction. Users can receive the completed trajectory results sent by trajectory processing server 102 through user device 104 and view, analyze, or further utilize the results according to business needs. For example, in a smart mobility scenario, the operation platform can display the completed historical travel trajectories on user device 104 to support personalized travel recommendations and abnormal behavior analysis. In traffic management and urban planning scenarios, staff can use user device 104 to perform statistical analysis of large-scale vehicle trajectory completions to assess road traffic efficiency, identify congestion bottlenecks, or optimize signal timing. User device 104 can also send configuration commands to trajectory processing server 102, such as selecting a completion strategy, setting the number of samples, or specifying a target time period.
[0047] In this embodiment, the trajectory data acquisition device 101 sends sparse trajectory data to the trajectory processing server 102 in real time or in batches via a trajectory data communication network. Based on the road network information, historical trajectory data, and trajectory prototype prior library provided by the trajectory data storage system 103, the trajectory processing server 102 performs product manifold embedding and closed-loop conditional augmentation diffusion completion on the sparse trajectories, generating one or more high-precision completed trajectories. Subsequently, the trajectory processing server 102 returns the completion results to the user device 104 for visualization or service invocation. Through the above collaborative work, the vehicle trajectory completion method provided by this invention can effectively address the challenges of trajectory recovery in environments with sparse trajectory data, uneven sampling, and complex road networks, providing high-quality and reliable trajectory data support for applications such as intelligent transportation, urban planning, and personalized travel services.
[0048] It should be noted that the above application scenarios and specific configurations of each functional component are shown only to facilitate understanding of the spirit and principles of the present invention, and the implementation of the present invention is not limited in any way. Those skilled in the art can adjust and expand the specific form, deployment method, and network topology of the trajectory data acquisition device 101, trajectory processing server 102, trajectory data storage system 103, and user equipment 104 according to actual business needs, and this should not be regarded as a limitation of the present invention.
[0049] refer to Figure 2 The vehicle trajectory completion method based on prototype priors and closed-loop condition augmented diffusion model is applied to a trajectory processing server. The method includes the following steps:
[0050] Step S210: Collect sparse trajectory data, road network data and historical trajectory data, and complete standardized preprocessing.
[0051] In this embodiment, the sparse trajectory data is acquired by vehicle-side trajectory acquisition devices (such as in-vehicle GPS terminals, OBD devices, smartphones, etc.) and contains a series of discontinuous trajectory point data. Each trajectory point consists of a timestamp and spatial location information, which can be represented as follows:
[0052] T i =(x i ,y i ,t i )
[0053] Where (x) i ,y i ) represents latitude and longitude coordinates, t i This corresponds to a timestamp. Due to the influence of sampling strategies and environmental occlusion, the time intervals between trajectory points may be large and uneven, resulting in significant sparsity of the trajectory in space and time.
[0054] Simultaneously, the trajectory processing server reads road network data corresponding to the collection area and historical high-resolution trajectory data accumulated over a long period from the trajectory data storage system. The road network data can be abstracted as a graph structure.
[0055]
[0056] in Let ε be the set of intersections or shape points, and ε be the set of road segments, each carrying semantic information such as length, direction, and road class. Historical trajectory data is used for subsequent product manifold learning and trajectory prototype extraction.
[0057] In this step, the trajectory processing server performs noise reduction, outlier removal, and drift correction on the original sparse trajectory. It also performs map matching based on the road network, mapping each trajectory point to a corresponding road segment identifier and its relative position within that segment, thus forming...
[0058]
[0059] Where e j For the road segment ID, r j ∈[0,1] represents the relative position of the point on the road segment. After the above preprocessing, the original latitude and longitude sequence is unified into a standardized representation of "road segment identifier + location within the road segment", laying the data foundation for subsequent trajectory embedding and diffusion modeling.
[0060] Step S220: Construct a manifold representation of the trajectory product and form a unified trajectory metric.
[0061] In this embodiment, considering that the similarity of vehicle trajectories depends not only on path reachability but also on various geometric factors such as driving direction, travel scale, and spatial distribution, the trajectory processing server constructs a product manifold representation framework based on the road network and historical trajectories. Specifically, trajectory segments are embedded in the following four subspaces:
[0062] 1. Topological subspace: based on road network graph Information such as shortest path length and turning penalty is used to construct a topological embedding φ for the road segment sequence. topo It is used to characterize the accessibility and detour cost between different paths;
[0063] 2. Direction Subspace: The driving direction angle is mapped to a circular space, and the direction embedding φ is obtained through sine / cosine encoding or polar coordinates. dir To reflect directional periodicity and the difference between forward and reverse movement;
[0064] 3. Scale Subspace: Constructing a scale embedding φ using dimensional information such as distance length and travel time. scale It is used to distinguish travel modes such as short-distance, long-distance, and different speed levels;
[0065] 4. Spatial Distribution Subspace: Statistical analysis of the areas traversed by the trajectory is performed on a multi-scale geographic raster to form a spatial occupancy vector φ. spat This is used to describe the distribution pattern of vehicles in urban space.
[0066] For any two trajectory segments τ a ,τ b Define sub-distances in each subspace.
[0067]
[0068] Where w k The weights are learnable or pre-defined non-negative. The product's manifold distance satisfies metric properties, enabling it to characterize the comprehensive similarity between trajectories under a unified geometric scale, providing a consistent metric basis for subsequent prototype clustering, online retrieval, and sampling result evaluation.
[0069] Step S230: Construct a prior library of trajectory prototypes based on the product manifold and perform prototype retrieval and fusion of target sparse trajectories.
[0070] In this embodiment, the trajectory processing server constructs a trajectory prototype prior library in the product manifold space using historical high-resolution trajectories. The specific steps are as follows: First, historical trajectories are bucketed according to city area, travel time period, and OD relationship, mapping trajectory segments from the same scenario to the product manifold space; then, within each bucket, clustering methods such as Riemannian k-means or k-medoids are used to obtain a set of trajectory prototype centers.
[0071]
[0072] Each prototype is recorded for its support, typical path shape, and corresponding semantic label (such as "morning rush hour commuting route" and "ring expressway detour route"), thus forming an interpretable trajectory prototype prior library.
[0073] During the online completion process, for the sparse trajectory to be restored The trajectory processing server first computes its embedding representation in the product manifold space and compares it with the prototype set. Calculate the product manifold distance. Then select the top-k nearest prototypes {p}. (1) ,…,p (k) The weights are calculated based on factors such as distance, support, and time-time matching.
[0074]
[0075] After normalization, the hybrid prototype prior vector is obtained.
[0076]
[0077] Where φ(·) represents the encoding function of the prototype in the condition space. This hybrid prototype prior preserves the high-frequency travel patterns of the group while adapting to the specific scenario of the current trajectory, and will serve as important structural guidance information in the subsequent diffusion recovery process.
[0078] Step S240: Construct a closed-loop conditional augmented diffusion model and perform stepwise denoising and completion on the sparse trajectory.
[0079] In this embodiment, the trajectory processing server constructs a closed-loop conditional augmented trajectory recovery model based on the conditional diffusion framework. First, through a forward diffusion process, the standardized representation of the complete trajectory is progressively noisy at each time step t. Forward diffusion can be represented as...
[0080]
[0081] Where x0 is the representation of the true high-resolution trajectory in the latent space, α t This is the decay coefficient related to the time step.
[0082] In the reverse denoising process, the model estimates the noise or directly estimates the clean signal at each time step t, and updates x based on the estimation results. t-1 Unlike traditional diffusion models that only use static conditions, this invention dynamically constructs a condition vector c at each step of the reverse process. t It consists of three parts:
[0083] 1. Observation constraint information: The true value of the sparse trajectory position is fixed by using the observation mask. The state of the corresponding position is projected back to the observation neighborhood when updating, thereby ensuring that the observation point is not contaminated by error in the whole denoising process;
[0084] 2. Intermediate prediction context: For the intermediate states {x} of the most recent few steps... t ,x t+1 ...} By performing stride aggregation through one-dimensional convolution or gated recurrent units, local trend and global shape information are extracted to form a contextual representation h. t ;
[0085] 3. Hybrid Prototype Prior: The p obtained in step S230 is used as a prototype prior. mix Mapped to h via linear transformation t Using the same conditional space and introducing weight coefficients that vary with time step, the early denoising stage relies more on the prototype skeleton, while the later stage focuses more on detail repair.
[0086] The final condition vector can be represented as
[0087] c t =g t (mask,h t ,p mix )
[0088] Where g t (·) represents the fusion function that adaptively adjusts with each time step. The denoising network takes the current input state x as input. t and condition c t Then, output noise estimation Or directly output the updated x t-1 The network internally strengthens the attention weight in the "observation → missing" direction through unidirectional information flow design, and suppresses the back propagation of "missing → observation", thereby forming a closed-loop diffusion recovery process under the combined effect of observation constraints and prototype priors.
[0089] Step S250: The candidate trajectories obtained from multiple samplings are evaluated and rearranged based on a unified metric to ensure the rationality and diversity of the trajectory recovery results.
[0090] In this embodiment, to fully leverage the advantage of the diffusion model in generating diverse solutions, the trajectory processing server performs multiple samplings on the same sparse trajectory during the inference phase to obtain a set of candidate completed trajectories.
[0091]
[0092] Subsequently, using the product manifold metric constructed in step S220, the distance between each candidate trajectory and the real trajectory (when labeled) or the prototype prior is calculated; at the same time, based on the trajectory's speed smoothness, turning curvature, whether it violates road topology constraints, and other indicators, a comprehensive evaluation function is constructed to measure the geometric rationality and physical feasibility of the candidate trajectory.
[0093] While ensuring high accuracy of the main output trajectory, the trajectory processing server also calculates the mutual distances within the candidate set and their consistency with the prior distribution of the prototype to measure diversity and pattern coverage. By weighting and summarizing the above multiple indicators, a comprehensive score is formed, and the candidate trajectory set is sorted and filtered. The one or more trajectories with the highest scores are retained as the final completion result or for further selection by downstream tasks.
[0094] Step S260: Output high-resolution completed trajectory and complete consistency verification and result storage.
[0095] In this embodiment, the preferred completed trajectory obtained after evaluation and screening in step S250 will be restored from the latent space representation within the model to the form of an actual road sequence. Specifically, this includes converting the road segment representation and relative positions within the road segments into a sequence of road geometric coordinate points. If necessary, interpolation can be performed within the road segments to obtain sampling points at fixed time intervals or fixed spatial intervals, thereby forming a spatiotemporally continuous high-resolution trajectory.
[0096] Subsequently, the trajectory processing server performs consistency checks on the completed trajectory, including checking for situations that do not conform to traffic logic, such as driving beyond designated boundaries, driving in the wrong direction, or abnormal instantaneous speeds. Minor inconsistencies can be corrected through methods such as local shortest path replacement and speed smoothing. After the verification is passed, the final trajectory data is written to the trajectory data storage system in a unified format (such as "timestamp + road segment ID + location within the road segment" or latitude and longitude sequence), and can be returned to user devices or upper-level business systems through interfaces for applications such as intelligent traffic analysis, travel time estimation, route recommendation, and anomaly detection.
[0097] Through the above steps, combined Figure 2 As shown in the flowchart, the vehicle trajectory completion method of this invention based on prototype prior and closed-loop condition augmented diffusion model achieves high-precision, interpretable and diversified recovery of vehicle trajectories under complex road network and low sampling conditions.
[0098] refer to Figure 3This is a schematic diagram of a vehicle trajectory completion device based on a prototype prior and a closed-loop condition augmented diffusion model, provided as an exemplary embodiment of the present invention. The device includes a trajectory and road network preprocessing module 310, a product manifold representation module 320, a prototype prior construction and retrieval module 330, a closed-loop condition augmented diffusion recovery module 340, an evaluation and rearrangement module 350, and a trajectory output module 360.
[0099] The trajectory and road network preprocessing module 310 is configured to preprocess and standardize the sparse trajectory data from the trajectory acquisition device and the corresponding road network data to generate a unified trajectory input representation. Specifically, this module receives the original sparse trajectory point sequence, formats the latitude and longitude coordinates and timestamp of each trajectory point to complete noise reduction, outlier removal, and time alignment; then, it performs map matching in conjunction with the road network data to project the trajectory points onto specific road segments, obtaining a representation of "road segment identifier + relative position (rate) within the road segment". Simultaneously, this module can also extract semantic attributes related to road segments (such as road grade, speed limit information, number of lanes, etc.) and organize them into a sparse road segment sequence in chronological order, providing a unified and structured input for subsequent product manifold representation and diffusion modeling.
[0100] The product manifold representation module 320 is configured to embed preprocessed trajectory segments into a unified product manifold space based on road topology and vehicle driving behavior characteristics to characterize the geometric similarity between trajectories. This module can be further subdivided into topology embedding, orientation embedding, scale embedding, and spatial distribution embedding submodules: the topology embedding submodule uses adjacency relationships and shortest path distances from the road network graph to perform graph embedding on the road segment sequence, representing the topological accessibility and detour cost of the trajectory; the orientation embedding submodule maps angles to a circular space based on the vehicle's driving direction on each road segment to capture directional periodicity; the scale embedding submodule constructs a travel scale vector based on indicators such as travel length and time consumption; and the spatial distribution embedding submodule statistically analyzes the distribution characteristics of the areas traversed by the trajectory using multi-scale geographic grids. Subsequently, module 320 combines the above sub-embeddings according to predetermined or learnable weights to form a product manifold distance that satisfies metric properties, providing a unified geometric scale for subsequent prototype clustering, prototype retrieval, and candidate trajectory evaluation.
[0101] The prototype prior construction and retrieval module 330 is configured to construct a trajectory prototype prior library using historical high-quality trajectories in the product manifold space, and to retrieve and generate hybrid prototype priors that match the scene during the online completion process for the current sparse trajectory. Specifically, in the offline stage, this module groups large-scale historical trajectories by city region, time period, and OD relationship, and then performs clustering on trajectory segments within each group in the product manifold space to obtain a set of representative trajectory prototypes, and records their support, spatial coverage, and semantic labels to form an interpretable prototype prior library. In the online stage, this module receives the target sparse trajectory embedding encoded by the product manifold representation module, calculates its product manifold distance with each trajectory prototype, selects the top-k most similar prototypes, calculates weights based on factors such as distance, support, and time matching, and performs weighted fusion on the prototype embedding vectors to generate a hybrid prototype prior vector, providing a structural skeleton and group pattern constraints for the closed-loop condition augmentation diffusion recovery module.
[0102] The closed-loop conditional augmentation and diffusion recovery module 340 is configured to progressively denoise and complete sparse trajectories based on a conditional diffusion model, and is the core module for achieving high-quality trajectory recovery in this invention. This module may include a diffusion coding submodule, a closed-loop conditional construction submodule, and a denoising and decoding submodule. The diffusion coding submodule performs a forward noise addition process on the complete trajectory representation according to a preset noise scheduling strategy, constructing the noise samples required for training. In the reverse denoising stage, the closed-loop conditional construction submodule dynamically generates time-step-related conditional vectors based on the current diffusion step, observation mask, intermediate predicted trajectories, and hybrid prototype priors, achieving closed-loop fusion of observation information, intermediate context, and prototype priors. It also enhances the information transmission between "observation → missing" and suppresses erroneous feedback between "missing" and "observation" through a unidirectional information flow design. The denoising and decoding submodule uses the current state and conditional vectors as input to predict the noise or trajectory residual for the corresponding step size and updates the trajectory hidden state. After each update step, this module also applies a data consistency projection to the observation position, forcing it to return to the neighborhood of the true observation value, thus maintaining strict constraints on the observation anchor point throughout the generation process.
[0103] The evaluation and rearrangement module 350 is configured to comprehensively evaluate and rank multiple candidate completion trajectories generated by the closed-loop condition augmentation-diffusion recovery module during the inference phase, selecting the final result that meets the requirements of accuracy and diversity. Specifically, this module receives multiple sampling results corresponding to the same sparse trajectory, calculates the distance between the candidate trajectory and the real trajectory (or the prototype prior) using a unified metric provided by the product manifold representation module, and extracts boundary features of each candidate trajectory in terms of speed change, turning curvature, path continuity, etc., to detect whether there is a violation of road topology constraints or whether there is an obvious unreasonable detour. Based on this, module 350 constructs a comprehensive scoring function that includes indicators such as "geometric accuracy," "motion smoothness," "prior consistency," and "inter-candidate difference," ranks the candidate trajectories, and can select an optimal trajectory or several representative trajectories with high scores for subsequent output according to application requirements.
[0104] The trajectory output module 360 is configured to generate a final high-resolution continuous spatiotemporal trajectory based on the completed trajectory results output by the evaluation and rearrangement module, combined with road network geometric information, and to complete consistency verification and result storage. This module converts the internal road segment IDs and relative position sequences within road segments into latitude and longitude coordinate sequences, and performs interpolation and resampling in chronological order to ensure the trajectory is spatially continuous and temporally uniform, or meets the sampling intervals required by the business. Subsequently, module 360 performs spatiotemporal consistency checks on the trajectory, removing potential anomalies or obviously unreasonable short polyline segments, and correcting them if necessary using local shortest path or smoothing filtering. Finally, the generated high-fidelity trajectory is output and stored in a preset data format (e.g., GeoJSON, CSV, or database records), while providing interfaces to downstream modules such as intelligent transportation analysis systems, route planning services, and personalized travel applications to achieve visualization and business calls for the completed trajectory.
[0105] Figure 4 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0106] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0107] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0108] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0109] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0110] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0111] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0112] The electronic device described above is used to implement a vehicle trajectory completion method based on a prototype prior and closed-loop condition augmented diffusion model in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0113] Based on the same inventive concept, corresponding to any of the above embodiments, the present invention also provides a non-transitory computer-readable storage medium storing computer instructions, which are used to cause the computer to execute a vehicle trajectory completion method based on a prototype prior and closed-loop condition augmented diffusion model as described in any of the above embodiments.
[0114] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0115] The aforementioned non-transitory computer-readable storage media can be any available medium or data storage device that a computer can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).
[0116] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute an end-to-end sparse trajectory recovery method based on road network constraints as described in any of the embodiments in the exemplary method section above, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0117] Based on the same inventive concept, corresponding to the end-to-end sparse trajectory recovery method based on road network constraints described in any of the above embodiments, this invention also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer to cause the computer and / or the processor to perform the end-to-end sparse trajectory recovery method based on road network constraints. Corresponding to the execution entity for each step in each embodiment of the end-to-end sparse trajectory recovery method based on road network constraints, the processor executing the corresponding step can belong to the corresponding execution entity.
[0118] The computer program product of the above embodiments is used to cause the computer and / or the processor to execute an end-to-end sparse trajectory recovery method based on road network constraints as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0119] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, method, or computer program product. Therefore, the present invention can be specifically implemented as entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0120] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (not exhaustive) of a computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0121] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0122] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0123] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Python, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0124] It should be understood that each block of a flowchart and / or block diagram, as well as combinations of blocks in a flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine that, when executed by a computer or other programmable data processing device, creates means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.
[0125] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce a product comprising an instruction apparatus that implements the functions / operations specified in the boxes of a flowchart and / or block diagram.
[0126] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions that execute on the computer or other programmable apparatus can provide a process for implementing the functions / operations specified in the boxes of a flowchart and / or block diagram.
[0127] Furthermore, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Rather, the steps depicted in the flowchart may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0128] 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. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains 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, can 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.
[0129] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0130] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.
[0131] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0132] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0133] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.
[0134] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be interpreted in the broadest sense, thereby encompassing all such modifications and equivalent structures and functions.
Claims
1. A vehicle trajectory completion method based on prototype priors and closed-loop condition augmented diffusion models, characterized in that, include: Acquire sparse vehicle trajectory data, corresponding regional road network data, and historical high-resolution trajectory data; A manifold representation of trajectory products is constructed in multiple subspaces, including topology, orientation, scale, and spatial distribution, and a unified trajectory similarity metric is formed. Based on historical trajectories, a trajectory prototype prior library is constructed in the product manifold space, and prototype retrieval and weighted fusion are performed on the sparse trajectories to be completed to obtain hybrid prototype priors. Using a closed-loop conditional augmentation model, sparse trajectories are gradually completed under observation constraints through a multi-step reverse denoising process. During the denoising process, the observation mask, intermediate prediction context and hybrid prototype prior are dynamically fused to form time-step related closed-loop conditions, which suppress error accumulation and keep the observation points stable. Multiple diffusion sampling is performed on the same sparse trajectory, and the candidate completion results are evaluated and rearranged based on a unified metric. The final result is a high-precision completed trajectory that satisfies the road network topology constraints and is highly consistent with the actual trajectory.
2. The method according to claim 1, characterized in that, The acquisition of sparse vehicle trajectory data and road network data includes: Acquire a sparse trajectory point sequence collected by a trajectory acquisition device, which includes an on-board positioning terminal, an OBD (On-Board Diagnostics) device, a smartphone, or other terminals with positioning functions; The trajectory point sequence is subjected to denoising, outlier removal, and time alignment processing. Obtain road network information for the corresponding area, including road geometry, topological connections, road class, and speed limit information; By using map matching algorithms, latitude and longitude trajectory points are aligned to the road network to obtain a standardized sparse trajectory representation consisting of road segment identifiers and relative positions within the road segments; High-resolution trajectory data related to the target area and time period are obtained from the historical trajectory database for subsequent product manifold learning and prototype prior construction.
3. The method according to claim 1, characterized in that, The construction of the trajectory product manifold representation in multiple subspaces includes: In the topological subspace, based on information such as the shortest path distance and turning cost of the road network map, the road segment sequence is graph-embedded to obtain a topological embedding vector representing accessibility and detour cost. In the direction subspace, the direction angle is encoded into the annular space according to the vehicle's driving direction on each road segment, resulting in a direction embedding vector that reflects the direction periodicity and the difference between forward and reverse driving. In the scale subspace, a travel scale embedding vector is constructed based on scale information such as travel length, time consumption, or average speed. In the spatial distribution subspace, the spatial distribution embedding vector is constructed by statistically analyzing the occupancy of the areas traversed by the multi-scale geographic raster. Sub-distance functions are defined in the four subspaces respectively, and product manifold distances that satisfy the metric properties are constructed by weighted combination to unify the similarity between different trajectories in terms of geometric scale.
4. The method according to claim 1, characterized in that, The process of constructing a trajectory prototype prior library based on historical trajectories and generating hybrid prototype priors includes: Historical high-resolution trajectories are grouped according to city area, travel time period, and origin-destination relationship, and each group of trajectory segments is mapped to the product manifold space; In each group, a clustering algorithm is used to cluster the trajectory segments to obtain multiple trajectory prototype centers, and the support, spatial coverage and semantic labels of each trajectory prototype are recorded. All trajectory prototypes are organized into a trajectory prototype prior library, and a nearest neighbor retrieval index based on product manifold distance is established. For the target sparse trajectory to be completed, calculate its embedding representation in the product manifold space, and perform Top-k prototype retrieval in the trajectory prototype prior library; Based on factors such as product manifold distance, prototype support, and time period matching, the retrieved trajectory prototypes are weighted and fused to generate a hybrid prototype prior vector that matches the current travel scenario.
5. The method according to claim 1, characterized in that, The closed-loop conditional augmentation conditional diffusion model achieves stepwise completion of sparse trajectories in the following manner: During the forward diffusion process, the complete trajectory is noise-added in multiple steps according to a preset noise scheduling strategy to obtain noise trajectory representations at different time steps; In the reverse denoising process, for each diffusion step, the true value of the observation position is fixed according to the observation mask to avoid the observation point being contaminated by noise during the iteration process; The intermediate prediction states of the most recent steps are aggregated step by step to extract the intermediate structure information and local trends of the trajectory and form an intermediate prediction context representation. The intermediate prediction context and the hybrid prototype prior are fused together with time-step related weights to generate a conditional vector that evolves with the diffusion step. A unidirectional information flow constraint is introduced inside the denoising network to enhance the effective information transmission from the observation position to the missing position and suppress the back-propagation of error from the missing position to the observation position. After each denoising update, a data consistency projection is performed on the observation location, forcibly projecting the state of the corresponding location back to the neighborhood of the true observation value, ensuring that the completion process strictly follows the observation constraints.
6. The method according to claim 1, characterized in that, The evaluation and rearrangement of the candidate completion results includes: Perform multiple diffusion samplings on the same sparse trajectory to generate multiple candidate complete trajectories; The product manifold distance is used to measure the geometric difference between candidate trajectories and true trajectories or hybrid prototype priors. The boundary features of candidate trajectories in terms of velocity variation, turning curvature, and path continuity are calculated to evaluate their motion smoothness and physical plausibility. The internal diversity among candidate trajectories and their consistency with the distribution of the trajectory prototype are used to measure the coverage of travel patterns by the candidate set. A joint scoring function is constructed that comprehensively considers geometric accuracy, motion smoothness, prior consistency, and candidate diversity. The candidate trajectories are sorted and filtered, and at least one is selected as the final completed trajectory output.
7. A vehicle trajectory completion device based on a prototype prior and a closed-loop condition augmented diffusion model, characterized in that, include: The trajectory and road network preprocessing module is used to acquire sparse vehicle trajectory data and road network data, denoise the original trajectory, remove outliers and align the time, and perform map matching in combination with the road network to generate a standardized sparse trajectory representation consisting of road segment identifiers and relative positions within the road segments. The product manifold representation module is used to embed trajectory segments into multiple subspaces based on information such as road topology, driving direction, travel scale, and spatial distribution, and to construct product manifold distances that satisfy metric properties, so as to uniformly measure the geometric similarity between different trajectories. The prototype prior construction and retrieval module is used to build a trajectory prototype prior library in the product manifold space using historical high-resolution trajectories, and to perform prototype nearest neighbor retrieval and weighted fusion for the target sparse trajectory during the online completion process to generate a hybrid prototype prior vector. The closed-loop conditional augmentation and diffusion recovery module is used to construct a conditional diffusion trajectory recovery model. During the reverse denoising process, it dynamically fuses the observation mask, intermediate prediction context and hybrid prototype prior to generate time-step related closed-loop conditional vectors. It also achieves the gradual completion of sparse trajectories through unidirectional information flow constraints and data consistency projection. The evaluation and rearrangement module is used to perform product manifold-based accuracy evaluation, boundary smoothness analysis, and prior consistency evaluation on multiple candidate completion trajectories generated by the closed-loop condition augmentation and diffusion recovery module, and to sort and filter the candidate trajectories accordingly. The trajectory output module is used to restore the completed trajectory selected by the evaluation and rearrangement module into a time-ordered road sequence or latitude and longitude point sequence. After completing the consistency verification, it outputs a high-precision completed trajectory that meets the needs of intelligent transportation and personalized travel services.
8. An electronic device, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the vehicle trajectory completion method based on the prototype prior and closed-loop condition augmented diffusion model as described in any one of claims 1 to 7.
9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to execute the vehicle trajectory completion method based on the prototype prior and closed-loop condition augmented diffusion model as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, Includes computer program instructions that, when executed on a computer, cause the computer to perform the vehicle trajectory completion method based on a prototype prior and closed-loop condition augmented diffusion model as described in any one of claims 1 to 7.
Citation Information
Cited By
Arbitrary shape object trajectory planning method and system based on space-time joint A star
CN122015872A