Data preparation method and apparatus, computer device, and storage medium
By simulating vehicle parameterization and Markov chain model control state transition scenarios, rich simulated session data is generated, solving the problem of insufficient data acquisition in autonomous driving testing, achieving precise control of data scale and improving realism, and is suitable for concurrent testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGBO LOTUS ROBOTICS CO LTD
- Filing Date
- 2022-11-23
- Publication Date
- 2026-04-28
Smart Images

Figure CN115795672B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data preparation method, apparatus, computer equipment, and storage medium. Background Technology
[0002] With the development of automotive technology, autonomous driving technology has been widely applied to intelligent vehicle functions. Vehicles require comprehensive performance testing before leaving the factory. Therefore, to accurately evaluate autonomous driving performance, OEMs need to acquire a large amount of session data reflecting real user behavior when using autonomous driving functions. After processing this session data, various performance indicators are calculated, and operational measures are used to guide the iteration and optimization of autonomous driving performance. Thus, session data is fundamental to various testing and R&D projects. However, during the testing phase, before mass-produced vehicles are delivered to real users, obtaining high-quality session data to conduct effective R&D testing has become a challenge.
[0003] Currently, the commonly used technical means is to collect session data through real road tests when the test vehicle has the ability to generate session data. However, this method has several drawbacks. For example, the project heavily relies on session data with specific requirements. If there is no corresponding data generation capability or the data requirements are not met, it will hinder the project progress. Due to the limited number of test vehicles, the road test time and number of tests are limited, which also limits the scale of the generated session data, making it unfavorable for concurrent testing. It cannot cover multiple scenarios, and the cost of exhaustively listing all scenarios is very high, such as random session duration and random takeover failure. Summary of the Invention
[0004] Based on this, it is necessary to provide a data preparation method, apparatus, computer equipment, and storage medium to address the aforementioned technical problems, thereby overcoming the limitations caused by factors such as data sources, number of vehicles, test time, and market conditions in actual test projects. By parameterizing the actual test vehicles, the scale of vehicles can be effectively controlled, and the scale of simulated vehicles can be configured according to actual needs to generate data preparation threads corresponding to the vehicle scale, thus effectively regulating the scale of generated data.
[0005] A data preparation method, the method comprising:
[0006] Obtain the scale and configuration information of the simulated vehicles;
[0007] Based on the scale configuration information, the preset data preparation model is preprocessed to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread;
[0008] In response to the running instructions of the data preparation model, the simulation state of the vehicle is initialized.
[0009] Based on the vehicle operation rules preset in the data preparation model, control the simulated vehicle to simulate various state transition scenarios;
[0010] Based on the simulated actions of each simulated vehicle, simulated session data corresponding to each preparation thread is generated, and the required dataset is constructed from all simulated session data.
[0011] In one embodiment, the data preparation model includes at least one Markov chain model;
[0012] Based on the scale configuration information, the pre-processed data preparation model is used to generate at least one preparation thread and a simulated vehicle corresponding to that preparation thread. This includes the following steps:
[0013] Based on the scale configuration information, at least one Markov chain model is generated using the data preparation model, so that the Markov chain model can be used to control the simulated vehicle to simulate various operating states and state transition scenarios.
[0014] Based on the state transition scenario simulated by the vehicle, simulated session data is obtained to form the preparation thread corresponding to the Markov chain model.
[0015] In one embodiment, the Markov chain model represents the various operating state types of the simulated vehicle through different state nodes, and marks one of the state nodes as the initial operating state of the simulated vehicle.
[0016] The steps for initializing the simulated vehicle state in response to the running instructions of the data preparation model include:
[0017] In response to the running instructions of the data preparation model, obtain all state nodes of each Markov chain model;
[0018] By using pre-defined markers in the state nodes, the simulated vehicle is controlled to simulate its initial operating state.
[0019] In one embodiment, the Markov chain model represents the state transition scenarios that the simulated vehicle needs to simulate through the connection relationship between state nodes and associated state nodes, and controls the simulated vehicle to simulate one of the state transition scenarios through the pre-set transition function relationship of each state node.
[0020] Based on the pre-set vehicle operation rules in the data preparation model, the steps for controlling the simulated vehicle to simulate various state transition scenarios include:
[0021] Obtain the current state node of the simulated vehicle;
[0022] Based on the current state node, determine the pre-defined transition function relationship;
[0023] Based on the transfer function relationship, control the simulated vehicle to simulate one of the state transition scenarios in the transfer function relationship.
[0024] In one embodiment, the associated state node is represented as the state node itself or other state nodes, used to represent the operating state that the simulated vehicle will simulate.
[0025] Based on the transfer function relationship, the steps for controlling the simulated vehicle to simulate one of the state transition scenarios in the transfer function relationship include:
[0026] Based on the transfer function relationship, select a vehicle behavior corresponding to the current state node;
[0027] Based on the current state node and vehicle behavior, determine the associated state nodes and obtain the state transition scenario including the current state node and associated state nodes;
[0028] Based on the pre-defined probability configuration rules for various state transition scenarios, obtain the transition probability of the current state transition scenario;
[0029] The simulation vehicle is controlled according to the transition probability to simulate the state transition scenario based on the vehicle behavior.
[0030] In one embodiment, the step of generating simulation session data corresponding to each preparation thread based on the simulated actions of each simulated vehicle includes:
[0031] Based on the simulated actions of the simulated vehicle, the vehicle number, the running state corresponding to the current state node, the transfer function relationship, and the simulation time are recorded by the preparation thread.
[0032] The mileage increment value of the simulated action is calculated based on the transfer function relationship and added to the total mileage of the current simulated vehicle to obtain the mileage accumulation value;
[0033] Data including vehicle number, current operating status, transfer function relationship, mileage accumulation value, and simulation time are prepared into simulation session data for simulating actions.
[0034] In one embodiment, after the step of generating at least one Markov chain model using a data preparation model, the method further includes:
[0035] The Markov chain model is updated by updating the transfer function relationship and / or simulation time.
[0036] A data preparation apparatus, comprising:
[0037] The configuration acquisition module is used to acquire the scale and configuration information of the simulated vehicles;
[0038] The preprocessing module is used to preprocess the preset data preparation model according to the scale configuration information to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread.
[0039] The initialization module is used to control the initialization of the simulated vehicle's state in response to the running instructions of the data preparation model;
[0040] The simulation execution module is used to control the simulated vehicle to simulate various state transition scenarios according to the preset vehicle operation rules in the data preparation model;
[0041] The data preparation module is used to generate simulation session data corresponding to each preparation thread based on the simulated actions of each simulated vehicle, and to construct the required dataset from all simulation session data.
[0042] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0043] Obtain the scale and configuration information of the simulated vehicles;
[0044] Based on the scale configuration information, the preset data preparation model is preprocessed to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread;
[0045] In response to the running instructions of the data preparation model, the simulation state of the vehicle is initialized.
[0046] Based on the vehicle operation rules preset in the data preparation model, control the simulated vehicle to simulate various state transition scenarios;
[0047] Based on the simulated actions of each simulated vehicle, simulated session data corresponding to each preparation thread is generated, and the required dataset is constructed from all simulated session data.
[0048] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the following steps:
[0049] Obtain the scale and configuration information of the simulated vehicles;
[0050] Based on the scale configuration information, the preset data preparation model is preprocessed to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread;
[0051] In response to the running instructions of the data preparation model, the simulation state of the vehicle is initialized.
[0052] Based on the vehicle operation rules preset in the data preparation model, control the simulated vehicle to simulate various state transition scenarios;
[0053] Based on the simulated actions of each simulated vehicle, simulated session data corresponding to each preparation thread is generated, and the required dataset is constructed from all simulated session data.
[0054] The above-mentioned data preparation method, apparatus, computer equipment, and storage medium have the following technical effects.
[0055] (1) Because it adopts the method of obtaining the scale configuration information of the simulated vehicles, it meets the requirements of data preparation scale and is not limited by factors such as data source, number of vehicles, test time, and test scenario. The scale configuration information of the simulated vehicles can accurately control the data scale, which is suitable for scenarios with data scale requirements such as concurrent testing.
[0056] (2) Because the method of preprocessing the preset data preparation model to generate at least one preparation thread and the corresponding simulated vehicle is adopted, the scalability of the model is realized, and thus the data scale and the data generation scenario are not limited.
[0057] (3) By using the operation instructions to control the initialization of the simulated vehicle's simulated state and the vehicle's operation rules to control the simulated vehicle to simulate various state transition scenarios, the simulation session data corresponding to each preparation thread is generated according to the simulation action, and the required data set is constructed through all the simulation session data, thereby realizing the rapid generation of a large amount of rich simulation session data through the preprocessed data preparation model, which makes up for the defects such as insufficient scale and strong dependence of the actual measured data.
[0058] (4) Because the Markov chain model is used in the data preparation model, the state transition scenario of the simulated vehicle has a certain degree of randomness and maintains a certain distribution pattern, which improves the realism of the simulation data.
[0059] (5) The adoption of the mileage accumulation mechanism makes it possible to collect relevant autonomous driving operation indicators (such as MPI); the model update mechanism enriches the data diversity and covers autonomous driving session scenarios. Attached Figure Description
[0060] Figure 1 This is an application scenario diagram of the data preparation method in one embodiment;
[0061] Figure 2 This is a flowchart illustrating a data preparation method in one embodiment;
[0062] Figure 3 This is a schematic diagram illustrating the principle and flow of a Markov chain model in one embodiment.
[0063] Figure 4 This is a structural block diagram of the data preparation apparatus in one embodiment; Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0065] The data preparation method provided in this application can be applied to, for example... Figure 1 In the application environment shown, after the simulation starts, the scale of the simulated vehicles is configured first. Then, the preset model is preprocessed according to the configuration. The model is controlled to run according to the running instructions, and the required data is generated accordingly. After the data generation requirements are met, the simulation ends.
[0066] Reference Appendix Figure 2 As shown, the data preparation method provided in this application includes the following steps.
[0067] Step S100: Obtain the scale and configuration information of the simulated vehicle;
[0068] Step S200: Based on the scale configuration information, preprocess the preset data preparation model to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread.
[0069] Step S300: In response to the running command of the data preparation model, control the initialization of the simulated vehicle state;
[0070] Step S400: According to the vehicle operation rules preset in the data preparation model, control the simulated vehicle to simulate various state transition scenarios;
[0071] Step S500: Based on the simulated actions of each simulated vehicle, generate simulation session data corresponding to each preparation thread, and construct the required dataset using all simulation session data.
[0072] In step S100, the step of obtaining the scale configuration information of the simulated vehicles, the total number of simulated vehicles is preset according to the specific needs of the R&D project, for example, 100 vehicles, which constitutes the scale configuration information of the simulated vehicles in this embodiment.
[0073] The data preparation model in step S200 includes at least one Markov chain model; each Markov chain model is used to simulate the operating state and state transition scenario of a simulated vehicle. That is, the operating state and state transition scenario of a simulated vehicle are simulated through a Markov chain model, and the Markov chain models are independent of each other.
[0074] Step S200, based on the scale configuration information, preprocesses the preset data preparation model to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread, including:
[0075] Based on the scale configuration information, at least one Markov chain model is generated using the data preparation model, so that the Markov chain model can be used to control the simulated vehicle to simulate various operating states and state transition scenarios.
[0076] Based on the state transition scenario simulated by the vehicle, simulated session data is obtained to form the preparation thread corresponding to the Markov chain model.
[0077] Therefore, by associating the preparation thread with the Markov chain model, when the Markov chain model controls the simulated vehicle's operating state or state transition scenario, the preparation thread monitors and outputs the simulated session data. In other words, the Markov chain model drives the generation of simulated session data, simulating the vehicle's state during real-world use. In another embodiment, since the Markov chain model is needed to control the simulated vehicle's operation, different speeds can be set for different simulated vehicles under different conditions. This allows different simulated vehicles to have different simulated session data at the same state node or in the same state transition scenario.
[0078] In step S300, the Markov chain model represents various operating state types of the simulated vehicle through different state nodes, and marks one of the state nodes as the initial operating state of the simulated vehicle.
[0079] In one embodiment, reference is made to the appendix. Figure 3 As shown, the simulated vehicle's operating state types include at least parking, manual driving, automatic driving, takeover, and emergency strategy states. Further explanation is provided in Table 1 below, which illustrates the meaning of each operating state type.
[0080]
[0081] In one implementation, the parking state is marked as the initial operating state of the simulated vehicle.
[0082] In one implementation, step S300, the step of controlling the initialization of the simulated vehicle state in response to the running command of the data preparation model, includes:
[0083] Step S310: In response to the running instruction of the data preparation model, obtain all state nodes of each Markov chain model;
[0084] Step S320: Using the pre-set markers of the state node, control the simulated vehicle to simulate the initial running state.
[0085] To further explain, the data preparation method in this embodiment requires two manual operations. The first is to input the scale and configuration information of the simulated vehicle, and the second is to control the preprocessed data preparation model to run, so that the data preparation model controls the initialization of the simulated vehicle's state according to the running instructions, and then controls the simulated vehicle to simulate various state transition scenarios according to the preset vehicle operation rules.
[0086] In step S400, the Markov chain model represents the state transition scenario that the simulated vehicle needs to simulate through the connection relationship between state nodes and associated state nodes, and controls the simulated vehicle to simulate one of the state transition scenarios through the pre-set transition function relationship of each state node.
[0087] In this embodiment, each state node is configured with a corresponding transition function relationship, and the simulated vehicle is controlled to simulate at least one state transition scenario through each transition function relationship.
[0088] To further explain, the data preparation model includes several function libraries, a vehicle behavior library, and a Markov chain model. The function libraries pre-set various transition functions, and each transition function is associated with a state node in the Markov chain model. The vehicle behavior library pre-sets several vehicle behaviors, and establishes the connection relationship between state nodes and associated state nodes through different vehicle behaviors, thereby controlling the simulated vehicle to simulate the corresponding state transition scenarios.
[0089] In one implementation, step S400, which involves controlling the simulated vehicle to simulate various state transition scenarios according to the preset vehicle operation rules in the data preparation model, includes:
[0090] Step S410: Obtain the current state node of the simulated vehicle;
[0091] Step S420: Determine the pre-set transition function relationship based on the current state node;
[0092] Step S430: Based on the transfer function relationship, control the simulated vehicle to simulate one of the state transition scenarios in the transfer function relationship.
[0093] To further explain, in this embodiment, the associated state node refers to the state node itself or other state nodes, used to represent the operating state that the simulated vehicle will simulate. In other words, the operating state corresponding to the associated state node in this embodiment is the next operating state of the simulated vehicle.
[0094] In one implementation, step S430, which involves controlling a state transition scenario under the simulated vehicle transfer function relationship based on the transfer function relationship, includes:
[0095] Based on the transfer function relationship, select a vehicle behavior corresponding to the current state node;
[0096] Based on the current state node and vehicle behavior, determine the associated state nodes and obtain the state transition scenario including the current state node and associated state nodes;
[0097] Based on the pre-defined probability configuration rules for various state transition scenarios, obtain the transition probability of the current state transition scenario;
[0098] The simulation vehicle is controlled according to the transition probability to simulate the state transition scenario based on the vehicle behavior.
[0099] To further explain, as shown in Table 2 below, the transition function relationship of each state node can be understood as the connection relationship between the state node and its associated state nodes.
[0100]
[0101] As can be seen from Table 2 above, each current state node in this embodiment has a limited selection of vehicle behaviors. Vehicle behaviors are selected from the limited selections to control the simulated vehicle to perform the corresponding state transition scenarios.
[0102] For example, in the transition function relationship where the current state node is the parking state, when the simulated vehicle's behavior is to start a journey, it means that the simulated vehicle has entered the running state, and the associated state node is the manual driving state; when the simulated vehicle's behavior is to continue parking, it means that the simulated vehicle remains in the parking state, and the associated state node is the parking state.
[0103] To further explain, in this embodiment, the pre-defined probability configuration rules configure the transition probabilities for state transition scenarios of parking-manual driving and parking-parking based on a set time. For example, assuming that 8:00, 9:00, 17:00, 18:00, 22:00, and 1:00 each day represent peak traffic times for each road, the transition probability during these time periods is set to 0.9, and the transition probability during other off-peak times is set to 0.1. In the parking-parking state transition scenario, the transition probability is still configured based on the set time, but unlike the parking-manual driving scenario, the transition probability for parking-parking is calculated based on the parking-manual driving transition probability within the same time period. For example, if the current time period's state transition scenario is parking-manual driving with a transition probability of m, then the current time period's state transition scenario is parking-parking with a transition probability of 1-m, where 0 ≤ m ≤ 1.
[0104] For example, in the transition function relationship where the current state node is the manual driving state, when the simulated vehicle's behavior is to stop, it means that the simulated vehicle is simulating the driver's braking, and the associated state node is the parking state; when the simulated vehicle's behavior is periodic manual driving, it means that the simulated vehicle is maintaining the manual driving state, and the vehicle's behavior is controlled by periodic signals, and the associated state node is the manual driving state; when the simulated vehicle's behavior determines that the simulated vehicle meets the conditions for autonomous driving, it means that the simulated vehicle will enter the autonomous driving state, and the associated state node is the autonomous driving state.
[0105] To further explain, in the pre-set probability configuration rules of this embodiment, the transition probability of the state transition scenario from manual driving to parking is set to 0.05; the transition probability of the state transition scenario from manual driving to manual driving is set to 0.8; and the transition probability of the state transition scenario from manual driving to autonomous driving is set to 0.15.
[0106] For example, in the transition function relationship where the current state node is the autonomous driving state, when the simulated vehicle's behavior is to continue autonomous driving, it means that the simulated vehicle maintains the autonomous driving state, and its behavior is controlled by periodic signals; the associated state node is the autonomous driving state. When the simulated vehicle's behavior determines that it does not meet the conditions for autonomous driving, it means that the simulated vehicle will exit the autonomous driving state; the associated state node is the takeover state. When the simulated vehicle's behavior is to stop autonomously, it means that the simulated vehicle stops automatically; the associated state node is the parking state. When a vehicle malfunction is detected in the simulated vehicle's behavior, it means that the simulated vehicle has experienced a hardware failure during the autonomous driving process; the associated state node is the emergency strategy state.
[0107] To further explain, in the pre-set probability configuration rules of this embodiment, the transition probability of the state transition scenario from autonomous driving to autonomous driving is set to 0.8; the transition probability of the state transition scenario from autonomous driving to takeover is set to 0.09; the transition probability of the state transition scenario from autonomous driving to parking is set to 0.1; and the transition probability of the state transition scenario from autonomous driving to emergency strategy is set to 0.01.
[0108] For example, in the transition function relationship where the current state node is in the takeover state, when the vehicle behavior of the simulated vehicle is a takeover response, it means that the driver in the simulated vehicle has successfully taken over, and the associated state node is the manual driving state; when the vehicle behavior of the simulated vehicle is a takeover non-response, it means that the driver in the simulated vehicle has not successfully taken over, and the associated state node is the emergency strategy state.
[0109] To further explain, in the pre-set probability configuration rules of this embodiment, the transition probability of the state transition scenario of takeover-manual driving is set to 0.8; and the transition probability of the state transition scenario of takeover-emergency strategy is set to 0.2.
[0110] For example, in the transition function relationship where the current state node is the emergency strategy state, the simulated vehicle's behavior is to stop, and the associated state node is the parked state.
[0111] To further explain, in the pre-set probability configuration rules of this embodiment, the transition probability of the state transition scenario as emergency strategy - parking is set to 1.
[0112] In one embodiment, step S500 involves generating simulation session data corresponding to each preparation thread based on the simulated actions of each simulated vehicle, and constructing the required dataset using all the simulation session data. Step S500, generating simulation session data corresponding to each preparation thread based on the simulated actions of each simulated vehicle, includes:
[0113] Step S510: Based on the simulated actions of the simulated vehicle, the vehicle number, the running state corresponding to the current state node, the transfer function relationship, and the simulation time are recorded by the preparation thread.
[0114] Step S520: Calculate the mileage increment value of the simulated action according to the transfer function relationship, and add it to the total mileage of the current simulated vehicle to obtain the mileage accumulation value;
[0115] Step S530: Prepare simulation session data for simulated actions from data including vehicle number, current operating status, transfer function relationship, mileage accumulation value, and simulation time.
[0116] Each preparation thread is configured with a fixed simulation session data format, such as the simulation session data format shown in Table 3 below.
[0117]
[0118] In this implementation, a model optimization mechanism is introduced for specific transfer function relationships to increase the realism and richness of the data. Examples include a mileage accumulation mechanism, an automatic update mechanism for long-distance driving scenarios, an automatic update mechanism for mixed urban / elevated driving scenarios, and an automatic update mechanism for scenarios requiring minimal duration.
[0119] In the mileage accumulation mechanism, step S520 of this embodiment calculates the mileage increment value of the simulated action according to the transfer function relationship and adds it to the total mileage of the current simulated vehicle. In the step of obtaining the mileage accumulation value, the mileage accumulation in the initial running state of each preparation thread is reset to zero. When different transfer function relationships are passed, the increment value is calculated logically and added to the total mileage of the vehicle in the current state node. The mileage calculation logic in this embodiment operates according to different transfer function relationships. For example, after the vehicle behavior is to continue parking after the parking state, its mileage accumulation value is 0. The mileage accumulation value for periodic manual driving is 50m-80m, and the mileage accumulation value for automatic parking is 8.3m * duration.
[0120] To further explain, after step S500 in this embodiment, the method also includes: controlling the start and stop of the simulated vehicles in all preparation threads according to the data scale requirements. This means that the simulation ends by stopping or deleting all Markov chain models, stopping the generation of session data, and ending the simulation.
[0121] In one embodiment, after the step of generating at least one Markov chain model using a data preparation model, the method further includes updating the Markov chain model by updating the transfer function relationship and / or the simulation time.
[0122] In the automatic update mechanism for long-distance driving scenarios, when the simulated vehicle experiences the transfer function relationship of periodic manual driving state or periodic autonomous driving state, 1-2160 transfer function relationships are randomly copied as the future transfer function relationship of the simulated vehicle.
[0123] In the automatic update mechanism for urban / elevated mixed scenarios, when the simulated vehicle experiences the transition function relationship of the periodic autonomous driving state, an urban (e.g., at least 5 minutes) scenario or a mixed scenario of urban (e.g., at least 30 seconds), elevated (e.g., at least 5 minutes), and urban (e.g., at least 30 seconds) scenarios are randomly generated.
[0124] In the minimum duration automatic update mechanism, after the simulated vehicle passes through the transfer function relationship of vehicle parking, it is forced to maintain the parking state for at least 1 hour; after the vehicle passes through the transfer function relationship of the takeover state being responded to, it is forced to maintain the periodic manual driving state for at least 1 minute.
[0125] The aforementioned data preparation method meets the data preparation scale requirements by acquiring the scale configuration information of the simulated vehicles, and is not limited by factors such as data source, number of vehicles, test time, and test scenario. It employs a method of preprocessing a preset data preparation model based on the scale configuration information to generate at least one preparation thread and a corresponding simulated vehicle, thus achieving model scalability. According to the running instructions, the simulated vehicle's simulation state is initialized; according to the vehicle operation rules preset in the data preparation model, the simulated vehicle simulates various state transition scenarios; based on the simulated actions of each simulated vehicle, simulation session data corresponding to each preparation thread is generated, and the required dataset is constructed from all simulation session data. Through the preprocessed data preparation model, a large amount of rich simulation session data is quickly generated, compensating for the deficiencies of insufficient scale and strong dependency of actual test data. The data preparation model uses a Markov chain model, which gives the simulated vehicle's state transitions a certain degree of randomness while maintaining a certain distribution pattern, improving the realism of the simulation data. By simulating the scale and configuration information of vehicles, the data scale can be precisely controlled, which is suitable for scenarios with data scale requirements such as concurrent testing; the mileage accumulation mechanism makes it possible to collect relevant autonomous driving operation indicators (such as MPI); the model update mechanism enriches the data diversity and covers autonomous driving session scenarios.
[0126] It should be understood that although the steps in the accompanying drawings are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0127] In one embodiment, refer to Appendix Figure 4 As shown, a data preparation apparatus is provided, comprising: a configuration acquisition module 100, a preprocessing module 200, a runtime initiation module 300, a simulation execution module 400, and a data preparation module 500, wherein:
[0128] The configuration acquisition module 100 is used to acquire the scale configuration information of the simulated vehicle;
[0129] The preprocessing module 200 is used to preprocess the preset data preparation model according to the scale configuration information to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread.
[0130] The initialization module 300 is used to control the initialization of the simulated vehicle state in response to the running instructions of the data preparation model;
[0131] The simulation execution module 400 is used to control the simulated vehicle to simulate various state transition scenarios according to the preset vehicle operation rules in the data preparation model;
[0132] The data preparation module 500 is used to generate simulation session data corresponding to each preparation thread based on the simulated actions of each simulated vehicle, and to construct the required data set through all simulation session data.
[0133] Specific limitations regarding the data preparation device can be found in the limitations of the data preparation method described above, and will not be repeated here. Each module in the aforementioned data preparation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0134] Those skilled in the art will understand that the structures shown in the accompanying drawings are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figures, or combine certain components, or have different component arrangements.
[0135] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0136] Obtain the scale and configuration information of the simulated vehicles;
[0137] Based on the scale configuration information, the preset data preparation model is preprocessed to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread;
[0138] In response to the running instructions of the data preparation model, the simulation state of the vehicle is initialized.
[0139] Based on the vehicle operation rules preset in the data preparation model, control the simulated vehicle to simulate various state transition scenarios;
[0140] Based on the simulated actions of each simulated vehicle, simulated session data corresponding to each preparation thread is generated, and the required dataset is constructed from all simulated session data.
[0141] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0142] Obtain the scale and configuration information of the simulated vehicles;
[0143] Based on the scale configuration information, the preset data preparation model is preprocessed to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread;
[0144] In response to the running instructions of the data preparation model, the simulation state of the vehicle is initialized.
[0145] Based on the vehicle operation rules preset in the data preparation model, control the simulated vehicle to simulate various state transition scenarios;
[0146] Based on the simulated actions of each simulated vehicle, simulated session data corresponding to each preparation thread is generated, and the required dataset is constructed from all simulated session data.
[0147] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0148] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0149] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A data preparation method, characterized in that, The method includes: Obtain the scale and configuration information of the simulated vehicles; Based on the scale configuration information, the preset data preparation model is preprocessed to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread; wherein, each preparation thread corresponds to an independent Markov chain model, and the Markov chain model is used to define the running state and state transition scenario of the corresponding simulated vehicle through the state nodes and the transition function relationship between the nodes. In response to the running command of the data preparation model, the simulation state of the simulated vehicle is initialized. According to the vehicle operation rules preset in the data preparation model, the simulated vehicle is controlled to simulate various state transition scenarios; Based on the simulated actions of the simulated vehicle, the preparation thread records the vehicle number, the operating state corresponding to the current state node, the transfer function relationship, and the simulation time of the simulated vehicle; the mileage increment value of the simulated action is calculated based on the transfer function relationship and added to the total mileage of the simulated vehicle to obtain the mileage accumulation value; the data including the vehicle number, current operating state, transfer function relationship, mileage accumulation value, and simulation time are prepared into simulation session data of the simulated action, and the required data set is constructed through all the simulation session data.
2. The data preparation method according to claim 1, characterized in that, The data preparation model includes at least one of the Markov chain models; The step of preprocessing the preset data preparation model according to the scale configuration information to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread includes: Based on the scale configuration information, at least one Markov chain model is generated using the data preparation model, so as to use the Markov chain model to control the simulated vehicle to simulate various operating states and state transition scenarios. Based on the state transition scenario simulated by the simulated vehicle, the simulated session data is obtained to form the preparation thread corresponding to the Markov chain model.
3. The data preparation method according to claim 2, characterized in that, The Markov chain model represents the various operating state types of the simulated vehicle through different state nodes, and marks one of the state nodes as the initial operating state of the simulated vehicle. The step of controlling the initialization of the simulated vehicle state in response to the running command of the data preparation model includes: In response to the running instructions of the data preparation model, all state nodes of each Markov chain model are obtained; The simulated vehicle is controlled to simulate its initial operating state by using the pre-set markers of the state nodes.
4. The data preparation method according to claim 2, characterized in that, The Markov chain model represents the state transition scenarios that the simulated vehicle needs to simulate through the connection relationship between the state nodes and associated state nodes, and controls the simulated vehicle to simulate one of the state transition scenarios through the pre-set transition function relationship of each state node. The step of controlling the simulated vehicle to simulate various state transition scenarios according to the preset vehicle operation rules in the data preparation model includes: Obtain the current state node of the simulated vehicle; Based on the current state node, determine the pre-defined transition function relationship; Based on the transfer function relationship, the simulated vehicle is controlled to simulate one of the state transition scenarios in the transfer function relationship.
5. The data preparation method according to claim 4, characterized in that, The associated state node is represented by the state node itself or other state nodes, and is used to represent the operating state that the simulated vehicle will simulate. The step of controlling the simulated vehicle to simulate one of the state transition scenarios in the transfer function relationship, based on the transfer function relationship, includes: Based on the aforementioned transfer function relationship, a vehicle behavior corresponding to the current state node is selected. Based on the current state node and the vehicle behavior, determine the associated state node and obtain the state transition scenario including the current state node and the associated state node; Based on the pre-defined probability configuration rules for each of the aforementioned state transition scenarios, obtain the transition probability of the current state transition scenario; Based on the transition probability, the simulated vehicle is controlled to simulate the state transition scenario according to the vehicle behavior.
6. The data preparation method according to claim 1, characterized in that, After the step of generating at least one Markov chain model using the data preparation model, the method further includes: The Markov chain model is updated by updating the transfer function relationship and / or the simulation time.
7. A data preparation apparatus, characterized in that, The device includes: The configuration acquisition module is used to acquire the scale and configuration information of the simulated vehicles; The preprocessing module is used to preprocess the preset data preparation model according to the scale configuration information to generate at least one preparation thread and a simulated vehicle corresponding to the preparation thread; wherein, each preparation thread corresponds to an independent Markov chain model, and the Markov chain model is used to define the running state and state transition scenario of the corresponding simulated vehicle through the state nodes and the transition function relationship between the nodes. The initialization module is used to control the initialization of the simulated vehicle state in response to the running instructions of the data preparation model; The simulation execution module is used to control the simulated vehicle to simulate various state transition scenarios according to the preset vehicle operation rules in the data preparation model; The data preparation module is used to record the vehicle number, the operating state corresponding to the current state node, the transfer function relationship, and the simulation time of the simulated vehicle through the preparation thread, based on the simulated actions of the simulated vehicle; calculate the mileage increment value of the simulated action according to the transfer function relationship, and add it to the total mileage of the simulated vehicle to obtain the mileage accumulation value; prepare the data including the vehicle number, current operating state, transfer function relationship, mileage accumulation value, and simulation time into the simulated session data of the simulated action, and construct the required data set through all the simulated session data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Systems and methods for machine learning using a trusted model
US20170364831A1
Training system for autonomous driving control policy
US20200372822A1