A two-stage generated fine-grained vehicle trajectory generation method
By employing a two-stage fine-grained trajectory generation method, combined with Geohash encoding and a GAN model, refined modeling of vehicle behavior is achieved. This addresses the limitations of individual behavior modeling and data privacy issues in existing technologies, improves the accuracy and reliability of trajectory generation, and can be applied to traffic optimization.
Patent Information
- Application Number
- CN202311216746.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-09-20
AI Technical Summary
Existing vehicle trajectory generation technologies struggle to achieve refined modeling of individual behavior, and obtaining real data raises privacy concerns, making it difficult to effectively acquire and utilize traditional methods.
A two-stage fine-grained trajectory generation method is adopted. First, the region transfer trajectory is generated by Geohash encoding. Then, the transfer rules between regions are learned by using a GAN model. Finally, the fine-grained trajectory is predicted based on the driving intention. The starting point and ending point are predicted by combining a machine learning model to generate the final vehicle trajectory.
It improves the accuracy and reliability of vehicle trajectory generation, and can simultaneously consider the overall transfer pattern and individual driving behavior to generate more refined trajectory data, supporting traffic flow prediction and taxi dispatch.
Smart Images

Figure CN117290408B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to trajectory generation technology, and more particularly to a two-stage fine-grained trajectory generation method, which aims to achieve refined modeling of vehicle behavior. Background Technology
[0002] With the development of vehicle intelligence and automation, urban traffic analysis is increasingly reliant on vehicle trajectories. Vehicle trajectory data not only tracks vehicle movement but also reveals potential congestion points based on vehicle origin and destination, which is crucial for traffic flow prediction and taxi dispatching. However, obtaining vehicle trajectories still faces many challenges.
[0003] First, the limitations of obtaining real-world data are a problem. How to acquire large amounts of authentic and valid data is the first challenge researchers face. When acquiring vehicle trajectory data, GPS data is difficult to obtain and publicly use due to user privacy concerns. Therefore, finding a reliable data acquisition method is essential.
[0004] Secondly, existing trajectory generation technologies are not yet mature enough. Traditional trajectory generation techniques are mainly based on statistical and rule-based methods, which cannot provide refined modeling of individual behavior. In recent years, with the development of deep learning technology, deep learning-based trajectory generation technology has gradually become a research hotspot. However, existing deep learning-based trajectory generation technologies mainly focus on modeling overall behavioral patterns, and still have certain limitations in modeling individual behavior. Summary of the Invention
[0005] This invention aims to overcome the aforementioned shortcomings of existing technologies by providing a two-stage fine-grained trajectory generation technique. Its purpose is to simultaneously consider both overall transfer patterns and individual driving behavior, achieving more refined modeling of vehicle behavior and thus improving the accuracy and reliability of trajectory generation.
[0006] This invention provides a two-stage fine-grained trajectory generation method that simultaneously considers overall transfer patterns and individual driving behavior, enabling more refined modeling of individual behaviors and thus improving the accuracy and reliability of trajectory generation. By using the technology of this invention, vehicle trajectory data can be better acquired and applied to traffic flow prediction, taxi dispatching, and other areas, providing important support for urban traffic optimization.
[0007] The present invention provides a two-stage fine-grained trajectory generation method for solving the technical problem, comprising the following steps:
[0008] (1) Generating regional transfer trajectories under Geohash: First, the vehicle trajectory is Geohashed to find the Geohash encoding corresponding to the vehicle's GPS coordinates, thus obtaining the vehicle's transfer trajectory under this coarse-grained Geohash data from the original data. Then, a GAN model is used to learn the transfer patterns between different regions, thereby generating continuous trajectories for transfer between Geohash regions;
[0009] (2) Generate fine-grained trajectories based on driving intent: Determine the transfer trajectories within the generated Geohash region, with the predicted granularity being the transfer trajectories between roads, including the following steps:
[0010] (21) Determine the starting and ending positions of the transfer trajectory;
[0011] (22) Predict the paths between road nodes.
[0012] As a preferred technical solution of the present invention, step (1) involves performing Geohash on the vehicle trajectory to find the Geohash code corresponding to the vehicle's GPS coordinates, thereby obtaining the vehicle's transfer trajectory in the original data at this coarse-grained Geohash level. The encoding process is as follows:
[0013] (a) GeoHash codes are calculated starting from a 0-1 string, beginning with the first bit.
[0014] (b) Divide the latitude range into two equal parts, left and right. If the latitude coordinate is in the left interval, the bit is 0; if it is in the right interval, the bit is 1.
[0015] (c) Set the range of the current interval to the interval that (b) falls into, and repeat the binary search steps to obtain the next bit.
[0016] (d) Perform the same operation on longitude, but the range of longitude is [-180, 180].
[0017] (e) Repeat the above steps until the required accuracy is achieved to obtain the final GeoHash code.
[0018] Using the Geohash method, each GPS coordinate reported by the vehicle is mapped to a Geohash code, thus converting the original vehicle latitude and longitude sequence into a coarse-grained vehicle transfer trajectory using Geohash.
[0019] As a preferred technical solution of the present invention, step (1) of using a GAN model to learn the transfer rules between different regions, thereby generating continuous trajectories of transfer between Geohashes, specifically includes: GAN consists of two parts, a generator and a discriminator. The discriminator is a binary classifier that accepts a discrete sequence as input and outputs a probability indicating whether the input sequence is real data or data generated by the generator. Both the generator and the discriminator adopt the Transformer structure. Compared with LSTM, Transformer has a significant advantage in acquiring features of long sequences and is more conducive to capturing the transfer trajectory features of long sequences. The specific training method is as follows:
[0020] (a) Pre-training the discriminator: Randomly select some Geohash codes to form a sequence as negative samples, and real Geohash sequences as positive samples, and pre-train the discriminator.
[0021] (b) The objective function is optimized as follows:
[0022]
[0023] Among them, G θ The generator uses θ as the model parameter pair, D φ It is a discriminator with φ as the model parameter, x is the sample data, and p d This represents the distribution of real data.
[0024] (c) Data processing for the generator: Geohash codes are mapped to numbers between 1 and N, where N is the total number of Geohash codes, and each Geohash code corresponds to a number. To generate a sequence of length T, the generator performs T generation steps, each step representing an N-classification model, i.e., selecting one code from the N Geohash codes. Through T generation steps, a continuous sequence of length T can be generated.
[0025] (d) Adversarial Training: Adversarial training is conducted using real and generated data. In adversarial training, the discriminator's optimization objective is to minimize its error rate, i.e., to distinguish between real and generated Geohash access sequences as accurately as possible. The generator's optimization objective, on the other hand, is to maximize the discriminator's error rate, i.e., to generate as realistic data samples as possible, making it difficult for the discriminator to distinguish between real and generated data.
[0026] As a preferred technical solution of the present invention, the fine-grained trajectory generation stage based on driving intention in step (2) uses a machine learning model to predict the starting point. The specific prediction method is as follows:
[0027] (a) Feature construction: including information such as road attributes, historical trajectory information and traffic status;
[0028] (b) Train a machine learning model to predict the probability that each node is the starting point;
[0029] (c) Determine the start and end points of the generated trajectory based on the predicted probability;
[0030] (d) Prediction based on driving intent: Select the shortest path between the origin and destination, and dynamically update the travel time of each road based on the already generated vehicle trajectories.
[0031] As a preferred technical solution of the present invention, the generator of the GAN in step (1) is generated using a Transformer structure, and the discriminator of the GAN is pre-trained using random Geohash access sequences and real Geohash access sequences, and then adversarial training is performed using real data and generated data.
[0032] As a preferred technical solution of the present invention, the feature construction in the fine-grained trajectory generation method based on driving intention includes information such as road attributes, historical trajectory information and traffic status. Road attributes include road length, width, number of lanes, etc.; historical trajectory information includes the historical selection ratio of vehicle trajectories, etc.; and traffic status includes traffic flow, congestion, etc.
[0033] This invention discloses a two-stage fine-grained vehicle trajectory generation method, aiming to achieve refined modeling of vehicle behavior. It comprises two parts: region transfer trajectory generation based on Geohash and fine-grained trajectory generation based on driving intent. In the first stage, a GAN model is used to generate region transfer trajectories based on Geohash. Specifically, the road network is divided into Geohash grids, and continuous trajectories are generated between the grids. This GAN model can learn the transfer patterns between different regions on the training dataset and generate continuous trajectories. In the second stage, the most probable start and end positions in the generated Geohash regions are determined, followed by path prediction between road nodes. Specifically, a machine learning prediction model is used to predict the start and end points, and the start and end points of the generated trajectory are determined based on the predicted probabilities. After determining the start and end points, the shortest path is predicted based on driving intent to generate the final fine-grained trajectory. The advantage of this invention is that by using a two-stage generation method, considering both overall transfer patterns and individual driving behavior, it can achieve more refined modeling of individual behavior, thereby improving the accuracy and reliability of trajectory generation.
[0034] The advantages of the two-stage fine-grained trajectory generation technology disclosed in this invention are:
[0035] 1. By using a two-stage generation method that considers both the overall transfer pattern and individual driving behavior, more refined modeling of individual behavior can be achieved, thereby improving the accuracy and reliability of trajectory generation.
[0036] 2. Geohash encoding is used to leverage GAN networks as the basis for coarse-grained trajectory generation. A data-driven approach is adopted to learn the transfer trajectories between regions, which can better learn and capture the patterns and rules of vehicle movement. At the same time, it can effectively reduce the amount of data and computation, and improve the efficiency of trajectory generation.
[0037] 3. In the fine-grained trajectory generation process, changes in driving intention and road travel time are taken into account, making it closer to real-life path selection scenarios. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A schematic diagram of a two-stage fine-grained trajectory generation technique;
[0040] Figure 2 Flowchart for generating region transfer trajectories under Geohash;
[0041] Figure 3 Generate a flowchart for Geohash encoding;
[0042] Figure 4 Flowchart for generating fine-grained trajectories. Detailed Implementation
[0043] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0044] like Figure 1 As shown, the two-stage fine-grained trajectory generation method disclosed in this invention includes the following steps:
[0045] 1. Generation of region transfer trajectories under Geohash;
[0046] The process of generating region transfer trajectories under Geohash is as follows: Figure 2As shown. First, the vehicle trajectory is Geohash encoded to find the Geohash code corresponding to the vehicle's GPS coordinates. GeoHash is an algorithm used to encode geographic location information into a string; it converts latitude and longitude coordinates on the Earth's surface into a encoded string composed of numbers and letters. For example... Figure 3 As shown, its encoding process is as follows:
[0047] (a) GeoHash codes are calculated starting from a 0-1 string, beginning with the first bit.
[0048] (b) Divide the latitude range into two equal parts, left and right. If the latitude coordinate is in the left interval, the bit is 0; if it is in the right interval, the bit is 1.
[0049] (c) Set the range of the current interval to the interval that (b) falls into, and repeat the binary search steps to obtain the next bit.
[0050] (d) Perform the same operation on longitude, but the range of longitude is [-180, 180].
[0051] (e) Repeat the above steps until the required accuracy is achieved to obtain the final GeoHash code.
[0052] Using the Geohash method, each GPS coordinate reported by a vehicle can be mapped to a Geohash code, thus converting the original vehicle latitude and longitude sequence into a coarse-grained vehicle movement trajectory using Geohash.
[0053] Then, a GAN model is used to learn the transfer patterns between different regions, thereby generating continuous trajectories for transfers between Geohash regions. The GAN consists of a generator and a discriminator. The discriminator is a binary classifier that accepts a discrete sequence as input and outputs a probability indicating whether the input sequence is real data or data generated by the generator. Both the generator and discriminator employ a Transformer structure. Compared to LSTM, the Transformer has a significant advantage in capturing features of long sequences, making it more effective at capturing the transfer trajectory features of long sequences. The specific training method is as follows:
[0054] (a) Pre-training the discriminator: Randomly select some Geohash codes to form a sequence as negative samples, and real Geohash sequences as positive samples, and pre-train the discriminator.
[0055] (b) The objective function is optimized as follows:
[0056]
[0057] Among them, G θThe generator uses θ as the model parameter pair, D φ It is a discriminator with φ as the model parameter, x is the sample data, and p d This represents the distribution of real data.
[0058] (c) Data processing for the generator: Geohash codes are mapped to numbers between 1 and N, where N is the total number of Geohash codes, and each Geohash code corresponds to a number. To generate a sequence of length T, the generator performs T generation steps, each step representing an N-classification model, i.e., selecting one code from the N Geohash codes. Through T generation steps, a continuous sequence of length T can be generated.
[0059] (d) Adversarial Training: Adversarial training is conducted using real and generated data. In adversarial training, the discriminator's optimization objective is to minimize its error rate, i.e., to distinguish between real and generated Geohash access sequences as accurately as possible. The generator's optimization objective, on the other hand, is to maximize the discriminator's error rate, i.e., to generate as realistic data samples as possible, making it difficult for the discriminator to distinguish between real and generated data.
[0060] 2. Fine-grained trajectory generation;
[0061] Based on the generated Geohash region, the transfer trajectories within the region are determined, with the prediction granularity being the transfer trajectories between roads. The process is as follows: Figure 4 As shown. Specifically, it includes the following steps:
[0062] (a) Determine the starting and ending positions of the transfer trajectory.
[0063] First, the current region of the vehicle is determined based on Geohash encoding. Then, based on historical data within that region and the current vehicle status, a machine learning model is used to determine the starting and ending positions. The steps are as follows: First, feature construction is performed, which includes information such as road attributes, historical trajectory information, and traffic conditions. Road attributes include road length, width, and number of lanes; historical trajectory information includes the historical selection ratio of vehicle trajectories; and traffic conditions include traffic flow and congestion. The machine learning model uses a classification model, taking the features corresponding to the road as input and outputting the probability of selecting that road. The candidate set is determined by obtaining the probability of selecting each road as the starting point and then using the predicted probability to determine the starting point of the generated trajectory. For example, if the candidate set has roads A, B, and C with probabilities [0.1, 0.8, 0.1], a random floating-point number between 0 and 1 is generated. If the number is less than or equal to 0.1, road A is selected; if it is greater than 0.1 but less than or equal to 0.9, road B is selected; otherwise, road C is selected. Since regions are adjacent, the end point of one region is also the starting point of another region.
[0064] (b) Determination of the shortest path based on driving intent.
[0065] After determining the starting and ending points, the shortest path is predicted based on driving intent to generate the final fine-grained trajectory. Path prediction between road nodes is also based on driving intent prediction, selecting the shortest path between the starting and ending points and dynamically updating the travel time for each road according to the generated vehicle trajectories. Ultimately, a refined vehicle driving trajectory is generated through this two-stage process.
Claims
1. A two-stage generated fine-grained vehicle trajectory generation method, characterized in that, The method comprises the following steps: (1) generating a region transfer trajectory under Geohash: first, Geohash is performed on the vehicle trajectory, the Geohash code corresponding to the vehicle GPS coordinate is found, and thus the transfer trajectory of the vehicle under Geohash coarse granularity is obtained from the original data; then, the GAN model is used to learn the transfer rule between different regions, and thus the continuous trajectory of the transfer between Geohashes is generated; (2) generating a fine-grained trajectory based on driving intention: the transfer trajectory in the region is determined according to the generated Geohash region, and the predicted granularity is the transfer trajectory between roads, which comprises the following steps: (21) determining the starting / ending position of the transfer trajectory; (22) predicting the path between road nodes; The specific steps are as follows: (a) feature construction: including road attributes, historical trajectory information and traffic state information; (b) training a machine learning model to predict the probability of each node as a starting point; (c) determining the starting point and ending point of the generated trajectory according to the predicted probability; (d) prediction based on driving intention: selecting the shortest time path between the starting point and the ending point, and dynamically updating the road passing time through the trajectory of the vehicle that has been generated.
2. The two-stage generated fine-grained vehicle trajectory generation method according to claim 1, characterized in that, In step (1), the vehicle trajectory is Geohashed, the Geohash code corresponding to the vehicle GPS coordinate is found, and thus the transfer trajectory of the vehicle under Geohash coarse granularity is obtained from the original data, wherein the encoding process is as follows: (a) GeoHash code starts from a 0-1 string, and the first bit is started; (b) the latitude is halved and divided into two parts, and the current range is divided into left and right parts; if the coordinate latitude is in the left interval, the current bit is 0, and if the coordinate latitude is in the right interval, the current bit is 1; (c) the interval range is set to the interval in (b), and the next bit is obtained by repeating the halving step; (d) the same operation is performed on the longitude, but the longitude range is [-180, 180]; (e) repeat the above steps until the required accuracy is reached, and obtain the final GeoHash code; Through the method of Geohash, the GPS coordinate reported by the vehicle each time is mapped to a Geohash code, and thus the original vehicle latitude and longitude sequence is converted into the transfer trajectory of the vehicle under Geohash coarse granularity.
3. The two-stage generated fine-grained vehicle trajectory generation method according to claim 1, wherein, In step (1), the GAN model is used to learn the transfer rule between different regions, and thus the continuous trajectory of the transfer between Geohashes is generated, which specifically comprises: the GAN consists of a generator and a discriminator, the discriminator is a binary classifier, which accepts a discrete sequence as input and outputs a probability indicating whether the input sequence is real data or data generated by the generator, the generator and the discriminator both adopt the Transformer structure, which has obvious advantages in long sequence feature acquisition compared with LSTM, and is more conducive to capturing the transfer trajectory features of long sequences; the specific training method is as follows: (a) Pre-training the discriminator: randomly select some Geohash codes to form a sequence as negative samples, and the real Geohash sequence as positive samples, and pre-train the discriminator; (b) The optimization objective function is where G θ is a generator with θ as model parameters, D φ is a discriminator with φ as model parameters, x is sample data, p d represents the distribution of real data; (c) Data processing of the generator: map the Geohash code to a number between 1 and N, where N is the total number of Geohash codes, and each Geohash code corresponds to a number; for generating a sequence of length T, the generator is divided into T steps of generation, and each generation is a model of N classification, that is, selecting one code from N Geohash codes; through T steps of generation, a continuous sequence of length T can be generated; (d) Adversarial training: use real data and generated data for adversarial training; in adversarial training, the optimization objective of the discriminator is to minimize its error rate, that is, to accurately distinguish between real Geohash access sequences and generated Geohash access sequences as much as possible; while the optimization objective of the generator is to maximize the error rate of the discriminator, that is, to generate realistic data samples as much as possible, so that the discriminator cannot distinguish between real data and generated data.
4. The two-stage generated fine-grained vehicle trajectory generation method according to claim 1, characterized in that: The generator of the GAN in step (1) uses a Transformer structure for generation, and the discriminator of the GAN uses random Geohash access sequences and real Geohash access sequences for pre-training, and then uses real data and generated data for adversarial training.
5. The two-stage generated fine-grained vehicle trajectory generation method according to claim 3, characterized in that, The road attributes in the feature construction of step (a) include road length, width, and number of lanes, the historical trajectory information includes the historical selection proportion of vehicle trajectories, and the traffic state includes traffic volume and congestion.
Citation Information
Patent Citations
Vehicle track prediction model construction method and vehicle track prediction method and system
CN112037506A
Intelligent vehicle trajectory prediction method based on environmental sensitivity
CN112396164A