A cloud container scheduling method, device, equipment and storage medium
By acquiring runtime data from the cloud platform and optimizing container scheduling strategies using population prediction and clustering algorithms, the problems of single objective and high computational overhead in existing technologies are solved, achieving efficient and dynamic multi-objective container task scheduling and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-04-07
AI Technical Summary
Existing container scheduling systems suffer from problems such as single objective, lack of dynamic adaptability, and high computational overhead, making it difficult to achieve efficient, dynamic, and multi-objective container task scheduling in cloud environments.
By acquiring operational data from the cloud platform, we can determine whether there are any change events, establish an initial container scheduling strategy, and generate a target predicted population using population prediction strategies, neural network training, clustering algorithms, and density clustering algorithms to optimize the container task allocation strategy.
It enables efficient, dynamic, and multi-objective container task scheduling for cloud container environments, improving the user experience.
Smart Images

Figure CN121542013B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of containerized resource management, and in particular to a cloud container scheduling method, device, equipment and storage medium. BACKGROUND
[0002] With the rapid development of cloud computing and container technology, container orchestration platforms such as Kubernetes, Docker Swarm, etc. have become important supporting tools for large-scale computing resource scheduling and management.
[0003] The existing container scheduling system usually adopts a static or single-target scheduling strategy. For example, the Kubernetes scheduler first filters according to resource requirements in the scheduling process, and then comprehensively considers resource utilization, load balancing, affinity / anti-affinity, and factors such as taint and tolerance in the candidate nodes, and finally determines the most suitable node. Although the existing scheduler has realized automatic resource allocation to some extent, its core mechanism still has obvious limitations, mainly reflected in the following aspects: single target: most container scheduling methods only focus on a single target such as resource utilization or load balancing, and lack comprehensive trade-off of multi-dimensional targets; lack of dynamic adaptability: in actual cloud environment, task requests and node resource states will change over time, and traditional static scheduling methods are difficult to respond in time, which can easily lead to increased task delay or resource waste; high computational overhead: although multi-objective optimization algorithms can take into account multiple scheduling targets, they often have high computational complexity in large-scale container environments, making it difficult to meet the requirements of real-time scheduling.
[0004] Therefore, how to realize efficient, dynamic and multi-target container task scheduling for cloud container environment is a technical problem to be solved at present. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a cloud container scheduling method, device, equipment and storage medium, which can realize efficient, dynamic and multi-target container task scheduling for cloud container environment. The specific scheme is as follows:
[0006] In a first aspect, the present application provides a cloud container scheduling method applied to a container orchestration platform, comprising:
[0007] obtaining running data in a target cloud platform, and determining whether there is a change event in the target cloud platform based on the running data; the change event is an event that the state of a node in the target cloud platform and the load of the target cloud platform change;
[0008] determining a current container task in the target cloud platform, and determining an initial container scheduling strategy based on the container task and nodes in the target cloud platform; the container scheduling strategy is a strategy of allocating the container task to the nodes;
[0009] determining the initial container scheduling strategy as an initial population by a population prediction strategy, integrating the initial population into a historical population, performing individual pairing on the integrated population, determining a moving vector based on the paired successful individuals, determining a training sample based on the moving vector, training an initial neural network by using the training sample, and determining a first predicted population based on a trained neural network; the historical population is a historical container scheduling strategy determined when the change event does not exist; an individual is a strategy of allocating a single container task to a node; the moving vector represents the difference between the paired successful individuals;
[0010] determining a second predicted population based on a preset clustering prediction algorithm and the initial population, and merging the first predicted population and the second predicted population into a first target predicted population;
[0011] determining a noise point in the first target predicted population by a preset density clustering algorithm, generating a target individual at a target position around the noise point by a child generation strategy, determining a second target predicted population based on the first target predicted population and the target individual, and determining the second target predicted population as a target container scheduling strategy, so as to allocate the container task to the nodes by using the target container scheduling strategy.
[0012] Optionally, the determining of the current container task in the target cloud platform and the initial container scheduling strategy based on the container task and the nodes in the target cloud platform comprises:
[0013] determining the nodes in the target cloud platform and the current container task, and determining an allocation matrix between the nodes and the container task;
[0014] determining a constraint condition based on an application scenario and problem demand of the target cloud platform, and determining the initial container scheduling strategy by using the constraint condition and the allocation matrix.
[0015] Optionally, the individual pairing on the integrated population and the determination of the moving vector based on the paired successful individuals comprise:
[0016] determining a target space of the integrated population, generating a reference point in the target space, and generating a reference line based on the reference point and a preset origin point;
[0017] In the post-admission population, a target distance between the reference line and individuals in the post-admission population is determined, individuals whose target distance meets a preset near distance condition and belongs to the same cluster region in the target space are determined as pairing successful individuals, and a movement vector is determined based on the pairing successful individuals.
[0018] Optionally, the training sample is determined based on the movement vector, and an initial neural network is trained using the training sample, including:
[0019] A decision variable of a decision space of the post-admission population is determined.
[0020] A radial coordinate and an angular coordinate in polar coordinates are respectively determined based on the decision variable and the movement vector, so as to complete a polar coordinate conversion operation of the movement vector.
[0021] A training sample is constructed based on the radial coordinate and the angular coordinate, and an initial neural network is trained using the training sample.
[0022] Optionally, the noise points in the first target prediction population are determined by a preset density clustering algorithm, including:
[0023] A standard deviation of a cluster size of the first target prediction population is determined by a preset density clustering algorithm.
[0024] When the standard deviation is less than a preset lower limit of a standard deviation threshold, a sum of a preset minimum point number and a preset fixed value is determined as a target minimum point number.
[0025] When the standard deviation is not less than the preset lower limit of the standard deviation threshold and not greater than a preset upper limit of the standard deviation threshold, the preset minimum point number is determined as the target minimum point number.
[0026] When the standard deviation is greater than the preset upper limit of the standard deviation threshold, a difference between the preset minimum point number and the preset fixed value is determined as the target minimum point number.
[0027] A cluster parameter is determined based on the target minimum point number, and the noise points in the first target prediction population are determined using the cluster parameter and a preset density clustering algorithm.
[0028] Optionally, the target individual is generated at a target position around the noise point by a child generation strategy, including:
[0029] The noise point and a knee point in the first target prediction population are determined as parents by a child generation strategy, and a target individual is generated at a target position around the parents.
[0030] Optionally, the cloud container scheduling method further includes:
[0031] If the change event does not exist in the target cloud platform, the target scheduling strategy is determined based on the current container tasks and nodes in the target cloud platform and the preset clustering prediction algorithm.
[0032] Secondly, this application provides a cloud container scheduling device applied to a container orchestration platform, comprising:
[0033] The event determination module is used to acquire operational data in the target cloud platform and determine whether there are any change events in the target cloud platform based on the operational data; the change events are events in which the state of nodes in the target cloud platform and the load of the target cloud platform change.
[0034] The initial strategy determination module is used to determine the current container task in the target cloud platform if the change event exists in the target cloud platform, and determine an initial container scheduling strategy based on the container task and the node in the target cloud platform; the container scheduling strategy is a strategy to allocate the container task to the node;
[0035] The population determination module is used to determine the initial container scheduling strategy as the initial population through a population prediction strategy, integrate the initial population into the historical population, perform individual pairing on the integrated population, determine movement vectors based on the successfully paired individuals, determine training samples based on the movement vectors, and train an initial neural network using the training samples to determine a first predicted population based on the trained neural network; the historical population is the historical container scheduling strategy determined when the change event did not exist; the individual is the strategy for assigning a single container task to a node; the movement vector represents the difference between successfully paired individuals.
[0036] The population merging module is used to determine a second predicted population based on a preset clustering prediction algorithm and the initial population, and to merge the first predicted population and the second predicted population into a first target predicted population.
[0037] The target strategy determination module is used to determine noise points in the first target prediction population through a preset density clustering algorithm, generate target individuals at target locations around the noise points through a offspring generation strategy, determine a second target prediction population based on the first target prediction population and the target individuals, and determine the second target prediction population as the target container scheduling strategy, so as to allocate the container tasks to the nodes using the target container scheduling strategy.
[0038] Thirdly, this application provides an electronic device, comprising:
[0039] Memory, used to store computer programs;
[0040] A processor is used to execute the computer program to implement the aforementioned cloud container scheduling method.
[0041] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned cloud container scheduling method.
[0042] In this application, operational data from a target cloud platform is acquired, and based on the operational data, it is determined whether any change events exist in the target cloud platform. The change events are events where the state of nodes and the load of the target cloud platform change. If the change events exist in the target cloud platform, the current container tasks in the target cloud platform are determined, and an initial container scheduling strategy is determined based on the container tasks and the nodes in the target cloud platform. The container scheduling strategy is a strategy for allocating the container tasks to the nodes. The initial container scheduling strategy is determined as an initial population through a population prediction strategy. The initial population is then integrated into a historical population. Individuals in the integrated population are paired, and movement vectors are determined based on the successfully paired individuals. Training samples are determined based on the movement vectors, and an initial neural network is trained using the training samples. The system determines a first predicted population based on the trained neural network. The historical population is a historical container scheduling strategy determined when the change event did not exist. Individuals are strategies for assigning individual container tasks to nodes. The movement vector represents the difference between successfully paired individuals. A second predicted population is determined based on a preset clustering prediction algorithm and the initial population, and the first and second predicted populations are merged into a first target predicted population. Noise points in the first target predicted population are identified using a preset density clustering algorithm, and target individuals are generated at target locations around the noise points using a offspring generation strategy. A second target predicted population is determined based on the first target predicted population and the target individuals, and the second target predicted population is identified as the target container scheduling strategy. The container tasks are then assigned to the nodes using the target container scheduling strategy. As can be seen from the above, in this application, the operating data of the target cloud platform is first obtained, and then the existence of change events in the target cloud platform is determined based on the operating data. If the aforementioned change events exist in the target cloud platform, the current container tasks of the target cloud platform are first determined. Then, an initial container scheduling strategy is formulated by combining the container tasks with the nodes in the target cloud platform. Afterwards, the initial container scheduling strategy is set as the initial population using a population prediction strategy. The initial population is then integrated with the historical population. Individuals are paired in the integrated population, and movement vectors are determined based on the successfully paired individuals. Training samples are then determined based on the movement vectors. The initial neural network is trained using the training samples. Finally, the first predicted population is determined based on the trained neural network. At the same time, a second predicted population is determined based on a preset clustering prediction algorithm and the initial population. Then, the first predicted population and the second predicted population are merged to obtain the first target predicted population.Finally, noise points in the first target prediction population are identified using a pre-defined density clustering algorithm. A progeny generation strategy is then applied to generate target individuals at target locations surrounding these noise points. The first target prediction population and the target individuals are then combined to determine the second target prediction population, which is then used as the target container scheduling strategy. This strategy is subsequently used to allocate container tasks to nodes. In this way, this application enables efficient, dynamic, and multi-target container task scheduling for cloud container environments, thereby improving the user experience to some extent. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0044] Figure 1 This is a flowchart of a cloud container scheduling method disclosed in this application;
[0045] Figure 2 This is a flowchart of a dynamic multi-objective optimization algorithm disclosed in this application;
[0046] Figure 3 This is a flowchart of a knowledge prediction strategy disclosed in this application;
[0047] Figure 4 This is a schematic diagram illustrating the changes in offspring generation in an open area near the knee point and noise point of a population, as disclosed in this application.
[0048] Figure 5 This is a schematic diagram of the structure of a cloud container scheduling device disclosed in this application;
[0049] Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.
[0051] Currently, existing container scheduling systems typically employ static or single-objective scheduling strategies. For example, the Kubernetes scheduler first filters based on resource requirements during the scheduling process, then comprehensively considers factors such as resource utilization, load balancing, affinity / anti-affinity, and taints and tolerance among candidate nodes to ultimately determine the most suitable node. Although existing schedulers have achieved automated resource allocation to some extent, their core mechanisms still have significant limitations, mainly in the following aspects: Single objective: Most container scheduling methods only focus on a single objective such as resource utilization or load balancing, lacking a comprehensive trade-off of multi-dimensional objectives; Lack of dynamic adaptability: In real-world cloud environments, task requests and node resource states change continuously over time, making it difficult for traditional static scheduling methods to respond promptly, easily leading to increased task latency or resource waste; High computational overhead: Although multi-objective optimization algorithms can consider multiple scheduling objectives, their computational complexity is often too high in large-scale container environments, making it difficult to meet the requirements of real-time scheduling. To address these issues, this application provides a cloud container scheduling method, apparatus, device, and storage medium that can achieve efficient, dynamic, and multi-objective container task scheduling for cloud container environments.
[0052] See Figure 1 As shown, this embodiment of the invention discloses a cloud container scheduling method, applied to a container orchestration platform, including:
[0053] Step S11: Obtain the operating data in the target cloud platform, and determine whether there are any change events in the target cloud platform based on the operating data; the change events are events in which the state of the nodes in the target cloud platform and the load of the target cloud platform change.
[0054] In this embodiment, the container orchestration platform first acquires the operational data from the target cloud platform. This operational data is the core data reflecting the real-time operational status of the target cloud platform. The operational data includes, but is not limited to, node resource utilization information, such as CPU (Central Processing Unit) utilization, memory usage, disk I / O (Input / Output), and GPU (Graphics Processing Unit) utilization; container task load information, including the real-time request count, queue length, execution time, and task priority of each container instance; network-related information, including inter-node communication latency, bandwidth utilization, and cross-availability zone data transmission; energy consumption-related information, such as server power consumption, cooling energy consumption, and overall node energy efficiency ratio; and user service quality requirement information, including Service Level Agreement (SLA) metrics, response latency requirements, task completion rate, and availability metrics. When acquiring the above-mentioned operational data, the container orchestration platform can establish data interaction with the target cloud platform through a preset monitoring interface, actively pull operational data at set time intervals, and also receive data actively pushed by the target cloud platform when operational data fluctuates, so as to ensure that the acquired operational data is real-time and complete.
[0055] After acquiring operational data, the container orchestration platform uses this data to determine whether there are any change events on the target cloud platform. These change events include, but are not limited to: changes in node status, such as node downtime, offline, failure, or the addition of new nodes; sudden increases in task load, such as a sharp increase in user requests or a sudden rise in the resource requirements of container instances; resource fluctuations, such as significant fluctuations in the availability of CPU, memory, disk, or network bandwidth resources, or uneven resource allocation among different nodes; and changes in energy and costs, such as node energy consumption exceeding thresholds or dynamic adjustments to cloud service resource prices.
[0056] Step S12: If the change event exists in the target cloud platform, determine the current container task in the target cloud platform, and determine the initial container scheduling strategy based on the container task and the node in the target cloud platform; the container scheduling strategy is the strategy of allocating the container task to the node.
[0057] In this embodiment, if a change event is determined to exist in the target cloud platform, the container orchestration platform first determines the nodes and current container tasks in the target cloud platform, and then determines the allocation matrix between the nodes and the container tasks. Specifically, a set of target container tasks can be defined. Node set ;in, Indicates the number of target tasks in the container. This represents the number of nodes. Furthermore, it defines the allocation matrix between nodes and containers. ;in, , In this allocation matrix, each element A value of 0 or 1 indicates a container task. Assign to a node In other words, when A value of 0 indicates a container task. Not assigned to a node ;when When it is 1, it indicates a container task. Assigned to node .
[0058] Subsequently, constraints are determined based on the application scenario and problem requirements of the target cloud platform, and the initial container scheduling strategy is determined using these constraints and the allocation matrix. The constraints can be represented in the form of a set, i.e. ;in, This indicates the number of constraints. The types and number of constraints will vary depending on the specific application scenario and problem requirements. Furthermore, based on all the above sets, the corresponding scheduling problem can be obtained, that is, the scheduling problem that satisfies all constraints in the environment. Under the premise of, the container target task set Assigned to the node set Through matching relationships This is to ensure that tasks are completed while minimizing resource consumption and avoiding task conflicts.
[0059] Having derived the aforementioned scheduling problem, a scheduling model can be used to solve it based on the scheduling problem and a dynamic multi-objective optimization algorithm. This generates candidate scheduling schemes that satisfy the constraints. These candidate schemes are then non-dominatedly sorted to obtain the optimal solution set. This optimal solution set can be used as the initial container scheduling strategy.
[0060] Step S13: Determine the initial container scheduling strategy as the initial population through the population prediction strategy, integrate the initial population into the historical population, perform individual pairing on the integrated population, determine the movement vector based on the successfully paired individuals, determine training samples based on the movement vectors, and train the initial neural network using the training samples to determine the first predicted population based on the trained neural network; the historical population is the historical container scheduling strategy determined when the change event did not exist; the individual is the strategy for assigning a single container task to a node; the movement vector represents the difference between successfully paired individuals.
[0061] In this embodiment, refer toFigure 2 As shown, after determining the initial container scheduling strategy as the initial population through the population prediction strategy, it can be referred to... Figure 2 The "knowledge prediction" section extracts valuable knowledge from historical solutions (i.e., the historical population) and uses this knowledge to build a neural network prediction model to predict the POS (Pareto Optimal Solution) / POF (Pareto Optimal Front). This initial population is then integrated into the historical population to form the merged population. Furthermore, Figure 2 Different colored populations can refer to populations of different generations. For example, Figure 2 In the historical population, there were originally three generations. After the initial population was integrated, the population became a fourth generation. After the integration operation, the target space of the integrated population was determined, a reference point was generated in the target space, and a reference line was generated based on the reference point and a preset origin. In the integrated population, the target distance between the reference line and individuals in the integrated population was determined. Individuals whose target distance met the preset proximity condition and belonged to the same cluster region in the target space were identified as successfully paired individuals, and a movement vector was determined based on the successfully paired individuals.
[0062] In one specific implementation, a reference point is generated in the target space. ;in, , The value range is 1 to ; The objective function related to generating the reference point; For the target space; For an individual point. A reference line extends from the origin along the direction of the reference point, and can be denoted as... Individuals in a population With reference line The distance between them can be calculated using the following formula.
[0063] ;
[0064] In the formula, For individuals With reference line The distance between them; To and Related functions; Reference point and At the reference line The distance between the projection points on the surface; yes To the reference line The vertical distance; These are the preset penalty parameters.
[0065] If selected from neighboring populations and Pairing requires individuals and They belong to the same cluster and satisfy the following formula.
[0066] ;
[0067] In the formula, express To the reference line The distance between them; Indicates a specific population within the merged population; This represents the value of the independent variable that minimizes the function in the equation. Furthermore, if no individuals in the same cluster region exist in the neighboring populations of the merged population, individuals are selected from the neighboring clusters for pairing.
[0068] When determined and Once they belong to the same cluster and satisfy the above formula, the movement vector is determined. .use dimensional vector To represent the adjacent environment The changing trend between these elements, including its direction and length, can clearly describe the direction and magnitude of environmental change. Among these, This represents the dimension of the decision variables. In high-dimensional space, polar coordinates have a significant advantage over Cartesian coordinates in representing the direction and magnitude of vectors. Therefore, the decision variables of the decision space of the integrated population are determined, and the radial and angular coordinates in polar coordinates are determined based on the decision variables and the movement vector, respectively, to complete the polar coordinate transformation operation of the movement vector. That is, the decision variables can be... dimensional vector Represented in polar coordinates, i.e. ,in, Represents angular coordinates, Radial coordinates. sum vector The angular coordinates They can be calculated using the following formulas respectively.
[0069] ;
[0070] ;
[0071] Subsequently, training samples are constructed based on the radial and angular coordinates, and an initial neural network is trained using these training samples to obtain a trained neural network. The first predicted population is then determined based on the trained neural network. That is, for the construction of the training samples, the previous population can be obtained from the integrated population. The step size and direction of movement of each individual in the population in polar coordinates. (Refer to...) Figure 3 As shown, for radial coordinates Construct training samples ;in, , , , Similarly, for Use relevant angular coordinates to construct training samples ;in, , , In short, from the population to The data acquired from the previous generation is selected as the feature vector for the neural network input, while the data from the population... The acquired data is used as output, thus forming the training samples for the neural network.
[0072] Furthermore, an initial neural network is trained using training samples. The trained neural network is then used to predict the distance and direction of movement of solutions in the current environment. For radial coordinates... ,forward The distance traveled by individuals in the merged population is used as the input to the neural network, i.e. Predicting the current situation Radial coordinates of individuals in a population in a polar coordinate system Similarly, adopting the former The movement angles of individuals in the newly integrated population are used as input to the neural network to predict the movement angles of individuals in the current population in various dimensions. The predicted solution of the generation can be obtained through The calculation yields the shift vector of the solution in the current population in polar coordinates, obtained using the above method. And vector The first predicted population can be determined by converting it to rectangular coordinates using the following formula.
[0073] .
[0074] In the formula, Indicates multiplication.
[0075] Step S14: Determine a second predicted population based on a preset clustering prediction algorithm and the initial population, and merge the first predicted population and the second predicted population into a first target predicted population.
[0076] In this embodiment, refer to Figure 2 The "knee-based clustering prediction strategy" section uses a pre-defined knee-based clustering prediction algorithm to process the initial population and determine the second predicted population. This algorithm performs clustering analysis on the characteristics of individuals in the initial population to select representative scheduling strategies as components of the second predicted population. Subsequently, the first and second predicted populations are merged to form the first target predicted population.
[0077] Step S15: Determine noise points in the first target prediction population using a preset density clustering algorithm, generate target individuals at target locations around the noise points using a offspring generation strategy, determine a second target prediction population based on the first target prediction population and the target individuals, and determine the second target prediction population as the target container scheduling strategy, so as to use the target container scheduling strategy to allocate the container tasks to the nodes.
[0078] First, it's important to clarify that in population evolution, the convergence rate refers to the speed at which individuals approach the optimal solution. Rapid convergence typically means that individuals quickly cluster in certain regions of the target space. While this rapid convergence may generate high-quality solutions in a short time, it often leads to over-concentration of the population in specific regions of the target space, ignoring other potential high-quality solutions. This uneven distribution can negatively impact solution quality, failing to fully reflect the actual distribution of the target space and increasing the risk of getting trapped in local optima. Most offspring generation strategies, such as simulated binary crossover (SBX) and arithmetic crossover (AC), tend to generate new solutions in the vicinity of their parents; therefore, the target values of most offspring in the target space are close to those of their parents. Based on this analysis, to avoid the problems of diversity loss and distribution deterioration caused by rapid population convergence, a guided evolution strategy based on density clustering is proposed. The strategy employs a hierarchical density-based spatial clustering of applications with noise (HDBSCAN) algorithm to identify noise points based on the population distribution. Subsequently, a progeny generation strategy is used to generate new individuals near noise points and knee points to fill the blank areas. This method effectively prevents the population from becoming overly concentrated in local areas, ensuring that the algorithm can explore other regions in the target space.
[0079] In this embodiment, a preset density clustering algorithm is used to process the first target prediction population to identify noise points within it. Specifically, the preset density clustering algorithm is used to determine the standard deviation of the cluster size of the first target prediction population, which reflects the dispersion of the number of individuals in each cluster.
[0080] The minimum cluster size is predefined using the HDBSCAN algorithm. (That is, a preset minimum number of points). In the initial stage, will Set as ,in, This refers to the target number of individuals. However, during the evolution of a population, the population distribution typically changes dynamically with each iteration. Therefore, adaptive adjustments are necessary. To better capture these variations, the standard deviation of cluster size (SD) was chosen as a measure of population evenness, and the formula for calculating the standard deviation is shown below.
[0081] ;
[0082] In the formula, Indicates the number of clusters; Indicates the first The number of individuals in each cluster; The average value of the cluster size is shown. .
[0083] After obtaining the standard deviation, it is determined using the formula shown below. .
[0084] ;
[0085] Referring to the above formula, that is, when the standard deviation is less than the lower limit of the preset standard deviation threshold, the sum of the preset minimum number of points and the preset fixed value is determined as the target minimum number of points; when the standard deviation is not less than the lower limit of the preset standard deviation threshold and not greater than the upper limit of the preset standard deviation threshold, the preset minimum number of points is determined as the target minimum number of points; when the standard deviation is greater than the upper limit of the preset standard deviation threshold, the difference between the preset minimum number of points and the preset fixed value is determined as the target minimum number of points. In other words, based on the calculated standard deviation... The population is divided into three categories: high uniformity, medium uniformity, and low uniformity. For high uniformity populations, MinPts is reduced to decrease the number of noise points; for low uniformity populations, MinPts is increased to introduce more noise points; for medium uniformity populations, MinPts is kept constant and adaptively adjusted using the above formula.
[0086] Next, clustering parameters are determined based on the target minimum number of points, and these parameters, along with a preset density clustering algorithm, are used to identify noise points in the first target predicted population. It should be noted that HDBSCAN is a density-based clustering algorithm that classifies data based on sample distribution and can identify clusters of arbitrary shapes, effectively detecting noisy data. In HDBSCAN, noise points refer to points that do not belong to any cluster and are typically considered outliers or anomalies.
[0087] Furthermore, refer to Figure 4 As shown, the noise point and the knee point in the first target prediction population are determined as parents through a progeny generation strategy, and target individuals are generated at the target positions around the parents. That is, since there are few other solutions around the noise point, this may reduce the search efficiency of the algorithm in this area. Therefore, the noise point is selected as the parent individual, and new solutions are generated around it using the progeny generation strategy to fill these blank areas. Furthermore, the set of knee points in the population is introduced as parents, so new solutions can be generated even in areas without noise points. For newly generated offspring, if a offspring supports a solution in the non-dominated solution set NDS (i.e., Non-Dominated Set), the solution is replaced; if it is dominated by a solution in NDS, it is added to the dominant solution set DS (i.e., Dominated Set); if it is non-dominated by a solution in NDS, it is directly added to NDS. Finally, the solutions in NDS and DS are merged and sorted by non-dominance, and the best N individuals are selected to form the Pareto optimal solution set at time t+1. Finally, the first target prediction population is merged with the generated target individuals to form the second target prediction population. The second target prediction population is then used as the target container scheduling strategy to allocate container tasks to the corresponding nodes.
[0088] Furthermore, it should be noted that if the change event does not exist in the target cloud platform, the target scheduling strategy is determined based on the current container tasks and nodes in the target cloud platform and the preset clustering prediction algorithm to ensure efficient container scheduling under stable conditions.
[0089] As can be seen from the above, in this application, the operating data of the target cloud platform is first obtained, and then the existence of change events in the target cloud platform is determined based on the operating data. If the aforementioned change events exist in the target cloud platform, the current container tasks of the target cloud platform are first determined. Then, an initial container scheduling strategy is formulated by combining the container tasks with the nodes in the target cloud platform. Afterwards, the initial container scheduling strategy is set as the initial population using a population prediction strategy. The initial population is then integrated with the historical population. Individuals are paired in the integrated population, and movement vectors are determined based on the successfully paired individuals. Training samples are then determined based on the movement vectors. The initial neural network is trained using the training samples. Finally, the first predicted population is determined based on the trained neural network. At the same time, a second predicted population is determined based on a preset clustering prediction algorithm and the initial population. Then, the first predicted population and the second predicted population are merged to obtain the first target predicted population. Finally, noise points in the first target prediction population are identified using a pre-defined density clustering algorithm. A progeny generation strategy is then applied to generate target individuals at target locations surrounding these noise points. The first target prediction population and the target individuals are then combined to determine the second target prediction population, which is then used as the target container scheduling strategy. This strategy is subsequently used to allocate container tasks to nodes. In this way, this application enables efficient, dynamic, and multi-target container task scheduling for cloud container environments, thereby improving the user experience to some extent.
[0090] Accordingly, see Figure 5 As shown in the figure, this application provides a cloud container scheduling device applied to a container orchestration platform, including:
[0091] The event determination module 11 is used to acquire the running data in the target cloud platform and determine whether there is a change event in the target cloud platform based on the running data; the change event is an event in which the state of the nodes in the target cloud platform and the load of the target cloud platform change.
[0092] The initial strategy determination module 12 is used to determine the current container task in the target cloud platform if the change event exists in the target cloud platform, and determine an initial container scheduling strategy based on the container task and the node in the target cloud platform; the container scheduling strategy is a strategy to allocate the container task to the node;
[0093] Population determination module 13 is used to determine the initial container scheduling strategy as the initial population through a population prediction strategy, integrate the initial population into the historical population, perform individual pairing on the integrated population, determine movement vectors based on the successfully paired individuals, determine training samples based on the movement vectors, and train an initial neural network using the training samples to determine a first predicted population based on the trained neural network; the historical population is the historical container scheduling strategy determined when the change event did not exist; the individual is the strategy for assigning a single container task to a node; the movement vector represents the difference between successfully paired individuals.
[0094] Population merging module 14 is used to determine a second predicted population based on a preset clustering prediction algorithm and the initial population, and to merge the first predicted population and the second predicted population into a first target predicted population;
[0095] The target strategy determination module 15 is used to determine noise points in the first target prediction population through a preset density clustering algorithm, generate target individuals at target locations around the noise points through a offspring generation strategy, determine a second target prediction population based on the first target prediction population and the target individuals, and determine the second target prediction population as the target container scheduling strategy, so as to allocate the container tasks to the nodes using the target container scheduling strategy.
[0096] In some specific embodiments, the initial strategy determination module 12 specifically includes:
[0097] A matrix determination unit is used to determine the nodes and current container tasks in the target cloud platform, and to determine the allocation matrix between the nodes and the container tasks;
[0098] The first strategy determination unit is used to determine constraints based on the application scenario and problem requirements of the target cloud platform, and to determine the initial container scheduling strategy using the constraints and the allocation matrix.
[0099] In some specific embodiments, the population determination module 13 specifically includes:
[0100] A reference line generation unit is used to determine the target space of the integrated population, generate reference points in the target space, and generate reference lines based on the reference points and a preset origin.
[0101] The vector determination unit is used to determine the target distance between the reference line and individuals in the integrated population, identify individuals whose target distance meets the preset close distance condition and belong to the same clustering region in the target space as successfully paired individuals, and determine the movement vector based on the successfully paired individuals.
[0102] In some specific embodiments, the population determination module 13 specifically includes:
[0103] A variable determination unit is used to determine the decision variables of the decision space of the integrated population;
[0104] The vector transformation unit is used to determine the radial coordinates and angular coordinates in polar coordinates based on the decision variables and the movement vector, respectively, so as to complete the polar coordinate transformation operation of the movement vector;
[0105] A network training unit is used to construct training samples based on the radial coordinates and the angular coordinates, and to train an initial neural network using the training samples.
[0106] In some specific embodiments, the target strategy determination module 15 specifically includes:
[0107] The standard deviation determination unit is used to determine the standard deviation of the cluster size of the first target predicted population through a preset density clustering algorithm;
[0108] The first point determination unit is used to determine the sum of the preset minimum point number and the preset fixed value as the target minimum point number when the standard deviation is less than the preset standard deviation threshold lower limit.
[0109] The second point determination unit is used to determine the preset minimum point number as the target minimum point number when the standard deviation is not less than the preset standard deviation threshold lower limit and not greater than the preset standard deviation threshold upper limit.
[0110] The third point determination unit is used to determine the difference between the preset minimum point number and the preset fixed value as the target minimum point number when the standard deviation is greater than the preset standard deviation threshold upper limit.
[0111] The noise point determination unit is used to determine clustering parameters based on the target minimum number of points, and to determine noise points in the first target prediction population using the clustering parameters and a preset density clustering algorithm.
[0112] In some specific embodiments, the target strategy determination module 15 specifically includes:
[0113] An individual generation unit is used to determine the noise point and the knee point in the first target prediction population as the parent generation through a offspring generation strategy, and to generate target individuals at target locations around the parent generation.
[0114] In some specific implementations, it further includes:
[0115] The strategy determination unit is used to determine the target scheduling strategy based on the current container tasks and nodes in the target cloud platform and the preset clustering prediction algorithm if the change event does not exist in the target cloud platform.
[0116] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the cloud container scheduling method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0117] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0118] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0119] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the cloud container scheduling method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0120] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned cloud container scheduling method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0121] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0122] 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.
[0123] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0124] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0125] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A cloud container scheduling method, characterized in that, Applications in container orchestration platforms include: Obtain operational data from the target cloud platform, and determine whether there are any change events in the target cloud platform based on the operational data; the change events are events in which the state of nodes in the target cloud platform and the load of the target cloud platform change. If the change event exists in the target cloud platform, the current container task in the target cloud platform is determined, and an initial container scheduling strategy is determined based on the container task and the node in the target cloud platform; the container scheduling strategy is a strategy to allocate the container task to the node. The initial container scheduling strategy is determined as the initial population through a population prediction strategy. This initial population is then integrated into a historical population. Individuals in the integrated population are paired, and movement vectors are determined based on the successfully paired individuals. Training samples are then determined based on these movement vectors, and an initial neural network is trained using these training samples. A first predicted population is then determined based on the trained neural network. The historical population refers to the historical container scheduling strategy determined when the change event did not exist. Individuals are strategies for assigning single container tasks to nodes. The movement vectors represent the differences between successfully paired individuals. A second predicted population is determined based on a preset clustering prediction algorithm and the initial population, and the first predicted population and the second predicted population are merged into a first target predicted population. Noise points in the first target prediction population are determined by a preset density clustering algorithm. Target individuals are generated at target locations around the noise points by a progeny generation strategy. A second target prediction population is determined based on the first target prediction population and the target individuals. The second target prediction population is then used as the target container scheduling strategy to allocate container tasks to the nodes.
2. The cloud container scheduling method according to claim 1, characterized in that, The step of determining the current container task in the target cloud platform and determining the initial container scheduling strategy based on the container task and the nodes in the target cloud platform includes: Identify the nodes and current container tasks in the target cloud platform, and determine the allocation matrix between the nodes and the container tasks; Constraints are determined based on the application scenarios and problem requirements of the target cloud platform, and the initial container scheduling strategy is determined using the constraints and the allocation matrix.
3. The cloud container scheduling method according to claim 1, characterized in that, The process of pairing individuals in the resulting integrated population and determining movement vectors based on successfully paired individuals includes: Determine the target space of the integrated population, generate reference points in the target space, and generate reference lines based on the reference points and a preset origin. In the integrated population, the target distance between the reference line and the individuals in the integrated population is determined. Individuals whose target distance meets the preset close distance condition and belong to the same clustering region in the target space are identified as successfully paired individuals, and a movement vector is determined based on the successfully paired individuals.
4. The cloud container scheduling method according to claim 1, characterized in that, The step of determining training samples based on the movement vector and training an initial neural network using the training samples includes: Determine the decision variables of the decision space of the integrated population; Based on the decision variables and the movement vector, the radial and angular coordinates in polar coordinates are determined respectively to complete the polar coordinate transformation operation of the movement vector; Training samples are constructed based on the radial and angular coordinates, and the initial neural network is trained using the training samples.
5. The cloud container scheduling method according to claim 1, characterized in that, The step of determining noise points in the first target prediction population using a preset density clustering algorithm includes: The standard deviation of the cluster size of the first target predicted population is determined by a preset density clustering algorithm; When the standard deviation is less than the lower limit of the preset standard deviation threshold, the sum of the preset minimum number of points and the preset fixed value is determined as the target minimum number of points; If the standard deviation is not less than the lower limit of the preset standard deviation threshold and not greater than the upper limit of the preset standard deviation threshold, then the preset minimum number of points is determined as the target minimum number of points; When the standard deviation is greater than the upper limit of the preset standard deviation threshold, the difference between the preset minimum number of points and the preset fixed value is determined as the target minimum number of points; Clustering parameters are determined based on the target minimum number of points, and noise points in the first target prediction population are determined using the clustering parameters and a preset density clustering algorithm.
6. The cloud container scheduling method according to claim 1, characterized in that, The generation of target individuals at target locations around the noise points using a child generation strategy includes: The noise point and the knee point in the first target prediction population are determined as the parent by the offspring generation strategy, and the target individual is generated at the target position around the parent.
7. The cloud container scheduling method according to claim 1, characterized in that, Also includes: If the change event does not exist in the target cloud platform, the target container scheduling strategy is determined based on the current container tasks and nodes in the target cloud platform and the preset clustering prediction algorithm.
8. A cloud container scheduling device, characterized in that, Applications in container orchestration platforms include: The event determination module is used to acquire operational data in the target cloud platform and determine whether there are any change events in the target cloud platform based on the operational data; the change events are events in which the state of nodes in the target cloud platform and the load of the target cloud platform change. The initial strategy determination module is used to determine the current container task in the target cloud platform if the change event exists in the target cloud platform, and determine an initial container scheduling strategy based on the container task and the node in the target cloud platform; the container scheduling strategy is a strategy to allocate the container task to the node; The population determination module is used to determine the initial container scheduling strategy as the initial population through a population prediction strategy, integrate the initial population into the historical population, perform individual pairing on the integrated population, determine movement vectors based on the successfully paired individuals, determine training samples based on the movement vectors, and train an initial neural network using the training samples to determine a first predicted population based on the trained neural network; the historical population is the historical container scheduling strategy determined when the change event did not exist; the individual is the strategy for assigning a single container task to a node; the movement vector represents the difference between successfully paired individuals. The population merging module is used to determine a second predicted population based on a preset clustering prediction algorithm and the initial population, and to merge the first predicted population and the second predicted population into a first target predicted population. The target strategy determination module is used to determine noise points in the first target prediction population through a preset density clustering algorithm, generate target individuals at target locations around the noise points through a offspring generation strategy, determine a second target prediction population based on the first target prediction population and the target individuals, and determine the second target prediction population as the target container scheduling strategy, so as to allocate the container tasks to the nodes using the target container scheduling strategy.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the cloud container scheduling method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the cloud container scheduling method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Workflow scheduling method and system oriented to cloud environment
CN114595914A
Container cluster scheduling method and device, equipment and storage medium
CN114675933A