Simulation method, electronic equipment, vehicle and storage medium

By decomposing simulation tasks into heterogeneous computing units with fine granularity and intelligent scheduling, the problem of low utilization of heterogeneous resources is solved, achieving efficient ultra-real-time simulation and resource optimization, and improving simulation efficiency and real-time performance.

CN121807489APending Publication Date: 2026-04-07GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

When performing large-scale simulations in a heterogeneous computing resource environment, the coarse-grained scheduling method in traditional approaches is difficult to efficiently match CPU and GPU resources, resulting in low resource utilization and high task scheduling latency, which seriously restricts simulation efficiency and real-time performance.

Method used

The simulation task is broken down into multiple sub-tasks in a fine-grained manner, and based on a pre-built computing resource pool and heterogeneous resource scheduling algorithm, it is intelligently scheduled to heterogeneous computing units, dynamically allocating resources to meet minimum requirements and combining resource reserves to achieve fine-grained scheduling and logical time synchronization.

Benefits of technology

It significantly improves the execution efficiency of simulation tasks, achieves ultra-real-time simulation, shortens the development and verification cycle of autonomous driving algorithms, and optimizes resource utilization and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807489A_ABST
    Figure CN121807489A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a simulation method, electronic equipment, a vehicle and a storage medium, and the method comprises the steps: disassembling a to-be-simulated task into a plurality of sub-tasks, disassembling each sub-task into a plurality of minimum calculation granularity tasks, and determining calculation characteristic information and a resource dependency relationship of each minimum calculation granularity task; matching a corresponding target computing unit for each subtask according to a preset heterogeneous resource scheduling algorithm on the basis of the current resource state of a pre-constructed computing resource pool, the computing characteristic information of each minimum computing granularity task and the resource dependency relationship; and scheduling each sub-task to execute simulation operation on the corresponding target calculation unit based on the parallel execution strategy. Therefore, the problem of low utilization efficiency of heterogeneous resources caused by coarse-grained scheduling in the prior art is solved by disassembling the simulation task in a fine-grained manner and intelligently scheduling the simulation task to the heterogeneous computing unit, so that the execution efficiency of the simulation task is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent driving algorithm simulation technology, and in particular to a simulation method, electronic device, vehicle and storage medium. Background Technology

[0002] With the rapid development of intelligent driving technology, simulation testing has become a crucial step in algorithm verification and iteration. To improve simulation efficiency, related technologies generally employ distributed computing clusters to execute simulation tasks.

[0003] However, when performing large-scale simulations in heterogeneous computing resource environments, the coarse-grained scheduling methods in traditional approaches are difficult to efficiently match heterogeneous resources such as CPUs (Central Processing Units) and GPUs (Graphics Processing Units) according to task characteristics, resulting in low resource utilization and high task scheduling latency, which seriously restricts simulation efficiency and real-time performance. Summary of the Invention

[0004] This application provides a simulation method, electronic device, vehicle, and storage medium. By finely decomposing simulation tasks and intelligently scheduling them to heterogeneous computing units, it solves the problem of low heterogeneous resource utilization efficiency caused by coarse-grained scheduling in the prior art, thereby significantly improving the execution efficiency of simulation tasks.

[0005] The first aspect of this application provides a simulation method, including the following steps: Obtain the task to be simulated, decompose the task to be simulated into multiple subtasks, and decompose each subtask into multiple minimum computational granularity tasks, and determine the computational characteristic information of each minimum computational granularity task and the resource dependency relationship of each minimum computational granularity task. Based on the current resource status of the pre-built computing resource pool, the computing characteristic information of each smallest computing granularity task, and the resource dependency relationship, a corresponding target computing unit is matched for each subtask according to a preset heterogeneous resource scheduling algorithm. Generate a parallel execution strategy for multiple subtasks, and schedule each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategy; The computational characteristic information is a data set of inherent attributes and performance requirements of each minimum computational granularity task during the computation execution process, and the target computational unit is a computational resource instance allocated from the pre-built computational resource pool for each minimum computational granularity task according to the preset heterogeneous resource scheduling algorithm.

[0006] By employing the aforementioned technical means, simulation tasks are decomposed into fine-grained units and intelligently scheduled to heterogeneous computing units, thus solving the problem of low heterogeneous resource utilization efficiency caused by coarse-grained scheduling in existing technologies, thereby significantly improving the execution efficiency of simulation tasks.

[0007] According to one embodiment of this application, the pre-built computing resource pool includes physically separated CPU clusters and GPU clusters. The process of matching a corresponding target computing unit for each subtask based on the current resource status of the pre-built computing resource pool, the computing characteristic information of each smallest computing granularity task, and the resource dependencies, according to a preset heterogeneous resource scheduling algorithm, includes: Obtain the current CPU utilization of the CPU cluster and the current GPU utilization of the GPU cluster, and determine the minimum resource requirement of each subtask based on the computational characteristic information of each minimum computational granularity task and the resource dependency relationship, wherein the minimum resource requirement includes minimum CPU resource requirement and / or minimum GPU resource requirement; If the current CPU utilization is less than a first preset threshold and the current GPU utilization is greater than or equal to a second preset threshold, then CPU resources are allocated to each subtask based on the minimum CPU resource requirement of each subtask and the first CPU resource margin, and GPU resources are allocated to each subtask based on the minimum GPU resource requirement of each subtask. If the current CPU utilization is greater than or equal to the first preset threshold and the current GPU utilization is less than the second preset threshold, then CPU resources are allocated to each subtask according to the minimum CPU resource requirement of each subtask, and GPU resources are allocated to each subtask according to the minimum GPU resource requirement of each subtask and the first GPU resource margin. If the current CPU utilization is less than the first preset threshold and the current GPU utilization is less than the second preset threshold, then CPU resources are allocated to each subtask based on the minimum CPU resource requirement and the second CPU resource margin of each subtask, and GPU resources are allocated to each subtask based on the minimum GPU resource requirement and the second GPU resource margin of each subtask.

[0008] By employing the aforementioned technical means, and by implementing a resource allocation strategy based on the minimum resource requirements of subtasks and the real-time load status of the CPU / GPU cluster, a margin is allocated when resources are sufficient to ensure performance, and only the minimum requirements are met when resources are scarce to ensure throughput. This makes resource scheduling decisions more refined and intelligent, thereby maximizing the utilization of cluster computing resources while ensuring the stable operation of tasks.

[0009] According to one embodiment of this application, when scheduling each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategy, the method further includes: Obtain the current computing resource load and the current simulation time scale; Based on the current computing resource load, the current simulation time scale is increased to a preset multiple of the actual time scale, and based on a preset dynamic time scale adjustment mechanism, the logical time synchronization between each subtask is maintained.

[0010] By using the aforementioned technical means, and by dynamically adjusting the simulation time scale while maintaining logical synchronization between subtasks, the simulation process can break free from the constraints of real time, achieving "ultra-real-time" simulation. This increases the absolute speed of simulation testing by several times and greatly shortens the development and verification cycle of autonomous driving algorithms.

[0011] According to one embodiment of this application, when scheduling each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategy, the method further includes: Obtain the load status of the CPU cluster, the current CPU task queue length, the load status of the GPU cluster, and the current GPU task queue length in the pre-built computing resource pool; If the average CPU utilization of the CPU cluster is greater than a first preset utilization and the duration for which the current CPU task queue length is greater than a first preset length is greater than a first preset duration, then the CPU cluster is expanded according to the load status of the CPU cluster and the current CPU task queue length. If the average GPU utilization of the GPU cluster is greater than the second preset utilization, and the duration for which the current GPU task queue length is greater than the second preset length is greater than the second preset duration, then the GPU cluster is expanded according to the load status of the GPU cluster and the current GPU task queue length.

[0012] By using the above technical means, monitoring the cluster load and task queue status and triggering independent scaling operations, the CPU and GPU resource pools are given elastic scaling capabilities, which can automatically cope with fluctuations in computing load. This avoids waste caused by resource excess and prevents simulation delays caused by resource bottlenecks, thereby continuously ensuring high simulation efficiency and low-cost operation in dynamic environments.

[0013] According to one embodiment of this application, the computational characteristic information includes at least one of computational complexity, parallelism, and latency requirements, and the simulation results include at least one of time speedup, algorithm accuracy, and resource utilization.

[0014] By employing the aforementioned technical means and clarifying the computational characteristics of subtasks and simulation results, specific and quantifiable implementation guidelines and evaluation standards are provided, making the task decomposition, resource scheduling, and performance evaluation processes more operable and measurable, ultimately ensuring the accuracy of the method implementation and the effectiveness of the results.

[0015] According to one embodiment of this application, the step of decomposing the simulation task into multiple sub-tasks includes: Based on the logical functional structure and resource dependency type of the task to be simulated, the task to be simulated is decomposed to obtain the multiple sub-tasks. The subtasks include at least one of the following: perception subtask, decision-making subtask, control subtask, and environment simulation subtask.

[0016] By employing the aforementioned technical means and decomposing tasks according to function and resource type, the structured scheduling of tasks and the precise matching of resources are achieved, thereby improving the parallel efficiency and resource utilization of the simulation process.

[0017] According to one embodiment of this application, a remote direct data access network and a distributed caching component are deployed between the CPU cluster and the GPU cluster, and the simulation method further includes: Rendering instructions, sensor data, and status update messages are transmitted between the CPU cluster and the GPU cluster via the remote direct data access network and a preset transport binary serialization protocol. The distributed caching component is used to share and synchronize data between the CPU cluster and the GPU cluster based on a preset cache consistency protocol.

[0018] By employing the aforementioned technical means, and utilizing RDMA networks and distributed caching mechanisms, the data transmission latency between CPU and GPU clusters is significantly reduced, ensuring the consistency and synchronization of cross-node data, and providing high-speed and stable communication support for ultra-real-time simulation.

[0019] A second aspect of this application provides a simulation device, comprising: The decomposition module is used to acquire the task to be simulated, decompose the task to be simulated into multiple subtasks, and decompose each subtask into multiple minimum computational granularity tasks, and determine the computational characteristic information of each minimum computational granularity task and the resource dependency relationship of each minimum computational granularity task. The matching module is used to match the target computing unit for each subtask based on the current resource status of the pre-built computing resource pool, the computing characteristic information of each smallest computing granularity task, and the resource dependency relationship, according to a preset heterogeneous resource scheduling algorithm. The simulation module is used to generate parallel execution strategies for multiple subtasks and schedule each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategies. The computational characteristic information is a data set of inherent attributes and performance requirements of each minimum computational granularity task during the computation execution process, and the target computational unit is a computational resource instance allocated from the pre-built computational resource pool for each minimum computational granularity task according to the preset heterogeneous resource scheduling algorithm.

[0020] A third aspect of this application provides an electronic device, characterized in that it includes a processor and a memory, wherein... Memory, used to store computer programs; The processor is used to execute the program stored in the memory to implement the simulation method described in the above embodiments.

[0021] A fourth aspect of this application provides a vehicle that includes the electronic equipment described above.

[0022] A fifth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the simulation method described in the above embodiments.

[0023] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0024] Figure 1 This is a flowchart of a simulation method provided in an embodiment of this application; Figure 2 This is an architecture diagram of a heterogeneous cluster simulation design system provided in one embodiment of this application.

[0025] Figure 3 This is a structural diagram of the simulation device provided in the embodiments of this application; Figure 4 This is a structural diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0026] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0027] As those skilled in the art will understand, the development of intelligent driving technology heavily relies on large-scale, high-fidelity simulation testing. However, traditional simulation systems, whether single-machine architectures, virtualization-based cloud simulations, or distributed computing clusters, all have significant limitations. Single-machine simulations are limited by local computing power, making it difficult to achieve ultra-real-time simulations and large-scale parallel testing; while cloud simulations achieve task-level parallelism, their scheduling granularity remains at the virtual machine or container level, failing to break the binding allocation of CPU and GPU resources within a task, resulting in persistent resource contention issues; distributed cluster simulations often employ coarse-grained workflow decomposition, failing to decouple at the underlying computing unit level, causing tightly coupled subtasks such as perception and planning, and synchronization delays that restrict further improvements in simulation efficiency. These architectures generally face the core problem of low efficiency in heterogeneous resource collaboration, specifically manifested in the inability to accurately schedule resources according to the computational characteristics of tasks, resulting in low overall resource utilization and simulation speeds mostly remaining at real-time or sub-real-time levels, failing to meet the stringent efficiency requirements of intelligent driving algorithm testing involving hundreds of millions of miles.

[0028] To address the aforementioned problems, this invention discloses a heterogeneous cluster ultra-real-time simulation design method, aiming to solve the issues of insufficient real-time performance and low efficiency of heterogeneous resource collaboration in existing intelligent driving simulation platforms. The method includes: acquiring the task to be simulated; decomposing the task into multiple subtasks; further decomposing each subtask into multiple minimum computational granularity tasks; determining the computational characteristics and resource dependencies of each minimum computational granularity task; matching each subtask with a corresponding target computing unit according to a preset heterogeneous resource scheduling algorithm based on the current resource status of a pre-built computing resource pool, the computational characteristics and resource dependencies of each minimum computational granularity task; generating parallel execution strategies for multiple subtasks; and scheduling each subtask to perform simulation operations on its corresponding target computing unit based on the parallel execution strategies. The computational characteristics information is a data set of inherent attributes and performance requirements of each minimum computational granularity task during computation execution; the target computing unit is a computing resource instance allocated from the pre-built computing resource pool for each minimum computational granularity task according to the preset heterogeneous resource scheduling algorithm.

[0029] This application provides a method, please refer to the embodiments. Figure 1 This includes the following steps: S10: Obtain the task to be simulated, decompose the task to be simulated into multiple subtasks, and decompose each subtask into multiple minimum computational granularity tasks, and determine the computational characteristic information and resource dependency relationship of each minimum computational granularity task. S20: Based on the current resource status of the pre-built computing resource pool, the computing characteristics information and resource dependencies of each smallest computing granularity task, match the corresponding target computing unit for each subtask according to the preset heterogeneous resource scheduling algorithm; S30: Generate parallel execution strategies for multiple subtasks, and schedule each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategies.

[0030] The computational characteristic information is a set of data on the inherent attributes and performance requirements of each minimum computational granularity task during the computational execution process. The target computational unit is a computational resource instance allocated from a pre-built computational resource pool for each minimum computational granularity task according to a preset heterogeneous resource scheduling algorithm.

[0031] In some embodiments, the computational characteristic information includes at least one of computational complexity, parallelism, and latency requirements, and the simulation results include at least one of time speedup, algorithm accuracy, and resource utilization.

[0032] Specifically, the first step is to obtain the overall task to be simulated. This task can be an autonomous driving or intelligent system operation scenario, such as a joint simulation process involving multiple functional modules including environmental perception, target tracking, path planning, and vehicle control. All algorithm modules involved in the simulation and evaluation task are then decomposed according to resource dependencies. The purpose of this decomposition is twofold: first, to separate sequential operations within a module, allowing operators without hierarchical dependencies to be processed in parallel; second, to dynamically schedule operators with the same resource dependencies to corresponding clusters, improving the efficiency of unified coordination and scheduling of computing power.

[0033] For example, the task to be simulated can be broken down into multiple interrelated but independently schedulable subtasks according to its inherent logical dependencies and computational boundaries.

[0034] For example, embodiments of this application can construct an intelligent driving simulation task model, decomposing the intelligent driving algorithm to be simulated into perception subtasks, decision-making subtasks, control subtasks, and environmental interaction subtasks. Each subtask includes an input data interface, computational logic, and output data format.

[0035] In detail, a general intelligent driving algorithm (such as a perception-decision-planning-control module) can be broken down into four major sub-tasks. The perception sub-task may include: understanding the environment, detecting, recognizing, and tracking moving and static objects; object detection / segmentation; multi-sensor fusion; and object tracking. The decision-making sub-task may include: scene understanding; behavior prediction; and behavior decision-making. The control sub-task may include: trajectory generation; and controller computation. The environment simulation sub-task may include: vehicle dynamics model simulation, sensor simulation, and environmental state updating.

[0036] The purpose of task decomposition in this application is to enable all categorized subtasks to be concurrently and efficiently scheduled to different resource clusters, thereby reducing the serial processing in the parent task.

[0037] Furthermore, each subtask is broken down to the smallest computational granularity (usually at the function or class method level), and its dependencies on CPU, GPU, and communication resources are marked. The minimum resource dependency values ​​(such as the number of CPU cores, memory, GPU memory, etc.) are obtained through repeated testing in multiple scenarios based on historical versions, as shown in Table 1.

[0038] Table 1

[0039] After completing the subtask decomposition and the labeling of the characteristics of the smallest computational granularity task, based on the current resource status of the pre-built heterogeneous computing resource pool (such as physically separated CPU clusters and GPU clusters), and combined with the computational characteristic information of each smallest computational granularity task (such as computational complexity, latency requirements, and parallelism), the preset heterogeneous resource scheduling algorithm is invoked to match the most suitable target computing unit for each subtask and generate a parallel execution plan.

[0040] It should be noted that the scheduling process in this application not only considers resource type matching (such as prioritizing the allocation of neural network inference subtasks to GPU nodes), but also dynamically introduces a resource reserve mechanism. When one type of resource (such as CPU) is relatively idle while another type (such as GPU) is in high demand, additional CPU resource reserves are allocated to improve execution stability, while GPU resources are allocated only according to minimum requirements to avoid resource waste, provided that the minimum resource requirements of the subtask are met. Conversely, when both types of resources are sufficient, appropriate reserves are allocated to both CPU and GPU to ensure simulation robustness under high concurrency.

[0041] Based on this, a parallel execution strategy for multiple subtasks is generated. This strategy comprehensively considers the dependencies between subtasks, data flow topology, and the geographical location and communication latency of the allocated computing units to construct an efficient parallel scheduling graph. According to this parallel execution strategy, each subtask is distributed to the corresponding target computing unit to perform simulation operations concurrently.

[0042] During execution, a super real-time simulation mechanism is supported, which dynamically increases the simulation time scale based on the current overall resource load (e.g., proceeding at twice the actual time) and ensures temporal causal consistency between subtasks through a logical clock synchronization protocol. During simulation, intermediate results from each subtask are collected in real time (e.g., obstacle coordinates from perception outputs, driving trajectories from decision outputs), aggregated through the cloud platform's distributed log system, and compared with preset ground truth data to verify the effectiveness of the intelligent driving algorithm. The simulation continues until preset termination conditions are met (e.g., simulation completion, algorithm failure, insufficient resources, etc.), yielding simulation results. All simulation results, logs, and evaluation metrics are written to distributed storage in real time, and a simulation report (including super real-time speedup ratio, algorithm accuracy, resource utilization, etc.) is output.

[0043] Furthermore, in some embodiments, the pre-built computing resource pool includes physically separated CPU clusters and GPU clusters. Based on the current resource status of the pre-built computing resource pool, the computing characteristics information and resource dependencies of each minimum computing granularity task, a preset heterogeneous resource scheduling algorithm is used to match the corresponding target computing unit for each subtask. This includes: obtaining the current CPU utilization of the CPU cluster and the current GPU utilization of the GPU cluster, and determining the minimum resource requirement for each subtask based on the computing characteristics information and resource dependencies of each minimum computing granularity task, wherein the minimum resource requirement includes the minimum CPU resource requirement and / or the minimum GPU resource requirement; if the current CPU utilization is less than a first preset threshold and the current GPU utilization is greater than or equal to a second preset threshold, then the minimum CPU resource requirement for each subtask is used to determine the minimum resource requirement for each subtask. The system allocates CPU resources to each subtask based on the first CPU resource reserve and the minimum GPU resource requirement of each subtask. If the current CPU utilization is greater than or equal to the first preset threshold and the current GPU utilization is less than the second preset threshold, then CPU resources are allocated to each subtask based on the minimum CPU resource requirement and the first GPU resource reserve. If the current CPU utilization is less than the first preset threshold and the current GPU utilization is less than the second preset threshold, then CPU resources are allocated to each subtask based on the minimum CPU resource requirement and the second CPU resource reserve, and GPU resources are allocated to each subtask based on the minimum GPU resource requirement and the second GPU resource reserve.

[0044] CPU resource margin refers to the additional CPU computing resources allocated beyond the minimum CPU resource requirements for the normal execution of subtasks. These resources are used to improve task execution stability, reduce scheduling latency, or cope with instantaneous load fluctuations. GPU resource margin refers to the additional GPU computing resources allocated beyond the minimum GPU resource requirements for the normal execution of subtasks. These resources are used to improve parallel computing throughput, avoid memory overflow, or ensure ultra-real-time simulation frame rates.

[0045] It is known that in related technologies, CPU / GPU resources are bundled and allocated within a single server or virtual machine, leading to tasks with mismatched computing characteristics blocking each other. For example, the GPU waits for the physical computation results from the CPU, while the CPU waits for the rendering results from the GPU. This application proposes a CPU-GPU cluster separation architecture, physically dividing the computing cluster into a pure CPU computing pool and a pure GPU computing pool. Each pool consists of homogeneous computing nodes, dedicated to handling specific types of computing tasks. By physically separating the CPU and GPU into two independent, large-scale resource pools (CPU cluster and GPU cluster), instead of the traditional intra-node coupling or logical isolation, it offers advantages such as elastic resource scaling, specialization and cost optimization, and fault isolation.

[0046] Specifically, the embodiments of this application can build a heterogeneous computing resource pool based on a cloud platform. The computing resource pool includes a CPU cluster, a GPU acceleration unit, an RDMA (Remote Direct Data Access) high-speed network, and storage nodes. The CPU cluster is responsible for task scheduling and logic control, the GPU acceleration unit is responsible for parallel computing-intensive subtasks such as image rendering and point cloud processing, the RDMA (Remote Direct Data Access) high-speed network sets up a distributed caching system, and ensures the consistency of cached data on different nodes through a cache consistency protocol, thereby reducing repeated data reading and transmission.

[0047] If the CPU resources for this task are sufficient based on the minimum resource dependencies of the subtasks, then the CPU resources for each subtask are allocated with a larger margin, while the GPU resources are allocated with a smaller margin. If the GPU resources for this task are sufficient based on the minimum resource dependencies of the subtasks, then the GPU resources for each subtask are allocated with a larger margin, while the CPU resources are allocated with a smaller margin. If both CPU and GPU resources are sufficient based on the minimum resource dependencies of the subtasks, then the GPU and CPU resources for each subtask are allocated with a larger margin to ensure the stable operation of the task.

[0048] The embodiments of this application can use the DAG (Directed Acyclic Graph) method to dynamically and intelligently decompose a complex computing task into subtasks, and select the most suitable computing unit (CPU, GPU, RDMA accelerator, etc.) for each subtask in order to minimize the overall execution time and maximize resource utilization.

[0049] For example, the current CPU utilization of the CPU cluster and the current GPU utilization of the GPU cluster in the heterogeneous computing resource pool are first obtained to assess the load status of the two types of computing resources in real time. Simultaneously, based on the computational characteristics of each smallest computational granularity task (e.g., task type, algorithm complexity, historical execution performance data), the minimum resource requirements for each subtask are determined. These minimum resource requirements refer to the minimum computing resource configuration necessary to ensure that the subtask can correctly and stably complete its function. Specifically, this may include minimum CPU resource requirements (e.g., the required number of CPU cores, memory capacity, etc.) and / or minimum GPU resource requirements (e.g., the required video memory capacity, number of computing units, etc.). Some subtasks may only rely on CPU resources (e.g., control command deserialization), some only rely on GPU resources (e.g., neural network inference), while others rely on both (e.g., the collaborative processing of perception result serialization and model inference).

[0050] Based on this, the resource allocation strategy is dynamically adjusted according to the current resource load status: when the CPU cluster is detected to be in an idle state (i.e., the current CPU utilization is lower than the first preset threshold, such as 70%), while the GPU cluster is in a high-load state (i.e., the current GPU utilization is greater than or equal to the second preset threshold, such as 85%), the CPU resources allocated to each subtask are set to the minimum CPU resource requirement plus the first CPU resource margin (e.g., adding 1 additional CPU core or 20% memory buffer) to make full use of idle CPU resources and improve task robustness; at the same time, a conservative allocation strategy is adopted for GPU resources, which are allocated only according to the minimum GPU resource requirement of each subtask without any margin, thereby avoiding resource waste or scheduling blockage under GPU stress.

[0051] Conversely, when the CPU cluster is under high load and the GPU cluster is relatively idle, the GPU resources allocated to each subtask are increased by a first GPU resource margin (e.g., reserving an additional 500MB of video memory or reserving some stream processors) on top of its minimum GPU resource requirement, in order to accelerate parallel computing and improve the ultra-real-time simulation frame rate; while the CPU resources are allocated only according to the minimum requirement without increasing the margin, in order to alleviate the CPU pressure. If both the CPU and GPU clusters are detected to be under low load, it indicates that overall computing resources are sufficient. In this case, more abundant resource guarantees will be configured for each subtask simultaneously: that is, a second CPU resource margin will be added to the minimum CPU resource requirement, and a second GPU resource margin will be added to the minimum GPU resource requirement. Optionally, the margin in this scenario (the second CPU / GPU resource margin) can be set to be greater than the margin in the aforementioned unilateral idle scenario (the first CPU / GPU resource margin) to maximize the utilization of idle resources, ensure the long-term stable operation of the simulation task under ultra-real-time conditions, and effectively cope with sudden loads or performance fluctuations.

[0052] Furthermore, in the split architecture of this application embodiment, a computation-communication overlap mechanism is explicitly designed. After the GPU completes rendering and perception computation for one frame, based on fine-grained asynchronous programming and task partitioning, it immediately begins computation for the next frame while sending the result data to the CPU cluster via the network, instead of waiting for the data to be sent completely. Similarly, while waiting for GPU data, the CPU can process other tasks that do not depend on that data (such as certain computations of the physics engine).

[0053] Furthermore, in some embodiments, when scheduling each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategy, the method further includes: obtaining the current computing resource load and the current simulation time scale; increasing the current simulation time scale to a preset multiple of the actual time scale according to the current computing resource load, and maintaining logical time synchronization between each subtask based on a preset dynamic time scale adjustment mechanism.

[0054] It is known that the tightly coupled architecture in related technologies causes the simulation speed to be dragged down by the slowest module, resulting in large synchronization waiting overhead and making it impossible to achieve ultimate ultra-real-time simulation. This application designs an asynchronous pipeline mechanism. The CPU cluster and GPU cluster work in parallel, exchanging information through a high-speed network and intermediate data buffer, which greatly reduces the waiting time. The scheduler orchestrates tasks with "ultra-real-time" as the goal.

[0055] Specifically, this application embodiment can activate a hyperreal-time simulation engine, which dynamically adjusts the time scale. Based on the current computing resource load, the simulation time scale is increased from 1 times the actual time to N times (N≥2), while maintaining logical time synchronization between subtasks. This ensures both dynamic time acceleration and clock synchronization of the heterogeneous cluster. Simultaneously, by preloading simulation scene data (such as high-precision maps and traffic participant models), data transmission latency between subtasks is reduced, achieving data pipeline optimization.

[0056] Therefore, the ultra-real-time simulation proposed in this application aims to achieve concurrent ultra-real-time execution of tens of thousands of simulation scenarios through large-scale cluster separation, which is crucial for accelerating the discovery of long-tail problems in autonomous driving. By controlling the progression speed of the simulation clock through a scheduling system, making it faster than actual time, and ensuring that the subtasks running on the parallel processing CPUs and GPUs remain synchronized in time, the logical correctness of the simulation is guaranteed. When any one of the involved modules achieves ultra-real-time execution, the overall ultra-fast simulation capability is improved. It can cover most conventional and corner case tests, shortening the test time for the same number of tasks.

[0057] Furthermore, in some embodiments, when scheduling each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategy, the method further includes: obtaining the load status of the CPU cluster, the current CPU task queue length, the load status of the GPU cluster, and the current GPU task queue length in the pre-built computing resource pool; when the average CPU utilization of the CPU cluster is greater than a first preset utilization and the duration for which the current CPU task queue length is greater than the first preset length is greater than a first preset duration, performing a capacity expansion operation on the CPU cluster based on the load status of the CPU cluster and the current CPU task queue length; when the average GPU utilization of the GPU cluster is greater than a second preset utilization and the duration for which the current GPU task queue length is greater than the second preset length is greater than the second preset duration, performing a capacity expansion operation on the GPU cluster based on the load status of the GPU cluster and the current GPU task queue length.

[0058] Those skilled in the art will understand that traditional architectures scale on a per-unit basis for the entire simulation instance, failing to provide fine-grained, independent resource scaling based on the actual computational needs of different modules within the simulation task. This application proposes independently scaling CPU cluster nodes when CPU load is high and independently scaling GPU cluster nodes when the perception model is complex, thereby achieving an optimal balance between cost and performance.

[0059] Specifically, in this application embodiment, the resource manager can continuously monitor the load of each cluster. If GPU queue backlog is detected, the GPU nodes are automatically expanded; if CPU utilization remains high, the CPU nodes are expanded, and resources are automatically released after the task is completed.

[0060] For example, if the average CPU utilization of the CPU cluster is consistently higher than a first preset utilization rate (e.g., 80%), and the current CPU task queue length consistently exceeds a first preset length (e.g., 10 pending subtasks), and the duration of both conditions exceeds a first preset duration (e.g., 30 seconds), then the CPU cluster is determined to be in a state of continuous overload, posing a risk of task backlog and scheduling delays. In this case, based on the current load status of the CPU cluster (e.g., utilization curve trend) and the growth rate of the task queue length, a dynamic scaling operation for the CPU cluster will be triggered. This could be achieved by adding virtual CPU nodes, starting backup physical servers, or adjusting container resource quotas through cloud platform API calls, thereby improving overall CPU computing power.

[0061] Similarly, when the average GPU utilization of the GPU cluster consistently exceeds a second preset utilization rate (e.g., 85%), and the current GPU task queue length consistently exceeds a second preset length (e.g., 8 pending subtasks), and this state lasts for more than a second preset duration (e.g., 30 seconds), the system determines that GPU resources have become a performance bottleneck. At this time, based on the GPU cluster's load status (e.g., memory utilization, SM utilization) and the task queue backlog, the system performs expansion operations on the GPU cluster, such as adding GPU compute nodes, loading more GPU instances, or dynamically allocating a higher-priority GPU resource pool.

[0062] Therefore, by designing independent elastic scaling of CPU and GPU resource pools, the embodiments of this application solve the problem of idle resources of GPU and CPU or CPU and GPU in traditional architectures, and can increase the utilization rate of CPU and GPU from the common 30-50% to more than 80%.

[0063] Furthermore, to address the issue of high latency in transmitting large amounts of intermediate data (such as images and point clouds) between modules via local inter-process communication (IPC) or low-speed networks, this application proposes a high-speed data bus and serialization optimization strategy. It deploys a high-speed RDMA (Remote Direct Data Access) network between CPU and GPU clusters and designs an efficient binary serialization protocol to transmit rendering instructions, sensor data, status updates, etc., minimizing communication overhead.

[0064] It should be noted that since many simulation scenarios are similar (e.g., the same road segment, different weather conditions; the same obstacle, different locations), this application also proposes a hierarchical result caching and incremental simulation mechanism, establishing a hierarchical caching system: a GPU cache, which caches rendered images, point clouds, and other raw sensor data. If the scene does not change significantly, the cached data can be directly reused, skipping the expensive rendering step; and a CPU cache, which caches advanced results such as planning decision trees and control outputs. If the perceptual input is similar to the scene in the cache, the consistency of the algorithm output can be quickly verified, thus skipping the complete computation.

[0065] Furthermore, in some embodiments, the task to be simulated is decomposed into multiple subtasks, including: based on the logical functional structure and resource dependency type of the task to be simulated, the task to be simulated is decomposed to obtain multiple subtasks; wherein, the subtasks include at least one of the following: perception subtask, decision subtask, control subtask, and environment simulation subtask.

[0066] Specifically, the embodiments of this application can be divided into stages according to the natural processing flow of the autonomous driving algorithm. For example, the task of passing through an intersection can be broken down into: identifying traffic lights and pedestrians through camera and LiDAR data (perception subtask), deciding whether to pass based on traffic rules and prediction models (decision subtask), calculating specific steering and speed commands (control subtask), and simulating vehicle response and sensor feedback (environment simulation subtask).

[0067] It's important to note that resource dependency type focuses on the hardware skewness of each functional unit during computation. For example, in the perception subtask, image object detection is labeled as GPU-dependent because it involves convolutional neural network inference, while the filtering algorithm in point cloud ground segmentation relies more on CPU for sequence processing. In the decision subtask, rule-based scene understanding is CPU-intensive, while decision models using deep reinforcement learning are GPU-intensive.

[0068] Furthermore, in some embodiments, a remote direct data access network and a distributed caching component are deployed between the CPU cluster and the GPU cluster. The simulation method further includes: transmitting rendering instructions, sensor data, and status update messages between the CPU cluster and the GPU cluster via the remote direct data access network and a preset transmission binary serialization protocol; and using the distributed caching component to share and synchronize data between the CPU cluster and the GPU cluster based on a preset cache coherence protocol.

[0069] Specifically, the deployment of remote direct data access networks (such as RDMA) in this application aims to eliminate the high latency and CPU overhead caused by the traditional TCP / IP network protocol stack, and realize high-speed direct data read and write at the memory level between clusters. For example, after the GPU cluster completes the rendering of a frame of scene and generates sensor simulation data (such as camera images and LiDAR point clouds) containing vehicle and obstacle information, it can directly write the data from the GPU memory to a designated memory area of ​​the CPU cluster through the RDMA network. The CPU cluster can immediately obtain the data for decision-making and physics calculations without participating in the data copying process, and the latency of the entire process can be reduced to the microsecond level.

[0070] Meanwhile, to improve transmission efficiency, the system uses a preset binary serialization protocol to encode structured messages such as rendering instructions and status updates. Compared with text formats (such as JSON), binary serialization can significantly reduce data volume, speed up serialization and deserialization, and further reduce communication overhead.

[0071] Furthermore, this application's embodiments introduce a distributed caching component to address the sharing and consistency issues of frequently accessed data. For example, in a multi-scenario concurrent simulation task, multiple CPU computing nodes may need to access the same high-precision map data or the same traffic participant model. If read from remote storage or the GPU cluster each time, it will generate a huge network load. The distributed cache establishes local cache copies on the CPU and GPU cluster sides and ensures that each copy remains synchronized during updates based on a preset cache consistency protocol (such as version-based verification or invalidation notification mechanisms). When the GPU cluster updates the state of an obstacle (such as a change in location), the update quickly notifies all CPU nodes holding the cached data through the consistency protocol, invalidating or updating their local caches, thereby ensuring that subsequent CPU decisions are based on the latest environmental state and avoiding simulation logic errors caused by data inconsistency.

[0072] Therefore, by combining RDMA network with distributed caching, while realizing the physical separation architecture of CPU and GPU, the high efficiency, low latency and strong consistency of cross-cluster data interaction are ensured, providing a stable and reliable data path for ultra-real-time simulation.

[0073] The following is combined Figure 2 This paper introduces the heterogeneous cluster simulation design system involved in the simulation method proposed in this application.

[0074] like Figure 2As shown, an architecture comprising a task decomposition layer, a heterogeneous resource scheduling layer, a super-real-time simulation layer, and a result verification and output layer is constructed through a cloud platform. First, a multi-level scheduling model is built. At the bottom layer, CPU and GPU resources are virtualized to form a unified resource pool. The intelligent driving algorithm simulation task is decomposed into sub-tasks such as perception, decision-making, and control, and allocated to heterogeneous computing units such as CPUs and GPUs for parallel processing based on the characteristics of the sub-tasks. In the CPU and GPU cluster-separated architecture, a distributed caching system is set up. A cache consistency protocol ensures the consistency of cached data across different nodes, reducing redundant data reading and transmission. Then, super-real-time simulation is achieved through dynamic time acceleration and synchronization mechanisms, and resources are elastically expanded through the cloud platform.

[0075] Furthermore, in the task decomposition phase, the algorithm simulation task is broken down into four main modules: perception algorithm, decision planning, control algorithm, and environmental simulation. The perception algorithm includes sub-tasks such as image target detection, image distortion correction, point cloud denoising and filtering, Kalman filter prediction, and task data feature recognition and classification. Decision planning involves neural network prediction, rule-based state machine decision-making, and reinforcement learning decision model inference. The control algorithm mainly includes PID controller calculation and model predictive controller optimization. Environmental simulation covers ray tracing rendering to generate images, calculating vehicle motion response, simulating laser rays, and vehicle dynamics simulation.

[0076] During the heterogeneous scheduling phase, the heterogeneous scheduler virtualizes the underlying computing resources (including CPU computing clusters, GPU computing clusters, and other acceleration units) to form a unified resource pool. Based on scheduling instructions, the intelligent scheduler, through the dynamic time acceleration and synchronization mechanism of the ultra-real-time simulator, schedules different types of subtasks to the corresponding computing units: data processing and parallel-intensive tasks are executed by the GPU cluster, logical operations such as decision control are handled by the CPU cluster, and communication tasks such as data processing and transmission are completed through a distributed caching system and consistency protocols. The system achieves interaction between components through logical interfaces.

[0077] During the results verification phase, the system aggregates and compares simulation results, completes performance and security assessments, and generates a realistic evaluation report including metrics such as super real-time speedup and algorithm accuracy. The entire process relies on the elastic scalability of the cloud platform, allowing for rapid expansion of underlying resources such as computing, storage, and networking as needed.

[0078] Therefore, the heterogeneous cluster simulation design system according to this application can achieve simulation speeds tens to hundreds of times faster than real-time (i.e., simulating one year's driving mileage can be completed in just a few hours or days). This allows for massive mileage verification in the early stages of development, quickly exposing and fixing algorithm defects, shortening the original testing cycle from years to weeks or even days, supporting concurrent simulation in multiple scenarios, significantly improving the iterative verification efficiency of intelligent driving algorithms, and reducing costs.

[0079] This application also provides a simulation device 30, please refer to... Figure 3 The system includes: a decomposition module 310, used to acquire the task to be simulated, decompose the task into multiple subtasks, and further decompose each subtask into multiple minimum computational granularity tasks, and determine the computational characteristic information and resource dependencies of each minimum computational granularity task; a matching module 320, used to match a corresponding target computing unit for each subtask based on the current resource status of a pre-built computing resource pool, the computational characteristic information and resource dependencies of each minimum computational granularity task, and a preset heterogeneous resource scheduling algorithm; and a simulation module 330, used to generate parallel execution strategies for multiple subtasks and schedule each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategies. The computational characteristic information is a data set of inherent attributes and performance requirements of each minimum computational granularity task during computation execution, and the target computing unit is a computing resource instance allocated from the pre-built computing resource pool for each minimum computational granularity task according to the preset heterogeneous resource scheduling algorithm.

[0080] This application also provides an electronic device 40, please refer to... Figure 4 It includes a processor 410 and a memory 420, wherein the memory 410 is used to store computer programs; and the processor 420 is used to execute the programs stored in the memory 410 to implement the simulation method described in any embodiment of this application.

[0081] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the simulation method described in any embodiment of this application.

[0082] In this application, "multiple" refers to two or more.

[0083] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0084] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0085] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0086] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if the method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if the method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.

[0087] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A simulation method, characterized in that, Includes the following steps: Obtain the task to be simulated, decompose the task to be simulated into multiple subtasks, and decompose each subtask into multiple minimum computational granularity tasks, and determine the computational characteristic information of each minimum computational granularity task and the resource dependency relationship of each minimum computational granularity task. Based on the current resource status of the pre-built computing resource pool, the computing characteristic information of each smallest computing granularity task, and the resource dependency relationship, a corresponding target computing unit is matched for each subtask according to a preset heterogeneous resource scheduling algorithm. Generate a parallel execution strategy for multiple subtasks, and schedule each subtask to perform simulation operations on the corresponding target computing unit based on the parallel execution strategy; The computational characteristic information is a data set of inherent attributes and performance requirements of each minimum computational granularity task during the computation execution process, and the target computational unit is a computational resource instance allocated from the pre-built computational resource pool for each minimum computational granularity task according to the preset heterogeneous resource scheduling algorithm.

2. The method according to claim 1, characterized in that, The pre-built computing resource pool includes physically separated CPU clusters and GPU clusters. Based on the current resource status of the pre-built computing resource pool, the computational characteristics of each smallest-granularity task, and the resource dependencies, a preset heterogeneous resource scheduling algorithm is used to match a corresponding target computing unit for each subtask, including: Obtain the current CPU utilization of the CPU cluster and the current GPU utilization of the GPU cluster, and determine the minimum resource requirement of each subtask based on the computational characteristics of each minimum computational granularity task and the resource dependency relationship, wherein the minimum resource requirement includes minimum CPU resource requirement and / or minimum GPU resource requirement. If the current CPU utilization is less than a first preset threshold and the current GPU utilization is greater than or equal to a second preset threshold, then CPU resources are allocated to each subtask based on the minimum CPU resource requirement of each subtask and the first CPU resource margin, and GPU resources are allocated to each subtask based on the minimum GPU resource requirement of each subtask. If the current CPU utilization is greater than or equal to the first preset threshold and the current GPU utilization is less than the second preset threshold, then CPU resources are allocated to each subtask according to the minimum CPU resource requirement of each subtask, and GPU resources are allocated to each subtask according to the minimum GPU resource requirement of each subtask and the first GPU resource margin. If the current CPU utilization is less than the first preset threshold and the current GPU utilization is less than the second preset threshold, then CPU resources are allocated to each subtask based on the minimum CPU resource requirement and the second CPU resource margin of each subtask, and GPU resources are allocated to each subtask based on the minimum GPU resource requirement and the second GPU resource margin of each subtask.

3. The method according to claim 1, characterized in that, When scheduling each subtask to perform simulation operations on its corresponding target computing unit based on the parallel execution strategy, the method further includes: Obtain the current computing resource load and the current simulation time scale; Based on the current computing resource load, the current simulation time scale is increased to a preset multiple of the actual time scale, and based on a preset dynamic time scale adjustment mechanism, the logical time synchronization between each subtask is maintained.

4. The method according to claim 1, characterized in that, When scheduling each subtask to perform simulation operations on its corresponding target computing unit based on the parallel execution strategy, the method further includes: Obtain the load status of the CPU cluster, the current CPU task queue length, the load status of the GPU cluster, and the current GPU task queue length in the pre-built computing resource pool; If the average CPU utilization of the CPU cluster is greater than a first preset utilization and the duration for which the current CPU task queue length is greater than a first preset length is greater than a first preset duration, then the CPU cluster is expanded according to the load status of the CPU cluster and the current CPU task queue length. If the average GPU utilization of the GPU cluster is greater than the second preset utilization, and the duration for which the current GPU task queue length is greater than the second preset length is greater than the second preset duration, then the GPU cluster is expanded according to the load status of the GPU cluster and the current GPU task queue length.

5. The method according to claim 1, characterized in that, The computational characteristic information includes at least one of computational complexity, parallelism, and latency requirements, and the simulation results include at least one of time speedup, algorithm accuracy, and resource utilization.

6. The method according to claim 1, characterized in that, The step of breaking down the task to be simulated into multiple sub-tasks includes: Based on the logical functional structure and resource dependency type of the task to be simulated, the task to be simulated is decomposed to obtain the multiple sub-tasks. The subtasks include at least one of the following: perception subtask, decision-making subtask, control subtask, and environment simulation subtask.

7. The method according to claim 2, characterized in that, A remote direct data access network and a distributed caching component are deployed between the CPU cluster and the GPU cluster. The simulation method further includes: Rendering instructions, sensor data, and status update messages are transmitted between the CPU cluster and the GPU cluster via the remote direct data access network and a preset transport binary serialization protocol. The distributed caching component is used to share and synchronize data between the CPU cluster and the GPU cluster based on a preset cache consistency protocol.

8. An electronic device, characterized in that, Including processor and memory, among which Memory, used to store computer programs; A processor for executing a program stored in memory to implement the simulation method described in any one of claims 1-7.

9. A vehicle, characterized in that, It includes the electronic device as described in claim 8.

10. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the simulation method according to any one of claims 1-7.