Blind zone track generation method, device and system
By using target generators and matchers in the generative adversarial network, the problem of low accuracy of vehicle ID matching is solved, and more accurate blind spot trajectory generation and vehicle matching are achieved, improving processing efficiency.
Patent Information
- Application Number
- CN202410933737.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-05
AI Technical Summary
In the prior art, the accuracy of vehicle ID matching is low, resulting in low accuracy of blind spot trajectory generation.
The target generator and target matcher in the generative adversarial network are adopted to randomly match the vehicle trajectory, predict and generate blind spot trajectories, and use the correlation matrix to perform trajectory matching to improve the accuracy of vehicle matching.
Improve the accuracy and processing efficiency of vehicle matching, and achieve more accurate blind spot trajectory generation.
Smart Images

Figure CN118897273A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent transportation technology, and in particular relates to a blind spot trajectory generation method, device and system. Background Art
[0002] In the field of intelligent transportation system technology, radar and video are commonly used data collection methods, especially millimeter wave radar, which has become the mainstream choice for holographic perception roadside sensors due to its high accuracy in measuring distance and speed, and its characteristics of not being affected by weather conditions. In order to reduce the deployment cost of radar, radars are usually arranged sparsely on the road, but this will result in monitoring blind spots between adjacent radars, and the driving trajectory in the monitoring blind spots cannot be obtained.
[0003] In the related art, the vehicle IDs of vehicles monitored by the radar located upstream of the road and the radar located downstream of the road are first matched, and then the trajectory is reconstructed to complete the driving trajectory of the blind spot monitored between the upstream radar and the downstream radar. However, the accuracy of vehicle ID matching in this way is low, which makes the accuracy of blind spot trajectory generation low. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method for generating a blind spot trajectory, aiming to solve the problem in the prior art that the accuracy of vehicle ID matching is low, resulting in low accuracy of blind spot trajectory generation.
[0005] The embodiment of the present application is implemented as follows: a method for generating a blind spot trajectory, the method comprising:
[0006] A driving trajectory of a vehicle is obtained, wherein the driving trajectory includes a plurality of upstream trajectories and a plurality of downstream trajectories; any upstream trajectory is randomly paired with any downstream trajectory to obtain a trajectory pairing set including a plurality of random trajectory pairs; the random trajectory pair is input into a target generator of a generative adversarial network to obtain a blind spot trajectory of the random trajectory pair, wherein the set of blind spot trajectories constitutes a predicted trajectory set, wherein the target generator is used to predict a missing trajectory of a middle blind spot based on the upstream trajectory and the downstream trajectory in the input trajectory pair; the trajectory pairing set and the predicted trajectory set are input into a target matcher of the generative adversarial network to obtain a target trajectory pair, wherein the target matcher is used to filter out the random trajectory pair whose upstream trajectory and downstream trajectory are derived from the same vehicle from the trajectory pairing set; and the blind spot trajectory of the vehicle is obtained from the predicted trajectory set based on the target trajectory pair.
[0007] As a further solution of the present application, the method of inputting the trajectory pairing set and the predicted trajectory set into a target matcher to obtain a target trajectory pair includes:
[0008] Inputting the trajectory pairing set and the predicted trajectory set into a target matcher, obtaining the correlation between the upstream trajectory and the downstream trajectory of each group of the random trajectory pairs originating from the same vehicle, and forming a first correlation matrix;
[0009] The upstream trajectories and the downstream trajectories in the trajectory pairing set are organized into a bipartite graph, and the bipartite graph is solved based on the first association matrix to obtain a target trajectory pair.
[0010] As a further solution of the present application, the training method of the generative adversarial network comprises the following steps:
[0011] Step S210: training an initial generator and an initial matcher of the generative adversarial network, wherein the initial generator and the initial matcher share the same first loss, which is composed of a generator loss and a matcher loss;
[0012] Step S220: training the initial discriminator in the generative adversarial network k times;
[0013] Step S230: Repeat steps S210 to S220 until a preset number of cycles is reached.
[0014] As a further solution of the present application, the generator loss is calculated using a generator loss function, which consists of two parts: an adversarial loss function and a mean square error function. The adversarial loss function is used to maximize the probability that the generated trajectory is identified as a true trajectory by the discriminator, and the mean square error function is used to quantify the difference between the trajectory generated by the generator and the actual trajectory.
[0015] As a further solution of the present application, the method for obtaining the matcher loss includes the following steps:
[0016] Sampling multiple groups of upstream trajectories and downstream trajectories originating from the same vehicle, randomly pairing any upstream trajectory with any downstream trajectory, and obtaining a sample pairing set containing several sample trajectory pairs;
[0017] Inputting the sample trajectory pairs into an initial generator of a generative adversarial network to obtain a second intermediate trajectory for each group of the sample trajectory pairs;
[0018] Input the sample trajectory pairs and the corresponding second intermediate trajectories into the initial matcher, generate the correlation between the upstream trajectory and the downstream trajectory of each group of sample trajectory pairs, and form a second correlation matrix;
[0019] Organizing the upstream and downstream trajectories obtained by sampling into a bipartite graph form, solving the bipartite graph based on the second correlation matrix, and obtaining a result trajectory pair;
[0020] According to the result track pair, an unpaired upstream track is obtained, and based on the second association matrix, the association between the unpaired upstream track and all sample downstream tracks is obtained to form a third association matrix;
[0021] The third correlation matrix is substituted into the matcher loss function for calculation to obtain the matcher loss.
[0022] As a further solution of the present application, a method of inputting the random trajectory pair into a target generator in a generative adversarial network includes:
[0023] All the acquired upstream trajectories are sorted in order according to the capture order, and all the acquired downstream trajectories are sorted in order according to the capture order;
[0024] When the absolute value of the rank difference between the upstream trajectory and the downstream trajectory is less than a first threshold, the upstream trajectory and the downstream trajectory are input into a target generator in a generative adversarial network.
[0025] As a further solution of the present application, the method for obtaining the driving trajectory of the vehicle includes:
[0026] Acquire multiple location information of the vehicle, wherein the location information includes time and coordinate information at the corresponding time;
[0027] The radar capture area is divided into equal intervals to obtain the time when the vehicle arrives at each division point;
[0028] The time of adjacent segmentation points is subtracted to obtain the travel time of the vehicle on each road of equal length. The driving trajectory includes a sequence of the travel time of the vehicle in the radar capture area.
[0029] As a further solution of the present application, the coordinate information includes lane information, and the lane deviation of the vehicle on each equal-length road is calculated through the lane information of adjacent segmentation points. The driving trajectory also includes a sequence of lane deviations of the vehicle within the radar capture area.
[0030] Another object of an embodiment of the present application is to provide a blind spot trajectory generating device, the device comprising:
[0031] A trajectory acquisition module, used to acquire a driving trajectory of a vehicle, wherein the driving trajectory includes a plurality of upstream trajectories and a plurality of downstream trajectories;
[0032] A trajectory pairing module, used for randomly pairing any upstream trajectory with any downstream trajectory to obtain a trajectory pairing set containing a number of random trajectory pairs;
[0033] A trajectory generation module, used for inputting the random trajectory pair into the target generator of the generative adversarial network to obtain the blind area trajectory of the random trajectory pair, wherein the set of the blind area trajectories constitutes a predicted trajectory set, and the target generator is used for predicting the missing trajectory of the middle blind area part based on the upstream trajectory and the downstream trajectory in the input trajectory pair;
[0034] A trajectory matching module, used for inputting the trajectory pairing set and the predicted trajectory set into the target matcher of the generative adversarial network to obtain a target trajectory pair, wherein the target matcher is used for screening out the random trajectory in which the upstream trajectory and the downstream trajectory originate from the same vehicle from the trajectory pairing set;
[0035] The trajectory extraction module is used to obtain the blind spot trajectory of the vehicle from the first predicted trajectory set based on the target trajectory pair.
[0036] Another object of an embodiment of the present application is to provide a blind spot trajectory generation system, which, when running, executes the steps of any of the blind spot trajectory generation methods described above.
[0037] The beneficial effects of the present application are as follows: a blind spot trajectory generation method of the present application adds a matcher to a generative adversarial network, uses a trained target generator in the generative adversarial network to first generate all blind spot trajectories, and then uses the generated blind spot tracks as one of the judgment conditions of the target matcher to perform vehicle trajectory matching, which can improve the accuracy of vehicle matching. The target generator generates the blind spots of all possible random trajectory pairs, and then uses them as the judgment conditions of the target matcher, which can be based on the global optimal perspective, and the vehicle matching results obtained are more accurate. In addition, the target generator and the target matcher are combined together to realize the simultaneous generation and matching of trajectories, thereby improving processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flowchart of a blind spot trajectory generation method provided in an embodiment of the present application;
[0039] Figure 2 A flowchart of a method for obtaining a vehicle's driving trajectory provided in an embodiment of the present application;
[0040] Figure 3 A flowchart of a method for inputting a random trajectory pair into a target generator in a generative adversarial network provided in an embodiment of the present application;
[0041] Figure 4 A flowchart of a method for inputting the trajectory pairing set and the predicted trajectory set into a target matcher to obtain a target trajectory pair provided in an embodiment of the present application;
[0042] Figure 5A flowchart of a training method for a generative adversarial network provided in an embodiment of the present application;
[0043] Figure 6 A flowchart of a method for obtaining a matcher loss provided in an embodiment of the present application;
[0044] Figure 7 This is a structural block diagram of a blind spot trajectory generation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0046] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0047] Figure 1 FIG. 1 is a flow chart of a method for generating a blind spot trajectory according to an embodiment of the present invention. Figure 1 As shown, a method for generating a blind spot trajectory includes:
[0048] Step S110: Acquire a driving trajectory of the vehicle, where the driving trajectory includes a plurality of upstream trajectories and a plurality of downstream trajectories;
[0049] In this step, millimeter-wave radar can be used to capture the vehicle's driving trajectory. It can be understood that millimeter-wave radars are set at intervals on the driving road to capture the trajectory of the driving vehicle. Along the driving direction, the driving trajectory captured by the millimeter-wave radar located upstream of the road is the upstream trajectory, and the driving trajectory captured by the millimeter-wave radar located downstream of the road is the downstream trajectory. Millimeter-wave radar has high accuracy in measuring distance and speed, and is not affected by weather conditions, so it can adapt to various environments.
[0050] like Figure 2 As shown, in some embodiments, the method for obtaining the driving trajectory of a vehicle includes:
[0051] Step S111: Acquire multiple location information of the vehicle, where the location information includes time and coordinate information corresponding to the time;
[0052] Specifically, the upstream radar and the downstream radar each capture the data of the driving trajectories of N vehicles. These data are stored in the form of an ordered time series, specifically as a tuple of the upstream trajectory observed by the upstream radar and a tuple of downstream trajectories observed by the downstream radar Each tuple contains the number of times vehicle i was at a specific time T i The vertical position Y i and lateral position X i , covering all time steps that a vehicle has gone through from the time it enters the monitoring area until it leaves.
[0053] Step S112: dividing the radar capture area into equal intervals to obtain the time when the vehicle arrives at each division point;
[0054] The monitoring area of the millimeter-wave radar is divided into equidistant areas, and the time when the vehicle arrives at each division point is obtained by linear interpolation. The process can be specifically expressed as follows:
[0055]
[0056] in, Represents a linear interpolation function that can effectively estimate the vehicle i at any given point Arrival time Even if the point does not appear in the original observation data, δ is set to a fixed value.
[0057] Step S113: subtract the time of adjacent segmentation points to obtain the travel time of the vehicle on each road of equal length. The driving trajectory includes a sequence of the travel time of the vehicle in the radar capture area.
[0058] It can be understood that using a sequence of travel times to represent the driving trajectory of a vehicle simplifies complex driving trajectory data.
[0059] In some embodiments, the coordinate information includes lane information, and the lane offset of the vehicle on each equal-length road is calculated through the lane information of adjacent segmentation points. The driving trajectory also includes a sequence of lane offsets of the vehicle in the radar capture area. It can be understood that adding the lane information of the vehicle to the driving trajectory as conditional information for the target generator to generate the blind spot trajectory and conditional information for the matcher to match the upstream trajectory with the downstream trajectory can make the blind spot trajectory generated by the generator closer to the real trajectory and improve the matching accuracy of the target matcher.
[0060] Step S120, randomly pairing any upstream trajectory with any downstream trajectory to obtain a trajectory pairing set including a plurality of random trajectory pairs;
[0061] The driving trajectory is constructed as a bipartite graph M. The driving trajectory is abstracted as the vertex of the bipartite graph, and the set of upstream trajectories i and the set of downstream trajectories j Two vertex sets that form a bipartite graph, random trajectories M ij The set of M constitutes the edge set of the bipartite graph. ij Integrates the feature set of upstream trajectory i and downstream trajectory j, as well as the blind travel time d calculated between the two ij ,Right now:
[0062]
[0063] in, and Represent the travel time sequences of upstream trajectory i and downstream trajectory j, and is the sequence of the corresponding lane offsets; d ij is the calculated travel time of the vehicle crossing the blind spot. ij Corresponding to a D ij , which is only true when the upstream trajectory i and the downstream trajectory j belong to the same vehicle, that is, when j = J GT (i) indicates the sequence of the actual travel time of the vehicle in the blind spot, otherwise its value is a sequence of all zeros.
[0064] Step S130, inputting the random trajectory pair into the target generator of the generative adversarial network to obtain the blind area trajectory of the random trajectory pair, the set of blind area trajectories constitutes a predicted trajectory set, and the target generator is used to predict the missing trajectory of the middle blind area part based on the upstream trajectory and the downstream trajectory in the input trajectory pair;
[0065] Generative adversarial network is a deep learning model, which usually includes two sub-networks, namely generator and discriminator. The present invention adds a matcher on the basis of generative adversarial network, and the matcher adopts a fully connected network. By training the initial generator, initial discriminator and initial matcher of the generative adversarial network, the target generator and target matcher are obtained, and the discriminator is only needed in the training process and is not needed in the end.
[0066] The process of the generator generating blind area trajectories can be expressed as:
[0067]
[0068] in, represents the blind spot trajectory, which is essentially a sequence of estimated blind spot travel times. represents the generator function, Z represents random noise, M ij represents a random trajectory pair, j = J GT(i) Indicates that the upstream trajectory and the downstream trajectory originate from the same vehicle.
[0069] It should be noted that the blind area between the upstream radar and the downstream radar is divided into equal lengths, and the generator generates a sequence of the vehicle's travel time on each equal length road. Sequence through travel time The time when the target vehicle arrives at each road segmentation point in the blind spot can be known, so the blind spot trajectory of the vehicle can be obtained.
[0070] like Figure 3 As shown, in some embodiments, a method of inputting a random trajectory pair into a target generator in a generative adversarial network includes:
[0071] S131: sorting all the acquired upstream trajectories according to the capture order, and sorting all the acquired downstream trajectories according to the capture order;
[0072] S132: When the absolute value of the rank difference between the upstream trajectory and the downstream trajectory is less than a first threshold, the upstream trajectory and the downstream trajectory are input into a target generator in a generative adversarial network.
[0073] It is understandable that the speed of the vehicle on the road should be within a reasonable range, not too high or too low. In this case, the position change of the vehicle entering and exiting the blind spot will not be particularly large, and there will always be an upper limit. The upstream and downstream trajectories with too large a position difference are unlikely to originate from the same vehicle. Excluding them can effectively reduce the workload of the target generator and improve efficiency. It should be noted that the method of excluding unreasonable random trajectory pairs can also be used in the training of the generative adversarial network of the present invention to improve training efficiency.
[0074] Step S140, inputting the trajectory pairing set and the predicted trajectory set into the target matcher of the generative adversarial network to obtain a target trajectory pair, and the target matcher is used to screen out a random trajectory pair whose upstream trajectory and downstream trajectory originate from the same vehicle from the trajectory pairing set;
[0075] like Figure 4 As shown, in some embodiments, step S140 may specifically include the following steps:
[0076] Step S141, inputting the trajectory pairing set and the predicted trajectory set into the target matcher, obtaining the correlation between the upstream trajectory and the downstream trajectory of each group of random trajectory pairs originating from the same vehicle, and forming a first correlation matrix;
[0077] The travel time series of the blind area generated by the generator (blind area trajectory), random trajectory to M ij Input matcher, with M ijAs conditional information, obtain the association degree C between the upstream trajectory i and the downstream trajectory j belonging to the same vehicle ij , the process can be expressed as:
[0078]
[0079] Among them, C ij represents calculating the association degree between the upstream trajectory i and the downstream trajectory j belonging to the same vehicle, represents the discriminator function, and w is the set first threshold. It should be noted that the target generator only generates a sequence of blind spot travel times of the upstream trajectory i and the downstream trajectory j with a reasonable difference in positions that is, i - w < j < i + w. Then, the matcher takes as the input, and the generated C ij belonging to i - w < j < i + w is understandable. In this way, the workload of the target matcher is also reduced.
[0080] Form the association degree C generated by the matcher ij into an n×n first association degree matrix C. Each element in the first association degree matrix C represents the association degree between the upstream trajectory i and the downstream trajectory j, that is:
[0081]
[0082] It should be noted that the C ij generated by the matcher belongs to i - w < j < i + w, and the association degree between the upstream trajectory i and the downstream trajectory j outside the range is recorded as -∞.
[0083] Step S142, organize the upstream and downstream trajectories in the trajectory pairing set into the form of a bipartite graph, solve the bipartite graph based on the first association degree matrix, and obtain the target trajectory pairs;
[0084] Organize the upstream and downstream trajectories in the trajectory pairing set into the form of a bipartite graph. In this way, the vehicle matching problem can be transformed into a maximum bipartite graph matching problem, which is convenient for solving. The objective function of this maximum bipartite graph matching problem is as follows:
[0085]
[0086]
[0087] A represents the obtained target trajectory pairs, that is, the corresponding relationship of vehicle identities; C ij represents the association degree between the upstream trajectory i and the downstream trajectory j; x ij is a binary variable, and its value range is 0 or 1. If the upstream trajectory i and the downstream trajectory j are confirmed to originate from the same vehicle, then x ijThe value is 1, otherwise it is 0.
[0088] The correlation matrix C is used as input, the objective function of the maximum bipartite graph matching problem is used as the optimization function, and the KM algorithm is used to solve the bipartite graph to obtain the optimal matching solution A. * , which is the most reasonable target trajectory pair considered by the model. The KM algorithm is an existing mature algorithm and will not be described in detail here.
[0089] Step S150, obtaining the blind spot trajectory of the vehicle from the predicted trajectory set based on the target trajectory pair.
[0090] The target generator has generated the blind spot trajectories of all reasonable random trajectory pairs before the target matcher performs vehicle matching. After the target matcher completes vehicle matching, the blind spot trajectories corresponding to the upstream and downstream trajectories from the same vehicle can be directly selected according to the target trajectory pairs. It can be understood that the target generator generates the blind spot trajectory first, and uses the blind spot trajectory as one of the judgment conditions for the target matcher to perform vehicle matching, which can improve the matching accuracy.
[0091] It can be understood that the present application adds a matcher to the generative pair network, and uses the trained target generator of the generative adversarial network to first generate blind spot trajectories for all possible random trajectory pairs, and then uses the blind spot trajectory generated by the target generator as one of the conditions for the target matcher to perform vehicle matching, so as to improve the success rate of vehicle matching; in addition, the vehicle matching problem is converted into a maximum bipartite graph matching problem, and the matcher is used to obtain the first correlation matrix of the random trajectory pairs, and the KM algorithm is used to solve the target trajectory pair based on the first correlation matrix, that is, the final vehicle matching solution. In this way, a simple method for vehicle matching is provided, and the target generator generates the blind spots of all possible random trajectory pairs, and then uses them as the judgment condition of the target matcher, which can solve the maximum bipartite graph matching problem based on the global optimal perspective, and the obtained vehicle matching result is more accurate. In addition, the generator and the matcher are combined together to realize the simultaneous generation and matching of trajectories, thereby improving processing efficiency.
[0092] like Figure 5 As shown, in some embodiments, the training method of generating an adversarial network includes the following steps:
[0093] Step S210: training an initial generator and an initial matcher of the generative adversarial network, wherein the initial generator and the initial matcher share the same first loss, which is composed of the generator loss and the matcher loss;
[0094] Specifically, each time the initial generator and the initial matcher are trained, the parameters of the initial generator and the initial matcher are updated, and the next training is based on the initial generator and the initial matcher with the updated parameters. It can be understood that the initial generator and the initial matcher share the same first loss, and the matching results of the initial matcher can also be fed back to the intermediate trajectory generation link of the initial generator to further optimize the details of the intermediate trajectory, forming a virtuous cycle of iterative improvement to achieve coordinated optimization between each other. The first loss is calculated by the first loss function, and the calculation formula of the first loss function is as follows:
[0095]
[0096] in, is the first loss function, is the generator loss function, is the matcher loss function.
[0097] Specifically, a batch of upstream trajectories and downstream trajectories are sampled from the sample set and organized into a bipartite graph. A batch of random noise samples are sampled from the normal distribution. Based on the upstream and downstream trajectories of the same vehicle in the bipartite graph and the random noise, the initial generator is used to generate the intermediate trajectory of the blind spot, and the generator loss is calculated according to the generator loss function, where the generator loss function is:
[0098]
[0099] in, is the generator loss function, is the sequence of estimated blind spot travel time (generated blind spot trajectory), D ij is the sequence of actual blind spot travel time (the actual trajectory of the vehicle in the blind spot), represents the discriminator function, j = J GT (i) indicates that the upstream trajectory i and the upstream trajectory j belong to the same vehicle, M ij is a random trajectory pair, represents the discriminator function, Represents expectations.
[0100] In some embodiments, the generator loss is calculated using a generator loss function, which consists of two parts: an adversarial loss function and a mean square error function. The adversarial loss function is used to maximize the probability that the generated trajectory is identified as a true trajectory by the discriminator, and the mean square error function is used to quantify the difference between the trajectory generated by the generator and the actual trajectory.
[0101] It is understandable that the quality of the generated intermediate trajectory plays a decisive role in the matching accuracy of the subsequent initial matcher, because accurate trajectory description is the basis for accurate vehicle identification. The initial generator and the initial matcher share the same first loss, and the matching results of the initial matcher can also be fed back to the intermediate trajectory generation link of the initial generator to further optimize the trajectory details, forming a virtuous cycle of iterative improvement and improving training effect and training speed.
[0102] like Figure 6 As shown, in one embodiment, the method for obtaining the matcher loss includes the following steps:
[0103] Step 211: sampling and obtaining multiple groups of upstream trajectories and downstream trajectories originating from the same vehicle, and randomly pairing any upstream trajectory with any downstream trajectory to obtain a sample pairing set including a plurality of sample trajectory pairs;
[0104] Step 212: input the sample trajectory pairs into the initial generator of the generative adversarial network to obtain the second intermediate trajectory of each group of sample trajectory pairs;
[0105] Step 213: input the sample trajectory pairs and the corresponding second intermediate trajectories into the initial matcher, generate the correlation between the upstream trajectory and the downstream trajectory of each group of sample trajectory pairs, and form a second correlation matrix;
[0106] Step 214: Organize the upstream and downstream trajectories obtained by sampling into a bipartite graph, solve the bipartite graph based on the second correlation matrix, and obtain a result trajectory pair;
[0107] Step 216: Based on the result track pair, obtain the unpaired upstream track, and based on the second correlation matrix, obtain the correlation between the unpaired upstream track and all sample downstream tracks to form a third correlation matrix;
[0108] According to the result trajectory pairs, find out m upstream trajectories that failed to match successfully. These upstream trajectories failed to find the corresponding correct downstream trajectories under the current model decision. For these m unmatched upstream trajectories, extract the corresponding m rows of data from the complete n×n second association matrix, and retain the association information of all n columns of downstream trajectories, so as to construct an m×n third association matrix C', that is:
[0109]
[0110] Step 216: Substitute the third correlation matrix into the matcher loss function for calculation to obtain the matcher loss.
[0111] The above m×n third correlation matrix is combined with the actual pairing information and calculated through the matcher loss function. The matcher loss function adopts the cross entropy loss function, that is:
[0112]
[0113] Among them, if Y j =1 indicates that the downstream trajectory j and the upstream trajectory i originate from the same vehicle, otherwise its value is 0.
[0114] It is understandable that after the matcher is introduced into the generative adversarial network, the present invention provides a training method for the matcher, and gives a matcher loss function and its specific solution method. The discriminator loss is solved by the correlation between the unsuccessfully matched upstream track and all downstream tracks, and the discriminator loss is used as one of the conditions to update the parameters of the initial discriminator and the initial generator, thereby improving the success rate of vehicle matching and improving the training effect.
[0115] Step S220: training the initial discriminator in the generative adversarial network k times;
[0116] Specifically, each time the initial discriminator is trained, the parameters of the initial discriminator are updated, and the next training is based on the initial discriminator with updated parameters. It can be understood that the strength of the discriminator's ability lies in whether it can identify the intermediate trajectory generated by the generator and judge it as false, and the strength of the generator's ability lies in whether it can generate realistic intermediate trajectories, deceive the discriminator, and let the discriminator judge the intermediate trajectory it generates as true. If the capabilities of the generator and the discriminator differ too much, it will lead to poor training results. Therefore, the present invention trains the initial generator and the initial matcher once, and then trains the initial discriminator k times, which can balance the capabilities of the initial discriminator and the initial matcher and improve the training effect.
[0117] In some embodiments, the k value can be set according to the recognition degree of the initial discriminator to the intermediate trajectory generated by the initial generator, and can be adjusted at any time during the training process.
[0118] Specifically, a driving trajectory sample is obtained from the sample set, and the initial generator is used to generate the intermediate trajectory of the blind spot. The initial discriminator of the generative adversarial network is used to discriminate and score the intermediate trajectory generated by the initial generator and the real trajectory, respectively, to obtain the real trajectory score and the predicted trajectory score. Based on the real trajectory score and the predicted trajectory score, the discriminator loss is calculated through the discriminator loss function, and the parameters of the initial discriminator are updated through the discriminator loss to complete a training of the discriminator. Specifically, the discriminator loss function is;
[0119]
[0120] in, is the discriminator loss function, represents the estimated blind zone travel time series, represents the generator function, j = J GT (i) indicates that the upstream trajectory i and the upstream trajectory j do belong to the same vehicle, M ij is a random trajectory pair, represents the discriminator function, represents the expectation, and Z is random noise. The loss function of the discriminator is It consists of two parts, aiming to optimize the initial discriminator's ability to distinguish between real and generated trajectories. Specifically, the first part of the discriminator loss function focuses on maximizing the score given by the initial discriminator to the real trajectories, while the second part focuses on minimizing the score given by the initial discriminator to the generated trajectories.
[0121] Step S230: Repeat steps S210 to S220 until a preset number of cycles is reached.
[0122] Specifically, the number of training cycles and the number of times k that the discriminator needs to be trained each time the generator is trained are set during initialization.
[0123] Figure 6 A structural block diagram of a blind track generation device provided by an embodiment of the present invention, such as Figure 6 As shown, a blind spot trajectory generating device, the system includes:
[0124] The trajectory acquisition module 100 is used to acquire the system driving trajectory of the vehicle, and the driving trajectory includes a plurality of upstream trajectories and a plurality of downstream trajectories;
[0125] A track pairing module 200 is used to randomly pair any upstream track with any downstream track to obtain a track pairing set including a plurality of random track pairs;
[0126] A trajectory generation module 300 is used to input a random trajectory pair into a target generator of a generative adversarial network to obtain a blind area trajectory of the random trajectory pair. The set of blind area trajectories constitutes a predicted trajectory set. The target generator is used to predict the missing trajectory of the middle blind area based on the upstream trajectory and the downstream trajectory in the input trajectory pair.
[0127] A trajectory matching module 400 is used to input the trajectory pairing set and the predicted trajectory set into a target matcher of a generative adversarial network to obtain a target trajectory pair, and the target matcher is used to filter out random trajectories whose upstream and downstream trajectories are derived from the same vehicle from the trajectory pairing set;
[0128] The trajectory extraction module 500 is used to obtain the blind spot trajectory of the vehicle from the first predicted trajectory set based on the target trajectory pair.
[0129] The process of each module of the blind track generating device realizing its own function may be specifically referred to the description of the aforementioned embodiment, which will not be repeated here.
[0130] It can be understood that the target generator of the trained generative adversarial network is first used to generate all possible random trajectories for blind spot trajectories, and the blind spot trajectory generated by the target generator is used as one of the conditions for the target matcher to match the vehicle, so as to improve the success rate of vehicle matching; in addition, the generator and the matcher are combined together to achieve the simultaneous generation and matching of trajectories, thereby improving processing efficiency.
[0131] An embodiment of the present invention also provides a blind spot trajectory generation system, and when the system is running, the system executes the steps of the blind spot trajectory generation method as described above.
[0132] The above embodiment provides a blind spot trajectory generation system, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.
[0133] The target generator of the trained generative adversarial network is used to first generate all possible random trajectories for blind spot trajectories. The blind spot trajectory generated by the target generator is used as one of the conditions for the target matcher to match the vehicle, so as to improve the success rate of vehicle matching. In addition, the generator and the matcher are combined together to achieve the simultaneous generation and matching of trajectories, thereby improving processing efficiency.
[0134] It should be understood that, although each step in the flow chart of each embodiment of the present application is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is clear explanation in this article, the execution of these steps does not have strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0136] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating a blind spot trajectory, characterized in that: The method comprises: Acquire a driving trajectory of a vehicle, wherein the driving trajectory includes a plurality of upstream trajectories and a plurality of downstream trajectories; Randomly pair any upstream trajectory with any downstream trajectory to obtain a trajectory pairing set containing a number of random trajectory pairs; Inputting the random trajectory pair into the target generator of the generative adversarial network to obtain the blind area trajectory of the random trajectory pair, wherein the set of the blind area trajectories constitutes a predicted trajectory set, and the target generator is used to predict the missing trajectory of the middle blind area part based on the upstream trajectory and the downstream trajectory in the input trajectory pair; Inputting the trajectory pairing set and the predicted trajectory set into the target matcher of the generative adversarial network to obtain a target trajectory pair, wherein the target matcher is used to filter out the random trajectory pair in which the upstream trajectory and the downstream trajectory originate from the same vehicle from the trajectory pairing set; The blind spot trajectory of the vehicle is obtained from the predicted trajectory set based on the target trajectory pair.
2. The blind spot trajectory generation method according to claim 1, characterized in that: The method of inputting the trajectory pairing set and the predicted trajectory set into a target matcher to obtain a target trajectory pair includes: Inputting the trajectory pairing set and the predicted trajectory set into a target matcher, obtaining the correlation between the upstream trajectory and the downstream trajectory of each group of the random trajectory pairs originating from the same vehicle, and forming a first correlation matrix; The upstream trajectories and the downstream trajectories in the trajectory pairing set are organized into a bipartite graph, and the bipartite graph is solved based on the first association matrix to obtain a target trajectory pair.
3. The method for generating a blind spot trajectory according to claim 1, characterized in that: The training method of the generative adversarial network comprises the following steps: Step S210: training an initial generator and an initial matcher of the generative adversarial network, wherein the initial generator and the initial matcher share the same first loss, which is composed of a generator loss and a matcher loss; Step S220: training the initial discriminator in the generative adversarial network k times; Step S230: Repeat steps S210 to S220 until a preset number of cycles is reached.
4. A blind spot trajectory generation method according to claim 3, characterized in that: The generator loss is calculated using a generator loss function, which consists of an adversarial loss function and a mean square error function. The adversarial loss function is used to maximize the probability that the generated trajectory is identified as a true trajectory by the discriminator, and the mean square error function is used to quantify the difference between the trajectory generated by the generator and the actual trajectory.
5. The method for generating a blind spot trajectory according to claim 3, characterized in that: The method for obtaining the matcher loss comprises the following steps: Sampling multiple groups of upstream trajectories and downstream trajectories originating from the same vehicle, randomly pairing any upstream trajectory with any downstream trajectory, and obtaining a sample pairing set containing several sample trajectory pairs; Inputting the sample trajectory pairs into an initial generator of a generative adversarial network to obtain a second intermediate trajectory for each group of the sample trajectory pairs; Input the sample trajectory pairs and the corresponding second intermediate trajectories into the initial matcher, generate the correlation between the upstream trajectory and the downstream trajectory of each group of sample trajectory pairs, and form a second correlation matrix; Organizing the upstream and downstream trajectories obtained by sampling into a bipartite graph form, solving the bipartite graph based on the second correlation matrix, and obtaining a result trajectory pair; According to the result track pair, an unpaired upstream track is obtained, and based on the second association matrix, the association between the unpaired upstream track and all sample downstream tracks is obtained to form a third association matrix; The third correlation matrix is substituted into the matcher loss function for calculation to obtain the matcher loss.
6. The blind spot trajectory generation method according to claim 1, characterized in that: The method of inputting the random trajectory pair into a target generator in a generative adversarial network comprises: All the acquired upstream trajectories are sorted in order according to the capture order, and all the acquired downstream trajectories are sorted in order according to the capture order; When the absolute value of the rank difference between the upstream trajectory and the downstream trajectory is less than a first threshold, the upstream trajectory and the downstream trajectory are input into a target generator in a generative adversarial network.
7. The blind spot trajectory generation method according to claim 1, characterized in that: Methods for obtaining the vehicle's driving trajectory include: Acquire multiple location information of the vehicle, wherein the location information includes time and coordinate information at the corresponding time; The radar capture area is divided into equal intervals to obtain the time when the vehicle arrives at each division point; The time of adjacent segmentation points is subtracted to obtain the travel time of the vehicle on each road of equal length. The driving trajectory includes a sequence of the travel time of the vehicle in the radar capture area.
8. The blind spot trajectory generation method according to claim 6, characterized in that: The coordinate information includes lane information, and the lane deviation of the vehicle on each equal-length road is calculated through the lane information of adjacent segmentation points. The driving trajectory also includes a sequence of lane deviations of the vehicle in the radar capture area.
9. A blind spot trajectory generating device, characterized in that: The device comprises: A trajectory acquisition module, used to acquire a driving trajectory of a vehicle, wherein the driving trajectory includes a plurality of upstream trajectories and a plurality of downstream trajectories; A trajectory pairing module, used for randomly pairing any upstream trajectory with any downstream trajectory to obtain a trajectory pairing set containing a number of random trajectory pairs; A trajectory generation module, used for inputting the random trajectory pair into the target generator of the generative adversarial network to obtain the blind area trajectory of the random trajectory pair, wherein the set of the blind area trajectories constitutes a predicted trajectory set, and the target generator is used for predicting the missing trajectory of the middle blind area part based on the upstream trajectory and the downstream trajectory in the input trajectory pair; A trajectory matching module, used for inputting the trajectory pairing set and the predicted trajectory set into the target matcher of the generative adversarial network to obtain a target trajectory pair, wherein the target matcher is used for screening out the random trajectory in which the upstream trajectory and the downstream trajectory originate from the same vehicle from the trajectory pairing set; The trajectory extraction module is used to obtain the blind spot trajectory of the vehicle from the predicted trajectory set based on the target trajectory pair.
10. A blind spot trajectory generation system, characterized in that: When the system is running, the steps of the blind spot trajectory generation method according to any one of claims 1 to 8 are executed.
