A Container Scheduling Method and System Based on Entropy Weight Method and Multi-Strategy Particle Swarm Optimization Algorithm

By using the entropy weight method and the multi-strategy particle swarm optimization algorithm, the problems of difficulty in balancing target weights and premature convergence of particle swarm optimization algorithm in container scheduling are solved, achieving server load balancing and network communication optimization, and improving the efficiency and effectiveness of container scheduling.

CN116405498BActive Publication Date: 2026-04-21SHANDONG JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG JIAOTONG UNIV
Filing Date
2023-03-21
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing container scheduling schemes have difficulty balancing target weights, leading to unbalanced server loads and excessive network communication loads. The basic particle swarm optimization algorithm is prone to premature convergence and insufficient population diversity, making it difficult to achieve optimization results.

Method used

The entropy weight method is used to analyze the information content of each objective function value in the scheduling instance, and the weights are reasonably allocated. Combined with the multi-strategy particle swarm algorithm, the mutual information method is used to analyze the historical position characteristics of individual particles. Lévy perturbation and adaptive inertia weights and learning factors are added to balance global search and local search.

Benefits of technology

It achieves optimal container scheduling with more balanced server load and lower network communication load, improving the optimization effect and efficiency of the scheduling scheme.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116405498B_ABST
    Figure CN116405498B_ABST
Patent Text Reader

Abstract

This invention discloses a container scheduling method and system based on entropy weighting and multi-strategy particle swarm optimization. The method includes: constructing a multi-objective container scheduling model with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers; acquiring server set, container set, and historical scheduling instance data, and constructing an objective priority matrix based on the multi-objective container scheduling model to determine the weights of each objective function; transforming the multi-objective container scheduling model into a single objective using a linear weighting method, and iteratively solving the single-objective container scheduling model using the multi-strategy particle swarm optimization algorithm to obtain the final optimal container scheduling solution. This solves the objective balance problem and the problems of premature convergence and insufficient population diversity in the basic particle swarm optimization algorithm, resulting in a more balanced server load and lower network communication load, achieving the optimal balance effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of container scheduling technology, and in particular to a container scheduling method and system based on entropy weighting and multi-strategy particle swarm optimization. Background Technology

[0002] Cloud computing is an information infrastructure in the Internet era and an important cornerstone for the development of the industrial Internet. It can powerfully promote the digital transformation of Chinese enterprises and become a new engine for accelerating the transformation of old and new growth drivers and creating high-quality development.

[0003] Container technology is essentially a virtualization technology that encapsulates programs and their runtime environments. Because the runtime environment is encapsulated, containers make programs easier to migrate, eliminating concerns about differences in the underlying operating system, and simplifying management and deployment. Cloud-native technologies, represented by containers, microservices, and DevOps, provide best practice paths to fully leverage cloud performance, helping enterprises build elastic, reliable, loosely coupled, easily managed, and observable application systems, improving delivery efficiency and reducing operational complexity. Cloud-native perfectly aligns with the essential requirements of cloud computing development, significantly improving enterprise cloud efficiency and becoming the next-generation cloud technology core driving the improvement of traditional cloud computing performance. From an industry utility perspective, cloud-native has greatly unleashed the benefits of the cloud, becoming a powerful engine driving digital infrastructure.

[0004] However, when there are a large number of containers in a container cloud platform, server load imbalance and excessive network communication load often occur during operation. The elastic scaling capability of container cluster scheduling and management is insufficient, making it difficult to meet the load awareness and dynamic migration requirements of large-scale cloud service deployment.

[0005] Container scheduling is an NP-hard problem, typically solved using swarm intelligence algorithms. Transforming container scheduling into a multi-objective optimization problem allows for better scheduling by considering more factors in the multi-objective scheduling scheme. However, existing multi-objective container scheduling schemes suffer from the difficulty of balancing objective weights, which in turn affect the optimization effect of the final scheduling scheme. Particle swarm optimization (PSO) is a popular swarm intelligence algorithm with advantages such as fewer parameters and fast convergence. However, the basic PSO algorithm suffers from premature convergence and insufficient population diversity, leading to poor optimization results for the final multi-objective container scheduling scheme. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a container scheduling method and system based on entropy weighting and a multi-strategy particle swarm optimization algorithm. The entropy weighting method analyzes the information content of each objective function value in the scheduling instance, and rationally allocates weights based on the entropy values ​​of the multi-objective functions to solve the objective balance problem. The multi-strategy particle swarm optimization algorithm encodes the scheduling scheme into particle position vectors, analyzes the historical position characteristics of individual particles using mutual information, and combines Lévy perturbation, adaptive inertia weights, and learning factors to balance global and local searches. This solves the problems of premature convergence and insufficient population diversity inherent in the basic particle swarm optimization algorithm, achieving an optimal container scheduling scheme and resulting in more balanced server load and lower network communication load.

[0007] In a first aspect, the present invention provides a container scheduling method based on entropy weighting and multi-strategy particle swarm optimization.

[0008] A container scheduling method based on entropy weighting and multi-strategy particle swarm optimization includes:

[0009] A multi-objective container scheduling model is constructed with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers.

[0010] Obtain server set, container set, and historical scheduling instance data; combine with multi-objective container scheduling model to construct objective priority matrix; determine the entropy value of each objective function; and then determine the weight of each objective function.

[0011] The multi-objective container scheduling model is transformed into a single objective using a linear weighting method. Based on the single-objective container scheduling model, a multi-strategy particle swarm optimization algorithm is used for iterative solution to obtain the final optimal solution for container scheduling.

[0012] A further technical solution is that the constraints of the multi-objective container scheduling model include:

[0013] Each container is deployed on only one server;

[0014] The resources required by all containers on each server shall not exceed the capacity of the server.

[0015] A further technical solution is that the multi-strategy particle swarm algorithm is as follows:

[0016] Based on the basic particle swarm optimization algorithm, an improved particle swarm optimization algorithm is proposed, which utilizes a particle Lévy perturbation strategy based on mutual information, adaptive weights, and an adaptive learning factor strategy.

[0017] A further technical solution utilizes a multi-strategy particle swarm optimization algorithm for iterative solution, including:

[0018] Using the objective function of the container scheduling model as the fitness function of the particle swarm optimization algorithm, particle encoding is performed, the position vector and velocity vector of the particles are randomly initialized, relevant parameters are set, and iteration begins.

[0019] Based on the different number of iterations, the inertia weight and learning factor of the current iteration are adaptively adjusted and calculated;

[0020] Based on the inertia weight and learning factor of the current iteration, update the particle's velocity vector and position vector;

[0021] For each particle, calculate the similarity between the updated position vector and the original position vector. If the similarity is greater than a set threshold, then update the updated particle position vector using the Lévy perturbation; otherwise, do not perform any operation.

[0022] Determine if the maximum number of iterations has been reached. If the maximum number of iterations has been reached, output the optimal fitness and the updated position vectors of all particles; otherwise, continue the loop iteration.

[0023] A further technical solution involves calculating the similarity between the updated position vector and the original position vector by: calculating the mutual information value between the updated position vector and the original position vector based on the mutual information method, and using the mutual information value as the similarity value.

[0024] A further technical solution involves calculating the inertia weight ω, learning factors λ1 and λ2 using the following formulas:

[0025]

[0026]

[0027]

[0028] In the above formula, t and t max ω1 represents the current iteration number and the maximum iteration number, respectively. ω2 represents the minimum value of the inertia weight, ω1 represents the maximum value of the inertia weight, and γ1, γ2, and γ3 are preset coefficients.

[0029] Secondly, this invention provides a container scheduling system based on the entropy weight method and the multi-strategy particle swarm algorithm.

[0030] A container scheduling system based on entropy weighting and multi-strategy particle swarm optimization includes:

[0031] The data acquisition module is used to acquire server sets, container sets, and historical scheduling instance data;

[0032] The container scheduling model building module is used to construct a multi-objective container scheduling model with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers.

[0033] The model simplification module is used to construct the objective priority matrix based on the acquired data and the multi-objective container scheduling model, determine the entropy value of each objective function, and then determine the weight of each objective function. The multi-objective of the container scheduling model is transformed into a single objective using the linear weighting method.

[0034] The model solving module is used to iteratively solve the single-objective container scheduling model using a multi-strategy particle swarm optimization algorithm to obtain the final optimal solution for container scheduling.

[0035] A further technical solution is that the multi-strategy particle swarm algorithm is as follows:

[0036] Based on the basic particle swarm optimization algorithm, an improved particle swarm optimization algorithm is proposed, which utilizes a particle Lévy perturbation strategy based on mutual information, adaptive weights, and an adaptive learning factor strategy.

[0037] Thirdly, the present invention also provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps of the method described in the first aspect.

[0038] Fourthly, the present invention also provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the steps of the method described in the first aspect.

[0039] The above one or more technical solutions have the following beneficial effects:

[0040] 1. This invention provides a container scheduling method and system based on entropy weight method and multi-strategy particle swarm algorithm. It uses entropy weight method to analyze the information content of each objective function value in the scheduling instance, determines the objective function weight according to the magnitude of the objective function value information content, and reasonably allocates weights to the objective function to solve the objective balance problem, so as to make the server load more balanced and the network communication load lower, achieving the optimal balance effect.

[0041] 2. This invention employs a multi-strategy particle swarm optimization algorithm, which encodes the container scheduling scheme into particle position vectors. It uses mutual information to analyze the historical position characteristics of individual particles, and combines Lévy perturbation, adaptive inertia weights, and learning factors to balance global search and local search. This solves the problems of premature convergence and insufficient population diversity that exist in the basic particle swarm optimization algorithm, and achieves a faster and more accurate solution for the optimal container scheduling scheme. Attached Figure Description

[0042] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0043] Figure 1 This is an overall flowchart of the container scheduling method based on entropy weight method and multi-strategy particle swarm algorithm described in the embodiments of the present invention;

[0044] Figure 2 This is a flowchart of the container scheduling method based on entropy weight method and multi-strategy particle swarm algorithm described in an embodiment of the present invention.

[0045] Figure 3 This is a flowchart illustrating the process of finding the optimal solution for container scheduling using a multi-strategy particle swarm optimization algorithm in an embodiment of the present invention. Detailed Implementation

[0046] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0047] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0048] Example 1

[0049] To address the difficulty in balancing objective weights in multi-objective container scheduling, this paper utilizes the concept of entropy from information theory to analyze the information content of each objective function value in the scheduling instance, and determines the objective function weights based on the magnitude of the information content. To address the issues of premature convergence and insufficient population diversity in the basic particle swarm optimization (PSO) algorithm for solving container scheduling schemes, this paper employs mutual information to analyze the historical position characteristics of individual particles, introduces Lévy perturbation to escape local optima, and designs adaptive inertia weights and learning factors to balance global and local search. In other words, by combining the entropy weight method and the multi-strategy PSO algorithm, this embodiment provides a container scheduling method based on these two approaches. On one hand, the entropy weight method is used to determine the objective function weights; on the other hand, the container scheduling scheme is encoded as particle position vectors, and the optimal container scheduling scheme is solved using the multi-strategy PSO algorithm.

[0050] A container scheduling method based on entropy weighting and multi-strategy particle swarm optimization, such as... Figure 1 As shown, it includes the following steps:

[0051] Step S1: Construct a multi-objective container scheduling model with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers;

[0052] Step S2: Obtain server set, container set and historical scheduling instance data, combine with multi-objective container scheduling model, construct objective priority matrix, determine the entropy value of each objective function, and then determine the weight of each objective function;

[0053] Step S3: Use the linear weighting method to transform the multi-objective container scheduling model into a single objective. Based on the single-objective container scheduling model, use the multi-strategy particle swarm algorithm to iteratively solve the problem and obtain the final optimal solution for container scheduling.

[0054] First, physical servers provide the necessary hardware resources for container operation, such as CPU and memory. In this embodiment, let there be a set of physical servers S and a set of containers C. The parameters of the physical servers and containers and their meanings are shown in Table 1 below.

[0055] Table 1. Parameters and their meanings involved in the container and server model.

[0056]

[0057]

[0058] In step S1, a multi-objective container scheduling model is constructed with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers.

[0059] Based on the data exchange matrix between containers The sum of data exchanges between the containers is:

[0060]

[0061] Data exchange between different containers on the same server does not affect data exchange between servers. However, data exchange between different containers on different servers will consume the network bandwidth of their respective servers. Therefore, the total data exchange rate F1 between different servers can be expressed as:

[0062]

[0063] Different servers have different resource utilization rates; therefore, the average CPU utilization rate of all servers needs to be determined. and the average memory utilization of all servers. for:

[0064]

[0065] Different containers deployed on a server result in different server loads. The server load imbalance F2 is represented as:

[0066]

[0067] Meanwhile, considering that containers are not divisible, meaning each container can only be deployed on a single server; and that the resources of a single server are limited, meaning the resources required by all containers on a server cannot exceed its capacity, two constraints are established as follows:

[0068]

[0069]

[0070]

[0071] Using the above scheme, a multi-objective container scheduling model is constructed with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers, combined with the above constraints.

[0072] In this embodiment, container scheduling is a multi-objective optimization problem. It needs to consider both server load balancing and data exchange between servers. To facilitate solving the container scheduling model, different weights are assigned to the multiple objectives. A linear weighting method is used to transform it into a single-objective optimization problem, where the proportion of each objective needs to be considered. Entropy was first introduced into information theory by Shannon, and entropy values ​​can be used to quantify the amount of information. In this embodiment, the data exchange rate F1 between different servers and the average server load imbalance F2 are used as two indicators of the decision matrix in the entropy weighting method. The weights of the objective function are obtained through the entropy weighting method. The basic idea of ​​the entropy weighting method is to determine the objective weights based on the variability of objectives F1, F2, and their corresponding values. Generally, the smaller the entropy value of objective F1 or objective F2, the greater the variability of its objective value, the more information it provides, the greater its role in the comprehensive evaluation, and the greater its weight in the objective function.

[0073] In step S2, firstly, to determine the weights of the objective function, a massive amount of historical scheduling instances of servers and containers are obtained while satisfying server resource constraints. For example... Figure 2 As shown, in this embodiment, Q scheduling instances are obtained, and the target values ​​of the two targets are calculated based on the Q scheduling instances respectively. Then, the target values ​​of the two targets in the Q scheduling instances constitute the decision matrix F, which is:

[0074]

[0075] Among them, F 1,qF represents the metric value indicating the data exchange rate between different servers obtained by scheduling instance q. 2,q This represents the metric value indicating the average load imbalance of the servers obtained from the scheduling instance q.

[0076] The decision matrix F can be transformed into the target preference matrix using the following formula:

[0077]

[0078] The obtained target preference matrix is:

[0079]

[0080] The entropy values ​​of each objective function are then expressed as:

[0081]

[0082] in,

[0083] Therefore, the objective weights of each objective function are:

[0084]

[0085] in,

[0086] The objective weight vectors for each objective function are then:

[0087] w = (w1, w2) (10)

[0088] In step S3, to reduce the server average load imbalance and the data exchange rate between servers, a weight vector (w1, w2) is used, and a linear weighting method is employed to merge the two objectives of the container scheduling model into one objective. This transforms the multi-objective optimization problem into a single-objective optimization problem. The container scheduling model at this point is:

[0089]

[0090] Based on this, step S4 is executed, and the multi-strategy particle swarm algorithm is used to iteratively solve the single-objective container scheduling model to obtain the final optimal solution for container scheduling.

[0091] Specifically, in the particle swarm optimization (PSO) algorithm, particles exchange information during iteration, and all particles converge towards the globally optimal particle, which greatly accelerates the convergence speed but also leads to a loss of population diversity. The basic PSO algorithm sets the learning factors λ1 and λ2 and the inertia weight ω to fixed values, which is not conducive to adjusting parameters at different stages of iteration to balance global and local search. However, using a linearly decreasing inertia weight ω in the PSO algorithm can achieve better optimization results than using a fixed inertia weight ω.

[0092] Therefore, in order to further optimize the search results, this embodiment presents an improved particle swarm algorithm, namely the multi-strategy particle swarm algorithm, which encodes the container scheduling scheme into the position of the particles. Considering that the basic particle swarm algorithm has fixed parameters and is prone to premature convergence and getting trapped in local optima, the mutual information method, Lévy perturbation, adaptive weights and learning factors are integrated with the particle swarm algorithm, and the improved particle swarm algorithm is used to solve the problem.

[0093] Among them, the particle Lévy perturbation strategy based on mutual information refers to adding perturbations to the velocity update of the particle swarm optimization (PSO) algorithm. This makes the particle trajectories more disordered, increasing the probability of finding a better solution. Numerous perturbation operators are added to the velocity update of the PSO algorithm, such as Gaussian perturbation operators, Lévy perturbation operators, and mutation perturbation operators. However, adding too many perturbation operators not only increases the computational load but may also affect the particle's flight trajectory, reducing the influence of the particle's global optimal position and its own historical optimal position, thus weakening the algorithm's convergence speed. Therefore, analyzing the particle's position vector and adding perturbation factors to the particles at appropriate times is more beneficial to improving the overall performance of the algorithm.

[0094] In probability theory and information theory, the mutual information (MI) of two random variables is a measure of the interdependence between them. Formally, the mutual information of two discrete random variables A and B is defined as:

[0095]

[0096] Where p(a,b) is the joint probability function of a and b, and p(a) and p(b) are the marginal probability distribution functions of a and b, respectively. I(A;B) is a non-negative number, i.e., I(A;B)≥0. Given two discrete random variables A and B, p(a,b), p(a), and p(b) can all be obtained based on the mutual information method. To facilitate comparison of the mutual information values, they are generally normalized and scaled to a specified numerical range, as shown in the following formula:

[0097]

[0098] Here, lambda is the normalized mutual information value. When the mutual information value I(A;B) is very large, the lambda value is close to 1. When the I(A;B) value is close to 0, lambda is also close to 0.

[0099] Therefore, in this embodiment, the mutual information value of the position vectors of two adjacent generations of a particle is used to evaluate the similarity between the two adjacent generations of position vectors, thereby determining whether the particle is trapped in a local optimum. If the lambda value of the position vectors of the particle in the previous and next generations exceeds a specified threshold, a Lévy perturbation is added to the position vector of the particle with a certain probability.

[0100] The adaptive weight and adaptive learning factor strategy refers to the fact that the fixed inertia weight and learning factor in the basic particle swarm optimization algorithm are not conducive to balancing the global search and local search of particles. Adaptive processing of the inertia weight and learning factor of the particle swarm optimization algorithm, so that it automatically adjusts as the number of iterations increases, can improve the probability of finding a better position vector.

[0101] In the first half of the search, setting λ1 to a larger value and λ2 to a smaller value gives particles higher self-learning ability and lower group learning ability, which is beneficial for particles to traverse their surrounding space. In the second half of the search, setting λ1 to a smaller value and λ2 to a larger value gives particles stronger global search ability. The inertia weight ω reflects the influence of the previous generation particle velocity on the current generation particle velocity. In the early stage of iteration, ω is set to a larger value to allow the current generation particles to inherit the velocity information of the previous generation particles as much as possible. In the later stage of iteration, ω is set to a smaller value to reduce the influence of the previous generation particle velocity on the current generation particle velocity.

[0102] Based on the proposed particle-Levie perturbation strategy and adaptive weight and adaptive learning factor strategy using the mutual information method, the particle swarm optimization (PSO) algorithm is improved. The improved multi-strategy PSO algorithm is then used for iterative solving to obtain the final optimal solution for container scheduling. The process of solving using the multi-strategy PSO algorithm is as follows: Figure 3 As shown, it includes:

[0103] Step 1: Set the fitness function and particle encoding method, randomly initialize the position and velocity vectors of the particles, set relevant parameters, and start the iteration. These parameters include particle swarm size, particle dimension, number of iterations, inertia weight, and learning factor.

[0104] Specifically, the objective function in equation (11) (i.e., min: F = w1F1 + w2F2) is used as the fitness function of the particle swarm algorithm. The particle encoding adopts real number encoding. The position vector and velocity vector of the particle are randomly initialized. The particle flies at a certain speed in the search space and adjusts its flight speed according to its own and other particles' historical experience. Finally, it finds a position with the optimal fitness value in the solution space. At this time, the position of the particle is the scheduling solution that makes the objective function value optimal.

[0105] Step 2: Based on the above adaptive weight and adaptive learning factor strategy, and considering the different iteration numbers, adaptively adjust and calculate the inertia weight ω, learning factor λ1, and λ2 for the current iteration; wherein, the calculation formulas for the inertia weight ω, learning factor λ1, and λ2 are as follows:

[0106]

[0107]

[0108]

[0109] In the formula, t and t max These represent the current iteration count and the maximum iteration count, respectively, where ω1 is ω min , representing the minimum value of the inertia weight, ω2 is ω max , represents the maximum value of the inertial weight, and γ1, γ2, and γ3 are preset coefficients that can be adjusted according to the experimental conditions.

[0110] During the iteration process, the algorithm dynamically adjusts the values ​​of the three parameters according to the generation of the iteration. By adaptively processing the inertia weight and learning factor of the particle swarm algorithm, it automatically adjusts as the number of iterations increases, thereby increasing the probability of finding a better position vector.

[0111] Step 3: Based on the inertia weight and learning factor of the current iteration, calculate and update the velocity vector and position vector of the particle according to equations (17)-(18).

[0112] v k,d (t+1)=ω×v k,d (t)+λ1rand(p k,d (t)-x k,d (t))+λ2rand(p g,d (t)-x k,d (t)) (17)

[0113] x k,d (t+1)=x k,d (t)+v k,d (t+1) (18)

[0114] Where λ1 and λ2 are learning factors, also known as acceleration constants, rand is a random number between 0 and 1, ω is the inertia weight, t is the current iteration number, and p g,d (t) represents the value of the d-th dimension in the overall historical best position vector of the population, p k,d (t) represents the value of the d-th dimension in the historical best position vector of the k-th particle.

[0115] Step 4: For each particle, calculate the similarity between the updated position vector and the original position vector. If the similarity is greater than a set threshold, the updated particle position vector is updated using the Lévy perturbation. Otherwise, no operation is performed, that is, the updated particle position and velocity obtained in Step 3 are maintained.

[0116] Specifically, for each particle, based on the mutual information method, the mutual information value between the updated position vector and the original position vector is calculated. The mutual information value lambda is used as the similarity value to evaluate the similarity between the position vectors of the particle in the two generations, and to determine whether the particle is trapped in a local optimum. If lambda is greater than the set threshold ε, the particle is updated with a certain probability (rand generates a random number of 0-1), i.e., formula (19):

[0117]

[0118] In the above formula, f levy (β) is a function that conforms to the Lévy distribution. By adjusting the parameter β, the desired Lévy step size can be obtained. rand is a random number between 0 and 1, which has randomness.

[0119] Step 5: Determine if the maximum number of iterations has been reached. If the maximum number of iterations has been reached, output the optimal fitness and the updated position vectors of all particles; otherwise, return to Step 2 for iterative iteration. The fitness values ​​are the values ​​of the objective function, used to evaluate the quality of particle positions and determine whether to update the historical best positions of individual particles and the group as a whole, ensuring that particles search towards the optimal solution.

[0120] By following the steps above, we obtain the position vectors of all particles that maximize the objective function value, thus obtaining the optimal solution for container scheduling.

[0121] This embodiment considers both average server load balancing and data exchange between servers. When adding perturbations to the particle swarm optimization algorithm, a particle position vector similarity check is added to prevent particles from getting trapped in local optima.

[0122] To further verify the superiority of the scheme described in this embodiment, four samples and five algorithms (including Random, Spread, Pack, BP-HP, and EWM-MSPSO) were used for verification. The parameters of the Multiple Objective Particle Swarm Optimization (MSPSO) algorithm were set as follows: γ1 = -8, γ2 = γ3 = 2, ω... max =0.9,ω min =0.6, ε=0.999, size=30.

[0123] Obtain the container sample data shown in Table 2 and the server sample data shown in Table 3. In Table 2, the parameter w represents the matrix. The proportion of non-zero elements in the matrix The number of non-zero elements in the middle is n*n*w.

[0124] Table 2. Four container samples

[0125]

[0126] Table 3 Server Samples

[0127]

[0128] Container scheduling requires pre-determining the weights of each objective function to ensure optimal performance in both load balancing and data exchange. In this embodiment, the entropy weight method (EWM) is used to determine the weights of the objective functions. This requires pre-generating a massive number of scheduling instances to obtain a decision matrix, after which the weights are calculated. Taking container sample 1 as an example, the pre-obtained decision matrix is ​​shown in Table 4 below.

[0129] Table 4 Decision matrix of container sample 1

[0130]

[0131] After obtaining the decision matrix, the decision matrix F is transformed into the target preference matrix, as shown in Table 5 below.

[0132] Table 5 Target Priority Matrix of Container Sample 1

[0133]

[0134] Based on the target preference matrix obtained above, the weights of the two objective functions are calculated as follows: w1 = 0.1508, w2 = 0.8492.

[0135] Following the same steps as above, the weights of the objective function in the other four samples were calculated, as shown in Table 6 below.

[0136] Table 6 Weights of the objective function in the container samples

[0137]

[0138] Based on the above calculation results, different algorithms were used to optimize the four container samples, and the final optimized objective function values ​​are shown in Table 7 below. Since objective F1 and objective F2 are mutually exclusive, none of the five algorithms can minimize both objectives. Therefore, ranking analysis can be performed. After taking the mean and variance of the ranking information, and considering all factors, the EWM-MSPSO (Entropy Weight Method-Multi-Strategy Particle Swarm Optimization) proposed in this embodiment is optimal. It can balance objective F1 and objective F2, making the optimization effect of both objectives as good as possible.

[0139] Table 7. Objective function values ​​of the four samples after optimization using different algorithms.

[0140]

[0141] Example 2

[0142] This embodiment provides a container scheduling system based on entropy weighting and multi-strategy particle swarm optimization, including:

[0143] The data acquisition module is used to acquire server sets, container sets, and historical scheduling instance data;

[0144] The container scheduling model building module is used to construct a multi-objective container scheduling model with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers.

[0145] The model simplification module is used to construct the objective priority matrix based on the acquired data and the multi-objective container scheduling model, determine the entropy value of each objective function, and then determine the weight of each objective function. The multi-objective of the container scheduling model is transformed into a single objective using the linear weighting method.

[0146] The model solving module is used to iteratively solve the single-objective container scheduling model using a multi-strategy particle swarm optimization algorithm to obtain the final optimal solution for container scheduling.

[0147] Example 3

[0148] This embodiment provides an electronic device, including a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the processor executes the computer instructions, it completes the steps in the container scheduling method based on entropy weighting and multi-strategy particle swarm optimization as described above.

[0149] Example 4

[0150] This embodiment also provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps in the container scheduling method based on entropy weighting and multi-strategy particle swarm optimization as described above.

[0151] The steps and methods involved in Embodiments 2 to 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0152] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.

[0153] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0154] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A container scheduling method based on entropy weighting and multi-strategy particle swarm optimization, characterized in that, include: A multi-objective container scheduling model is constructed with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers. Obtain server set, container set, and historical scheduling instance data; combine with multi-objective container scheduling model to construct objective priority matrix; determine the entropy value of each objective function; and then determine the weight of each objective function. The multi-objective container scheduling model is transformed into a single objective using a linear weighting method. Based on the single-objective container scheduling model, a multi-strategy particle swarm optimization algorithm is used for iterative solution to obtain the final optimal solution for container scheduling. The process of solving the problem using the multi-strategy particle swarm optimization algorithm includes: Using the objective function of the container scheduling model as the fitness function of the particle swarm optimization algorithm, particle encoding is performed, the position vector and velocity vector of the particles are randomly initialized, relevant parameters are set, and iteration begins. Based on the different number of iterations, the inertia weight and learning factor of the current iteration are adaptively adjusted and calculated; Based on the inertia weight and learning factor of the current iteration, update the particle's velocity vector and position vector; For each particle, calculate the similarity between the updated position vector and the original position vector. If the similarity is greater than a set threshold, then update the updated particle position vector using the Lévy perturbation; otherwise, do not perform any operation. Determine if the maximum number of iterations has been reached. If the maximum number of iterations has been reached, output the optimal fitness and the updated position vectors of all particles; otherwise, continue the loop iteration. The similarity between the updated position vector and the original position vector is calculated as follows: based on the mutual information method, the mutual information value between the updated position vector and the original position vector is calculated, and the mutual information value is used as the similarity value. Inertia weight Learning factors and The calculation formula is: In the above formula, and These are the current iteration count and the maximum iteration count, respectively. This represents the minimum value of the inertia weight. This represents the maximum value of the inertia weight. , , These are preset coefficients.

2. The container scheduling method based on entropy weighting and multi-strategy particle swarm optimization as described in claim 1, characterized in that, The constraints of the multi-objective container scheduling model include: Each container is deployed on only one server; The resources required by all containers on each server shall not exceed the capacity of the server.

3. The container scheduling method based on entropy weight method and multi-strategy particle swarm optimization algorithm as described in claim 1, characterized in that, The multi-strategy particle swarm algorithm is as follows: Based on the basic particle swarm optimization algorithm, an improved particle swarm optimization algorithm is proposed, which utilizes a particle Lévy perturbation strategy based on mutual information, adaptive weights, and an adaptive learning factor strategy.

4. A container scheduling system based on entropy weighting and multi-strategy particle swarm optimization, characterized in that, include: The data acquisition module is used to acquire server sets, container sets, and historical scheduling instance data; The container scheduling model building module is used to construct a multi-objective container scheduling model with the objective function of minimizing the data exchange rate between different servers and the average load imbalance of servers. The model simplification module is used to construct the objective priority matrix based on the acquired data and the multi-objective container scheduling model, determine the entropy value of each objective function, and then determine the weight of each objective function. The multi-objective of the container scheduling model is transformed into a single objective using the linear weighting method. The model solving module is used to iteratively solve the single-objective container scheduling model using a multi-strategy particle swarm optimization algorithm to obtain the final optimal solution for container scheduling. The process of solving the problem using the multi-strategy particle swarm optimization algorithm includes: Using the objective function of the container scheduling model as the fitness function of the particle swarm optimization algorithm, particle encoding is performed, the position vector and velocity vector of the particles are randomly initialized, relevant parameters are set, and iteration begins. Based on the different number of iterations, the inertia weight and learning factor of the current iteration are adaptively adjusted and calculated; Based on the inertia weight and learning factor of the current iteration, update the particle's velocity vector and position vector; For each particle, calculate the similarity between the updated position vector and the original position vector. If the similarity is greater than a set threshold, then update the updated particle position vector using the Lévy perturbation; otherwise, do not perform any operation. Determine if the maximum number of iterations has been reached. If the maximum number of iterations has been reached, output the optimal fitness and the updated position vectors of all particles; otherwise, continue the loop iteration. The similarity between the updated position vector and the original position vector is calculated as follows: based on the mutual information method, the mutual information value between the updated position vector and the original position vector is calculated, and the mutual information value is used as the similarity value. Inertia weight Learning factors and The calculation formula is: In the above formula, and These are the current iteration count and the maximum iteration count, respectively. This represents the minimum value of the inertia weight. This represents the maximum value of the inertia weight. , , These are preset coefficients.

5. A container scheduling system based on entropy weighting and multi-strategy particle swarm optimization as described in claim 4, characterized in that, The multi-strategy particle swarm algorithm is as follows: Based on the basic particle swarm optimization algorithm, an improved particle swarm optimization algorithm is proposed, which utilizes a particle Lévy perturbation strategy based on mutual information, adaptive weights, and an adaptive learning factor strategy.

6. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the processor executes the computer instructions, they complete the steps of a container scheduling method based on entropy weighting and multi-strategy particle swarm optimization as described in any one of claims 1-3.

7. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, complete the steps of a container scheduling method based on entropy weighting and multi-strategy particle swarm optimization as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Docker Swarm container scheduling method and Docker Swarm container scheduling system

    CN111506394A

  • Receiving-end power grid energy storage optimal configuration method based on improved multi-objective particle swarm algorithm

    CN111614110A