Intelligent scheduling method and system for micro-service application based on cloud edge collaboration
Through Docker container technology and multi-objective particle swarm optimization algorithm, intelligent scheduling of microservice applications in cloud-edge collaborative environments is realized, solving the problems of traditional manual scheduling low efficiency and resource mismatch, ensuring rapid deployment and optimal resource allocation in heterogeneous environments, and improving system performance and resource utilization.
Patent Information
- Application Number
- CN202510527674.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-12
AI Technical Summary
Traditional microservice application scheduling relies on manual operations, making it difficult to perceive the dynamic resource state of cloud edge nodes in real time, resulting in low scheduling efficiency and resource mismatch.
Docker container technology is used to encapsulate microservice applications as mirrors adapted to different CPU architectures, and resource status information is collected periodically through intelligent agents, and target nodes are determined in combination with multi-target particle swarm optimization algorithm to achieve dynamic matching and scheduling of resource requests and node resource thresholds.
It improves the scheduling efficiency of microservice applications, ensures rapid deployment in heterogeneous environments, takes into account communication efficiency and load balancing, solves the inefficiency and resource mismatch problems of traditional manual scheduling, and improves the overall performance and resource utilization of the system.
Smart Images

Figure CN120469794A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an intelligent scheduling method and system for microservice applications based on cloud-edge collaboration. Background Art
[0002] With the deep integration of cloud computing and edge computing, cloud-edge collaborative architecture has become the core model for supporting massive distributed applications. Microservice applications, due to their high scalability, flexibility, and fault tolerance, are widely used in cloud-edge collaborative scenarios in areas such as the intelligent Internet of Things and real-time data analysis.
[0003] Currently, traditional microservice application scheduling mainly relies on manual operations, and each microservice application needs to be manually deployed to the corresponding cluster node.
[0004] However, existing technologies schedule microservice applications manually, making it difficult to perceive the dynamic resource status of cloud edge nodes, such as CPU utilization and remaining memory space, in real time. They are also unable to dynamically adjust allocation strategies based on node load, resulting in low scheduling efficiency. Summary of the Invention
[0005] An embodiment of the present invention provides an intelligent scheduling method for microservice applications based on cloud-edge collaboration, which can improve scheduling efficiency. The method includes:
[0006] A1: Use Docker container technology to encapsulate each microservice application and its dependencies into images adapted to different CPU architectures. The dependencies include the microservice application code, runtime environment, dependency libraries, and configuration files. The CPU architectures include ARM and X86.
[0007] A2: Based on the encapsulated images of different CPU architectures and the CPU architecture type of each current node in the cloud edge cluster, the image management module distributes the image of the corresponding architecture to each current node;
[0008] A3: Utilize the intelligent agent deployed on each current node of the cloud edge cluster to periodically collect resource status information of each current node, wherein the resource status information includes computing, storage, memory, and network resources;
[0009] A4: Based on the resource status information and the application characteristics of the microservice application, the scheduling center determines whether the resource request of the microservice application at the current node exceeds the available resource threshold, wherein the application characteristics of the microservice application are the CPU, memory, and storage resource requests of the microservice application in the application definition;
[0010] A5: When the resource request of the microservice application at the current node does not exceed the available resource threshold, a target node for each microservice application is determined by a multi-objective particle swarm optimization algorithm and the microservice application is scheduled to the target node.
[0011] Preferably,
[0012] After A3 and before A4, further comprising:
[0013] The sum of the communication costs of all microservice applications is determined using the first formula:
[0014]
[0015] Wherein, D is the sum of the communication costs of all microservice applications in the cloud-edge cluster, m is the total number of microservice applications, n is the total number of cluster nodes, t(i, j) is the communication cost between microservice application i and microservice application j. When microservice application i and microservice application j belong to the same node, t(i, j) = 0. When microservice application i and microservice application j belong to different nodes, t(i, j) is the communication delay between microservice application i and the node to which microservice application j belongs.
[0016] The total load balancing index of the cloud edge cluster is calculated using the second formula, which is:
[0017]
[0018] Where B is the total load balancing index of the cloud-edge cluster, m is the total number of cluster nodes, is the resource utilization of the i-th cluster node, It is the average resource utilization of all cluster nodes.
[0019] Preferably,
[0020] The A5 includes:
[0021] When the resource request of the microservice application of the current node does not exceed the available resource threshold, the objective function is determined using a third formula based on the total weight of the communication costs of all microservice applications. The third formula is:
[0022] T = λB + (1-λ)D;
[0023] Wherein, T is the objective function value, λ is the weight of the total communication cost of all microservice applications, B is the total load balancing index, and D is the total communication cost of all microservice applications;
[0024] When the objective function reaches a minimum value, determining a first target node corresponding to each microservice application, and scheduling each microservice application to the first target node;
[0025] Upload the node information corresponding to the first target of each microservice application to the registration center.
[0026] Preferably,
[0027] After A5, the method further includes:
[0028] Using the perception feedback module to obtain service request information between microservice applications, wherein the service request information includes: request time and response time;
[0029] Determining a total weight of communication costs of all microservice applications based on service request information between the microservice applications;
[0030] determining a current minimum value of the objective function;
[0031] When the objective function obtains a current minimum value, determining a second target node corresponding to each microservice application, and scheduling each microservice application to the second target node;
[0032] Upload the node information corresponding to the second current node to the registration center.
[0033] In a second aspect, an embodiment of the present invention provides an intelligent scheduling system for microservice applications based on cloud-edge collaboration, the system comprising:
[0034] Encapsulation module: used to use Docker container technology to encapsulate each microservice application and dependencies into images adapted to different CPU architectures, where the dependencies include microservice application code, runtime environment, dependency libraries, and configuration files. The CPU architectures include ARM and X86.
[0035] Image management module: used to distribute the image of the corresponding architecture to each current node through the image management module based on the images of different CPU architectures encapsulated by the encapsulation module and the CPU architecture type of each current node in the cloud edge cluster;
[0036] A collection module: configured to periodically collect resource status information of each current node using an intelligent agent deployed on each current node of the cloud edge cluster, wherein the resource status information includes computing, storage, memory, and network resources;
[0037] a determination module configured to determine, through a scheduling center, whether the resource request of the microservice application of the current node exceeds an available resource threshold based on the resource status information and application characteristics of the microservice application collected by the collection module, wherein the application characteristics of the microservice application are the CPU, memory, and storage resource requests of the microservice application in the application definition;
[0038] Scheduling module: used to determine the target node of each microservice application and schedule it to the target node through a multi-objective particle swarm optimization algorithm when the determination module determines that the resource request of the microservice application of the current node does not exceed the available resource threshold.
[0039] Preferably,
[0040] After the acquisition module and before the determination module, it further includes: a calculation module;
[0041] The computing module is configured to execute:
[0042] The sum of the communication costs of all microservice applications is determined using the first formula:
[0043]
[0044] Wherein, D is the sum of the communication costs of all microservice applications in the cloud-edge cluster, m is the total number of microservice applications, n is the total number of cluster nodes, t(i, j) is the communication cost between microservice application i and microservice application j. When microservice application i and microservice application j belong to the same node, t(i, j) = 0. When microservice application i and microservice application j belong to different nodes, t(i, j) is the communication delay between microservice application i and the node to which microservice application j belongs.
[0045] The total load balancing index of the cloud edge cluster is calculated using the second formula, which is:
[0046]
[0047] Where B is the total load balancing index of the cloud-edge cluster, m is the total number of cluster nodes, is the resource utilization of the i-th cluster node, It is the average resource utilization of all cluster nodes.
[0048] Preferably,
[0049] The scheduling module is further used to execute:
[0050] When the resource request of the microservice application of the current node does not exceed the available resource threshold, the objective function is determined using a third formula based on the total weight of the communication costs of all microservice applications. The third formula is:
[0051] T = λB + (1-λ)D;
[0052] Wherein, T is the objective function value, λ is the weight of the total communication cost of all microservice applications, B is the total load balancing index, and D is the total communication cost of all microservice applications;
[0053] When the objective function reaches a minimum value, determining a first target node corresponding to each microservice application, and scheduling each microservice application to the first target node;
[0054] Upload the node information corresponding to the first target of each microservice application to the registration center.
[0055] Preferably,
[0056] After the scheduling module, it further includes: a rescheduling module;
[0057] The rescheduling module is used to execute:
[0058] Using the perception feedback module to obtain service request information between microservice applications, wherein the service request information includes: request time and response time;
[0059] Determining a total weight of communication costs of all microservice applications based on service request information between the microservice applications;
[0060] determining a current minimum value of the objective function;
[0061] When the objective function obtains a current minimum value, determining a second target node corresponding to each microservice application, and scheduling each microservice application to the second target node;
[0062] Upload the node information corresponding to the second current node to the registration center.
[0063] In a third aspect, an embodiment of the present invention provides an intelligent scheduling system for microservice applications based on cloud-edge collaboration, including: at least one memory and at least one processor;
[0064] The at least one memory is configured to store a machine-readable program;
[0065] The at least one processor is configured to call the machine-readable program to execute any method according to the first aspect of claim 1.
[0066] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having computer instructions stored thereon, wherein when the computer instructions are executed by a processor, the processor is caused to execute any of the methods described in the first aspect of the present invention.
[0067] The embodiment of the present invention provides an intelligent scheduling method and system for microservice applications based on cloud-edge collaboration. The method first encapsulates each microservice application and dependency into an image through Docker container technology, and then distributes the container image of the corresponding architecture according to the CPU architecture information of the current node, so as to achieve environmental consistency and portability of the microservice, ensure that it can be quickly and consistently deployed on different architecture nodes of the cloud edge (such as cloud X86 servers, edge ARM devices), ensure that the microservice image is compatible with the node hardware architecture, avoid deployment failures caused by architecture mismatch, lay the foundation for subsequent containerized deployment, and simplify the migration process of microservice applications in cloud-edge heterogeneous environments. The resource status information collected by the intelligent agent of each current node provides real-time data support for scheduling decisions. The scheduling center combines the resource status information to determine whether the resource request of the microservice application exceeds the node available resource threshold. If it does not exceed the threshold, scheduling is allowed. The scheduling center calculates the optimal mapping relationship between the microservice application and the node through the multi-objective particle swarm optimization algorithm to determine the target node of each microservice application, trigger scheduling distribution, and realize dynamic optimization allocation of cloud-edge resources. The above steps fully reflect the core process of "containerized deployment → resource perception → evaluation and filtering → multi-objective optimization scheduling". By dynamically matching microservice requirements with cloud-edge node resources, taking into account communication efficiency and load balancing, it solves the inefficiency and resource mismatch problems of traditional manual scheduling, thereby improving scheduling efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0069] Figure 1 This is a flow chart of an intelligent scheduling method for microservice applications based on cloud-edge collaboration provided by one embodiment of the present invention;
[0070] Figure 2 This is a flowchart of another intelligent scheduling method for microservice applications based on cloud-edge collaboration provided by one embodiment of the present invention;
[0071] Figure 3 This is a schematic diagram of an intelligent scheduling system for microservice applications based on cloud-edge collaboration provided by one embodiment of the present invention;
[0072] Figure 4 2 is a schematic diagram of another intelligent scheduling system for microservice applications based on cloud-edge collaboration provided by one embodiment of the present invention;
[0073] Figure 5 This is a schematic diagram of another intelligent scheduling system for microservice applications based on cloud-edge collaboration provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0075] like Figure 1 As shown, an embodiment of the present invention provides an intelligent scheduling method for microservice applications based on cloud-edge collaboration, which may include the following steps:
[0076] Step 101: Use Docker container technology to encapsulate each microservice application and its dependencies into images adapted to different CPU architectures. Dependencies include microservice application code, runtime environment, dependency libraries, and configuration files. CPU architectures include ARM and X86.
[0077] Step 102: Based on the encapsulated images of different CPU architectures and the CPU architecture type of each current node in the cloud edge cluster, distribute the image of the corresponding architecture to each current node through the image management module;
[0078] Step 103: Using the intelligent agent deployed on each current node of the cloud edge cluster, periodically collect resource status information of each current node, where the resource status information includes computing, storage, memory, and network resources;
[0079] Step 104: Based on the resource status information and the application characteristics of the microservice application, the scheduling center determines whether the resource request of the microservice application at the current node exceeds the available resource threshold, wherein the application characteristics of the microservice application are the CPU, memory, and storage resource requests of the microservice application in the application definition;
[0080] Step 105: When the resource request of the microservice application of the current node does not exceed the available resource threshold, the target node of each microservice application is determined by a multi-objective particle swarm optimization algorithm and scheduled to the target node.
[0081] In an embodiment of the present invention, an intelligent scheduling method for microservice applications based on cloud-edge collaboration is provided. The method first encapsulates each microservice application and dependency into an image through Docker container technology, and then distributes the container image of the corresponding architecture according to the CPU architecture information of the current node, so as to achieve environmental consistency and portability of the microservice, ensure that it can be quickly and consistently deployed on different architecture nodes of the cloud edge (such as cloud X86 servers, edge ARM devices), ensure that the microservice image is compatible with the node hardware architecture, avoid deployment failures caused by architecture mismatch, lay the foundation for subsequent containerized deployment, and simplify the migration process of microservice applications in cloud-edge heterogeneous environments. The resource status information collected by the intelligent agent of each current node provides real-time data support for scheduling decisions. The scheduling center combines the resource status information to determine whether the resource request of the microservice application exceeds the node available resource threshold. If it does not exceed the threshold, scheduling is allowed. The scheduling center calculates the optimal mapping relationship between the microservice application and the node through the multi-objective particle swarm optimization algorithm to determine the target node of each microservice application, trigger scheduling distribution, and realize dynamic optimization allocation of cloud-edge resources. The above steps fully reflect the core process of "containerized deployment → resource perception → evaluation and filtering → multi-objective optimization scheduling". By dynamically matching microservice requirements with cloud-edge node resources, taking into account communication efficiency and load balancing, it solves the inefficiency and resource mismatch problems of traditional manual scheduling, thereby improving scheduling efficiency.
[0082] In order to obtain the optimal scheduling solution, in one embodiment of the present invention, after step 103 and before step 104 in the above embodiment, the following steps are further included:
[0083] The sum of the communication costs of all microservice applications is determined using the first formula:
[0084]
[0085] Wherein, D is the sum of the communication costs of all microservice applications in the cloud-edge cluster, m is the total number of microservice applications, n is the total number of cluster nodes, t(i, j) is the communication cost between microservice application i and microservice application j. When microservice application i and microservice application j belong to the same node, t(i, j) = 0. When microservice application i and microservice application j belong to different nodes, t(i, j) is the communication delay between microservice application i and the node to which microservice application j belongs.
[0086] The total load balancing index of the cloud edge cluster is calculated using the second formula, which is:
[0087]
[0088] Where B is the total load balancing index of the cloud-edge cluster, m is the total number of cluster nodes, is the resource utilization of the i-th cluster node, It is the average resource utilization of all cluster nodes.
[0089] In an embodiment of the present invention, the communication cost reflects the network overhead of cross-node communication between microservices and can be used as one of the key parameters for scheduling decisions. The communication cost of microservices deployed on the same node is 0, and the communication cost of heterogeneous nodes or cross-cluster nodes depends on the actual network delay. In the multi-objective scheduling strategy, the communication delay between microservices is reduced by minimizing D, thereby improving the system response speed. For example, microservices that are frequently called are preferentially deployed to the same node or adjacent nodes to reduce the cumulative value of D. The total load balancing index B reflects the degree of load balance of each node in the cluster. The smaller the B value, the smaller the difference in resource utilization between nodes and the more balanced the load; conversely, the larger the B value, the greater the load difference, and some nodes are fully loaded or idle. By minimizing B, dynamic and balanced allocation of cloud-edge resources is achieved, avoiding the situation where some nodes are overloaded or some nodes are idle, and improving overall resource utilization. By calculating B and D in real time, the algorithm can dynamically generate the optimal scheduling plan to achieve global optimization of microservice deployment in a cloud-edge collaborative environment.
[0090] In order to improve the overall performance and resource utilization of the system, in one embodiment of the present invention, step 105 in the above embodiment includes:
[0091] When the resource request of the microservice application of the current node does not exceed the available resource threshold, the objective function is determined using a third formula based on the total weight of the communication costs of all microservice applications. The third formula is:
[0092] T = λB + (1-λ)D;
[0093] Wherein, T is the objective function value, λ is the weight of the total communication cost of all microservice applications, B is the total load balancing index, and D is the total communication cost of all microservice applications;
[0094] When the objective function reaches a minimum value, determining a first target node corresponding to each microservice application, and scheduling each microservice application to the first target node;
[0095] Upload the node information corresponding to the first target of each microservice application to the registration center.
[0096] In an embodiment of the present invention, T is the objective function value, which is used to quantify the comprehensive optimization goal of cloud-edge cluster scheduling. When the resource request of the microservice application does not exceed the node available resource threshold, the scheduling center solves the minimum value of the objective function T based on the multi-objective particle swarm optimization algorithm, that is, the third formula, and regards each microservice application as a "particle". Its position in the multi-dimensional space represents the allocation scheme of the microservice to be scheduled to a certain node. The particle updates its own speed and position to find a solution that minimizes T in the search space; when the objective function T converges to the minimum value, the position vector of each particle corresponds to the optimal deployment node of the microservice, that is, the first target node. According to the optimal solution output by the particle swarm algorithm, the scheduling center triggers the container management module to deploy the container image of the microservice application to the corresponding first target node. For example, if the optimal position of microservice i corresponds to edge node A, the image that adapts to its architecture is distributed to node A through the image management module and the container is started. After the microservice component is started, it reports its cluster, node and access method through the registration center, thereby ensuring that other microservices can discover and call the services on the target node through the registration center. At the same time, it provides real-time topology information to the perception feedback module for subsequent load balancing index calculation and weight adjustment. Through the flexible adjustment of weight parameters, the system can adapt to the priority requirements of different business scenarios and improve the generalization ability of the scheduling strategy. Based on the real-time data collection of intelligent agents and the rapid iteration of particle swarm algorithm, the automation and dynamic optimization of microservice scheduling are realized, which is significantly better than the efficiency and accuracy of manual scheduling, and effectively improves the overall performance and resource utilization of the system.
[0097] In order to achieve dynamic scheduling of microservice applications, in one embodiment of the present invention, after step 105 in the above embodiment, the following steps are further included:
[0098] Using the perception feedback module to obtain service request information between microservice applications, wherein the service request information includes: request time and response time;
[0099] Determining a total weight of communication costs of all microservice applications based on service request information between the microservice applications;
[0100] determining a current minimum value of the objective function;
[0101] When the objective function obtains a current minimum value, determining a second target node corresponding to each microservice application, and scheduling each microservice application to the second target node;
[0102] Upload the node information corresponding to the second current node to the registration center.
[0103] In an embodiment of the present invention, microservices that are called frequently and have long response times need to prioritize the optimization of communication costs. By sensing the real-time data of the feedback module, the system can automatically adjust the priority of the scheduling strategy (such as communication priority or resource priority). Based on the weight adjustment of service request information and real-time load, the particle swarm algorithm can converge to the optimal solution in the current scenario more quickly, reduce invalid iterations, and improve scheduling efficiency. Real-time synchronization of the registration center ensures that microservices can always be correctly discovered and called, avoids service interruptions due to node changes, and enhances the stability and reliability of the system. Through the above process, dynamic optimization and adaptive adjustment of the microservice scheduling strategy are realized, which effectively improves the overall performance and resource utilization efficiency of the system in the cloud-edge collaborative environment.
[0104] like Figure 2 As shown, in order to more clearly illustrate the technical solutions and advantages of the present invention, the following is a detailed description of an intelligent scheduling method for microservice applications based on cloud-edge collaboration provided by an embodiment of the present invention, which may specifically include the following steps:
[0105] Step 201: Using Docker container technology, encapsulate each microservice application and its dependencies into images adapted to different CPU architectures. Dependencies include microservice application code, runtime environment, dependency libraries, and configuration files. CPU architectures include ARM and X86.
[0106] Specifically, the image name follows a specific format (such as imageName_architecture) to facilitate subsequent distribution by node architecture matching.
[0107] Step 202: Based on the encapsulated images of different CPU architectures and the CPU architecture type of each current node in the cloud edge cluster, distribute the image of the corresponding architecture to each current node through the image management module;
[0108] Step 203: Utilize the intelligent agent deployed on each current node of the cloud edge cluster to periodically collect resource status information of each current node, where the resource status information includes computing, memory, storage, and network resource information;
[0109] For example, computing resources include the number of CPU cores, CPU utilization, and CPU architecture; memory resources include memory usage, total memory space, and remaining memory space; storage resources include total disk space and remaining disk space; and network resources include inter-node communication latency.
[0110] Step 204: Determine the total communication cost of all microservice applications using the first formula;
[0111] Specifically, the first formula is:
[0112]
[0113] Where D is the sum of the communication costs of all microservice applications in the cloud-edge cluster, m is the total number of microservice applications, n is the total number of cluster nodes, t(i, j) is the communication cost between microservice application i and microservice application j. When microservice application i and microservice application j belong to the same node, t(i, j) = 0. When microservice application i and microservice application j belong to different nodes, t(i, j) is the communication delay between microservice application i and microservice application j.
[0114] Step 205: Calculate the total load balancing index of the cloud-edge cluster using the second formula;
[0115] Specifically, the second formula is:
[0116]
[0117] Among them, B is the total load balancing index of the cloud-edge cluster, m is the total number of cluster nodes, is the resource utilization of the i-th cluster node, It is the average resource utilization of all cluster nodes.
[0118] Step 206: Based on the resource status information and the application characteristics of the microservice application, the scheduling center determines whether the resource request of the microservice application at the current node exceeds the available resource threshold, wherein the application characteristics of the microservice application are the CPU, memory, and storage resource requests of the microservice application in the application definition;
[0119] Step 207: When the resource request of the microservice application of the current node does not exceed the available resource threshold, the objective function is determined using the third formula based on the total weight of the communication costs of all microservice applications;
[0120] Specifically, the third formula is:
[0121] T = λB + (1-λ)D;
[0122] Where T is the objective function value, λ is the weight of the total communication cost of all microservice applications, B is the total load balancing index, and D is the total communication cost of all microservice applications;
[0123] Step 208: When the objective function reaches a minimum value, determine the first target node corresponding to each microservice application, and schedule each microservice application to the first target node;
[0124] Step 209: Upload the node information corresponding to the first target of each microservice application to the registration center;
[0125] Step 210: Utilize the perception feedback module to obtain service request information between microservice applications, wherein the service request information includes: request time and response time;
[0126] Step 211: Determine the total weight of the communication costs of all microservice applications based on the service request information between the microservice applications;
[0127] Step 212: Determine the current minimum value of the objective function;
[0128] Step 213: When the objective function reaches the current minimum value, determine the second target node corresponding to each microservice application, and schedule each microservice application to the second target node;
[0129] Step 214: Upload the node information corresponding to the second current node to the registration center.
[0130] Specifically, after the microservice component is started on the second target node, it reports the following information through the registration center: the cluster to which it belongs (such as "cloud cluster" or "edge cluster"), the specific node identifier (such as "node ID: Edge-Node-01"), and the access method (such as IP address, port number).
[0131] like Figure 3 As shown, an embodiment of the present invention provides an intelligent scheduling system for microservice applications based on cloud-edge collaboration, the system comprising:
[0132] Encapsulation module 301: used to encapsulate each microservice application and its dependencies into images adapted to different CPU architectures using Docker container technology, wherein the dependencies include the microservice application code, runtime environment, dependency libraries, and configuration files, and the CPU architectures include ARM and X86;
[0133] Image management module 302: used to distribute the image of the corresponding architecture to each current node through the image management module based on the images of different CPU architectures encapsulated by the encapsulation module 301 and the CPU architecture type of each current node in the cloud edge cluster;
[0134] The collection module 303 is configured to periodically collect resource status information of each current node using an intelligent agent deployed on each current node of the cloud edge cluster, wherein the resource status information includes computing, storage, memory, and network resources;
[0135] Determination module 304: configured to determine, through a scheduling center, whether the resource request of the microservice application at the current node exceeds an available resource threshold based on the resource status information and application characteristics of the microservice application collected by the collection module 303, wherein the application characteristics of the microservice application are the CPU, memory, and storage resource requests of the microservice application in the application definition;
[0136] Scheduling module 305: for determining the target node of each microservice application and scheduling it to the target node by using a multi-objective particle swarm optimization algorithm when the determination module 304 determines that the resource request of the microservice application of the current node does not exceed the available resource threshold.
[0137] based on Figure 3 An intelligent scheduling system for microservice applications based on cloud-edge collaboration is shown in Figure 4 As shown, in the embodiment of the present invention, after the acquisition module 303 and before the determination module 304, it further includes: a calculation module 306;
[0138] The calculation module 306 is configured to execute:
[0139] The sum of the communication costs of all microservice applications is determined using the first formula:
[0140]
[0141] Wherein, D is the sum of the communication costs of all microservice applications in the cloud-edge cluster, m is the total number of microservice applications, n is the total number of cluster nodes, t(i, j) is the communication cost between microservice application i and microservice application j. When microservice application i and microservice application j belong to the same node, t(i, j) = 0. When microservice application i and microservice application j belong to different nodes, t(i, j) is the communication delay between microservice application i and the node to which microservice application j belongs.
[0142] The total load balancing index of the cloud edge cluster is calculated using the second formula, which is:
[0143]
[0144] Where B is the total load balancing index of the cloud-edge cluster, m is the total number of cluster nodes, is the resource utilization of the i-th cluster node, It is the average resource utilization of all cluster nodes.
[0145] like Figure 4 As shown, in this embodiment of the present invention, the scheduling module 305 is further configured to execute:
[0146] When the resource request of the microservice application of the current node does not exceed the available resource threshold, the objective function is determined using a third formula based on the total weight of the communication costs of all microservice applications. The third formula is:
[0147] T = λB + (1-λ)D;
[0148] Wherein, T is the objective function value, λ is the weight of the total communication cost of all microservice applications, B is the total load balancing index, and D is the total communication cost of all microservice applications;
[0149] When the objective function reaches a minimum value, determining a first target node corresponding to each microservice application, and scheduling each microservice application to the first target node;
[0150] Upload the node information corresponding to the first target of each microservice application to the registration center.
[0151] based on Figure 4 An intelligent scheduling system for microservice applications based on cloud-edge collaboration is shown in Figure 5 As shown, after the scheduling module 305, it further includes: a rescheduling module 307;
[0152] The rescheduling module 307 is configured to execute:
[0153] Using the perception feedback module to obtain service request information between microservice applications, wherein the service request information includes: request time and response time;
[0154] Determining a total weight of communication costs of all microservice applications based on service request information between the microservice applications;
[0155] determining a current minimum value of the objective function;
[0156] When the objective function obtains a current minimum value, determining a second target node corresponding to each microservice application, and scheduling each microservice application to the second target node;
[0157] Upload the node information corresponding to the second current node to the registration center.
[0158] It is understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on an intelligent scheduling system for microservice applications based on cloud-edge collaboration. In other embodiments of the present invention, an intelligent scheduling system for microservice applications based on cloud-edge collaboration may include more or fewer components than shown in the figure, or combine or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0159] The information interaction, execution process, etc. between the units in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention and will not be repeated here.
[0160] An embodiment of the present invention further provides an intelligent scheduling system for microservice applications based on cloud-edge collaboration, comprising: at least one memory and at least one processor;
[0161] at least one memory for storing a machine-readable program;
[0162] At least one processor is used to call a machine-readable program to execute an intelligent scheduling method for microservice applications based on cloud-edge collaboration in any embodiment of the present invention.
[0163] An embodiment of the present invention also provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes an intelligent scheduling method for microservice applications based on cloud-edge collaboration in any embodiment of the present invention.
[0164] Specifically, a system or device equipped with a storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program codes stored in the storage medium.
[0165] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.
[0166] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0167] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.
[0168] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion unit connected to the computer, and then based on the instructions of the program code, the CPU installed on the expansion board or expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.
[0169] Each embodiment of the present invention has at least the following beneficial effects:
[0170] 1. In an embodiment of the present invention, the method first encapsulates each microservice application and dependency into an image through Docker container technology, and then distributes the container image of the corresponding architecture according to the CPU architecture information of the current node, so as to achieve environmental consistency and portability of the microservice, ensure that it can be quickly and consistently deployed on different architecture nodes of the cloud edge (such as cloud X86 servers, edge ARM devices), ensure that the microservice image is compatible with the node hardware architecture, avoid deployment failures due to architecture mismatch, lay the foundation for subsequent containerized deployment, and simplify the migration process of microservice applications in the cloud edge heterogeneous environment. The resource status information collected by the intelligent agent of each current node provides real-time data support for scheduling decisions. The scheduling center combines the resource status information to determine whether the resource request of the microservice application exceeds the node available resource threshold. If it does not exceed the threshold, scheduling is allowed. The scheduling center calculates the optimal mapping relationship between the microservice application and the node through the multi-objective particle swarm optimization algorithm to determine the target node of each microservice application, trigger scheduling distribution, and realize dynamic optimization allocation of cloud edge resources. The above steps fully embody the core process of "containerized deployment → resource awareness → evaluation and filtering → multi-objective optimized scheduling." By dynamically matching microservice requirements with cloud-edge node resources, while balancing communication efficiency and load balancing, they address the inefficiencies and resource mismatches of traditional manual scheduling, thereby improving scheduling efficiency.
[0171] 2. In embodiments of the present invention, the communication cost reflects the network overhead of cross-node communication between microservices and can be used as a key parameter for scheduling decisions. The communication cost of microservices deployed on the same node is zero, while the communication cost of heterogeneous nodes or nodes across clusters depends on the actual network latency. In a multi-objective scheduling strategy, minimizing D reduces communication latency between microservices and improves system response speed. For example, frequently called microservices are preferentially deployed to the same or adjacent nodes to reduce the cumulative value of D. The total load balancing index B reflects the degree of load balance among nodes in the cluster. A smaller B value indicates smaller differences in resource utilization between nodes and a more balanced load. Conversely, a larger B value indicates greater load differences and some nodes are fully loaded or idle. Minimizing B achieves dynamic and balanced allocation of cloud-edge resources, avoiding overloaded or idle nodes in some cases and improving overall resource utilization. In a multi-objective scheduling strategy, minimizing B achieves dynamic and balanced allocation of cloud-edge resources, avoiding overloaded or idle nodes in some cases and improving overall resource utilization. By calculating B and D in real time, the algorithm can dynamically generate the optimal scheduling solution, achieving global optimization of microservice deployment in a cloud-edge collaborative environment;
[0172] 3. In an embodiment of the present invention, T is the objective function value, which is used to quantify the comprehensive optimization goal of cloud-edge cluster scheduling. When the resource request of the microservice application does not exceed the node available resource threshold, the scheduling center solves the minimum value of the objective function T based on the multi-objective particle swarm optimization algorithm, that is, the third formula, and regards each microservice application as a "particle". Its position in the multi-dimensional space represents the allocation scheme of the microservice to a certain node. The particle updates its own speed and position to find the solution that minimizes T in the search space; when the objective function T converges to the minimum value, the position vector of each particle corresponds to the optimal deployment node of the microservice, that is, the first target node. According to the optimal solution output by the particle swarm algorithm, the scheduling center triggers the container management module to deploy the container image of the microservice application to the corresponding first target node. For example, if the optimal position of microservice i corresponds to edge node A, the image that adapts to its architecture is distributed to node A through the image management module and the container is started. After the microservice component is started, it reports its cluster, node and access method through the registration center, thereby ensuring that other microservices can discover and call the services on the target node through the registration center. At the same time, it provides real-time topology information to the perception feedback module for subsequent load balancing index calculation and weight adjustment. Through the flexible adjustment of weight parameters, the system can adapt to the priority requirements of different business scenarios and improve the generalization ability of the scheduling strategy. Based on the real-time data collection of intelligent agents and the rapid iteration of particle swarm algorithm, the automation and dynamic optimization of microservice scheduling are realized, which is significantly better than the efficiency and accuracy of manual scheduling, and effectively improves the overall performance and resource utilization of the system.
[0173] It should be noted that not all steps and modules in the above processes and system structure diagrams are required, and certain steps or modules can be omitted according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented by certain components in multiple independent devices.
[0174] In the above embodiments, the hardware unit can be realized by mechanical means or electrical means. For example, a hardware unit can include permanent dedicated circuits or logic (such as special processors, FPGA or ASIC) to complete the corresponding operations. The hardware unit can also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set up by software to complete the corresponding operations. Concrete implementation (mechanical means or dedicated permanent circuits or temporarily set circuits) can be determined based on the consideration on cost and time.
[0175] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An intelligent scheduling method for microservice applications based on cloud-edge collaboration, characterized in that: The method includes: A1: Use Docker container technology to encapsulate each microservice application and its dependencies into images adapted to different CPU architectures. The dependencies include the microservice application code, runtime environment, dependency libraries, and configuration files. The CPU architectures include ARM and X86. A2: Based on the encapsulated images of different CPU architectures and the CPU architecture type of each current node in the cloud edge cluster, the image management module distributes the image of the corresponding architecture to each current node; A3: Utilize the intelligent agent deployed on each current node of the cloud edge cluster to periodically collect resource status information of each current node, wherein the resource status information includes computing, storage, memory, and network resources; A4: Based on the resource status information and the application characteristics of the microservice application, the scheduling center determines whether the resource request of the microservice application at the current node exceeds the available resource threshold, wherein the application characteristics of the microservice application are the CPU, memory, and storage resource requests of the microservice application in the application definition; A5: When the resource request of the microservice application at the current node does not exceed the available resource threshold, a target node for each microservice application is determined by a multi-objective particle swarm optimization algorithm and the microservice application is scheduled to the target node.
2. The method according to claim 1, characterized in that After A3 and before A4, further comprising: The sum of the communication costs of all microservice applications is determined using the first formula: Wherein, D is the sum of the communication costs of all microservice applications in the cloud-edge cluster, m is the total number of microservice applications, n is the total number of cluster nodes, t(i, j) is the communication cost between microservice application i and microservice application j. When microservice application i and microservice application j belong to the same node, t(i, j) = 0. When microservice application i and microservice application j belong to different nodes, t(i, j) is the communication delay between microservice application i and the node to which microservice application j belongs. The total load balancing index of the cloud edge cluster is calculated using the second formula, which is: Where B is the total load balancing index of the cloud-edge cluster, m is the total number of cluster nodes, is the resource utilization of the i-th cluster node, It is the average resource utilization of all cluster nodes.
3. The method according to claim 2, characterized in that The A5 includes: When the resource request of the microservice application of the current node does not exceed the available resource threshold, the objective function is determined using a third formula based on the total weight of the communication costs of all microservice applications. The third formula is: T = λB + (1-λ)D; Wherein, T is the objective function value, λ is the weight of the total communication cost of all microservice applications, B is the total load balancing index, and D is the total communication cost of all microservice applications; When the objective function reaches a minimum value, determining a first target node corresponding to each microservice application, and scheduling each microservice application to the first target node; Upload the node information corresponding to the first target of each microservice application to the registration center.
4. The method according to claims 1-3, characterized in that After A5, the method further includes: Using the perception feedback module to obtain service request information between microservice applications, wherein the service request information includes: request time and response time; Determining a total weight of communication costs of all microservice applications based on service request information between the microservice applications; determining a current minimum value of the objective function; When the objective function obtains a current minimum value, determining a second target node corresponding to each microservice application, and scheduling each microservice application to the second target node; Upload the node information corresponding to the second current node to the registration center.
5. An intelligent scheduling system for microservice applications based on cloud-edge collaboration, characterized in that: The system includes: Encapsulation module: used to use Docker container technology to encapsulate each microservice application and dependencies into images adapted to different CPU architectures, where the dependencies include microservice application code, runtime environment, dependency libraries, and configuration files. The CPU architectures include ARM and X86. Image management module: used to distribute the image of the corresponding architecture to each current node through the image management module based on the images of different CPU architectures encapsulated by the encapsulation module and the CPU architecture type of each current node in the cloud edge cluster; A collection module: configured to periodically collect resource status information of each current node using an intelligent agent deployed on each current node of the cloud edge cluster, wherein the resource status information includes computing, storage, memory, and network resources; a determination module configured to determine, through a scheduling center, whether the resource request of the microservice application of the current node exceeds an available resource threshold based on the resource status information and application characteristics of the microservice application collected by the collection module, wherein the application characteristics of the microservice application are the CPU, memory, and storage resource requests of the microservice application in the application definition; Scheduling module: used to determine the target node of each microservice application and schedule it to the target node through a multi-objective particle swarm optimization algorithm when the determination module determines that the resource request of the microservice application of the current node does not exceed the available resource threshold.
6. The system according to claim 5, characterized in that After the acquisition module and before the determination module, it further includes: a calculation module; The computing module is configured to execute: The sum of the communication costs of all microservice applications is determined using the first formula: Wherein, D is the sum of the communication costs of all microservice applications in the cloud-edge cluster, m is the total number of microservice applications, n is the total number of cluster nodes, t(i, j) is the communication cost between microservice application i and microservice application j. When microservice application i and microservice application j belong to the same node, t(i, j) = 0. When microservice application i and microservice application j belong to different nodes, t(i, j) is the communication delay between microservice application i and the node to which microservice application j belongs. The total load balancing index of the cloud edge cluster is calculated using the second formula, which is: Where B is the total load balancing index of the cloud-edge cluster, m is the total number of cluster nodes, is the resource utilization of the i-th cluster node, It is the average resource utilization of all cluster nodes.
7. The system according to claim 6, characterized in that The scheduling module is further used to execute: When the resource request of the microservice application of the current node does not exceed the available resource threshold, the objective function is determined using a third formula based on the total weight of the communication costs of all microservice applications. The third formula is: T = λB + (1-λ)D; Wherein, T is the objective function value, λ is the weight of the total communication cost of all microservice applications, B is the total load balancing index, and D is the total communication cost of all microservice applications; When the objective function reaches a minimum value, determining a first target node corresponding to each microservice application, and scheduling each microservice application to the first target node; Upload the node information corresponding to the first target of each microservice application to the registration center.
8. The system according to claims 5-7, characterized in that After the scheduling module, it further includes: a rescheduling module; The rescheduling module is used to execute: Using the perception feedback module to obtain service request information between microservice applications, wherein the service request information includes: request time and response time; Determining a total weight of communication costs of all microservice applications based on service request information between the microservice applications; determining a current minimum value of the objective function; When the objective function obtains a current minimum value, determining a second target node corresponding to each microservice application, and scheduling each microservice application to the second target node; Upload the node information corresponding to the second current node to the registration center.
9. An intelligent scheduling system for microservice applications based on cloud-edge collaboration, characterized in that: include: at least one memory and at least one processor; The at least one memory is configured to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 4.
10. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 4.
Citation Information
Cited By
Edge application scheduling method and device, equipment, medium and product
CN121151330A
Intelligent scheduling method for Docker cluster service traffic
CN122204778A