Route cost-aware orchestration method, apparatus, device, and storage medium
Patent Information
- Application Number
- CN202610853682.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-06-12
AI Technical Summary
[0006]本申请提供一种路由代价感知编排方法、装置、设备及计算机可读存储介质,可以解决现有技术中存在的部署与路由协同优化不足、多实例延迟分析不准确、长期性能与成本预算难以平衡的技术问题
[0017]本申请实施例提供的技术方案带来的有益效果包括:
Smart Images

Figure CN122420399B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer services, specifically to a routing cost-aware orchestration method, apparatus, device, and computer-readable storage medium. Background Technology
[0002] Microservices, as a lightweight and loosely coupled software architecture, decompose online applications into a series of independently working components that communicate through standardized APIs. They offer advantages such as flexible expansion, ease of maintenance, and independent deployment, providing strong support for the development and management of large-scale online applications.
[0003] With the development of edge computing technology, to further reduce response latency and improve Quality of Service (QoS), a large number of microservice applications are being deployed from the cloud to edge cloud environments. In the edge cloud, user demands are significantly dynamic, and the complex call dependencies between microservices are typically modeled as dynamic directed acyclic graphs. Massive requests need to enter a request queue and be forwarded to distributed instances for sequential processing. To reduce the complexity of service communication and achieve efficient routing, service mesh architecture has emerged, simplifying the interaction process between services through dedicated proxy components.
[0004] However, dynamic service mesh orchestration in current edge cloud environments still faces numerous technical challenges. Existing solutions struggle to balance dynamic requirements with long-term performance and cost constraints. Current industrial products (such as Kubernetes and Istio) decouple service deployment and request routing into independent modules or plugins for separate optimization, ignoring the tight coupling and complex service call dependencies between the two. This approach only achieves localized optimization and cannot improve global performance through collaborative orchestration. Furthermore, most research uses single-instance modeling to simplify microservice interaction and request queue analysis, making it difficult to address network resource contention and load balancing issues arising from service multiplexing and instance sharing in dynamic call graphs. While multi-instance modeling is more realistic, its multi-path routing latency analysis and large-scale dynamic orchestration are extremely challenging given the coupled deployment and routing. Moreover, existing solutions often focus on instantaneous performance requirements, neglecting the operational costs of instance expansion and migration during dynamic orchestration. Even those few studies considering time-averaged cost budgets fail to address cost overruns under surges or fluctuations in request load due to coarse-grained orchestration methods and the neglect of multi-timeslot continuous orchestration characteristics, making it difficult to guarantee long-term performance stability and service level objectives.
[0005] In summary, in edge cloud dynamic service mesh scenarios, how to solve the core problems of insufficient deployment and routing collaborative optimization, inaccurate multi-instance latency analysis, and difficulty in balancing long-term performance and cost budget, and achieve efficient orchestration to adapt to time-varying user needs and network conditions, has become a technical challenge that urgently needs to be solved in this field. Summary of the Invention
[0006] This application provides a routing cost-aware orchestration method, apparatus, device, and computer-readable storage medium, which can solve the technical problems existing in the prior art, such as insufficient deployment and routing co-optimization, inaccurate multi-instance latency analysis, and difficulty in balancing long-term performance and cost budget.
[0007] In a first aspect, embodiments of this application provide a routing cost-aware orchestration method, including: Based on the basic attribute information of the edge cloud system obtained, a first constraint, a second constraint, and a third constraint are generated. The first constraint is used to set the number of microservice instances, the second constraint is used to set the binary variable of microservice processing status, and the third constraint is used to set the request routing probability variable. The basic attribute information of the edge cloud system includes the node configuration information, network link information, and resource usage information of the physical server. Based on the network state information of the edge cloud system under the target time slot, the first constraint, the second constraint, and the third constraint are used to construct a long-term optimization objective, wherein the long-term optimization objective is constructed as a mixed integer nonlinear programming problem. By pre-setting a Lyapunov cost-aware long-term cooperative scheduling algorithm, the long-term optimization objective is transformed into a single-slot sub-function. A two-stage relaxation rounding algorithm is used to solve the single time slot sub-function to determine the target instance deployment matrix and target routing strategy for the target time slot. The target instance deployment matrix includes decision variables related to service instance deployment, and the target routing strategy includes decision variables related to request routing and binary variables of microservice processing status. The two-stage relaxation rounding algorithm includes the LRID algorithm and the PEROR algorithm. Based on the relevant decision variables deployed by the service instances, the service instances of the edge nodes are created, destroyed, and scaled up / adjusted. Based on the relevant decision variables of the request routing and the binary variables of the microservice processing status, request forwarding and path control are completed.
[0008] In conjunction with the first aspect, in one implementation, generating the first constraint, the second constraint, and the third constraint based on the acquired basic attribute information of the edge cloud system includes: Based on the number of cores of each physical server node under the target time slot, a first constraint condition is generated, wherein the first constraint condition is that the number of microservice instances is less than or equal to the number of cores of each physical server node under the corresponding target time slot. Based on the acquisition of the predecessor microservice instance and successor microservice instance of the microservice on each physical server node under the target time slot, a second constraint condition is generated, wherein the second constraint condition is that the predecessor microservice instance of the microservice processing state binary variable is greater than or equal to the successor microservice instance, and there is a dependency relationship between the successor microservice instance and the predecessor microservice instance. Based on the routing probabilities of the request flow from the predecessor microservice instance to the successor microservice instance on each physical server node under the target time slot, a third constraint is generated, wherein the third constraint is that the sum of all path probabilities of the request routing probability variable is 1.
[0009] In conjunction with the first aspect, in one implementation, the step of constructing a long-term optimization objective based on the network state information of the edge cloud system under the target time slot, the first constraint, the second constraint, and the third constraint includes: Based on the obtained request routing probability, request arrival rate, microservice dependencies and processing status, the first constraint, the second constraint and the third constraint, the constraints of total request arrival rate, real-time service intensity, steady-state probability, processing and queuing latency, data transmission latency and average path latency of the node microservice are generated. Based on the average latency of the path, the request flow, and the microservice data size, constraints are generated for the expected average response latency, the overall system average response latency, the system throughput, and the service request processing rate. Based on the Jain fairness index, the resource utilization rate and link bandwidth utilization rate of the nodes are calculated to generate constraints on the fairness of network resource allocation and the overall system. Based on node activation cost, instance migration and expansion cost, and communication bandwidth cost, generate constraints for server operating cost, instance deployment incremental cost, communication overhead cost, total orchestration cost, and time average cost budget. Based on the number of node cores and the available bandwidth of network links, generate computing resource constraints and bandwidth resource constraints. Based on the constraints of time average cost budgeting, computing resource constraints, bandwidth resource constraints, and system comprehensiveness, the long-term optimization objective is constructed.
[0010] In conjunction with the first aspect, in one implementation, converting the long-term optimization objective into a single-slot subfunction according to the pre-configured Lyapunov cost-aware long-term cooperative scheduling algorithm includes: Each physical server node under the target time slot is set as a virtual queue, wherein the virtual queue is used to represent the cumulative over-deployment amount up to the target time slot; Based on the orchestration cost of each virtual queue under the target time slot, the time average threshold of each physical server node under the target time slot, and the time average threshold of each physical server node under the target time slot, the constraints of the dynamic update equation of each virtual queue are generated. Based on the obtained quadratic Lyapunov function and the constraints of the dynamic update equations of each virtual queue, the constraints of Lyapunov drift are generated, wherein the quadratic Lyapunov function is a pre-set Lyapunov cost-aware long-term cooperative scheduling algorithm. Based on the Lyapunov drift constraints, the obtained non-negative equilibrium parameters, and the comprehensive system constraints, constraints incorporating a drift-penalty function are generated. ; Based on the orchestration cost of each virtual queue and each physical server node under the target time slot, the time average threshold, non-negative balance parameter, and non-negative constant of each physical server node under the target time slot, an upper bound is imposed on the constraint condition for introducing the drift-penalty function, thereby generating the constraint condition for introducing the upper bound of the drift-penalty function. The long-term optimization objective is transformed into a single-slot sub-function by minimizing the constraints that introduce the upper bound of the drift-penalty function.
[0011] In conjunction with the first aspect, in one implementation, the step of using a two-stage relaxation rounding algorithm to solve the single-slot sub-function and determine the target instance deployment matrix and target routing strategy for the target time slot includes: The LRID algorithm includes steps for obtaining a fractional deployment solution, obtaining an initial integer deployment solution, and adjusting the deployment to compensate for processing capacity loss. The PEROR algorithm includes a step of obtaining the initial optimal solution for the routing variables and a step of rounding the routing variables with the expected probability. Based on the steps for obtaining the score deployment solution, the constraints of the instance deployment incremental cost and the server running cost in the single time slot sub-function are relaxed and solved according to the preset request allocation strategy and the preset solver to obtain the score solution of the instance deployment decision variable. Based on the step of obtaining the initial integer deployment solution, the fractional solution is rounded down to obtain the initial integer deployment solution; Based on the step of adjusting deployment to compensate for processing capacity loss, the total processing capacity loss of the microservice is obtained according to the fractional solution, the initial integer deployment solution, and the definition of the processing capacity of the microservice. Obtain all microservices with impaired processing capabilities from the set of microservice types and the total processing capability loss of the microservices, and generate a set; Compensation is performed on the damaged microservices in the set to update the initial integer deployment solution, generate a suboptimal instance deployment matrix, and use the suboptimal instance deployment matrix as a relevant decision variable for service instance deployment; Based on the step of obtaining the initial optimal solution of the routing variables, the second constraint and the third constraint are relaxed and optimized according to the suboptimal instance deployment matrix and the preset solver to generate the fractional solution of the processing state variable and the fractional solution of the routing probability variable. Based on the probability expectation rounding routing variable step, the fractional solution of the processing state variable and the fractional solution of the routing probability variable are jointly rounded to generate a rounded microservice processing state binary variable, and the rounded microservice processing state binary variable is used as the microservice processing state binary variable. The suboptimal solution of the routing probability variable is transformed according to the target probability to generate a suboptimal solution, and the suboptimal solution is used as the request routing probability variable.
[0012] In conjunction with the first aspect, in one implementation, the process of creating, destroying, and scaling up service instances at edge nodes based on relevant decision variables deployed by the service instances includes: Based on the newly added microservice instance deployment requirements in the relevant decision variables for the service instance deployment, start container or virtual machine instances on the corresponding edge physical server nodes; Based on the reduced microservice instance deployment requirements from the relevant decision variables for the service instance deployment, stop and remove the corresponding redundant instances on the physical server nodes. Based on the changes in the number of microservice instances among the relevant decision variables for the deployment of the service instances, the number of instance replicas on the physical server nodes is dynamically adjusted to achieve dynamic adaptation of computing resources.
[0013] In conjunction with the first aspect, in one implementation, the process of completing request forwarding and path control based on the relevant decision variables of the request routing and the binary variables of the microservice processing status includes: Update the routing table of the service mesh controller according to the relevant decision variables of the request routing and the service mesh configuration protocol; Based on the binary variable of the microservice processing status of the request route, set the request processing scope and set the routing and forwarding path of the user request between different microservice instances; Within the target time slot, based on the relevant decision variables for request routing and the binary variables of microservice processing status, the routing and path control of user requests between different microservice instances are completed.
[0014] Secondly, embodiments of this application provide a route cost-aware orchestration apparatus, the route cost-aware orchestration apparatus comprising: The generation module is used to generate a first constraint, a second constraint, and a third constraint based on the basic attribute information of the edge cloud system. The first constraint is used to set the number of microservice instances, the second constraint is used to set the binary variable of the microservice processing status, and the third constraint is used to set the request routing probability variable. The basic attribute information of the edge cloud system includes the node configuration information, network link information, and resource usage information of the physical server. The construction module is used to construct a long-term optimization objective based on the network status information of the edge cloud system under the target time slot, the first constraint, the second constraint, and the third constraint, wherein the long-term optimization objective is constructed as a mixed integer nonlinear programming problem. The conversion module is used to convert the long-term optimization objective into a single-slot subfunction using a pre-set Lyapunov cost-aware long-term cooperative scheduling algorithm. The determination module is used to solve the single time slot sub-function using a two-stage relaxation rounding algorithm to determine the target instance deployment matrix and target routing strategy for the target time slot. The target instance deployment matrix includes relevant decision variables for service instance deployment, and the target routing strategy includes relevant decision variables for request routing and binary variables of microservice processing status. The two-stage relaxation rounding algorithm includes the LRID algorithm and the PEROR algorithm. The creation, destruction, and scaling adjustment module is used to complete the creation, destruction, and scaling adjustment of service instances on edge nodes based on the relevant decision variables deployed by the service instances. The forwarding and path control module is used to perform request forwarding and path control based on the relevant decision variables of the request routing and the binary variables of the microservice processing status.
[0015] Thirdly, embodiments of this application provide a route cost-aware orchestration device, which includes a processor, a memory, and a route cost-aware orchestration program stored in the memory and executable by the processor. When the route cost-aware orchestration program is executed by the processor, it implements the steps of the route cost-aware orchestration method described above.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a route cost-aware orchestration program, wherein when the route cost-aware orchestration program is executed by a processor, it implements the steps of the route cost-aware orchestration method as described above.
[0017] The beneficial effects of the technical solutions provided in this application include: Based on the acquired basic attribute information of the edge cloud system, first, second, and third constraints are generated. Based on the acquired network state information of the edge cloud system under the target time slot, a long-term optimization objective is constructed using the first, second, and third constraints. A pre-configured Lyapunov cost-aware long-term cooperative scheduling algorithm is used to convert the long-term optimization objective into a single-time-slot sub-function. A two-stage relaxation rounding algorithm is employed to solve the single-time-slot sub-function, determining the target instance deployment matrix and target routing strategy for the target time slot. Based on the relevant decision variables for service instance deployment, the creation, destruction, and scaling adjustments of service instances on edge nodes are completed. Based on the relevant decision variables for request routing and the binary variables of microservice processing status, request forwarding and path control are completed. This solves the technical problems of insufficient deployment and routing collaborative optimization, inaccurate multi-instance latency analysis, and difficulty in balancing long-term performance and cost budget in existing technologies. It achieves cost-aware orchestration of request routing and service instance deployment in a dynamic service mesh, achieving a multi-objective balance between time-averaged cost, latency constraints, and system performance, adapting to time-varying user requests and network environments. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the first embodiment of the routing cost-aware orchestration method of this application; Figure 2 This is a schematic diagram of the functional modules of an embodiment of the routing cost-aware orchestration device of this application; Figure 3 This is a schematic diagram of the hardware structure of the routing cost-aware orchestration device involved in the embodiments of this application. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0020] First, some of the technical terms used in this application will be explained to help those skilled in the art understand this application.
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0022] In a first aspect, embodiments of this application provide a routing cost-aware orchestration method.
[0023] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the routing cost-aware orchestration method of this application. Figure 1 As shown, the route cost-aware orchestration method includes: Step S10: Based on the obtained basic attribute information of the edge cloud system, generate a first constraint, a second constraint, and a third constraint. The first constraint is used to set the number of microservice instances, the second constraint is used to set the binary variable of microservice processing status, and the third constraint is used to set the request routing probability variable. The basic attribute information of the edge cloud system includes the node configuration information, network link information, and resource usage information of the physical server. As an example, obtain the nodes of each physical server in the edge cloud system and generate a node set. The system retrieves the attribute information of each node in the node set, including the number of available computing resource units (e.g., CPU cores) Cv, network bandwidth capacity Bv, and current remaining resource status. It then retrieves the network links between the nodes, generates a network link set L, and obtains the attribute information of each network link. The attribute information of each of the network links includes This represents the inherent communication latency between the nodes. This represents the maximum available bandwidth resource of the link. Based on the set of nodes... A set of network links L is used to generate an undirected graph K=(V,L). The available bandwidth of each network link in each time slot is collected periodically according to a preset schedule. Get the set of microservice types. The set of microservice types This includes published microservice classes and deployable microservice types. Each core can only instantiate one container, and each container can only host one microservice instance. The processing capacity of microservice m is obtained through offline / online load testing using service performance testing interfaces or service profiling programs. Service rate refers to the number of requests a single microservice instance can handle per unit of time. Its size is determined by the microservice's own business logic and computational complexity. When different types of microservices run on the same computing core, the corresponding processing capabilities are different, thus constructing an edge cloud multi-instance queuing network model.
[0024] Iterate through all microservice applications to be deployed in each time slot of the edge cloud system to generate a collection of microservice applications. Based on the aforementioned microservice application set Obtain the set of directed dependencies between each of the microservice applications. According to the aforementioned set of microservice applications The set of directed dependencies between the various microservice applications. Build a dynamic microservice call graph According to the dynamic microservice call graph The first, second, and third constraints are generated using the edge cloud multi-instance queuing network model.
[0025] Specifically, the step of generating a first constraint, a second constraint, and a third constraint based on the acquired basic attribute information of the edge cloud system includes: generating a first constraint based on the number of cores of each physical server node in the target time slot, wherein the first constraint is that the number of microservice instances is less than or equal to the number of cores of each physical server node in the corresponding target time slot; generating a second constraint based on the predecessor and successor microservice instances of the microservices on each physical server node in the target time slot, wherein the second constraint is that the predecessor microservice instance of the microservice processing state binary variable is greater than or equal to the successor microservice instance, and there is a dependency relationship between the successor microservice instance and the predecessor microservice instance; and generating a third constraint based on the routing probability of the request flow from the predecessor microservice instance to the successor microservice instance of the microservices on each physical server node in the target time slot, wherein the third constraint is that the sum of all path probabilities of the request routing probability variable is 1.
[0026] As an example, a first constraint is generated based on the number of cores of each physical server node in the target time slot, wherein the first constraint is the number of microservice instances. Less than or equal to the number of cores of each physical server node in the corresponding target time slot For example, defining the number of microservice instances. This characterizes the number of cores (i.e., the number of microservice instances) occupied by microservice m on physical server node v under time slot t, satisfying the constraint of the total number of cores on server node v, where the sum of the number of cores occupied by all microservices on this node does not exceed [a certain value]. Number of microservice instances The final decision variables related to service instance deployment are determined by the subsequent Linear Relaxed Instance Deployment (LRID) algorithm, and are used to directly adjust the number of microservice instances deployed on physical server node v.
[0027] Based on the obtained predecessor microservice instances of the microservices on each physical server node under the target time slot. and subsequent microservice instances Generate a second constraint, wherein the second constraint is a binary variable representing the microservice processing state. Precursor microservice instance Greater than or equal to the successor microservice instance And subsequent microservice instances and predecessor microservice instances There are dependencies between them. For example, defining a binary variable for microservice processing state. This is used to characterize whether the function of the corresponding microservice m under time slot t is processed on server node v:
[0028] When the number of instances of the corresponding microservice m on node v The value is 1 if there is a probability that a request route originates from this node; otherwise, the value is 0. This is the binary variable representing the microservice's processing state. The final decision variable related to request routing, whose specific value is determined by the online routing (PEROR) algorithm with subsequent probability expectation rounding, is used to determine the processing status of the microservice on the corresponding node, support request routing execution, and satisfy the following constraints:
[0029] Among them, if microservices and There are call dependencies, microservices Only in all its microservices Execution can only proceed after all requests have been fully processed. .
[0030] Based on the request flow msa(t) obtained under the target time slot, the predecessor microservice instances of the microservices on each physical server node are obtained. To subsequent microservice instances The routing probabilities between them are used to generate a third constraint, where the third constraint is the request routing probability variable. The sum of the probabilities of all paths is 1. For example, define a request routing probability variable. This is used to characterize the request flow msa(t) from the server. Previous generation microservice instance Routing to server Subsequent microservice instances The probability satisfies the routing constraint: among microservices with call dependencies, the sum of the probabilities of all possible routing paths is 1; this request routing probability variable This is the final decision variable related to request routing, used to directly control the selection of routing paths for request flows between microservice instances. This request routing probability variable... The specific value is determined by the online routing (PEROR) algorithm, which uses subsequent probability expectation rounding to directly control the routing path selection of request flows between microservice instances.
[0031] Step S20: Based on the network state information of the edge cloud system under the target time slot, the first constraint, the second constraint, and the third constraint, a long-term optimization objective is constructed, wherein the long-term optimization objective is constructed as a mixed integer nonlinear programming problem; As an example, based on the obtained network state information of the target time slot, service instance deployment-related decision variables, and request routing-related decision variables, performance indicators and constraint expressions such as latency, throughput, service request processing rate, and resource allocation fairness under each time slot are first constructed. Then, based on the performance indicators and constraint expressions, single-time slot performance terms for long-term optimization are formed, thus providing a foundation for subsequently constructing long-term optimization goals. The service instance deployment-related decision variables are the first constraint, and the request routing-related decision variables are the second and third constraints.
[0032] Specifically, based on the obtained request routing probability, request arrival rate, microservice dependencies and processing status, the first constraint, the second constraint, and the third constraint, constraints are generated for the total request arrival rate, real-time service intensity, steady-state probability, processing and queuing latency, data transmission latency, and average path latency of the node microservices. Based on the average path latency, request flow, and microservice data size, constraints are generated for the expected average response latency, overall system average response latency, system throughput, and service request processing rate. Based on the Jain fairness index and considering node computing resource utilization and link bandwidth utilization, constraints are generated for network resource allocation fairness and system comprehensiveness. Based on node activation cost, instance migration and expansion cost, and communication bandwidth cost, constraints are generated for server operating cost, instance deployment incremental cost, communication overhead cost, total orchestration cost, and time average cost budget. Based on the number of node cores and available network link bandwidth, computing resource constraints and bandwidth resource constraints are generated. Based on the time average cost budget constraints, computing resource constraints, bandwidth resource constraints, and system comprehensiveness constraints, the long-term optimization objective is constructed.
[0033] As an example, based on the probability of requests being routed from the controller to the corresponding microservice in the edge cloud system under the target time slot, the real-time average request arrival rate of each microservice, the set of microservice types required by each application, the set of directed dependencies between microservices, the real-time average request arrival rate of the predecessor microservice instance of each microservice, the binary variable of the processing status of the predecessor microservice instance of each microservice, the second constraint, and the third constraint, constraints on the total request arrival rate of microservices on each physical server node under the target time slot are generated. Based on the first constraint and the constraints on the total request arrival rate of microservices on each physical server node under the target time slot, constraints on the real-time service strength of microservices on each physical server node under the target time slot are generated. Based on the set of microservice types required by each application and the set of physical routing paths for each request on each physical server node under the target time slot, the set of nodes traversed by all paths on each physical server node under the target time slot is obtained; a fixed construction latency is obtained, wherein the fixed construction latency includes the routing path construction time. Based on the first constraint, the constraint of the total request arrival rate of microservices on each physical server node under the target time slot, and the constraint of the processing capacity of microservices on each physical server node under the target time slot, constraints are generated for the steady-state probability of microservices on each physical server node under the target time slot. Based on the first constraint, the constraint of the real-time service strength of microservices on each physical server node under the target time slot, and the constraint of the steady-state probability of microservices on each physical server node under the target time slot, constraints are generated for the steady-state probability that all service instances of microservices on each physical server node under the target time slot are occupied and user requests need to enter the queue to wait. Based on the constraints of the total request arrival rate of microservices on each physical server node under the target time slot, the constraint of the real-time service strength of microservices on each physical server node under the target time slot, the constraint of the steady-state probability that all service instances of microservices on each physical server node under the target time slot are occupied and user requests need to enter the queue to wait, and the constraint of the processing capacity of microservices on each physical server node under the target time slot, constraints for processing and queuing latency are generated. The inherent communication latency is obtained, including the fixed communication latency between physical server nodes under the target time slot. Based on the available bandwidth of each network link under the target time slot, the set of microservice applications, the predecessor and successor microservice instances of each microservice on each physical server node under the target time slot, the request routing probability variable of the third constraint, the average data size of the microservice application under unit request arrival rate, the real-time average request arrival rate of each microservice's predecessor microservice instance, the binary variable of the processing status of each microservice's predecessor microservice instance, and the binary variable of the processing status of each microservice's successor microservice instance, constraints on data transmission latency are generated. Based on the fixed construction latency and the second constraint, constraints on the average path latency are generated.Based on the probability of requests being routed from the controller to the corresponding microservice in the edge cloud system under the target time slot, the second constraint, and the third constraint, constraints on the path selection probability of each node are generated. Constraints on the expected average response latency of the application are generated based on the constraints on the average path latency and the path selection probability of each node. Constraints on the overall average response latency of the system are generated based on the constraints on the expected average response latency of the application and the request flow under the target time slot. Constraints on system throughput are generated based on the constraints on the request flow under the target time slot, the average data size of the microservice application under the unit request arrival rate, the real-time average request arrival rate of each microservice, and the overall average response latency of the system. Constraints on service request processing rate are generated based on the request flow under the target time slot, the average data size of the microservice application under the unit request arrival rate, and the binary index. Based on the obtained Jain fairness index, the network resource allocation fairness is calculated by combining the node resource utilization rate and link bandwidth utilization rate. Comprehensive system constraints are generated based on the constraints on system throughput, service request processing rate, and network resource allocation fairness. Based on the obtained node activation unit cost, binary values, and containerized instances of microservices on each physical server node, constraints are generated for server operating costs. Based on the obtained migration / scaling costs of individual microservice instances on each physical server node, migration cost variables, and the first constraint, constraints are generated for incremental instance deployment costs. Based on the obtained unit communication bandwidth cost, remaining bandwidth resources of the next time slot link, and remaining bandwidth resources of the target time slot link, constraints are generated for communication overhead costs. Based on the constraints for server operating costs, incremental instance deployment costs, and the incremental instance deployment costs, constraints are generated for total orchestration costs. Based on the constraints for total orchestration costs and a preset budget threshold, time-averaged cost budget constraints are generated. Based on the first constraint and the number of cores on each physical server node in the target time slot, computational resource constraints are generated. Based on the obtained available bandwidth of each network link in the target time slot, bandwidth resource constraints are generated. Based on the time-averaged cost budget constraints, computational resource constraints, bandwidth resource constraints, and system comprehensive constraints, a long-term optimization objective is constructed.
[0034] As an example, based on the probability that a request in the edge cloud system under the target time slot is routed from the controller to the corresponding microservice. Real-time average request delivery rate of each microservice The set of microservice types required by each application is as follows: The set of directed dependencies between various microservices Real-time average request arrival rate of each microservice's predecessor microservice instance Examples of predecessor microservices for each microservice Processing state binary variables The second and third constraints generate the constraints for the total request arrival rate of microservices on each physical server node under the target time slot. The constraints for the total request arrival rate of microservices on each physical server node under the target time slot are as follows: .
[0035] For example, by sensing node service status and link load information in real time, multi-source input traffic is aggregated and processed to establish a node service strength calculation model. Since microservices support reuse and multi-instance deployment, the M / M / C queuing network theory is used to analyze service interaction characteristics, and traffic merging is performed based on Burke's theorem and the principle of linear additivity of Poisson flow.
[0036] Based on the first constraint and the constraint of the total request arrival rate of microservices on each physical server node under the target time slot, constraints on the real-time service strength of microservices on each physical server node under the target time slot are generated. Specifically, the constraints on the real-time service strength of microservices on each physical server node under the target time slot are as follows: To ensure service strength is less than 1, avoid queue overflow and guarantee service stability.
[0037] Based on the set of microservice types required by each application on each physical server node under the target time slot. and the set of physical routing paths for each request Get all path traversal nodes on each physical server node under the target time slot and combine them. For example, the set of microservice applications to be processed in each time slot t is msa(t), and the set of physical routing paths for each request is... The set of nodes traversed by the nth path is .
[0038] Get fixed build latency The fixed construction latency includes the route path construction time and the microservice analysis time. According to the first constraint... Constraints on the total request arrival rate of microservices on each physical server node under the target time slot. The processing capacity of microservices on each physical server node under the target time slot Generate the steady-state probabilities of microservices on each physical server node in the target time slot. The constraints include the steady-state probabilities of microservices on each physical server node under the target time slot. Constraints According to the first constraint condition Constraints on the real-time service strength of microservices on each physical server node under the target time slot. Steady-state probabilities of microservices on each physical server node under the target time slot The constraints are: the steady-state probability that all service instances of microservices on each physical server node are occupied under the target time slot, and user requests need to enter the queue to wait. The constraints include the steady-state probability that all service instances of microservices on each physical server node are occupied under the target time slot and that user requests need to enter the queue to wait. Constraints .
[0039] Based on the constraint of the total request arrival rate of microservices on each physical server node under the target time slot. Constraints on the real-time service strength of microservices on each physical server node under the target time slot. The steady-state probability that all service instances of microservices on each physical server node are occupied under the target time slot and that user requests need to enter the queue to wait. The constraints and the processing capacity of microservices on each physical server node under the target time slot. Generation processing and queuing delay The constraints include processing and queuing delays. The constraints are For example, using the M / M / C queuing model, the steady-state probability of microservices on each physical server node under the target time slot is calculated. Constraints The steady-state probability that all service instances of microservices on each physical server node are occupied under the target time slot and that user requests need to enter the queue to wait. Constraints and processing queuing delay The constraints are .
[0040] Obtaining inherent communication latency The inherent communication latency includes the fixed communication latency between each physical server node in the target time slot, for example, the server node... vi and vj Fixed communication delay between nodes. Based on the available bandwidth of each network link under the target time slot. Microservice application collection Precursor microservice instances of microservices on each physical server node under the target time slot. and subsequent microservice instances The third constraint is the request routing probability variable. Average data size of microservice applications msa(t) under unit request arrival rate Real-time average request arrival rate of each microservice's predecessor microservice instance Examples of predecessor microservices for each microservice Processing state binary variables and subsequent microservice instances of each microservice Processing state binary variables Generate data transmission latency The constraints include data transmission delay. The constraints are: .
[0041] Based on fixed construction delay Second constraint Generate average path delay The constraints include the average path delay. for: .
[0042] Based on the probability of requests in the edge cloud system under the target time slot being routed from the controller to the corresponding microservice. Second constraint and third constraint Generate the path selection probability for each node. The constraints include the path selection probability of each node. The constraints are: .
[0043] Based on average path delay The constraints and path selection probabilities of each node. Constraints, generate application msa ( t ) expected average response time The constraints, in which the application msa ( t The constraint condition for the expected average response delay is: ( (Maximum tolerable latency). (Depending on the application) msa ( t ) expected average response time Given the constraints and target time slot, the request flow msa(t) is used to generate the overall average response delay of the system. The constraints include the overall average response delay of the system. The constraints are The overall average response latency of the system It is used to evaluate system performance.
[0044] The collaborative orchestration strategy centers on "multi-objective balancing," with latency, service intensity, and reliability as optimization goals, constructing an optimization objective system for online system orchestration. This is based on the average data size of the request flow msa(t) under the target time slot and the average data size of the microservice application msa(t) under the unit request arrival rate. Real-time average request delivery rate of each microservice and the overall average response delay of the system Constraints, generating system throughput ST ( t Constraints, system throughput ST ( t ): The average amount of data that the system can process per unit of time.
[0045] Based on the request flow msa(t) under the target time slot and the average data size of the microservice application msa(t) under the unit request arrival rate. and binary indicators ∈{0,1}, generate service request processing rate The constraints include the service request processing rate. The constraints are , And when the service call order is not disordered, Take 1, otherwise Set to 0, service request processing rate Time slot t The percentage of applications that successfully processed requests.
[0046] Based on the obtained Jain fairness index, the utilization rate of node computing resources is considered. and link bandwidth utilization Calculate the fairness of network resource allocation ,in, and These are the weighting coefficients, and + =1.
[0047] Based on system throughput ST ( t Constraints and service request processing rate Constraints and fairness of network resource allocation Generate a comprehensive system The constraints, among which, system comprehensiveness Constraints .
[0048] The online request routing cost-aware orchestration problem is formulated as a mixed-integer nonlinear programming (MINLP) problem, aiming to minimize the average time cost and maximize the overall system performance. Server operating costs, instance deployment incremental costs, and communication overhead costs are obtained, and time-average cost budget constraints, computational resource constraints, and bandwidth resource constraints are established. Based on the obtained node activation unit cost... , For binary values and nodes v Microservices exist on it m Containerized instances generate server operating costs The constraints include server operating costs. Constraints Determine the node v Does microservice exist? m If it is a containerized instance, then If it is 1, then... It is 0.
[0049] Based on the obtained microservices m At the node v Migration / scaling costs of a single instance Migration cost variables ∈{0,1} and the first constraint condition Incremental cost of instance deployment The constraints include the incremental cost of instance deployment. Constraints , ∈{0,1} represents the migration cost variable, which characterizes the time slot. t microservices m From node Migrate to Migration operations are performed before scaling operations, and migration does not require re-containing instances, making it less costly than scaling.
[0050] Based on the obtained unit communication bandwidth cost Time slot t 1. Remaining bandwidth resources of the downlink time slot t Remaining bandwidth resources of the downlink Generate communication overhead costs The constraints include communication overhead costs. The constraints include .
[0051] Based on server operating costs Constraints and incremental costs of instance deployment Constraints and incremental costs of instance deployment Given the constraints, generate the total arrangement cost. Constraints = + + .
[0052] The system also needs to meet the constraints of total orchestration cost and time-average cost budget, as well as time-average computing resource constraints and bandwidth resource constraints. To unify the constraint form, define... For time slots t Next node v The arrangement cost or resource consumption, The corresponding time average threshold is determined based on the constraints of total programming cost. Constraints and preset budget thresholds Generate time average cost budget constraint .
[0053] According to the first constraint condition The number of cores of each physical server node under the time slot Generate computing resource constraints .
[0054] Based on the available bandwidth of each of the network links in the target time slot Generate bandwidth resource constraints .
[0055] Based on time average cost budget constraints Computational resource constraints Bandwidth resource constraints and system integration Given the constraints, construct the optimization objective. .
[0056] The optimization goal of this step is to maximize the overall system performance. ( ST ( t ) represents the system throughput. For service request processing rate, To ensure fairness in network resource allocation, and considering the aforementioned cost structure and constraints, the long-run orchestration optimization objective can be formulated as a mixed-integer nonlinear programming (MINLP) problem: .
[0057] Step S30: By using a pre-configured Lyapunov cost-aware long-term cooperative scheduling algorithm, the long-term optimization objective is converted into a single-slot sub-function; As an example, each physical server node in the target time slot is set up as a virtual queue. (t), where the virtual queue (t) represents the cumulative over-deployment amount up to the target time slot. It is based on the virtual queues under the target time slot. (t) Orchestration cost of each physical server node under the target time slot and the time average threshold of each physical server node under the target time slot. Generate various virtual queues The constraints of the dynamic update equation of (t), wherein each of the virtual queues The constraints of the dynamic update equation for (t) are: Each of the aforementioned virtual queues The initial accumulation of (t) is set as follows: =0. Based on the obtained quadratic Lyapunov function. and various virtual queues The constraints of the dynamic update equation of (t) are used to generate the constraints of the Lyapunov drift ΔL(t), wherein the constraints of the Lyapunov drift ΔL(t) are Lyapunov drift. For example, by introducing Lyapunov drift ΔL(t), the congestion changes of virtual queues can be controlled to ensure that the long-term orchestration cost and resource utilization of server nodes do not exceed the constraint threshold, thus providing a stable premise for long-term performance optimization. Based on the constraints of Lyapunov drift ΔL(t) and the obtained non-negative balance parameters... and system integration The constraints are then used to generate constraints that introduce a drift-penalty function, where the constraint introducing the drift-penalty function is ΔL(t). To balance queue stability and system performance, and to achieve long-term maximization... To optimize this, a drift-penalty function ΔL(t) is introduced. Based on each virtual queue in the target time slot. (t) Orchestration cost of each physical server node under the target time slot The time average threshold for each physical server node under the target time slot. Non-negative equilibrium parameters nonnegative constants The upper bound of the constraint introducing the drift-penalty function is applied to generate the constraint condition introducing the upper bound of the drift-penalty function. , It is a non-negative constant because the drift-penalty function contains future random terms. It cannot be minimized directly. Therefore, by minimizing this upper bound, the drift-penalty function is minimized. By minimizing the constraints that introduce the upper bound of the drift-penalty function, the optimization objective is... Transform into a single-slot subfunction .
[0058] The algorithm possesses the following performance characteristics: First, when the average rate of the virtual queue is stable, it can satisfy the corresponding time average cost and resource constraints; second, the algorithm returns the time average expectation and optimal solution of the objective function. The maximum performance gap is ,Right now Third, the existence of a non-negative Lagrange multiplier vector Ψ ensures the convergence of the drift-penalty optimization, and the algorithm provides an O(δ) approximation ratio with a convergence time of O(1 / δ²) (where δ = 1 / V); fourth... The corresponding average virtual queue is strongly stable, and the time-averaged backlog of all virtual queues has an upper bound, which can constrain the growth rate of dynamic orchestration costs; fifth, the solution to the single-slot subproblem of the LLCO algorithm. and the optimal solution The performance gap has a clear upper bound.
[0059] After solving the single-slot subproblem in each slot and obtaining the instance deployment decision, joint request routing decision, and processing state variables, the virtual queue state is updated based on the orchestration cost of the current slot, and the next slot subproblem is solved.
[0060] Step S40: Solve the single time slot sub-function using a two-stage relaxation rounding algorithm to determine the target instance deployment matrix and target routing strategy for the target time slot. The target instance deployment matrix includes relevant decision variables for service instance deployment, and the target routing strategy includes relevant decision variables for request routing and binary variables of microservice processing status. The two-stage relaxation rounding algorithm includes the LRID algorithm and the PEROR algorithm.
[0061] As an example, the LRID algorithm includes steps to obtain a fractional deployment solution, steps to obtain an initial integer deployment solution, and steps to adjust the deployment to compensate for processing capacity loss; the PEROR algorithm includes steps to obtain an initial optimal solution for routing variables and steps to round the routing variables with probability expectations.
[0062] Based on the score acquisition and solution deployment steps, the single-slot sub-functions are allocated according to the preset request allocation strategy and preset solver. Incremental cost of instance deployment Constraints and server operating costs The constraints are relaxed and solved to obtain fractional solutions for the instance deployment decision variables. Based on the steps for obtaining the initial integer deployment solution, the fractional solution is... Perform a floor operation to obtain the initial integer deployment solution. Based on the steps of adjusting deployment to compensate for processing capacity loss, according to the fractional solution Initial integer deployment solution and the processing capabilities of acquiring microservices are defined as Obtain the total processing capacity loss of microservices ,in, Get the set of microservice types. All microservices with impaired capacity and the total processing capacity loss of microservices. Generate a set , where the set Based on the total processing capacity loss of the microservices Sort the sets by size. Compensation is performed on damaged microservices to update the initial integer deployment solution. Generate a suboptimal instance deployment matrix Among them, the suboptimal instance deployment matrix As a relevant decision variable for service instance deployment.
[0063] For example, the first stage of the Linear Relaxed Instance Deployment (LRID) algorithm is performed—obtaining a fractional deployment solution. This is relevant for the single-slot subproblem. Server operating costs involved in instance deployment decisions and incremental costs of instance deployment The present invention addresses the nonlinear expression of the problem by linearizing and relaxing it, temporarily changing the deployment decision variables from integers to continuous variables, thus forming a linear relaxation problem that can be handled by an optimization solver. The round-robin routing strategy is a preset request allocation strategy that distributes arriving requests sequentially to available service instances in a round-robin fashion, ensuring a relatively balanced request load across instances. Under this routing strategy, an optimization solver is used to solve the linear relaxation problem, obtaining fractional solutions for the instance deployment decision variables. Note: If the process is iterative optimization, this step iteratively solves the routing strategy output by the previous round of the PEROR algorithm. The deployment solution ensures coordinated optimization of deployment and routing.
[0064] The second stage of the LRID algorithm is performed by obtaining the initial integer deployment solution and quantizing the loss against the optimal score deployment solution. Perform a floor operation to obtain the initial integer deployment solution. The total processing capacity loss of microservice m caused by the rounding operation. This is used to quantify the decline in processing capacity. Specifically, for a microservice m deployed on server v, the processing capacity loss of a single node is calculated as follows: After traversing all score deployment matrices, the total loss is calculated cumulatively. .
[0065] The third phase of executing the LRID algorithm—adjusting deployment to compensate for processing capacity loss—includes microservices with impaired processing capacity into the set. , and according to Sort the microservices in descending order of size, and prioritize processing those with higher losses. LRID algorithm reference metrics Prioritize selecting systems with sufficient resources that can improve system performance. The server v that brings the greatest gain. If the current remaining resource status of server node v meets the computing and bandwidth resource requirements for deploying a microservice m instance, then update. and from Deducting unit instance processing capacity ;when When the value is ≤0, it indicates that the processing capacity gap of microservice m has been filled, and it can be removed from... Remove from the list. Finally, the LRID algorithm outputs a suboptimal instance deployment matrix. .
[0066] Based on the steps of obtaining the initial optimal solution for routing variables, and the deployment matrix of suboptimal instances... and the preset solver for the second constraint condition and third constraint Relaxation and optimization processes are performed to generate fractional solutions for the state variables. And the fractional solution of the probability variable of routing Based on the probability expectation rounding routing variable step, the fractional solution of the processing state variable is obtained. And the fractional solution of the probability variable of routing Perform combined rounding to generate rounded binary variables representing the microservice processing status. Among them, the rounded binary variable representing the microservice processing status As a binary variable representing the microservice processing state ;Score the routing probability variables According to probability Perform the transformation to generate a suboptimal solution. Among them, the suboptimal solution As a request routing probability variable .
[0067] For example, the first stage of the PEROR (Performance Probability Expectation Rounding) online routing algorithm—obtaining the initial optimal solution for routing variables based on the deployment matrix generated by the LRID algorithm. Processing binary state variables Perform relaxation. Utilize the optimization solver to obtain the optimal fractional solution for the joint routing variables, including: processing the fractional solution for the state variables. Fractional solutions of routing probability variables .
[0068] The second stage of executing the PEROR algorithm—rounding routing variables based on probability expectation due to the processing of state variables. The value must be either 0 or 1; the PEROR algorithm uses its fractional solution. To determine the probability, set the state variables to integers. (That is, determining whether the functionality of microservice m is processed on server v). Definition For rounding The set of servers, representing the application under time slot t. msa ( t The microservice m actually processes the nodes. The routing probability variable is decomposed into fractional solutions. According to probability Convert to the final suboptimal solution Output suboptimal request routing strategy. and The target instance deployment matrix and target routing strategy are determined, and the suboptimal solution at the end of the iteration is identified as the target decision variable for the current time slot t. Target instance deployment matrix: = ; Destination routing strategy: = ; Target processing state variables: = .
[0069] Step S50: Based on the relevant decision variables deployed by the service instance, complete the creation, destruction, and scaling adjustment of service instances on the edge node; Exemplary, based on the obtained The newly added microservice instance deployment requirement involves starting container or virtual machine instances on the corresponding edge physical server node v. Based on the obtained... To reduce the deployment requirements of microservice instances, stop and remove redundant instances on physical server node v. Based on the obtained... For microservice instances with varying numbers, the number of instance replicas on physical server node v is dynamically adjusted to achieve dynamic adaptation of computing resources. For example, a target instance deployment matrix based on a defined current time slot t. The system executes service instance deployment-related decision variables through its built-in instance scheduling interface. Specific operations include: Instance creation: For The newly added microservice instance deployment requirement is to start a container or virtual machine instance on the corresponding edge physical server node v.
[0070] Instance destruction: For To reduce the need for microservice instance deployment, stop and remove the corresponding redundant instances on node v.
[0071] Capacity expansion and reduction adjustment: For For microservice instances with varying numbers of replicas, the number of instance replicas on node v is dynamically adjusted to achieve dynamic adaptation of computing resources. Through the above operations, the physical state changes of microservice instances on edge physical server nodes are completed, ensuring consistency with optimization decisions.
[0072] Step S60: Based on the relevant decision variables of the request routing and the binary variables of the microservice processing status, complete the request forwarding and path control.
[0073] Exemplary decision variables related to request routing In accordance with the service mesh configuration protocol, update the routing table of the service mesh controller. Based on the microservice processing state binary variables of the request route. Define the request processing scope and set the routing and forwarding path for user requests across different microservice instances. Within the target time slot, based on the relevant decision variables for request routing... and microservice processing state binary variables This enables routing and path control of user requests across different microservice instances. For example, it determines the target routing strategy for the current time slot t. and handling state variables The system executes request routing-related decision variables through its built-in routing forwarding interface. Specific operations include: configuring routing rules based on routing probabilities. In accordance with the service mesh configuration protocol, update the routing table of the service mesh controller (such as Istio, Envoy, etc.). Path control: based on processing state variables. Define the request processing scope and set the routing and forwarding paths for user requests between different microservice instances. Request forwarding: Within time slot t, based on the configured routing rules, complete the routing and forwarding of user requests between different microservice instances and control the path to ensure smooth request processing.
[0074] During or at the end of the current time slot t, the system monitoring module collects actual operational status data. This includes calculating the actual costs incurred within the time slot due to instance creation, destruction, resource consumption, and data transmission; recording the actual computing resource utilization, bandwidth consumption, and energy consumption of each server node v; and recording actual request processing latency, throughput, and packet loss rate for subsequent model parameter adjustments.
[0075] Based on the actual orchestration cost of the current time slot and the preset time average threshold, the virtual queue backlog status of each server node is updated according to the virtual queue dynamic update equation. This aims to quantify the deviation of the current time slot cost from the long-term budget and accumulate this deviation in the queue. Furthermore, the updated virtual queue state will be used to construct the optimization input for the next time slot. This serves as the input parameter for constructing the optimization objective for the next time slot t+1. Specifically, in the objective function of the single-slot subproblem of the next time slot, a new... Replace the original (t), thereby changing the optimization weights for the next time slot. If the cost of the current time slot exceeds the limit ( If the current time slot has a cost surplus (increases), the next time slot will be more inclined to reduce costs; if the current time slot has a cost surplus (increases), the next time slot will be more inclined to reduce costs. (Reduce), the next time slot can be more inclined to improve performance.
[0076] In this embodiment, a first constraint, a second constraint, and a third constraint are generated based on the acquired basic attribute information of the edge cloud system. A long-term optimization objective is constructed based on the acquired network state information of the edge cloud system under the target time slot, along with the first, second, and third constraints. The long-term optimization objective is converted into a single-time slot sub-function using a pre-set Lyapunov cost-aware long-term cooperative scheduling algorithm. A two-stage relaxation rounding algorithm is used to solve the single-time slot sub-function, determining the target instance deployment matrix and target routing strategy for the target time slot. Service instance creation, destruction, and scaling adjustments for edge nodes are completed based on the relevant decision variables of the service instance deployment. Request forwarding and path control are completed based on the relevant decision variables of request routing and the binary variables of the microservice processing status. This solves the technical problems of insufficient deployment and routing collaborative optimization, inaccurate multi-instance latency analysis, and difficulty in balancing long-term performance and cost budget in existing technologies. It achieves cost-aware orchestration of request routing and service instance deployment in a dynamic service mesh, achieving a multi-objective balance between time-averaged cost, latency constraints, and system performance, adapting to time-varying user requests and network environments.
[0077] Secondly, embodiments of this application also provide a routing cost-aware orchestration apparatus.
[0078] In one embodiment, reference is made to Figure 2 , Figure 2 This is a functional module diagram of an embodiment of the routing cost-aware orchestration device of this application. Figure 2 As shown, the route cost-aware orchestration device includes: The generation module 10 is used to generate a first constraint, a second constraint, and a third constraint based on the acquired basic attribute information of the edge cloud system. The first constraint is used to set the number of microservice instances, the second constraint is used to set the binary variable of microservice processing status, and the third constraint is used to set the request routing probability variable. The basic attribute information of the edge cloud system includes the node configuration information, network link information, and resource usage information of the physical server. The construction module 20 is used to construct a long-term optimization objective based on the network status information of the edge cloud system under the target time slot, the first constraint, the second constraint, and the third constraint, wherein the long-term optimization objective is constructed as a mixed integer nonlinear programming problem. The conversion module 30 is used to convert the long-term optimization objective into a single-slot subfunction using a pre-set Lyapunov cost-aware long-term cooperative scheduling algorithm. The determination module 40 is used to solve the single time slot sub-function using a two-stage relaxation rounding algorithm to determine the target instance deployment matrix and target routing strategy for the target time slot. The target instance deployment matrix includes relevant decision variables for service instance deployment, and the target routing strategy includes relevant decision variables for request routing and binary variables for microservice processing status. The two-stage relaxation rounding algorithm includes the LRID algorithm and the PEROR algorithm. The creation, destruction, and scaling adjustment module 50 is used to complete the creation, destruction, and scaling adjustment of service instances on edge nodes based on the relevant decision variables deployed by the service instances. The forwarding and path control module 60 is used to complete request forwarding and path control based on the relevant decision variables of the request routing and the binary variables of the microservice processing status.
[0079] Furthermore, in one embodiment, the generation module 10 is used to: Based on the number of cores of each physical server node under the target time slot, a first constraint condition is generated, wherein the first constraint condition is that the number of microservice instances is less than or equal to the number of cores of each physical server node under the corresponding target time slot. Based on the acquisition of the predecessor microservice instance and successor microservice instance of the microservice on each physical server node under the target time slot, a second constraint condition is generated, wherein the second constraint condition is that the predecessor microservice instance of the microservice processing state binary variable is greater than or equal to the successor microservice instance, and there is a dependency relationship between the successor microservice instance and the predecessor microservice instance. Based on the routing probabilities of the request flow from the predecessor microservice instance to the successor microservice instance on each physical server node under the target time slot, a third constraint is generated, wherein the third constraint is that the sum of all path probabilities of the request routing probability variable is 1.
[0080] Furthermore, in one embodiment, the construction module 20 is used for: Based on the obtained request routing probability, request arrival rate, microservice dependencies and processing status, the first constraint, the second constraint and the third constraint, the constraints of total request arrival rate, real-time service intensity, steady-state probability, processing and queuing latency, data transmission latency and average path latency of the node microservice are generated. Based on the average latency of the path, the request flow, and the microservice data size, constraints are generated for the expected average response latency, the overall system average response latency, the system throughput, and the service request processing rate. Based on the Jain fairness index, the resource utilization rate and link bandwidth utilization rate of the nodes are calculated to generate constraints on the fairness of network resource allocation and the overall system. Based on node activation cost, instance migration and expansion cost, and communication bandwidth cost, generate constraints for server operating cost, instance deployment incremental cost, communication overhead cost, total orchestration cost, and time average cost budget. Based on the number of node cores and the available bandwidth of network links, generate computing resource constraints and bandwidth resource constraints. Based on the constraints of time average cost budgeting, computing resource constraints, bandwidth resource constraints, and system comprehensiveness, the long-term optimization objective is constructed.
[0081] Furthermore, in one embodiment, the conversion module 30 is used for: Each physical server node under the target time slot is set as a virtual queue, wherein the virtual queue is used to represent the cumulative over-deployment amount up to the target time slot; Based on the orchestration cost of each virtual queue under the target time slot, the time average threshold of each physical server node under the target time slot, and the time average threshold of each physical server node under the target time slot, the constraints of the dynamic update equation of each virtual queue are generated. Based on the obtained quadratic Lyapunov function and the constraints of the dynamic update equations of each virtual queue, the constraints of Lyapunov drift are generated. Based on the Lyapunov drift constraints, the obtained non-negative equilibrium parameters, and the comprehensive system constraints, constraints incorporating a drift-penalty function are generated. ; Based on the orchestration cost of each virtual queue and each physical server node under the target time slot, the time average threshold, non-negative balance parameter, and non-negative constant of each physical server node under the target time slot, an upper bound is imposed on the constraint condition for introducing the drift-penalty function, thereby generating the constraint condition for introducing the upper bound of the drift-penalty function. The long-term optimization objective is transformed into a single-slot sub-function by minimizing the constraints that introduce the upper bound of the drift-penalty function.
[0082] Furthermore, in one embodiment, the determining module 40 is used to: The LRID algorithm includes steps for obtaining a fractional deployment solution, obtaining an initial integer deployment solution, and adjusting the deployment to compensate for processing capacity loss. The PEROR algorithm includes a step of obtaining the initial optimal solution for the routing variables and a step of rounding the routing variables with the expected probability. Based on the steps for obtaining the score deployment solution, the constraints of the instance deployment incremental cost and the server running cost in the single time slot sub-function are relaxed and solved according to the preset request allocation strategy and the preset solver to obtain the score solution of the instance deployment decision variable. Based on the step of obtaining the initial integer deployment solution, the fractional solution is rounded down to obtain the initial integer deployment solution; Based on the step of adjusting deployment to compensate for processing capacity loss, the total processing capacity loss of the microservice is obtained according to the fractional solution, the initial integer deployment solution, and the definition of the processing capacity of the microservice. Obtain all microservices with impaired processing capabilities from the set of microservice types and the total processing capability loss of the microservices, and generate a set; Compensation is performed on the damaged microservices in the set to update the initial integer deployment solution, generate a suboptimal instance deployment matrix, and use the suboptimal instance deployment matrix as a relevant decision variable for service instance deployment; Based on the step of obtaining the initial optimal solution of the routing variables, the second constraint and the third constraint are relaxed and optimized according to the suboptimal instance deployment matrix and the preset solver to generate the fractional solution of the processing state variable and the fractional solution of the routing probability variable. Based on the probability expectation rounding routing variable step, the fractional solution of the processing state variable and the fractional solution of the routing probability variable are jointly rounded to generate a rounded microservice processing state binary variable, and the rounded microservice processing state binary variable is used as the microservice processing state binary variable. The suboptimal solution of the routing probability variable is transformed according to the target probability to generate a suboptimal solution, and the suboptimal solution is used as the request routing probability variable.
[0083] Furthermore, in one embodiment, the creation, destruction, and expansion / adjustment module 50 is used for: Based on the newly added microservice instance deployment requirements in the relevant decision variables for the service instance deployment, start container or virtual machine instances on the corresponding edge physical server nodes; Based on the reduced microservice instance deployment requirements from the relevant decision variables for the service instance deployment, stop and remove the corresponding redundant instances on the physical server nodes. Based on the changes in the number of microservice instances among the relevant decision variables for the deployment of the service instances, the number of instance replicas on the physical server nodes is dynamically adjusted to achieve dynamic adaptation of computing resources.
[0084] Furthermore, in one embodiment, the forwarding and path control module 60 is used for: Update the routing table of the service mesh controller according to the relevant decision variables of the request routing and the service mesh configuration protocol; Based on the binary variable of the microservice processing status of the request route, set the request processing scope and set the routing and forwarding path of the user request between different microservice instances; Within the target time slot, based on the relevant decision variables for request routing and the binary variables of microservice processing status, the routing and path control of user requests between different microservice instances are completed.
[0085] The functions of each module in the above-mentioned route cost-aware orchestration device correspond to the steps in the above-mentioned route cost-aware orchestration method embodiment, and their functions and implementation processes will not be described in detail here.
[0086] Thirdly, embodiments of this application provide a routing cost-aware orchestration device, which can be a personal computer (PC), laptop computer, server, or other device with data processing capabilities.
[0087] Reference Figure 3 , Figure 3 This is a schematic diagram of the hardware structure of the routing cost-aware orchestration device involved in the embodiments of this application. In the embodiments of this application, the routing cost-aware orchestration device may include a processor, a memory, a communication interface, and a communication bus.
[0088] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0089] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting devices within the routing cost-aware orchestration device, as well as interfaces used for interconnecting the routing cost-aware orchestration device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0090] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0091] The processor can be a general-purpose processor, which can call a route cost-aware orchestration program stored in memory and execute the route cost-aware orchestration method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the route cost-aware orchestration program is called can be referred to in various embodiments of the route cost-aware orchestration method of this application, and will not be repeated here.
[0092] Those skilled in the art will understand that Figure 3 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0093] Fourthly, embodiments of this application also provide a computer-readable storage medium.
[0094] The present application provides a computer-readable storage medium storing a route cost-aware orchestration program, wherein when the route cost-aware orchestration program is executed by a processor, it implements the steps of the route cost-aware orchestration method as described above.
[0095] The method implemented when the route cost-aware orchestration program is executed can be referred to in various embodiments of the route cost-aware orchestration method of this application, and will not be repeated here.
[0096] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0097] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0098] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0099] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0100] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0102] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A route cost-aware orchestration method, characterized in that, include: Based on the basic attribute information of the edge cloud system obtained, a first constraint, a second constraint, and a third constraint are generated. The first constraint is used to set the number of microservice instances, the second constraint is used to set the binary variable of microservice processing status, and the third constraint is used to set the request routing probability variable. The basic attribute information of the edge cloud system includes the node configuration information, network link information, and resource usage information of the physical server. Based on the network state information of the edge cloud system under the target time slot, the first constraint, the second constraint, and the third constraint are used to construct a long-term optimization objective, wherein the long-term optimization objective is constructed as a mixed integer nonlinear programming problem. By pre-setting a Lyapunov cost-aware long-term cooperative scheduling algorithm, the long-term optimization objective is transformed into a single-slot sub-function. A two-stage relaxation rounding algorithm is used to solve the single time slot sub-function to determine the target instance deployment matrix and target routing strategy for the target time slot. The target instance deployment matrix includes decision variables related to service instance deployment, and the target routing strategy includes decision variables related to request routing and binary variables of microservice processing status. The two-stage relaxation rounding algorithm includes the LRID algorithm and the PEROR algorithm. The step of using a two-stage relaxation rounding algorithm to solve the single-slot sub-function and determine the target instance deployment matrix and target routing strategy for the target time slot includes: The LRID algorithm includes steps for obtaining a fractional deployment solution, obtaining an initial integer deployment solution, and adjusting the deployment to compensate for processing capacity loss. The PEROR algorithm includes a step of obtaining the initial optimal solution for the routing variables and a step of rounding the routing variables with probability expectation. Based on the steps for obtaining the score deployment solution, the constraints of the instance deployment incremental cost and the server running cost in the single time slot sub-function are relaxed and solved according to the preset request allocation strategy and the preset solver to obtain the score solution of the instance deployment decision variable. Based on the step of obtaining the initial integer deployment solution, the fractional solution is rounded down to obtain the initial integer deployment solution; Based on the step of adjusting deployment to compensate for processing capacity loss, the total processing capacity loss of the microservice is obtained according to the fractional solution, the initial integer deployment solution, and the definition of the processing capacity of the microservice. Obtain all microservices with impaired processing capabilities from the set of microservice types and the total processing capability loss of the microservices, and generate a set; Compensation is performed on the damaged microservices in the set to update the initial integer deployment solution, generate a suboptimal instance deployment matrix, and use the suboptimal instance deployment matrix as a relevant decision variable for service instance deployment; Based on the step of obtaining the initial optimal solution of the routing variables, the second constraint and the third constraint are relaxed and optimized according to the suboptimal instance deployment matrix and the preset solver to generate the fractional solution of the processing state variable and the fractional solution of the routing probability variable. Based on the probability expectation rounding routing variable step, the fractional solution of the processing state variable and the fractional solution of the routing probability variable are jointly rounded to generate a rounded microservice processing state binary variable, and the rounded microservice processing state binary variable is used as the microservice processing state binary variable. The suboptimal solution of the routing probability variable is transformed according to the target probability to generate a suboptimal solution, and the suboptimal solution is used as the request routing probability variable; Based on the relevant decision variables deployed by the service instances, the service instances of the edge nodes are created, destroyed, and scaled up / adjusted. Based on the relevant decision variables of the request routing and the binary variables of the microservice processing status, request forwarding and path control are completed.
2. The routing cost-aware orchestration method as described in claim 1, characterized in that, The step of generating a first constraint, a second constraint, and a third constraint based on the acquired basic attribute information of the edge cloud system includes: Based on the number of cores of each physical server node under the target time slot, a first constraint condition is generated, wherein the first constraint condition is that the number of microservice instances is less than or equal to the number of cores of each physical server node under the corresponding target time slot. Based on the acquisition of the predecessor microservice instance and successor microservice instance of the microservice on each physical server node under the target time slot, a second constraint condition is generated, wherein the second constraint condition is that the predecessor microservice instance of the microservice processing state binary variable is greater than or equal to the successor microservice instance, and there is a dependency relationship between the successor microservice instance and the predecessor microservice instance. Based on the routing probabilities of the request flow from the predecessor microservice instance to the successor microservice instance on each physical server node under the target time slot, a third constraint is generated, wherein the third constraint is that the sum of all path probabilities of the request routing probability variable is 1.
3. The routing cost-aware orchestration method as described in claim 1, characterized in that, The step of constructing a long-term optimization objective based on the obtained network state information of the edge cloud system under the target time slot, the first constraint, the second constraint, and the third constraint includes: Based on the obtained request routing probability, request arrival rate, microservice dependencies and processing status, the first constraint, the second constraint and the third constraint, the constraints of total request arrival rate, real-time service intensity, steady-state probability, processing and queuing latency, data transmission latency and average path latency of the node microservice are generated. Based on the average latency of the path, the request flow, and the microservice data size, constraints are generated for the expected average response latency, the overall system average response latency, the system throughput, and the service request processing rate. Based on the Jain fairness index, the resource utilization rate and link bandwidth utilization rate of the nodes are calculated to generate constraints on the fairness of network resource allocation and the overall system. Based on node activation cost, instance migration and expansion cost, and communication bandwidth cost, generate constraints for server operating cost, instance deployment incremental cost, communication overhead cost, total orchestration cost, and time average cost budget. Based on the number of node cores and the available bandwidth of network links, generate computing resource constraints and bandwidth resource constraints. Based on the constraints of time average cost budgeting, computing resource constraints, bandwidth resource constraints, and system comprehensiveness, the long-term optimization objective is constructed.
4. The routing cost-aware orchestration method as described in claim 1, characterized in that, The process of converting the long-term optimization objective into a single-slot sub-function using a pre-configured Lyapunov cost-aware long-term cooperative scheduling algorithm includes: Each physical server node under the target time slot is set as a virtual queue, wherein the virtual queue is used to represent the cumulative over-deployment amount up to the target time slot; Based on the orchestration cost of each virtual queue under the target time slot, the time average threshold of each physical server node under the target time slot, and the time average threshold of each physical server node under the target time slot, the constraints of the dynamic update equation of each virtual queue are generated. Based on the obtained quadratic Lyapunov function and the constraints of the dynamic update equations of each virtual queue, the constraints of Lyapunov drift are generated, wherein the quadratic Lyapunov function is a pre-set Lyapunov cost-aware long-term cooperative scheduling algorithm. Based on the Lyapunov drift constraints, the obtained non-negative equilibrium parameters, and the comprehensive system constraints, constraints incorporating a drift-penalty function are generated. ; Based on the orchestration cost of each virtual queue and each physical server node under the target time slot, the time average threshold, non-negative balance parameter, and non-negative constant of each physical server node under the target time slot, an upper bound is imposed on the constraint condition for introducing the drift-penalty function, thereby generating the constraint condition for introducing the upper bound of the drift-penalty function. The long-term optimization objective is transformed into a single-slot sub-function by minimizing the constraints that introduce the upper bound of the drift-penalty function.
5. The routing cost-aware orchestration method as described in claim 1, characterized in that, The process of creating, destroying, and scaling up service instances at edge nodes based on the relevant decision variables deployed by the service instances includes: Based on the newly added microservice instance deployment requirements in the relevant decision variables for the service instance deployment, start container or virtual machine instances on the corresponding edge physical server nodes; Based on the reduced microservice instance deployment requirements from the relevant decision variables for the service instance deployment, stop and remove the corresponding redundant instances on the physical server nodes. Based on the changes in the number of microservice instances among the relevant decision variables for the deployment of the service instances, the number of instance replicas on the physical server nodes is dynamically adjusted to achieve dynamic adaptation of computing resources.
6. The routing cost-aware orchestration method as described in claim 1, characterized in that, The request forwarding and path control are completed based on the relevant decision variables of the request routing and the binary variables of the microservice processing status, including: Update the routing table of the service mesh controller according to the relevant decision variables of the request routing and the service mesh configuration protocol; Based on the binary variable of the microservice processing status of the request route, set the request processing scope and set the routing and forwarding path of the user request between different microservice instances; Within the target time slot, based on the relevant decision variables for request routing and the binary variables of microservice processing status, the routing and path control of user requests between different microservice instances are completed.
7. A routing cost-aware orchestration device, characterized in that, The routing cost-aware orchestration device includes: The generation module is used to generate a first constraint, a second constraint, and a third constraint based on the basic attribute information of the edge cloud system. The first constraint is used to set the number of microservice instances, the second constraint is used to set the binary variable of the microservice processing status, and the third constraint is used to set the request routing probability variable. The basic attribute information of the edge cloud system includes the node configuration information, network link information, and resource usage information of the physical server. The construction module is used to construct a long-term optimization objective based on the network state information of the edge cloud system under the target time slot, the first constraint, the second constraint, and the third constraint, wherein the long-term optimization objective is constructed as a mixed integer nonlinear programming problem. The conversion module is used to convert the long-term optimization objective into a single-slot subfunction using a pre-set Lyapunov cost-aware long-term cooperative scheduling algorithm. The determination module is used to solve the single time slot sub-function using a two-stage relaxation rounding algorithm to determine the target instance deployment matrix and target routing strategy for the target time slot. The target instance deployment matrix includes relevant decision variables for service instance deployment, and the target routing strategy includes relevant decision variables for request routing and binary variables of microservice processing status. The two-stage relaxation rounding algorithm includes the LRID algorithm and the PEROR algorithm. The step of using a two-stage relaxation rounding algorithm to solve the single-slot sub-function and determine the target instance deployment matrix and target routing strategy for the target time slot includes: The LRID algorithm includes steps for obtaining a fractional deployment solution, obtaining an initial integer deployment solution, and adjusting the deployment to compensate for processing capacity loss. The PEROR algorithm includes a step of obtaining the initial optimal solution for the routing variables and a step of rounding the routing variables with probability expectation. Based on the steps for obtaining the score deployment solution, the constraints of the instance deployment incremental cost and the server running cost in the single time slot sub-function are relaxed and solved according to the preset request allocation strategy and the preset solver to obtain the score solution of the instance deployment decision variable. Based on the step of obtaining the initial integer deployment solution, the fractional solution is rounded down to obtain the initial integer deployment solution; Based on the step of adjusting deployment to compensate for processing capacity loss, the total processing capacity loss of the microservice is obtained according to the fractional solution, the initial integer deployment solution, and the definition of the processing capacity of the microservice. Obtain all microservices with impaired processing capabilities from the set of microservice types and the total processing capability loss of the microservices, and generate a set; Compensation is performed on the damaged microservices in the set to update the initial integer deployment solution, generate a suboptimal instance deployment matrix, and use the suboptimal instance deployment matrix as a relevant decision variable for service instance deployment; Based on the step of obtaining the initial optimal solution of the routing variables, the second constraint and the third constraint are relaxed and optimized according to the suboptimal instance deployment matrix and the preset solver to generate the fractional solution of the processing state variable and the fractional solution of the routing probability variable. Based on the probability expectation rounding routing variable step, the fractional solution of the processing state variable and the fractional solution of the routing probability variable are jointly rounded to generate a rounded microservice processing state binary variable, and the rounded microservice processing state binary variable is used as the microservice processing state binary variable. The suboptimal solution of the routing probability variable is transformed according to the target probability to generate a suboptimal solution, and the suboptimal solution is used as the request routing probability variable; The creation, destruction, and scaling adjustment module is used to complete the creation, destruction, and scaling adjustment of service instances on edge nodes based on the relevant decision variables deployed by the service instances. The forwarding and path control module is used to perform request forwarding and path control based on the relevant decision variables of the request routing and the binary variables of the microservice processing status.
8. A routing cost-aware orchestration device, characterized in that, The route cost-aware orchestration device includes a processor, a memory, and a route cost-aware orchestration program stored in the memory and executable by the processor, wherein when the route cost-aware orchestration program is executed by the processor, it implements the steps of the route cost-aware orchestration method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a route cost-aware orchestration program, wherein when the route cost-aware orchestration program is executed by a processor, it implements the steps of the route cost-aware orchestration method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Elastic resource scheduling method and device for micro-service and electronic equipment
CN120909746A
Hybrid expert model dynamic token routing method based on Lyapunov optimization
CN121585596A