Vehicle simulation test method and device and electronic equipment
By installing simulation software containers in the cloud, the problems of high resource consumption and complex installation in existing technologies are solved, enabling convenient testing and real-time data playback without the need for local high-performance configuration, thus improving the efficiency of autonomous driving simulation testing.
Patent Information
- Application Number
- CN202511855787.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-01-16
AI Technical Summary
Existing vehicle autonomous driving simulation testing methods suffer from problems such as huge resource consumption, complex installation, and inability to replay test data in real time, resulting in poor convenience and efficiency.
The simulation software is installed in a container on a cloud server. The client establishes a connection with the cloud to perform interface matching and scene simulation. Simulation data is output in real time and transmitted to the client. Users can watch the replay video online on the web.
It eliminates the need for local high-performance configurations and complex dependency environments, improving the convenience and flexibility of testing, enabling simultaneous simulation and playback of simulation data, and enhancing testing efficiency.
Smart Images

Figure CN121349902A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of simulation testing, and in particular relates to a vehicle simulation testing method, device and electronic equipment. Background Technology
[0002] With the development of autonomous driving technology, simulation testing applications have also grown rapidly in recent years. Autonomous driving simulation testing for vehicles primarily uses mathematical modeling to digitize the application scenarios of autonomous driving, establishing a system model that closely resembles the real world, and then using software simulation to test and verify autonomous driving. This type of simulation testing can, to some extent, replace real-vehicle road testing.
[0003] Currently, the common simulation testing method is to install the simulation software on one or more high-configuration computers locally. The shortcomings of this method are that the simulation process consumes a lot of video memory and requires a high-configuration CPU / GPU; the installation process of simulation software is complicated, requiring the installation of specific versions of environment dependencies, and migration is also difficult; at the same time, existing technology cannot replay test data in real time, resulting in poor convenience and efficiency of testing.
[0004] Therefore, improving the convenience and efficiency of autonomous driving simulation testing for vehicles is an urgent technical problem to be solved. Summary of the Invention
[0005] This application provides a vehicle simulation testing method, apparatus, and electronic device, which can improve the convenience and efficiency of autonomous driving simulation testing of vehicles.
[0006] On the one hand, embodiments of this application provide a vehicle simulation testing method, the method comprising: Receive scene files and simulation engine version information sent by the client; the scene files are used to describe the virtual test scenario of the vehicle under test; Based on the simulation engine version information, a target simulation engine container instance is created; the target simulation engine container instance includes the target simulation engine, the target simulation engine's dependent environment, and the target simulation engine's license information; The target simulation engine container instance is started to execute the scenario file, and the simulation test data of the vehicle under test at each moment in the virtual test scenario is obtained. The simulation test data and the test task identifier corresponding to the scenario file are stored in the data cache container. Upon receiving a result viewing request from the client, the simulation test data stored in the data cache container corresponding to the task identifier is transmitted to the client as a data stream.
[0007] In one exemplary embodiment, after receiving the scene file and simulation engine version information sent by the client, the method further includes: Assign a test task identifier to the test task corresponding to each of the aforementioned scenario files; Send the task identifier to the client; In one exemplary embodiment, creating a target simulation engine container instance based on the simulation engine version information includes: The target container image corresponding to the simulation engine version information is matched from the container image repository; the container image repository includes multiple preset container images; each preset container image includes preset simulation engine version information and the environment dependency information of the preset simulation engine. Create a simulation engine container instance corresponding to the target container image based on the number of test task identifiers; The control license agent container allocates licenses to the simulation engine container instance based on the number of free licenses in the license resource pool, thereby obtaining the target simulation engine container instance.
[0008] In one exemplary embodiment, the control license agent container allocates licenses to the simulation engine container instance based on the number of free licenses in the license resource pool, thereby obtaining the target simulation engine container instance, including: If the number of idle licenses in the license resource pool is greater than the number of test task identifiers, a license is allocated to each simulation engine container instance to obtain the target simulation engine container instance. If the number of idle licenses in the license resource pool is less than the number of test task identifiers, the number of idle licenses in the license resource pool is determined as the target number, and the license proxy container is controlled to allocate licenses to the target number of simulation engine container instances to obtain the target simulation engine container instances. The simulation engine container instance that has not been assigned a license waits until a free license becomes available in the license resource pool.
[0009] In one exemplary embodiment, the process of constructing the license resource pool includes: Controls the establishment of a communication connection between the license agent container and the license management server; Based on the communication connection, license information from the license management server is obtained, and the license resource pool is constructed.
[0010] In one exemplary embodiment, upon receiving a result viewing request from the client, transmitting the simulation test data stored in the data cache container corresponding to the task identifier as a data stream to the client may include: If a result viewing request is received from the client, the simulation test completion status of the vehicle under test in the virtual test scenario is obtained. If the simulation test completion status indicates that the vehicle under test has not completed the simulation test in the virtual test scenario, the simulation test data in the data cache container before the current time is formed into a data stream and transmitted to the client, and the simulation test data after the current time is present in the data cache container is transmitted to the client in real time. If the simulation test completion status indicates that the vehicle under test has completed the simulation test in the virtual test scenario, the simulation test data at all times in the data cache container will be formed into a data stream and transmitted to the client.
[0011] In one exemplary embodiment, the simulation test data includes simulation result images and vehicle status data of the vehicle under test; the step of transmitting the simulation test data corresponding to the task identifier stored in the data cache container to the client as a data stream includes: The simulation result image corresponding to the task identifier and the vehicle status data of the vehicle under test, which are stored in the data cache container, are serialized to obtain serialized data. A first data transmission channel is established with the client according to the first data transmission protocol; If the first data transmission channel is successfully established, the data stream formed by the serialized data will be transmitted to the client through the first data transmission channel; If the first data transmission channel fails to be established, a second data transmission channel is established with the client according to the second data transmission protocol; the transmission delay of the first data transmission protocol is less than the transmission delay of the second data transmission protocol. The data stream formed by the serialized data is transmitted to the client through the second data transmission channel.
[0012] In one exemplary embodiment, receiving the scene file and simulation engine version information sent by the client includes: Receive resource query requests sent by the client; Send preset simulation engine version information to the client so that the client can select the simulation engine version information corresponding to the scene file; The system receives a connection request from the client and establishes a control command transmission channel with the client. The connection request includes simulation engine version information. Receive a start test request sent by the client, the start test request including a scenario file.
[0013] In one exemplary embodiment, during the execution of the scenario file by the target simulation engine container instance to obtain the simulation test data of the vehicle under test at each moment in the virtual test scenario, the method further includes: If a simulation test pause command is received from the client, the target simulation engine container instance is controlled to pause the execution of the scene file; If a simulation test stop command is received from the client, the target simulation engine container instance is controlled to stop executing the scene file, and after the stop state continues for a preset time, it is determined that the target simulation engine container instance has completed the test task corresponding to the scene file. If a reload command is received from the client, the target simulation engine container is controlled to re-execute the scene file; If a single-step execution instruction is received from the client, the target simulation engine container is controlled to output the simulation test data corresponding to the next moment of the scene file at the current moment.
[0014] On the other hand, this application also provides a vehicle simulation testing device, which includes: The request receiving module is used to receive the scene file and simulation engine version information sent by the client; the scene file is used to describe the virtual test scenario of the vehicle under test. The container instance creation module is used to create a target simulation engine container instance based on the simulation engine version information; the target simulation engine container instance includes the target simulation engine, the dependent environment of the target simulation engine, and the license information of the target simulation engine; The data caching module is used to start the target simulation engine container instance to execute the scene file, obtain the simulation test data of the vehicle under test at each moment in the virtual test scenario, and store the simulation test data and the test task identifier corresponding to the scene file into the data caching container; The data sending module is used to transmit the simulation test data stored in the data cache container corresponding to the task identifier to the client as a data stream when a result viewing request is received from the client.
[0015] On the other hand, this application also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the vehicle simulation test method as described above.
[0016] On the other hand, this application also provides a computer storage medium storing at least one instruction or at least one program, which is loaded and executed by a processor to implement the vehicle simulation test method described above.
[0017] On the other hand, this application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the vehicle simulation testing method as described above.
[0018] The vehicle simulation testing method provided in this application has the following technical effects: In this embodiment, a target simulation engine container instance is dynamically created by receiving a scene file and simulation engine version information sent by a client. This target simulation engine container instance includes the target simulation engine, its dependent environment, and its license information. The target simulation engine container instance is then started to execute the scene file, obtaining simulation test data of the vehicle under test at each moment in the virtual test scenario. The simulation test data and the test task identifier corresponding to the scene file are stored in a data cache container. Upon receiving a result viewing request from the client, the simulation test data stored in the data cache container corresponding to the task identifier is transmitted to the client as a data stream. This simulation testing method does not require high-performance local configuration or complex dependent environments, making testing more convenient. Furthermore, if the test site changes, the simulation test data can be viewed simply by accessing the test management page on the client, improving testing flexibility. In addition, the data stream transmission between cloud clients in this application enables simultaneous simulation and playback of simulation data, effectively improving the testing efficiency of autonomous driving simulation testing. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is an application environment diagram of the vehicle simulation testing method provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the vehicle simulation testing method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the process for dynamically creating a target simulation engine container provided in an embodiment of this application; Figure 4 This is a schematic diagram of the process for transmitting simulation test data provided in an embodiment of this application; Figure 5 This is a flowchart illustrating the vehicle simulation testing method provided in the embodiments of this application; Figure 6 This is a schematic diagram of the vehicle simulation testing device provided in the embodiments of this application; Figure 7 This is a hardware structure block diagram of a server for a vehicle simulation testing method provided in an embodiment of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0023] For autonomous driving simulation testing, current technologies typically install the simulation engine on a local high-performance workstation or computer, select the test scenario and parameter configuration, output test results after completion, generate a test report, and replay the test process. Current mainstream autonomous driving simulation testing devices consist of the following three layers: Local physical layer: one or more high-configuration computers / workstations, running operating systems such as Windows / Linux; Software layer: locally installed simulation software and license management module; Interaction layer: a local graphical user interface or script, communicating with the simulation engine via inter-process calls (DLL / SO) or TCP loopback.
[0024] This testing method has the following shortcomings: 1. Resource bottleneck: The simulation engine consumes a huge amount of CPU / GPU memory, with peak GPU memory usage reaching 12GB in a single scene and single-frame latency >80ms; therefore, a high-performance computer is required to run the test. 2. The simulation software requires a license to use all its functions, but the utilization rate of the license purchased in this method is low, often less than 30%. 3. Installing the simulation software is relatively complex, depending on specific CUDA, OpenGL, and Python versions. If migration is required, it takes an average of 3-5 person-days. 4. Current technology only packages the logs once after the simulation ends, and playback can only be performed after the entire test is completed, making real-time playback of test data impossible; if there are many test scenarios, a lot of waiting time is required, and real-time diagnosis is not possible.
[0025] To address the aforementioned shortcomings, this application proposes a vehicle simulation testing method. The simulation software is installed as a container on a cloud server, and test management software is installed on a local client to establish a connection with the simulation software on the cloud server. After establishing the connection, interface matching and scenario simulation are performed. Then, a streaming encoder is used to output real-time simulation data and test videos, which are transmitted to the client. Users only need to log in to the relevant webpage on the client to watch the replay video online.
[0026] Figure 1 This is an application environment diagram of the vehicle simulation testing method provided in the embodiments of this application. For example... Figure 1 As shown, the application environment can include at least cloud 01 and client 02.
[0027] In an optional embodiment, cloud 01 can be used to perform vehicle simulation testing in response to a start test request from client 02, and to stream simulation test data to client 02 in response to a result viewing request from client 02. Cloud 01 can create multiple containerized simulation engine containers, license proxy containers, and data cache containers; the simulation engine containers are dynamically created and destroyed according to the simulation test tasks; the license proxy containers are responsible for centrally managing all licenses, forming a license resource pool, and are decoupled from the simulation engine containers, dynamically allocating and revoking licenses through heartbeat detection; the data cache containers are used to temporarily store real-time streaming data generated during the test to cope with network fluctuations and support breakpoint resumption. It should be noted that cloud 01 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services, and can utilize containerization and orchestration technologies to achieve on-demand allocation and efficient management of resources. It should be noted that in this embodiment, cloud 01 can be constructed in the following manner: Plan and configure a Virtual Private Cloud (VPC) on a cloud service provider or a local server with sufficient computing power. This VPC contains a pool of compute nodes (typically instances equipped with high-performance GPUs) for running simulation testing tasks. All nodes in the compute node pool are pre-installed with container runtimes (such as Docker) and cluster orchestration tools (such as the Node component of Kubernetes).
[0028] In an optional embodiment, client 02 can be used to write software code or software documentation. Developers can use client 02 to write or select scene files for the virtual test scenario to be simulated, generate a test request, send it to cloud 01, and receive simulation test data sent by cloud 01. It should be noted that client 02 can support WebAssembly rendering, has built-in FFmpeg and WebGL decoders, supports H.264 / H.265 hardware decoding, and has an end-to-end latency of less than 200 milliseconds. Specifically, client 02 can be, but is not limited to, electronic devices such as smartphones, desktop computers, tablets, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, in-vehicle terminals, and smart TVs; it can also be software running on the aforementioned electronic devices, such as applications or mini-programs. The operating system running on the electronic device in this embodiment can include, but is not limited to, Android, iOS, Linux, and Windows systems.
[0029] Figure 2This is a flowchart illustrating the vehicle simulation testing method provided in the embodiments of this application. Figure 2 The method shown is executed primarily in the cloud. For example... Figure 2 As shown, the method may include: S201: Receive scene files and simulation engine version information sent by the client; The scenario file is used to describe the virtual test scenario of the vehicle under test; the virtual test scenario includes multiple virtual traffic elements.
[0030] The client can generate a scenario file named scenario.json. This scenario file can be written by developers or selected from a preset scenario library. This application does not limit the source of the scenario file. The scenario file is used to describe a virtual test scenario, simulating the actual driving environment of vehicles in the real world. The virtual test scenario includes multiple virtual traffic elements, which can be divided into static traffic elements and dynamic traffic elements. Static traffic elements include, but are not limited to, road types, traffic facilities, geographic information, and static obstacles, while dynamic traffic elements include, but are not limited to, dynamic traffic signs and dynamic obstacles.
[0031] Along with determining the scene file to be simulated, you can also select the simulation engine and version. For example, you can choose simulation software A, version 1.1, or simulation software B, version 1.2. Different simulation software and versions have their own advantages in different simulation functions. For example, simulation software A excels at sensor modeling, while simulation software B excels at macro / micro traffic flow analysis. In one embodiment, the simulation engine and version can also be determined based on the data organization format of the scene file.
[0032] The client sends the determined scene file and simulation engine version information to the cloud for simulation testing.
[0033] It should be noted that there are multiple clients in this application. For the cloud, it can receive scene files and simulation engine version information sent by multiple clients at the same time. For each client, the cloud can dynamically create a target simulation engine container instance to realize multi-user concurrency of simulation testing.
[0034] S203: Create a target simulation engine container instance based on the simulation engine version information; After receiving the scene file and simulation engine version information sent by the client, the cloud server can dynamically create a target simulation engine container instance. The target simulation engine container instance is a simulation unit containing a complete runtime environment, including the target simulation engine, its dependent environments, and its license information. The dependent environments include specific versions of the CUDA driver, OpenGL library, Python environment, etc., required to run the target simulation engine. The license information ensures that the target simulation engine can implement different simulation testing functions.
[0035] S205: Start the target simulation engine container instance to execute the scenario file, obtain the simulation test data of the vehicle under test at each moment in the virtual test scenario, and store the simulation test data and the test task identifier corresponding to the scenario file into the data cache container; The target simulation engine container instance is launched to execute the scenario file. Simultaneously, the autonomous driving control algorithm or vehicle control parameters of the vehicle under test are obtained from the cloud. The target simulation engine container can simulate the driving process of the vehicle under test in the virtual test scenario corresponding to the scenario file. This driving process often includes multiple moments. In this application, after obtaining the simulation test data for each moment, the simulation test data for that moment is stored in the data cache container in real time.
[0036] The simulation test data includes simulation result images and vehicle status data of the vehicle under test; the simulation result images are images in the virtual test scene at each moment, and the vehicle status data includes, but is not limited to, vehicle speed, vehicle steering angle, etc.
[0037] The data cache container is created in the cloud. Specifically, it can be deployed using orchestration tools and configured with high-performance network storage volumes to temporarily store simulation test data generated in real time by the simulation engine. As a data relay station, the data cache container ensures data is not lost during network fluctuations and supports resuming interrupted downloads.
[0038] It should be noted that each scenario file can be regarded as a simulation test task and has a test task identifier; when storing simulation test data, the test task identifier and simulation test data can be stored accordingly.
[0039] S207: Upon receiving a result viewing request from the client, the simulation test data stored in the data cache container corresponding to the task identifier is formed into a data stream and transmitted to the client.
[0040] It should be noted that the cloud can assign a test task identifier to the simulation test task corresponding to each scene file and return this test task identifier to the client; the result viewing request sent by the client includes this test task identifier. For example, if a user wants to view the simulation test data corresponding to scene file 1, and the test task identifier for scene file 1 is 'a', then the result viewing request sent by the client includes test task identifier 'a'. The cloud retrieves the simulation test data corresponding to test task identifier 'a' from the data cache container and streams it to the client.
[0041] In one embodiment, the cloud can also stream the simulation test data from the data cache container to the client in real time after storing the simulation test data in the data cache container.
[0042] After receiving the simulation test data sent from the cloud, the client can perform media processing and rendering on the web page based on the FFmpeg and WebGL decoders built into the test management page in the client. Users can drag and drop to replay the data at any position on the progress bar.
[0043] In this embodiment, a target simulation engine container instance is dynamically created by receiving a scene file and simulation engine version information sent by a client. This target simulation engine container instance includes the target simulation engine, its dependent environment, and its license information. The target simulation engine container instance is then started to execute the scene file, obtaining simulation test data of the vehicle under test at each moment in the virtual test scenario. The simulation test data and the test task identifier corresponding to the scene file are stored in a data cache container. Upon receiving a result viewing request from the client, the simulation test data stored in the data cache container corresponding to the task identifier is transmitted to the client as a data stream. This simulation testing method does not require high-performance local configuration or complex dependent environments, making testing more convenient. Furthermore, if the test site changes, the simulation test data can be viewed simply by accessing the test management page on the client, improving testing flexibility. In addition, the data stream transmission between cloud clients in this application enables simultaneous simulation and playback of simulation data, effectively improving the testing efficiency of autonomous driving simulation testing.
[0044] In one embodiment, receiving the scene file and simulation engine version information sent by the client includes: receiving a resource query request sent by the client; sending preset simulation engine version information to the client so that the client selects the simulation engine version information corresponding to the scene file; receiving a connection request sent by the client and establishing a control command transmission channel with the client, wherein the connection request includes the simulation engine version information; and receiving a start test request sent by the client, wherein the start test request includes the scene file.
[0045] In this embodiment, the simulation software is installed in the cloud as a container, while the local client may only have the test management software installed. A control command transmission channel is established between the local client and the cloud to connect to the cloud-based simulation software. In one embodiment, the control command transmission channel can be established based on the TCP long connection protocol to achieve a reliable and stable connection.
[0046] Specifically, the client first sends a resource query request to the cloud. The cloud returns a list of supported simulation engine versions, including at least one preset simulation engine version. Then, the client can select a different simulation engine version based on the scene file and send a connection request. After confirmation by the cloud, a control command transmission channel is established. Finally, the client can generate a start test request from the scene file and send it to the cloud via the control transmission channel.
[0047] This application embodiment achieves interface matching between the client and the cloud simulation software through cloud resource query, and establishes a control command transmission channel. This control command transmission channel can achieve a reliable and stable connection, enabling the client to accurately control the cloud simulation engine in real time.
[0048] In one embodiment, after receiving the scene file and simulation engine version information sent by the client, the method of this application further includes: Assign a test task identifier to the test task corresponding to each scenario file; send the task identifier to the client; the test task identifier can be recorded as a sessionID, which can be understood as a unique task number, and is returned to the client to be bound to the current test task. The test management page of the local client will display the sessionID of the test task corresponding to each scenario file for the user to view.
[0049] Upon receiving the scene file and simulation engine version information from the client, the cloud first dynamically creates a target simulation engine container, providing an independent simulation processing unit for each scene file. In one embodiment, the client can also send a request for the amount of resources (such as the number of GPUs and the size of memory) to the cloud; based on the requested amount of resources, the cloud selects suitable nodes from the computing node pool and creates the target simulation engine container on those nodes. Figure 3 This is a schematic diagram illustrating the process of dynamically creating a target simulation engine container according to an embodiment of this application. For example... Figure 3 As shown, the step of creating a target simulation engine container instance based on the simulation engine version information includes: S301: Match the target container image that corresponds to the simulation engine version information from the container image repository; The container image repository includes multiple preset container images; each preset container image includes preset simulation engine version information and the environment dependency information of the preset simulation engine. In one embodiment, different simulation software (such as VTD, CARLA) and their complex dependencies (including specific versions of CUDA drivers, OpenGL libraries, Python environments, etc.) are pre-packaged into Docker images conforming to the Open Container Initiative (OCI) standard. Each image is an independently runnable simulation engine unit. These images are pushed to a private container image repository for unified version management.
[0050] S303: Create a simulation engine container instance corresponding to the target container image based on the number of test task identifiers; The cloud can dynamically pull the target container image (a specified version of the simulation engine image) and create a simulation engine container instance. At the same time, a network identifier is assigned to the instance and a storage volume is mounted.
[0051] In one embodiment, the number of simulation engine container instances created can be matched with the number of test task identifiers.
[0052] S305: The control license agent container allocates licenses to the simulation engine container instance based on the number of free licenses in the license resource pool, thereby obtaining the target simulation engine container instance.
[0053] The license proxy container can allocate a license token from the license resource pool to a newly created simulation engine container instance. The process of building the license resource pool may include: The system establishes a communication connection between the license agent container and the license management server. Based on this connection, it retrieves license information from the license management server and constructs a license resource pool. The license agent container is deployed as an independent service and includes a license management module. Once started, this module communicates with a traditional license management server (such as an RLM server) to centrally manage all available license credentials, forming a virtual "license resource pool." This embodiment of the application, by constructing a license resource pool, can efficiently determine the availability status of licenses, thereby facilitating accurate license allocation to the simulation engine container.
[0054] It should be noted that the simulation engine image, license agent container image, and data cache container image are all defined as deployable service units, which allows for the dynamic deployment of the aforementioned simulation engine container, license agent container, and data cache container.
[0055] To improve license utilization, this application dynamically allocates licenses based on the actual number of available licenses and the number of test task identifiers. The specific process is as follows: If the number of idle licenses in the license resource pool is greater than the number of test task identifiers, a license is allocated to each simulation engine container instance to obtain the target simulation engine container instance. In this application, after creating a simulation engine container, the number of free licenses in the license resource pool is first checked. If the number of licenses is sufficient to allocate to each created simulation engine container, then multiple target simulation engine container instances can run simultaneously after allocation, that is, multiple scene files can be simulated and tested at the same time, which effectively improves the efficiency of simulation testing.
[0056] If the number of idle licenses in the license resource pool is less than the number of test task identifiers, the number of idle licenses in the license resource pool is determined as the target number, and the license proxy container is controlled to allocate licenses to the target number of simulation engine container instances to obtain the target simulation engine container instances. The system controls simulation engine container instances that have not yet been allocated a license to wait until a free license becomes available in the license resource pool. In one example, assuming there are 10 free licenses and 15 created simulation engine container instances, licenses can be allocated to 10 of these instances first, while the remaining 5 wait. After the target simulation engine container instance completes its simulation test task, its license is dynamically returned to the license resource pool. At this point, licenses can be allocated to the remaining 5 waiting simulation engine containers.
[0057] The dynamic license allocation mechanism described above avoids containers running idle without licenses, thus preventing wasted computing power. Furthermore, it allows license allocation based on the actual number of test task identifiers, preventing the indiscriminate release of all licenses. This dynamic license allocation mechanism supports multi-user concurrency while maintaining a constant number of licenses, improving the concurrent processing capabilities of simulation testing.
[0058] In this embodiment, the simulation software, CUDA driver, and OpenGL library are all packaged into the OCI image to achieve "build once, run anywhere". Combined with dynamic resource scheduling and license proxy mechanism, the simulation resources can be scalable and elastically scaled, and the utilization rate of license resources reaches 85%.
[0059] Next, the target simulation engine container instance is started, and the scene file is executed to simulate the driving process of the vehicle under test in a virtual test scenario. It should be noted that after startup, simulation test data will be continuously generated. In one embodiment, upon receiving a result viewing request from the client, the simulation test data stored in the data cache container corresponding to the task identifier is streamed and transmitted to the client, which may include: If a result viewing request is received from the client, the simulation test completion status of the vehicle under test in the virtual test scenario is obtained. If the simulation test completion status indicates that the vehicle under test has not completed the simulation test in the virtual test scenario, the simulation test data in the data cache container before the current time is formed into a data stream and transmitted to the client. Simulation test data after the current time is also transmitted to the client in real time after the data cache container contains simulation test data. Before the simulation test is completely finished, the user can view the real-time simulation screen on the client, realizing data playback while simulating.
[0060] If the simulation test completion status indicates that the vehicle under test has completed the simulation test in the virtual test scenario, the simulation test data at all times in the data cache container will be formed into a data stream and transmitted to the client.
[0061] In this embodiment, by temporarily storing the real-time data stream of the simulation test in a data cache container, when the user needs to view it in real time, they only need to request to view it on the test management page of the local client. The simulation test data can be obtained from the cloud and rendered into multimedia. The test management page of the local client plays the test video corresponding to the simulation test data, which improves the convenience of simulation test data playback.
[0062] Figure 4 This is a schematic diagram of the process for transmitting simulation test data provided in an embodiment of this application. For example... Figure 4 As shown, the step of transmitting the simulation test data corresponding to the task identifier stored in the data cache container to the client in the form of a data stream may include: S401: Serialize the simulation result image corresponding to the task identifier and the vehicle status data of the vehicle under test that are stored in the data cache container to obtain serialized data; The data cache container can store simulation result images and vehicle state data of the tested vehicle at multiple time points. This application serializes multiple frames of simulation result images and vehicle state data, and then transmits the serialized data. In one implementation, data serialization can be achieved using the Protocol Buffers data description language.
[0063] S403: Establish a first data transmission channel with the client according to the first data transmission protocol; The first data transmission protocol can be RTSP-over-QUIC to achieve low-latency streaming. This protocol enables communication between the cloud and the client at the transport layer through Quick UDP Internet Connections (QUIC) and at the application layer through Real Time Streaming Protocol (RTSP).
[0064] S405: If the first data transmission channel is successfully established, the data stream formed by the serialized data will be transmitted to the client through the first data transmission channel; S407: If the first data transmission channel fails to be established, a second data transmission channel is established with the client according to the second data transmission protocol; the transmission delay of the first data transmission protocol is less than the transmission delay of the second data transmission protocol; If the QUIC connection fails or the network environment does not support QUIC, the first data transmission channel will fail to establish. In this case, a second data transmission protocol will be used for data stream transmission to ensure the stability and accuracy of the data stream. The second data transmission protocol can be FTP-over-TLS, which uses Transport Layer Security (TLS) at the transport layer to enable communication between the cloud and the client, and uses File Transfer Protocol (FTP) at the application layer to enable communication between the cloud server and the client.
[0065] S409: Transmit the data stream formed by serialized data to the client through the second data transmission channel.
[0066] In one embodiment, the data cache container also supports breakpoint resumption. Based on the mapping table between RTP packet sequence number and file offset, it can automatically resume data stream transmission within 3 seconds after a network interruption.
[0067] In this embodiment, FTP-over-TLS is used as the fallback protocol for establishing the data transmission channel. RTSP-over-QUIC is prioritized for low-latency streaming. If the QUIC connection fails or the network environment does not support it, it automatically downgrades to FTP-over-TLS for data streaming. Through the above dual-mode streaming mechanism, data generated in real time during cloud simulation (such as serialized simulation result images and vehicle status data of the tested vehicle) can be continuously and streamed to the local client, effectively dealing with network jitter and ensuring low latency and high reliability.
[0068] It should be noted that during the execution of the scenario file by the target simulation engine container instance to obtain the simulation test data of the vehicle under test at each moment in the virtual test scenario, the client can also send control commands to the cloud through the control command transmission channel. These control commands include, but are not limited to, simulation test pause commands, simulation test stop commands, reload commands, and single-step execution commands. Specifically, the method further includes: If a simulation test pause command is received from the client, the target simulation engine container instance is controlled to pause the execution of the scene file; If a simulation test stop command is received from the client, the target simulation engine container instance is controlled to stop executing the scene file, and after the stop state continues for a preset time, it is determined that the target simulation engine container instance has completed the test task corresponding to the scene file. If a reload command is received from the client, the target simulation engine container is controlled to re-execute the scene file; If a single-step execution instruction is received from the client, the target simulation engine container is controlled to output the simulation test data corresponding to the next moment of the scene file at the current moment.
[0069] In this embodiment, the client can actively control the simulation process of the cloud simulation engine through the control command transmission channel. This allows the client to control the cloud simulation engine in real time, such as pausing, stopping, reloading, and single-step execution. This enables real-time monitoring and playback of simulation tests, allowing simulation testers to quickly locate problems based on the data viewed on the client, effectively shortening the iteration cycle of testing and debugging.
[0070] In one embodiment, after detecting that the target simulation engine container instance has completed the test task corresponding to the scene file, the license agent container is controlled to reclaim the license of the target simulation engine container instance and store the reclaimed license in the license resource pool, while the target simulation engine container is destroyed.
[0071] Figure 5This is a flowchart illustrating the vehicle simulation testing method provided in the embodiments of this application. Figure 5 The method shown uses the client as the execution entity. For example... Figure 5 As shown, the client first matches the simulation software interface with the cloud, sending a resource query request to the cloud. The cloud returns a list of supported simulation engine versions, and then establishes a control command transmission channel between the client and the cloud simulation software. Next, the client sends a start test request, which may include a scene file. The cloud then performs simulation testing to obtain simulation test data. The client can conveniently and in real-time obtain the simulation test data from the cloud using the dual-mode streaming mechanism described in the above embodiment, and store the data in a local folder. The client's WebGL decoder renders the data in real-time, and the user can drag and drop the progress bar at any position to replay the data.
[0072] In one embodiment, the vehicle simulation testing method provided in this application may specifically include: A communication connection is established between the license agent container and the license management server in advance; based on the communication connection, license information in the license management server is obtained, and the license resource pool is constructed.
[0073] In the practical application phase, the system receives a resource query request sent by the client; sends preset simulation engine version information to the client so that the client can select the simulation engine version information corresponding to the scene file; receives a connection request sent by the client and establishes a control command transmission channel with the client, wherein the connection request includes simulation engine version information; and receives a start test request sent by the client, wherein the start test request includes a scene file, wherein the scene file is used to describe the virtual test scene of the vehicle under test. Assign a test task identifier to the test task corresponding to each of the aforementioned scenario files; send the task identifier to the client; The target container image corresponding to the simulation engine version information is matched from the container image repository; the container image repository includes multiple preset container images; each preset container image includes preset simulation engine version information and the environment dependency information of the preset simulation engine. Create a simulation engine container instance corresponding to the target container image based on the number of test task identifiers; If the number of available licenses in the license resource pool is greater than the number of test task identifiers, a license is allocated to each of the simulation engine container instances to obtain the target simulation engine container instance; the target simulation engine container instance includes the target simulation engine, the dependent environment of the target simulation engine, and the license information of the target simulation engine; If the number of available licenses in the license resource pool is less than the number of test task identifiers, the number of available licenses in the license resource pool is determined as the target number, and the license proxy container is controlled to allocate licenses to the target number of simulation engine container instances to obtain the target simulation engine container instances; the simulation engine container instances that have not been allocated licenses are controlled to wait until there are available licenses in the license resource pool. The target simulation engine container instance is started to execute the scenario file, and the simulation test data of the vehicle under test at each moment in the virtual test scenario is obtained. The simulation test data and the test task identifier corresponding to the scenario file are stored in the data cache container. If a result viewing request is received from the client, the simulation test completion status of the vehicle under test in the virtual test scenario is obtained. If the simulation test completion status indicates that the vehicle under test has not completed the simulation test in the virtual test scenario, the simulation test data in the data cache container before the current time is formed into a data stream and transmitted to the client, and the simulation test data after the current time is present in the data cache container is transmitted to the client in real time. If the simulation test completion status indicates that the vehicle under test has completed the simulation test in the virtual test scenario, the simulation test data at all times in the data cache container will be formed into a data stream and transmitted to the client.
[0074] The simulation test data includes simulation result images and vehicle status data of the vehicle under test; during data transmission, the simulation result images and vehicle status data of the vehicle under test that are stored in the data cache container corresponding to the task identifier are serialized to obtain serialized data. A first data transmission channel is established with the client according to the first data transmission protocol; If the first data transmission channel is successfully established, the data stream formed by the serialized data will be transmitted to the client through the first data transmission channel; If the first data transmission channel fails to be established, a second data transmission channel is established with the client according to the second data transmission protocol; the transmission delay of the first data transmission protocol is less than the transmission delay of the second data transmission protocol. The data stream formed by the serialized data is transmitted to the client through the second data transmission channel.
[0075] During the execution of the scenario file by the target simulation engine container instance to obtain the simulation test data of the vehicle under test at each moment in the virtual test scenario, if a simulation test pause command sent by the client is received, the target simulation engine container instance is controlled to pause the execution of the scenario file. If a simulation test stop command is received from the client, the target simulation engine container instance is controlled to stop executing the scene file, and after the stop state continues for a preset time, it is determined that the target simulation engine container instance has completed the test task corresponding to the scene file. If a reload command is received from the client, the target simulation engine container is controlled to re-execute the scene file; If a single-step execution instruction is received from the client, the target simulation engine container is controlled to output the simulation test data corresponding to the next moment of the scene file at the current moment.
[0076] Figure 6 This is a schematic diagram of the vehicle simulation testing device provided in the embodiments of this application.
[0077] like Figure 6 As shown, the device 600 may include: The request receiving module 601 is used to receive the scene file and simulation engine version information sent by the client; the scene file is used to describe the virtual test scene of the vehicle under test; The container instance creation module 602 is used to create a target simulation engine container instance based on the simulation engine version information; the target simulation engine container instance includes the target simulation engine, the dependent environment of the target simulation engine, and the license information of the target simulation engine; The data caching module 603 is used to start the target simulation engine container instance to execute the scene file, obtain the simulation test data of the vehicle under test at each moment in the virtual test scene, and store the simulation test data and the test task identifier corresponding to the scene file into the data caching container; The data sending module 604 is used to transmit the simulation test data stored in the data cache container corresponding to the task identifier to the client as a data stream when a result viewing request is received from the client.
[0078] In some embodiments, the device 600 may further include: The identifier allocation module is used to assign a test task identifier to the test task corresponding to each of the aforementioned scenario files. An identifier sending module is used to send the task identifier to the client; In some embodiments, the container instance creation module may include: The image matching submodule is used to match the target container image corresponding to the simulation engine version information from the container image repository; the container image repository includes multiple preset container images; each preset container image includes preset simulation engine version information and the environment dependency information of the preset simulation engine; The container instance creation submodule is used to create a simulation engine container instance corresponding to the target container image based on the number of test task identifiers. The license allocation submodule is used to control the license agent container to allocate licenses to the simulation engine container instance based on the number of free licenses in the license resource pool, thereby obtaining the target simulation engine container instance.
[0079] In some embodiments, the license allocation submodule may include: The first allocation unit is configured to allocate a license to each of the simulation engine container instances if the number of idle licenses in the license resource pool is greater than the number of test task identifiers, thereby obtaining the target simulation engine container instance. The second allocation unit is used to determine the number of idle licenses in the license resource pool as a target number if the number of idle licenses in the license resource pool is less than the number of test task identifiers, and control the license proxy container to allocate licenses to the target number of simulation engine container instances to obtain the target simulation engine container instances. A waiting control unit is used to control simulation engine container instances that have not been allocated a license to wait until a free license becomes available in the license resource pool.
[0080] In some embodiments, the apparatus 600 may further include a license resource pool construction module, which may include: The license management communication submodule is used to control the establishment of a communication connection between the license agent container and the license management server; The license acquisition submodule is used to acquire license information from the license management server based on the communication connection and construct the license resource pool.
[0081] In some embodiments, the data sending module may include: The simulation test completion status acquisition submodule is used to acquire the simulation test completion status of the vehicle under test in the virtual test scenario if a result viewing request is received from the client. The real-time transmission submodule is used to transmit the simulation test data before the current time in the data cache container to the client if the simulation test completion status indicates that the vehicle under test has not completed the simulation test in the virtual test scenario, and to transmit the simulation test data after the current time in the data cache container to the client in real time. The result sending submodule is used to transmit the simulation test data of all moments in the data cache container to the client if the simulation test completion status indicates that the vehicle under test has completed the simulation test in the virtual test scenario.
[0082] In some embodiments, the data sending module may further include: The serialization submodule is used to serialize the simulation result image corresponding to the task identifier and the vehicle status data of the vehicle under test that are stored in the data cache container to obtain serialized data. The first data transmission channel establishment submodule is used to establish a first data transmission channel with the client according to the first data transmission protocol. The first transmission submodule is configured to transmit the data stream formed by the serialized data to the client through the first data transmission channel if the first data transmission channel is successfully established. The second data transmission channel establishment submodule is used to establish a second data transmission channel with the client according to a second data transmission protocol if the first data transmission channel establishment fails; the transmission delay of the first data transmission protocol is less than the transmission delay of the second data transmission protocol. The second transmission submodule is used to transmit the data stream formed by the serialized data to the client through the second data transmission channel.
[0083] In some embodiments, the request receiving module may include: The resource query request receiving submodule is used to receive resource query requests sent by the client; The preset simulation engine version information sending submodule is used to send preset simulation engine version information to the client so that the client can select the simulation engine version information corresponding to the scene file; The control command channel establishment submodule is used to receive the connection request sent by the client and establish a control command transmission channel with the client. The connection request includes simulation engine version information. The Start Test Request Receiving Submodule is used to receive the Start Test Request sent by the client, which includes a scenario file.
[0084] In some embodiments, the device 600 may further include: The simulation pause control module is used to control the target simulation engine container instance to pause the execution of the scene file if it receives a simulation test pause command sent by the client; The simulation stop control module is used to control the target simulation engine container instance to stop executing the scene file if it receives a simulation test stop command sent by the client, and to determine that the target simulation engine container instance has completed the test task corresponding to the scene file after the stop state continues for a preset time. The reload control module is used to control the target simulation engine container to re-execute the scene file if a reload command is received from the client. The single-step execution control module is used to control the target simulation engine container to output the simulation test data corresponding to the next moment of the scene file at the current moment if it receives a single-step execution instruction sent by the client.
[0085] The apparatus and method embodiments described herein are based on the same inventive concept.
[0086] This application provides an electronic device including a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the method provided in the above method embodiments.
[0087] Embodiments of this application also provide a computer storage medium, which can be disposed in a terminal to store at least one instruction or at least one program related to implementing a method as provided in the above method embodiments, wherein the at least one instruction or at least one program is loaded and executed by the processor to implement the method provided in the above method embodiments.
[0088] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the above-described method embodiments.
[0089] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0090] The memory described in this application embodiment can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for the functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.
[0091] The method provided in this application embodiment can be executed on a cloud server or similar computing device. Taking running on a server as an example, Figure 7 This is a hardware structure block diagram of a cloud server for a vehicle simulation testing method provided in an embodiment of this application. For example... Figure 7 As shown, the cloud server 700 can vary significantly due to differences in configuration or performance. It may include one or more Central Processing Units (CPUs) 710 (CPUs 710 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 730 for storing data, and one or more storage media 720 (e.g., one or more mass storage devices) for storing application programs 723 or data 722. The memory 730 and storage media 720 may be temporary or persistent storage. The program stored in the storage media 720 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 710 may be configured to communicate with the storage media 720 and execute the series of instruction operations stored in the storage media 720 on the cloud server 700. The cloud server 700 may also include one or more power supplies 760, one or more wired or wireless network interfaces 750, one or more input / output interfaces 740, and / or one or more operating systems 721, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0092] The input / output interface 740 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the cloud server 700. In one example, the input / output interface 740 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 740 may be a radio frequency (RF) module used for wireless communication with the Internet.
[0093] Those skilled in the art will understand that Figure 7 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, the cloud server 700 may also include... Figure 7 The more or fewer components shown, or having the same Figure 7 The different configurations shown.
[0094] As can be seen from the embodiments of the vehicle simulation testing method, apparatus, and electronic equipment provided in this application, this application dynamically creates a target simulation engine container instance by receiving a scene file and simulation engine version information sent by a client. This target simulation engine container instance includes a target simulation engine, its dependent environment, and its license information. Then, the target simulation engine container instance is started to execute the scene file, obtaining simulation test data of the vehicle under test at each moment in the virtual test scenario. The simulation test data and the test task identifier corresponding to the scene file are stored in a data cache container. Upon receiving a result viewing request from the client, the simulation test data stored in the data cache container corresponding to the task identifier is transmitted to the client as a data stream. This simulation testing method does not require high-performance local configuration or complex dependent environments, making testing more convenient. Furthermore, if the test site is changed, the simulation test data can be viewed simply by accessing the test management page on the client, improving testing flexibility. In addition, the data stream transmission between cloud clients in this application enables simultaneous simulation and playback of simulation data, effectively improving the testing efficiency of autonomous driving simulation testing.
[0095] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0096] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0097] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer storage medium, such as a read-only memory, a disk, or an optical disk.
[0098] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A vehicle simulation test method characterized by comprising: The method comprises: receiving a scene file and simulation engine version information sent by a client; the scene file is used to describe a virtual test scene of a vehicle under test; creating a target simulation engine container instance according to the simulation engine version information; the target simulation engine container instance comprises a target simulation engine, a dependent environment of the target simulation engine and license information of the target simulation engine; starting the target simulation engine container instance to execute the scene file, obtaining simulation test data of the vehicle under test at each time point in the virtual test scene, and storing the simulation test data and a test task identifier corresponding to the scene file in a data cache container; in the case of receiving a result viewing request sent by the client, forming a data stream by transmitting the simulation test data corresponding to the task identifier which has been stored in the data cache container to the client.
2. The method of claim 1, wherein, After receiving the scene file and simulation engine version information sent by the client, the method further comprises: allocating a test task identifier for each test task corresponding to the scene file; sending the task identifier to the client; the creating of the target simulation engine container instance according to the simulation engine version information comprises: matching a target container image corresponding to the simulation engine version information from a container image warehouse; the container image warehouse comprises a plurality of preset container images; each preset container image comprises preset simulation engine version information and dependent environment information of the preset simulation engine; creating a simulation engine container instance corresponding to the target container image according to the number of test task identifiers; controlling a license agent container to allocate a license to the simulation engine container instance according to the number of idle licenses in a license resource pool, to obtain the target simulation engine container instance.
3. The method of claim 2, wherein, the controlling of the license agent container to allocate a license to the simulation engine container instance according to the number of idle licenses in the license resource pool, to obtain the target simulation engine container instance, comprises: if the number of idle licenses in the license resource pool is greater than the number of test task identifiers, allocating a license to each simulation engine container instance to obtain the target simulation engine container instance; if the number of idle licenses in the license resource pool is less than the number of test task identifiers, determining the number of idle licenses in the license resource pool as a target number, and controlling the license agent container to allocate a license to the target number of simulation engine container instances to obtain the target simulation engine container instance; controlling the simulation engine container instance without being allocated a license to wait until there is an idle license in the license resource pool.
4. The method of claim 2, wherein, the construction process of the license resource pool comprises: controlling the license agent container to establish a communication connection with a license management server; based on the communication connection, obtaining license information in the license management server to construct the license resource pool.
5. The method of claim 1, wherein, The simulation test data in the data cache container corresponding to the task identifier is formed into a data stream and transmitted to the client if the result viewing request sent by the client is received. If the simulation test completion condition indicates that the measured vehicle has not completed the simulation test in the virtual test scene, the simulation test data in the data cache container before the current time is formed into a data stream and transmitted to the client, and the simulation test data after the current time in the data cache container is transmitted to the client in real time. If the simulation test completion condition indicates that the measured vehicle has completed the simulation test in the virtual test scene, all simulation test data at all times in the data cache container is formed into a data stream and transmitted to the client. The simulation test data includes simulation result images and vehicle state data of the measured vehicle; and the simulation test data stored in the data cache container corresponding to the task identifier is formed into a data stream and transmitted to the client, including:
6. The method of any one of claims 1 or 5, wherein, The simulation result images and the vehicle state data of the measured vehicle stored in the data cache container corresponding to the task identifier are serialized to obtain serialized data. A first data transmission channel between the client is established according to a first data transmission protocol. If the first data transmission channel is successfully established, the data stream formed by the serialized data is transmitted to the client through the first data transmission channel. If the first data transmission channel fails to be established, a second data transmission channel between the client is established according to a second data transmission protocol; the transmission delay of the first data transmission protocol is less than the transmission delay of the second data transmission protocol. The data stream formed by the serialized data is transmitted to the client through the second data transmission channel. The scene file and the simulation engine version information sent by the client are received, including:
7. The method of claim 1, wherein, The resource query request sent by the client is received. The preset simulation engine version information is sent to the client to enable the client to select the simulation engine version information corresponding to the scene file. The connection request sent by the client is received, and a control instruction transmission channel between the client is established, and the connection request includes simulation engine version information. The start test request sent by the client is received, and the start test request includes the scene file. During execution of the scene file by the target simulation engine container instance to obtain the simulation test data of the measured vehicle at each time in the virtual test scene, the method further includes:
8. The method of claim 1, wherein, If the simulation test pause instruction sent by the client is received, the target simulation engine container instance is controlled to pause execution of the scene file. If the simulation test stop instruction sent by the client is received, the target simulation engine container instance is controlled to stop executing the scenario file, and after a preset time duration in a stop state, it is determined that the target simulation engine container instance completes the test task corresponding to the scenario file; If the reloading instruction sent by the client is received, the target simulation engine container is controlled to re-execute the scenario file; If the single-step execution instruction sent by the client is received, the target simulation engine container is controlled to output the simulation test data corresponding to the next time of the scenario file at the current time.
9. A vehicle simulation test apparatus characterized by comprising: The device comprises: The request receiving module is configured to receive a scenario file and simulation engine version information sent by a client; the scenario file is used to describe a virtual test scenario of a vehicle under test; The container instance creating module is configured to create a target simulation engine container instance according to the simulation engine version information; the target simulation engine container instance comprises a target simulation engine, a dependent environment of the target simulation engine, and license information of the target simulation engine; The data caching module is configured to start the target simulation engine container instance to execute the scenario file, obtain simulation test data of the vehicle under test at each time under the virtual test scenario, and store the simulation test data and a test task identifier corresponding to the scenario file into a data caching container; The data sending module is configured to, in a case where a result viewing request sent by the client is received, form a data stream by using the simulation test data corresponding to the task identifier which has been stored in the data caching container, and transmit the data stream to the client.
10. An electronic device, comprising: The electronic device comprises a processor and a memory, and the memory stores at least one instruction or at least one program; the at least one instruction or at least one program is loaded and executed by the processor to implement the vehicle simulation test method according to any one of claims 1-8.