Test scene vehicle behavior generation method based on text sequence generation model

By designing a trajectory discretization feature vocabulary and BART model optimization, the problem of insufficient rationality of vehicle behavior trajectories in traditional methods is solved, diversified vehicle behavior trajectory generation is achieved, and the reliability and effectiveness of intelligent connected vehicle testing are improved.

CN120688451APending Publication Date: 2025-09-23TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510835917.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Traditional test scenario generation methods are difficult to generate realistic and reasonable vehicle behavior trajectories, resulting in insufficient reliability and effectiveness of test results.

Method used

By designing a reasonable trajectory discretization feature vocabulary, continuous vehicle trajectory data is converted into a discrete Token sequence. The BART model is used for learning and parameter optimization to construct a training corpus and generate diverse vehicle behavior trajectories.

Benefits of technology

It realizes the generation of real and reasonable trajectories in multi-vehicle collaborative decision-making test scenarios, improves the rationality and authenticity of vehicle trajectories in test scenarios, and ensures the reliability and effectiveness of intelligent connected vehicle testing and verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688451A_ABST
    Figure CN120688451A_ABST
Patent Text Reader

Abstract

The invention relates to a test scene vehicle behavior generation method based on a text sequence generation model, and the method comprises the steps: collecting the driving track data of a vehicle, and carrying out the fragment feature analysis of the driving track data; the behavior track feature words of the vehicles are converted into discrete word list sequences of the vehicles; dividing the characteristic behavior sequence into sequence generation model input and sequence generation model expected output by using a destruction function; establishing a vehicle track sequence generation model; parameters of the vehicle track sequence generation model are finely adjusted, the cross entropy loss of the prediction sequence and the actual sequence is calculated according to the finely adjusted parameters, and when the vehicle track sequence generation model meets the preset stable convergence condition, the final test scene vehicle behavior is generated. Therefore, the problems that in the dynamic vehicle behavior trajectory generation process of the test scene, the rationality of the generated trajectory in a traditional vehicle behavior generation method is insufficient, and the reliability and effectiveness of a test result are insufficient due to behavior distortion are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intelligent connected vehicle testing and verification, and in particular to a method for generating vehicle behavior in a test scenario based on a text sequence generation model. Background Art

[0002] With the rapid development of intelligent connected vehicle technology, testing and verification methods for its safety and reliability have become particularly important. During the testing and verification process, how to effectively and realistically generate vehicle behavior trajectories in test scenarios, thereby forming more realistic and reasonable test scenarios and making test results more effective and reliable, has become one of the important research directions in the field of intelligent driving. Traditional test scenario generation methods often adopt rule-based or randomized strategies, such as the commonly used vehicle behavior simulation based on traffic flow theory or simple kinematic models. Although these methods are simple to implement, they suffer from the problem of insufficient rationality in trajectory generation, making it difficult to accurately reflect the actual behavior patterns of vehicles in real traffic scenarios. In particular, they cannot accurately capture the diversity and complexity of vehicle behavior trajectories in real driving scenarios.

[0003] In recent years, with the rapid development of machine learning technologies, particularly sequence generation models, text sequence generation models, exemplified by the Transformer architecture, such as BERT, GPT, and BART, have achieved tremendous success in natural language processing. By pre-training and fine-tuning on large-scale text data, these models are able to effectively capture long-range dependencies between sequence data, enabling efficient generation and accurate prediction of sequence data. Inspired by this, we applied sequence generation models to generate vehicle behavior in intelligent connected vehicle test scenarios. Using real vehicle trajectory data to construct a training corpus, we generated highly realistic and diverse vehicle trajectories.

[0004] However, the existing technology of using sequence generation models to generate vehicle trajectories still faces many difficulties and has not been effectively implemented. In particular, there is still a lack of a complete method for how to effectively generate sequences from continuous vehicle trajectory data and how to reasonably construct the mapping relationship between trajectory features and the input text of the sequence generation model. Summary of the Invention

[0005] The present application provides a method for generating vehicle behavior in a test scenario based on a text sequence generation model to solve the problems of insufficient rationality of the generated trajectories in traditional vehicle behavior generation methods during the generation of dynamic vehicle behavior trajectories in test scenarios, and insufficient reliability and validity of the test results due to behavior distortion.

[0006] The present application provides a test scenario vehicle behavior generation method based on a text sequence generation model, comprising the following steps: collecting vehicle driving trajectory data, performing segment feature analysis on the driving trajectory data, and generating vehicle behavior trajectory feature words; based on the actual vehicle trajectory dataset of the vehicle, converting the vehicle behavior trajectory feature words into a discretized word list sequence of the vehicle, and constructing a training corpus based on the discretized word list sequence; using the vehicle behavior trajectory feature discrete word list and a mapping function to process the actual vehicle trajectory dataset including the discretized trajectory to obtain a characteristic behavior sequence of the vehicle; using a destruction function to separate the characteristic behavior sequence into a sequence generation model input and an expected output of the sequence generation model; establishing a vehicle trajectory sequence generation model based on the sequence generation model input and the expected output of the sequence generation model; cyclically loading the training corpus to fine-tune the parameters of the vehicle trajectory sequence generation model to generate fine-tuned parameters that meet preset conditions, and calculating the cross entropy loss between the predicted sequence and the actual sequence based on the fine-tuned parameters, until the vehicle trajectory sequence generation model meets preset stable convergence conditions, thereby generating the final test scenario vehicle behavior.

[0007] Optionally, in one embodiment of the present application, after generating the characteristic words of the vehicle's behavior trajectory, it also includes: constructing a trajectory discretization vocabulary based on the characteristic words of the vehicle's behavior trajectory, and establishing a mapping relationship between the trajectory sequence and the text sequence; determining the basic characteristic vocabulary of the vehicle behavior trajectory sequence based on the trajectory discretization vocabulary and the mapping relationship.

[0008] Optionally, in one embodiment of the present application, the representation formula of the discrete vocabulary of the vehicle's behavior trajectory features is:

[0009]

[0010] Among them, v1, v2, …, v K They respectively represent different segment trajectory feature behaviors of the vehicle, and K represents the size of the discrete vocabulary of the vehicle's behavior trajectory features.

[0011] Optionally, in one embodiment of the present application, the discretized complete seconds in the discretized vocabulary sequence are:

[0012]

[0013] Where D is the trajectory of a single vehicle, n is the total number of frames of each trajectory, and f is the sampling frequency.

[0014] Optionally, in one embodiment of the present application, the formula for solving the mean value of the trajectory of a single vehicle is:

[0015]

[0016] Wherein, p is each variable position, v is velocity, a is acceleration, and f is the sampling frequency.

[0017] Optionally, in one embodiment of the present application, the calculation formula of the discretized trajectory is:

[0018]

[0019] Among them, p is the position of each variable, v is the velocity, and a is the acceleration.

[0020] Optionally, in one embodiment of the present application, the calculation formula of the mapping function is:

[0021] f:{D discretized}=f:{p * ,v * ,a *}

[0022] Among them, p is the position of each variable, v is the velocity, and a is the acceleration.

[0023] Optionally, in one embodiment of the present application, the destruction process of the destruction function is:

[0024]

[0025] in, Generate model input for the sequence, Generate the model's expected output for the sequence.

[0026] Optionally, in one embodiment of the present application, the vehicle trajectory sequence generation model is established by the formula:

[0027]

[0028] in, is the observable part after being destroyed, Outputs a sequence of predictions for the model.

[0029] Optionally, in one embodiment of the present application, the use of the vehicle's behavior trajectory feature discrete vocabulary and mapping function to process the actual vehicle trajectory data set including discretized trajectories to obtain the vehicle's characteristic behavior sequence includes: determining whether the vehicle's acceleration and deceleration are within a preset threshold; if the vehicle's acceleration and deceleration are within the preset threshold, mapping the discrete trajectory according to the vehicle's following behavior, otherwise mapping the discrete trajectory according to the vehicle's acceleration and deceleration behavior to obtain the characteristic behavior sequence; or, if the vehicle has lane changing behavior, mapping the discrete trajectory with the duration of the lane changing behavior as an index to obtain the characteristic behavior sequence.

[0030] The embodiment of the present application converts continuous vehicle trajectory data into a discrete Token sequence by designing a reasonable trajectory discretization feature vocabulary, and uses the BART model to learn and optimize the parameters of the discretized sequence, thereby achieving efficient generation of real and reasonable trajectories in multi-vehicle collaborative decision-making test scenarios. Compared with traditional vehicle behavior trajectory generation methods, the use of a sequence generation model achieves the generation of long-term and reasonable vehicle behavior trajectories. In addition, by collecting real vehicle behavior trajectory data in different application scenarios to construct a training corpus, and optimizing and adjusting the parameters of the sequence generation model, the scope of application of the present application can be further expanded, so that it can be effectively applied to the vehicle behavior generation process in various test scenarios. The present application effectively improves the rationality and authenticity of vehicle trajectories in test scenarios, and further ensures the reliability and effectiveness of intelligent connected vehicle test verification results. As a result, the problems of insufficient rationality of generated trajectories in traditional vehicle behavior generation methods and insufficient reliability and effectiveness of test results caused by behavior distortion in the dynamic vehicle behavior trajectory generation process of the test scenario are solved.

[0031] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0033] Figure 1 A flowchart of a method for generating vehicle behavior in a test scenario based on a text sequence generation model according to an embodiment of the present application;

[0034] Figure 2 A discrete word element representation according to an embodiment of the present application;

[0035] Figure 3 Schematic diagram of an original trajectory matrix according to one embodiment of the present application;

[0036] Figure 4 is a schematic diagram of a discretized trajectory according to one embodiment of the present application;

[0037] Figure 5 This is a schematic diagram of a vehicle trajectory token sequence according to one embodiment of the present application;

[0038] Figure 6 Schematic diagram of model parameters according to one embodiment of the present application;

[0039] Figure 7 Schematic diagram of the convergence process according to one embodiment of the present application. DETAILED DESCRIPTION

[0040] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0041] The following describes a method for generating vehicle behavior in a test scenario based on a text sequence generation model according to an embodiment of the present application with reference to the accompanying drawings. In response to the problems mentioned in the background art above, in the process of generating dynamic vehicle behavior trajectories in the test scenario, the rationality of the generated trajectories in the traditional vehicle behavior generation method is insufficient, and the reliability and validity of the test results caused by behavior distortion are insufficient, the present application provides a method for generating vehicle behavior in a test scenario based on a text sequence generation model. In this method, by designing a reasonable trajectory discretization feature vocabulary, continuous vehicle trajectory data is converted into a discretized Token sequence, and the discretized sequence is learned and parameter optimized using the BART model, thereby achieving efficient generation of real and reasonable trajectories in multi-vehicle collaborative decision-making test scenarios. Compared with traditional vehicle behavior trajectory generation methods, by adopting a sequence generation model, long-term and reasonable vehicle behavior trajectory generation is achieved. In addition, by collecting real vehicle behavior trajectory data in different application scenarios to construct a training corpus, and optimizing and adjusting the parameters of the sequence generation model, the scope of application of the present application can be further expanded, so that it can be effectively applied to the vehicle behavior generation process in a variety of test scenarios. The present application effectively improves the rationality and authenticity of vehicle trajectories in test scenarios, and further ensures the reliability and validity of intelligent connected vehicle test verification results. This solves the problems of insufficient rationality of generated trajectories in traditional vehicle behavior generation methods during the generation of dynamic vehicle behavior trajectories in test scenarios, and insufficient reliability and validity of test results caused by behavior distortion.

[0042] Specifically, Figure 1 A flowchart of a method for generating vehicle behavior in a test scenario based on a text sequence generation model provided in an embodiment of the present application.

[0043] like Figure 1 As shown, the test scenario vehicle behavior generation method based on the text sequence generation model includes the following steps:

[0044] In step S101 , the driving trajectory data of the vehicle is collected, and segment feature analysis is performed on the driving trajectory data to generate vehicle behavior trajectory feature words.

[0045] In the actual implementation process, the embodiment of the present application can pre-collect a large amount of vehicle driving trajectory data, and design vehicle behavior trajectory feature word Token based on the segment feature analysis of the vehicle driving trajectory data.

[0046] In one embodiment of the present application, the representation formula of the discrete vocabulary of the vehicle's behavior trajectory characteristics is:

[0047]

[0048] Among them, v1, v2, …, v K They represent different segment trajectory feature behaviors of the vehicle respectively, and K represents the size of the discrete vocabulary of the vehicle's behavioral trajectory features.

[0049] Optionally, in one embodiment of the present application, after generating the vehicle's behavior trajectory feature words, it also includes: constructing a trajectory discretization vocabulary based on the vehicle's behavior trajectory feature words, and establishing a mapping relationship between the trajectory sequence and the text sequence; determining the basic feature vocabulary of the vehicle behavior trajectory sequence based on the trajectory discretization vocabulary and the mapping relationship.

[0050] Specifically, the embodiment of the present application can construct a trajectory discretization vocabulary based on the vehicle's behavior trajectory feature words, and establish a mapping relationship between the trajectory sequence and the text sequence as a basic feature vocabulary for generating the vehicle behavior trajectory sequence.

[0051] In step S102 , based on the actual vehicle trajectory dataset, the vehicle's behavior trajectory feature words are converted into a discretized vocabulary sequence of the vehicle, and a training corpus is constructed according to the discretized vocabulary sequence.

[0052] Specifically, the embodiment of the present application can convert the vehicle's behavior trajectory feature words, that is, the continuous vehicle trajectory, into a discretized vocabulary sequence based on the collected real vehicle trajectory dataset, and then construct a training corpus. The discretization process of the real trajectory data is as follows:

[0053] In one embodiment of the present application, the number of discretized complete seconds N in the discretized vocabulary sequence is:

[0054]

[0055] Where D is a single vehicle trajectory, n is the total number of frames for each trajectory, and f is the sampling frequency.

[0056] In one embodiment of the present application, the formula for solving the mean value of a single vehicle trajectory is:

[0057]

[0058] Where p is the position of each variable in trajectory D, v is the velocity, a is the acceleration, and f is the sampling frequency.

[0059] In one embodiment of the present application, the discrete data of each second segment is represented by integer index 1,...,N, and a discretized trajectory D with a size of N×4 is finally output. discretized , the calculation formula of the discretized trajectory is:

[0060]

[0061] Among them, p is the position of each variable, v is the velocity, and a is the acceleration.

[0062] In step S103 , the actual vehicle trajectory dataset including the discretized trajectory is processed using the vehicle behavior trajectory feature discrete vocabulary and a mapping function to obtain a vehicle feature behavior sequence.

[0063] It is understandable that the embodiment of the present application converts D discretized Mapped to a token text sequence that can be processed by the sequence generation model. In one embodiment of the present application, the calculation formula of the mapping function is:

[0064] f:{D discretized}=f:{p * ,v * ,a *}

[0065] Among them, p is the position of each variable, v is the velocity, and a is the acceleration.

[0066] Through the mapping process, each discretized trajectory D discretized It can be output as a discrete feature behavior Token sequence X, such as X i (acc_token_0.5, follow_token_20.0,,decc_token_-1.0).

[0067] During actual execution, the embodiment of the present application can use the vehicle's behavior trajectory feature discrete vocabulary v and the mapping function f to process a real vehicle trajectory dataset including discretized trajectories to obtain the vehicle's feature behavior sequence Token.

[0068] Optionally, in one embodiment of the present application, a vehicle behavior trajectory feature discrete vocabulary and a mapping function are used to process an actual vehicle trajectory data set including discretized trajectories to obtain a vehicle characteristic behavior sequence, including: determining whether the vehicle's acceleration and deceleration are within a preset threshold; if the vehicle's acceleration and deceleration are within the preset threshold, mapping the discrete trajectory according to the vehicle's following behavior, otherwise mapping the discrete trajectory according to the vehicle's acceleration and deceleration behavior to obtain a characteristic behavior sequence; or, if the vehicle has lane changing behavior, mapping the discrete trajectory with the duration of the lane changing behavior as an index to obtain a characteristic behavior sequence.

[0069] The embodiment of the present application can map discrete trajectories based on a designed mapping function. The priority order in the mapping function is that lane changing takes precedence over acceleration and deceleration, which takes precedence over following a vehicle. The vehicle's acceleration and deceleration are determined to be within a preset threshold. If the vehicle's acceleration and deceleration are within 0.5, mapping is performed based on following a vehicle; otherwise, mapping is performed based on acceleration and deceleration. If the vehicle changes lanes, the duration of the lane change is used as an index for mapping.

[0070] It should be noted that the preset threshold can be set by those skilled in the art according to actual conditions and is not specifically limited here.

[0071] In step S104, a destruction function is used to separate the characteristic behavior sequence into a sequence generation model input and an expected output of the sequence generation model.

[0072] In the actual execution process, the embodiment of the present application can obtain the characteristic behavior Token sequence X i By destroying the function f destruct Divided into: Sequence generation model input And the expected output of the sequence generation model

[0073] In one embodiment of the present application, the destruction process of the destruction function is:

[0074]

[0075] in, Input for sequence generation model, Generate the expected output of the model for the sequence.

[0076] In step S105 , a vehicle trajectory sequence generation model is established based on the sequence generation model input and the sequence generation model expected output.

[0077] It can be understood that the embodiments of the present application can give full play to the advantages of the text sequence generation model. Through the discretization of vehicle trajectories, it can reasonably construct a vehicle behavior feature vocabulary and effectively map the trajectory data to a sequence space that can be recognized by the model, thereby achieving more realistic, reasonable and diversified vehicle behavior trajectory generation, and improving the reliability and effectiveness of intelligent connected vehicle testing and verification.

[0078] As a possible implementation method, the embodiment of the present application can construct a vehicle trajectory sequence generation model based on the sequence generation model input and the expected output of the sequence generation model according to the BART bidirectional encoder and the autoregressive decoder.

[0079] In one embodiment of the present application, the vehicle trajectory sequence generation model is established by the formula:

[0080]

[0081] in, is the observable part after being destroyed, Output prediction sequence for the model, expected Able to generate real

[0082] In step S106, the training corpus is loaded in a loop to fine-tune the parameters of the vehicle trajectory sequence generation model, generate fine-tuned parameters that meet the preset conditions, and calculate the cross entropy loss between the predicted sequence and the actual sequence based on the fine-tuned parameters until the vehicle trajectory sequence generation model meets the preset stable convergence conditions, thereby generating the final test scenario vehicle behavior.

[0083] In the actual execution process, the embodiment of the present application can fine-tune the parameters of the vehicle trajectory sequence generation model by continuously loading training corpus, generate fine-tuned parameters that meet the preset conditions, and calculate the predicted sequence based on the fine-tuned parameters With the actual sequence The cross entropy loss is calculated and this step is repeated until the vehicle trajectory sequence generation model converges stably to generate the final test scenario vehicle behavior.

[0084] It should be noted that the preset stable convergence condition can be set by those skilled in the art according to actual conditions and is not specifically limited here.

[0085] Specifically, it can be combined Figures 2 to 6 As shown, the working principle of the test scenario vehicle behavior generation method based on the text sequence generation model in the embodiment of the present application is described in detail with a specific embodiment.

[0086] Taking the reasonable generation of vehicle behavior trajectories in highway scenarios as an example, first, based on the vehicle kinematic characteristics in highway scenarios, the vehicle behavior is divided into acceleration, deceleration, following, and lane changing, and four tokens are established respectively: acc_token_; decc_token_; follow_token_; lc_token_;; Based on the range of vehicle behavior kinematic parameters on highways, the following tokens are constructed: Figure 2 The discrete token word table shown is used for subsequent vehicle trajectory mapping.

[0087] Then, the vehicle trajectory data in the highway dataset is extracted to obtain the continuous vehicle trajectory data with a data sampling frequency of f=25 frames. The thumbnail of the original trajectory data (311, 7) is as follows: Figure 3 shown.

[0088] Since the original data n is 311 rows and the sampling frequency f is 25, the number of complete seconds after discretization is

[0089]

[0090] For the convenience of subsequent processing, we will round it off to N≈12.

[0091] For each variable position p, velocity v, acceleration a in trajectory D, solve the mean value in a group of f lines:

[0092]

[0093] The first line of the discretized data is the number of seconds, followed by position p, velocity v, and acceleration a. The discretized data results are as follows: Figure 4 shown.

[0094] Subsequently, the discrete trajectories are mapped based on the designed mapping function. The priority order in the mapping function is that lane changes take precedence over acceleration and deceleration, which takes precedence over following. If the vehicle's acceleration and deceleration are within 0.5, the following behavior is mapped; otherwise, acceleration and deceleration are mapped. If the vehicle changes lanes, the duration of the lane change is used as an index for mapping.

[0095] f:{D discretized}=f:{p * ,v * ,a *}

[0096] After the above trajectory is mapped, we can get the following Figure 5 The trajectory shown is represented in word units.

[0097] Since the vehicle trajectory duration is 12 seconds, 12 consecutive tokens are used for representation.

[0098] Then, we use the existing highway vehicle behavior dataset to process and map batch data, and load it into the BART sequence generation model as training corpus for training. The model parameters used are as follows: Figure 6 shown.

[0099] By looping and loading the training corpus, the real vehicle trajectory dataset collected is transformed into a discrete vocabulary. After processing with the mapping function f, the resulting feature behavior Token sequence X i By destroying the function f destruct Divided into: Sequence generation model input And the expected output of the sequence generation model The destruction process can be expressed as:

[0100]

[0101] Fine-tune the parameters of the vehicle trajectory sequence generation model and calculate and The cross entropy loss is calculated and the steps are repeated until the vehicle trajectory sequence generation model converges stably. The convergence process is as follows: Figure 7 shown.

[0102] According to the test scenario vehicle behavior generation method based on the text sequence generation model proposed in the embodiment of the present application, by designing a reasonable trajectory discretization feature vocabulary, the continuous vehicle trajectory data is converted into a discretized Token sequence, and the discretized sequence is learned and parameter optimized using the BART model, thereby achieving efficient generation of real and reasonable trajectories in multi-vehicle collaborative decision-making test scenarios. Compared with the traditional vehicle behavior trajectory generation method, by adopting the sequence generation model, long-term and reasonable vehicle behavior trajectory generation is achieved. In addition, by collecting real vehicle behavior trajectory data in different application scenarios to construct a training corpus, and optimizing and adjusting the parameters of the sequence generation model, the scope of application of the present application can be further expanded, so that it can be effectively applied to the vehicle behavior generation process of various test scenarios. As a result, the present application effectively improves the rationality and authenticity of the vehicle trajectory in the test scenario, and further ensures the reliability and validity of the intelligent connected vehicle test verification results. As a result, the problem of insufficient rationality of the generated trajectory in the traditional vehicle behavior generation method and insufficient reliability and validity of the test results caused by behavior distortion in the dynamic vehicle behavior trajectory generation process of the test scenario is solved.

[0103] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0104] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this application, "N" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0105] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing a custom logical function or process step, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed in a different order than shown or discussed, including performing functions in a substantially simultaneous manner or in a reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application pertain.

Claims

1. A method for generating vehicle behavior in test scenarios based on a text sequence generation model, characterized in that: The following steps are involved: Collecting vehicle driving trajectory data, and performing segment feature analysis on the driving trajectory data to generate a behavior trajectory feature word of the vehicle; Based on the actual vehicle trajectory dataset of the vehicle, the behavior trajectory feature words of the vehicle are converted into a discretized vocabulary sequence of the vehicle, and a training corpus is constructed according to the discretized vocabulary sequence; Processing the actual vehicle trajectory data set including the discretized trajectory using the vehicle's behavior trajectory feature discrete vocabulary and a mapping function to obtain a characteristic behavior sequence of the vehicle; Using a destruction function, the characteristic behavior sequence is divided into a sequence generation model input and a sequence generation model expected output; Establishing a vehicle trajectory sequence generation model based on the sequence generation model input and the sequence generation model expected output; The training corpus is loaded cyclically to fine-tune the parameters of the vehicle trajectory sequence generation model to generate fine-tuned parameters that meet preset conditions. The cross-entropy loss between the predicted sequence and the actual sequence is calculated based on the fine-tuned parameters until the vehicle trajectory sequence generation model meets preset stable convergence conditions, thereby generating the final test scenario vehicle behavior.

2. The method according to claim 1, characterized in that After generating the vehicle's behavior trajectory feature words, the method further includes: constructing a trajectory discretization vocabulary based on the vehicle's behavior trajectory feature words, and establishing a mapping relationship between the trajectory sequence and the text sequence; A basic feature vocabulary of the vehicle behavior trajectory sequence is determined according to the trajectory discretization vocabulary and the mapping relationship.

3. The method according to claim 1, characterized in that The representation formula of the discrete vocabulary of the vehicle's behavior trajectory feature is: Among them, v1, v2, …, v K They respectively represent different segment trajectory feature behaviors of the vehicle, and K represents the size of the discrete vocabulary of the vehicle's behavior trajectory features.

4. The method according to claim 1, wherein The number of discretized complete seconds in the discretized vocabulary sequence is: Where D is a single vehicle trajectory, n is the total number of frames for each trajectory, and f is the sampling frequency.

5. The method according to claim 4, characterized in that The formula for solving the mean value of the trajectory of a single vehicle is: Wherein, p is the position of each variable, v is the velocity, a is the acceleration, and f is the sampling frequency.

6. The method according to claim 5, characterized in that The calculation formula of the discretized trajectory is: Wherein, p is each variable position, v is the velocity, and a is the acceleration.

7. The method according to claim 6, characterized in that The calculation formula of the mapping function f is: f:{D discretized }=f:{p * ,v * ,a * } Wherein, p is each variable position, v is the velocity, and a is the acceleration.

8. The method according to claim 1, characterized in that The destruction process of the destruction function is: in, Generate model input for the sequence, Generate the model's expected output for the sequence.

9. The method according to claim 1, characterized in that The formula for establishing the vehicle trajectory sequence generation model is: in, is the observable part after being destroyed, Outputs a sequence of predictions for the model.

10. The method according to claim 1, characterized in that The step of using the vehicle's behavior trajectory feature discrete vocabulary and a mapping function to process the actual vehicle trajectory dataset including the discretized trajectory to obtain the vehicle's characteristic behavior sequence includes: determining whether the acceleration and deceleration of the vehicle are within a preset threshold; If the acceleration and deceleration of the vehicle is within the preset threshold, mapping the discrete trajectories is performed according to the vehicle following behavior; otherwise, mapping the discrete trajectories is performed according to the acceleration and deceleration behavior of the vehicle to obtain the characteristic behavior sequence; Alternatively, if the vehicle has a lane-changing behavior, the discrete trajectories are mapped using the duration of the lane-changing behavior as an index to obtain the characteristic behavior sequence.