A container configuration optimization method and apparatus for ensuring end-to-end latency in a containerized autonomous driving system.

By modeling the autonomous driving system as a directed acyclic graph and employing a multi-objective dynamic programming algorithm, the problem of quantitative modeling of the multi-task chain coupling characteristics and end-to-end latency in containerized autonomous driving systems is solved. This achieves hard real-time assurance of end-to-end latency and efficient resource utilization, reduces safety risks, and improves the functional safety and scalability of the system.

CN122132191APending Publication Date: 2026-06-02NORTHEASTERN UNIV CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHEASTERN UNIV CHINA
Filing Date
2026-05-08
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies in containerized autonomous driving systems have failed to effectively achieve quantitative modeling of the coupling characteristics of multiple task chains and end-to-end latency, and lack global configuration optimization methods under multiple task dependencies and multiple resource constraints, resulting in critical path latency failing to meet real-time requirements and posing safety risks.

Method used

The autonomous driving system is abstracted as a directed acyclic graph. A mapping model between container resource configuration and end-to-end latency is established through a test-driven approach. A multi-objective dynamic programming algorithm is used to perform a global search under the conditions of multi-task chain dependencies and multi-resource constraints to optimize container configuration, ensure that the end-to-end latency of the critical path meets the real-time deadline, and minimize resource allocation.

Benefits of technology

It achieves accurate capture of the cumulative delay effect caused by multi-container resource contention and timing coupling, provides predictable and verifiable hard real-time guarantee, reduces security risks, improves the functional safety level of the system, and improves resource utilization and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132191A_ABST
    Figure CN122132191A_ABST
Patent Text Reader

Abstract

This invention provides a container configuration optimization method and apparatus for ensuring end-to-end latency in a containerized autonomous driving system, relating to the field of autonomous driving technology. The method first models the containerized autonomous driving system, decomposes critical paths into sub-paths and defines temporal attributes, constructs an end-to-end timing model for calculating the worst-case end-to-end latency of critical paths, and establishes a mapping relationship between container configuration parameters and the worst-case response time of sub-paths. Based on this mapping relationship, a container configuration optimization problem is constructed and solved to obtain a container configuration scheme that satisfies end-to-end latency constraints. Through systematic end-to-end timing modeling and global configuration optimization, this invention can ensure that the worst-case end-to-end latency of all critical paths strictly does not exceed their respective deadlines in complex scenarios with strong coupling of multiple task chains and competition for multiple container resources, while minimizing total resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving technology, and more specifically, to a container configuration optimization method and apparatus for ensuring end-to-end latency in a containerized autonomous driving system. Background Technology

[0002] In autonomous driving systems, end-to-end latency refers to the time elapsed from sensor perception to the issuance of control commands, and it is a core indicator for measuring the system's real-time performance and safety. Autonomous vehicles need to complete closed-loop operations of perception, decision-making, and control in complex and dynamically changing traffic environments. Accumulated latency or sudden exceedances in any execution link can cause critical actions such as braking and obstacle avoidance to miss the safe time window, leading to serious safety risks. With the development of software-defined vehicles, autonomous driving software systems are gradually evolving from monolithic architectures to modular and service-oriented architectures. Mainstream software stacks, represented by Autoware and Apollo, typically decouple functions such as perception, localization, planning, and control into independent components, and encapsulate and deploy them through containers. Containerization technology, with its lightweight virtualization mechanism, achieves operational isolation between modules and offers advantages such as flexible deployment, configurable resources, easy maintenance, and online upgrades, making it the mainstream method for the engineering implementation of in-vehicle autonomous driving systems.

[0003] However, while containerization improves system flexibility and engineering efficiency, it also introduces new real-time challenges. Containers offer a wealth of resource configuration parameters, such as the number of CPU cores and memory quotas. These parameters directly affect how containers utilize underlying hardware resources and the resource contention between containers, thus determining the execution sequence and end-to-end latency of each task chain. Currently, industry-wide container resource configuration still relies heavily on manual experience-based tuning. This approach is acceptable when the system is small and the scenario is relatively fixed, but as the number of containers increases, the complexity of task chains rises, and operating conditions diversify, the difficulty and cost of manual tuning increase exponentially. Furthermore, it is difficult to provide formal, verifiable real-time guarantees, and critical path timeouts are highly likely to occur.

[0004] While existing technologies have made some progress in container resource configuration and latency optimization, they still have significant shortcomings. Patent CN118331738A proposes a latency-aware intelligent scheduling scheme for container cloud resources. Through resource profiling, load change prediction, and latency quantification modules, combined with a hybrid scaling strategy of horizontal Pod Auto-Scaling (HPA) and vertical Pod Auto-Scaling (VPA), it achieves low-latency scheduling and efficient resource utilization of cloud containers in industrial IoT scenarios. However, this scheme is primarily designed for industrial IoT cloud environments, focusing on single-container or node-level latency optimization. It is difficult to directly migrate to automotive edge computing scenarios and does not consider the strong coupling characteristics and latency accumulation effects of the end-to-end task chain in autonomous driving.

[0005] Patent CN108594819A proposes a solution for managing onboard computing resources in autonomous driving vehicles. During the initialization phase, resources such as CPU and memory are statically pre-allocated and upper limits are set to create an isolated environment. Limited dynamic adjustments are then made during operation through monitoring. While this solution is highly compatible with onboard deployment scenarios, it lacks latency modeling and optimization for end-to-end task chains and global combinatorial optimization methods under multiple task dependencies and resource constraints. This makes it difficult to ensure that multiple critical paths meet strict real-time deadline requirements. Summary of the Invention

[0006] The technical problem this invention addresses is the lack of quantitative modeling of multi-task chain coupling characteristics and end-to-end latency in existing containerized autonomous driving systems, as well as the absence of global configuration optimization methods under multi-task dependency and multi-resource constraints. This invention provides a container configuration optimization method to ensure end-to-end latency in containerized autonomous driving systems. This method abstracts the autonomous driving system as a directed acyclic graph (DAG) to explicitly describe task dependencies. It collects the actual execution latency of sub-paths under different container resource configurations through a test-driven approach, establishing a mapping model between container configuration parameters and end-to-end latency. Simultaneously, a multi-objective dynamic programming algorithm is used to globally search for the optimal configuration combination under multi-task chain dependency and multi-resource constraints. This ensures that the end-to-end latency of critical paths strictly meets real-time deadline requirements while minimizing resource allocation, achieving synergistic optimization of real-time hard guarantees and efficient resource utilization.

[0007] To achieve the above objectives, the main technical solution adopted by the present invention is as follows: In a first aspect of the present invention, a container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system is provided, comprising the following steps: S1. Model the containerized autonomous driving system, abstract the system into a directed acyclic graph, obtain the data dependency relationship between nodes and the functional module division results, and establish the correspondence between functional modules and containers. S2. Based on the directed acyclic graph and functional module partitioning results in S1, the critical path is decomposed into sub-paths and time-series attributes are defined. S3. Based on the sub-path decomposition and timing attribute definition in S2, construct an end-to-end timing model for calculating the worst-case end-to-end delay of the critical path. S4. Based on the functional module partitioning results in S1 and the sub-paths in S2, establish a mapping relationship between container configuration parameters and the worst-case response time of sub-paths. S5. Based on the end-to-end timing model in S3 and the mapping relationship in S4, construct a container configuration optimization problem that satisfies the end-to-end latency constraint. S6. Based on the container configuration optimization problem in S5, a container configuration scheme that satisfies the end-to-end latency constraint is obtained.

[0008] Preferably, in step S1, the nodes in the directed acyclic graph include time-triggered nodes and event-triggered nodes, wherein the time-triggered nodes release job instances according to a preset period, and the event-triggered nodes trigger execution based on the output data of the predecessor node; Each edge of the directed acyclic graph is configured with a buffer for caching data and triggering the execution of subsequent nodes, in order to characterize the data-driven dependencies between nodes.

[0009] Preferably, the nodes in the directed acyclic graph are divided into multiple functional modules according to their functions, and each functional module is mapped to an independent container, so that a one-to-one correspondence is established between the system functional structure and the resource allocation unit.

[0010] Preferably, in S2, the critical path is decomposed into a sequence of sub-paths across functional modules. Each sub-path is confined to a single functional module, and the sub-paths are arranged sequentially according to the module execution order to eliminate cross-module reverse dependencies.

[0011] Preferably, for each sub-path, the execution boundary of the sub-path is determined by defining the set of entry nodes as nodes without a predecessor node within the module or whose predecessor node is located outside the module, and defining the set of exit nodes as nodes without a successor node within the module or whose successor node is located outside the module.

[0012] Preferably, in S3, an end-to-end timing model is constructed by combining and accumulating the worst-case response time of the sub-path and the waiting time between adjacent sub-paths, wherein the waiting time is determined by the trigger misalignment relationship between the completion time of the upstream sub-path and the release cycle of the downstream sub-path.

[0013] Preferably, in the end-to-end latency calculation, the waiting time between sub-paths is replaced by the release period of the corresponding sub-path as the upper bound to obtain a conservative estimate of the worst-case end-to-end latency.

[0014] Preferably, in S4, the worst-case response time of a single container is collected by adjusting the configuration parameters of each single container one by one while keeping the default configuration of other containers. An interference correction factor is determined based on the difference between the response time measured under the condition of multiple containers running simultaneously and the response time of a single container. The response time is then corrected based on the interference correction factor to establish a mapping relationship.

[0015] Preferably, in S6, a multi-objective dynamic programming method with containers as stages is used for solving the problem. During the recursive process, the cumulative end-to-end delay vector of the critical path is maintained, and state pruning is performed through Pareto dominance relations. At the same time, resource constraint pruning and a state filtering strategy based on the scoring function are combined to control the state scale.

[0016] In another aspect of the present invention, a container configuration optimization apparatus for a containerized autonomous driving system that guarantees end-to-end latency is provided, comprising: The modeling module is used to model the containerized autonomous driving system, abstract the system into a directed acyclic graph, obtain the data dependencies between nodes and the functional module partitioning results, and establish the correspondence between functional modules and containers. The decomposition module is used to decompose the critical path into sub-paths and define temporal attributes based on the directed acyclic graph and the functional module partitioning results. The timing analysis module is used to construct an end-to-end timing model for calculating the worst-case end-to-end delay of the critical path based on sub-path decomposition and timing attribute definition. The mapping module is used to establish a mapping relationship between container configuration parameters and the worst-case response time of sub-paths based on the division of results and sub-paths according to functional modules. The optimization modeling module is used to construct a container configuration optimization problem based on the end-to-end timing model and mapping relationship, which satisfies the end-to-end latency constraints.

[0017] The solution module is used to solve the container configuration optimization problem and obtain a container configuration scheme that satisfies the end-to-end delay constraint.

[0018] The present invention has the following beneficial effects and advantages: (1) This invention, from a system-level perspective, models the autonomous driving system as a directed acyclic graph and decomposes the end-to-end path into cross-module sub-paths. It quantifies the worst-case latency of critical paths using a combined end-to-end timing model. This model accurately captures the cumulative latency effect caused by multi-container resource contention and temporal coupling, thus ensuring that the worst-case end-to-end latency of all critical paths strictly meets their respective deadline requirements in complex dynamic environments. Compared to the uncontrollable situation in existing technologies where some paths meet the deadlines but critical paths are prone to timeouts, this invention provides predictable and verifiable hard real-time performance assurance, significantly reducing safety risks caused by latency exceeding limits and improving the functional safety level of the autonomous driving system.

[0019] (2) Under the premise of satisfying all critical path hard deadline constraints, this invention searches for the Pareto optimal configuration combination through a multi-objective dynamic programming algorithm, which can minimize the total resource consumption and avoid the over-allocation or waste of resources commonly found in traditional manual tuning or static pre-allocation schemes. Under the same hardware resource conditions, it can support the containerized deployment of more functional modules, or release more computing resources for other non-critical tasks or future functional expansion, thereby improving the overall utilization and scalability of the vehicle computing platform.

[0020] (3) This invention constructs a mapping relationship between container configuration parameters and the worst response time of sub-paths through an isolated test-driven approach, and combines it with a data-driven global optimization algorithm to realize an automated closed-loop process from measured data to optimal configuration. This method has good repeatability and verifiability, significantly reduces the difficulty of engineering optimization and manpower costs, and provides a reliable technical means for real-time verification before system launch and formal proof of functional safety standards. Attached Figure Description

[0021] Figure 1 This is the main flowchart of a container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to the present invention. Figure 2 This represents the worst-case scenario of the container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to the present invention. Detailed Implementation

[0022] The present invention will now be further described with reference to the accompanying drawings.

[0023] like Figure 1 As shown, the container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system proposed in this invention includes the following steps: S1, System Modeling.

[0024] The containerized autonomous driving system is abstracted as a directed acyclic graph. ,in Represents a set of ROS 2 nodes. This represents the data dependencies between nodes. Each edge corresponds to a buffer, used to store messages generated by upstream nodes to trigger execution by downstream nodes.

[0025] Each node With execution time This indicates the processing delay from when the node is triggered to when the output is complete; each edge Associate a buffer Used for storage The generated message is triggered New assignment example.

[0026] Nodes can be categorized into time-triggered nodes based on their triggering method. and event triggering node ,in Time-triggered nodes periodically release jobs, reading the input buffer each time they are released; event-triggered nodes are only triggered to execute when a message is received from a specified predecessor node.

[0027] For any node Its predecessor node set is denoted as The successor node set is denoted as Nodes without predecessors are called source nodes, and nodes without successors are called sink nodes.

[0028] Starting from the source node, the job propagates through the graph to form a complete execution path. Taking into account factors such as mission security level, latency sensitivity, and data transmission strength, multiple complete paths that have a decisive impact on system functional safety and real-time performance are defined as critical paths, and a corresponding end-to-end delay deadline is set for each critical path. .

[0029] To reflect the functional structure, the directed acyclic graph G is further divided into functional modules, forming multiple functional module graphs. ,in There is a set of N functional modules. Each functional module... Encapsulate a group of ROS2 nodes, where , Edges connect functional modules; dependencies between modules are established through edge sets. This indicates that if cross-module edges exist... and ,but Each module defines an entry node set as the set of time-triggered nodes without a predecessor within the module or nodes whose predecessors are outside the module; and an exit node set as the set of successor nodes without a successor within the module or whose successors are outside the module. This division clearly marks the start and end points of module execution, facilitating the analysis of module-level execution flow and cross-module dependencies. To map the module-level structure to the deployment layer, each functional module is further mapped as an independent container.

[0030] The above modeling method describes the task flow, triggering mechanism, dependency relationship and functional module division within the autonomous driving system, providing a structural foundation for subsequent time series analysis and resource mapping.

[0031] S2, Sub-path decomposition and timing attribute definition.

[0032] Based on the system model described above, the critical path is decomposed. The end-to-end path is decomposed into a sequence of sub-paths across functional modules. Each sub-path Indicates functional modules The execution flow within a module starts at the module's entry node and ends at the module's exit node, with module numbers strictly increasing to avoid reverse dependencies. This is for each sub-path. Define the following four key timing properties: (1) Release cycle From the entry node The period is determined by the time interval between consecutively triggered instances in a sub-path; (2) Release time , represents the moment when the entry node triggers a certain job instance, denoted as j-th instance. ; (3) Worst-case response time This represents the maximum duration from the moment the entry node is triggered until all tasks in the sub-paths within the module are completed. (4) Completion time , representing the time when the sub-path finishes execution and generates output data, for the j-th instance, satisfying For the sake of brevity, instance indexes will be omitted in the subsequent derivation; instead, we will use the provided index directly. and .

[0033] S3. Establish a combined end-to-end timing model.

[0034] Based on the above sub-path decomposition and timing attribute definition, a combined end-to-end timing model is further constructed to realize the quantitative calculation of the worst-case delay at the path level.

[0035] path The worst case is Figure 2 Indicates, such as Figure 2 As shown, its end-to-end delay The worst response time of each sub-path can be combined Waiting time between sub-paths Calculation, expressed as Among them, waiting time Triggering dependencies arise from the relationship between upstream and downstream sub-paths: downstream sub-paths Execution requires waiting for the upstream subpath. Complete and output data is available. This is based on the completion time of the upstream subpath. Later than the expected release time of downstream sub-paths If this happens, the downstream sub-path needs to be postponed to the next release cycle, thus introducing additional delay, meaning the earliest release time must meet the requirement. The corresponding waiting time is In the worst case, each subpath may miss its release time, resulting in an additional cycle delay. Therefore, the conservative upper bound is estimated to be... .

[0036] This upper bound corresponds to the situation where the completion time of the upstream sub-path slightly exceeds the release time of the downstream sub-path, causing the downstream sub-path to continuously miss its cycle, thus capturing the maximum impact of the cumulative delay effect caused by sub-path misalignment and dependency. This combined time series model provides a predictable and quantifiable end-to-end delay analysis framework through sub-path decomposition and delay superposition, laying a solid foundation for subsequent response time mapping and global optimization based on container configuration.

[0037] S4. Container configuration and latency mapping establishment.

[0038] In S1, each functional module has been... Mapped to an independent container This enables runtime isolation and resource management. In actual deployments, the container resource allocation method directly affects the real-time execution performance of the ROS 2 nodes within the module, thus significantly impacting the worst-case response time of sub-paths and the overall end-to-end latency. The specific impact of container configuration parameters on the worst-case response time of sub-paths is as follows: (1) CPU quota: The number of CPU cores allocated directly determines the processing capacity of the computing tasks inside the container. The more cores, the more threads or processes the container can execute, which helps to reduce task queuing time and computing latency, and reduce end-to-end latency. However, excessive allocation of core resources may lead to frequent context switching, increase scheduling overhead, and affect the overall operating efficiency and latency stability of the system.

[0039] (2) Memory allocation: The size of memory directly affects the caching capacity and memory access latency during data transmission between nodes. Sufficient memory can improve the cache hit rate, reduce access to the underlying storage, reduce data access overhead and node processing latency, thereby reducing end-to-end latency. However, insufficient memory will cause frequent page swapping, significantly increase data access latency, and may even cause message loss or a surge in transmission latency.

[0040] Based on this, this step uses a test-driven approach to establish a mapping relationship between container configuration and the worst response time of sub-paths within the container, where the container configuration parameters are CPU quota (represented by X) and memory allocation (represented by Y).

[0041] The testing process is as follows: S4.1 Generating Configuration Sets: To ensure fairness, repeatability, and coverage of real-world operating scenarios, configuration sets are generated for each container. Pre-generate a diverse set of candidate configurations Specifically, considering the actual operating characteristics, resource urgency, and real-time requirements of the Autoware reference system, the upper and lower limits of CPU and memory for each container are first determined based on the overall system idle resource threshold. Within this range, multiple candidate configurations are generated, including both lightweight schemes with low resource consumption and high-performance configurations to meet the real-time requirements under different task loads. Observations show that when CPU and memory allocation exceeds a certain threshold, latency improvement exhibits a significant diminishing marginal return trend. Therefore, the configuration set focuses on covering the low to medium-high resource range to avoid resource waste. Typical configuration ranges are as follows: CPU core allocation range is set to 1 to 3 cores, and memory allocation range is set to 0.5 to 5GB. Different configuration schemes are generated through discrete combinations to achieve a balance between resource utilization efficiency and task real-time performance.

[0042] S4.2 Acquiring Latency Data: To obtain an accurate and repeatable mapping relationship, this method first constructs a configuration-latency table experimentally. A single-container configuration testing method is adopted, targeting the container... Each candidate configuration This study collects the worst-case response times of each sub-path within a target container in a complete containerized autonomous driving system environment. Only the CPU core count and memory capacity of the target container are adjusted individually, while the other containers retain their default settings. This ensures relatively isolated test conditions and reduces external interference, thereby obtaining a baseline mapping relationship between container configuration and the worst-case response time of the sub-path. In a real SOAFEE containerized environment, the sub-path execution process is also affected by factors such as middleware scheduling, kernel scheduling, and shared resource contention, leading to a certain degree of amplification in the observed response time compared to the test results under ideal isolation conditions. To characterize these interferences, an interference correction factor is introduced, and the worst-case response time of the sub-path after interference correction is redefined as the original test latency * (1 + interference factor). The interference factor, estimated based on experimental data or experience, represents the relative latency amplification caused by underlying system interference, reflecting the increase in response time caused by interference between co-located containers. The data collection process includes multiple repeated runs to obtain statistical worst-case values ​​and superimposing the interference correction factor from multiple container runs as baseline data to construct a configuration-latency table.

[0043] The configuration-delay table provides the sub-path response time under different container configurations. Combined with S3's combined end-to-end timing model, the worst-case end-to-end delay of the critical path can be calculated, thus achieving a quantitative correlation between configuration parameters and the overall timing performance of the system.

[0044] S5, container configuration optimization issues.

[0045] Based on the above model and latency mapping, this invention formalizes the container configuration problem into an optimization problem. Under the premise of satisfying all critical path end-to-end latency constraints, it minimizes resource overhead and achieves a balance between overall system real-time performance assurance and resource utilization efficiency.

[0046] Consider a containerized autonomous driving system with N containers. For each container... Its candidate configuration set is denoted as , in which configuration Specify the CPU quota X (number of cores) and memory allocation Y (GB) respectively. The system has a global resource limit. (Total number of CPU cores) and (Total memory capacity). Let the set of all critical paths in the system be denoted as . Each critical path By traversing a series of container local subpaths Composition, each sub-path The entry node has a release cycle. .path With a clear deadline , which indicates the maximum allowed end-to-end delay.

[0047] In configuration Below, sub-paths can be obtained based on the S4 configuration-delay table. Worst case response time Using the combined time series model described in step 3, any critical path can be calculated. Worst end-to-end latency in a federated container configuration ,in , This represents the selected set of configurations, where each container... Only one configuration can be selected. .

[0048] This invention formalizes the container configuration problem into a constrained optimization problem: Where α and β are the resource weighting coefficients for CPU and memory, reflecting the degree of strain on system CPU and memory resources. The constraints include the following: (1) : Requires the critical path The worst-case end-to-end delay does not exceed its corresponding deadline.

[0049] (2) ; The requirement is that the total resource consumption (CPU and memory) of all containers must not exceed the upper limit of system resources.

[0050] (3) Each container can only select one configuration.

[0051] S6. Solve using an optimized algorithm.

[0052] Based on the optimization problem in S5, this invention proposes a multi-objective dynamic programming algorithm to solve for the optimal container configuration. The algorithm models the container configuration selection process as a phased decision-making process, with each phase corresponding to one container. It maintains the cumulative end-to-end delay vector of the critical path through forward recursion and employs a pruning strategy at each phase to control the computational scale, thereby minimizing resource consumption and satisfying all critical path delay constraints.

[0053] Algorithms use containers to The order of these stages serves as the decision-making process. For each stage... Regarding the potential total resource consumption Maintain a non-dominated cumulative delay vector set This vector set records all critical paths. The cumulative worst-case latency.

[0054] The execution process is as follows: S6.1 Initialization: For the first container All candidate configurations Calculate the delay increment for each critical path. Construct the cumulative delay vector .like If all deadline constraints are met, then join. And apply Pareto dominance pruning to preserve non-dominated vectors.

[0055] S6.2, Recursive Calculation: For subsequent containers ( (up to N), for each candidate configuration and satisfy , Total resources : Acquire the prerequisite resources for the previous stage nondominated vector set ; For each pre-vector Calculate the current increment vector Generate a new vector ;like If the deadline for any path is violated, discard it; otherwise, store it temporarily. Regarding The candidate vector set is optimized by pruning: first, Pareto domination pruning is performed to remove dominated vectors; then, resource redundancy pruning is performed to remove vectors that dominate higher resource states under lower resource conditions; finally, the remaining states are sorted according to the composite scoring function, and only the top-Z states with the highest scores are retained.

[0056] S6.3 Termination and Output: After completing the Nth stage, perform the following steps on the final non-dominated vector set: Controlling pruning yields global results. The optimal solution set is determined, and the configuration scheme that satisfies all deadline constraints and minimizes resource consumption is selected from it.

[0057] This algorithm effectively controls the size of the state space through phased recursion and optimized pruning. In autonomous driving systems with a moderate number of containers and critical paths, it can efficiently generate high-quality configuration schemes that meet end-to-end latency guarantees.

[0058] This invention proposes a container configuration parameter optimization method for end-to-end latency assurance, which systematically solves the core problem of difficulty in guaranteeing end-to-end real-time performance caused by multi-task chain coupling in containerized autonomous driving systems. Compared with existing technologies, the key technical features and innovations of this invention are mainly reflected in the following aspects: (1) This invention abstracts the ROS2 node set into a DAG structure to characterize the cross-module data flow of node dependencies, and further divides the functional modules into independent containers to achieve a precise correspondence between task dependencies and resource management. On this basis, the end-to-end path is decomposed into a strictly sequential cross-module sub-path sequence, and a combined worst-case timing model is introduced to quantify the upper bound of the worst-case end-to-end latency, systematically capturing the latency accumulation effect caused by multi-container resource competition and timing coupling. This modeling and quantification method overcomes the shortcomings of existing container resource management methods that are limited to the single container or single node level and lack predictable and verifiable means for the global latency of the vehicle end-to-end task chain, providing a structured and computable basis for subsequent configuration impact analysis and global optimization.

[0059] (2) To address the nonlinear impact of container configuration parameters on real-time performance, this invention employs a test-driven approach to construct a mapping relationship. A diverse set of candidate configurations is generated for each container. By changing the configuration of each container, fixing the default settings of the remaining containers, repeatedly running the test to obtain the worst-case statistical value, and superimposing multi-container interference correction factors, a data-driven configuration and sub-path worst-case response time benchmark table is constructed, providing a reliable experimental data foundation for multi-constraint global optimization.

[0060] (3) Based on the above model and mapping, this invention formalizes the multi-container configuration problem into a constrained optimization problem that minimizes resource costs. At the same time, it imposes hard constraints that the end-to-end latency of all critical paths does not exceed their respective deadlines and the global CPU and memory resource limits. To this end, an optimization algorithm with containers as the decision-making stage is proposed. This algorithm can ensure that the end-to-end latency of all critical paths strictly meets the hard deadlines and minimizes the total resource consumption in complex vehicle scenarios with multi-task dependencies and discrete resource constraints. This is the most critical technical means of this invention. No similar global combinatorial optimization scheme has been found in existing patents to coordinate end-to-end hard real-time performance and resource efficiency.

[0061] Furthermore, this invention proposes a container configuration optimization device for a containerized autonomous driving system that guarantees end-to-end latency, comprising a modeling module, a decomposition module, a timing analysis module, a mapping establishment module, an optimization modeling module, and a solution module. The modeling module models the containerized autonomous driving system, abstracting the system as a directed acyclic graph (DAG), obtaining the data dependencies between nodes and the functional module partitioning results, and establishing the correspondence between functional modules and containers. The decomposition module decomposes the critical path into sub-paths and defines timing attributes based on the DAG and functional module partitioning results. The timing analysis module constructs an end-to-end timing model for calculating the worst-case end-to-end latency of the critical path based on the sub-path decomposition and timing attribute definitions. The mapping establishment module establishes a mapping relationship between container configuration parameters and the worst-case response time of sub-paths based on the functional module partitioning results and sub-paths. The optimization modeling module constructs a container configuration optimization problem that satisfies end-to-end latency constraints based on the end-to-end timing model and mapping relationship. The solution module solves the container configuration optimization problem to obtain a container configuration scheme that satisfies the end-to-end latency constraints.

[0062] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system, characterized in that, Includes the following steps: S1. Model the containerized autonomous driving system, abstract the system into a directed acyclic graph, obtain the data dependency relationship between nodes and the functional module division results, and establish the correspondence between functional modules and containers. S2. Based on the directed acyclic graph and functional module partitioning results in S1, the critical path is decomposed into sub-paths and time-series attributes are defined. S3. Based on the sub-path decomposition and timing attribute definition in S2, construct an end-to-end timing model for calculating the worst-case end-to-end delay of the critical path. S4. Based on the functional module partitioning results in S1 and the sub-paths in S2, establish a mapping relationship between container configuration parameters and the worst-case response time of sub-paths. S5. Based on the end-to-end timing model in S3 and the mapping relationship in S4, construct a container configuration optimization problem that satisfies the end-to-end latency constraint. S6. Based on the container configuration optimization problem in S5, a container configuration scheme that satisfies the end-to-end latency constraint is obtained.

2. The container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to claim 1, characterized in that, In S1, the nodes in the directed acyclic graph include time-triggered nodes and event-triggered nodes, wherein time-triggered nodes release job instances according to a preset period, and event-triggered nodes trigger execution based on the output data of the predecessor node; Each edge of the directed acyclic graph is configured with a buffer for caching data and triggering the execution of subsequent nodes, in order to characterize the data-driven dependencies between nodes.

3. The container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to claim 2, characterized in that, The nodes in the directed acyclic graph are divided into multiple functional modules according to their functions, and each functional module is mapped to an independent container, so that a one-to-one correspondence is established between the system functional structure and the resource allocation unit.

4. The container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to claim 1, characterized in that, In S2, the critical path is decomposed into a sequence of sub-paths across functional modules. Each sub-path is confined to a single functional module, and the sub-paths are arranged sequentially according to the module execution order to eliminate cross-module reverse dependencies.

5. The container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to claim 4, characterized in that, For each sub-path, the execution boundary of the sub-path is determined by defining the entry node set as nodes without a predecessor node within the module or whose predecessor node is located outside the module, and the exit node set as nodes without a successor node within the module or whose successor node is located outside the module.

6. The container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to claim 1, characterized in that, In S3, an end-to-end timing model is constructed by combining and accumulating the worst-case response time of a sub-path with the waiting time between adjacent sub-paths. The waiting time is determined by the trigger misalignment relationship between the completion time of the upstream sub-path and the release cycle of the downstream sub-path.

7. The container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to claim 6, characterized in that, In end-to-end latency calculation, the waiting time between sub-paths is replaced by the release period of the corresponding sub-path as the upper bound to obtain a conservative estimate of the worst-case end-to-end latency.

8. The container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to claim 1, characterized in that, In S4, the worst-case response time of a single container is collected by adjusting the configuration parameters of each individual container while keeping the default configuration of other containers. The interference correction factor is determined based on the difference between the response time measured under the condition of multiple containers running simultaneously and the response time of a single container. The response time is then corrected based on the interference correction factor to establish a mapping relationship.

9. The container configuration optimization method for ensuring end-to-end latency in a containerized autonomous driving system according to claim 1, characterized in that, In S6, a multi-objective dynamic programming method with containers as stages is used for solving the problem. During the recursive process, the cumulative end-to-end delay vector of the critical path is maintained, and state pruning is performed through Pareto dominance relations. At the same time, resource constraint pruning and a state filtering strategy based on the scoring function are combined to control the state scale.

10. A container configuration optimization device for a containerized autonomous driving system that guarantees end-to-end latency, characterized in that, include: The modeling module is used to model the containerized autonomous driving system, abstract the system into a directed acyclic graph, obtain the data dependencies between nodes and the functional module partitioning results, and establish the correspondence between functional modules and containers. The decomposition module is used to decompose the critical path into sub-paths and define temporal attributes based on the directed acyclic graph and the functional module partitioning results. The timing analysis module is used to construct an end-to-end timing model for calculating the worst-case end-to-end delay of the critical path based on sub-path decomposition and timing attribute definition. The mapping module is used to establish a mapping relationship between container configuration parameters and the worst-case response time of sub-paths based on the division of results and sub-paths according to functional modules. The optimization modeling module is used to construct a container configuration optimization problem based on the end-to-end timing model and mapping relationship, which satisfies the end-to-end latency constraints. The solution module is used to solve the container configuration optimization problem and obtain a container configuration scheme that satisfies the end-to-end delay constraint.