Task adaptive distribution method and device based on chaotic mapping and medium

By applying chaotic mapping and t-distribution improved particle swarm optimization algorithm in distributed clusters, the problem of resource load imbalance in container platform task distribution and scheduling is solved, and resource utilization and computing efficiency are improved.

CN118733255APending Publication Date: 2024-10-01CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410722074.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing task distribution and scheduling based on container platforms is difficult to ensure node resource load balancing in a distributed cluster environment, resulting in a decrease in computing efficiency.

Method used

An improved particle swarm optimization algorithm based on chaotic mapping is used, and the particle swarm optimization algorithm is adjusted through Tent sequence and t distribution to find the optimal distribution plan for tasks to optimize resource scheduling and ensure load balancing of cluster node resources.

Benefits of technology

It significantly reduces the average resource imbalance of the cluster and improves resource utilization. Compared with the native scheduling algorithm, the cluster load balance is reduced by more than 6%, and it maintains more stable resource allocation when the number of nodes increases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733255A_ABST
    Figure CN118733255A_ABST
Patent Text Reader

Abstract

The invention provides a task adaptive distribution method and device based on chaotic mapping and a medium, and relates to the technical field of containerized platform scheduling in edge computing, and the method comprises the steps: obtaining a to-be-distributed task of deep learning; improving a standard particle swarm optimization algorithm through chaotic sequence Tent and t distribution; obtaining an optimal solution of the to-be-distributed task through an improved standard particle swarm optimization algorithm; and determining a resource scheduling scheme of the cluster nodes according to the optimal solution. According to the method, the particle swarm optimization algorithm is improved by combining chaotic Tent mapping and t distribution fusion, the load imbalance degree of cluster nodes is improved, and the average cluster resource imbalance degree is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of containerized platform scheduling in edge computing, and in particular to a method, device and medium for adaptively distributing tasks based on chaotic mapping. Background Art

[0002] Limited by the complexity of big data and deep learning calculations, the deep learning model has insufficient adaptive learning capabilities for real-time data when used for prediction simulation, and the deep learning model has low calculation efficiency. The data input into the deep learning model requires data access and processing. The real-time stream processing framework can be combined to containerize the stream processing tools and deep learning tasks. The stream processing framework and deep learning tasks are encapsulated as independent containers to achieve task isolation and flexible deployment. During the deployment process, in order to better ensure the balanced utilization of container cluster resources, a task adaptive distribution algorithm needs to be used.

[0003] When integrating the real-time streaming data computing framework, considering that the training and operation of deep learning models can be based on a multi-node containerized technology platform, when multiple deep learning tasks are running in the environment, resource issues and node issues in the system are particularly prominent. For example, frequent data sending and receiving operations will bring difficulties to the balanced utilization of resources in the cluster nodes, which will reduce the computing efficiency of the entire environment. The native scheduling decision-making scheme commonly used by Kubernetes in the underlying container orchestration system is difficult to meet diverse needs. Therefore, for more abundant needs, the native task adaptive distribution algorithm needs to be further improved. In recent years, in the research of task adaptive distribution algorithms and scheduling processes, indicators such as resource utilization, execution delay, and node balance are the focus of attention. However, the existing task distribution scheduling strategy based on the container platform is difficult to ensure the load balancing of node resources in the distributed cluster environment. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device and medium for adaptive task distribution based on chaotic mapping in order to solve the problem that the existing task distribution scheduling based on container platform is difficult to ensure the load balancing of node resources in distributed cluster environment.

[0005] The above-mentioned purpose of the present application is achieved through the following technical solutions: S1: Get the tasks to be distributed for deep learning; S2: Improve the standard particle swarm optimization algorithm by using chaotic sequence Tent and t distribution; S3: Obtain the optimal solution for the task to be distributed through the improved standard particle swarm optimization algorithm; S4: Determine the resource scheduling plan for the cluster nodes based on the optimal solution.

[0006] Optionally, step S1 includes: Set up a computing node for adaptive task distribution. The computing node receives tasks, respectively, For the The resource requirement of a task is expressed as , respectively expressed as The CPU, GPU, and memory requirements of each task; Assume that there are Computation nodes, represented by ; No. Compute nodes The total number of resources is ; Allocatable resources are represented by ( , respectively representing the number of allocatable CPU resources, GPU resources, and memory resources; Using the Matrix Indicates the task To the compute node The distribution relationship is as follows:

[0007] in ,when When the value is 0, it means the task Assigned in superior.

[0008] Optionally, step S2 includes: S21: A particle swarm optimization algorithm with an inertia weight coefficient is used to apply an inertia weight to the particle velocity in each iteration. The algorithm formula is as follows:

[0009]

[0010] Among them, when the inertia weight If it is 1, it becomes a standard particle swarm optimization algorithm; represents the particle velocity; represents the acceleration factor, which is a non-negative constant; Represents a random number distributed between [0,1]; represents individual extreme values; represents the position of the i-th particle in space; Indicates the extreme value of the group; Indicates the maximum value of inertia weight; Indicates the minimum inertia weight; Indicates the maximum exercise time; S22: Initialize the particle swarm optimization algorithm through the chaotic sequence Tent mapping. The expression of the chaotic sequence Tent mapping is as follows:

[0011] in, Represents the i-th value in the sequence; Represents each value in the sequence; Generate random numbers in the interval [0,1], calculate the new sequence, and stop iterating when the number of iterations reaches the maximum; S23: Adjust the speed and position of each particle generated in the standard particle swarm optimization algorithm through t distribution.

[0012] Optionally, step S3 includes: S31: Initialize the number of particles, and mark the required resources obtained for each task to be distributed in order of particles; the required resources include: CPU resources, GPU resources and memory resources; S32: Particles are distributed on the computing nodes, and the kth particle is calculated to be the task to be distributed Assign to compute nodes probability; According to the hash calculation, nodes that meet the allocation conditions are selected as tasks to be distributed. Assigned nodes; S33: perform task allocation according to the kth particle and locally update all computing nodes; S34: Calculate the load balance of cluster nodes; S35: Based on the optimal solution and average resource imbalance in historical resource scheduling solutions The minimum threshold of is used to determine whether all particles have completed the search. If the search is completed, the iteration is terminated and the optimal solution of the task to be distributed is calculated. If the search is not completed, the process returns to step S32; Determine whether the maximum number of iterations and the load imbalance threshold are reached. If the conditions are met, return the optimal solution for the task to be distributed. If the conditions are not met, return to step S32.

[0013] Optionally, use To measure the load balancing of cluster nodes, as follows:

[0014] in, It is calculated by the maximum load rate and resource quantity, where , and Indicates the influence of resources on the load balancing of computing nodes, and the sum is 1; Represents the Tent mapping and t-distribution optimization particle swarm optimization algorithm for cluster node CPU, GPU and memory; Indicates the allocatable CPU resources, GPU resources, and memory resources.

[0015] Optionally, the average resource imbalance ,as follows:

[0016] in, Indicates the utilization of a single resource; Indicates the number of resource types; Indicates the number of computing devices.

[0017] An electronic device comprises a processor, a memory, a user interface and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes a task adaptive distribution method based on chaotic mapping.

[0018] A computer-readable storage medium stores instructions. When the instructions are executed, a task adaptive distribution method based on chaotic mapping is executed.

[0019] The beneficial effects of the technical solution provided by this application are: The task adaptive distribution algorithm of the container platform is a hot topic in the field of edge cloud computing and an important method to ensure the load balancing of node resources in a distributed cluster environment. Aiming at the problem of cluster node resource load balancing in a distributed computing environment based on a container platform, the present invention conducts research around the improvement of cluster intelligent optimization algorithms. The present invention proposes a task adaptive distribution algorithm based on chaotic mapping intelligent optimization. The task adaptive distribution algorithm is an improved particle swarm optimization algorithm that couples chaotic mapping and t distribution to find the optimal solution. The algorithm optimizes the task adaptive distribution algorithm of the container orchestration tool, improves the load imbalance of cluster nodes, and reduces the average resource imbalance of the cluster by more than 6% compared with the original scheduling algorithm of the container orchestration. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The present application will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1 It is a flow chart of an improved particle swarm optimization algorithm of a task adaptive distribution method based on chaotic mapping in an embodiment of the present application; Figure 2 It is a load balancing situation diagram of the CPU resources of the cluster nodes under the scheduling of the task adaptive distribution method based on chaotic mapping in the embodiment of the present application; Figure 3It is a load balancing situation diagram under the scheduling of cluster node memory resources of the task adaptive distribution method based on chaotic mapping in the embodiment of the present application; Figure 4 This is a load balancing diagram of cluster node GPU resources under scheduling of the task adaptive distribution method based on chaotic mapping in an embodiment of the present application; Figure 5 This is a diagram showing the situation in which the imbalance degree of cluster node resources of the task adaptive distribution method based on chaotic mapping increases with the number of nodes in an embodiment of the present application; Figure 6 It is a schematic diagram of the electronic device structure of the task adaptive distribution method based on chaotic mapping in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to have a clearer understanding of the technical features, purposes and effects of the present application, the specific implementation methods of the present application are now described in detail with reference to the accompanying drawings.

[0022] An embodiment of the present application provides a task adaptive distribution method based on chaotic mapping.

[0023] Please refer to Figure 1 , Figure 1 : is a flowchart of a method for adaptively distributing tasks based on chaotic mapping in an embodiment of the present application, comprising: S1: Get the tasks to be distributed for deep learning; S2: Improve the standard particle swarm optimization algorithm by using chaotic sequence Tent and t distribution; S3: Obtain the optimal solution for the task to be distributed through the improved standard particle swarm optimization algorithm; S4: Determine the resource scheduling plan for the cluster nodes based on the optimal solution.

[0024] Step S1 includes: Set up a computing node for adaptive task distribution. The computing node receives tasks, respectively, For the The resource requirement of a task is expressed as , respectively expressed as The CPU, GPU, and memory requirements of each task; Assume that there are Computation nodes, represented by ; No. Compute nodes The total number of resources is ; Allocatable resources are represented by ( , respectively representing the number of allocatable CPU resources, GPU resources, and memory resources; Using the Matrix Indicates the task To the compute node The distribution relationship is as follows:

[0025] in ,when When the value is 0, it means the task Assigned in superior.

[0026] Step S2 includes: S21: A particle swarm optimization algorithm with an inertia weight coefficient is used to apply an inertia weight to the particle velocity in each iteration. The algorithm formula is as follows:

[0027]

[0028] Among them, when the inertia weight If it is 1, it becomes a standard particle swarm optimization algorithm; represents the particle velocity; represents the acceleration factor, which is a non-negative constant; Represents a random number distributed between [0,1]; represents individual extreme values; represents the position of the i-th particle in space; Indicates the extreme value of the group; Indicates the maximum value of inertia weight; Indicates the minimum inertia weight; Indicates the maximum exercise time; Specifically, by adjusting the inertia weight The control algorithm has local and global search capabilities. When the inertia weight is greater than 1, the particles accelerate and increase the search range. Conversely, the particles decelerate and reduce the search range. In actual execution, the particle swarm optimization algorithm with inertia weight is more difficult to control in terms of accuracy and convergence speed than the standard particle swarm optimization algorithm, and it is necessary to continuously optimize the parameters to obtain a better solution. The standard particle swarm optimization is limited by the random initialization of population information and the lack of diversity, which ultimately leads to the insufficient optimization ability of the standard particle swarm algorithm.

[0029] Specifically, the characteristics of chaotic variables make them highly random, and they can be widely explored in the search space, which helps to find potential optimization solutions. At the same time, chaotic variables are also ergodic, and can cover the entire search space during the search process to avoid falling into local optimal solutions. In addition, chaotic variables also have certain regularities, which are used by optimization algorithms to improve search efficiency.

[0030] Specifically, a chaotic sequence is a sequence of numbers generated by applying a chaotic mapping method. Among them, the Tent sequence is a common chaotic sequence, which is generated by repeatedly applying a specific mapping function. The Logistic sequence is another commonly used chaotic sequence, which is generated by recursively applying the logistic mapping function. By using a chaotic sequence as the initial value or random parameter of the algorithm, the global search ability of the algorithm can be enhanced, the optimization effect can be improved, and the diversity of the algorithm can be increased, so as to better explore the search space. Compared with the Logistic mapping, the Tent mapping can make the optimization algorithm converge faster and the distribution more balanced. Therefore, this application uses the chaotic sequence Tent mapping to initialize the particle swarm optimization algorithm to improve the standard particle swarm optimization.

[0031] S22: Initialize the particle swarm optimization algorithm through the chaotic sequence Tent mapping. The expression of the chaotic sequence Tent mapping is as follows:

[0032] in, Represents the i-th value in the sequence; Represents each value in the sequence; Generate random numbers in the interval [0,1], calculate the new sequence, and stop iterating when the number of iterations reaches the maximum; S23: Adjust the speed and position of each particle generated in the standard particle swarm optimization algorithm through t distribution.

[0034] Specifically, in the initialization phase, the chaotic sequence Tent mapping is used to improve the global search ability of particles, and the t distribution is used to help particles avoid local optimality and improve the ability of the optimization algorithm to find the global optimal solution. The t distribution is a distribution with a long tail. Compared with the normal distribution, it has better robustness to outliers. The adaptive t distribution dynamically adjusts the parameters of the distribution according to the historical performance of the particles to adapt to the characteristics of the optimization problem. In the application of the adaptive t distribution, each particle maintains a t distribution to generate random values ​​for speed and position updates. The parameters (degrees of freedom and scale) of this t distribution are adaptively adjusted according to the performance of the particle. If the particle encounters a better solution in the search space, the degree of freedom of the t distribution will increase, making the distribution closer to the normal distribution and accelerating the search process. On the contrary, if the particle falls into a worse solution, the degree of freedom of the t distribution will decrease, making the tail of the distribution longer, which helps to jump out of the local optimal solution. The introduction of the adaptive t distribution improves the global search ability and convergence speed of the particle swarm optimization algorithm, making the algorithm more robust. It helps the particle swarm optimization algorithm to better handle outliers and avoid converging to the local optimal solution too early. This adaptive mechanism makes the particle swarm optimization algorithm more suitable for various optimization problems, especially in the presence of outliers or complex search spaces. Therefore, this application combines chaotic Tent mapping and t distribution fusion to improve the particle swarm optimization algorithm, and improves the particle swarm optimization algorithm process. Figure 1 shown.

[0035] Step S3 includes: S31: Initialize the number of particles, and mark the required resources obtained for each task to be distributed in order of particles; the required resources include: CPU resources, GPU resources and memory resources; S32: Particles are distributed on the computing nodes, and the kth particle is calculated to be the task to be distributed Assign to compute nodes probability; According to the hash calculation, nodes that meet the allocation conditions are selected as tasks to be distributed. Assigned nodes; S33: perform task allocation according to the kth particle and locally update all computing nodes; S34: Calculate the load balance of cluster nodes; S35: Based on the optimal solution and average resource imbalance in historical resource scheduling solutions The minimum threshold of is used to determine whether all particles have completed the search. If the search is completed, the iteration is terminated and the optimal solution of the task to be distributed is calculated. If the search is not completed, the process returns to step S32; Determine whether the maximum number of iterations and the load imbalance threshold are reached. If the conditions are met, return the optimal solution for the task to be distributed. If the conditions are not met, return to step S32.

[0036] use To measure the load balancing of cluster nodes, as follows:

[0037] in, It is calculated by the maximum load rate and resource quantity, where , and Indicates the influence of resources on the load balancing of computing nodes, and the sum is 1; Represents the Tent mapping and t-distribution optimization particle swarm optimization algorithm for cluster node CPU, GPU and memory; Indicates the allocatable CPU resources, GPU resources, and memory resources.

[0038] Specifically, Figure 2 , Figure 3 , Figure 4 The load balancing of BRA and LRA under the scheduling of cluster node CPU resources, memory resources and GPU resources are compared for TTPSO algorithm.

[0039] The average resource imbalance ,as follows:

[0040] in, Indicates the utilization of a single resource; Indicates the number of resource types; Indicates the number of computing devices.

[0041] For the task adaptive distribution algorithm based on the improved particle swarm optimization algorithm (TTPSO) proposed in this application, the experimental parameter settings are shown in Table 1.

[0042] Table 1 Parameter settings of the task adaptive distribution algorithm of TTPSO algorithm

[0043] Before testing the effect of the improved particle swarm optimization algorithm in task adaptive distribution, it is necessary to first select common test functions for comparative verification. The test functions selected in this application are Ackley, Griewank, and Quartic, and their calculation formulas are shown in Table 2.

[0044] Table 2 Test functions and calculation formulas selected in this application

[0045] In order to test the performance of the TTPSO algorithm proposed in this application, the ant colony algorithm (ICA), sparrow algorithm (SSA), and standard particle swarm algorithm (PSO) were selected to run 20 times independently on the above three test functions to take the average value. The running value range and number of iterations of each algorithm on each test function are shown in Table 3. According to the results in the table, the TTPSO algorithm (particle swarm optimization algorithm improved based on chaotic mapping) proposed in this application performs better than other algorithms on each test function.

[0046] Table 3 The operating value range and iteration times of the comparison algorithm selected in this application

[0047] When the native integrated LRA algorithm is used for task adaptive distribution, the maximum difference in CPU, GPU, and memory resource utilization of different nodes in the cluster is 65%, 58%, and 71% respectively; when the native BRA algorithm is used to schedule deep learning tasks, the maximum difference in CPU, GPU, and memory resource utilization of different nodes in the cluster is 60%, 64%, and 55% respectively. The memory resource utilization is in the range of 56% to 73%, and there is no memory resource overload. When the TTPSO algorithm is used, the utilization of various memory resources is more stable, and the variance of the 20 simulation results is reduced by 12% and 9% compared with LRA and BRA respectively.

[0048] like Figure 5 As shown in the figure, the TTPSO algorithm has obvious differences in the situation where the imbalance of cluster node resources increases with the number of nodes compared with BRA and LRA. As the number of nodes continues to increase, the overall RIR of the cluster shows an upward trend when using LRA and BRA for scheduling deep learning tasks. In most cases, it is higher than using TTPSO as a task adaptive distribution algorithm. At the same time, the RIR increase rate is lower when TTPSO performs task adaptive distribution, which better reduces the load imbalance of the cluster.

[0049] The present application also discloses an electronic device. Figure 6 , Figure 6 The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .

[0050] The communication bus 502 is used to realize the connection and communication between these components.

[0051] The user interface 503 may include a display screen and a camera, and the optional user interface 503 may also include a standard wired interface and a wireless interface.

[0052] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0053] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.

[0054] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A task adaptive distribution method based on chaotic mapping, characterized in that: The method comprises the following steps: S1: Get the tasks to be distributed for deep learning; S2: Improve the standard particle swarm optimization algorithm by using chaotic sequence Tent and t distribution; S3: Obtain the optimal solution for the task to be distributed through the improved standard particle swarm optimization algorithm; S4: Determine the resource scheduling plan for the cluster nodes based on the optimal solution.

2. The method for adaptively distributing tasks based on chaotic mapping according to claim 1, characterized in that: Step S1 includes: Set up a computing node for adaptive task distribution. The computing node receives tasks, respectively, For the The resource requirement of a task is expressed as , respectively expressed as The CPU, GPU, and memory requirements of each task; Assume that there are Computation nodes, represented by ; No. Compute nodes The total number of resources is ; Allocatable resources are represented by ( , respectively representing the number of allocatable CPU resources, GPU resources, and memory resources; Using the Matrix Indicates the task To the compute node The distribution relationship is as follows: in ,when When the value is 0, it means the task Assigned in superior.

3. The method for adaptively distributing tasks based on chaotic mapping as claimed in claim 2, characterized in that: Step S2 includes: S21: A particle swarm optimization algorithm with an inertia weight coefficient is used to apply an inertia weight to the particle velocity in each iteration. The algorithm formula is as follows: Among them, when the inertia weight If it is 1, it becomes a standard particle swarm optimization algorithm; represents the particle velocity; represents the acceleration factor, which is a non-negative constant; Represents a random number distributed between [0,1]; represents individual extreme values; represents the position of the i-th particle in space; Indicates the extreme value of the group; Indicates the maximum value of inertia weight; Indicates the minimum inertia weight; Indicates the maximum exercise time; S22: Initialize the particle swarm optimization algorithm through the chaotic sequence Tent mapping. The expression of the chaotic sequence Tent mapping is as follows: in, Represents the i-th value in the sequence; Represents each value in the sequence; Generate random numbers in the interval [0,1], calculate the new sequence, and stop iterating when the number of iterations reaches the maximum; S23: Adjust the speed and position of each particle generated in the standard particle swarm optimization algorithm through t distribution.

4. The method for adaptively distributing tasks based on chaotic mapping as claimed in claim 3, characterized in that: Step S3 includes: S31: Initialize the number of particles, and mark the required resources obtained for each task to be distributed in order of particles; the required resources include: CPU resources, GPU resources and memory resources; S32: Particles are distributed on the computing nodes, and the kth particle is calculated to be the task to be distributed Assign to compute nodes probability; According to the hash calculation, nodes that meet the allocation conditions are selected as tasks to be distributed. Assigned nodes; S33: perform task allocation according to the kth particle and locally update all computing nodes; S34: Calculate the load balance of cluster nodes; S35: Based on the optimal solution and average resource imbalance in historical resource scheduling solutions The minimum threshold of is used to determine whether all particles have completed the search. If the search is completed, the iteration is terminated and the optimal solution of the task to be distributed is calculated. If the search is not completed, the process returns to step S32; Determine whether the maximum number of iterations and the load imbalance threshold are reached. If the conditions are met, return the optimal solution for the task to be distributed. If the conditions are not met, return to step S32.

5. The method for adaptively distributing tasks based on chaotic mapping as claimed in claim 4, characterized in that: use To measure the load balancing of cluster nodes, as follows: in, It is calculated by the maximum load rate and resource quantity, where , and Indicates the influence of resources on the load balancing of computing nodes, and the sum is 1; Represents the Tent mapping and t-distribution optimization particle swarm optimization algorithm for cluster node CPU, GPU and memory; Indicates the allocatable CPU resources, GPU resources, and memory resources.

6. The method for adaptively distributing tasks based on chaotic mapping as claimed in claim 4, characterized in that: The average resource imbalance ,as follows: in, Indicates the utilization rate of a single resource; Indicates the number of resource types; Indicates the number of computing devices.

7. An electronic device, characterized in that: The electronic device comprises a processor (501), a memory (505), a user interface (503) and a network interface (504), wherein the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device executes the method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by a computer, the method steps according to any one of claims 1 to 6 are performed.

Citation Information

Cited By

  • Chaotic engineering application scene experiment implementation method based on ant colony algorithm

    CN119759626A