Container resource scheduling optimization method for k3s cluster
By optimizing container resource scheduling in a k3s cluster using a discrete quantum evolution algorithm, the problem of efficient container task operation and resource utilization in resource-constrained environments is solved, thereby achieving efficient execution of user applications and ensuring the quality of cluster services.
Patent Information
- Application Number
- CN202511123115.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-14
AI Technical Summary
In resource-constrained k3s cluster environments, how to maximize cluster resource utilization and rationally apply container resources while ensuring the efficient operation of container tasks has become a critical issue that urgently needs to be addressed.
Discrete Quantum Evolutionary Algorithm (QEA) is used to optimize container resource scheduling. By reading user application information, k3s cluster information and node resource information, a container deployment and scheduling scheme is generated, including cluster node selection and resource allocation strategies. The deployment and resource allocation of containers are optimized by using initial feasible solution generation, greedy strategy and discrete individual update rules.
It effectively reduces the average completion time of user applications, improves resource utilization, and ensures the service quality and efficient operation of the k3s cluster.
Smart Images

Figure CN120950183A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing processing technology, particularly to the field of virtualization and resource management technology in cloud computing environments, and specifically to a container resource scheduling optimization method for k3s clusters. Background Technology
[0002] With the rapid development of cloud computing and virtualization technologies, container technology has become an indispensable part of modern application architecture. Containers provide a lightweight, fast-starting, and environment-consistent deployment method, significantly improving the efficiency of application development, testing, deployment, and operation. In containerized platforms, the scheduling and optimization of container resources is a key aspect of ensuring the efficient operation of the cluster. The role of container resource scheduling is to rationally arrange the computing tasks of user applications onto cluster nodes and allocate corresponding container resources to support task execution based on the cluster's resource status, task requirements, and scheduling policies, thereby achieving load balancing, maximizing resource utilization, and ensuring high task availability.
[0003] Kubernetes (k8s) is currently the most mainstream cluster management platform. However, k8s has relatively high complexity and resource consumption in large-scale clusters. For lightweight scenarios, k3s, as a simplified version of Kubernetes, is optimized for resource-constrained environments such as edge computing and IoT, providing a more efficient and flexible container management solution. k3s is lightweight, easy to deploy, and has low resource consumption, making it suitable for small clusters and resource-limited devices, providing a more efficient and simplified container orchestration and management platform.
[0004] As container applications become increasingly scaled and complex, container resource scheduling becomes more challenging. This is especially true in k3s clusters, where clusters typically run on resource-constrained hardware. Ensuring efficient container task execution while maximizing cluster resource utilization and guaranteeing the rational use of container resources has become a critical issue. The goal of container resource scheduling optimization is to improve container performance and overall cluster efficiency through intelligent scheduling and resource allocation. For resource-constrained k3s clusters, container scheduling needs to comprehensively consider multiple factors, including the resource status of each node, the resource requirements of containers, and the computational service constraints of user applications, to dynamically optimize scheduling. Optimizing container resource scheduling not only improves cluster resource utilization but also ensures high availability, load balancing, and minimized latency for tasks.
[0005] In summary, the technical problem to be solved by this invention is to allocate each user application to a suitable cluster node and allocate container resources to support the efficient operation of the application in a resource-constrained k3s cluster environment, taking into account the container resource requirements and computing service requirements of the user-submitted application. Summary of the Invention
[0006] A primary objective of this invention is to overcome at least one of the aforementioned deficiencies and to provide a container resource scheduling optimization method for k3s clusters. This method, while satisfying user application deadline constraints, aims to minimize the average completion time of all applications as the scheduling optimization objective, thereby enhancing the execution efficiency of user applications on the k3s cluster.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a container resource scheduling optimization method for k3s clusters, which includes the following steps: S1. Read user application information, k3s cluster information, and cluster node resource information; S2. Input the read information into a discrete quantum evolutionary algorithm to generate a container deployment scheduling scheme, the scheduling scheme including cluster node selection and computing and storage resource allocation strategies; S3. Create containers and allocate resources on the selected cluster nodes according to the container deployment and scheduling scheme.
[0008] According to one embodiment of this application, the implementation of the initial feasible solution generation strategy of the discrete quantum evolution algorithm includes: Initialize the quantum population by setting the number of individuals in the quantum population and the maximum number of iterations. A strongly bound discrete individual encoding mechanism is adopted, with each qubit corresponding to an application task; During the initialization phase, four elite quantum individuals are generated, based on strategies such as long job first, short job first, first-come-first-served, and a decreasing ratio of resource requirements to deadlines. Randomly generate the remaining quantum individuals in the initial population to complete the population initialization of the quantum population; Based on the application task sequence represented by quantum individuals, a greedy strategy is used to evaluate the execution efficiency of each application task on each server device, and the quantum individual with the shortest average completion time of the application task sequence is selected as the initial optimal quantum individual. The initial optimal quantum individual is used as the container for deployment and scheduling.
[0009] According to one embodiment of this application, the process of evaluating the execution efficiency of each quantum individual using a greedy strategy involves calculating the fitness value of each quantum individual using a task allocation strategy based on a greedy idea, and determining the optimal and worst quantum individuals based on the fitness values of each quantum individual.
[0010] According to one embodiment of this application, when using a greedy strategy to evaluate the execution efficiency of each application task on each server device, the execution efficiency of each application on each server device in each quantum individual is evaluated sequentially according to the application task sequence represented by the quantum individual, and the device with the highest execution efficiency is selected as the deployment container for the corresponding application task.
[0011] According to one embodiment of this application, the discrete quantum evolution algorithm updates each quantum individual in the initial population through a discrete individual update rule to achieve population evolution and obtain an optimized feasible solution generation strategy.
[0012] According to one embodiment of this application, the implementation of the optimized feasible solution generation strategy of the discrete quantum evolution algorithm includes: Update the population evolution parameters, which include the number of individuals in the subpopulation and the number of iterations; A roulette wheel method is used to select quantum individuals from the initial population to form a subpopulation. The fitness values of each quantum individual in the subpopulation are compared with the worst quantum individual in the initial population. If the fitness value of a quantum individual in the subpopulation is lower than that of the worst quantum individual, the quantum individual in the subpopulation is updated and replaced with the updated quantum individual. Update the record of the current best quantum individual based on the fitness value of each quantum individual in the population; Repeat the above update process until the preset number of iterations is reached, and update the record of the best quantum individual in each iteration; The updated optimal quantum individual is used as the container deployment and scheduling scheme.
[0013] According to one embodiment of this application, the update of the quantum individual in the subpopulation is only initiated when a quantum individual in the subpopulation has a fitness value lower than that of the worst quantum individual and the current container scheduling scheme does not contain a solution for the quantum individual.
[0014] According to one embodiment of this application, the quantum individuals in the pair population The update process includes: for Quantum bits ,use To represent its angle, then The update formula is: and ,in, for The rotation angle has been updated.
[0015] According to one embodiment of this application, Updated rotation angle The calculation process is as follows: Define the percentage of objective difference between two quantum entities; ; use Represents the current optimal quantum individual, and defines the coefficient. ,in, It is a random number distributed in the interval [0, 1]. like Superior and ,but ; like Superior and ,but ; In other cases, .
[0016] In particular, the present invention also provides a computing device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor executes the computer program to implement the method described above.
[0017] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above. The computer-readable storage medium is preferably a non-volatile readable storage medium.
[0018] Compared with existing technologies, the advantages and beneficial effects of the container resource scheduling optimization method for k3s clusters proposed in this patent application are as follows: This application presents a container resource scheduling optimization method for k3s clusters. The process first reads user application information, k3s cluster information, cluster node resource information, and container configuration information. Then, the read information is input into a discrete quantum evolutionary algorithm to obtain a container deployment scheduling scheme. The generated container deployment scheduling scheme includes at least the selection of cluster nodes for deploying application containers and the computational and storage resources deployed for each application container. The discrete quantum evolutionary algorithm includes at least an initial feasible solution generation strategy, a task allocation strategy based on a greedy approach, and a discrete individual update rule optimization strategy. In summary, this invention can make reasonable scheduling decisions on application container deployment and resource allocation based on user application needs in resource-constrained k3s cluster environments, effectively reducing the average completion time of user applications and ensuring the service quality of the k3s cluster. Attached Figure Description
[0019] The following sections will describe some specific embodiments of the invention in detail by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or portions. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings: Figure 1 This is a schematic diagram of the main process of a container resource scheduling optimization method for k3s clusters according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the workflow of a container resource scheduling optimization method for k3s clusters according to an embodiment of the present invention. Figure 3 This is a structural diagram of a computing device according to another embodiment of this application; Figure 4 This is a computer-readable storage medium structure diagram according to another embodiment of this application. Detailed Implementation
[0020] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0022] This embodiment describes a container resource scheduling optimization method for k3s clusters. It obtains the optimal scheduling scheme for container resource deployment by using a discrete QEA algorithm, and selects k3s server devices and allocates container resources for each application task according to the obtained container scheduling scheme.
[0023] like Figure 1 As shown, the main steps of the container resource scheduling optimization method for k3s clusters include: Step S1: Read user application information, k3s cluster information, and resource information and container configuration information of each node in the cluster; Step S2: Input the read information into a discrete QEA algorithm to obtain a scheduling scheme for container deployment (including at least the selection of cluster nodes for deploying application containers and the computing and storage resources deployed for each application container). The discrete QEA algorithm includes at least an initial feasible solution generation strategy (S23-S24), a task allocation strategy based on a greedy idea (S25), and a discrete individual update rule (S27). Step S3: The cluster administrator selects a suitable cluster node for each user application according to the container scheduling scheme, and allocates the corresponding computing and storage resources to create containers; The user application information read in step S1 includes, but is not limited to, the amount of input data for each application task. Average workload Task completion deadline The k3s cluster information includes the number of server devices in the cluster, the operating frequency of each device, and the amount of resources (number of CPUs and memory size); container configuration information mainly includes the minimum resource requirements and maximum resource limits of the containers. The k3s cluster received submissions from different users. Each application task is a separate application container request. Here, it is assumed that each application task is atomic, can only run on the container assigned to it, and cannot be stopped or migrated to another container once execution begins. The application task sequence is represented as follows: There are a total of ;k3s clusters A set of server devices, represented as: ; like Figure 2 As shown, the discrete QEA algorithm in step S2 includes the following main steps: Step S21: Initialize the quantum population This includes the number of individuals in the population. The number of individuals in the subpopulation The maximum number of iterations in the population evolution process wait; Step S22: Map each quantum individual to a feasible solution (i.e., an application task sequence). In the container scheduling problem, the order in which application containers are deployed is a key decision affecting the optimization objective. Considering that each quantum individual contains... For each quantum bit, this method uses a strongly bound discrete individual encoding mechanism: that is, each quantum bit is strongly bound to an application task, directly transforming the quantum individual into a task sequence. The quantum individual is represented as... .Right now It is an arrangement of application tasks, in which the same task can appear once.
[0024] Step S23: In the initial population, four special quantum individuals are created as elites using an initial feasible solution generation strategy. These individuals are selected from common scheduling strategies such as Longest Job First, Shortest Job First, First-Come, First-Served, and according to the following order: and The four elite quantum individuals are obtained by using a decreasing ratio method. Step S24: Randomly generate other individuals in the initial population to complete population initialization; Step S25: Calculate the fitness value of the quantum individuals using a task allocation strategy based on a greedy approach to determine the optimal quantum individual. The objective function, i.e., the average completion time of all applications, is used as the fitness value to evaluate the quality of the quantum individuals; the shorter the completion time, the better the individual. In the task allocation strategy, based on the application task sequence represented by the quantum individual, the execution efficiency of each application on each server device is evaluated sequentially (if there are no available CPU or memory resources on the device, this is ignored), and the device with the highest execution efficiency is selected for container deployment. Then, the minimum amount of CPU and memory is allocated to the application task based on its completion deadline. After the task sequence has been traversed, if there are still resources remaining in the k3s cluster, then according to… and The priority of application tasks is calculated according to the principle of "decreasing ratio", and the remaining resources are allocated to high-priority tasks first. After the container resources are allocated, the completion time of each application task is calculated, and the average completion time is used as the fitness value of the quantum individual. Based on the fitness value, the best individual in the initial population is recorded; Step S26: Update the population evolution parameters, including the number of iterations. wait; Step S27: Update the quantum individuals in the population using the discrete individual update rule. The subpopulation is represented as... The roulette wheel method is used to select from the population. Individuals form subpopulations. Each individual in a subpopulation is observed, and it is determined whether it meets the renewal criteria. Specifically, for... Observations were conducted to obtain And find the individual with the worst fitness value in the current population. .if And the current container scheduling scheme does not include The corresponding solution is for Update and replace with it Join the population.
[0025] The quantum individuals in the pair population The update process includes: for Quantum bits ,use To represent its angle, then The update formula is: and ,in, for The rotation angle has been updated. Updated rotation angle The calculation process is as follows: Define the percentage of objective difference between two quantum entities; ; use Represents the current optimal quantum individual, and defines the coefficient. ,in, It is a random number distributed in the interval [0, 1]. like Superior and ,but ; like Superior and ,but ; In other cases, .
[0026] Step S28: Update the record of the current best quantum individual based on the fitness value of each quantum individual in the population; Step S29: Determine if the number of iterations has been reached. If the number of iterations has been reached, proceed to step S210; otherwise, proceed to step S26. Step S210: Population evolution ends, the optimal quantum individual is obtained, and the optimal container deployment scheme is output; In the aforementioned steps, step S2 describes the discrete QEA algorithm. The algorithm takes as input the set of all application tasks received by the k3s cluster and outputs an optimal container deployment scheduling scheme and the corresponding average completion time of the application tasks. The discrete QEA algorithm is divided into a population initialization phase and a population evolution phase. Steps S21-S25 describe the population initialization phase, and steps S26-S210 describe the population evolution phase. Step S22, starting from the encoding method, adopts a strongly bound discrete encoding mechanism for quantum individuals, allowing quantum individuals to be directly converted into a set of application task numbers. Discretized integer vectors, i.e. Step S23 describes the initial feasible solution generation strategy. In the initial population initialization stage, the concept of elite quantum individuals is introduced to optimize the initial feasible solution. Four special quantum individuals are designated as elites; the other quantum individuals are generated randomly (step S24). Step S25 describes the task allocation strategy based on a greedy approach. For each task in the application task sequence, a server device for deploying the container is selected, and CPU and memory resources are allocated. The average completion time of all application tasks is then calculated and used as the fitness value to evaluate the quality of the quantum individuals. The optimal quantum individual is recorded. Step S27 describes the discrete individual update rule. Based on the discretized definition of the population, individuals, and evolution rules, a sub-population is selected through roulette wheel selection. Then, each individual in the sub-population is observed and evaluated. Individuals that meet the conditions are updated, and the updated individual replaces the worst individual in the current population. When the population reaches the required number of iterations, the population evolution is complete, and the recorded optimal quantum individual is the best container resource scheduling scheme.
[0027] Case Study: The container resource scheduling optimization method described in this application will be illustrated below with a specific implementation case. In this implementation case, the k3s cluster needs to process 10 applications submitted by users. There are 3 server devices in the cluster. Based on the optimal container resource scheduling scheme that minimizes the average completion time of application tasks, the server devices for deploying user application containers are identified and the computing resources required for creating the containers are allocated. The task information is shown in the table below: Step S1: Obtain user application information that the k3s cluster needs to process, including the amount of input data for the application tasks. Average workload and deadline ; Obtain server device information, including device operating frequency and available resource quantity; Obtain container configuration information, including container minimum resource requirements and maximum resource limits. Define the initial application task sequence as follows. The k3s cluster server set is Establish a container resource scheduling optimization model; Step S21: Initialize the quantum individual population and set the number of quantum individuals. =30, number of individuals in the subpopulation =30, number of evolutionary iterations =1000, the quantum individual population is represented as ; Steps S22-S24: Map quantum individuals to application task sequences using a discrete individual encoding mechanism. First, generate four elite quantum individuals using an initial feasible solution generation strategy: Elite quantum individuals are generated using a long job-first approach. Elite quantum individuals are generated using a short-task-first approach. Elite quantum individuals are generated through a first-come, first-served approach. ;pass" and Elite quantum individuals are generated through a "decreasing ratio" method. The remaining quantum individuals It is then generated randomly.
[0028] Step S25: Calculate the population using a task allocation strategy based on a greedy approach. The average completion time of each quantum individual is used as the fitness value. Calculate the individual The average completion time is 7.04 seconds, that is It is the individual with the shortest task sequence completion time in the population, therefore it is recorded. It is the current optimal quantum individual.
[0029] Steps S26-S29: Perform population evolution, updating the quantum individuals in the population using a discrete individual update rule in each iteration. A roulette wheel method is used to select 30 quantum individuals from the population to form a subpopulation. Each individual in the subpopulation is observed, and it is determined whether it meets the update conditions. Specifically, for... Observations were conducted to obtain And find the individual with the worst fitness value in the current population. .if And the current container scheduling scheme does not include The corresponding solution is for Update and replace with it Join the population. For Quantum bits ,use To represent its angle, then The update formula is: and .in, for The calculation process for the rotation angle updated this time is as follows: (1) Define the percentage of objective difference between the two quantum individuals; (2) Use Represents the current optimal quantum individual, and defines the coefficient. ,in (3) If a random number is distributed in the interval [0, 1]; Superior and ,but ;like Superior and ,but In other cases, Based on the fitness value of each quantum individual in the population, update the record of the current best quantum individual.
[0030] Step S210: When the maximum number of iterations for the population is reached... =1000, population process ends. The optimal quantum individual at this point... This represents the optimal container scheduling scheme, with the shortest average completion time for all application tasks being... =6.50s. The container scheduling scheme is shown below. This indicates that the user application will be assigned to the first... Deploy containers on a single server device: Step S3: The cluster administrator selects a suitable cluster node for each user application according to the container scheduling scheme, and allocates the corresponding computing and storage resources to create containers.
[0031] In summary, the container resource scheduling optimization method for k3s clusters in this application first reads user application information, k3s cluster information, and resource information and container configuration information of cluster nodes during the processing. Then, the read information is input into a discrete quantum evolution algorithm to obtain a container deployment scheduling scheme. The generated container deployment scheduling scheme includes at least the selection of cluster nodes for deploying application containers and the computing and storage resources deployed for each application container. The discrete quantum evolution algorithm includes at least an initial feasible solution generation strategy, a task allocation strategy based on a greedy idea, and a discrete individual update rule optimization strategy.
[0032] The specific beneficial effects are reflected in: 1) The method described in this invention can make full use of the container resources of the resource-constrained k3s cluster, and make reasonable scheduling decisions on the deployment and resource allocation of application containers according to the needs of user applications, effectively reducing the average completion time of user applications and ensuring the service quality of the k3s cluster.
[0033] 2) The method described in this invention improves the traditional QEA algorithm in four aspects: encoding method, population initialization, rotation gate, and quantum sequence observation process. By balancing the algorithm's global exploration and local exploitation capabilities, the optimization ability of the scheduling algorithm is improved, effectively reducing the average completion time of user applications on k3s clusters, and exhibiting high computational efficiency.
[0034] This application also provides a computing device, referring to... Figure 3 The computing device includes a memory 1120, a processor 1110, and a computer program stored in the memory 1120 and executable by the processor 1110. The computer program is stored in a space 1130 for program code in the memory 1120. When executed by the processor 1110, the computer program implements a method step 1131 according to the invention.
[0035] This application also provides a computer-readable storage medium. (See attached embodiments.) Figure 4The computer-readable storage medium includes a storage unit for program code, the storage unit being provided with a program 1131' for performing the method steps according to the invention, the program being executed by a processor.
[0036] This application also provides a computer program product containing instructions. When the computer program product is run on a computer, it causes the computer to perform the method steps according to the invention.
[0037] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When a computer loads and executes the computer program instructions, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0038] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0039] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0040] In particular, the present invention also provides a computing device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor executes the computer program to implement the method described above.
[0041] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above. The computer-readable storage medium is preferably a non-volatile readable storage medium.
[0042] The above embodiments are only for illustrating the technical concept and features of the present invention. Their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be used to limit the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A container resource scheduling optimization method for k3s clusters, characterized in that, The work includes the following steps: S1. Read user application information, k3s cluster information, and cluster node resource information; S2. Input the read information into a discrete quantum evolutionary algorithm to generate a container deployment scheduling scheme, the scheduling scheme including cluster node selection and computing and storage resource allocation strategies; S3. Create containers and allocate resources on the selected cluster nodes according to the container deployment and scheduling scheme.
2. The method according to claim 1, characterized in that, The implementation of the initial feasible solution generation strategy of the discrete quantum evolution algorithm includes: Initialize the quantum population by setting the number of individuals in the quantum population and the maximum number of iterations. A strongly bound discrete individual encoding mechanism is adopted, with each qubit corresponding to an application task; During the initialization phase, four elite quantum individuals are generated, based on strategies such as long job first, short job first, first-come-first-served, and a decreasing ratio of resource requirements to deadlines. Randomly generate the remaining quantum individuals in the initial population to complete the population initialization of the quantum population; Based on the application task sequence represented by quantum individuals, a greedy strategy is used to evaluate the execution efficiency of each application task on each server device, and the quantum individual with the shortest average completion time of the application task sequence is selected as the initial optimal quantum individual. The initial optimal quantum individual is used as the container for deployment and scheduling.
3. The method according to claim 2, characterized in that, The process of evaluating the execution efficiency of each quantum individual using a greedy strategy involves calculating the fitness value of each quantum individual using a task allocation strategy based on the greedy idea, and determining the optimal and worst quantum individuals based on the fitness values of each quantum individual.
4. The method according to claim 2 or 3, characterized in that, When using a greedy strategy to evaluate the execution efficiency of each application task on each server device, the execution efficiency of each application on the server device in each quantum individual is evaluated sequentially according to the application task sequence represented by the quantum individual, and the device with the highest execution efficiency is selected as the deployment container for the corresponding application task.
5. The method according to claim 2, characterized in that, The discrete quantum evolution algorithm updates each quantum individual in the initial population through discrete individual update rules to achieve population evolution and obtain an optimized feasible solution generation strategy.
6. The method according to claim 5, characterized in that, The implementation of the optimized feasible solution generation strategy of the discrete quantum evolution algorithm includes: Update the population evolution parameters, which include the number of individuals in the subpopulation and the number of iterations; A roulette wheel method is used to select quantum individuals from the initial population to form a subpopulation. The fitness values of each quantum individual in the subpopulation are compared with the worst quantum individual in the initial population. If the fitness value of a quantum individual in the subpopulation is lower than that of the worst quantum individual, the quantum individual in the subpopulation is updated and replaced with the updated quantum individual. Update the record of the current best quantum individual based on the fitness value of each quantum individual in the population; Repeat the above update process until the preset number of iterations is reached, and update the record of the best quantum individual in each iteration; The updated optimal quantum individual is used as the container deployment and scheduling scheme.
7. The method according to claim 6, characterized in that, An update of the quantum individual in the subpopulation is only initiated when a quantum individual in the subpopulation has a fitness value lower than that of the worst quantum individual, and the current container scheduling scheme does not contain a solution for that quantum individual.
8. The method according to claim 6 or 7, characterized in that, The quantum individuals in the pair population The update process includes: for Quantum bits ,use To represent its angle, then The update formula is: and ,in, for The rotation angle has been updated.
9. The method according to claim 8, characterized in that, Updated rotation angle The calculation process is as follows: Define the percentage of objective difference between two quantum entities; ; use Represents the current optimal quantum individual, and defines the coefficient. ,in, It is a random number distributed in the interval [0, 1]. like Superior and ,but ; like Superior and ,but ; In other cases, .
10. A computing device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 9.