Road scene generation method and device, terminal equipment and storage medium

By encoding the road perception results and generating model predictions, the problem of single and high complexity road scene generation methods in the existing technology is solved, and more accurate and simple road scene predictions are achieved.

CN118736028APending Publication Date: 2024-10-01HAOMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310340360.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing technology has a single method for generating road scenes and relies on the historical movement trajectories of objects, resulting in inaccurate and high-complexity scene generation in the future, making it difficult to deploy on the platform.

Method used

By obtaining the perception results of the road, encoding and converting it into a Token sequence, and inputting it into the trained generation model, we can predict the road scene in the future, reduce the dependence on the historical movement trajectory of the object, and simplify the generation method.

Benefits of technology

It provides a new method for road scene generation, making predictions more diverse and accurate, reducing the complexity of platform deployment, and improving the reliability of scene generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736028A_ABST
    Figure CN118736028A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of data processing, and provides a road scene generation method and device, terminal equipment and a storage medium, and the method comprises the steps: firstly obtaining a perception result of a road, carrying out the coding processing of the perception result, obtaining a Token sequence corresponding to the perception result, inputting the Token sequence into a generation model after value training, and carrying out the coding processing of the Token sequence; and scene generation information of the road is obtained. According to the method, the sensing result is converted into the Token sequence, and the scene of the road which may occur in a period of time in the future is predicted by using the Token sequence, so that a new method is provided for the generation of the road scene, and the generation method of the road scene is more diversified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method, device, terminal equipment and storage medium for generating a road scene. Background Art

[0002] With the development of artificial intelligence, people pay more and more attention to the pre-generation of road scenes. For example, in terms of vehicle autonomous driving, in order to plan the vehicle's driving strategy in the future, it is necessary to generate road scene information in advance and determine the vehicle's driving strategy based on the generated road scene information.

[0003] At present, the generation of road scenes mainly depends on target tracking. By tracking the target objects on the road, the state of the target objects in the future time period is determined, and the road scenes in the future time period are generated according to the state of the target objects in the future time period. The generation method of road scenes is relatively simple. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, terminal device and storage medium for generating a road scene, which can solve the problem of a single method for generating a road scene.

[0005] In a first aspect, an embodiment of the present application provides a method for generating a road scene, comprising:

[0006] Obtain road perception results;

[0007] Encoding the perception result to obtain a Token sequence corresponding to the perception result, wherein the Token sequence is used to represent the road scene corresponding to the perception result;

[0008] The Token sequence is input into the trained generation model to obtain a scene generation result of the road, wherein the scene life result represents a scene predicted to occur on the road within a preset time in the future.

[0009] In a second aspect, an embodiment of the present application provides a device for generating a road scene, including:

[0010] An information acquisition module is used to obtain road perception results;

[0011] An information conversion module, used to encode the perception result to obtain a Token sequence corresponding to the perception result, wherein the Token sequence is used to represent the road scene corresponding to the perception result;

[0012] A scene prediction module is used to input the Token sequence into the trained generation model to obtain a scene generation result of the road, wherein the scene life result represents the scene predicted to appear on the road within a preset time in the future.

[0013] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for generating a road scene described in any one of the first aspects above is implemented.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating a road scene described in any one of the first aspects above is implemented.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the method for generating a road scene described in any one of the above-mentioned first aspects.

[0016] Compared with the prior art, the first aspect of the present application has the following beneficial effects: the present application first obtains the perception result of the road, encodes the perception result, obtains the Token sequence corresponding to the perception result, inputs the Token sequence into the trained generation model, and obtains the scene prediction information of the road. The present application converts the perception result into a Token sequence, uses the Token sequence to generate the road scene, provides a new method for predicting the road scene, and makes the prediction method of the road scene more diverse.

[0017] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 It is a flowchart of a method for generating a road scene provided in an embodiment of the present application;

[0020] Figure 2 It is a flowchart of a method for generating a Token sequence provided in an embodiment of the present application;

[0021] Figure 3 It is a flowchart of a method for generating model prediction scenario prediction information provided by an embodiment of the present application;

[0022] Figure 4 It is a flowchart of a training method for a generative model provided in an embodiment of the present application;

[0023] Figure 5 is a schematic diagram of the input and output of a generation model provided in an embodiment of the present application;

[0024] Figure 6 It is a structural diagram of a generation model provided in an embodiment of the present application;

[0025] Figure 7 is a flowchart of a training method for a generative model provided in another embodiment of the present application;

[0026] Figure 8 is a schematic diagram of the structure of a device for generating a road scene provided in an embodiment of the present application;

[0027] Fig. 9 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0028] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0029] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0030] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0031] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0032] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0033] At present, the generation of road scenes in the future mainly depends on the historical motion trajectory of the object. If the historical motion trajectory of the object is not accurate enough, it will affect the generation of road scenes in the future, making the scene generation inaccurate. In addition, the current generation method of road scenes is highly complex and difficult to deploy on the platform.

[0034] Based on the above reasons, this application proposes a method for generating road scenes. This application converts the perception information of the road into a Token sequence, and generates scenes that may appear on the road in the future based on the Token sequence. This application provides a new method for generating road scenes, which makes up for the defect of the single road scene generation method. The method of this application has a low dependence on the historical motion trajectory of the object, the generation method is relatively simple, and the deployment on the platform is relatively simple.

[0035] Figure 1 A schematic flow chart of the method for generating a road scene provided by the present application is shown, referring to Figure 1 , the method is described in detail as follows:

[0036] S101, obtaining road perception results.

[0037] In this embodiment, the perception result of the road can be determined based on the road information collected by the collection equipment on the road. The perception result of the road can also be obtained by the target vehicle on the road through the perception equipment installed by itself. The perception result is the information within a preset time period perceived by the perception equipment. The perception equipment can be a radar device, a camera and / or a speed sensor, etc. The camera is used to collect image information of the road. The radar device is used to collect point cloud information of the road. As an example, the target vehicle uses a camera to capture road images, uses a radar device to collect point cloud information of the road, uses a speed sensor to collect the speed of the vehicle, and uses an angle sensor to detect the steering wheel angle of the vehicle.

[0038] In practical applications, the perception results may include information about the target vehicle, obstacles, lane lines, traffic lights, etc. The target vehicle information may include information about the speed, position coordinates, direction of movement, and / or steering wheel angle of the target vehicle. Obstacles may be pedestrians, animals, and vehicles other than the target vehicle. Obstacle information may include the type, position, speed, and / or direction of movement of the obstacle.

[0039] Specifically, the perception device collects information at a preset frequency, for example, the perception device collects information at a frequency of 10 frames per second. The collected information is input into the perception algorithm model for processing to obtain a perception result. The processing of the collected information by the perception algorithm model may include denoising, information fusion, edge enhancement and / or coordinate transformation, etc. The perception result may be a text sequence.

[0040] S102: Encode the perception result to obtain a Token sequence corresponding to the perception result, wherein the Token sequence is used to represent a road scene corresponding to the perception result.

[0041] Specifically, the perception results are input into the encoding model to obtain a Token sequence corresponding to the perception results. Token represents a basic unit in the neural network model input, and can represent different basic units in different machine learning tasks. In this application, Token can represent a complete scene of the road or a partial fragment of the scene.

[0042] As an example, a token can represent a scenario where there are pedestrians on the road and the target vehicle is moving forward.

[0043] Road scenes represent the digital expression of scenes on the road. Token sequences represent a series of scenes that occur in chronological order.

[0044] In this embodiment, the encoding method of the perception result can be grid-level encoding, unit-level encoding or object-level encoding. Grid-level encoding is to treat each frame of perception result as a whole, and each scene corresponding to each frame of perception result can be represented by a Token, and each frame of perception result can correspond to multiple scenes. Unit-level encoding is to treat each grid in a single frame of perception result as a whole, and the state of each grid can be represented by a Token. Object-level encoding is to treat each object as a whole, and the type and / or state of each object can be represented by a Token.

[0045] Specifically, if the electronic device has an encoding method, the sensing result is encoded using the encoding method. Optionally, a suitable encoding method is selected and installed according to the storage space of the electronic device.

[0046] If there are multiple encoding methods in the electronic device, the encoding method can be selected according to a preset selection rule. For example, the selection rule is to select a corresponding encoding method according to the type or size of the sample.

[0047] S103, inputting the Token sequence into the trained generation model to obtain a scene generation result of the road.

[0048] In this embodiment, the scenario generation result represents the scenario predicted to occur on the road within a preset time in the future.

[0049] Specifically, the Token sequence is input into the trained generation model to obtain a predicted Token sequence within a preset time period, and the predicted Token sequence is converted to obtain a scene generation result. The scene generation result can be a two-dimensional image, a three-dimensional image, or text information, etc. The scene generation result can include information about the target object on the road and information about obstacles other than the target object, etc. The target object can be a target vehicle, a pedestrian, or an animal, etc. When the present application is applied in the process of automatic driving of a vehicle, the target object can be a target vehicle, and the obstacle can be an obstacle other than the target vehicle.

[0050] In actual application, after obtaining the scene generation result, the scene prediction information is displayed so that the user can view and drive the vehicle according to the scene prediction information. After obtaining the scene generation result, the driving strategy can also be determined according to the scene generation result, and automatic driving can be performed according to the determined driving strategy. After obtaining the scene prediction information, the driving trajectory of the target vehicle in the future can also be obtained according to the scene generation result, and the determined driving trajectory can be displayed so that it can be used for driving based on the driving trajectory to prevent the target vehicle from colliding with obstacles.

[0051] In the embodiment of the present application, the perception result of the road is first obtained, the perception result is encoded, and the Token sequence corresponding to the perception result is obtained. The Token sequence is input into the trained generation model to obtain the scene prediction information of the road. The present application converts the perception result into a Token sequence, and uses the Token sequence to generate the road scene, which provides a new method for predicting the road scene and makes the prediction method of the road scene more diverse.

[0052] like Figure 2 As shown, in a possible implementation manner, the implementation process of step S102 may include:

[0053] S201, extracting single-frame perception results from the perception results, and performing rasterization processing on each of the single-frame perception results.

[0054] In this embodiment, since the perception result may be the processing result of the perception data collected within a period of time, and the perception device may collect multiple frames of data within a period of time, obtaining multiple frames of perception results, in order to facilitate data processing and scene description, each frame of perception results needs to be processed separately.

[0055] In this embodiment, the perception result may be data arranged in chronological order, and a frame of the perception result is extracted from the perception result, and the extracted frame of the perception result is recorded as a single-frame perception result. Each frame of the perception result is rasterized, that is, the rasterization of the perception result is completed. Each frame of the perception result may include information such as obstacles, targets, lane lines, and traffic lights. The target may be a person or a car, etc. After extracting the single-frame perception result, the single-frame perception result (which may be text information) may also be stored for subsequent search.

[0056] In this embodiment, after extracting the single-frame perception results, the information in the single-frame perception results is spliced ​​together, and the spliced ​​information is mapped under the same coordinate system. Specifically, obstacles, targets, lane lines, etc. are unified under one coordinate system. The single-frame perception results under the same coordinate system are divided into m×n grids to obtain the single-frame perception results after rasterization. In practical applications, the m×n grids in the single-frame perception results after rasterization can be recorded as G={c 1 ,c 2 ,...,c m×n Both m and n can be set as needed, for example, m can be set to 3 or 4, and n can be set to 4 or 5.

[0057] S202, performing feature classification on each grid based on the information in each grid, and obtaining a feature state corresponding to each grid in the single-frame perception result.

[0058] In this embodiment, feature classification rules are preset, and feature classification is performed on each grid according to the preset feature classification rules.

[0059] There can be multiple feature classification rules. For example, the feature classification rule can be used to determine whether there are pedestrians in the grid; the feature classification rule can be used to determine whether there are targets in the grid; the feature classification rule can be used to determine whether there are obstacles in the grid; and / or the feature classification rule can be used to determine whether there are lane lines in the grid, etc. The feature classification rules can be set as needed and are not limited here. After classifying the grid according to a feature classification rule, a feature state of the grid is obtained. A single-frame perception result can correspond to multiple feature states. The feature state corresponding to a grid in the single-frame perception result can be expressed by S={s 1 ,s 2 ,...,s k} to characterize, s 1 ,s 2 ,...,s k are the k feature states of the single-frame perception results. For example, the feature state corresponding to the i-th grid can be recorded as GS i,j ={gs i,1 ,gs i, ,...,gs i,k}, where GS i,j The i-th grid is in the j-th state.

[0060] For example, if there are pedestrians, lane lines, and no obstacles in grid A, the characteristic states of grid A are: a characteristic state of grid A is the presence of pedestrians; a scene state of grid A is the presence of lane lines; and a characteristic state of grid A is the absence of obstacles.

[0061] If there are m×n grids in a single-frame perception result, it is necessary to determine the feature state corresponding to each of the m×n grids separately.

[0062] S203, based on the feature state corresponding to each grid in each of the single-frame perception results, obtain Token information of each of the single-frame perception results, wherein the Token information represents the single-frame road scene corresponding to the single-frame perception result.

[0063] Specifically, when using the grid-level coding method for Token conversion, step S203 may specifically include: extracting a characteristic state of each grid in the single-frame perception result, combining the extracted characteristic state of each grid, and obtaining a feature combination result of the single-frame perception result, wherein each of the feature combination results represents a scene of the single-frame perception result; each feature combination result that can be composed of the single-frame perception result is a first Token, and all of the first Tokens are the Token information of the single-frame perception result.

[0064] In this embodiment, when obtaining the feature combination result, it is necessary to extract a feature state of each grid in the single-frame perception result, combine the extracted feature states, and obtain a feature combination result. There are as many feature combination results in the single-frame perception result as there are combinations that can be extracted from the grid of the single-frame perception result. Each feature combination result is a Token, recorded as the first Token. In practical applications, if the single-frame perception result needs to be divided into m×n grids, and each grid has k feature states, then the encoding space of the Token is k. m×n , pre-set k m×nA Token table is provided, and the Token table records the Token codes corresponding to various scenarios. After obtaining the feature combination result, the Token code corresponding to the scenario represented by the feature combination result is searched in the pre-set Token table to generate a first Token.

[0065] For example, if the single-frame perception result is divided into 3×1 grids, the feature states of grid A include a and b; the feature states of grid B include c and d; and the feature states of grid C include e and f. After extracting a feature state of each grid and combining them, the feature combination results are: ace, acf, ade, adf, bce, bcf, bde, and bdf. The single-frame perception result corresponds to 8 feature combination results. The Token information of the single-frame perception result consists of 8 first Tokens.

[0066] In this embodiment, when the feature combination result is obtained, the probability value corresponding to the feature combination result can also be obtained. The probability value represents the probability of the scene represented by the feature combination result occurring. The probability value of the feature combination result is the product of the probabilities of the selected feature states appearing in each grid, that is, P(Token i ) is the probability value corresponding to the first Token of the i-th node, that is, the probability value of the feature combination result; gs i,j is the jth state of the i-th grid; P(gs i,j ) is the probability of occurrence of the jth characteristic state of the i-th grid. The probability of occurrence of the jth characteristic state of the i-th grid is preset. Specifically, the probability of occurrence of the jth characteristic state of the i-th grid is determined by the number of occurrences of this state in the historical data.

[0067] Specifically, when the unit-level encoding method is used for Token conversion, step S203 may specifically include: the characteristic state of each grid in the single-frame perception result is a second Token, and all the second Tokens constitute the Token information of the single-frame perception result.

[0068] In this embodiment, if there are m×n grids in a single-frame perception result, each grid may have k feature states. One feature state of a grid is a Token, recorded as a second Token. Therefore, there are k×m×n second Tokens in the single-frame perception result, and the Token information of the single-frame perception result consists of k×m×n second Tokens.

[0069] For example, if there are three grids in a single-frame perception result, grid A has two feature states, a and b; grid B has two feature states, c and d; grid C has two feature states, e and f; feature state a is a second Token, feature state b is a second Token, feature state c is a second Token, feature state d is a second Token, feature state e is a second Token, and feature state f is a second Token. The token information of a single-frame perception result consists of six second Tokens.

[0070] In this embodiment, while obtaining the characteristic state of the grid, the probability of the characteristic state can also be obtained. The probability value of the second Token is the probability of the characteristic state, that is, P(Token i )=P(cs i, ), where P(Token i ) is the probability value of the i-th second Token, P(cs i,j ) is the probability of the jth feature state of the ith grid.

[0071] If the single-frame perception result needs to be divided into m×n grids, and each grid has k feature states, the encoding space of the Token is k×m×n, and k×m×n Token tables are pre-set, and the Token tables record the Token codes corresponding to various scenes. After obtaining the feature state of the grid, the Token code corresponding to the scene represented by the feature state is searched in the pre-set Token table to generate a second Token.

[0072] Specifically, if the feature classification of each grid includes the classification of whether there is a target object, if there is a target object in the grid, the feature state of the grid includes the state of the target object. If there is no target object in the grid, the feature state of the grid does not include the state of the target object.

[0073] When the object-level coding method is used for Token conversion, step S203 may specifically include: determining a third Token based on the state of each target object in the single-frame perception result. One state of the target object is a third Token, and all the third Tokens constitute the Token information of the single-frame perception information, and the state of the target object includes the grid position of the grid where the target object is located.

[0074] In this embodiment, the target object may be a vehicle, a pedestrian, or an animal. The state of the target object may also include the category and / or speed of the target object. Each target object may be in multiple states, and a state of each target object may generate a token, which is recorded as a third token. For example, if a target object has three states, the target object corresponds to three third tokens. All third tokens corresponding to all targets constitute the token information of a single-frame perception result.

[0075] As an example, the full set of target objects can be represented as Obj = {obj 1 ,obj 2 ,...,obj u}, indicating that there are u targets in the single-frame perception result. The state of the target can be expressed as S = {s 1 ,s 2 ,...,s t},s 1 ,s 2 ,...,s t is the t state of a target object. i Represents an object obj i , object obj i In a state j , then the object obj i The status is os i, .

[0076] In this embodiment, the probability value of the third Token is the probability corresponding to the state of the corresponding target object, denoted as P(Token i )=P(os i,j ), P(Token i ) is the probability value of the third Token of the i-th Token, P(os i,j ) is the target object obj i The probability of being in the jth state. The probability of the state of the target object is preset. The probability of the state of the target object can be determined based on the number of times the target object appears in the state in the historical data.

[0077] If the single-frame perception result needs to be divided into m×n grids, there are u targets, and each target has t scene states, then the encoding space of the Token is u×m×n×t, and u×m×n×t Token tables are pre-set, and the Token tables record the Token codes corresponding to various states. After obtaining the state of the target object, the Token code corresponding to the state of the target object is searched in the pre-set Token table to generate a third Token.

[0078] In this application, multiple encoding methods for perception results are provided, so that the methods of converting perception results into Token sequences are more diverse and more selective.

[0079] S204: splicing the Token information of all the single-frame perception results according to the chronological order of the acquisition time of each of the single-frame perception results to obtain a Token sequence corresponding to the perception results.

[0080] In this embodiment, the Token information of all single-frame perception results is concatenated to obtain batch data (Batch), which is recorded as a Token sequence. For example, Token_Seq = {Token 1 ,Token 2 ,Token 3 ,...,Token t-1 ,Token t} is a Token sequence, which represents a series of scenes that occurred in the past.

[0081] like Figure 3 As shown, in a possible implementation manner, the implementation process of step S103 may include:

[0082] S1031, input the Token sequence into the trained generation model to obtain the first prediction Token, where the first prediction Token represents the predicted road scene where the road will appear.

[0083] In this embodiment, after the Token sequence is input into the trained generative model, the conditional probability distribution of the Token sequence is solved, that is, P(Token i |Token 1 ,Token 2 ,Token...,Token t-1 ,Token t ), and obtain the probability of a certain scenario occurring in the future. A token is extracted from the solved token according to the preset rule as the first prediction token. The preset rule can be to extract the token corresponding to the scenario with the highest probability of occurrence, or to extract the token corresponding to the scenario with the middle probability of occurrence.

[0084] S1032, concatenate the first predicted Token to the Token sequence to obtain the first Token concatenated sequence.

[0085] Specifically, the first predicted Token is concatenated to the end of the Token sequence to obtain the first Token concatenated sequence. For example, if the Token sequence is Token_Seq = {Token 1 ,Token 2 ,Token 3 ,...,Token t-1 ,Token t}, the first predicted Token is Token t+1 , then the first Token concatenation sequence is Token_Seq new ={Token 1 ,Token 2 ,Token 3 ,...,Token t-1 ,Token t ,Token t+1}.

[0086] S1033, input the i-th Token concatenation sequence into the trained generation model to obtain the i+1-th predicted Token, where i≥1.

[0087] In this embodiment, the above steps S1031 to S1032 are looped in sequence to obtain all predicted Tokens in the future time period to be predicted, and all predicted Tokens can form a Token prediction sequence.

[0088] S1034: Based on all the predicted Tokens, a scene generation result of the road is obtained.

[0089] In this embodiment, the prediction token contains information about the road, for example, the prediction token contains trajectory points of the target object (trajectory points of the target vehicle, trajectory points of obstacles), coordinates of the target vehicle, steering wheel angle, speed, etc. The road information is extracted from the prediction token. If there are trajectory points in the extracted information, the trajectory points of the same target object need to be connected to obtain the motion trajectory of the target object. Specifically, when connecting the trajectory points, a smoothing algorithm such as a Bezier curve or a polynomial can also be used to smooth the connected curve to obtain a smoothed motion trajectory.

[0090] In a possible implementation, before step S103, the method may further include:

[0091] The generative model to be trained is trained to obtain a trained generative model.

[0092] Specifically, historical road perception results of roads in a historical time period are obtained, and the historical road perception results are encoded to obtain a Token sample sequence. The Token sample sequence is input into the generative model to be trained to train the generative model to be trained, and an output result is obtained. The parameters of the generative model to be trained are updated according to the output result, and the above training process is repeated to obtain a trained generative model.

[0093] In addition, when training the generative model, the output result of the generative model to be trained can be used as a Token sample sequence to continue training the generative model.

[0094] Alternatively, when using a trained generative model, the obtained scene generation results are used as a Token sample sequence to continue training the generative model so that the generative model can be more accurate.

[0095] In practical applications, it is necessary to pre-build the generative model to be trained. Specifically, a pre-trained generative model (Generative Pre-Training, GPT) is used to build the network structure of the generative model to be trained. A pre-trained generative model refers to a generative model that is pre-trained with a large number of unlabeled samples. In the field of natural language processing, this model can generate all the probability distributions of the next token based on a string of tokens, and is therefore often used in fields such as text generation.

[0096] When training the generative model, it is also necessary to pre-set the initial values ​​of the parameters in the generative model and the number of training times, and then the training ends after the preset number of training times is reached.

[0097] In one possible implementation, if the scene generation result output by the generation model is a Token sequence, it is impossible to know the scene expressed by the Token sequence. Therefore, in order to make the Token sequence accurately display the expressed scene, the generation model can be trained in natural language so that the generation model can output the natural language information corresponding to the Token sequence while outputting the Token sequence. Natural language information can be composed of single words, letters and / or characters. The generation model includes a scene translation algorithm. The scene translation algorithm refers to converting the scene sequence into a text string that is easy for humans to understand, which is used to describe how the generation model makes decisions in the current scenario. Natural language training of the generation model is mainly to train the scene translation algorithm in the generation model.

[0098] like Figure 4 As shown, specifically, the process of training the generative model to be trained may also include:

[0099] S401, obtaining a Token sample sequence annotated with a natural language sequence, wherein the natural language sequence is used to explain a road scene described by the Token sample sequence.

[0100] Specifically, the Token sample sequence represents the scene information of the road. When annotating the Token sample sequence, one scene sequence corresponds to one natural language annotation. For example, if there are N scene sequences, there are N natural language annotations. For example, if the output of the generative model is used as the Token sample sequence, multiple Token sequences output by the generative model can be annotated; if scene sequence 1 is {Token 1 ,…,Token n}, the natural language annotation of scene sequence 1 is: the obstacle ahead accelerates; if scene sequence 2 is {Token 1 ,…,Token n}, the natural language annotation of scene sequence 2 is: intersection...driving, etc.

[0101] S402, inputting the Token sample sequence into the generation model to be trained to obtain a road prediction result, wherein the road prediction result includes a first Token prediction sequence and a natural language sequence corresponding to the first Token prediction sequence, and the first Token prediction sequence represents a prediction scenario of the road.

[0102] In this embodiment, a Token sample sequence and a corresponding natural language sequence constitute a sample pair, and multiple sample pairs are input into the generative model to be trained to train the generative model to be trained.

[0103] S403: updating the parameters in the planning model to be trained based on the road prediction result to obtain a trained generation model.

[0104] Specifically, the similarity between the road prediction result and the actual result is calculated, and the similarity is used to update the parameters in the generation model to be trained.

[0105] Correspondingly, if the generative model can output a natural language sequence, after the Token sequence corresponding to the perception result is input into the trained generative model, the generative model can output a Token prediction sequence and a natural language sequence used to express the scene corresponding to the Token prediction sequence.

[0106] Specifically, the scene generation result output by the generation model may include a second Token prediction sequence and a natural language sequence corresponding to the second Token prediction sequence, wherein the second Token prediction sequence represents the generation scene of the road. The natural language sequence is a natural language expression of the scene described by the second Token prediction sequence.

[0107] like Figure 5 As shown, the Token sequence {Token 1 ,…,Token n} is input into the trained generative model to obtain the Token prediction sequence {Token 1 ,…,Token n} and the natural language sequence {the car ahead...slows down} used to express the scenario corresponding to the Token prediction sequence.

[0108] In an embodiment of the present application, by training the generative model to be trained with a Token sample sequence labeled with a natural language sequence, the trained generative model can output the natural language sequence corresponding to the Token prediction sequence when outputting the Token prediction sequence, so that the scenario expressed by the Token prediction sequence can be more clearly understood by the user or device.

[0109] In one possible implementation, when the generative model of the present application is applied in the field of vehicle autonomous driving, in order to utilize the data of human taking over the vehicle during the autonomous driving process (data of poor driving during the vehicle autonomous driving process) to make the prediction of the generative model more accurate, the present application trains the generative model with human feedback reinforcement learning. Reinforcement Learning from Human Feedback refers to a method of introducing artificial feedback on the basis of reinforcement learning to make the behavior of the intelligent agent more in line with human preferences.

[0110] The generative models to be trained may include Drive GPT (autonomous driving scene sequence and trajectory generation network based on pre-trained generative network) and a network based on the PPO algorithm. The network based on the PPO algorithm includes a feedback network, an ActorModel and a Critic Model. PPO (Proximal Policy Optimization) is a reinforcement learning algorithm. The feedback network (Reward Model) is a feedback model in reinforcement learning, which is used to evaluate the output effect of DriveGPT. The Actor Model is the A strategy model in the AC strategy in reinforcement learning, that is, the strategy model that is finally trained and updated, responsible for outputting the probability of each action. The Critic Model is the C strategy model in the AC strategy in reinforcement learning, responsible for outputting the value of the action.

[0111] like Figure 6 Specifically, the method of training the generative model to be trained to obtain the trained generative model may also include:

[0112] S501, obtaining a Token sample sequence, and inputting the Token sample sequence into a generation model to be trained to obtain scene generation data of a road output by the generation model to be trained, wherein the Token sample sequence represents scene information of the road.

[0113] In this embodiment, the scene generation data contains data of the target vehicle.

[0114] Please refer to the above description for the method of obtaining the Token sample sequence, which will not be repeated here. The scene generation data is a scene sequence. The Token sample sequence is input into the generation model to be trained, and the Token sample sequence is processed by Drive GPT in the generation model to obtain the scene generation data. The scene generation data is a scene sequence, and there may be multiple predicted scene sequences. For example, the scene sequence may include scene sequence A, scene sequence B, scene sequence C, and scene sequence D, etc. The scene sequence can be represented by a Token sequence, and can also be represented by a natural language sequence. The scene generation data is used to characterize the scenarios that may occur on the predicted road.

[0115] S502, obtaining historical takeover data, wherein the historical takeover data represents road scene data when the user takes over the target vehicle during the process of the target vehicle performing automatic driving within a historical time period.

[0116] In this embodiment, the historical takeover data may include the vehicle's driving route, vehicle speed, steering wheel angle, etc. after the user took over the vehicle.

[0117] S503: Calculate the similarity between the scenario generation data and the historical takeover data.

[0118] For example, at time A, if the turning angle of the target vehicle in the historical takeover data is A, and the turning angle of the target vehicle in the scene generation result is B, and the absolute value of the difference between A and B is less than the preset value, then the similarity between A and B is high; if the absolute value of the difference between A and B is greater than or equal to the preset value, then the similarity between A and B is low.

[0119] S504: Score the scene generation data based on the similarity to obtain a scoring result of the scene generation data.

[0120] In this embodiment, when scoring the scene generation data, the scene generation data that is similar to the historical takeover data is scored high, and the scene generation data that is significantly different from the historical takeover data is scored low.

[0121] In this embodiment, multiple scene sequences in the scene generation data are scored to obtain a scoring result for each scene sequence. For example, the score of scene sequence B is higher than that of scene sequence A, the score of scene sequence C is higher than that of scene sequence B, and the score of scene sequence D is higher than that of scene sequence A.

[0122] S505: Update the parameters in the planning model to be trained based on the scoring result of the scene generation data to obtain a trained planning model.

[0123] In this embodiment, the scoring results of the scene generation data are used to evaluate the Actor Model so that the predicted scene sequence output by the ActorModel is more similar to the historical driving data after human takeover.

[0124] Specifically, multiple results generated by the scenario are used to construct training pairs for training the Reward Model, which is used to evaluate the effect of the generated model.

[0125] Specifically, the Critic Model is used to calculate the expectation of the scene represented by the Token sample sequence, and the expected value of the scene represented by the Token sample sequence is obtained. Finally, the final feedback value is calculated based on the evaluation result and the expected value, and the Actor Model is iteratively updated using the feedback value to complete the training of the generated model.

[0126] In a possible implementation, the training of the generative model may further include:

[0127] Get a token sample sequence labeled with a natural language sequence.

[0128] The Token sample sequence is input into the generation model to be trained to obtain a road prediction result, wherein the road prediction result includes a first Token prediction sequence and a natural language sequence corresponding to the first Token prediction sequence, and the first Token prediction sequence represents a prediction scenario of the road.

[0129] Get historical takeover data.

[0130] The similarity between the road prediction result and the historical takeover data is calculated.

[0131] The road prediction result is scored based on the similarity to obtain a scoring result of the road prediction result.

[0132] Based on the road prediction result and the scoring result of the road prediction result, the parameters in the generation model to be trained are updated to obtain the trained generation model.

[0133] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0134] Corresponding to the method for generating the road scene described in the above embodiment, Figure 8 A structural block diagram of a device for generating a road scene provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0135] Reference Figure 8 The device 600 may include: an information acquisition module 610, an information conversion module 620 and a scene prediction module 630.

[0136] The information acquisition module 610 is used to obtain the perception result of the road;

[0137] An information conversion module 620 is used to encode the perception result to obtain a Token sequence corresponding to the perception result, wherein the Token sequence is used to represent the road scene corresponding to the perception result;

[0138] The scene prediction module 630 is used to input the Token sequence into the trained generation model to obtain the scene generation result of the road, wherein the scene generation result represents the scene predicted to appear on the road within a preset time in the future.

[0139] In a possible implementation, the information conversion module 620 may be specifically used to:

[0140] Extracting a single-frame perception result from the perception results, and performing rasterization processing on each of the single-frame perception results;

[0141] Based on the information in each grid, feature classification is performed on each grid to obtain a feature state corresponding to each grid in the single-frame perception result;

[0142] Based on the feature state corresponding to each grid in each of the single-frame perception results, Token information of each of the single-frame perception results is obtained, wherein the Token information represents the single-frame road scene corresponding to the single-frame perception result;

[0143] According to the chronological order of the acquisition time of each of the single-frame perception results, the Token information of all the single-frame perception results are spliced ​​to obtain a Token sequence corresponding to the perception results.

[0144] In a possible implementation, the information conversion module 620 may be specifically used to:

[0145] A feature state of each grid in the single-frame perception result is extracted, and the extracted feature states of each grid are combined to obtain a feature combination result of the single-frame perception result, wherein each feature combination result represents a scene of the single-frame perception result; each feature combination result that can be composed of the single-frame perception result is a first Token, and all the first Tokens are the Token information of the single-frame perception result.

[0146] In a possible implementation, the scene state of each grid in the single-frame perception result is a second Token, and all the second Tokens constitute the Token information of the single-frame perception result.

[0147] In a possible implementation, the characteristic state includes the state of the target object, and the information conversion module 620 can be specifically used to:

[0148] A third Token is generated based on the state of each target object in the single-frame perception result, wherein one state of one target object is a third Token, and all the third Tokens constitute the Token information of the single-frame perception information, and the state of the target object includes the grid position of the grid where the target object is located.

[0149] In a possible implementation, the scene prediction module 630 may be specifically used for:

[0150] Inputting the Token sequence into the trained generation model to obtain a first prediction Token, wherein the first prediction Token represents a road scene predicted to appear on the road;

[0151] Splicing the first predicted Token to the Token sequence to obtain the first Token splicing sequence;

[0152] The i-th Token concatenation sequence is input into the trained generation model to obtain the i+1-th predicted Token, where i≥1; based on all the predicted Tokens, the scene generation result of the road is obtained.

[0153] In a possible implementation, the above device may further include:

[0154] A first sample acquisition module is used to acquire a Token sample sequence annotated with a natural language sequence, wherein the natural language sequence is used to interpret the road scene described by the Token sample sequence, and the Token sample sequence represents the scene information of the road;

[0155] A result output module, used for inputting the Token sample sequence into the generation model to be trained to obtain a road prediction result, wherein the road prediction result includes a first Token prediction sequence and a natural language sequence corresponding to the first Token prediction sequence, and the first Token prediction sequence represents a prediction scenario of the generated road;

[0156] A parameter modification module, used for updating the parameters in the planning model to be trained based on the road prediction result to obtain a trained generation model;

[0157] Correspondingly, the scene generation result includes a second Token prediction sequence and a natural language sequence corresponding to the second Token prediction sequence, and the second Token prediction sequence represents the generation scene of the road.

[0158] In a possible implementation, the above device may further include:

[0159] A second sample acquisition module is used to acquire a Token sample sequence, and input the Token sample sequence into the generation model to be trained to obtain the scene generation data of the road output by the generation model to be trained, wherein the Token sample sequence represents the scene information of the road, and the scene generation data contains the data of the target vehicle;

[0160] A historical data acquisition module, used to acquire historical takeover data, wherein the historical takeover data represents road scene data after a user takes over the target vehicle during the process of the target vehicle executing automatic driving within a historical time period;

[0161] A calculation module, used for calculating the similarity between the scene generation data and the historical takeover data;

[0162] A scoring module, used for scoring the scene generation data based on the similarity to obtain a scoring result of the scene generation data;

[0163] A parameter modification module is used to update the parameters in the generation model to be trained based on the scoring result of the scene generation data to obtain the trained generation model.

[0164] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0165] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0166] The present application also provides a terminal device, see Fig. 9 The terminal device 700 may include: at least one processor 710, a memory 720, and a computer program stored in the memory 720 and executable on the at least one processor 710. When the processor 710 executes the computer program, the steps in any of the above-mentioned method embodiments are implemented, for example Figure 1 Steps S101 to S103 in the illustrated embodiment. Alternatively, when the processor 710 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 8 The functions of the information acquisition module 610 to the scene prediction module 630 are shown.

[0167] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 720, and executed by the processor 710 to complete the present application. The one or more modules / units may be a series of computer program segments capable of completing specific functions, and the program segments are used to describe the execution process of the computer program in the terminal device 700.

[0168] Those skilled in the art will understand that Fig. 9 It is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.

[0169] The processor 710 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0170] The memory 720 may be an internal storage unit of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. The memory 720 is used to store the computer program and other programs and data required by the terminal device. The memory 720 may also be used to temporarily store data that has been output or is to be output.

[0171] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0172] The road scene generation method provided in the embodiment of the present application can be applied to terminal devices such as computers, tablet computers, laptops, netbooks, personal digital assistants (PDAs), etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.

[0173] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0174] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0175] In the embodiments provided in the present application, it should be understood that the disclosed terminal equipment, devices and methods can be implemented in other ways. For example, the terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0176] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by one or more processors, the steps of each of the above-mentioned method embodiments can be implemented.

[0179] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by one or more processors, the steps of each of the above-mentioned method embodiments can be implemented.

[0180] Similarly, as a computer program product, when the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0181] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.

[0182] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for generating a road scene, characterized in that: include: Obtain road perception results; Encoding the perception result to obtain a Token sequence corresponding to the perception result, wherein the Token sequence is used to represent the road scene corresponding to the perception result; The Token sequence is input into the trained generation model to obtain a scene generation result of the road, wherein the scene generation result represents a scene predicted to occur on the road within a preset time in the future.

2. The method for generating a road scene according to claim 1, characterized in that: The encoding process of the perception result to obtain a Token sequence corresponding to the perception result includes: Extracting a single-frame perception result from the perception results, and performing rasterization processing on each of the single-frame perception results; Based on the information in each grid, feature classification is performed on each grid to obtain a feature state corresponding to each grid in the single-frame perception result; Based on the feature state corresponding to each grid in each of the single-frame perception results, Token information of each of the single-frame perception results is obtained, wherein the Token information represents the single-frame road scene corresponding to the single-frame perception result; According to the chronological order of the acquisition time of each of the single-frame perception results, the Token information of all the single-frame perception results are spliced ​​to obtain a Token sequence corresponding to the perception results.

3. The method for generating a road scene as claimed in claim 2, characterized in that: The obtaining of Token information of each single-frame perception result based on the feature state corresponding to each grid in each single-frame perception result includes: A feature state of each grid in the single-frame perception result is extracted, and the extracted feature states of each grid are combined to obtain a feature combination result of the single-frame perception result, wherein each feature combination result represents a scene of the single-frame perception result; each feature combination result that can be composed of the single-frame perception result is a first Token, and all the first Tokens are the Token information of the single-frame perception result.

4. The method for generating a road scene as claimed in claim 2, characterized in that: One of the characteristic states of each grid in the single-frame perception result is a second Token, and all of the second Tokens constitute the Token information of the single-frame perception result.

5. The method for generating a road scene as claimed in claim 2, characterized in that: The feature state includes the state of the target object, and the Token information of each single-frame perception result is obtained based on the feature state corresponding to each grid in each single-frame perception result, including: A third Token is generated based on the state of each target object in the single-frame perception result, wherein one state of one target object is a third Token, and all the third Tokens constitute the Token information of the single-frame perception information, and the state of the target object includes the grid position of the grid where the target object is located.

6. The method for generating a road scene according to any one of claims 1 to 5, characterized in that: The step of inputting the Token sequence into the trained generation model to obtain the scene generation result of the road includes: Inputting the Token sequence into the trained generation model to obtain a first prediction Token, wherein the first prediction Token represents a road scene predicted to appear on the road; Splicing the first predicted Token to the Token sequence to obtain the first Token splicing sequence; The i-th Token concatenation sequence is input into the trained generation model to obtain the i+1-th predicted Token, where i≥1; based on all the predicted Tokens, the scene generation result of the road is obtained.

7. The method for generating a road scene according to any one of claims 1 to 5, characterized in that: Before inputting the Token sequence into the trained generation model to obtain the scene generation result of the road, the method further includes: Acquire a token sample sequence annotated with a natural language sequence, wherein the natural language sequence is used to interpret a road scene described by the token sample sequence, and the token sample sequence represents road scene information; Inputting the Token sample sequence into the generation model to be trained to obtain a road prediction result, wherein the road prediction result includes a first Token prediction sequence and a natural language sequence corresponding to the first Token prediction sequence, and the first Token prediction sequence represents a prediction scenario of the generated road; Based on the road prediction result, the parameters in the planning model to be trained are updated to obtain a trained generation model; Correspondingly, the scene generation result includes a second Token prediction sequence and a natural language sequence corresponding to the second Token prediction sequence, and the second Token prediction sequence represents the generation scene of the road.

8. The method for generating a road scene according to any one of claims 1 to 5, characterized in that: Before inputting the Token sample sequence into the trained generation model to obtain a road generation result, the method further includes: Acquire a Token sample sequence, and input the Token sample sequence into a generation model to be trained, to obtain scene generation data of a road output by the generation model to be trained, wherein the Token sample sequence represents scene information of the road, and the scene generation data contains data of a target vehicle; Acquire historical takeover data, wherein the historical takeover data represents road scene data after a user takes over the target vehicle during the process of the target vehicle executing automatic driving within a historical time period; Calculating the similarity between the scenario generation data and the historical takeover data; Scoring the scene generation data based on the similarity to obtain a scoring result of the scene generation data; Based on the scoring result of the scene generation data, the parameters in the generation model to be trained are updated to obtain the trained generation model.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for generating a road scene as described in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for generating a road scene as claimed in any one of claims 1 to 8 is implemented.