Resource virtualization and real-time scheduling method oriented to sensing, calculation and control integration

By constructing a heterogeneous processor resource representation model and a two-layer optimization algorithm, the problem of low efficiency in heterogeneous processor management and scheduling is solved, realizing efficient utilization of heterogeneous processor resources and reliable execution of real-time tasks, thereby improving the system's service quality and energy efficiency.

CN120909777APending Publication Date: 2025-11-07SHANGHAI JIAOTONG UNIV

Patent Information

Application Number
CN202511006296.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively manage and schedule heterogeneous processors in a unified manner, resulting in low resource utilization and inefficient scheduling in real-time systems. Furthermore, existing scheduling frameworks experience performance degradation in large-scale cluster environments, increasing the risk of real-time performance violations.

Method used

Construct a heterogeneous processor resource representation model, using XML or JSON to standardize the description of processors from different manufacturers and with different architectures, establish a distributed resource access framework, design a real-time scheduling method for multiple types of tasks oriented towards integrated sensing, computing, and control, and adopt a two-layer optimization algorithm to optimize task and container allocation decisions to ensure the completion of real-time tasks and the quality of system services and energy consumption performance.

Benefits of technology

It improves the utilization rate of heterogeneous processor resources and the flexibility of the system, ensures the timely completion of real-time tasks, enhances the service quality of the system, reduces energy consumption, and adapts to the rapid response requirements of system changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909777A_ABST
    Figure CN120909777A_ABST
Patent Text Reader

Abstract

The invention discloses a sensing, calculation and control integration-oriented resource virtualization and real-time scheduling method, and relates to the field of resource management.According to the method, heterogeneous processors with different architectures are subjected to standardized description by constructing a heterogeneous processor resource representation model, so that the heterogeneous processors can be perceived and managed in a machine space; on the basis, through a sensing, calculation and control integrated design, sensing, calculation and control multi-type task scheduling oriented to the heterogeneous multi-core processor is further supported; the isomerism of a processor and the operation characteristics of different types of containers are quantified through theoretical analysis, and the'resource '-'service quality + energy consumption expression' mapping relation among service quality, real-time performance, energy consumption and container allocation strategies, task processing proportions and processor operation frequencies is quantitatively described to construct a scheduling problem model. According to the method, the resource utilization rate of the processor can be improved, so that the real-time guarantee of sensing, calculating and controlling multiple types of tasks in a resource shortage scene is realized, and the overall service quality and energy consumption performance of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of resource management, and particularly relates to a resource virtualization and real-time scheduling method for sensing-computing-controlling integration. BACKGROUND

[0002] Real-time systems, as computer systems with safety-critical and real-time responsiveness, are widely used in industrial control, aerospace, national defense technology and other fields. In these critical fields, safety is the primary consideration. If the tasks in the system cannot be completed within the specified time, it may cause unpredictable serious consequences. Taking the motion control of a mechanical arm as an example, the processor needs to quickly calculate the control strategy according to the position and speed of the device, and real-time feedback the control signal to the actuator to ensure the stable and reliable operation of the mechanical arm. Otherwise, any feedback delay may cause the control accuracy to decrease, and even the system to crash, thereby causing serious impact on the safety of the production line.

[0003] The real-time system is characterized in that its correctness depends not only on the correctness of the computing logic, but also on whether the result is produced within a specific time limit. Such a system is composed of sensors, computing units, controllers and other communication devices, forming a highly coupled complex. In the system, there are multiple types of tasks such as sensing, computing, and control, which have different requirements for resources such as storage and memory, and different real-time requirements. Among them, some tasks must be completely processed within a strict time limit, which are called real-time tasks, while other tasks are called non-real-time tasks. The coexistence of real-time / non-real-time sensing-computing-controlling multi-type tasks poses a challenge to task scheduling. To meet the real-time requirements of the system, the characteristics of multi-type tasks and their mutual coupling relationship must be considered through sensing-computing-controlling integrated design, and a reasonable task scheduling strategy must be used to fully utilize the computing, memory, storage and other resources provided by the system.

[0004] To improve the utilization of system resources, it is necessary to uniformly manage and control heterogeneous processors of different manufacturers and different architectures. However, the current manufacturers of processors, instruction set architectures, functional support, and hardware / software interfaces are all different. How to uniformly virtualize and manage the heterogeneous processors in the system to meet the scheduling requirements of real-time systems has become one of the key problems to ensure the reliable execution of sensing-computing-controlling multi-type tasks.

[0005] In addition, traditional resource management methods mainly rely on physical servers or virtual machines, facing problems such as low scheduling efficiency, limited scalability, and high maintenance cost. As a lightweight virtualization solution, container technology can quickly deploy / migrate and start applications, with excellent scalability and simplified maintenance process. These features make container technology particularly suitable for meeting the fast response needs of real-time systems, by encapsulating various tasks in real-time / non-real-time containers, fully utilizing the advantages of container technology in flexibility, scalability, etc., and supporting reliable operation of real-time systems. However, the existing container scheduling framework has not yet fully optimized its scheduling strategy when dealing with complex workflows, and the resource utilization needs to be further improved. Especially in large-scale cluster environments, the performance and efficiency of the existing scheduling framework will decrease, increasing the risk of real-time violation.

[0006] By integrating sensing, computing and control, the resources of heterogeneous multi-core systems are fully utilized to meet the differentiated needs of sensing, computing and control multi-type tasks in terms of resources and real-time performance, and further optimize the system's quality of service and energy consumption. It is a challenging task. In this process, mixed scheduling of real-time / non-real-time multi-type containers, coexistence of different types of containers, and their differentiated needs are involved. In addition, in order to better adapt to changing production needs and multi-task running environment, the existing scheduling system needs to be improved in flexibility and scheduling performance, and a more flexible and reliable scheduling method needs to be developed.

[0007] The most similar implementation scheme found through existing literature search is: Chinese patent application number CN202210374826.9, named "a scheduling method for ensuring the real-time of containerized edge service request", which specifically does as follows: constructing an optimization problem with the conditions of reducing the miss rate of service deadline and limited overhead, and proposing a lightweight online scheduling algorithm and a bottleneck resource-aware progressive resource allocation mechanism to improve resource utilization. However, this scheme is aimed at the real-time guarantee of edge and cloud containerized applications, and does not consider the running characteristics of multi-core processors, making it difficult to be directly applied to processor-level scheduling; Chinese patent application number CN202311843374.5, named "a GPU virtualization method, device, equipment and storage medium", which specifically does as follows: according to the tasks of the application program running in the container, trigger the loading of the pre-configured target library file to intercept the processing instructions initiated by the application program, and according to the set rules to determine whether to allocate resources to the container group, if it is determined to allocate resources, the instructions are forwarded to the task scheduling component, and the corresponding resources are allocated according to the resource demand of the task; Chinese patent application number CN202310129839.4, named "a restrictive preemptive real-time task scheduling method based on container adaptive partitioning", which specifically does as follows: according to the comparison result of the current task utilization rate and the preset utilization rate threshold, dynamically determine the number of processor groups of the multi-core processor, and before the start of each scheduling period, confirm the processor group whose resource utilization rate exceeds the threshold, and migrate the task with the minimum task criticality in the blocking queue to ensure the real-time of the task. However, the above two schemes do not consider the differences of the multi-type tasks of the sensing and computing and the mixed execution of the corresponding real-time / non-real-time multi-type containers, and directly using this method for scheduling will make the result more conservative, which may cause additional consumption of resources; Chinese patent application number CN202411007244.2, named "a container cluster and its scheduling method and scheduling device", which specifically does as follows: obtaining the cluster computing task and arranging it into a task chain, and according to the resource demand of the task, calling a preset planning algorithm to plan a computing chain for the task chain to execute the computing task. However, this scheme does not consider the optimization of the running frequency of the processor, and does not consider the quality of service and energy consumption performance in the scheduling optimization, which limits the effect of scheduling.

[0008] Therefore, those skilled in the art are committed to developing a resource virtualization and real-time scheduling method for multi-type tasks of sensing and computing. SUMMARY

[0009] In view of the above defects of the prior art, the technical problem to be solved by the present application is how to improve the scheduling effect.

[0010] To achieve the above object, the application provides a resource virtualization and real-time scheduling method for sensing calculation control integration, characterized in that the method provides a resource virtualization method, which normalizes the description of different manufacturers' different architecture heterogeneous processors by constructing a heterogeneous processor resource representation model, so that the processors are perceptible and manageable in machine space; on this basis, the method further supports the scheduling of sensing calculation control multi-type tasks for heterogeneous multi-core processors through the integrated design of sensing calculation control, realizes the improvement of system overall service quality and energy consumption performance under the premise of real-time, quantifies the heterogeneity of processors and the running characteristics of different types of containers, and quantitatively describes the mapping relationship between "resources" and "service quality + energy consumption performance" among service quality, real-time, container allocation strategy, task processing ratio and processor running frequency to construct a scheduling problem model, provide theoretical support for related scheduling problems, and ensure the reliability of the scheduling method.

[0011] Further, the method decomposes the constructed complex scheduling model into a plurality of small-scale and simple sub-optimization problems based on a plurality of decomposition strategies, reduces the size and complexity of the problem, and designs a solving algorithm on this basis to efficiently solve the task and container allocation decisions and corresponding task processing decisions.

[0012] Further, the method comprises the following steps:

[0013] Step 1: For the real-time demand of sensing calculation control multi-type tasks, the heterogeneous processor resource representation model is constructed to normalize the description of different manufacturers' different architecture heterogeneous processors in XML, JSON or other languages, and unify the operation interface and resource description method of heterogeneous processors;

[0014] Step 2: On the basis of the heterogeneous processor resource representation model, a distributed resource access framework is established to support the access of heterogeneous processors;

[0015] Step 3: A distributed resource management architecture is constructed to online perceive and dynamically manage the resources of the accessed processors, interact and share the resource pool information between platforms, overall plan the global resource use, and support efficient and flexible scheduling of heterogeneous processor resources and data fusion processing;

[0016] Step 4: On the basis of the above resource virtualization method, a multi-type task real-time scheduling method for sensing calculation control integration is further designed.

[0017] Further, in the step 1, from the perspective of responding to the real-time demand of sensing calculation control multi-type tasks, the information contained in the heterogeneous processor resource representation model mainly includes the attributes, capabilities and interfaces of the processors.

[0018] Further, in the step 2, according to the reporting content of the heterogeneous processor, the attribute information of the heterogeneous processor is obtained, matched with the defined resource representation model, and after the matching is completed, the remaining information in the model is supplemented, so as to form the complete processor resource service description information; further, based on the unified heterogeneous processor data model, the interface adaptation is completed, and the standardized data of the heterogeneous processor is formed; through the above method, the processors of different manufacturers and different architectures are virtualized and integrated into a resource pool, so as to support the allocation and scheduling of these resources according to the demand of the sensing and computing multi-type task, so as to guarantee the real-time performance of the task and further improve the utilization rate of the resource and the flexibility of the system.

[0019] Further, the step 4 further comprises:

[0020] Step 4.1: initialize the sensing and computing multi-type task indicators to be processed, the number of sensing tasks to be processed is n1, the number of computing tasks is n2, and the number of control tasks is n3, wherein the computing amount required for the i th task is c i , the storage amount is s i , and the memory amount is m i ; according to the actual demand, the task real-time demand is set, including the deadline D i of the task, the period H i , the task computing ratio o i , and whether the task is a real-time task or a non-real-time task; for the real-time task, it is required to be processed completely within the deadline, and for the non-real-time task, it is acceptable that only part of the task is completed within the deadline, and this requirement is recorded as constraint C1;

[0021] Step 4.2: in order to realize reliable resource management, on the basis of the foregoing virtualization method, the sensing and computing multi-type tasks are encapsulated into sensing and computing multi-type containers for scheduling, including d1 sensing containers, d2 computing containers and d3 control containers; p i,j ∈{0,1} represents the correspondence between the task and the container, and the value 1 indicates that the task i is encapsulated in the container j, at this time, the container j is called the target container of the task i, and it is required that each task has only one target container, which is recorded as constraint C2;

[0022] Step 4.3: after the task is encapsulated into the container, in order to process the sensing and computing multi-type task, the container needs to be allocated to the processor for running, according to the heterogeneous processor parameter information input during the initialization of the foregoing resource pool, the number of available processors is m, for the processor l, the upper limit of the number of containers that can be run simultaneously is the storage space owned by the processor is the memory size is and the upper limit of the computing frequency is The application uses x j,l ∈{0,1} represents the correspondence between the container and the processor, and the value of 1 indicates that the container j is allocated to the processor l, at this time, the processor l is called the target processor of the container j, and each container is required to have and only have one target processor when there is a task in the container, which is denoted as constraint C3;

[0023] The above allocation aims to guarantee the real-time completion of the task before the deadline, which is denoted as constraint C4, which is related to p i,j , x j,l , and the computing frequency selected by the processor l for running the container j and the computing proportion of the non-real-time task; since there can be multiple containers to be processed on a processor, the schedulability of the task needs to be further considered, and when the schedulability condition C5 of the earliest deadline first EDF scheduling strategy is met, the EDF scheduling strategy is used to guarantee the timely completion of the task; in addition, the allocation of the container needs to consider the hardware constraints of the processor, that is, the number of allocated containers, the consumed storage space, the consumed memory and the set computing frequency cannot exceed the upper limit that the processor can bear, and these constraints are denoted as C6-C9 respectively;

[0024] Step 4.4: initialize the objective function for characterizing the quality of service and energy consumption of the system, and randomly generate an initial scheduling scheme for the multi-type task of the sense calculation control, the scheduling scheme includes task allocation, container allocation, computing frequency and computing proportion; in actual application, the purpose of real-time scheduling is to guarantee the real-time completion of the task and improve the quality of service and energy consumption performance of the system as much as possible, and the following objective function is used to measure the quality of service and energy consumption performance of the system:

[0025]

[0026] The first term corresponds to the total energy consumption of the system, the second term corresponds to the quality of service, and ω>0 is a parameter defined by the user, which can be adjusted in size according to actual needs, k i , κ, R i are non-negative constants; the higher the task processing proportion, the better the corresponding quality of service, and the system energy consumption and the task processing proportion and the processor computing frequency are all positively correlated; constraints C1-C9 and the objective function depict the "resource"-"quality of service+energy consumption performance" mapping relationship, on this basis, the real-time guarantee and further performance improvement under limited resources can be realized by optimizing the scheduling decision; however, the foregoing real-time scheduling problem is a mixed integer nonlinear programming problem, which has high computational complexity and is difficult to solve, therefore, it is divided into a double-layer optimization problem, the upper-layer optimization problem solves the task allocation decision p and the container allocation decision x, and the lower-layer optimization problem solves the computing frequency decision f and the computing proportion decision o, so as to separate the solution of the integer variable and the solution of the continuous variable;

[0027] Step 4.5: solve the upper-level optimization problem based on the idea of original decomposition;

[0028] Step 4.6: solve the lower-level optimization problem based on the idea of proximal gradient method and proximal gradient tracking method;

[0029] Step 4.7: calculate the corresponding system objective function Q K according to the obtained decision, and compare it with the standard Q r , i.e. a constant with sufficiently small initial value, if Q K > Q r , set Q K as the new standard, and record the corresponding decision p r = p K , x r = x K , o r = o K , f r = f K ; in addition, calculate the energy consumption corresponding to the decision to update the energy consumption matrix for use in the next decision update; if the iteration round K has not reached the preset upper limit K total , set K = K + 1, and return to step 4.5; otherwise, end the iteration, output the decision p r , x r , o r , f r , and execute the corresponding task allocation, container allocation and processing operation according to the decision.

[0030] Further, the step 4.5 further comprises:

[0031] Step 4.5.1: introduce a variable q i,j,l , whose value of 1 indicates that task i is encapsulated in container j, and container j is allocated to processor l. Through variable substitution, the bilinear term in the above constraint is equivalent to a linear term, denoted as constraint C10; constraint C4 is transformed into a sufficiency condition C4' related only to q i,j,l , , where is the task processing ratio obtained in the last iteration, and the task processing ratio of non-real-time containers in the first iteration can all be set to the pre-given lower bound of task processing ratio o i ; therefore, the upper-level problem can be written as

[0032]

[0033] s.t.C2,C3,C4',C5-C8,C10,

[0034] where E i,j,l is the energy consumption matrix updated with iteration, which is used to record the energy consumption performance of each allocation result, and can be initialized arbitrarily;

[0035] Step 4.5.2: solving the upper optimization problem P up , based on the idea of original decomposition, by introducing auxiliary variables y, v, P up is decomposed into n sub-optimization problems, on the basis of which the task and container allocation decisions are solved, and the corresponding upper optimization algorithm process is first to initialize all parameters and decision variables; then the constraints of each sub-optimization problem are relaxed to the corresponding convex hull, the dual variable μ is updated by solving the Lagrange multiplier of the relaxed problem, and the variable y is updated by fusing the dual variables between sub-problems; after k up iterations, y up is obtained; finally, by solving two small-scale linear integer programming problems, the task allocation and container allocation decisions are obtained.

[0036] Further, in the step 4.5.2, the task allocation and container allocation decisions include the following steps:

[0037] Step S1: fixing the variable y in the sub-problem i obtained by decomposing P up as y up , and replacing the variable v i with , the maximum allowed constraint violation

[0038] Step S2: fixing in the problem as and replacing the objective function with the objective function of the upper problem, by solving the problem to obtain a set of allocation decisions denoted as p K , x K ;

[0039] Step S3: when the parameter Γ is properly selected, based on y up obtained after a limited number of iterations, the feasibility of the obtained decisions can be guaranteed.

[0040] Further, the step 4.6 further includes:

[0041] Step 4.6.1: when the task allocation and container allocation decisions have been obtained by the upper optimization, use u i to represent the target container of task i, and use s i to represent the target processor of container u i ; at this time, the calculation frequency of task i running on the corresponding processor is , by introducing auxiliary variables and the corresponding consistency constraints, the constraint C4 is equivalently transformed into C4"; on this basis, by defining new variables The lower-level optimization problem can be written as

[0042]

[0043] s.t.z i (1:n)=z l (1:n),i,l=1,…n,

[0044] where the first term of the objective function corresponds to the total energy consumption of the system, and the second term corresponds to the quality of service, and the constraints only contain partial consistency constraints, z i (j) is the jth element of the vector z i , z i (1:n) is a new vector composed of the 1st to nth elements of the vector z i , is a closed convex set Z i ={z i |C1,C4",C9}, the indicator function of the set, that is, when z i ∈Z i , otherwise Similar to the upper-level optimization, by introducing intermediate variables, the lower-level optimization problem can be equivalently transformed into a convex optimization problem with a non-differentiable objective function.

[0045] Step 4.6.2: Solve the lower-level optimization problem P low , which is decomposed into n sub-optimization problems, and on this basis, the optimal computation ratio and processor frequency are solved.

[0046] Further, the corresponding lower-level optimization algorithm in step 4.6.2 is to initialize all parameters and decision variables, and iteratively update the decision variables, in order to satisfy the partial consistency constraints of the lower-level optimization problem, then the auxiliary variables and are calculated by information fusion between sub-problems. i,k+1 Then based on the proximal gradient and proximal gradient tracking method, the decision z i,k+1 is updated by solving a small-scale convex optimization problem, and based on z i,k+1 , the corresponding gradient information g i,k+1 is calculated; further, based on the gradient tracking method, m low is calculated to update the estimate of the global gradient information for the next iteration; after k K iterations, the optimal computation ratio and the optimal computation frequency are calculated. This set of decisions is denoted as o K ,fK , setting for use in the next round of decision updates.

[0047] The present application guarantees the real-time processing of real-time tasks, so that all real-time tasks can be completely processed before their deadlines, thereby guaranteeing the stable and reliable operation of the actual production line. On this basis, by optimizing the allocation of tasks and containers and the corresponding processing decisions, the heterogeneous multi-core processor resources are fully utilized, and as many non-real-time tasks (containers) as possible are processed in real time on the premise of real-time guarantee of real-time tasks (containers), so as to find a balance between improving the overall service quality of the system and reducing the total energy consumption of the system, so that the production performance of the actual production line is improved. In addition, compared with the traditional method, the method proposed by the present application has lower computational complexity and higher scheduling efficiency, and can quickly and flexibly adapt to changes in the system.

[0048] The concept, specific structure and technical effects of the present application will be further described below in combination with the accompanying drawings, so as to fully understand the purpose, features and effects of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 is a resource virtualization and real-time scheduling system for sensing and calculation control multi-type tasks of a preferred embodiment of the present application;

[0050] Figure 2 is a general implementation framework diagram of a resource virtualization and real-time scheduling method for sensing and calculation control multi-type tasks of a preferred embodiment of the present application;

[0051] Figure 3 is a flowchart of a real-time scheduling method for sensing and calculation control multi-type tasks of a preferred embodiment of the present application;

[0052] Figure 4 is a flowchart of an upper layer optimization algorithm of a preferred embodiment of the present application;

[0053] Figure 5 is a flowchart of a lower layer optimization algorithm of a preferred embodiment of the present application. DETAILED DESCRIPTION

[0054] The following reference description of the drawings introduces a plurality of preferred embodiments of the present application, so that the technical content thereof is more clear and convenient to understand. The present application can be embodied in many different forms of embodiments, and the protection scope of the present application is not limited to the embodiments mentioned herein.

[0055] In the drawings, components of the same structure are denoted by the same reference numerals, and components similar in structure or function are denoted by similar reference numerals. The size and thickness of each component shown in the drawings are arbitrarily shown, and the size and thickness of each component are not limited in the present application. In order to make the drawing clearer, the thickness of some components is appropriately exaggerated in some places in the drawing.

[0056] Reference Figures 1-5 The present application proposes a resource virtualization and real-time scheduling method for sensing, computing and control integration, including the following steps:

[0057] Step 1: For the real-time requirement of sensing, computing and control multi-type tasks, a heterogeneous processor resource representation model is constructed, and different manufacturers and different architectures of heterogeneous processors are standardized described in XML, JSON and other languages, and the operation interface and resource description method of the heterogeneous processors are unified. The resource representation model maps the functions provided by the processor to the machine space, making it perceptible and manageable. Resource virtualization provides the ability for tasks to directly access processor functions through a common interface without tightly binding to the private interfaces of these processors.

[0058] Step 2: On the basis of the heterogeneous processor resource representation model, a distributed resource access framework is established to support heterogeneous processor access. According to the processor reporting content, the processor attribute information is obtained, matched with the defined resource representation model, and the remaining information in the model is supplemented to form a complete processor resource service description information. Further, based on the unified heterogeneous processor data model, interface adaptation is completed to form standardized data of heterogeneous processors. Through the above method, processors of different manufacturers and different architectures are virtualized and integrated into a resource pool to support the allocation and scheduling of these resources according to the requirements of sensing, computing and control multi-type tasks, thereby ensuring the real-time performance of the tasks and further improving the utilization of resources and the flexibility of the system.

[0059] Step 3: A distributed resource management architecture is constructed to perform online perception and dynamic management of the resources of the processors that have been accessed. Through the interaction and sharing of resource pool information between platforms, the global resource usage is coordinated to support efficient and flexible scheduling of heterogeneous processor resources and data fusion processing.

[0060] Step 4: On the basis of the above resource virtualization method, a multi-type task real-time scheduling method for sensing, computing and control integration is further designed. In view of the problems in the background art, when allocating containers, processors and setting calculation frequency and calculation proportion for sensing, computing and control multi-type tasks, the present embodiment uses a double-layer optimization algorithm to continuously search and iterate to find a set of optimal solutions, thereby realizing the improvement of system overall service quality and energy consumption performance under the real-time requirement of multi-type tasks. Figure 3 is a flowchart of a multi-type task real-time scheduling method for sensing, computing and control integration based on a double-layer optimization algorithm.Figure 3 The method comprises:

[0061] Step 4.1: initialize the to-be-processed perception-control multi-type task indicators, the number of perception tasks to be processed is n1, the number of computing tasks is n2, and the number of control tasks is n3, wherein the computing amount required for the i-th task is c i , the storage amount is s i , and the memory amount is m i . According to actual requirements, the task real-time requirement is set, including the deadline D i , the period H i , the task computing ratio o i , and whether the task is a real-time task or a non-real-time task. For a real-time task, it is required to ensure that it is completely processed within the deadline, and for a non-real-time task, it is acceptable that only part of the task processing is completed within the deadline, which is denoted as constraint C1.

[0062] Step 4.2: in order to realize reliable resource management, on the basis of the foregoing virtualization method, the perception-control multi-type tasks are encapsulated into perception-control multi-type containers for scheduling, including d1 perception type containers, d2 computing type containers, and d3 control type containers. The present application uses p i,j ∈{0,1} to represent the correspondence between tasks and containers, and the value of 1 indicates that task i is encapsulated in container j, at this time, container j is referred to as the target container of task i, and it is required that each task has only one target container, denoted as constraint C2.

[0063] In addition, for real-time and non-real-time tasks, they will be encapsulated into corresponding real-time and non-real-time containers. Taking a perception task as an example, a real-time perception task can select any one of containers 1,…,n1 as its target container, and once all real-time perception tasks select their respective target containers, they are encapsulated into real-time perception type containers according to the selection; a non-real-time perception task can select a target container from containers n1+1,…,2n1, and encapsulate them into a group of non-real-time perception type containers. For other types of tasks, similar encapsulation strategies can be used for encapsulation, and the number of containers of each type is generated according to the task encapsulation requirement, that is, d1, d2, and d3 are determined by p i,j . This encapsulation strategy ensures that the real-time and non-real-time requirements of multi-type tasks are clearly distinguished and effectively managed, and reliably supports the implementation of perception-computing-control integration.

[0064] For the encapsulation of containers, each container contains a task (application program) and corresponding dependencies, and the storage amount required by the dependencies of container j is , and the memory amount is And each task can only be packaged in the same type of container. The following is an example of Docker to illustrate how to package (real-time / non-real-time) sensing and computing multi-type tasks into corresponding (real-time / non-real-time) perception class / computing class / control class containers: The host computer can obtain the information required by the device to complete the sensing / computing / control task through the information model and user configuration information accessed by the on-site sensing and computing multi-type device, including corresponding dynamic library files, link files, inter-process call files, etc.; in the task packaging process, the corresponding dependencies are copied to the image according to the above information, and further according to the p i,j The decision generates a Dockerfile file, and the related tasks are packaged into (real-time / non-real-time) perception class / computing class / control class containers through Docker instructions.

[0065] Step 4.3: When the task is packaged into the container, in order to process the sensing and computing multi-type task, the container needs to be allocated to the processor for running, according to the aforementioned resource pool initialization input parameter information of the heterogeneous processor, the number of available processors is m, and for the processor l, the upper limit of the number of containers that can be simultaneously run is The storage space owned by the processor is The memory size is The upper limit of the computing frequency is The application uses x j,l ∈{0,1} represents the correspondence between the container and the processor, and the value is 1, indicating that the container j is allocated to the processor l, at this time, the processor l is called the target processor of the container j, and when there is a task in the container, it is required that each container has and only has one target processor, which is denoted as constraint C3.

[0066] The above allocation aims to ensure that the task is completed in real time before the deadline, which is denoted as constraint C4, which is related to p i,j , x j,l , the computing frequency selected by the processor l for running the container j, and the computing proportion of the non-real-time task; since there can be multiple containers on a processor waiting to be processed, the schedulability of the task needs to be further considered, for example: when the schedulability condition C5 of the earliest deadline first (EDF) scheduling strategy is met, the EDF scheduling strategy can be used to ensure the timely completion of the task. In addition, the allocation of the container needs to consider the hardware constraints of the processor, such as the number of allocated containers, consumed storage space, consumed memory, and set computing frequency, which cannot exceed the upper limit that the processor can bear, and these constraints are denoted as C6-C9.

[0067] Step 4.4: Initialize the objective function for characterizing the system service quality and energy consumption, and randomly generate the initial scheduling scheme for the multi-type tasks of the sense-control, which includes task allocation, container allocation, computing frequency, and computing proportion. In practical applications, the purpose of real-time scheduling is to ensure the real-time completion of tasks and improve the service quality and energy consumption performance of the system as much as possible, such as using the following objective function to measure the service quality and energy consumption performance of the system

[0068]

[0069] where the first term corresponds to the service quality of the system, the second term corresponds to the total energy consumption, ω > 0 is a user-defined parameter that can be adjusted in size according to actual needs, k i , κ, R i are non-negative constants. It can be seen that the higher the task processing proportion, the better the service quality, and the system energy consumption is positively related to the task processing proportion and the processor computing frequency. In summary, the constraints C1-C9 and the objective function depict the "resource" - "service quality + energy consumption performance" mapping relationship, and on this basis, real-time guarantee and further performance improvement under limited resources can be achieved by optimizing the scheduling decision. However, the aforementioned real-time scheduling problem is a mixed integer nonlinear programming problem with high computational complexity, which is difficult to solve, so it is decomposed into a double-layer optimization problem, the upper optimization problem solves the task allocation decision p and the container allocation decision x, and the lower optimization problem solves the computing frequency decision f and the computing proportion decision o, thereby separating the solution of integer variables and the solution of continuous variables.

[0070] Step 4.5: Solve the upper optimization problem based on the idea of original decomposition, which includes the following steps:

[0071] Step 4.5.1: Introduce variable q i,j,l , equivalent conversion of the bilinear term in the above constraint into a linear term through variable substitution, denoted as constraint C10. Transform constraint C4 into a sufficient condition C4' related only to q i,j,l , is the task processing proportion obtained in the last iteration, and in the first iteration, the task processing proportion of non-real-time containers can be set to the pre-defined lower bound of the task processing proportion o i . Therefore, the upper problem can be written as

[0072]

[0073] s.t.C2,C3,C4',C5-C8,C10,

[0074] where E' i,j,l ​The energy consumption matrix updated with iteration can be initialized arbitrarily.

[0075] Step 4.5.2: Solve the upper-level optimization problem P up Based on the idea of original decomposition, P up is decomposed into n sub-optimization problems by introducing auxiliary variables y, v, and on this basis, the task and container allocation decisions are solved, and the corresponding upper-level optimization algorithm process is shown in Figure 4 . Figure 4 The first two steps in the above formula initialize all parameters and decision variables; the third to sixth steps relax the constraints of each sub-optimization problem to the corresponding convex hull, update the dual variables μ by solving the Lagrange multiplier of the obtained relaxed problem, and update the variables y by fusing the dual variables between sub-problems, and after k up iterations, y up is obtained. The seventh to eighth steps obtain the task allocation and container allocation decisions by solving two small-scale linear integer programming problems: first, fix the variable y in the sub-problem i obtained by decomposing P up as y up , replace the variable v i with , and obtain the maximum allowed constraint violation by solving the problem. Further, fix in the problem as and replace the objective function with the objective function of the upper-level problem, and obtain a set of allocation decisions by solving the problem, denoted as p K , x K . When the parameter Γ is properly selected, based on y up obtained after a limited number of iterations, the feasibility of the obtained decisions can be guaranteed.

[0076] Step 4.6: Solve the lower-level optimization problem based on the idea of proximal gradient method and proximal gradient tracking method, including the following steps:

[0077] Step 4.6.1: When the task allocation and container allocation decisions have been obtained by the upper-level optimization, use u i to represent the target container of task i, and use s i to represent the target processor of container u i . At this time, the calculation frequency of task i running on the corresponding processor is represented by . By introducing auxiliary variables and corresponding consistency constraints, the constraint C4 is equivalent to C4”. On this basis, by defining a new variable , the lower-level optimization problem can be written as

[0078]

[0079] s.t.zi (1 : n) = z l (1 : n), i, l = 1,... n,

[0080] where the first term of the objective function corresponds to the total energy consumption of the system, the second term corresponds to the quality of service, the constraints only contain partial consistency constraints, z i (j) is the jth element of the vector z i (j) is the jth element of the vector z i (1 : n) is a new vector composed of the first to nth elements of the vector z i is a closed convex set Z i = {z i | C1, C4", C9} is the indicator function, that is, when z i ∈ Z i otherwise Similar to the upper optimization, by introducing intermediate variables, the lower optimization problem can be equivalently converted into a convex optimization problem with non-differentiable objective function.

[0081] Step 4.6.2: Solve the lower optimization problem P low , which is decomposed into n sub-optimization problems, on the basis of which the optimal computation ratio and processor frequency are solved, and the corresponding lower optimization algorithm flow is shown in Figure 5 Figure 5 The first to second steps in the above formula initialize all parameters and decision variables; the third to eighth steps iteratively update the decision variables. In order to satisfy the partial consistency constraints of the lower optimization problem, first, the auxiliary variables and are calculated through inter-sub-problem information fusion; then, based on the proximal gradient and proximal gradient tracking method, the decision z i,k+1 is updated by solving a small-scale convex optimization problem, and based on z i,k+1 , the corresponding gradient information g i,k+1 is calculated. Further, based on the gradient tracking method, m i,k+1 is calculated to update the estimation of the global gradient information for use in the next iteration. After k low iterations, the decision can be calculated, and the corresponding optimal computation ratio and optimal computation frequency are calculated. This set of decisions is denoted as o K , f K , and is set for use in the next round of decision updating.

[0082] Step 4.7: Calculate the corresponding system objective function according to the decisions that have been obtained, denoted as Q K , and compare it with the standard Q r ​​​(Initial value is a constant sufficiently small) is compared, if Q K > Q r , Q K is set as a new standard, and the corresponding decision p r = p K , x r = x K , o r = o K , f r = f K is recorded. In addition, the energy consumption corresponding to the decision is calculated to update the energy consumption matrix for use in the next round of decision update. If the iteration round K has not reached the preset upper limit K total , K = K + 1 is set, and step 4.5 is returned; otherwise, the iteration is ended, the decision p r , x r , o r , f r is output, and the corresponding task allocation, container allocation and processing operation are performed according to the decision.

[0083] The preferred embodiments of the present application are described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations to the present application without creative work based on the concept of the present application. Therefore, any technical solution obtained by logical analysis, reasoning or limited experiment based on the prior art according to the concept of the present application shall be within the protection scope defined by the claims.

Claims

1. A resource virtualization and real-time scheduling method for sensing, computing and control integration, characterized in that, The method provides a resource virtualization method, a heterogeneous processor resourceization representation model is constructed, different manufacturers and different architecture heterogeneous processors are normalized described, and the processors are perceptible and manageable in a machine space; on the basis, a sensing and computing integrated design is further supported for a heterogeneous multi-core processor, a sensing and computing multi-type task scheduling is further supported, system overall service quality and energy consumption performance improvement under a real-time premise are realized; through theoretical analysis, a processor heterogeneity, running characteristics of different types of containers, and a "resource"-"service quality+energy consumption performance" mapping relationship between a service quality, real-time performance, a container allocation strategy, a task processing proportion, and a processor running frequency are quantitatively described to construct a scheduling problem model, theoretical support is provided for related scheduling problems, and reliability of the scheduling method is ensured.

2. The resource virtualization and real-time scheduling method for integrated sensing, computing and control according to claim 1, wherein, The method decomposes the constructed complex scheduling model into a plurality of small-scale and simple sub-optimization problems based on a plurality of decomposition strategies, reduces the scale and complexity of the problem, and designs a solving algorithm to efficiently solve task and container allocation decisions and corresponding task processing decisions. 3.The method of claim 2, wherein, The method comprises the following steps: Step 1: For real-time requirements of sensing and computing multi-type tasks, the heterogeneous processor resourceization representation model is constructed, different manufacturers and different architecture heterogeneous processors are normalized described in XML, JSON or the like, and operation interfaces and resource description methods of the heterogeneous processors are unified; Step 2: On the basis of the heterogeneous processor resourceization representation model, a distributed resource access framework is established to support heterogeneous processor access; Step 3: A distributed resource management architecture is constructed to perform online perception and dynamic management on the resources of the accessed processors, to uniformly plan global resource use through interaction and sharing of resource pool information between platforms, and to support efficient and flexible scheduling of heterogeneous processor resources and data fusion processing; Step 4: On the basis of the above resource virtualization method, a multi-type task real-time scheduling method for sensing and computing integration is further designed.

4. The resource virtualization and real-time scheduling method for integrated sensing, computing and control according to claim 3, wherein, In step 1, from the perspective of responding to real-time requirements of sensing and computing multi-type tasks, the information contained in the heterogeneous processor resourceization representation model mainly includes processor attributes, capabilities and interfaces.

5. The resource virtualization and real-time scheduling method for the integration of the sensing, computing and control according to claim 4, wherein, In step 2, according to the heterogeneous processor reporting content, the heterogeneous processor attribute information is obtained, matched with the defined resourceization representation model, and the remaining information in the model is supplemented after the matching is completed, so as to form complete processor resource service description information; further, interface adaptation is completed based on the unified heterogeneous processor data model to form standardized heterogeneous processor data; through the above method, processors of different manufacturers and different architectures are virtualized and integrated into a resource pool to support allocation and scheduling of these resources according to the requirements of sensing and computing multi-type tasks, so as to guarantee the real-time performance of the tasks and further improve the utilization rate of the resources and the flexibility of the system.

6. The resource virtualization and real-time scheduling method for integrated sensing, computing and control according to claim 5, wherein, Step 4 further comprises: Step 4.1: initialize the to-be-processed sensory computing multi-type task indicators, the number of to-be-processed sensing tasks is n1, the number of to-be-processed computing tasks is n2, and the number of to-be-processed control tasks is n3, wherein the computing amount required for the i-th task is c i , the storage amount is s i , the memory amount is m i ; according to actual requirements, set the task real-time requirement, including the deadline D i of the task, the period H i , the task computing ratio o i , and whether the task is a real-time task or a non-real-time task; for a real-time task, it is required to ensure that it is completely processed within the deadline, and for a non-real-time task, it is acceptable that only part of the task is completed within the deadline, and this requirement is denoted as constraint C1; Step 4.2: In order to achieve reliable resource management, on the basis of the foregoing virtualization method, the multi-type tasks of the Sensing-Computing-Control are respectively encapsulated into multi-type containers of the Sensing-Computing-Control for scheduling, which includes d1 sensing containers, d2 computing containers and d3 control containers; this method uses p i,j ∈{0,1} represents the correspondence between tasks and containers, and the value of 1 indicates that task i is encapsulated in container j, at this time, container j is called the target container of task i, and each task has and only has one target container, which is denoted as constraint C2; Step 4.3: After the tasks are packaged into containers, in order to process the sensable control multi-type tasks, the containers need to be distributed to the processors for running. According to the aforementioned parameter information of the heterogeneous processors input during initialization of the resource pool, the number of available processors is m, and for the processor l, the upper limit of the number of containers that can be simultaneously run is The storage space possessed by the processor is The memory size is The upper limit of the calculation frequency is The present application uses x j,l ∈{0,1} represents the correspondence between the container and the processor, and the value of 1 indicates that the container j is distributed to the processor l. At this time, the processor l is referred to as the target processor of the container j. When there are tasks in the container, it is required that each container has and only has one target processor, which is recorded as constraint C3. The above-mentioned allocation aims to ensure that the tasks are completed in real time before the deadline, denoted as constraint C4, which is related to p i,j , x j,l , the computing frequency selected by the processor l for the running container j, and the computing proportion of non-real-time tasks; Since there can be multiple containers to be processed on one processor, the schedulability of the tasks needs to be further considered. When the schedulability condition C5 of the earliest deadline first EDF scheduling strategy is met, the EDF scheduling strategy is used to ensure the timely completion of the tasks. In addition, the allocation of the container needs to consider the hardware constraints of the processor, that is, the number of allocated containers, the consumed storage space, the consumed memory, and the set computing frequency cannot exceed the upper limit that the processor can bear. These constraints are denoted as C6-C9, respectively. Step 4.4: initialize the objective function for characterizing the system service quality and energy consumption, and randomly generate an initial scheduling scheme for the multi-type tasks of the sense-control, which includes task allocation, container allocation, computing frequency, and computing proportion; in practical applications, the purpose of real-time scheduling is to ensure the real-time completion of tasks and improve the system's service quality and energy consumption performance as much as possible, and the following objective function is used to measure the system's service quality and energy consumption performance: where the first term corresponds to the quality of service of the system, the second term corresponds to the total energy consumption, ω > 0 is a user-defined parameter, which can be adjusted in size according to actual needs, k i , κ, R i are non-negative constants; the higher the task processing ratio, the better the corresponding service quality, and the system energy consumption and the task processing ratio and the processor computing frequency are all positively correlated; the constraints C1-C9 and the objective function depict the "resource"-"service quality + energy consumption performance" mapping relationship, on this basis, through optimization scheduling decision, real-time guarantee and further performance improvement under limited resources can be realized; however, the foregoing real-time scheduling problem is a mixed integer nonlinear programming problem, which has high computational complexity and is difficult to solve, therefore it is decomposed into a double-layer optimization problem, the upper optimization problem solves the task allocation decision p and the container allocation decision x, and the lower optimization problem solves the computing frequency decision f and the computing ratio decision o, so as to separate the solution of the integer variable and the solution of the continuous variable. Step 4.5: solve the upper optimization problem based on the idea of original decomposition; Step 4.6: solve the lower optimization problem based on the idea of proximal gradient method and proximal gradient tracking method; Step 4.7: Calculate the corresponding system objective function according to the decision obtained, denoted as Q K , and compare it with the standard Q r , i.e. a constant with sufficiently small initial value, if Q K > Q r , set Q K as the new standard, and record the corresponding decision p r = p K , x r = x K , o r = o K , f r = f K ; in addition, also calculate the energy consumption corresponding to this decision to update the energy consumption matrix for use in the next round of decision updates; if the iteration round K has not reached the preset upper limit K total , set K = K + 1 and return to step 4.5; otherwise, end the iteration and output the decision p r , x r , o r , f r and execute the corresponding task allocation, container allocation and processing operation according to the decision.

7. The resource virtualization and real-time scheduling method for integrated sensing, computing and control according to claim 6, wherein, The step 4.5 further includes: Step 4.5.1: Introduce variable q i,j,l which takes value 1 to indicate that task i is encapsulated in container j and container j is assigned to processor l. The bilinear term in the above constraint is equivalently transformed into a linear term by variable substitution, denoted as constraint C10; constraint C4 is transformed into one sufficiency condition C4 related to constraint C4 ' where is the task processing ratio obtained in the last iteration, and in the first iteration the task processing ratio of non-real-time containers can all be set to the pre-given task processing ratio lower bound o i ; thus the upper problem can be written as where E i,j,l is the energy consumption matrix updated with iteration, which is used to record the energy consumption performance of each allocation result, and can be initialized arbitrarily; Step 4.5.2: Solve the upper optimization problem P up , based on the idea of original decomposition, by introducing auxiliary variables y, v, P up is decomposed into n sub-optimization problems, on which the task and container allocation decisions are solved. The corresponding upper optimization algorithm process is first to initialize all parameters and decision variables; then the constraints of each sub-optimization problem are relaxed to the corresponding convex hull, the dual variables μ are updated by solving the Lagrange multiplier of the relaxed problem, and the variables y are updated by fusing the dual variables between sub-problems, and after k up iterations, y up is obtained; finally, by solving two small-scale linear integer programming problems, the task allocation and container allocation decisions are obtained. 8.The method of claim 7, wherein, In the step 4.5.2, the task allocation and container allocation decision includes the following steps: Step S1: Set P up Decompose the problem i into sub-problems i up , fixing the variable y i to y , and solving the problem to obtain the maximum allowed constraint violation Step S2: Substitute the problem in step S1 into the following equation is fixed as and the objective function is replaced by the upper-level problem objective function, and a set of allocation decisions is obtained by solving the problem, denoted as p K ,x K ; Step S3: When parameter Γ is properly selected, y is obtained based on the results after a limited number of iterations up The feasibility of the resulting decision can be guaranteed. 9.The method of claim 8, wherein, The step 4.6 further includes: Step 4.6.1: When the task allocation and container allocation decisions have been obtained by the upper level optimization, use u i to denote the target container of task i, and use s i to denote the target processor of container u i ; at this time, the computation frequency of task i running on the corresponding processor is denotes that constraint C4 is equivalently transformed into C4" by introducing auxiliary variables and the corresponding consistency constraints; on this basis, by defining new variables the lower level optimization problem can be written as where the first term of the objective function corresponds to the total energy consumption of the system, the second term corresponds to the quality of service, and the constraints contain only partial consistency constraints, z i (j) is the jth element of the vector z i i (1:n) is a new vector consisting of the first through nth elements of the vector z i is a closed convex set Z i = {z i | C1, C4", C9} is an indicator function, i.e., when z i ∈ Z i otherwise Similar to the upper-level optimization, the lower-level optimization problem can be equivalently converted into a convex optimization problem with a non-differentiable objective function by introducing an intermediate variable.​​​ Step 4.6.2: Solve the lower level optimization problem P low which is decomposed into n sub-optimization problems, on the basis of which the optimal computation ratio and processor frequency are solved.

10. The resource virtualization and real-time scheduling method for integrated sensing, computing and control according to claim 9, wherein, The lower-level optimization algorithm in step 4.6.2 involves initializing all parameters and decision variables, iteratively updating the decision variables, and then, to satisfy the partial consistency constraints of the lower-level optimization problem, obtaining auxiliary variables through information fusion calculation between sub-problems. and Then, based on the nearest gradient and the nearest gradient pursuit method, the decision z is updated by solving a small-scale convex optimization problem. i,k+1 and based on z i,k+1 Calculate the corresponding gradient information g i,k+1 Furthermore, m is calculated based on the gradient tracking method. i,k+1 This is used to update the estimate of global gradient information for use in the next iteration; in k low After the second iteration, we get The corresponding optimal calculation ratio can be calculated. With optimal calculation frequency Let this set of decisions be denoted as o. K ,f K ,set up For use in the next round of decision updates.

Citation Information

Patent Citations

  • A scheduling method to ensure the real-time performance of containerized edge service requests

    CN114827142B

  • Container adaptive division-based restrictive preemptive real-time task scheduling method

    CN116107716A

  • GPU virtualization method and device, equipment and storage medium

    CN117788264A

  • Container cluster and scheduling method and scheduling device thereof

    CN118885296A

Cited By

  • Sensing and calculation control fused control method, industrial control system and electronic equipment

    CN122085857A