A task resource scheduling algorithm with user experience quality as the optimization goal
Through the improved differential evolution algorithm and the task resource scheduling algorithm combined with the KAN model, the problem of insufficient user experience quality optimization and low task scheduling efficiency in the existing technology is solved, and more efficient user experience quality and task execution efficiency are achieved.
Patent Information
- Application Number
- CN202510018178.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-01-07
AI Technical Summary
The existing IoT task scheduling algorithms have shortcomings in optimizing user experience quality and adapting to IoT edge devices with limited resources, including insufficient user experience quality optimization, low task execution time prediction accuracy, and lack of scheduling strategies combining task execution time prediction and user experience quality optimization.
The improved differential evolution algorithm is used as the framework, and the task resource scheduling is combined with the KAN model. Task resource scheduling is obtained through the scheduling information collection module, and the task resource scheduling module is allocated and dispatched to ensure that the user experience quality is met as the optimization goal.
It improves the quality of user experience, enhances the efficiency of task scheduling in resource-constrained environments, improves the accuracy of task execution time prediction, and can better meet users' needs for fast response and low latency.
Smart Images

Figure CN119473628B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of resource scheduling, and in particular, relates to a task resource scheduling algorithm with user experience quality as an optimization goal. Background Art
[0002] With the rapid development of IoT technology, IoT devices are becoming more and more popular in many fields, such as smart homes, smart cities, and industrial automation. These IoT nodes effectively improve production efficiency and convenience by collecting, processing, and transmitting large amounts of data. However, as users' expectations for system response speed and task execution effects continue to increase, user experience quality has gradually become a key goal in IoT system optimization. Especially in task scenarios with high real-time requirements, users are particularly concerned about the response speed and stability of the system. How to improve user experience quality has become the core issue of optimizing task scheduling.
[0003] At present, mainstream IoT task scheduling algorithms mostly use deep reinforcement learning methods to improve system performance and resource scheduling efficiency. Although deep reinforcement learning can achieve good results in resource-rich cloud computing environments, its high requirements for computing resources and deep reinforcement learning model training make it difficult to apply in resource-constrained IoT edge devices. At the same time, existing scheduling algorithms fail to fully consider user experience quality as the core optimization goal, resulting in scheduling solutions that are difficult to effectively meet user needs in practical applications.
[0004] Although the current IoT task scheduling algorithms have achieved some results in improving system performance and resource utilization, they still have the following shortcomings when optimizing user experience quality and dealing with resource-constrained IoT edge devices:
[0005] Insufficient optimization of user experience quality: Most current scheduling algorithms focus mainly on the overall operating efficiency of the service, with little consideration given to optimizing the specific interactive experience on the user side. In scenarios where task response time requirements are high, the lack of optimization strategies for user interactive experience makes it difficult for the system to meet user demands for fast response and low latency, thus affecting the overall user satisfaction. Lack of adaptability to resource-constrained environments: IoT edge devices have limited computing power, storage space, and network bandwidth, while complex algorithms such as deep reinforcement learning have high requirements for computing resources and are difficult to effectively apply on resource-constrained edge devices. Existing scheduling algorithms often have poor actual effects in resource-constrained environments, resulting in low task scheduling efficiency and affecting the overall performance of the system.
[0006] The task execution time prediction accuracy is not high: Existing task execution time prediction methods mostly rely on traditional regression models or simple machine learning algorithms, which are difficult to effectively capture the complex relationship between task characteristics, system performance and resource allocation. Due to the lack of prediction accuracy, the accuracy of scheduling decisions is affected, especially when multiple tasks are executed in parallel, the prediction error will further reduce the overall efficiency of the system and the quality of user experience. Lack of scheduling strategies that combine task execution time prediction with user experience quality optimization: Existing scheduling algorithms usually lack strategies that combine task execution time prediction with user experience quality optimization, and it is difficult to dynamically adjust resource allocation according to the actual execution of the task, resulting in unsatisfactory system response speed and user satisfaction. Summary of the invention
[0007] In view of this, the present invention provides a task resource scheduling algorithm with user experience quality as the optimization goal. The algorithm uses an improved differential evolution algorithm as the framework to meet the demand for lightweight algorithms in resource-constrained scenarios in the Internet of Things, and generates a resource scheduling plan with user-side user experience quality as the optimization goal to schedule node tasks.
[0008] The present invention is achieved in that:
[0009] The present invention provides a task resource scheduling algorithm with user experience quality as an optimization target, wherein the task resource scheduling algorithm takes user experience quality as an optimization target, and based on the tasks, hardware performance information and system resource information executed by the current service node, performs resource allocation and scheduling on the tasks executed by the node, wherein the user experience quality is an indicator for quantifying the user's satisfaction with the overall execution of the application service provided by the node, and is related to user expectations, task type and system response time factors.
[0010] Based on the above technical solution, the task resource scheduling algorithm of the present invention with user experience quality as the optimization goal can also be improved as follows:
[0011] include:
[0012] Scheduling information collection module: used to collect node task information and hardware performance information, integrate system resource information, and submit this information to the task resource scheduling module to support resource allocation decisions. Through real-time perception of task status and hardware resources, the scheduling information collection module ensures timely and accurate data support for the scheduling process.
[0013] Task resource scheduling module: Based on the task information, hardware performance information and system resource information in the node, resource scheduling is performed through an improved differential evolution algorithm. The resource scheduling is executed by following the steps of generating an initial resource allocation plan, iteratively generating a new resource allocation plan, evaluating the user experience quality, judging whether the termination conditions are met, and outputting the optimal resource allocation plan. At the same time, the task execution results and user experience quality predicted by the KAN model are combined to evaluate the advantages and disadvantages of the resource allocation plan. Finally, the optimal resource allocation plan is generated and submitted to the task execution control module to improve task execution efficiency and user experience quality.
[0014] Task execution control module: responsible for resource scheduling and control of each task in the node according to the submitted resource allocation plan, ensuring that the tasks run efficiently according to the allocated resources.
[0015] The scheduling information collection module includes a task collection unit and a performance perception unit:
[0016] Task collection unit: used to collect and record task information submitted and being executed in the node. When a new task is generated or an existing task is completed, the unit will submit the latest task information to the task resource scheduling module. The task information includes task name, task type, task scale, task priority, etc.
[0017] Performance perception unit: It is a lightweight module that always keeps running and collects the hardware performance information and system resource information of the node in real time. When the task collection unit submits the task information, this unit will synchronously submit the hardware performance information of the node and the current system resource information to the task resource scheduling module. The hardware performance information includes the operating system, CPU main frequency, number of CPU cores, memory size, maximum hard disk read and write bandwidth and network bandwidth, etc.; system resource information includes CPU occupancy, memory usage, hard disk read and write occupancy and network bandwidth usage, etc.
[0018] The task resource scheduling module includes a heuristic scheduling unit and a task execution prediction unit:
[0019] The heuristic scheduling unit is responsible for scheduling the tasks in the node according to the submitted task information, hardware performance information and system resource information. Under the existing resource conditions, the resource allocation scheme is iterated by the improved differential evolution algorithm under the constraint conditions, and the allocation scheme is evaluated by the task execution prediction module. Finally, the resource allocation scheme that can achieve the highest user experience quality is found, and the optimal scheme is submitted to the task execution control module.
[0020] The task execution prediction unit is responsible for predicting the task execution results of the resource allocation plan through the KAN model. It predicts the final completion time of each task execution through the input task information, hardware resource information and resource allocation information, so that the heuristic scheduling unit can evaluate the user experience quality corresponding to the plan.
[0021] The specific process of the task resource scheduling algorithm is as follows:
[0022] S201: Submitting tasks and collecting task information: The task collection unit in the scheduling information collection module collects information of all current tasks and submits it to the task resource scheduling module to provide basic task data for subsequent resource allocation.
[0023] S202: Collecting node performance and resource information: The performance perception unit in the scheduling information collection module collects the hardware performance information and current system resource information of the node in real time and submits it to the task resource scheduling module, where the hardware performance information and system resource information are used as the basis and constraint for generating resource allocation strategy respectively.
[0024] S203: Generate task resource allocation plan: After the task resource scheduling module receives the task information, hardware performance information and system resource information, the heuristic scheduling unit will use the improved differential evolution algorithm as the framework, iterate with the user experience quality as the optimization goal, and find the optimal resource allocation plan under the existing resource conditions. Specifically, first generate the initial task resource allocation solution group according to the task information, node performance information and node resource information collected by the scheduling information collection module.
[0025] S204: Predicting the execution time of solution tasks: After the resource allocation solution group is generated, the task execution prediction unit will be called to predict the execution time of each task corresponding to each solution. The task execution unit will perform data preprocessing operations such as feature extraction and normalization on the resource allocation solution based on task information and node performance, and then use the KAN model to predict the execution response time of each task in each solution, providing a basis for evaluating the pros and cons of each solution.
[0026] S205: Calculate the user experience quality index of the scheme: The heuristic scheduling unit calculates the user experience quality of each task corresponding to each allocation scheme based on the task response time predicted by the task execution prediction unit, combined with the task type, user tolerance, etc., and then calculates the overall system user experience quality index of each solution based on the task priority.
[0027] S206: Evaluate the user experience quality indicators of the scheme: The heuristic scheduling unit evaluates the overall user experience quality indicators of each allocation scheme solution to determine whether the optimal solution meets the preset user experience quality standards: If the user experience quality of the optimal solution does not meet the standards, iteratively generate the next generation of allocation scheme solution groups, and continue to evaluate the next generation of solution groups; If the user experience quality of the optimal solution meets the standards, the allocation scheme corresponding to the optimal solution is recorded and submitted to the task execution control module to enter the next step of task execution.
[0028] S207: Iteratively generate a group of offspring allocation solution solutions: The heuristic scheduling unit adopts two mutation strategies to mutate the resource allocation solution group to generate two mutation vectors, and crosses each parent solution with the two mutation vectors through a crossover operation to generate two candidate offspring solutions; by repeating S204 and S205, the group of candidate offspring solutions is re-evaluated and the parent and candidate offspring solutions with better user experience quality indicators are selected as offspring solutions to complete a round of iteration.
[0029] S208: Execute the task according to the resource allocation plan: After the task execution control module receives the task resource allocation plan, it controls the task execution according to the obtained optimal resource allocation plan to ensure that the task is completed efficiently under the condition of reasonable resource allocation.
[0030] The task information described in S201 is used to represent the characteristic information of each task, including parameters such as task name, task type, data volume, priority, etc. These parameters constitute a The matrix is defined as follows:
[0031] ;
[0032] in, For task information, is the element in the task information matrix, is the number of tasks, It is the characteristic dimension of task information.
[0033] The hardware performance information described in S202 is used to represent the system performance parameters of the computing node, including the operating system, CPU main frequency, number of CPU cores, memory size, maximum hard disk read and write bandwidth, network bandwidth, etc. These parameters constitute a size of The matrix is defined as follows:
[0034] ;
[0035] in, For hardware performance information, is an element in the hardware performance information matrix, It is the characteristic dimension of hardware performance information.
[0036] The system resource information described in S202 is used to indicate the current status of various system resources available, including the number of available CPUs, available memory size, available hard disk bandwidth, available network bandwidth, etc. These parameters constitute a size of The matrix is defined as follows:
[0037] ;
[0038] in, For system resource information, is an element in the system resource information matrix, It is the characteristic dimension of system resource information.
[0039] The resource allocation scheme described in S203 is used to represent the task resource information allocated to each task, and its parameters are the same as the resource characteristics in the system resource information. These parameters constitute a The matrix of Indicates the number of tasks. The resources allocated to each task are not negative, and are specifically defined as follows:
[0040] ;
[0041] in, For resource allocation scheme, is the element in the resource allocation scheme matrix, Indicates the number of tasks, is the characteristic dimension of system resource information, For the task index, is the resource dimension index, For the Task No. The sum of the resources allocated to each task cannot exceed the maximum value of the corresponding system resources. .
[0042] The process of generating the initial task resource allocation scheme described in S203 adopts the initial population generation method based on Dirichlet distribution to ensure that the initial solution is evenly distributed and meets the resource allocation constraints. Specifically, first, for each resource dimension, a task resource allocation vector that satisfies the sum of 1 is generated through the parameter vector, and then the task resource allocation vector is scaled by a random scaling factor to meet the upper and lower limits of the resource allocation constraints. Repeat the above process for each resource dimension, and merge all task resource allocation vectors to obtain the initial task resource allocation scheme. Repeat the above process The population size is The initial resource allocation solution group.
[0043] The prediction solution group task execution time process described in S204 is performed by the task execution prediction unit using the KAN model, which specifically includes data preprocessing, data input, loss function and data output:
[0044] Data preprocessing: Before predicting the task execution time, the input data needs to be preprocessed. This step includes Max-Min normalization of numerical features, converting numerical features to the range of 0 to 1 in proportion to ensure that features of different orders of magnitude have a balanced impact on the KAN model. For categorical features, one-hot encoding is used for conversion to avoid misunderstandings in the order or priority between categories.
[0045] Data input: The preprocessed data includes task information, system performance information, and resource allocation scheme. Task information includes task name, task type, data volume, priority, and other characteristics; system performance information includes operating system, CPU main frequency, number of CPU cores, memory size, hard disk read and write bandwidth, network bandwidth, etc.; resource allocation scheme is used to describe the system resources allocated to each task, including CPU, memory, hard disk, and network bandwidth.
[0046] Loss function: The KAN model uses the root mean square logarithmic error as the loss function to measure the difference between the predicted value and the actual task execution time. The calculation formula is:
[0047] ;
[0048] in, is the root mean square logarithmic error, is the sample index, For the The prediction task execution time of samples, For the The actual task execution time of samples, is the number of training samples. The root mean square logarithmic error can maintain high robustness to errors of different orders of magnitude and is suitable for predicting task execution time.
[0049] Output layer: The output layer of the KAN model is a linear layer that outputs the predicted execution time of the task. The output value is a positive real number, which represents the time required for the task from resource allocation to completion. This result will serve as an important input in the scheduling algorithm to calculate the user experience quality of the task and to evaluate and optimize the resource allocation scheme.
[0050] The user experience quality calculation process described in S205 is a comprehensive calculation based on factors such as task execution time, task priority, and user response tolerance. For each task, a weight is assigned according to the type of task. The weight is calculated by the priority of the task through the softmax function. The specific formula is as follows:
[0051] ;
[0052] in is the number of tasks, For the task index, For the The weight of the task, For the The priority of a task.
[0053] Subsequently, the system calculates the user experience quality value of each task based on the task execution time and user tolerance, combined with the experience degradation coefficient inside and outside the tolerance threshold. When the task execution time is less than or equal to the user tolerance, the user experience quality of the task is calculated according to the linear decay model; when the task execution time is greater than the user tolerance, the user experience quality of the task is calculated according to the exponential decay model:
[0054] ;
[0055] in, For the task index, For the The user experience quality of each task, For the The execution time of a task, is the user's response tolerance, To respond to the experience drop coefficient within the tolerance range, is the experience degradation coefficient exceeding the response tolerance.
[0056] Finally, the final user experience quality index is obtained by taking the weighted sum of the user experience quality values of all tasks:
[0057] ;
[0058] in, As the final user experience quality indicator, is the number of tasks, The task index.
[0059] The iterative generation of offspring allocation solution process described in S207 includes three operation steps, namely, mutation operation, crossover operation and selection operation. The detailed process is as follows:
[0060] Mutation operation: First, a mutation matrix needs to be generated for each solution in the solution group. In order to improve the convergence ability while taking into account the search ability, this algorithm uses two different mutation strategies to generate two mutation matrices for each solution. Specifically, the generalization mutation matrix is generated by the DE / current-to-rand / 1 strategy. This strategy randomly selects individuals for mutation, which can explore a larger solution space and increase the diversity and global search ability of the population; the convergence mutation matrix is generated by the DE / current-to-best / 1 strategy. This strategy can accelerate convergence and improve the quality of the solution by moving closer to the current optimal solution. The specific formula is as follows:
[0061] ;
[0062] ;
[0063] in, is the index of the solution in the solution group, To solve the first A solution, For the The generalization mutation matrix of the solution, For the The convergence mutation matrix of the solution, is the optimal solution in the solution group, For three randomly selected The solution index, are three randomly selected solutions from the current solution group that are consistent with the current solution Different solutions, is the variation scaling factor.
[0064] Crossover operation: Set a value between 0 and 1 for the current crossover operation, called the crossover probability, and then perform a crossover operation on each solution in the solution group and the elements in the corresponding generalization mutation matrix and convergence mutation matrix according to the crossover probability to generate generalization candidate solutions and convergence candidate solutions. The crossover operation ensures that at least one element comes from the mutation matrix to maintain the mutation effect. The specific crossover rules are as follows:
[0065] ;
[0066] ;
[0067] in, is the index of the solution in the solution group, To solve the first A solution, For the The generalized candidate solution corresponding to the solution is For the The convergent candidate solutions corresponding to the solutions are: For the The generalization mutation matrix of the solution, For the The convergence mutation matrix of the solution, is the row index of the solution matrix, is the column index of the solution matrix, for Middle Line Elements of the column, Similarly, is the crossover probability.
[0068] Selection operation: After obtaining the generalized candidate solution and the converged candidate solution, a selection operation is required to select the better individuals from the candidate solutions, the generalized candidate solution, the converged candidate solution and the current solution to be retained as the next generation solution. Specifically, first use the task execution prediction unit to predict the task execution time of the candidate generalized candidate solution and the converged candidate solution, take the task information, hardware performance information and the resource allocation plan as input, and output the execution time of each task of each candidate solution. The final user experience quality is calculated based on the predicted task execution time as the fitness function, and the fitness of the generated generalized candidate solution, the converged candidate solution and the current solution are compared, and the solution with higher user experience quality is selected to be retained in the next generation population to ensure that the population is gradually optimized during the iteration process.
[0069] Compared with the prior art, the beneficial effects of the task resource scheduling algorithm with user experience quality as the optimization goal provided by the present invention are:
[0070] Effective adaptation to resource-constrained environments:
[0071] This algorithm is based on the improved differential evolution algorithm, which has relatively low resource requirements and can adapt well to the limited computing power, storage space and network bandwidth of IoT edge devices. The scheduling information acquisition module obtains the task information, hardware performance information and system resource information of the current node, and can accurately grasp the actual status of the edge device, thereby generating an initial task resource allocation plan that meets its resource conditions, avoiding the problem of ineffective operation on edge devices due to excessive algorithm complexity, greatly improving the feasibility and effectiveness of task scheduling in resource-constrained environments, and ensuring the stable operation of the entire IoT system at the edge;
[0072] Improve the quality of user experience:
[0073] Taking user experience quality as the core optimization goal: Most current scheduling algorithms focus mainly on the overall operating efficiency of the service, while this algorithm uses user experience quality as a fitness function throughout the entire task resource allocation optimization process. The advantages of this algorithm are particularly prominent in scenarios where task response time requirements are high. This algorithm can give priority to tasks that have a greater impact on the user interaction experience during the resource allocation process based on the requirements of user experience quality, ensuring that the system can meet the user's needs for fast response and low latency, thereby significantly improving the overall user satisfaction;
[0074] Combine KAN model to predict task execution results and optimize user experience: The heuristic scheduling unit combines KAN model to predict task execution results. This mechanism can predict the possible situations that may occur during task execution in advance. By evaluating candidate solutions and dynamically adjusting resource allocation plans based on task execution result predictions, resource allocation can be more in line with actual task requirements, further improving user experience quality.
[0075] Improve the prediction accuracy of task execution time:
[0076] The KAN model in this algorithm has unique advantages in predicting task execution results. The KAN model can deeply analyze various characteristics of tasks, such as task type, data volume, priority, etc., and at the same time combine the system's hardware performance information (such as CPU processing speed, memory capacity, etc.) and the current resource allocation to establish a more accurate task execution time prediction model. In complex scenarios where multiple tasks are executed in parallel, such as in the traffic management system of a smart city, where multiple traffic flow monitoring tasks, road signal control tasks, etc. are running in parallel, this algorithm can make more accurate task scheduling decisions with the high-precision prediction of the KAN model, reduce the overall system efficiency reduction and user experience quality reduction caused by prediction errors, effectively improve the task execution time prediction accuracy, and provide a solid foundation for reasonable task scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0078] Figure 1 This is a module structure diagram of a task resource scheduling algorithm that optimizes user experience quality;
[0079] Figure 2 The following is a flowchart of an example of a scheduling process for a task resource scheduling algorithm that optimizes user experience quality. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0081] like Figure 1 As shown, it is a system structure diagram of a resource scheduling algorithm with user experience quality as the optimization goal provided by the first embodiment of the present invention, which includes a scheduling information collection module, a task resource scheduling algorithm module and a task execution control module.
[0082] In an embodiment of the present invention, when a user submits a new task to be executed in the IoT system, there may be multiple types of tasks that need to be scheduled and coordinated at the same time, including: data collection tasks, data transmission tasks, data query tasks, data storage tasks, data cleaning tasks and computing and analysis tasks, etc., which are only used as examples and are not limited to this. The embodiment of the present invention constructs a task resource scheduling system including a scheduling information collection module 101, a task resource scheduling module 102 and a task execution control module 103, so as to achieve task resource scheduling with user experience quality as the optimization goal.
[0083] The scheduling information collection module 101 is used to collect the task information, hardware performance information and system resource information of the node, and submit this information to the task resource scheduling module to support resource allocation decisions. Through real-time perception of task status and hardware resources, the scheduling information collection module ensures timely and accurate data support for the scheduling process.
[0084] The task resource scheduling module 102 performs resource scheduling through an improved differential evolution algorithm based on the task information, hardware performance information and system resource information in the node. The resource scheduling is performed by following the steps of generating an initial resource allocation plan, iteratively generating a new resource allocation plan, evaluating the user experience quality, judging whether the termination condition is met, and outputting the optimal resource allocation plan. At the same time, the resource allocation plan is evaluated by combining the task execution results and user experience quality predicted by the KAN model. Finally, the optimal resource allocation plan is generated and submitted to the task execution control module to improve the task execution efficiency and user experience quality.
[0085] The task execution control module 103 is responsible for scheduling and controlling the execution resources of each task in the node according to the submitted resource allocation plan, so as to ensure that the tasks run efficiently according to the allocated resources.
[0086] The scheduling information collection module 101 includes a task collection unit 1011 and a performance perception unit 1012:
[0087] The task collection unit 1011 is used to collect and record the task information submitted and being executed in the node. When a new task is generated or an existing task is completed, the unit will submit the latest task information to the task resource scheduling module.
[0088] The performance sensing unit 1012 is a lightweight module that always keeps running and collects the hardware performance information and system resource information of the node in real time. When the task collection unit submits the task information, the unit synchronously submits the hardware performance information of the node and the current system resource information to the task resource scheduling module.
[0089] Specifically, in the embodiment, the task collection unit 1011 in the scheduling information collection module 101 includes a task information collection interface, which is responsible for collecting all running task information submitted by users in the current Internet of Things node. Whenever a user submits a task or a task is completed, the task collection interface in the task collection unit 1011 is triggered to obtain the task type, task priority, task data volume, etc. of the currently running task, and submit the task information to the task resource scheduling module 102.
[0090] In the embodiment, the performance perception unit 1012 in the scheduling information collection module 101 is a lightweight module deployed in the IoT node, including a performance acquisition interface and a hardware resource acquisition interface. When the module is initialized, the performance acquisition interface is called to acquire and store the hardware performance information of the IoT node, including the operating system, CPU main frequency, number of CPU cores, memory size, maximum hard disk read and write bandwidth and network bandwidth of the IoT node; in addition, during the scheduling process, it is necessary to call the hardware resource acquisition interface to obtain the real-time usage of various resources of the IoT node, including the CPU occupancy rate, memory occupancy rate, hard disk write bandwidth occupancy, hard disk read bandwidth occupancy, network upload bandwidth occupancy and network download bandwidth occupancy of the node, and submit the hardware performance information and system resource information to the task resource scheduling module 102.
[0091] The task resource scheduling module 102 includes a heuristic scheduling unit 1021 and a task execution prediction unit 1022:
[0092] The heuristic scheduling unit 1021 is responsible for scheduling resources for tasks in the node according to the submitted task information, hardware performance information and system resource information. Under the existing resource conditions, the resource allocation scheme is iterated by the improved differential evolution algorithm under the constraint conditions, and the allocation scheme is evaluated by the task execution prediction module. Finally, the resource allocation scheme that can achieve the highest user experience quality is found, and the optimal scheme is submitted to the task execution control module.
[0093] The task execution prediction unit 1022 is responsible for predicting the task execution results of the resource allocation scheme through the KAN model, and predicting the final completion time of each task execution through the input task information, hardware resource information and resource allocation information, so that the heuristic scheduling unit can evaluate the user experience quality corresponding to the scheme.
[0094] In an embodiment, after the task resource scheduling module 102 receives the scheduling information submitted by the information collection module 101, it calls the task resource scheduling interface of the heuristic scheduling unit 1021 and starts to use the improved differential evolution algorithm under constraints to perform task scheduling. The input of the algorithm is the task information submitted by the user, the hardware performance information and system resource information of the Internet of Things node, and the output solution is a set of resource scheduling solutions for the current task. The optimization goal is the user experience quality index of the current Internet of Things node, and the constraint condition is that the sum of various resources does not exceed the maximum value of various resources of the current node.
[0095] In an embodiment, when the heuristic scheduling unit 1021 evaluates the user experience quality index, it assigns different weights to tasks of different types and priorities. For example, data collection and data transmission tasks will be assigned higher weights to ensure the real-time data requirements in the Internet of Things scenario, and data query tasks and data storage tasks will be assigned the second highest weights to improve the response speed without affecting the real-time performance of data collection.
[0096] In an embodiment, the heuristic scheduling unit 1021 uses the task execution prediction interface of the task execution prediction unit 1022 during the process of evaluating the resource allocation plan, and uses the trained KAN model to predict the task execution result. The input is the scheduling information composed of the task information submitted by the IoT node user, the task resource allocation plan and the current node system performance information, and the output is the predicted task execution time.
[0097] In the embodiment, the task execution control module 103 organizes the resources of the IoT node through computer resource management technology, and manages and schedules the task resources and controls the task execution after receiving the optimal resource allocation plan submitted by the task resource scheduling module 102. For example, if container technology is used for organization, the submitted tasks are assigned to separate containers for execution, and after receiving the optimal resource allocation plan, resources are allocated to each task container according to the optimal resource allocation plan to control the task execution.
[0098] Figure 2 A schematic diagram of a flow chart of a resource scheduling algorithm with user experience quality as the optimization target provided by an embodiment of the present invention. The following steps are included:
[0099] S201: Submitting tasks and collecting task information: The task collection unit in the scheduling information collection module collects all current task information and submits it to the task resource scheduling module to provide basic task data for subsequent resource allocation.
[0100] S202: Collecting node performance and resource information: The performance perception unit in the scheduling information collection module collects the hardware performance information and current system resource information of the node in real time and submits it to the task resource scheduling module, where the hardware performance information and system resource information are used as the basis and constraint for generating resource allocation strategy respectively.
[0101] S203: Generate task resource allocation plan: After the task resource scheduling module receives the task information, hardware performance information and system resource information, the heuristic scheduling unit will use the improved differential evolution algorithm as the framework, iterate with the user experience quality as the optimization goal, and find the optimal resource allocation plan under the existing resource conditions. Specifically, firstly, the initial task resource allocation solution group is generated based on the Dirichlet distribution according to the task information, hardware performance information and system resource information collected by the scheduling information collection module.
[0102] S204: Predicting the execution time of solution tasks: After the resource allocation solution group is generated, the task execution prediction unit will be called to predict the execution time of each task corresponding to each solution. The task execution unit will perform data preprocessing operations such as feature extraction and normalization on the resource allocation solution based on task information and node performance, and then use the KAN model to predict the execution response time of each task in each solution, providing a basis for evaluating the pros and cons of each solution.
[0103] S205: Calculate the user experience quality index of the scheme: The heuristic scheduling unit calculates the user experience quality of each task corresponding to each allocation scheme based on the task response time predicted by the task execution prediction unit, combined with the task type, user tolerance, etc., and then calculates the overall system user experience quality index of each solution based on the task priority.
[0104] S206: Evaluate the user experience quality indicators of the scheme: The heuristic scheduling unit evaluates the overall user experience quality indicators of each allocation scheme solution to determine whether the optimal solution meets the preset user experience quality standards: If the user experience quality of the optimal solution does not meet the standards, iteratively generate the next generation of allocation scheme solution groups, and continue to evaluate the next generation of solution groups; If the user experience quality of the optimal solution meets the standards, the allocation scheme corresponding to the optimal solution is recorded and submitted to the task execution control module to enter the next step of task execution.
[0105] S207: Iteratively generate a group of offspring allocation solution solutions: The heuristic scheduling unit adopts two mutation strategies to mutate the resource allocation solution group to generate two mutation vectors, and crosses each parent solution with the two mutation vectors through a crossover operation to generate two candidate offspring solutions; by repeating steps S204 and S205, the group of candidate offspring solutions is re-evaluated and the parent and candidate offspring solutions with better user experience quality indicators are selected as offspring solutions to complete a round of iteration.
[0106] S208: Execute the task according to the resource allocation plan: After the task execution control module receives the task resource allocation plan, it controls the task execution according to the obtained optimal resource allocation plan to ensure that the task is completed efficiently under the condition of reasonable resource allocation.
[0107] Specifically, in an embodiment of the present invention, the process of submitting tasks and collecting task information described in step S201 is as follows: after the IoT node triggers the resource scheduling process, the scheduling information collection module calls the task information collection interface in the task collection unit to collect all running task information submitted by users in the current IoT node.
[0108] The task information described in step S201 is used to represent the characteristic information of each task submitted by the current IoT node user, including parameters such as task name, task type, data volume, priority, etc. These parameters constitute a The matrix is defined as follows:
[0109] ;
[0110] in, For task information, is the element in the task information matrix, is the number of tasks, It is the characteristic dimension of task information.
[0111] In an embodiment of the present invention, the process of collecting hardware performance and system resource information described in step S202 is as follows: after obtaining the task information, the scheduling information collection module calls the performance acquisition interface and the hardware resource acquisition interface in the performance perception unit 1012, and calls the performance acquisition interface to obtain and store the hardware performance information of the Internet of Things node, including the operating system, CPU main frequency, number of CPU cores, memory size, maximum hard disk read and write bandwidth and network bandwidth of the Internet of Things node; calls the hardware resource acquisition interface to obtain the real-time usage of various resources of the current Internet of Things node, including the node's CPU occupancy rate, memory occupancy rate, hard disk write bandwidth occupancy, hard disk read bandwidth occupancy, network upload bandwidth occupancy and network download bandwidth occupancy.
[0112] Specifically, the hardware performance information described in step S202 is used to represent the system performance parameters of the IoT node, including the operating system, CPU main frequency, number of CPU cores, memory size, maximum hard disk read and write bandwidth, network bandwidth, etc. These parameters constitute a size of The matrix is defined as follows:
[0113] ;
[0114] in For hardware performance information, is an element in the hardware performance information matrix, It is the characteristic dimension of hardware performance information.
[0115] Specifically, the system resource information described in step S202 is used to indicate the current available system resource conditions, including the number of available CPUs, available memory size, available hard disk bandwidth, available network bandwidth, etc. These parameters constitute a size of The matrix is defined as follows:
[0116] ;
[0117] in For system resource information, is an element in the system resource information matrix, It is the characteristic dimension of system resource information.
[0118] In an embodiment of the present invention, the process of generating a task resource allocation plan described in step S203 is as follows: after the information acquisition module successfully obtains the task information, hardware performance information and system resource information, the task resource scheduling interface of the task resource scheduling module is called, and the above information is used as input to start the heuristic scheduling process.
[0119] Specifically, the scheduling process uses an improved differential evolution algorithm under constraints. First, it is necessary to use Dirichlet distribution to generate an initial resource allocation solution group that meets the node resource constraints based on the input task information, hardware performance information and system resource information.
[0120] Specifically, the resource allocation solution described in step S203 is used to represent the resource information allocated to each task in the current IoT node, and its parameters are the same as the resource characteristics in the system resource information. These parameters constitute a The matrix of Indicates the number of tasks. The resources allocated to each task are not negative, and are specifically defined as follows:
[0121] ;
[0122] in For resource allocation scheme, is the element in the resource allocation scheme matrix, Indicates the number of tasks, is the characteristic dimension of system resource information, For the task index, is the resource dimension index, For the Task No. The sum of the resources allocated to each task cannot exceed the maximum value of the corresponding system resources. .
[0123] Specifically, the generation of the initial task resource allocation solution group described in step S203 adopts a solution group generation method based on Dirichlet distribution to ensure that the initial solution is evenly distributed and meets the resource allocation constraints. Specifically, first, for each resource dimension, a task resource allocation vector that satisfies the sum of 1 is generated through a parameter vector:
[0124] ;
[0125] in, is the resource dimension index, Indicates The task resource allocation vector of resource dimensions, is the parameter vector, is the number of tasks, is the characteristic dimension of system resources. Then the task resource allocation vector is scaled by a random scaling factor to meet the upper and lower limits of the resource allocation constraints.
[0126] ;
[0127] in Assign a vector of resources to the scaled tasks, is the random scaling factor.
[0128] Repeat the above process for each resource dimension and merge all task resource allocation vectors to obtain the initial task resource allocation plan. The population size is The initial resource allocation solution group.
[0129] In an embodiment of the present invention, the specific process of predicting the task execution time of the scheme described in step S204 is as follows: after the heuristic scheduling unit generates a resource allocation scheme solution group, it is necessary to evaluate each solution in the solution group. First, it is necessary to predict the execution time of each task under each resource allocation scheme through the KAN model. Specifically, after the heuristic scheduling unit obtains the resource allocation scheme solution group, it calls the task execution prediction interface of the task execution prediction unit, and inputs the task information submitted by the IoT node user, the task resource allocation scheme and the current node hardware performance information, and outputs the predicted execution time of each task.
[0130] Specifically, the prediction solution grouping task execution process described in step S204 includes data preprocessing, data input, loss function and data output:
[0131] Data preprocessing: Before predicting the task execution time, the input data needs to be preprocessed. This step includes Max-Min normalization of numerical features and proportional conversion of numerical features to the interval (0,1) to ensure that features of different orders of magnitude have a balanced impact on the KAN model. For categorical features, one-hot encoding is used for conversion to avoid misunderstandings in the order or priority between categories.
[0132] Data input: The preprocessed data includes task information, system performance information, and resource allocation scheme. Task information includes task name, task type, data volume, priority, and other characteristics; system performance information includes operating system, CPU main frequency, number of CPU cores, memory size, hard disk read and write bandwidth, network bandwidth, etc.; resource allocation scheme is used to describe the system resources allocated to each task, including CPU, memory, hard disk, and network bandwidth.
[0133] Loss function: Since the time span of different types of tasks is huge and always positive, ranging from milliseconds to seconds, it is necessary to have different sensitivities for prediction errors of different orders of magnitude, that is, the smaller the order of magnitude of the prediction result is, the closer it is to 0, and the higher the penalty for the error value. Therefore, the root mean square logarithmic error is used as the KAN model loss function to measure the difference between the predicted value and the actual task execution time. The calculation formula is:
[0134] ;
[0135] in, is the root mean square logarithmic error, is the sample index, For the The prediction task execution time of samples, For the The actual task execution time of samples, is the number of training samples. The root mean square logarithmic error can maintain high robustness to errors of different orders of magnitude and is suitable for predicting task execution time.
[0136] Output layer: The output layer of the KAN model is a linear layer that outputs the predicted execution time of the task. The output value is a positive real number, indicating the time required for the task from resource allocation to completion.
[0137] In an embodiment of the present invention, the specific process of calculating the user experience quality indicator of the calculation scheme described in step S205 is as follows: when the task execution prediction interface of the task execution prediction unit returns the predicted execution time of each task in all solutions of the solution group, the heuristic scheduling unit needs to perform an IoT node user experience quality evaluation on each solution, and comprehensively consider information such as the task type, task priority, user tolerance, etc. of different tasks in the node, and finally obtain the user experience quality indicator of the IoT node under different schemes.
[0138] Specifically, the user experience quality index described in step S205 needs to allocate a weight to each task according to the type of task. The weight is calculated by the priority of the task through the softmax function. The specific formula is as follows:
[0139] ;
[0140] in is the number of tasks, For the task index, For the The weight of the task, For the The priority of a task.
[0141] Subsequently, the system calculates the user experience quality value of each task based on the task execution time and user tolerance, combined with the experience degradation coefficient inside and outside the tolerance threshold. When the task execution time is less than or equal to the user tolerance, the user experience quality of the task is calculated according to the linear decay model; when the task execution time is greater than the user tolerance, the user experience quality of the task is calculated according to the exponential decay model:
[0142] ;
[0143] in, For the task index, For the The user experience quality of each task, For the The execution time of a task, is the user's response tolerance, To respond to the experience drop coefficient within the tolerance range, is the experience degradation coefficient exceeding the response tolerance.
[0144] Finally, the final user experience quality index is obtained by taking the weighted sum of the user experience quality values of all tasks:
[0145] ;
[0146] in, As the final user experience quality indicator, is the number of tasks, The task index.
[0147] In an embodiment of the present invention, the specific process of evaluating the user experience quality indicator of the scheme described in step S206 is as follows: after the heuristic scheduling unit calculates the user experience quality indicator of the IoT node of each allocation scheme of the current solution group, it will determine whether the algorithm termination judgment condition is met. In the current IoT scenario, the termination judgment condition is: whether the user experience quality indicator of the optimal solution in the solution group reaches the target value of the user experience quality indicator of the current IoT node, or whether the number of algorithm iterations reaches the maximum number of iterations.
[0148] If the termination judgment condition is not met, the algorithm continues, indicating that the current optimal solution does not meet the user experience quality requirements of the current IoT node, and then the next generation of solution groups are generated iteratively, and the process jumps to step S207.
[0149] If the termination judgment condition is met, the algorithm terminates the calculation, and the optimal solution in the current solution group is recorded, and its corresponding task resource allocation plan is submitted to the task execution control module, and jumps to step S208.
[0150] In an embodiment of the present invention, the specific process of iteratively generating a group of offspring allocation scheme solutions in step S207 is as follows: after the heuristic scheduling unit determines that the solution group does not meet the node user experience quality requirements, it will perform mutation, crossover and selection operations on the basis of the current allocation scheme solution group to generate a group of offspring allocation scheme solutions.
[0151] Specifically, the detailed process of the mutation operation described in step S207 is as follows: First, a mutation matrix needs to be generated for each solution in the solution group. In order to improve the convergence ability while taking into account the search ability, this algorithm uses two different mutation strategies to generate two mutation matrices for each solution. Specifically, the generalization mutation matrix is generated by the DE / current-to-rand / 1 strategy. This strategy randomly selects individuals for mutation, which can explore a larger solution space and increase the diversity and global search ability of the population; the convergence mutation matrix is generated by the DE / current-to-best / 1 strategy. This strategy can accelerate convergence and improve the quality of the solution by moving closer to the current optimal solution. The specific formula is as follows:
[0152] ;
[0153] ;
[0154] in, is the index of the solution in the solution group, To solve the first A solution, For the The generalization mutation matrix of the solution, For the The convergence mutation matrix of the solution, is the optimal solution in the solution group, For three randomly selected The solution index, are three randomly selected solutions from the current solution group that are consistent with the current solution Different solutions, is the variation scaling factor.
[0155] Specifically, the detailed process of the crossover operation described in step S207 is as follows: a value between 0 and 1 is set for the current crossover operation, which is called the crossover probability. Then, each solution in the solution group is crossovered with the elements in the corresponding generalization mutation matrix and convergence mutation matrix according to the crossover probability to generate generalization candidate solutions and convergence candidate solutions. The crossover operation ensures that at least one element comes from the mutation matrix to maintain the mutation effect. The specific crossover rules are as follows:
[0156] ;
[0157] ;
[0158] in, is the index of the solution in the solution group, To solve the first A solution, For the The generalized candidate solution corresponding to the solution is For the The convergent candidate solutions corresponding to the solutions are: For the The generalization mutation matrix of the solution, For the The convergence mutation matrix of the solution, is the row index of the solution matrix, is the column index of the solution matrix, for Middle Line Elements of the column, Similarly, is the crossover probability.
[0159] Specifically, the detailed process of the selection operation described in step S207 is as follows: After obtaining the generalized candidate solution and the converged candidate solution, a selection operation is required to select the better individual from the candidate solution, the generalized candidate solution, the converged candidate solution and the current solution to be retained as the next generation solution. Specifically, first use the task execution prediction unit to predict the task execution time of the candidate generalized candidate solution and the converged candidate solution, take the task information, hardware performance information and the resource allocation plan as input, and output the execution time of each task of each candidate solution. The final user experience quality is calculated based on the predicted task execution time as the fitness function, and the generated generalized candidate solution, the converged candidate solution and the current solution are compared in fitness, and the solution with higher user experience quality is selected to be retained in the next generation population to ensure that the population is gradually optimized during the iteration process.
[0160] In an embodiment of the present invention, the specific process of executing tasks according to the resource allocation scheme described in step S208 is as follows: after the heuristic scheduling unit reaches the termination condition, the optimal solution of the current solution group is recorded, and the task execution interface of the task execution module is called to input the task resource allocation scheme corresponding to the current optimal solution. The task execution module organizes the resources of the IoT node through docker containers, and allocates a docker container for execution to each submitted task. After receiving the resource allocation scheme, the module controls the docker container resources according to the resources allocated to each task to execute the task, ensuring that the task is completed efficiently under the condition of reasonable resource allocation.
Claims
1. A task resource scheduling algorithm with user experience quality as the optimization goal, characterized in that: The task resource scheduling algorithm takes the user experience quality as the optimization goal, and performs resource allocation and scheduling for the tasks performed by the node based on the tasks, hardware performance information and system resource information performed by the current service node. The user experience quality is an indicator that quantifies the user's satisfaction with the overall execution of the application service provided by the node, and is related to user expectations, task type and system response time factors; It includes: Scheduling information collection module: responsible for collecting node task information, hardware performance information, and summarizing system resource information, and passing it to the task resource scheduling module to support resource allocation decisions. Through real-time perception of task status and hardware resources, the scheduling information collection module ensures timely and accurate data support for the scheduling process; Task resource scheduling module: Based on the task information, hardware performance information and system resource information in the node, resource scheduling is performed through an improved differential evolution algorithm. The resource scheduling is performed by following the steps of generating an initial resource allocation plan, iteratively generating a new resource allocation plan, evaluating the user experience quality, judging whether the termination condition is met, and outputting the optimal resource allocation plan. The resource allocation plan is evaluated by combining the task execution results and user experience quality predicted by the KAN model. Finally, the optimal resource allocation plan is generated and passed to the task execution control module to improve task execution efficiency and user experience quality. Task execution control module: according to the submitted resource allocation plan, it performs resource scheduling and control on each task in the node to ensure the efficient execution of each task; The task resource scheduling module includes: Heuristic scheduling unit: responsible for scheduling resources for tasks in nodes according to submitted task information, hardware performance information, and system resource information. Under existing resource conditions, it iterates the resource allocation scheme through the improved differential evolution algorithm under constraint conditions, and uses the task execution prediction module to evaluate the resource allocation scheme, and finally finds the resource allocation scheme that can achieve the highest user experience quality, and submits the optimal scheme to the task execution control module; Task execution prediction unit: responsible for predicting the task execution results of the resource allocation plan through the KAN model. It predicts the final completion time of each task execution through the input task information, hardware resource information and resource allocation information, so that the heuristic scheduling unit can evaluate the user experience quality corresponding to the plan.
2. According to claim 1, a task resource scheduling algorithm with user experience quality as the optimization goal is characterized in that: The scheduling information collection module includes: Task collection unit: used to collect and record task information that has been submitted and is being executed in the node. When a new task is generated or an existing task is completed, the task collection unit submits the latest task information to the task resource scheduling module. The task information includes task name, task type, task scale and task priority; Performance perception unit: It is a lightweight module that always keeps running and collects the hardware performance information and system resource information of the node in real time. When the task collection unit submits the task information, the performance perception unit synchronously submits the node's hardware performance information and current system resource information to the task resource scheduling module. The hardware performance information includes the operating system, CPU main frequency, number of CPU cores, memory size, maximum hard disk read and write bandwidth and network bandwidth. The system resource information includes CPU occupancy, memory usage, hard disk read and write occupancy and network bandwidth usage.
3. According to claim 2, a task resource scheduling algorithm with user experience quality as the optimization goal is characterized in that: The heuristic scheduling unit uses an improved differential evolution algorithm to optimize the allocation of task resources. The improved differential evolution algorithm combines task information, hardware performance information and system resource information to improve the quality of user experience. Specifically, it includes the following steps: Initial population generation: The initial population generation method based on Dirichlet distribution is used to ensure that the initial solutions are evenly distributed and meet the resource allocation constraints. Each initial solution represents a resource allocation plan for a task, and all solutions are reasonably distributed in the solution space. Mutation operation: In the iterative optimization process, a dual-strategy mutation mechanism is adopted, including the DE / current-to-rand / 1 strategy, which increases the diversity and global search ability of the population by randomly selecting individuals for mutation, and explores a larger solution space, and the DE / current-to-best / 1 strategy, which accelerates convergence and improves the quality of the solution by moving closer to the current optimal solution; Crossover operation: After mutation, a crossover operation is performed. A value between 0 and 1 is set for the current crossover operation, called the crossover probability. The current solution and the mutated solution are combined according to the set crossover probability to generate a new candidate solution, and it is ensured that it meets the resource allocation constraints; Selection operation: Use the KAN model to predict the task execution time of candidate solutions. Take task information, hardware performance information, and resource allocation plan as input to predict the execution time of each task. Calculate the user experience quality based on the predicted execution time as the fitness function. Compare the fitness of the generated candidate solutions with the current solution, and select the solution with higher user experience quality to be retained in the next generation population, ensuring that the population is gradually optimized during the iteration process. Output results: The heuristic scheduling algorithm terminates under the following conditions: When the user experience quality of the optimal solution in the population reaches the preset threshold or the number of iterations reaches the set upper limit, the final output optimal solution will be submitted to the task execution control module as the task resource allocation plan.
4. According to claim 3, a task resource scheduling algorithm with user experience quality as the optimization goal is characterized in that: The task execution prediction unit uses the KAN model to predict the task execution time, including the following steps: Data preprocessing: Preprocess the input data, perform Max-Min normalization on numerical features and convert them proportionally to the (0,1) interval to ensure that features of different orders of magnitude have a balanced impact on the KAN model, and use one-hot encoding to convert categorical features to avoid misunderstandings in the order or priority between categories; Data input: The preprocessed data includes task information, system performance information, and resource allocation scheme. Task information includes task name, task type, data volume, and priority characteristics. System performance information includes operating system, CPU main frequency, number of CPU cores, memory size, hard disk read / write bandwidth, and network bandwidth. The resource allocation scheme is used to describe the system resources allocated to each task, including CPU, memory, hard disk, and network bandwidth. Loss function: The KAN model uses the root mean square logarithmic error as the loss function to measure the difference between the predicted value and the actual task execution time; Output layer: The output layer of the KAN model is a linear layer, which outputs the predicted execution time of the task. The output value is a positive real number, which represents the time required for the task from resource allocation to completion. This result is an important input in the scheduling algorithm, used to calculate the user experience quality of the task, and used for the evaluation and optimization of resource allocation schemes.