Task allocation method and device for computing tasks

The individual positions of the initial population are optimized by using the good point set generation function and multi-objective optimization algorithm. Combined with the dynamic weight factor and activation function, the problem of insufficient diversity of task allocation schemes is solved, and the task performance and stability of the cloud computing platform are improved.

CN120780465APending Publication Date: 2025-10-14INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510832872.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

In the existing technology, when performing task allocation based on a multi-objective optimization algorithm, the search in the solution space is not comprehensive enough, resulting in insufficient diversity of solutions and poor diversity and practicality of the output task allocation solutions.

Method used

The good point set generation function is used to initialize the individual positions of the initial population, and combined with the multi-objective optimization algorithm, the path function and the objective function are searched, the weight factor and the activation function are dynamically adjusted to optimize the flame position, and the optimal individual is found to obtain the best allocation solution.

Benefits of technology

It improves the diversity and practicality of task allocation schemes, improves the task performance, reliability and stability of cloud computing platforms, and enhances the global optimization ability and convergence speed of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780465A_ABST
    Figure CN120780465A_ABST
Patent Text Reader

Abstract

The invention provides a task allocation method and device for calculation tasks. The method comprises the steps of obtaining task attributes and resource state information of to-be-allocated calculation tasks; calculating an initial position of each initial individual in the initial population based on a good point set generation function, task attributes and resource state information; based on a multi-objective optimization algorithm and an optimization objective, searching to obtain an optimal individual corresponding to the initial population; and based on the optimal individual, obtaining an optimal allocation scheme of the to-be-allocated calculation task. According to the method provided by the invention, an initial position of each initial individual in an initial population is calculated through a good point set generation function, application task attributes and resource state information; based on a multi-objective optimization algorithm and an optimization objective, searching to obtain an optimal flame corresponding to the initial population; based on the optimal flame, the optimal distribution scheme is obtained, the practicability and diversity of the distribution scheme are improved, and then the task performance, reliability and stability of the cloud computing platform are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a method and device for allocating computing tasks. Background Art

[0002] While cloud computing solves many programming challenges for small users, it also presents some unavoidable challenges. For example, the diverse needs of different users are difficult to integrate and optimize. The storage and management of massive amounts of data present challenges. As the number of users and the amount of data processed increase, ensuring high system availability and performance becomes a pressing issue. Consequently, issues such as the reliability, security, and privacy of cloud computing platforms will become increasingly important as demand grows. Currently, multi-objective optimization algorithms can be used to allocate computing tasks within cloud computing platforms.

[0003] However, when currently performing task allocation based on multi-objective optimization algorithms, the search in the solution space is not comprehensive enough, resulting in insufficient diversity of solutions. This results in insufficient diversity in the output task allocation solutions, making them less practical. Summary of the Invention

[0004] The present invention provides a method and device for assigning computing tasks, which are used to solve the defects in the prior art that the search in the solution space is not comprehensive enough, resulting in insufficient diversity of solutions, and leading to insufficient diversity and poor practicality of the output task allocation solutions.

[0005] The present invention provides a method for allocating computing tasks, comprising: Obtain the task attributes and resource status information of the computing task to be assigned; Based on the good point set generation function, the task attributes and the resource status information, the initial position of each initial individual in the initial population is calculated; Based on the multi-objective optimization algorithm and the optimization goal, searching for the optimal individual corresponding to the initial population; Based on the optimal individual, an optimal allocation scheme for the computing tasks to be allocated is obtained.

[0006] According to a method for allocating computing tasks provided by the present invention, the initial position of each initial individual in the initial population is calculated based on the good point set generation function, the task attributes, and the resource status information, including: Building a task-resource relationship model based on the task attributes and the resource status information; Based on the task-resource relationship model, constructing a base point of a good point set; Based on the good point set generation function, the good point set base point is applied to calculate the coordinates of the good point set; The coordinates of the good point set are respectively used as the initial positions of the initial individuals.

[0007] According to a method for allocating computing tasks provided by the present invention, the multi-objective optimization algorithm includes a path function; The method of searching for the optimal individual corresponding to the initial population based on the multi-objective optimization algorithm and the optimization goal includes: Obtaining an optimization goal of the computing task to be assigned, and constructing an objective function based on the optimization goal; Based on the initial individuals, searching for the initial flame according to the path function to obtain the optimized position of the initial individuals; Based on the objective function, calculating the fitness value of each initial individual at the optimized position; Based on the fitness value, high-quality individuals are selected from the initial population, and based on the high-quality individuals, high-quality flames are selected from the initial flames; Repeatedly searching for the high-quality flame based on the initial individuals according to the path function to obtain an updated optimized position of the initial individuals, calculating an updated fitness value of the initial individuals at the updated optimized position based on the objective function, selecting an updated high-quality individual from the initial population based on the updated fitness value, and selecting an updated high-quality flame from the high-quality flame based on the updated high-quality individual, until the current number of iterations reaches a preset condition, and taking the updated high-quality individual outputted at the last iteration as the optimal individual.

[0008] According to a method for allocating computing tasks provided by the present invention, searching for the initial flame based on the initial individuals according to the path function to obtain the optimized position of the initial individuals includes: Obtaining a current weight factor for the current number of iterations; Update the path function based on the current weight factor to obtain a current path function; Based on the initial individuals, searching for the initial flame according to the current path function to obtain the optimized position of each initial individual; The current weight factor is calculated based on the individual quality of high-quality individuals corresponding to the current iteration number and the previous iteration number.

[0009] According to a method for allocating computing tasks provided by the present invention, the step of obtaining the current weight factor includes: Calculate a first weight factor based on the current number of iterations and the linear decrease parameter; Calculating a second weight factor based on the individual quality of the high-quality individuals corresponding to the current number of iterations and the nonlinear function; The current weight factor is calculated based on the first weight factor and the second weight factor.

[0010] According to a method for allocating computing tasks provided by the present invention, the step of selecting a high-quality flame from the initial flame based on the high-quality individuals includes: Based on the high-quality individuals, candidate flames are selected from the initial flames; Inputting the current number of iterations into an activation function to obtain a position adjustment parameter output by the activation function; Based on the position adjustment parameter, the position of the candidate flame is adjusted to obtain the high-quality flame.

[0011] According to a method for allocating computing tasks provided by the present invention, the optimization objective includes at least one of minimizing task completion time, maximizing resource utilization, and minimizing task cost.

[0012] According to a method for assigning computing tasks provided by the present invention, the task attributes of the computing tasks to be assigned are optimized, including at least one of task computing resource requirements, task priority, task dependency, and task deadline; The resource status information includes at least one of CPU usage, memory remaining amount, and network bandwidth.

[0013] The present invention also provides a task allocation device for computing tasks, comprising: An acquisition unit, which acquires the task attributes and resource status information of the computing task to be assigned; An initialization unit, which calculates an initial position of each initial individual in the initial population based on a good point set generation function, the task attributes, and the resource status information; A search and optimization unit, based on a multi-objective optimization algorithm and an optimization goal, searches for the optimal individual corresponding to the initial population; The allocation unit obtains an optimal allocation solution for the computing task to be allocated based on the optimal individual.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for allocating computing tasks as described above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the task allocation method for computing tasks as described in any one of the above.

[0016] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described task allocation methods for computing tasks.

[0017] The method and device for allocating computing tasks provided by the present invention calculate the initial position of each initial individual in the initial population by applying task attributes and resource status information through a good point set generation function; based on a multi-objective optimization algorithm and optimization objectives, the optimal flame corresponding to the initial population is searched for; based on the optimal flame, the optimal allocation scheme is obtained, thereby improving the practicality and diversity of the allocation scheme, thereby improving the task performance, reliability, and stability of the cloud computing platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 It is a flowchart of the task allocation method of computing tasks provided by the present invention; Figure 2 It is a structural diagram of the task allocation device for computing tasks provided by the present invention; Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0020] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0021] It's important to note that with the rapid development of internet technology, particularly the widespread adoption of information-interaction devices like mobile internet and the Internet of Things, the volume of data in society is growing exponentially. Driven by the sheer volume, diversity, and rapidity of this data, cloud computing has emerged. With its advantages—super-large-scale computing resource pools, elastically scalable computing services, affordable computing costs, highly scalable computing power, and a pay-per-use model—it has rapidly become a dominant force in information age applications in recent years.

[0022] Cloud computing platforms offer multi-tenant sharing, elastic scalability, and manageability, enabling all types of internet applications to be implemented through the public services provided by cloud platforms. This brings significant convenience to both developers and users of internet applications. Consequently, issues such as the reliability, security, and privacy of cloud computing platforms will become increasingly important as demand for them grows.

[0023] However, when currently performing task allocation based on multi-objective optimization algorithms, the search in the solution space is not comprehensive enough, resulting in insufficient diversity of solutions. This results in insufficient diversity in the output task allocation solutions, making them less practical.

[0024] In response to the above problems, the present invention provides a task allocation method for computing tasks to improve the diversity of the solution space, thereby improving the diversity of the task allocation schemes finally output, and realizing task allocation of computing tasks with strong practicality. Figure 1 It is a flowchart of the task allocation method of the computing task provided by the present invention, such as Figure 1 As shown, the method includes: Step 110: Obtain task attributes and resource status information of the computing task to be assigned.

[0025] Here, the computing task to be assigned may include information such as the task computing requirements, task priority, task dependencies, and task deadline. Task computing requirements may include CPU, memory, and bandwidth. It is understood that the task attributes of the computing task to be assigned may be used to reflect the resource constraints required by the task to be assigned. The computing task to be assigned may be a cloud computing task, and the corresponding resource status information may refer to the resource status information of the cloud computing node.

[0026] In addition, the resource status information herein includes the status of available resources in the cloud computing environment, such as usage rate, remaining memory, network bandwidth, geographical location of resources, etc. It is understandable that the resource status information can be used to reflect the total available resources for the current computing task to be assigned.

[0027] Specifically, the task scheduler can be used to obtain the task attributes of pending computing tasks. Furthermore, monitoring tools such as Prometheus and Ganglia can be used to collect real-time information about the current resource status of the cloud computing platform. It should be noted that by using the task scheduler and monitoring tools to obtain the task attributes and resource status information of the current pending computing tasks on the cloud computing platform, real-time task allocation can be achieved on the cloud computing platform, thereby optimizing the stability, resource utilization, and reliability of the cloud computing platform.

[0028] Step 120 : Based on the good point set generation function, the task attributes and the resource status information, the initial position of each initial individual in the initial population is calculated.

[0029] Here, the good point set is a uniformly distributed point set generation method, which is used to generate the initial positions of each initial individual in the initial population to ensure that the initial positions are uniformly distributed in the solution space.

[0030] Specifically, the solution space dimensions can be set using task attributes and the resource status information. Furthermore, the population size can be determined. Then, the initial positions of each initial individual can be calculated from the determined solution space dimensions using a good point set generation function.

[0031] It should be noted that compared with the traditional moth population initialization method, it is easy to cause uneven distribution of initial individuals, affecting the subsequent global optimization effect. The method provided by the embodiment of the present invention uses the good point set generating function to initialize the initial position of the moth population. According to the mathematical characteristics of the good point set generating function, the initial individuals are more evenly distributed in the solution space. Therefore, through the good point set theory, the special point set construction method in number theory can be used to ensure that the spacing between the initial individuals is more reasonable, so that the diversity and practicality of the initial population are greatly improved, laying a good foundation for the subsequent global search. At the same time, it also improves the convergence speed of the algorithm, enabling the algorithm to find the optimal solution more quickly.

[0032] Step 130: Based on the multi-objective optimization algorithm and the optimization goal, search and obtain the optimal individual corresponding to the initial population.

[0033] Here, the multi-objective optimization algorithm may include a multi-objective moth-to-flame algorithm, which can be used for multi-objective task allocation optimization to improve the computing performance, stability, and reliability of the cloud computing platform. In addition, the optimal flame here refers to the optimal task allocation solution ultimately found.

[0034] Specifically, after initializing the positions of the initial population, multiple objectives can be obtained for the tasks to be assigned. These multiple objectives can include minimizing task completion time, maximizing resource utilization, and minimizing task cost. Then, based on each initial individual, the initial flame is searched according to the path function to obtain the optimal position of each initial individual. Next, the fitness value of each initial individual at the optimized position can be calculated using the objective function. Furthermore, the fitness value can be used to select high-quality individuals from the initial population, and high-quality flames can be selected from the initial flames using these high-quality individuals.

[0035] Repeatedly pass through each initial individual, search for high-quality flames according to the path function, obtain the updated optimized position of each initial individual, calculate the updated fitness value of each initial individual at the updated optimized position through the objective function, and select the updated high-quality individual from the initial population through the updated fitness value, so as to select the updated high-quality flame from the high-quality flame through the updated high-quality individual, until the current number of iterations reaches the preset conditions, and the updated high-quality individual outputted by the last iteration is taken as the optimal individual.

[0036] It should be noted that by obtaining the optimization objectives of the computing tasks to be assigned, these optimization objectives are mutually constrained. Then, with the help of a multi-objective optimization algorithm, the global and local search capabilities of the algorithm are used to find the optimal flame, that is, the optimal task allocation solution.

[0037] Step 140: Obtain an optimal allocation solution for the computing tasks to be allocated based on the optimal individual.

[0038] Specifically, the task allocation plan corresponding to the optimal flame can be directly used as the optimal allocation plan for the computing tasks to be allocated. The optimal allocation plan here can be used to clarify the resource information corresponding to each computing task to be allocated for processing its own task.

[0039] The method provided by an embodiment of the present invention calculates the initial position of each initial individual in the initial population through a good point set generation function, applies task attributes and resource status information; searches for the optimal flame corresponding to the initial population based on a multi-objective optimization algorithm and optimization objectives; and obtains the optimal allocation scheme based on the optimal flame, thereby improving the practicality and diversity of the allocation scheme, thereby improving the task performance, reliability, and stability of the cloud computing platform.

[0040] Based on any of the above embodiments, step 120 includes: Building a task-resource relationship model based on the task attributes and the resource status information; Based on the task-resource relationship model, constructing a base point of a good point set; Based on the good point set generation function, the good point set base point is applied to calculate the coordinates of the good point set; The coordinates of the good point set are respectively used as the initial positions of the initial individuals.

[0041] Specifically, task attributes can be quantitatively described and a task model constructed to clarify them. Furthermore, resource status information from the cloud computing platform can be integrated to create a corresponding resource model. Next, a relationship model can be established between the tasks to be assigned and resource status information to provide a foundation for task allocation. Finally, using the constructed task-resource relationship model between tasks and resources, all candidate task allocation solutions that meet the relationship can be calculated. Each candidate task allocation solution is then used as a base point in the optimal point set.

[0042] Furthermore, the good point set generation function can be used to calculate points with more uniform position distribution from all the good point set base points. The calculated good point set coordinates can then be used as the initial position of any initial individual, that is, the initial position of each initial individual can be determined.

[0043] The method provided by the embodiments of the present invention constructs a task-resource relationship model to generate a base point for a good point set that conforms to the constraints. Furthermore, by applying the base point to the good point set using a good point set generation function, the coordinates of the good point set are calculated. This ensures that each initial individual is more evenly distributed in the solution space while conforming to the relationship between task attributes and resource status, thereby ensuring the accuracy and diversity of the initial solutions.

[0044] Based on any of the above embodiments, the multi-objective optimization algorithm includes a path function; Step 130 includes: Obtaining an optimization goal of the computing task to be assigned, and constructing an objective function based on the optimization goal; Based on the initial individuals, searching for the initial flame according to the path function to obtain the optimized position of the initial individuals; Based on the objective function, calculating the fitness value of each initial individual at the optimized position; Based on the fitness value, high-quality individuals are selected from the initial population, and based on the high-quality individuals, high-quality flames are selected from the initial flames; Repeatedly searching for the high-quality flame based on the initial individuals according to the path function to obtain an updated optimized position of the initial individuals, calculating an updated fitness value of the initial individuals at the updated optimized position based on the objective function, selecting an updated high-quality individual from the initial population based on the updated fitness value, and selecting an updated high-quality flame from the high-quality flame based on the updated high-quality individual, until the current number of iterations reaches a preset condition, and taking the updated high-quality individual outputted at the last iteration as the optimal individual.

[0045] Here, the path function is used to control the flight path of the initial individual when searching for the flame, for example, it can be a spiral flight path.

[0046] Specifically, first, an optimization objective of a to-be-allocated computing task can be acquired to construct an objective function based on the optimization objective. The optimization objective here can be to minimize task completion time, maximize resource utilization, or minimize cost. Then, the optimization objective can be converted into a mathematical expression, and each optimization objective can be weighted and added together by setting an optimization weight corresponding to each optimization objective to obtain the objective function.

[0047] Further, each initial individual (firefly individual) can search the initial flame according to the path function to obtain an optimized position of each initial individual. The initial flame here can be the position of each initial individual as the initial flame, and the position and number of the flame are updated as the number of iterations increases. In addition, the optimized position here refers to the position reached by the firefly individual after updating in the search space according to the path function. In the computing task allocation problem, each firefly individual represents a task allocation scheme, and the optimized position represents an adjusted or improved state of the scheme in the iteration process.

[0048] It can be understood that the firefly moves to a new position through the path function to explore potential task allocation schemes in the search space, and the change in the optimized position reflects the dynamic adjustment of the firefly in the search process to provide a direction for subsequent search. As the iteration proceeds, the optimized position gradually approaches the global optimal solution to improve the quality of the task allocation scheme.

[0049] Then, the fitness value of each initial individual at the optimized position can be calculated based on the constructed objective function. The fitness value here can be used to evaluate the performance indicators of each firefly individual (task allocation scheme), such as reflecting the comprehensive performance of multiple objectives such as task completion time, resource utilization, and cost. Next, high-quality individuals can be selected from the initial population based on the fitness value. For example, the initial individuals with high fitness values can be selected as high-quality individuals. It can be understood that the task allocation scheme represented by the high-quality individuals has high performance in the current search stage.

[0050] Then, high-quality flames can be selected from the initial flames based on the high-quality individuals. For example, the positions of the high-quality individuals can be used as high-quality flames to guide the search of subsequent initial individuals. It should be noted that the initial individuals move around the high-quality flames during the search process, and the high-quality flames provide a direction for subsequent search to accelerate convergence.

[0051] Then, the search step is repeated, and the moth position and the flame position are updated each time, that is, the updated optimal flame and the updated optimal position of each initial individual are obtained, until the current iteration number reaches a preset condition, and the updated optimal individual output in the last iteration is taken as the optimal individual. The preset condition can be that the iteration number reaches a preset iteration number, or the fitness value of each initial individual tends to converge, and any condition can be met.

[0052] The method provided by the embodiment of the application realizes multi-objective optimization of the computing task allocation problem through the explicit objective function, the dynamic path search, the fitness evaluation and the elite screening mechanism, and ensures that a high-quality solution is found within a reasonable time.

[0053] In order to enhance the global optimization ability and the ability to jump out of a local optimal trap of the algorithm, based on any one of the above embodiments, the initial flame is searched according to the path function based on the initial individuals, and the optimal position of the initial individuals is obtained, including: A current weight factor of the current iteration number is obtained; The path function is updated based on the current weight factor, and a current path function is obtained; The initial flame is searched according to the current path function based on the initial individuals, and the optimal position of the initial individuals is obtained; The current weight factor is calculated based on the individual quality of the optimal individual corresponding to the current iteration number and a previous iteration number.

[0054] Specifically, the weight factor can be a dynamically adjusted parameter, which is used to balance the global exploration and local development ability of the multi-objective optimization algorithm. First, the current weight factor of the current iteration number can be obtained. In detail, the current weight factor can be obtained by comprehensively calculating the individual quality of the optimal individual corresponding to the current iteration number and a previous iteration number.

[0055] It can be understood that, as the current iteration number increases, the weight factor dynamically changes the shape parameter of the logarithmic spiral, so as to expand the moth search range. Therefore, in the early iteration, the weight factor is larger, which encourages the initial individual to boldly explore the area far away from the current solution; in the later iteration, the weight factor is appropriately contracted, and focuses on local fine search.

[0056] In addition, the average or maximum of the fitness value of the high-quality individual corresponding to the last iteration can be taken as the individual quality of the high-quality individual corresponding to the last iteration. It can be understood that the higher the individual quality of the high-quality individual of the last iteration, the closer the search direction to the global optimal solution, and then the random search range of the initial individual can be reduced and the local search ability can be enhanced; if the individual quality of the high-quality individual of the last iteration is lower, the search direction can be trapped in a local optimum, and then the search range can be expanded and the global search ability can be enhanced.

[0057] Then, the current path function can be obtained by updating the path function by the calculated current weight factor. Further, the initial fire is searched according to the current path function by each initial individual to obtain the optimized position of each initial individual, so as to improve the quality of the optimized position of each initial individual. It should be noted that in the subsequent iteration process, similarly, after the current path function is obtained, the high-quality fire is searched according to the current path function by each initial individual to obtain the updated optimized position.

[0058] The method provided by the embodiment of the application can promote the initial individual to explore boldly and move away from the area of the current high-quality individual in the early iteration by introducing the dynamically self-adaptive weight factor, and the weight factor is appropriately contracted in the later iteration to focus on local fine search, so as to effectively improve the global optimization ability of the algorithm and help the initial individual to jump out of the local optimal trap. Therefore, the current weight factor is dynamically self-adaptively adjusted by the individual quality of the high-quality individual corresponding to the current iteration and the last iteration, the search range and the accuracy are self-adaptively adjusted, the quality of the global optimal solution is improved, and the convergence speed of the algorithm is improved, so that the algorithm can find the optimal solution more quickly.

[0059] Based on any of the above embodiments, the obtaining step of the current weight factor comprises: a first weight factor is calculated based on the current iteration and a linear decreasing parameter; a second weight factor is calculated based on the individual quality of the high-quality individual corresponding to the current iteration and a nonlinear function; the current weight factor is calculated based on the first weight factor and the second weight factor.

[0060] Specifically, first, a first weight factor can be calculated based on the current iteration and a linear decreasing parameter. It can be understood that the calculation of the first weight factor is simple and efficient by the linear decreasing strategy. In addition, the first weight factor can make the multi-objective optimization algorithm focus on global exploration in the early stage and focus on local development in the later stage In addition, the individual quality of the high-quality individuals can be calculated according to the fitness value of each individual of the high-quality individuals, and an average value or a maximum value is obtained. Then, a nonlinear function such as an exponential function or a logarithmic function can be used. The individual quality is input into the nonlinear function to obtain a second weight factor output by the nonlinear function. It can be understood that the weight factor is dynamically adjusted according to the individual quality, and if the individual quality is high, the weight factor is small, and the local development is enhanced; otherwise, if the individual quality is low, the weight factor is large, and the global exploration is enhanced.

[0061] Then, the first weight factor and the second weight factor can be combined by weighted averaging or other fusion methods to obtain a final current weight factor. It should be noted that by fusing the first weight factor and the second weight factor, the current weight factor has both the transition characteristics of the global exploration to the local development of the linear decreasing strategy and the ability to dynamically adapt to the individual quality of the nonlinear adjustment strategy. Moreover, the comprehensive strategy makes the multi-objective optimization algorithm more adaptable to different problems, avoiding the limitations of a single strategy. At the same time, the robustness of the multi-objective optimization algorithm is also enhanced.

[0062] It should be noted that the existing multi-objective firefly algorithm is difficult to achieve a good balance between global optimization and local search, resulting in the algorithm being unable to balance the global optimum and the local optimum in some cases. In order to further balance the globality and search accuracy of the multi-objective optimization algorithm, based on any one of the above embodiments, the high-quality firefly is selected from the initial firefly based on the high-quality individual, and the method comprises the steps of: selecting a candidate firefly from the initial firefly based on the high-quality individual; inputting the current iteration number into an activation function to obtain a position adjustment parameter output by the activation function; adjusting the position of the candidate firefly based on the position adjustment parameter to obtain the high-quality firefly.

[0063] Specifically, it should be noted that the position of the initial firefly is the same as that of the initial individual, and the high-quality individual comes from the initial individual. Therefore, first, all high-quality individuals can be directly selected as candidate fireflies. Alternatively, high-quality individuals with high fitness values can be selected as candidate fireflies from the high-quality individuals. Then, an activation function such as a sigmoid function can be designed. Next, the current iteration number is input into the activation function to obtain a position adjustment parameter output by the activation function. Then, the position of the candidate firefly can be adjusted by the position adjustment parameter to obtain the high-quality firefly.

[0064] It should be noted that the flame position of the high-quality flame represents the current found better solution, and the updating mode of the common multi-objective optimization algorithm for the flame position has obvious linear characteristics, which is not conducive to balancing the globality and search accuracy. The method adopted in the embodiment of the application uses an activation function to perform nonlinear convergence modification on the position of the high-quality flame, especially a sigmoid function. By using the unique nonlinear "extrusion" characteristics of the sigmoid function, the flame position can be adjusted in a progressive and nonlinear manner. In the early stage of the multi-objective optimization algorithm, the sigmoid function makes the flame position update relatively gently, encouraging the moth to explore widely; in the later stage of the multi-objective optimization algorithm, the flame position is accelerated to approach the potential optimal value, and the local search is strengthened, thereby optimizing the global optimization and local search capabilities of the algorithm, and finding a better balance between globality and search accuracy for the multi-objective optimization algorithm.

[0065] Based on any of the above embodiments, the optimization target includes at least one of minimizing task completion time, maximizing resource utilization, and minimizing task cost.

[0066] Here, the task completion time can be calculated based on the task time of each to-be-assigned computing task. The task time of a single to-be-assigned computing task can be calculated from the total time from task submission to task completion. It can be understood that the task completion time is an important indicator for measuring service response speed and directly affects user satisfaction with cloud computing services. Therefore, minimizing the task completion time as an optimization target can improve user loyalty and enhance service competitiveness.

[0067] Here, the resource utilization rate can be calculated by calculating the ratio of the actual use time of the computing resource to the total available time during the execution time of the task. The resource utilization rate can include at least one of CPU utilization, memory utilization, and network bandwidth utilization. It should be noted that maximizing the resource utilization of all resources, or ensuring that the resource utilization of key resources is not lower than a certain threshold, can reduce the idle time of resources and thus reduce the operating costs of cloud computing service providers.

[0068] In addition, the task cost usually includes computing resource cost, storage cost, network transmission cost, etc. It should be noted that minimizing the total execution cost of all tasks can reduce the user's usage fees and promote more reasonable resource allocation and avoid resource waste.

[0069] Based on any of the above embodiments, the optimization of the task attributes of the to-be-assigned computing task includes at least one of task computing resource demand, task priority, task dependency relationship, and task deadline. The resource state information includes at least one of CPU usage, memory remaining amount, and network bandwidth.

[0070] Here, the task attributes of the to-be-assigned computing task include at least one of a task computing resource requirement, a task priority, a task dependency relationship, and a task deadline. The task computing resource requirement refers to an amount of computing resources such as CPU, memory, and storage required for task execution, to ensure that the task is assigned to a computing node that meets its resource requirement and avoids task failure due to insufficient resources. In addition, the task priority can be used to reflect the urgency or importance of the task, to ensure timely completion of critical tasks. In addition, the task dependency relationship refers to the execution order constraint between tasks, to ensure that tasks are executed in the correct order and avoid task failure due to unsatisfied dependency relationship. In addition, the task deadline refers to the latest time by which the task must be completed, to prioritize tasks with earlier deadlines and avoid task timeout.

[0071] It should be noted that the resource state information includes at least one of CPU usage, memory remaining amount, and network bandwidth. For any computing node, the resource state information of the computing node needs to be obtained respectively.

[0072] Based on any of the above embodiments, the present application provides a task allocation method for cloud computing tasks, which comprises: Step 1: Determine the attributes of cloud computing tasks and resources, determine the computing resource, storage resource, and network bandwidth resource requirement of each task; determine the resource attribute, the computing ability, storage ability, and network bandwidth ability of each resource.

[0073] Step 2: Apply the optimal point set distribution theory to initialize the positions of 500 flies (initial individuals).

[0074] Step 3: Define the objective function, such as: task execution time not exceeding 500 ms, resource utilization rate not lower than 0.7, and task cost not higher than 5000 yuan.

[0075] Step 4: Start iteration and add a dynamic self-adaptive weight factor with a value of 0.5 to improve the path of the fly around the flame.

[0076] Step 5: Use the sigmoid function to perform nonlinear convergence modification on the flame position, with a value of 0.1.

[0077] Step 6: Calculate the fitness value of the fly that has not eaten, and update the position and number of the flame.

[0078] Step 7: Convert the position of the fly to a task allocation scheme, considering the priority of the task as high, medium, and low, and preferentially allocating resources to tasks with high priority. The deadline is within 2 hours after the task starts.

[0079] Step 8: update the resource state according to the task allocation, for example, when the remaining computing capacity of a certain resource is less than 200 CPU cycles, re-allocate part of the tasks of the resource to other resources.

[0080] Step 9: iterate until the 1000th iteration or the change in the objective function value is less than 0.01, stop iteration.

[0081] Step 10: output the final task allocation scheme, the task execution time is 300ms, the resource utilization rate is 0.8, and the task cost is 3000 yuan, which meets the expectation.

[0082] The method provided by the embodiment of the application has faster convergence speed and stronger global optimization ability through the improved multi-objective firefly algorithm, can quickly find the optimal task allocation scheme, and improves the efficiency of task allocation. In addition, through reasonable task allocation, the resources in the cloud computing environment can be optimally utilized, and the utilization rate of the resources and the overall performance of the system are improved. At the same time, the algorithm can effectively balance the relationship between global optimization and local search, and take into account global optimization and local optimization, providing a more accurate and reliable solution for cloud computing task allocation. Moreover, it can be applied to cloud computing task allocation problems of different scales and complexities, and has strong adaptability and wide application range.

[0083] Based on any of the above embodiments, Figure 2 is a structural schematic diagram of a task allocation device for computing tasks provided by the application, as Figure 2 shown, the device comprises: An acquisition unit 210 acquires task attributes and resource state information of a computing task to be allocated. An initialization unit 220 calculates the initial positions of initial individuals in an initial population based on a set of optimal points generating function, the task attributes and the resource state information. A search and optimization unit 230 searches for optimal individuals corresponding to the initial population based on a multi-objective optimization algorithm and optimization objectives. An allocation unit 240 obtains the best allocation scheme of the computing task to be allocated based on the optimal individuals.

[0084] The device provided by the embodiment of the application calculates the initial positions of initial individuals in an initial population by a set of optimal points generating function and application of task attributes and resource state information, searches for optimal flames corresponding to the initial population based on a multi-objective optimization algorithm and optimization objectives, and obtains the best allocation scheme based on the optimal flames, thereby improving the practicality and diversity of the allocation scheme and further improving the task performance, reliability and stability of the cloud computing platform.

[0085] Based on any of the above embodiments, the initialization unit is specifically configured to: Building a task-resource relationship model based on the task attributes and the resource status information; Based on the task-resource relationship model, constructing a base point of a good point set; Based on the good point set generation function, the good point set base point is applied to calculate the coordinates of the good point set; The coordinates of the good point set are respectively used as the initial positions of the initial individuals.

[0086] Based on any of the above embodiments, the multi-objective optimization algorithm includes a path function; The search optimization unit is specifically used for: Obtaining an optimization goal of the computing task to be assigned, and constructing an objective function based on the optimization goal; Based on the initial individuals, searching for the initial flame according to the path function to obtain the optimized position of the initial individuals; Based on the objective function, calculating the fitness value of each initial individual at the optimized position; Based on the fitness value, high-quality individuals are selected from the initial population, and based on the high-quality individuals, high-quality flames are selected from the initial flames; Repeatedly searching for the high-quality flame based on the initial individuals according to the path function to obtain an updated optimized position of the initial individuals, calculating an updated fitness value of the initial individuals at the updated optimized position based on the objective function, selecting an updated high-quality individual from the initial population based on the updated fitness value, and selecting an updated high-quality flame from the high-quality flame based on the updated high-quality individual, until the current number of iterations reaches a preset condition, and taking the updated high-quality individual outputted at the last iteration as the optimal individual.

[0087] Based on any of the above embodiments, the search optimization unit is further specifically configured to: Obtaining a current weight factor for the current number of iterations; Update the path function based on the current weight factor to obtain a current path function; Based on the initial individuals, searching for the initial flame according to the current path function to obtain the optimized position of each initial individual; The current weight factor is calculated based on the individual quality of high-quality individuals corresponding to the current iteration number and the previous iteration number.

[0088] Based on any of the above embodiments, the search optimization unit is further specifically configured to: Calculate a first weight factor based on the current number of iterations and the linear decrease parameter; calculate a second weight factor based on the individual quality of the high-quality individual corresponding to the current iteration number and a nonlinear function; calculate the current weight factor based on the first weight factor and the second weight factor.

[0089] Based on any of the above embodiments, the search optimization unit is further specifically used for: select a candidate flame from the initial flame based on the high-quality individual; input the current iteration number into an activation function to obtain a position adjustment parameter output by the activation function; adjust the position of the candidate flame based on the position adjustment parameter to obtain the high-quality flame.

[0090] Based on any of the above embodiments, the optimization target includes at least one of minimizing task completion time, maximizing resource utilization, and minimizing task cost.

[0091] Based on any of the above embodiments, the task attributes of the optimization to be allocated computing tasks include at least one of task computing resource demand, task priority, task dependency relationship, and task deadline. The resource state information includes at least one of CPU usage, memory remaining amount, and network bandwidth.

[0092] Figure 3 An example of an electronic device entity structure diagram is shown in Figure 3 As shown, the electronic device can include a processor 310, a communications interface 320, a memory 330, and a communications bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other through the communications bus 340. The processor 310 can invoke the logical instructions in the memory 330 to execute a task allocation method for computing tasks, which includes: obtaining task attributes and resource state information of a computing task to be allocated; calculating the initial positions of each initial individual in the initial population based on a good point set generation function, the task attributes, and the resource state information; searching for an optimal individual corresponding to the initial population based on a multi-objective optimization algorithm and an optimization target; and obtaining a best allocation scheme for the computing task to be allocated based on the optimal individual.

[0093] In addition, the logic instructions in the memory 330 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0094] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to perform the task allocation method of the computing task provided by the above-mentioned methods, the method comprises: obtaining task attributes and resource state information of a to-be-allocated computing task; based on the task attributes and the resource state information, the initial position of each initial individual in the initial population is calculated by using a good point set generation function; based on a multi-objective optimization algorithm and an optimization target, an optimal individual corresponding to the initial population is searched; and based on the optimal individual, a best allocation scheme of the to-be-allocated computing task is obtained.

[0095] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to perform the task allocation method of the computing task provided by the above-mentioned methods, the method comprises: obtaining task attributes and resource state information of a to-be-allocated computing task; based on the task attributes and the resource state information, the initial position of each initial individual in the initial population is calculated by using a good point set generation function; based on a multi-objective optimization algorithm and an optimization target, an optimal individual corresponding to the initial population is searched; and based on the optimal individual, a best allocation scheme of the to-be-allocated computing task is obtained.

[0096] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0097] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0098] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for allocating computing tasks, characterized in that: include: Obtain the task attributes and resource status information of the computing task to be assigned; Based on the good point set generation function, the task attributes and the resource status information, the initial position of each initial individual in the initial population is calculated; Based on the multi-objective optimization algorithm and the optimization goal, searching for the optimal individual corresponding to the initial population; Based on the optimal individual, an optimal allocation scheme for the computing tasks to be allocated is obtained.

2. The method for allocating computing tasks according to claim 1, wherein: The calculating of the initial position of each initial individual in the initial population based on the good point set generation function, the task attributes and the resource status information includes: Building a task-resource relationship model based on the task attributes and the resource status information; Based on the task-resource relationship model, constructing a base point of a good point set; Based on the good point set generation function, the good point set base point is applied to calculate the coordinates of the good point set; The coordinates of the good point set are respectively used as the initial positions of the initial individuals.

3. The method for allocating computing tasks according to claim 1, wherein: The multi-objective optimization algorithm includes a path function; The method of searching for the optimal individual corresponding to the initial population based on the multi-objective optimization algorithm and the optimization goal includes: Obtaining an optimization goal of the computing task to be assigned, and constructing an objective function based on the optimization goal; Based on the initial individuals, searching for the initial flame according to the path function to obtain the optimized position of the initial individuals; Based on the objective function, calculating the fitness value of each initial individual at the optimized position; Based on the fitness value, high-quality individuals are selected from the initial population, and based on the high-quality individuals, high-quality flames are selected from the initial flames; Repeatedly searching for the high-quality flame based on the initial individuals according to the path function to obtain an updated optimized position of the initial individuals, calculating an updated fitness value of the initial individuals at the updated optimized position based on the objective function, selecting an updated high-quality individual from the initial population based on the updated fitness value, and selecting an updated high-quality flame from the high-quality flame based on the updated high-quality individual, until the current number of iterations reaches a preset condition, and taking the updated high-quality individual outputted at the last iteration as the optimal individual.

4. The method for allocating computing tasks according to claim 3, wherein: The step of searching the initial flame based on the initial individuals and according to the path function to obtain the optimized position of the initial individuals includes: Obtaining a current weight factor for the current number of iterations; Update the path function based on the current weight factor to obtain a current path function; Based on the initial individuals, searching for the initial flame according to the current path function to obtain the optimized position of each initial individual; The current weight factor is calculated based on the individual quality of high-quality individuals corresponding to the current iteration number and the previous iteration number.

5. The method for allocating computing tasks according to claim 4, wherein: The step of obtaining the current weight factor includes: Calculate a first weight factor based on the current number of iterations and the linear decrease parameter; Calculating a second weight factor based on the individual quality of the high-quality individuals corresponding to the current number of iterations and the nonlinear function; The current weight factor is calculated based on the first weight factor and the second weight factor.

6. The method for allocating computing tasks according to claim 3, wherein: The step of selecting a high-quality flame from the initial flame based on the high-quality individual flame comprises: Based on the high-quality individuals, candidate flames are selected from the initial flames; Inputting the current number of iterations into an activation function to obtain a position adjustment parameter output by the activation function; Based on the position adjustment parameter, the position of the candidate flame is adjusted to obtain the high-quality flame.

7. The method for allocating computing tasks according to any one of claims 1 to 6, characterized in that: The optimization goal includes at least one of minimizing task completion time, maximizing resource utilization, and minimizing task cost.

8. The method for allocating computing tasks according to any one of claims 1 to 6, characterized in that: The task attributes of the optimized computing tasks to be assigned include at least one of task computing resource requirements, task priority, task dependency, and task deadline; The resource status information includes at least one of CPU usage, memory remaining amount, and network bandwidth.

9. A task allocation device for computing tasks, characterized in that: include: An acquisition unit, which acquires the task attributes and resource status information of the computing task to be assigned; An initialization unit, which calculates an initial position of each initial individual in the initial population based on a good point set generation function, the task attributes, and the resource status information; A search and optimization unit, based on a multi-objective optimization algorithm and an optimization goal, searches for the optimal individual corresponding to the initial population; The allocation unit obtains an optimal allocation solution for the computing task to be allocated based on the optimal individual.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for allocating computing tasks according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Strategy optimization method and device, equipment and storage medium

    CN121255474A

  • Policy optimization method, device, equipment and storage medium

    CN121255474B