A method for analyzing and optimizing a computing resource configuration scheme for expected functional safety requirements
Patent Information
- Application Number
- CN202311248139.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-09-26
AI Technical Summary
[0005]本发明所要解决的技术问题是:现有自动驾驶感知系统中的预期功能安全问题内涵和机理尚不清晰,无法对计算资源共享配置方案的可行性进行分析、优化以及评价
[0215]1.本发明通过设计和应用一套全面优化的资源共享配置方案分析优化方法,使得在有限的车载算力资源下能够同时实现多种不同的感知功能。通过考虑预期功能安全需求以及处理器、通信资源等方面的约束,该方案能够在保证车载算力满足预期功能需求的前提下,实现对车载算力的高效共享调度和合理配置,从而提升整体系统的性能和效率。
Smart Images

Figure CN117389718B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of autonomous driving technology, specifically relating to a method for analyzing and optimizing computing resource allocation schemes to meet expected functional safety requirements. Background Technology
[0002] Classical vehicle functional safety design work primarily addresses potential safety hazards arising from electrical or electronic system failures, resolving the question of "how to respond correctly to failures or whether systemic errors can be avoided to achieve the desired safety objectives." However, even without any failures, behaviors that violate safety requirements may still occur. To address these safety challenges caused by non-failure factors, the International Organization for Standardization (ISO) formally introduced the new concept of Safety of the Intended Functionality (SOTIF) in its January 2019 publication, ISO / PAS 21448 "Road vehicles: Safety of the Intended Functionality." SOTIF is formally defined as "the danger arising from the inadequacy of the intended function or reasonable foreseeable human error does not present an unreasonable risk," primarily addressing safety issues arising from nominal system performance limitations under normal operating conditions. While the field of SOTIF is a relatively new research area and has received widespread attention within the industry, it still lacks effective analytical and evaluation methods.
[0003] Currently, the automotive industry has gradually developed a series of advanced driver assistance functions such as lane keeping assist, autonomous cruise control, and assisted parking, and is striving to move towards higher levels of driving automation. The use of numerous sensors and large-scale, complex embedded software components, while enriching and enhancing the vehicle's autonomous driving capabilities, also exacerbates the system's complexity and tight coupling. With the explosive increase in autonomous driving functions, the sharing and integrated design of computing resources is an unavoidable trend. However, while computing resource sharing mechanisms improve resource utilization efficiency, they may also introduce potential resource competition conflicts. Therefore, to ensure the expected functional safety level of the system, it is necessary to analyze, optimize, and evaluate the feasibility of computing resource sharing configuration schemes.
[0004] Therefore, it is essential to design an analysis and optimization method for computing resource allocation schemes that are oriented towards expected functional safety requirements. Summary of the Invention
[0005] The technical problem this invention aims to solve is that the connotation and mechanism of expected functional safety issues in existing autonomous driving perception systems are not yet clear, making it impossible to analyze, optimize, and evaluate the feasibility of computing resource sharing configuration schemes. Therefore, this invention proposes a method for analyzing and optimizing computing resource configuration schemes based on expected functional safety requirements.
[0006] To achieve the above objectives, the technical solution provided by this invention is:
[0007] A method for analyzing and optimizing computing resource allocation schemes to meet anticipated functional safety requirements, characterized by the following steps:
[0008] Step 1: Construct a functional logic model related to autonomous driving tasks;
[0009] Step 2: Construct resource entity models related to autonomous driving tasks;
[0010] Step 3: Based on the functional logic model and resource entity model, construct a configuration scheme model under the expected functional safety constraints;
[0011] Step 4: Determine the resource pool and feasible solution set for resource selection;
[0012] Step 5: Based on the resource pool and feasible solution set determined in Step 4, calculate the resource selection optimization method;
[0013] Step 6: Based on the resource pool and feasible solution set determined in Step 4, calculate the optimization method for the resource allocation scheme.
[0014] Furthermore, the process of constructing the functional logic model related to the autonomous driving task in step 1 is as follows:
[0015] Step 1.1: Use quintuples<F,M,E,FM,MF> This represents the functional logic relationships related to autonomous driving tasks:
[0016] F = {F i |1≤i≤|F|} (1-1)
[0017] M = {M j |1≤j≤|M|} (1-2)
[0018]
[0019]
[0020]
[0021] Where: |F| and |M| represent the number of elements in the corresponding set;
[0022] F represents a function set, and its elements F i Used to refer to the various functions that need to be performed;
[0023] M represents a communication set, and its element M i Used to refer to various communication needs that need to be transmitted;
[0024] E is the inter-functional communication cost matrix, and its element e p,q Indicates function F p To function F q The bandwidth required to send a message is determined by the corresponding communication requirements;
[0025] FM stands for communication transmission matrix, when function F p Send communication request M q At that time, the corresponding element fm p,q =1, otherwise fm p,q =0;
[0026] MF is the communication receive matrix, when function F q Receive communication requirement M p When, the corresponding element mf p,q =1, otherwise mf p,q =0;
[0027] Step 1.2: Configure each function F i Break it down into a series of real-time application requirements:
[0028] F i = <RR i , Γ i > (1-6)
[0029] Γ i ={τ i,r |1≤r≤|Γ i |} (1-7)
[0030] τ i,r = <C i,r D i,r F i,r > (1-8)
[0031] Among them, RR i Indicates the execution function F i The necessary memory requirements;
[0032] Γ i Indicates function F i Included application set; τ i,r Γ represents the set of applications consisting of r applications in sequence. i The i-th application in; application τ i,r From the worst execution time C i,r Application execution deadline D i,r The application reaches the period T i,r Three parameters describe it;
[0033] Step 1.3: For each communication requirement M...j Break it down into a series of messages:
[0034] M j ={m j,s |1≤s≤|M j |} (1-9)
[0035]
[0036] Where, m j,s This represents a communication set M consisting of s messages in sequence. j The j-th message in;
[0037] For each piece of information m j,s Due to communication costs Worst transmission time Transmission Deadline Message Cycle and the source application of the message and target application It is described by six parameters.
[0038] Furthermore, the process of constructing the resource entity model related to the autonomous driving task in step 2 is as follows:
[0039] Step 2.1: Divide the resource entities contained in the computing platform system into two major categories: processor resources and communication resources, and use triples.<N,Bus,A> Constructing a resource entity model:
[0040] N = {N i |1≤i≤|N|} (2-1)
[0041] Bus = {Bus j |1≤j≤|Bus|} (2-2)
[0042]
[0043] Where N represents the processor resource set, and the elements in this set are N i Refers to the processor entity contained in the platform;
[0044] Bus represents a set of communication resources, in which elements Bus are located. j Refers to the communication bus contained in the platform;
[0045] A is a resource connection matrix, and its element a p,q Indicates processor N p With communication bus q The connection relationship;
[0046] When processor N pWith communication bus q When interconnected, a p,q =1 indicates that data transmission is possible; otherwise, a p,q =0 indicates that data transmission is not possible;
[0047] Step 2.2: Represent any processor resource N using a six-tuple. i :
[0048] N i = <RAM i BW i Cal i P i idle P i memmory P i compute >
[0049] Among them, RAM i For memory constraints, BW i For input / output communication bandwidth constraints, Cal i For computing power, P i idle For static power consumption, P i memory P represents the power consumption associated with operations per unit of storage space. i compute Calculate the relevant power consumption of the operation per unit time;
[0050] Step 2.3: Represent any communication resource Bus using a quadruple. j :
[0051]
[0052] Among them, BW Bus For communication resource bandwidth, Com Bus Indicates communication capabilities, This refers to static power consumption. The power consumption associated with the transmission operation per unit time.
[0053] Furthermore, the process of constructing the configuration scheme model under the expected functional safety constraints in step 3 is as follows:
[0054] Step 3.1: Use two allocation matrices to represent the mapping relationship between the application and the message and its corresponding entity resource:
[0055]
[0056]
[0057] Where X is the function allocation matrix and Y is the communication allocation matrix, and the corresponding elements satisfy:
[0058]
[0059] Combining equations (1-4), (1-5), and (2-3), the mathematical relationships between FM, MF, and the resource connection matrix A in step 2.1 are given from the perspectives of communication transmission and communication reception, respectively:
[0060]
[0061]
[0062] Where: s, t = 1, 2, ..., |N|, q = 1, 2, ..., |Bus|;
[0063] And determine the following identities:
[0064] A = max(min(X) T ·FM·Y,1),min(X) T ·MF T ·Y,1)) (3-4)
[0065] Step 3.2: Based on the functional logic model and resource entity model, determine the expected functional safety constraints, including uniqueness requirements, time dimension requirements, capacity dimension requirements, energy consumption limit requirements, and mutual exclusion and correlation requirements;
[0066] Step 3.3: Use an auxiliary matrix to simplify the expected functional safety constraints.
[0067] Furthermore, the expected functional safety constraints determined in step 3.2 are as follows:
[0068] Uniqueness requirements: Con01, Con02, Con03;
[0069] Time dimension requirements Con04, Con05;
[0070] Capability dimension requirements Con06, Con07, Con08, Con09, Con10;
[0071] Energy consumption limits Con11 and Con12;
[0072] Mutually exclusive and correlated requirements (Con13, Con14);
[0073] in:
[0074] (1) Unique requirements for functional and communication allocation;
[0075] In a configuration scheme, all functions Fi are assigned to one and only one corresponding processor resource entity N;
[0076] When the sending and receiving functions reside on different processor resources, the communication requirement M i Sending and receiving are performed by one and only one corresponding communication resource Bus;
[0077] When the sending and receiving functions reside on the same processor resource N, the communication requirement M p This is accomplished directly through the processor's memory;
[0078] (2) The configuration scheme can meet the real-time constraints of all application execution;
[0079] In an effective configuration scheme, each application τ i,r All need to be within their corresponding deadline D i,r If the execution is completed previously, then the real-time constraint is satisfied: R i,r ≤D i,r ;
[0080] Considering both fixed-priority scheduling and partitioned scheduling, the real-time constraint satisfies: for any processor resource N... j There exists a set of feasible combinations of partition coefficients such that the application F in each partition... i All are schedulable, and the sum of the total partition coefficients does not exceed 1;
[0081] (3) The configuration scheme can meet the real-time constraints of all message transmissions;
[0082] Considering non-preemptive fixed-priority scheduling, the real-time constraint satisfies: for any communication requirement M j Message m j,s All of these factors ensure that the communication capability guarantees the information m j,s Maximum blocking time and other communication requirements M k The sum of the worst-case transmission times for (k≠j);
[0083] (4) The required processing capacity does not exceed the upper limit of the processor resources that can provide;
[0084] For any processor resource module, the resource requirements of the applications deployed on it shall not exceed its inherent memory RAM, output bandwidth BW, and input bandwidth BW capacity limits;
[0085] (5) The required communication capacity does not exceed the upper limit of the capacity that communication resources can provide;
[0086] For any given communication resource module, the sum of the communication bandwidth required for all messages transmitted by the processors connected to it through that communication resource does not exceed its inherent communication bandwidth capacity limit, including input bandwidth requirements and output bandwidth requirements.
[0087] (6) The power consumption of all processor resources does not exceed the given threshold;
[0088] All processor resources consume no more than a given threshold P. j ub ;
[0089] (7) The power consumption of all communication resources does not exceed a given threshold;
[0090] For all communication resources, the static power consumption of the communication resources And data transmission power consumption does not exceed a given threshold
[0091] (8) The pre-defined functional allocation mutual exclusion and correlation requirements are met;
[0092] The mutual exclusivity of assignment generally refers to "requiring two target functions F". i and F k Cannot be deployed on the same processor resource N j The situation of "above";
[0093] The relevance of allocation generally refers to "requiring two objective functions F". i and F k Must be deployed on the same processor resource N j The situation of "above".
[0094] Furthermore, the process of determining the resource pool and feasible solution set for resource selection in step 4 is as follows:
[0095] Step 4.1: Construct candidate repositories<AR,ABus> AR is the set of alternative processor resources, and ABus is the set of alternative communication resources. A functional logic model is constructed.<F,M,E,FM,MF> ;
[0096] Step 4.2: Determine the upper and lower limits of the number of processor resources:
[0097] For the processor resource set N = {N} in the resource entity model j |1≤j≤|N|} and the set of alternative processor resources AR={AR i Define a processing resource combination: |1≤i≤|AR|}
[0098] N j ←AR i N j+1 ←AR i, ..., N j+n ←AR i
[0099] Using the variable numAR i Indicates the resource type AR of the i-th alternative processor. i Selected processor resources N j The quantity is expressed by the formula:
[0100] NumAR=(numAR1 numAR2 … numAR |AR| ), numAR i =n+1;
[0101] Let the maximum number of acceptable processor resources be numAR ub Since the number of alternative processor resources will not exceed the target function F i Quantity, then numAR ub ≤|F|;
[0102] Let the lower limit of the amount of processor resources used for memory be numAR. lb Referring to constraint Con06, in the worst case of limited RAM, all target functions F i All of these are target functions with the highest memory requirements (RR). i The number of alternative processor resources must be greater than or equal to the target function F. i If the quantity is such that the constraint Con15 is defined as follows:
[0103] Con15:
[0104] From constraint Con15, we get:
[0105]
[0106] Step 4.3: Determine the processor resource selection issue:
[0107] Define RegionAR = {RegionAR} k |1≤k≤|RegionAR|} represents the set of all feasible solutions;
[0108] Define Cost(rule_AR) k () represents the cost of processor resources for the k-th feasible solution;
[0109] In this set, the solutions are numbered in ascending order of their cost;
[0110] Based on step 4.2, the processor resource selection problem can be expressed as the following optimization problem:
[0111]
[0112]
[0113] Con01∧Con04∧Con06∧Con07∧Con08
[0114] ∧Con11∧Con13∧Con14∧Con15
[0115] In step 3.1, formula (3-1) will convert function F... i The allocation mapping between processor resources and the functional allocation scheme X is used;
[0116] Using costAR i This represents the cost of the i-th processor resource combination;
[0117] Use NumAR=(numAR1 numAR2 ... numAR |AR| () represents the processor resource combination scheme corresponding to any traversal process;
[0118] Step 4.4: Determine the upper and lower limits of the number of communication resources:
[0119] In the resource entity model, the communication resource set Bus = {Bus} j |1≤j≤|Bus|} and the set of alternative communication resources ABus={ABus i Let |1≤i≤|ABus|}, and let the variable NumABus represent the j-th alternative communication resource ABus. i Selected communication resources Bus j The quantity satisfies:
[0120] NumABus=(numABus1 numABus2 … numABus |ABus| )
[0121] Then define a communication resource combination:
[0122] Bus i ←ABus j when
[0123] Let numABus be the upper limit of the acceptable number of communication resources. ub This is equal to the actual number of communication resources in reality;
[0124] Let the lower limit of the number of communication resources be numABus lb :
[0125]
[0126] Step 4.5: Determine the communication resource selection issue:
[0127] Define RegionABus = {RegionABus} i |1≤x≤|RegionABus|} represents the set of all feasible solutions;
[0128] Define Cost(rule_egionABus) x () represents the cost of communication resources for the x-th feasible solution;
[0129] In the set, the solutions are numbered in ascending order;
[0130] Based on step 4.4, the communication resource selection problem can be expressed as the following optimization problem:
[0131]
[0132]
[0133] YCon01~Con14
[0134] In this process, the communication requirement M is determined by equation (3-2) in step 3.1. i The allocation mapping between communication resources is referred to as the communication allocation scheme Y;
[0135] Using costABus i This represents the cost of the i-th type of communication resource;
[0136] Using NumABus = (numABus1 numABus2 … numABus) |ABus| ) represents the communication resource combination scheme corresponding to any traversal process.
[0137] Furthermore, the process of calculating the resource selection optimization method in step 5 is as follows:
[0138] Step 5.1: Initialize the CSP model for the "Processor Resource Selection Problem" by setting k = 1;
[0139] Step 5.2: Convert the feasible solution RegionAR k The NumAR scheme allocates processor resources.
[0140] Step 5.3: Based on the processor resource selection problem obtained in Step 4.3, construct the CSP model for the "processor resource selection problem":
[0141] Variable Z←XZ
[0142] The domain of the variable is D←{1, 2, ..., |N|}
[0143]
[0144] in,
[0145] XZ is an auxiliary column vector defined for the function allocation scheme X:
[0146]
[0147] Among them, XZ i Indicates function F i The processor resource number to which it is deployed;
[0148] The elements in function allocation scheme X satisfy:
[0149]
[0150] Step 5.4: Use the Forward Checking algorithm to determine whether there is a feasible solution in the processor resource combination scheme NumAR;
[0151] If a feasible solution exists, then record the processor resource combination scheme NumAR as the optimal solution. <n>Then proceed to step 5.7;
[0152] Otherwise, proceed to step 5.5;
[0153] Step 5.5: Let k = k + 1;
[0154] Step 5.6: Determine if k ≤ |RegionAR|;
[0155] If the judgment is correct, proceed to step 5.2;
[0156] Otherwise, the current problem is unsolvable, and the computational resource selection and optimization problem ends;
[0157] Step 5.7: Initialize the CSP model of "Communication Resources", let x = 1;
[0158] Step 5.8: Convert the feasible solution RegionABus x The communication resource combination scheme NumABus is allocated;
[0159] Step 5.9: Based on the communication resource selection problem obtained in Step 4.5, construct the CSP model for the "communication resource selection problem":
[0160] Variable Z1←XZ
[0161] Variable Z2←YZ
[0162] Corresponding domain D1←{1, 2, ..., |N|}
[0163] Corresponding domain D2←{-1, 1, 2, ..., |Bus|}
[0164] Constraint C ← Con01~Con15
[0165] in,
[0166]
[0167] YZ is an auxiliary column vector defined for the communication allocation matrix Y:
[0168]
[0169] Among them, YZ i Indicates communication requirement M i The connected communication resource number, i.e., the element in the communication allocation matrix Y, satisfies:
[0170]
[0171] Among them, when the communication demand M i When no communication resources are required for transmission, it indicates that the functions of sending and receiving the message are allocated to the same processor resource, and its corresponding element YZ i =-1;
[0172] Step 5.10: Use the Forward Checking algorithm to determine whether there is a feasible solution in the communication resource combination scheme NumABus;
[0173] If a feasible solution exists, and the CSP has a set of feasible solutions, it indicates that the current communication resource combination scheme meets the requirements and has obtained the optimal solution; combining the optimal solutions of the "processor resource selection" problem and the "communication resource selection" problem, then the optimal solution is determined.<NumAR,NumABus> For the optimal combination of computing resources<N,Bus> ;
[0174] Otherwise, if no feasible solution exists, it indicates that the solution should be changed. The next solution should be selected in RegionABus for evaluation, and then proceed to step 5.11.
[0175] Step 5.11: Let x = x + 1;
[0176] Step 5.12: Determine if x ≤ |RegionABus|;
[0177] If the judgment is correct, proceed to step 5.8;
[0178] Otherwise, the current problem is unsolvable, and proceed to step 5.5.
[0179] Furthermore, the process of calculating the optimization method for the resource allocation scheme in step 6 is as follows:
[0180] Step 6.1: Initialize the model and determine the computing resource allocation scheme based on the computing resource allocation scheme constructed in Step 3.<X,Y> The optimization problem is:
[0181]
[0182] stCon01~Con14
[0183] Where minUXY represents the optimization objective:
[0184]
[0185] U(F i ) represents function F i Task utilization:
[0186]
[0187] U(F) represents the expression by U(F) i The |F|×1 column vector consists of ) ; U(X,Y) represents the allocation scheme.<X,Y> A |N|×1 column vector composed of the resource utilization rates of each processor task. This represents the average task utilization rate of each processor resource.
[0188] minRXY represents the optimization objective:
[0189]
[0190] Where R(X,Y) represents a |N|×1 column vector composed of the memory utilization of each processor resource under the allocation scheme (X,Y>); The average memory utilization of each processor resource;
[0191] minTXY represents the optimization objective:
[0192] min TXY=SN T ·rdiag((1-X T (6-3)
[0193] Considering the nonlinear characteristics of the expected functional safety constraints, the above multi-objective optimization problem is transformed into an unconstrained optimization problem using the penalty function method;
[0194] Based on the constraints Con03~Con14 in step 3.3, design the penalty function and synthesize the penalty function, using PEXY as the representation:
[0195]
[0196] Where: θ i Θ represents the weight values of each penalty function index after normalization; Θ and PE represent the row vectors composed of the weight values and each penalty function index, respectively.
[0197] Step 6.2: Solve the optimization problem in Step 6.1 using a genetic algorithm. Use all computational resource allocation schemes that meet the expected functional safety requirements as the solution space, and select the processors {c1, ... c1} corresponding to the initial functions from this solution space. i ...c |F| } Communication resources allocated corresponding to communication needs {c |F|+1 , ...c |F|+j ...c |F|+|M| The combination serves as the initial chromosome individual;
[0198] like Figure 4 As shown, the chromosome contains a total of |F|+|M| positions, where the first |F| positions correspond to the allocation of a target function, and the latter |M| positions correspond to a specific connection of a processor resource.
[0199] Step 6.3: Assemble the initial chromosomes into an initial population, and specify the population size, maximum number of generations, crossover probability, and mutation / recombination probability;
[0200] The fitness function is:
[0201]
[0202] Where, ω i These are the weights normalized to the three fitness functions;
[0203] According to condition θ i >>ω i The best individuals in the population are selected, and crossover and mutation are performed to obtain the next generation of the population. This process continues until the evolutionary termination time is reached, thus achieving the desired functional safety.
[0204] Furthermore, in step 5.10, when applying the Forward Checking algorithm to solve the problem, the following search strategy is adopted:
[0205] Search Strategy 1: For all unassigned variables, if there is only one element left in its corresponding value range, assign a value to it first;
[0206] Search Strategy 2: When there is no element with a unique feasible value, select and assign values to elements in XZ first based on the minimum remaining value and maximum memory requirement heuristic. After all elements in XZ have been assigned values, select and assign values to elements in YZ based on the minimum remaining value heuristic.
[0207] Search Strategy 3: Each time there is an assignment update, first, according to the constraint condition Con03, the corresponding field of the unassigned element is pruned, and a satisfiability judgment is made: whether there is any element whose corresponding field after pruning has no feasible assignment result;
[0208] If it exists, it indicates that the plan should be changed;
[0209] Otherwise, Con01, Con02, Con04 to Con14 are used sequentially to trim the corresponding fields of the remaining unassigned elements.
[0210] The concept and principle of this invention:
[0211] Communication components and processor components are collectively referred to as computing resources. The scope of computing resources involves two types of virtual resources (applications and messages) and two types of physical resources that carry virtual resources (processor components and communication components). The allocation relationship between virtual resources and physical resources constitutes the computing resource sharing configuration scheme.
[0212] This invention first constructs a functional logic model to provide a mathematical basis for analyzing the functional execution (application) and communication requirements (messages) of virtual resources; secondly, it constructs a resource entity model to provide a mathematical basis for analyzing the processor and communication resources consumed by entity resources; and then, through the above models and the mapping relationship between virtual resources and entity resources, it constructs a configuration scheme model under expected functional safety constraints, enabling this invention to fully and formally represent the 14 types of expected functional safety requirements it needs to meet using mathematical language, so as to support the analysis and evaluation of the expected functional safety level of computing resource configuration schemes.
[0213] Based on this, optimization methods were then provided for two optimization problems encountered in the design of computing resource allocation schemes: "entity resource selection problem" (including "processor resource selection problem" and "communication resource selection problem") and "allocation and mapping of functional logic architecture and computing platform" (i.e. optimization of computing resource allocation scheme). Figure 8 The basic process of the computing resource selection optimization method is presented. The core of this method is to continuously construct CSPs within a limited search space and verify the expected functional safety requirements based on the Forward Checking algorithm. This leads to the comprehensive formation of a computing resource configuration scheme analysis and optimization method oriented towards expected functional safety requirements.
[0214] The technical advantages of this invention are as follows:
[0215] 1. This invention designs and applies a comprehensively optimized resource sharing configuration scheme and analysis method, enabling the simultaneous implementation of multiple different sensing functions with limited onboard computing power resources. By considering expected functional safety requirements and constraints such as processor and communication resources, this scheme can achieve efficient sharing, scheduling, and rational allocation of onboard computing power while ensuring that the onboard computing power meets the expected functional requirements, thereby improving the overall system performance and efficiency.
[0216] 2. The method of this invention considers various possible functional conflicts, mutual exclusion, and correlation requirements. By setting constraints and using auxiliary matrices, this invention can fully consider the relationships between different functions during the allocation of computing resources, ensuring that the allocation result not only meets basic functional requirements but also satisfies the mutual exclusion and correlation requirements between functions, thereby providing a more comprehensive functional safety guarantee.
[0217] 3. This invention introduces a genetic algorithm to iteratively optimize different resource allocation schemes, obtaining a series of Pareto optimal solutions. These solutions seek a balance among multiple objective functions, considering factors such as computational resource utilization, communication costs, and the response time of the target functions. The application of the genetic algorithm enables this invention to find a series of efficient resource allocation schemes in the search space, providing decision-makers with flexibility and diversity of choices when balancing multiple objectives.
[0218] 4. The resource sharing configuration scheme of this invention is applicable to the field of vehicle-mounted computing power sharing design, filling the technical gap in resource allocation in vehicle-mounted perception systems. Through this scheme, the vehicle-mounted system can maximize the use of limited computing resources while simultaneously meeting the needs of multiple perception functions, providing technical support and innovative directions for the development of intelligent driving, traffic management, and other fields. Attached Figure Description
[0219] Figure 1 Examples of resources related to autonomous driving tasks;
[0220] Figure 2 Example diagram of functional logic model;
[0221] Figure 3 Example diagram of resource entity model;
[0222] Figure 4 A schematic diagram of chromosome encoding schemes optimized for computing resource allocation.
[0223] Figure 5 The assignment operands follow the candidate solution RegionAR i The curve of change;
[0224] Figure 6 A diagram illustrating the optimization process for computing resource allocation schemes;
[0225] Figure 7 A visualization of the Pareto optimal solution for the resource allocation scheme;
[0226] Figure 8 A flowchart for the method of optimizing the selection of computing resources. Detailed Implementation
[0227] For a specific autonomous driving task, the resource entities involved in its implementation process can be divided into four main categories: sensor components, communication components, processor components, and actuator components. The interaction relationships between these components are as follows: Figure 1 As shown. First, communication components and processor components are collectively referred to as computing resources. The scope of computing resources involves two types of virtual resources (applications, messages) and two types of physical resources that carry virtual resources (processor components, communication components). The allocation relationship between virtual resources and physical resources constitutes the computing resource sharing configuration scheme.
[0228] Throughout the entire driving task execution process, the sensor components are first responsible for capturing and preprocessing environmental information, forming raw perception results that can be used for subsequent processing and judgment. Subsequently, the raw perception results are transmitted in the form of messages to the processors of the specific functional applications via the communication components for further computation and processing. Finally, the driving operation commands formed after multiple rounds of processing are transmitted to the actuator components that execute the commands via the communication components, realizing real-time updates of driving behavior.
[0229] To ensure that all functional requirements related to virtual resources are fully met in physical resources, the following requirements must be met respectively:
[0230] Time-related requirements: Designers must strictly ensure that the end-to-end latency of the entire task process is within an acceptable range, or in other words, they must ensure that the time limits of each task in the entire task process are not violated. Depending on the type of virtual resource, these requirements can be divided into two categories: application execution real-time requirements and message transmission real-time requirements.
[0231] Capability requirements: Designers must ensure that the basic capability requirements of each task are met throughout the entire process. Depending on the type of virtual resource, these requirements can be divided into two categories: memory requirements related to application execution and bandwidth requirements related to message transmission.
[0232] Energy consumption constraints: Designers must fully evaluate the energy consumption associated with each physical resource to avoid potential dangerous scenarios such as excessive energy consumption, excessive energy concentration, and improper heat dissipation.
[0233] Mutual exclusion and correlation requirements: Designers should ensure certain classic allocation principles. Mutual exclusion and correlation requirements are used to reflect these reasonable or unreasonable allocation relationships that have been tested.
[0234] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0235] Step 1: Construct as follows Figure 2 The functional logic model shown;
[0236] Step 1.1: Use quintuples<F,M,E,FM,MF> This represents the functional logic relationships related to autonomous driving tasks:
[0237] F = {F i |1≤i≤|F|} (1-1)
[0238] M = {M j |1≤j≤|M|} (1-2)
[0239]
[0240]
[0241]
[0242] Where: |F| and |M| represent the number of elements in the corresponding set;
[0243] F represents a function set, and its elements F i As shown in Table 1, these are used to refer to the various functions that need to be performed;
[0244] M represents a communication set, and its element M j As shown in Table 2, these are used to refer to the various communication requirements that need to be transmitted.
[0245] E is the inter-functional communication cost matrix, and its element e p,q Indicates function F p To function F q The bandwidth required to send a message is determined by the corresponding communication requirements. In particular, the main diagonal elements of E are always 0.
[0246] FM stands for communication transmission matrix, when function F p Send communication request M q At that time, the corresponding element fm p,q =1, otherwise fm p,q =0;
[0247] MF is the communication receive matrix, when function F q Receive communication requirement M p When, the corresponding element mf p,q =1, otherwise mf p,q =0;
[0248] In this embodiment:
[0249]
[0250]
[0251] Table 1 Parameters related to the expected functions / applications to be executed
[0252]
[0253]
[0254] Table 2 Parameters related to the communication / messages to be transmitted
[0255]
[0256]
[0257] Step 1.2: As Figure 2 The application parameter diagram shows each function F. i Break it down into a series of real-time application requirements:
[0258] F i = <RR i ,Γ i > (1-6)
[0259] Γ i ={τ i,r |1≤r≤|Γ i |} (1-7)
[0260] τ i,r = <C i,r ,D i,r ,T i,r > (1-8)
[0261] Among them, RR i Indicates the execution function F i The necessary memory requirements;
[0262] Γ i Indicates function F i Includes a set of applications;
[0263] τ i,r Γ represents the set of applications consisting of r applications in sequence. i The i-th application in the process, i.e., application τ i,r The smaller the number r, the more likely it is to be found in the application set Γ i The higher the priority in the list;
[0264] Application τ i,r From the worst execution time C i,r Application execution deadline D i,r The application reaches the period T i,r Three parameters describe it;
[0265] Step 1.3: As Figure 2 The message parameter diagram shows each communication request M. j It can be broken down into a series of messages:
[0266] M j ={m j,s |1≤s≤|M j |} (1-9)
[0267]
[0268] Where, m j,s This represents a communication set M consisting of s messages in sequence. j The j-th message in the sequence, i.e., message m j,s The smaller the number s, the better the communication requirement M. j The higher the priority in the list;
[0269] For each piece of information m j,s Due to communication costs Worst transmission time Transmission Deadline Message Cycle and the source application of the message and target application It is described by six parameters;
[0270] Step 2: Construct as follows Figure 3 The resource entity model shown;
[0271] Step 2.1: Divide the resource entities contained in the computing platform system into two major categories: processor resources and communication resources, and use triples.<N,Bus,A> Constructing a resource entity model:
[0272] N = {N i |1≤i≤|N|} (2-1)
[0273] Bus = {Bus j |1≤j≤|Bus|} (2-2)
[0274]
[0275] Where N represents the processor resource set, and the elements in this set are N i Refers to the processor entity contained in the platform;
[0276] Bus represents a set of communication resources, in which elements Bus are located. j Refers to the communication bus contained in the platform;
[0277] A is a resource connection matrix, and its element a p,q Indicates processor N p With communication bus q The connection relationship;
[0278] When processor N p With communication bus q When interconnected, a p,q =1 indicates that data transmission is possible; otherwise, a p,q =0;
[0279] Step 2.2: As Figure 3 The six-tuple is used to represent any processor resource N. i :
[0280] N i = <RAM i BW i Cal i ,P i idle ,P i memory ,P i compute >
[0281] Among them, RAM i For memory constraints, BW i Due to input / output communication bandwidth (I / O bandwidth) constraints, Cal i For computing power, P i idle For static power consumption, P i memory P represents the power consumption associated with operations per unit of storage space. i compute Calculate the relevant power consumption of the operation per unit time;
[0282] In this embodiment, without loss of generality, the processor resource power consumption threshold is uniformly set to 150W; seven types of processor resources are involved, and the processor resource parameters are shown in Table 3:
[0283] Table 3. Alternative Processor Resource Parameters
[0284]
[0285]
[0286] Step 2.3: Similar to Step 2.2, use a quadruple to represent any communication resource Bus. j :
[0287]
[0288] Among them, BW Bus For communication resource bandwidth, Com Bus Indicates communication capabilities;
[0289] Unlike step 2.2, when considering the energy consumption of communication resources, the power consumption related to access operations can be ignored, and instead, static power consumption is used. Power consumption related to transmission operations per unit time Two parameters characterize the relevant power consumption;
[0290] In this embodiment, without loss of generality, the power consumption of communication resources is uniformly set to 70W; three types of communication resources are involved, and the parameters of the communication resources are shown in Table 4:
[0291] Table 4. Alternative Communication Resource Parameters
[0292]
[0293] Furthermore, it should be noted that, considering the direct impact of the computing power of different processor resources on the worst-case execution time estimation of applications, for simplicity, this invention uses relative capability values. Specifically, a reference processor is selected in the computing platform system, and its processing power is set to 1. The processing power parameters of the remaining processors are ratios to the processing power of the reference processor. Similarly, this invention also uses relative communication capabilities to describe the performance of the communication bus.
[0294] Step 3: Construct an allocation scheme model under the expected functional safety constraints;
[0295] Step 3.1: Use two allocation matrices to represent the mapping relationship between the application and the message and its corresponding entity resource:
[0296]
[0297]
[0298] Where X is the function allocation matrix and Y is the communication allocation matrix, and the corresponding elements satisfy:
[0299]
[0300] Combining equations (1-4), (1-5), and (2-3), the mathematical relationships between FM, MF, and the resource connection matrix A in step 2.1 are given from the perspectives of communication transmission and communication reception, respectively:
[0301]
[0302]
[0303] Where: s,t=1,2,…,|N|,q=1,2,…,|Bus|;
[0304] And determine the following identities:
[0305] A = max(min(X) T ·FM·Y,1),min(X T ·MF T ·Y,1)) (3-4)
[0306] Step 3.2: Based on steps 1 to 3.1, determine 14 categories of expected functional safety constraints:
[0307] (1) Unique requirements for functional and communication allocation;
[0308] In a configuration scheme, all functions F i Each of these resources is allocated to one and only one corresponding processor resource entity N, which satisfies the following:
[0309]
[0310] When the sending and receiving functions reside on different processor resources, the communication requirement M i Sending and receiving are performed by one and only one corresponding communication resource Bus, which satisfies:
[0311]
[0312] When the sending and receiving functions reside on the same processor resource N, the communication requirement M p This can be accomplished by directly reading from the processor's memory, thus satisfying the following:
[0313]
[0314] (2) The configuration scheme can meet the real-time constraints of all application execution;
[0315] Let the worst-case response time R be... i,r Indicates completion of application τ i,r The time limit, the period reached by the application is T. i,r Considering processor resources N j The computing power characteristics, when the application τ i,r Deployed on processor resources N j When the above is true, its corresponding equivalent worst-case execution time R i,r =C i,r / Cal j ;
[0316] In an effective configuration scheme, each application τ i,r All need to be within their corresponding deadline D i,r If the execution is completed previously, then the real-time constraint is satisfied: R i,r ≤D i,r ;
[0317] The following considers the real-time constraints under two different scheduling modes:
[0318] Considering the fixed-priority scheduling mode, we define:
[0319]
[0320] Among them, hp(τ) i,r ) indicates that the priority is higher than τ on the same processor. i,r A collection of applications, τ k For the k-th application in this set;
[0321] Considering the partitioned execution scheduling mode, the following definition is made:
[0322]
[0323] Where, α i It is the partitioning coefficient, which is the application τ. i,r Corresponding function F i The proportion of the total period in the partition;
[0324] Wherein, the partition coefficient α i Must meet:
[0325]
[0326] In summary, in the configuration scheme, function F i The real-time constraints for all applications within the partition are:
[0327] For any processor resource N j There exists a set of feasible combinations of partition coefficients such that the application F in each partition... i All partitions are schedulable, and the sum of their total partition coefficients does not exceed 1. According to equation (3-3), the following conditions must be met:
[0328]
[0329] in, Indicates the partition coefficient α i The lower limit value is only related to function F. i Related, from equation (3-10) and R i,r ≤D i,r have to:
[0330] (3) The configuration scheme can meet the real-time constraints of all message transmissions.
[0331] Consider the classic non-preemptive fixed-priority scheduling, when the communication demand M... j Allocated in communication resources Bus q When it is online, the communication requirement is M j News from China j,s The worst-case transmission time on the transmission bus is The calculation formula is:
[0332]
[0333] Among them, hp(m j,s ) indicates that the priority is higher than m on the same data bus. j,s A collection of messages, whose message period is... Its worst transmission time is Communication Resources Bus q Its communication capability is Com Bus ;
[0334] M represents the maximum blocking time, due to different communication requirements. j There is actually no direct priority relationship between them, so in order to account for the worst-case communication blocking time, the remaining communication requests M are prioritized. k (k≠j) has a higher priority than M. j , The maximum blocking time caused by the lowest priority message with the longest transmission time can be expressed by the formula:
[0335] In the configuration scheme, real-time constraints for:
[0336]
[0337] For any communication requirement M k (k = 1, 2, ..., |M|), all satisfy the following two related variables, whose values are only related to each communication requirement M. k Related to oneself:
[0338]
[0339]
[0340] in, For a message m only j,s The relevant values are calculated using the following formula:
[0341]
[0342] Based on this, the requirement that "the configuration scheme can meet the real-time constraints of all message transmissions" is simplified to:
[0343]
[0344] in: for Maximum value:
[0345] for Minimum value:
[0346] (4) The required processing power does not exceed the upper limit of the processor resources.
[0347] For any processor resource module, the resource requirements of the applications deployed on it do not exceed its inherent memory, output bandwidth, and input bandwidth capabilities, i.e., they must satisfy:
[0348]
[0349]
[0350]
[0351] (5) The required communication capacity does not exceed the upper limit of the communication resources that can provide.
[0352] For any given communication resource module, the sum of the communication bandwidth required for all messages transmitted by the processors connected to it through that communication resource does not exceed its inherent communication bandwidth capacity limit, including both input and output bandwidth requirements, i.e., it satisfies:
[0353]
[0354]
[0355] Where s = 1, 2, ..., |N|, q = 1, 2, ..., |Bus|;
[0356] (6) The power consumption of all processor resources does not exceed the given threshold.
[0357] All processor resources consume no more than a given threshold, i.e., satisfying:
[0358]
[0359] Where j = 1, 2, ..., |N|;
[0360] (7) The power consumption of all communication resources does not exceed a given threshold.
[0361] For all communication resources, the static power consumption and data transmission power consumption of the communication resources do not exceed a given threshold, that is, they satisfy:
[0362]
[0363] Where q = 1, 2, ..., |Bus|;
[0364] (8) The pre-defined functional allocation mutual exclusion and correlation requirements are met.
[0365] The mutual exclusivity of assignment generally refers to "requiring two target functions F". i and F k Cannot be deployed on the same processor resource N j The condition of "above" satisfies:
[0366]
[0367] The relevance of allocation generally refers to "requiring two objective functions F". i and F k Must be deployed on the same processor resource N j The condition of "above" satisfies:
[0368]
[0369] Step 3.3: Simplify the 14 types of expected functional safety constraints using an auxiliary matrix:
[0370] Constraints (3-5), (3-6), and (3-7) correspond to uniqueness requirements Con01, Con02, and Con03, respectively.
[0371] Constraints (3-11) and (3-17) correspond to time dimension requirements Con04 and Con05;
[0372] The constraints (3-18), (3-19), (3-20), (3-21), and (3-22) correspond to the capability dimension requirements Con06, Con07, Con08, Con09, and Con10.
[0373] Constraints (3-23) and (3-24) correspond to energy consumption limit requirements Con11 and Con12;
[0374] Constraints (3-25) and (3-26) correspond to mutually exclusive and related requirements Con13 and Con14;
[0375] Simplifying the summation symbols in the constraints sequentially to: SN, SF, SM, SBus, SAlpha, SCal, SBeta, SCOMB, SCM, SDLb, SCTM, SRR, SRAM, SBW, BWNB, SPI, SPC, SCT, SPUb, SPIB, SPTB, SPUbB, ME, MC, the 14 categories of expected functional safety constraints are:
[0376] Con01: X·SN=SF
[0377] Con02: Y·SBus≤SM
[0378] Con03: rdiag(MF·X·X T •FM)=1-Y·SBus
[0379] Con04: diag(SCal)·X T ·SAlpha≤SN
[0380] Con05:diag(SBeta)·Y·SCOMB+diag((SDLb) -1 )·Y·diag(SCOMB)·Y T ·SCM+Y·diag(SCOMB)·Y T ·SCTM≤SM
[0381] Con06 X T ·SRR≤SRAM
[0382] Con07: rdiag((1-X T )•E•X)≤SBW
[0383] Con08: rdiag((1-X T )•E T •X)≤SBW
[0384] Con09: X T ·MF T ·diag(rdiag(MF•E T ·FM))·Y≤BWNB
[0385] Con10: X T ·FM·diag(rdiag(MF·E T ·FM))·Y≤BWNB
[0386] Con11: SPI+diag(SPM)·X T ·SRR+diag(SPC)·X T ·SCT≤SPUb
[0387] Con12: SPIB+diag(SPTB)·Y T ·SCTM≤SPUbB
[0388] Con13 max(X·X T ,ME)=ME
[0389] With14 min(X·X T ,MC)=MC
[0390] The elements in each summation symbol are shown in Table 5:
[0391] Table 5 Definitions of Auxiliary Matrices Related to Expected Functional Safety Constraints of Computational Resources
[0392]
[0393]
[0394] Step 4: Determine the resource pool and feasible solution set for resource selection;
[0395] Step 4.1: Construct candidate repositories<AR,ABus> AR is the set of alternative processor resources, and ABus is the set of alternative communication resources. A functional logic model is constructed.<F,M,E,FM,MF> ;
[0396] Step 4.2: Determine the upper and lower limits of the number of processor resources:
[0397] For the processor resource set N = {N} in the resource entity model j |1≤j≤|N|} and the set of alternative processor resources AR={AR i Define a processing resource combination: |1≤i≤|AR|}
[0398] N j ←AR i N j+1 ←AR i , ..., N j+n ←AR i
[0399] Using the variable numAR i Indicates the resource type AR of the i-th alternative processor. i Selected processor resources N j The quantity is expressed by the formula:
[0400] NumAR=(numAR1 numAR2…numAR |AR| ), numAR i =n+1;
[0401] Let the maximum number of acceptable processor resources be numAR ub Since the number of alternative processor resources will not exceed the target function F i Quantity, then numAR ub ≤|F|;
[0402] Let the lower limit of the amount of processor resources used for memory be numAR. lb Referring to constraint Con06, in the worst case of limited RAM, all target functions F i All of these are target functions with the highest memory requirements (RR). i The number of alternative processor resources must be greater than or equal to the target function F. i If the quantity is such that the constraint Con15 is defined as follows:
[0403] Con15:
[0404] In this embodiment, the following parameters are calculated based on the application-related parameters in Table 1:
[0405]
[0406] In this embodiment, the number of candidate processor resources is 4, i.e., numAN ub =4.
[0407] Step 4.3: Determine the processor resource selection issue:
[0408] Define RegionAR = {RegionAR} k |1≤k≤|RegionAR|} represents the set of all feasible solutions;
[0409] In this embodiment, based on the upper and lower limits of processor resources and the number of candidate processor resources in Table 3, a total of 7 are constructed. 2 +7 3 +7 4 = 2793 combinations of potential solutions; among which, numAN lb Round up to 2;
[0410] After preliminary screening based on constraint Con15, the final set RegionAR, consisting of 2587 potential solutions, was determined.
[0411] Define Cost(RegionAR) k () represents the cost of processor resources for the k-th feasible solution;
[0412] In the set, the solutions are numbered in ascending order of their cost; that is, when k ≤ l, Cost(RegionAR) is the highest cost. k )≤Cost(RegionAR l );
[0413] Based on step 4.2, the processor resource selection problem can be expressed as the following optimization problem:
[0414]
[0415]
[0416] Con01∧Con04∧Con06∧Con07∧Con08
[0417] ∧Con11∧Con13∧Con14∧Con15
[0418] In step 3.1, formula (3-1) will convert function F... i The allocation mapping between processor resources and the functional allocation scheme X is used;
[0419] Using costAR i This represents the cost of the i-th processor resource combination;
[0420] Use NumAR=(numAR1 numAR2 ... numAR |AR| () represents the processor resource combination scheme corresponding to any traversal process;
[0421] Step 4.4: Determine the upper and lower limits of the number of communication resources:
[0422] In the resource entity model, the communication resource set Bus = {Bus} j |1≤j≤|Bus|} and the set of alternative communication resources ABus={ABus i Let |1≤i≤|ABus|}, and let the variable NumABus represent the j-th alternative communication resource ABus. i Selected communication resources Bus j The quantity satisfies:
[0423] NumABus=(numABus1 numABus2 … numABus |ABus| )
[0424] Then define a communication resource combination:
[0425] Bus i ←ABus j when
[0426] Let numABus be the upper limit of the acceptable number of communication resources. ub This refers to the specific number of communication resources in the actual situation.
[0427] In this embodiment, the maximum number of communication resources is set to 4, i.e., numABus ub =4.
[0428] Let the lower limit of the number of communication resources be numABus lb :
[0429]
[0430] In this embodiment, numABus is obtained based on the message-related parameters in Table 2. lb =1.
[0431] Step 4.5: Determine the communication resource selection issue:
[0432] Define RegionABus = {RegionABus} i |1≤x≤|RegionABus|} represents the set of all feasible solutions;
[0433] In this embodiment, based on the upper and lower limits of the number of communication resources and the number of candidate communication resources in Table 4, a total of 3 is constructed. 1 +3 2 +3 3 +3 4 =The set RegionABus consisting of 120 potential solutions,
[0434] Define Cost(RegionABus) x () represents the cost of communication resources for the x-th feasible solution;
[0435] In the set, the solutions are numbered in ascending order; that is, when x ≤ y, Cost(RegionABus) = 0. x )≤Cost(RegionABus y );
[0436] The solutions are numbered in ascending order of cost.
[0437] Based on step 4.4, the communication resource selection problem can be expressed as the following optimization problem:
[0438]
[0439]
[0440] In this process, the communication requirement M is determined by equation (3-2) in step 3.1. i The allocation mapping between communication resources is referred to as the communication allocation scheme Y;
[0441] Using costABus i This represents the cost of the i-th type of communication resource;
[0442] Using NumABus = (numABus1 numABus2 … numABus) |ABus| () represents the communication resource combination scheme corresponding to any traversal process;
[0443] Step 5: As Figure 8 As shown, the computational resource selection optimization method includes the following sub-steps:
[0444] Step 5.1: Initialize the CSP model for the "Processor Resource Selection Problem" by setting k = 1;
[0445] Step 5.2: Convert the feasible solution RegionAR k The NumAR scheme allocates processor resources.
[0446] Step 5.3: Based on the processor resource selection problem obtained in Step 4.3, construct the CSP model for the "processor resource selection problem":
[0447] Variable Z←XZ
[0448] The domain of the variable is D←{1,2,…,|N|}
[0449]
[0450] in,
[0451] XZ is an auxiliary column vector defined for the function allocation scheme X:
[0452]
[0453] Among them, XZ i Indicates function F i The processor resource number to which it is deployed;
[0454] The elements in function allocation scheme X satisfy:
[0455]
[0456] Step 5.4: Use the Forward Checking algorithm to determine whether there is a feasible solution in the processor resource combination scheme NumAR;
[0457] If a feasible solution exists, then record the processor resource combination scheme NumAR as the optimal solution. <n>Then proceed to step 5.7;
[0458] Otherwise, proceed to step 5.5;
[0459] Step 5.5: Let k = k + 1;
[0460] Step 5.6: Determine if k ≤ |RegionAR|;
[0461] If the judgment is correct, proceed to step 5.2;
[0462] Otherwise, the current problem is unsolvable, and the computational resource selection and optimization problem ends;
[0463] Step 5.7: Initialize the CSP model of "Communication Resources", let x = 1;
[0464] Step 5.8: Convert the feasible solution RegionABus x The communication resource combination scheme NumABus is allocated;
[0465] Step 5.9: Based on the communication resource selection problem obtained in Step 4.5, construct the CSP model for the "communication resource selection problem":
[0466] Variable Z1 ← XZ
[0467] Variable Z2← YZ
[0468] Corresponding domain D1←{1,2,…,|N|}
[0469] Corresponding domain D2←{-1,1,2,…,|Bus|}
[0470] Constraint C ← Con01~Con15
[0471] in,
[0472]
[0473] YZ is an auxiliary column vector defined for the communication allocation matrix Y:
[0474]
[0475] Among them, YZ i Indicates communication requirement M i The connected communication resource number, i.e., the element in the communication allocation matrix Y, satisfies:
[0476]
[0477] Among them, when the communication demand M i When no communication resources are required for transmission, it indicates that the functions of sending and receiving the message are allocated to the same processor resource, and its corresponding element YZ i =-1;
[0478] Step 5.10: Use the Forward Checking algorithm to determine whether there is a feasible solution in the communication resource combination scheme NumABus;
[0479] If a feasible solution exists, and the CSP has a set of feasible solutions, it indicates that the current communication resource combination scheme meets the requirements and has obtained the optimal solution; combining the optimal solutions of the "processor resource selection" problem and the "communication resource selection" problem,
[0480] Then determine<NumAR,NumABus> For the optimal combination of computing resources<N,Bus> ;
[0481] Otherwise, if no feasible solution exists, it indicates that the solution should be changed. The next solution should be selected in RegionABus for evaluation, and then proceed to step 5.11.
[0482] Step 5.11: Let x = x + 1;
[0483] Step 5.12: Determine if x ≤ |RegionABus|;
[0484] If the judgment is correct, proceed to step 5.8;
[0485] Otherwise, the current problem is unsolvable, and proceed to step 5.5.
[0486] In this embodiment, for the processor resource scheme, the assignment order and feasible solutions obtained by using the Forward Checking algorithm with the heuristic of "minimum remaining value" and "maximum memory requirement" are as follows:
[0487] F4:1F5:2F6:2F1:1F2:2F7:3F9:4F8:3F10:4F3:1
[0488] XZ=(1211223344) T
[0489] Figure 5 Statistics were compiled for each candidate solution RegionAR i The Forward Checking algorithm was applied to determine the actual number of assignment operands and the expected upper limit of the number of assignment operands when solving the corresponding CSP, and the assignment operand count as a function of candidate solution RegionAR was plotted. i The graph shows the change curve. As can be seen from the graph, the actual number of assignment operations is significantly reduced after applying the Forward Checking algorithm compared to the expected upper limit, indicating that the heuristics of "minimum remaining value" and "maximum memory requirement" effectively reduce unnecessary assignment operations. For example, for RegionAR... 200 For (0020020), the total number of hardware resources used at this time is 4. If a full-domain search traversal is performed, the overall expected upper limit of assignment operations is 4. 7 =16384, however, after only 40 assignment attempts using the Forward Checking algorithm, it was determined that the current combination of processor resources could not meet all the expected functional safety requirements.
[0490] For the communication resource combination scheme, the corresponding constraint satisfaction problem is solved based on the Forward Checking algorithm. Finally, the 9th communication resource combination scheme NumABus=(020) is determined to be the optimal scheme that can satisfy the expected functional safety constraints (Con01~Con14), that is, 2 ABus2 are selected.
[0491] For this communication resource scheme, the order of assignment and the feasible solutions are as follows:
[0492] F4:1F5:2F6:2M12:-1M15:-1F7:3M13:1M18:2F9:4M14:1
[0493] M23:1F2:1F1:2F8:3F10:4F3:1M1:1M2:-1M3:1
[0494] M4:2M5:1M6:2M7:1M8:-1M9:1M10:-1M11:-1M16:2
[0495] M17:2M19:-1M20:1M21:1M22:-1M24:-1M25:1M26:1M27:-1
[0496] The auxiliary column vector is:
[0497] XZ=(2 1 1 1 2 2 3 3 4 4) T
[0498] YZ=(1 -1 1 2 1 2 1 -1 1 -1 -1 -1 1 1 -1 2 2 2 -1 1 1 -1 1 -1 1 1 -1) T
[0499] (5-1)
[0500] Therefore, the optimal result for selecting computing resources to meet the expected functional safety requirements can be determined as follows:
[0501] NumAR=(0 0 1 1 2 0 0)NumABus=(0 2 0)
[0502] (5-2)
[0503] Step 6: Calculate the optimization method for the resource allocation scheme, including the following sub-steps:
[0504] First, preliminary estimates were made for the magnitudes of the objective function and penalty function defined in equations (6-1)-(6-3). The magnitudes of UX, RX, and TX are approximately 0.01, 0.01, and 100, respectively, while the penalty function is generally not less than 10. Therefore, based on experience, the weighting coefficients related to the objective function in equations (6-5) and (6-4) are specified as follows:
[0505] ω1=100 ω2=100 ω3=0.001 θ i =1000 (i=1,2,…,12)
[0506] Based on this, and according to general experience in using genetic algorithms, the NSGA-II algorithm parameters are set as follows: population size 80, maximum number of generations 500, crossover / recombination probability 0.7, and mutation / recombination probability 0.2. Furthermore, since the optimal computing resource selection scheme determined by equation (5-1) uses two processors of the same type and two communication resources of the same type, four feasible allocation schemes that meet the expected functional safety requirements can be directly constructed according to equation (5-2), and all of them are included in the initial population to avoid the undesirable situation where the initial population is distributed in the coding space far from the global optimum.
[0507] Figure 6 The optimization process using the NSGA-II algorithm is shown from two different perspectives to illustrate the convergence of the solution.
[0508] exist Figure 6 (a) plots the mean values of the three fitness functions for the 80 individuals retained after each generation of genetic inheritance. It can be observed that each fitness curve initially shows a sharp decline (before the first 30 iterations), eventually stabilizing as the number of iterations increases. Since the initial population is mostly randomly generated, there are many infeasible solutions that do not meet the constraints in the early stages of iteration, and the presence of the penalty function at this time makes the corresponding fitness significantly higher. As the genetic iteration progresses, infeasible solutions are quickly eliminated, resulting in a sharp decline in the mean fitness function. Furthermore, the stable state of each curve after approximately 150 iterations indicates that the solutions retained in subsequent processes do not fluctuate significantly, which can be seen as a sign that the optimization results have gradually converged.
[0509] at the same time, Figure 6 (b) The total number and type of all Pareto optimal individuals at each generation were statistically analyzed. It was observed that after approximately 29 generations, the curve for the total number of Pareto optimal individuals remained at 80, corresponding to the pre-set population size. However, the curve for the number of Pareto optimal individual types only began to converge after approximately 150 generations, eventually stabilizing at 10. The difference in the timing of these convergence points is because, during the solution process, when faced with multiple mutually Pareto optimal solutions, it is always desirable to maintain solution diversity. Therefore, even after finding the optimal Pareto solution, the number of Pareto optimal individual types continues to gradually increase. (Summary) Figure 6 The two types of statistical results presented in the data indicate that the solution has converged.
[0510] For the Pareto optimal solution generated after 500 iterations, 70 duplicate individuals were further removed in the final generation, and the remaining 10 different solutions are presented in Table 6:
[0511] Table 6 shows the Pareto optimal solution and corresponding fitness function value for the resource allocation scheme optimization.
[0512]
[0513]
[0514] Clearly, the penalty functions corresponding to the fitness values of all Pareto optimal solutions will become 0 after 500 iterations. Therefore, the original objective functions UXY, RXY, and TXY can be directly obtained from the fitness values, such as... Figure 7 As shown, these computational resource allocation schemes are Pareto optimal for each other, therefore further analysis is often required in practical engineering applications. In this embodiment, a set of points are clustered near the origin of the UXY-RXY view image. If we emphasize the average utilization of resources, then we recommend using these alternative schemes in this cluster.
[0515] In addition, the total communication cost can be considered as an auxiliary factor. Therefore, in this embodiment, the scheme with the lowest corresponding communication cost in the above cluster is determined to be the most suitable allocation scheme.
[0516] In summary, based on the above analysis results, the optimal computing resource configuration scheme for this embodiment can be determined as follows:
[0517] NumAR=(00 1 1 2 0 0)NumABus=(0 2 0)
[0518] XZ=(4 3 4 3 2 1 2 2 1 1) T
[0519] YZ=(-1 2 1 1 2 1 1 -1 1 2 1 1 -1 2 2 1 -1 2 -1 -1 2 -1 1 1 -1) T
[0520]
[0521] Among them, the resource connection matrix A is determined according to equation (3-4).
[0522] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the scope of the technology disclosed in the present invention, and such modifications or substitutions should all be covered within the scope of protection of the present invention.< / n> < / n>
Claims
1. A method for analyzing and optimizing computing resource allocation schemes to meet anticipated functional safety requirements, characterized in that, Includes the following steps: Step 1: Construct a functional logic model related to autonomous driving tasks; Step 2: Construct resource entity models related to autonomous driving tasks; Step 3: Based on the functional logic model and resource entity model, construct a configuration scheme model under the expected functional safety constraints. The specific process is as follows: Step 3.1: Use two allocation matrices to represent the mapping relationship between the application and the message and its corresponding entity resource: (3-1) (3-2) in, Assign a function matrix. Assign a matrix to the communication, where the corresponding elements satisfy: (3-3) Indicates the number of elements in the corresponding set; Represents a set of functions, elements Used to refer to the various functions that need to be performed; Represents a processor resource set, element Refers to the processor entity contained in the platform; Represents a set of communication resources, elements Refers to the communication bus contained in the platform; Represents a communication set, whose elements Used to refer to various communication needs that need to be transmitted; Give the mathematical relationship between FM, MF and resource connectivity matrix A: in: , ; For communication transmission matrix, when function Send communication request When, the corresponding element ,otherwise ; For communication receiving matrix, when the function Receive communication requirements When, the corresponding element ,otherwise Elements in resource connection matrix A Indicates processor With communication bus The connection relationship; And determine the following identities: (3-4) Step 3.2: Based on the functional logic model and resource entity model, determine the expected functional safety constraints, including uniqueness requirements, time dimension requirements, capacity dimension requirements, energy consumption limit requirements, and mutual exclusion and correlation requirements; Step 3.3: Simplify the expected functional safety constraints using an auxiliary matrix; Step 4: Determine the resource pool and feasible solution set for resource selection; Step 5: Based on the resource pool and feasible solution set determined in Step 4, calculate the resource selection optimization method. The specific process is as follows: Step 5.1: Initialize the CSP model for the "Processor Resource Selection Problem" by setting k=1; Step 5.2: Convert feasible solutions Processor resource allocation scheme ; Step 5.3: Construct the CSP model for the "Processor Resource Selection Problem": in, , The configuration scheme must meet the real-time constraints of all application execution. The required processing power does not exceed the upper limit of the processor resources that can provide, including memory, output bandwidth, and output bandwidth. To ensure that processor resource power consumption does not exceed a given threshold constraint; Assign mutual exclusion constraints to functions; Assign relevance constraints to functions; Constraints on the number of alternative processor resources; This is a function allocation matrix. Defined auxiliary column vector: in, Indication Function The processor resource number to which it is deployed; Functional allocation matrix The elements in the set satisfy: Step 5.4: Use the Forward Checking algorithm to determine the processor resource combination scheme. Does a feasible solution exist in the given conditions? If a feasible solution exists, record the processor resource combination scheme. The optimal solution Then proceed to step 5.7; Otherwise, proceed to step 5.5; Step 5.5: Let k = k + 1; Step 5.6: Determine ;in Let be the set of all feasible solutions; If the judgment is correct, proceed to step 5.2; Otherwise, the current problem is unsolvable, and the computational resource selection and optimization problem ends; Step 5.7: Initialize the CSP model of "Communication Resources", let x=1; Step 5.8: Convert feasible solutions Allocation of communication resource combination scheme ; Step 5.9: Construct the CSP model for the "Communication Resource Selection Problem": in, Uniqueness requirements for assigning functions and communications; The configuration scheme must meet the real-time constraints of all message transmissions; The required communication capacity does not exceed the upper limit of the capacity that communication resources can provide, including input bandwidth requirements and output bandwidth requirements; The power consumption of all communication resources must not exceed a given threshold constraint; It is a matrix for communication allocation. Defined auxiliary column vector: in, Indicates communication needs The connected communication resource number, i.e., for the communication allocation matrix The elements in the set satisfy: Among them, when communication needs When transmission does not require any communication resources, it indicates that the functions of sending and receiving the message are allocated to the same processor resource, and its corresponding element ; Step 5.10: Use the Forward Checking algorithm to determine the communication resource combination scheme. Does a feasible solution exist in the given conditions? If a feasible solution exists, and the CSP has a set of feasible solutions, it indicates that the current communication resource combination scheme meets the requirements and has obtained the optimal solution; combining the optimal solutions of the "processor resource selection" problem and the "communication resource selection" problem, then the optimal solution is determined. For the optimal combination of computing resources ; Otherwise, if no feasible solution exists, it indicates that the solution should be changed. If the next option is selected for evaluation, proceed to step 5.11; Step 5.11: Let x = x + 1; Step 5.12: Determine ; If the judgment is correct, proceed to step 5.8; Otherwise, the current problem is unsolvable, and we proceed to step 5.5; Step 6: Based on the resource pool and feasible solution set determined in Step 4, calculate the optimization method for the resource allocation scheme. The specific process is as follows: Step 6.1: Initialize the model and determine the computing resource allocation scheme. The optimization problem is: in, Indicate the optimization objective: Indication Function Task utilization: Indicates by Composition Column vectors of order; Representing the allocation scheme Composition of processor resource task utilization Column vectors of order; This represents the average task utilization rate of each processor resource. Indicate the optimization objective: in, Representing the allocation scheme Composition of processor resource memory utilization Column vectors of order; This represents the average memory utilization of each processor resource. Indicate the optimization objective: Considering the nonlinear characteristics of the expected functional safety constraints, the above multi-objective optimization problem is transformed into an unconstrained optimization problem using the penalty function method; According to constraints Design the penalty function and synthesize the penalty functions, using express: in: These are the weight values for the normalized penalty function indices; and These represent row vectors composed of weight values and each penalty function index; Step 6.2: Solve the optimization problem in Step 6.1 using a genetic algorithm. Use all computational resource allocation schemes that meet the expected functional safety requirements as the solution space, and select the processors initially allocated to the corresponding functions from this space. Communication resources allocated in accordance with communication needs The combination serves as the initial chromosome individual; The total number of chromosomes includes Position, of which the first Each bit corresponds to the allocation of a target function, and then Each corresponds to a specific connection to a processor resource; Step 6.3: Assemble the initial chromosomes into an initial population, and specify the population size, maximum number of generations, crossover probability, and mutation / recombination probability; The fitness function is: in, These are the weights normalized for the three fitness functions; According to the conditions The best individuals in the population are selected, and crossover and mutation are performed to obtain the next generation of the population. This process continues until the evolutionary termination time is reached, thus achieving the desired functional safety.
2. The method for analyzing and optimizing computing resource allocation schemes based on expected functional safety requirements according to claim 1, characterized in that, The process of constructing the functional logic model related to the autonomous driving task in step 1 is as follows: Step 1.1: Use quintuples This represents the functional logic relationships related to autonomous driving tasks: (1-1) (1-2) (1-3) (1-4) (1-5) in: Indicates the number of elements in the corresponding set; Represents a function set, whose elements Used to refer to the various functions that need to be performed; Represents a communication set, whose elements Used to refer to various communication needs that need to be transmitted; The inter-functional communication cost matrix has the following elements. Indication Function To function The bandwidth required to send a message is determined by the corresponding communication requirements; For communication transmission matrix, when function Send communication request When, the corresponding element ,otherwise ; For communication receiving matrix, when the function Receive communication requirements When, the corresponding element ,otherwise ; Step 1.2: Configure each function Break it down into a series of real-time application requirements: (1-6) (1-7) (1-8) in, Indicates the execution function The necessary memory requirements; Indication Function Includes a set of applications; This represents a set of r applications arranged sequentially. The i-th application in the application; From worst execution time Application execution deadline Application arrival cycle Three parameters describe it; Step 1.3: List each communication requirement Break it down into a series of messages: (1-9) (1-10) in, This represents a communication set consisting of s messages in sequence. The j-th message in; For each piece of information Due to communication costs Worst transmission time Transmission deadline message cycle and the source application of the message. and target application It is described by six parameters.
3. The method for analyzing and optimizing the configuration of computing resources for autonomous driving based on expected functional safety requirements as described in claim 1, characterized in that, The process of constructing the resource entity model related to the autonomous driving task in step 2 is as follows: Step 2.1: Divide the resource entities contained in the computing platform system into two major categories: processor resources and communication resources, and use triples. Constructing a resource entity model: (2-1) (2-2) (2-3) in, This represents a set of processor resources, the elements in that set. Refers to the processor entity contained in the platform; Represents a set of communication resources, the elements in that set. Refers to the communication bus contained in the platform; This is a resource connectivity matrix, its elements are... Indicates processor With communication bus The connection relationship; When the processor With communication bus When interconnected, This indicates that data transmission is possible; otherwise... This indicates that data transmission is not possible; Step 2.2: Represent any processor resource using a six-tuple. : in, For memory constraints, For input / output communication bandwidth constraints, For computing power, This refers to static power consumption. The power consumption associated with operations per unit of storage space. Calculate the relevant power consumption of the operation per unit time; Step 2.3: Represent any communication resource using a quadruple. : in, For communication resource bandwidth, Represents communication capabilities, This refers to static power consumption. The power consumption associated with the transmission operation per unit time.
4. The method for analyzing and optimizing computing resource allocation schemes based on expected functional safety requirements according to claim 1, characterized in that, The expected functional safety constraints determined in step 3.2 are as follows: Uniqueness requirement , , ; Time dimension requirements , ; Capability Dimension Requirements , , , , ; Energy consumption constraints , ; Mutual exclusion and correlation requirements , ; in: (1) The requirement for uniqueness of function and communication allocation; Uniqueness requirement In a configuration scheme, all functions Each of them is assigned to one and only one corresponding processor resource entity N; Uniqueness requirement Communication requirements: When the sending and receiving functions reside on different processor resources. Sending and receiving are performed by one and only one corresponding communication resource Bus; Uniqueness requirement When the sending and receiving functions reside on the same processor resource N, the communication requirements are... This is accomplished directly by reading from the processor's memory; (2) The configuration scheme can meet the real-time constraints of all application execution; Time dimension requirements In an effective configuration scheme, each application All need to be within their corresponding deadlines If the execution is completed previously, then the real-time constraint is satisfied: ; This represents the worst-case response time. Considering both fixed-priority scheduling and partitioned scheduling, the real-time constraint satisfies: for any processor resources There exists a set of feasible combinations of partition coefficients such that the applications within each partition... All are schedulable, and the sum of the total partition coefficients does not exceed 1; (3) The configuration scheme can meet the real-time constraints of all message transmissions; Time dimension requirements Considering non-preemptive fixed-priority scheduling, the real-time constraint satisfies: for any communication requirement News in All of these factors ensure that communication capabilities guarantee the information. Maximum blocking time and other communication requirements The sum of the worst-case transmission times ; (4) The required processing power does not exceed the upper limit of the processor resources that can provide; For any given processor resource module, the resource requirements of the applications deployed on it shall not exceed its inherent memory. Output bandwidth Input bandwidth Capability cap; where capability dimension requirements Corresponding memory Capability requirements Corresponding output bandwidth, capability requirements Corresponding input bandwidth; (5) The required communication capacity does not exceed the upper limit of the communication resources that can provide; For any given communication resource module, the sum of the communication bandwidth required for all messages transmitted by the processors connected to it through that communication resource does not exceed its inherent communication bandwidth capacity limit, including input bandwidth requirements and output bandwidth requirements; among which, the capacity dimension requirement... Corresponding to input bandwidth requirements, capability dimension requirements Corresponding output bandwidth requirements; (6) The power consumption of all processor resources does not exceed a given threshold; Energy consumption constraints All processor resources consume no more than a given threshold. ; (7) The power consumption of all communication resources does not exceed a given threshold; Energy consumption constraints For all communication resources, the static power consumption of the communication resources is... And data transmission power consumption does not exceed a given threshold ; (8) The pre-defined functional allocation mutual exclusion and correlation requirements are met; Mutually exclusive requirements The mutual exclusivity of allocation generally refers to "requiring two target functions". Cannot be deployed on the same processor resource The situation of "above"; Relevance requirements The relevance of allocation generally refers to "requiring two objective functions". Must be deployed on the same processor resources The situation of "above".
5. The method for analyzing and optimizing computing resource allocation schemes based on expected functional safety requirements according to claim 4, characterized in that, The process of determining the resource pool and feasible solution set for resource selection in step 4 is as follows: Step 4.1: Construct candidate repositories AR is the set of alternative processor resources, and ABus is the set of alternative communication resources. A functional logic model is constructed. ; Step 4.2: Determine the upper and lower limits of the number of processor resources: For the processor resource set in the resource entity model and alternative processor resource set Define a processing resource composition: , ,……, Use variables Indicates the first One alternative processor resource type Selected processor resources The quantity is expressed by the formula: , ; Let the maximum number of acceptable processor resources be... Since the number of alternative processor resources will not exceed the target function Quantity, ; Let the lower limit of the number of processor resources used for memory be... Referring to constraint Con06, in a finite In the worst-case scenario, all target functions Both are memory usage requirements Maximum target function The number of alternative processor resources must be greater than or equal to the target function. If the quantity is such that the constraint Con15 is defined as follows: From constraint Con15, we get: Step 4.3: Determine the processor resource selection issue: definition It represents the set of all feasible solutions; definition This represents the cost of processor resources for the k-th feasible solution; In this set, the solutions are numbered in ascending order of their cost; Based on step 4.2, the processor resource selection problem can be expressed as the following optimization problem: In step 3.1, formula (3-1) will convert the function... The allocation mapping between processor resources serves as a function allocation scheme. ; use This represents the cost of the i-th processor resource combination; use This represents the processor resource combination scheme corresponding to any one traversal process; Step 4.4: Determine the upper and lower limits of the number of communication resources: For the set of communication resources in the resource entity model and alternative communication resource sets Using variables Indicates the first One alternative communication resource Selected communication resources The quantity satisfies: Then define a communication resource combination: Set an upper limit for the acceptable number of communication resources. This is equal to the actual number of communication resources in reality; Set a lower limit for the number of communication resources : Step 4.5: Determine the communication resource selection issue: definition It represents the set of all feasible solutions; definition This represents the cost of communication resources for the x-th feasible solution; In the set, the solutions are numbered in ascending order; Based on step 4.4, the communication resource selection problem can be expressed as the following optimization problem: Among them, the communication requirements are expressed by equation (3-2) in step 3.
1. The allocation mapping between communication resources serves as a communication allocation scheme. ; use This represents the cost of the i-th type of communication resource; use This represents the communication resource combination scheme corresponding to any traversal process.
6. The method for analyzing and optimizing computing resource allocation schemes based on expected functional safety requirements according to claim 1, characterized in that: In step 5.10, when applying the Forward Checking algorithm to solve the problem, the following search strategy is used: Search Strategy 1: For all unassigned variables, if there is only one element left in its corresponding value range, assign a value to it first; Search Strategy 2: When no element with a unique feasible value exists, prioritize heuristics based on minimum remaining value and maximum memory requirement. Select and assign values to elements in the middle, and complete the process. After assigning values to all elements, then apply the minimum remaining value heuristic to... Select and assign values to elements in the middle; Search Strategy 3: Whenever there is an assignment update, first check the constraints. The corresponding fields of unassigned elements are pruned, and a satisfiability judgment is performed: whether there exists any element whose corresponding field after pruning has no feasible assignment result; If it exists, it indicates that the plan should be changed; Otherwise, use them sequentially. , , Prune the corresponding fields of the remaining unassigned elements.
Citation Information
Patent Citations
A resource scheduling and optimizing method under a CSP
CN109815009A
SMT-based automatic driving system real-time task scheduling analysis method
CN115509712A