Back-end task scheduling execution method and device, storage medium and computer equipment
By combining reinforcement learning and genetic algorithms to generate a task scheduling scheme, a final scheduling scheme is generated, which solves the problem of complex and diverse task scheduling in the backend system and achieves efficient task execution and resource utilization.
Patent Information
- Application Number
- CN202511227713.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-11-28
AI Technical Summary
Existing task scheduling schemes are unable to meet the complex and diverse task scheduling needs of backend systems, resulting in poor overall performance. Reinforcement learning is prone to getting stuck in local optima, and genetic algorithms have weak dynamic adjustment capabilities.
A reinforcement learning model is used to perform scheduling analysis on task feature data and system state vectors to generate a preliminary scheduling scheme. The scheme is then iteratively optimized using a genetic algorithm, and the final scheduling scheme is determined by combining advantage analysis. The final scheduling scheme is generated by utilizing the real-time response of reinforcement learning and the global optimization characteristics of the genetic algorithm.
It improves the global optimality and flexibility of the scheduling scheme, ensures that tasks are completed on time at appropriate nodes, makes full use of system resources, and improves the overall performance of the backend system.
Smart Images

Figure CN121029360A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of task scheduling technology, and in particular to a backend task scheduling execution method, apparatus, storage medium and computer equipment. Background Technology
[0002] In today's digital age, backend systems handle increasingly complex and diverse tasks, encompassing batch processing, real-time computing, data storage, and many other types. These tasks have significantly different resource requirements, and system resources are constantly changing. Furthermore, tasks have varying priorities and deadlines. Against this backdrop, the key to improving backend system performance lies in how to rationally allocate resources and ensure the efficient execution of various tasks. Backend task scheduling is the core element in addressing this issue.
[0003] Currently, reinforcement learning and genetic algorithms are attracting significant attention in the field of backend task scheduling. However, while reinforcement learning holds promise, its vast state space in complex task scheduling scenarios makes it difficult to explore comprehensively, easily leading to local optima and suboptimal scheduling strategies. Genetic algorithms, on the other hand, are heavily reliant on the initial population and exhibit weak dynamic adjustment capabilities when faced with dynamically changing tasks and resource conditions. In summary, existing task scheduling schemes struggle to meet the complex and diverse task scheduling requirements of backend systems, resulting in poor overall backend system performance. Summary of the Invention
[0004] The purpose of this application is to at least solve one of the above-mentioned technical defects, in particular the technical defect that the existing task scheduling schemes are unable to meet the complex and diverse task scheduling needs of the backend system, resulting in poor overall performance of the backend system.
[0005] This application provides a backend task scheduling and execution method, the method comprising:
[0006] Feature extraction is performed on the backend tasks to be scheduled to obtain task feature data, and a system state vector is generated based on the real-time status information of the backend system.
[0007] A reinforcement learning model is used to perform scheduling analysis on the task feature data and the system state vector to generate a preliminary scheduling scheme. A genetic algorithm is then used to iteratively optimize the preliminary scheduling scheme to obtain an optimized scheduling scheme.
[0008] An advantage analysis is performed on the preliminary scheduling scheme and the optimized scheduling scheme, and the final scheduling scheme is determined based on the analysis results;
[0009] The backend tasks are assigned nodes and executed according to the final scheduling scheme to obtain the execution results.
[0010] Optionally, the step of extracting features from the backend tasks to be scheduled to obtain task feature data includes:
[0011] The backend tasks to be scheduled are input into the task parsing module, so that the task parsing module can parse the information of the backend tasks and obtain key information;
[0012] The key information is standardized to obtain standardized information, and task feature data is extracted from the standardized information.
[0013] Optionally, generating the system state vector based on the real-time state information of the backend system includes:
[0014] The backend system is monitored in real time, and the real-time status information obtained from the monitoring is input into the status awareness module; the status awareness module pre-stores historical scheduling data.
[0015] The state awareness module integrates and quantifies the real-time state information and the historical scheduling data to form a system state vector.
[0016] Optionally, the step of using a reinforcement learning model to perform scheduling analysis on the task feature data and the system state vector to generate a preliminary scheduling scheme includes:
[0017] A reinforcement learning model is determined; the reinforcement learning model is obtained by training an agent generated based on task scheduling process modeling using a deep reinforcement learning algorithm.
[0018] The task feature data and the system state vector are input into the reinforcement learning model, so that the reinforcement learning model makes scheduling action suggestions based on the task feature data based on the system state vector, and outputs a preliminary scheduling scheme.
[0019] Optionally, the step of using a genetic algorithm to iteratively optimize the initial scheduling scheme to obtain an optimized scheduling scheme includes:
[0020] Using the initial scheduling scheme as the initial population, the individuals in the initial population are optimized using a genetic algorithm to obtain the optimization result, and the fitness value of the optimization result is determined by the fitness function.
[0021] The optimization results are iteratively optimized based on the fitness value until the optimization results meet the preset termination conditions, thus forming an optimized scheduling scheme.
[0022] Optionally, the step of performing an advantage analysis on the preliminary scheduling scheme and the optimized scheduling scheme, and determining the final scheduling scheme based on the analysis results, includes:
[0023] The fitness values of the preliminary scheduling scheme and the optimized scheduling scheme are determined respectively, and it is determined whether the fitness value of the optimized scheduling scheme is greater than the fitness value of the preliminary scheduling scheme.
[0024] If so, the optimized scheduling scheme shall be adopted as the final scheduling scheme;
[0025] If not, the preliminary scheduling scheme and the optimized scheduling scheme are fused to generate the final scheduling scheme.
[0026] Optionally, the method further includes:
[0027] Based on the execution results, the parameters of the reinforcement learning model and the genetic algorithm are dynamically updated.
[0028] This application provides a backend task scheduling and execution device, including:
[0029] The data acquisition module is used to extract features from the backend tasks to be scheduled, obtain task feature data, and generate a system state vector based on the real-time status information of the backend system.
[0030] The scheme generation module is used to perform scheduling analysis on the task feature data and the system state vector using a reinforcement learning model, generate a preliminary scheduling scheme, and use a genetic algorithm to iteratively optimize the preliminary scheduling scheme to obtain an optimized scheduling scheme.
[0031] The scheme determination module is used to perform advantage analysis on the preliminary scheduling scheme and the optimized scheduling scheme, and determine the final scheduling scheme based on the analysis results;
[0032] The task execution module is used to allocate nodes and execute tasks for the backend tasks according to the final scheduling scheme, and obtain the execution results.
[0033] This application provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the backend task scheduling execution method as described in any of the above embodiments.
[0034] This application provides a computer device, including: one or more processors, and memory;
[0035] The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the backend task scheduling execution method as described in any of the above embodiments.
[0036] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0037] The backend task scheduling and execution method, apparatus, storage medium, and computer equipment provided in this application can first extract task feature data of the backend tasks to be scheduled, quantifying various key information. Simultaneously, a system state vector can be generated based on the real-time status information of the backend system, enabling real-time capture of dynamic changes in system resource status. Next, a reinforcement learning model can be used to analyze the task feature data and system state vector to generate a preliminary scheduling scheme. A genetic algorithm is then used to iteratively optimize the preliminary scheduling scheme to obtain an optimized scheme. Reinforcement learning can quickly react to the real-time system status and adapt to dynamically changing environments, while the genetic algorithm can effectively avoid the problem of reinforcement learning easily getting trapped in local optima, thereby improving the global optimality of the scheduling scheme. Subsequently, the advantages of these two schemes can be analyzed and they can be complemented and integrated, making the final scheduling scheme more flexible and adaptable. Finally, the backend tasks can be allocated to nodes and executed according to the final scheduling scheme to fully utilize system resources and ensure that each task is completed on time at the appropriate node. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A flowchart illustrating a backend task scheduling and execution method provided in an embodiment of this application;
[0040] Figure 2 A schematic diagram of the structure of a backend task scheduling and execution device provided in an embodiment of this application;
[0041] Figure 3 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0043] Currently, reinforcement learning and genetic algorithms are attracting significant attention in the field of backend task scheduling. However, while reinforcement learning holds promise, its vast state space in complex task scheduling scenarios makes it difficult to explore comprehensively, easily leading to local optima and suboptimal scheduling strategies. Genetic algorithms, on the other hand, are heavily reliant on the initial population and exhibit weak dynamic adjustment capabilities when faced with dynamically changing tasks and resource conditions. In summary, existing task scheduling schemes struggle to meet the complex and diverse task scheduling requirements of backend systems, resulting in poor overall backend system performance.
[0044] In some embodiments, the backend task scheduling and execution method provided in this application can be applied to a task scheduling model. This system comprises a task parsing module, a state awareness module, a fusion decision module, an execution feedback module, and a parameter update module. Specifically, the task parsing module is primarily responsible for feature parsing of backend tasks; the state awareness module is primarily responsible for real-time state monitoring of the backend system; the fusion decision module is primarily used to generate decision suggestions by combining the output data of the task parsing module and the state awareness module; the execution feedback module is primarily responsible for task allocation and execution based on the decision scheme output by the fusion decision module; and the parameter update module can dynamically update relevant parameters in the fusion decision module based on the execution results of the execution feedback module. This allows the task scheduling model to continuously adapt to the dynamic changes of the backend system, thereby improving the accuracy and effectiveness of scheduling decisions.
[0045] In one embodiment, such as Figure 1 As shown, Figure 1 This is a flowchart illustrating a backend task scheduling and execution method provided in an embodiment of this application. The application provides a backend task scheduling and execution method, specifically including the following:
[0046] S110: Extract features from the backend tasks to be scheduled to obtain task feature data, and generate a system state vector based on the real-time status information of the backend system.
[0047] In this step, during backend task scheduling, the computer device can extract the task feature data of the backend tasks to be scheduled, quantify various key information, and generate a system state vector based on the real-time status information of the backend system, so as to realize the real-time capture of the dynamic changes in the system resource status.
[0048] Specifically, computer equipment can extract features from backend tasks to be scheduled, comprehensively analyzing key information such as task type, priority, required resources, and deadline. This information is then transformed into quantifiable task feature data, avoiding the limitations of relying on a single factor for scheduling and allowing the scheduling strategy to fully consider the complexity and diversity of tasks. Simultaneously, the computer equipment can monitor and collect backend system status information in real time, including node resource usage, node load, and task execution progress. This multi-dimensional status information can then be fused to generate a system state vector, accurately representing the dynamic changes in current system resources. This provides accurate and timely environmental information for subsequent scheduling analysis, enabling the scheduling strategy to adapt to rapid changes in the backend system status.
[0049] Understandably, through task feature data and system state vectors, computer devices can not only clearly grasp the internal characteristics of the task to be executed, but also perceive the overall load and resource supply level of the backend system in real time. This enables efficient matching of task requirements and system capabilities when making task scheduling decisions, thereby improving the model's adaptability to dynamic environments.
[0050] S120: A reinforcement learning model is used to perform scheduling analysis on task feature data and system state vectors to generate a preliminary scheduling scheme. A genetic algorithm is then used to iteratively optimize the preliminary scheduling scheme to obtain an optimized scheduling scheme.
[0051] In this step, after obtaining the task feature data and system state vector through step S110, the computer device can input these two data points into the fusion decision module. This module contains a reinforcement learning model and a genetic algorithm. The reinforcement learning model can perform scheduling analysis on the task feature data and system state vector to generate a preliminary scheduling scheme, thereby enabling rapid responses to the real-time system state and quick adaptation to dynamically changing environments. The genetic algorithm can iteratively optimize the preliminary scheduling scheme to obtain an optimized scheduling scheme. This effectively avoids the problem of reinforcement learning easily getting trapped in local optima, thus improving the global optimality of the scheduling scheme.
[0052] Understandably, reinforcement learning models can comprehensively analyze task feature data and system state vectors, and through continuous interaction and learning with the environment, generate preliminary scheduling schemes in scheduling decisions. This enables the task scheduling model to have real-time decision-making and adaptive capabilities, meaning that when the backend system state changes, the model can quickly perceive environmental feedback and adjust the scheduling strategy in a timely manner. However, relying solely on reinforcement learning often carries the risk of getting trapped in local optima, potentially causing the scheduling scheme to fail to achieve optimal configuration globally. Therefore, this application introduces a genetic algorithm for global optimization. This algorithm can search within a large solution space, effectively avoiding the problem of reinforcement learning easily getting trapped in local optima and improving the global optimality of the scheduling scheme.
[0053] It should be noted that this application uses the preliminary scheduling scheme generated by the reinforcement learning model as the optimization object of the genetic algorithm, which can improve the convergence speed of the genetic algorithm, reduce the computational overhead, and thus meet the scheduling requirements of real-time tasks.
[0054] S130: Conduct an advantage analysis on the preliminary scheduling scheme and the optimized scheduling scheme, and determine the final scheduling scheme based on the analysis results.
[0055] In this step, after generating the preliminary scheduling scheme and the optimized scheduling scheme through step S120, the computer equipment can perform an advantage analysis on the two schemes and generate the final scheduling scheme by complementing the advantages of the two schemes, making it more flexible and adaptable.
[0056] Understandably, computer equipment can combine the advantages of the initial scheduling scheme in real-time response and flexible adaptation with the advantages of the optimized scheduling scheme in global search and overall performance improvement, and analyze the comprehensive performance of different schemes in various dimensions, including task execution efficiency, resource utilization, load balancing, and system stability. Based on the analysis results, the computer equipment can determine the final scheduling scheme and, if necessary, merge and adjust the two to ensure that the final scheduling scheme can balance speed and accuracy, thereby meeting the complex and diverse task scheduling needs of the backend system and improving the overall performance of the backend system.
[0057] S140: Based on the final scheduling scheme, allocate nodes and execute tasks for the backend tasks to obtain the execution results.
[0058] In this step, after the final scheduling scheme is determined in step S130, the computer equipment can allocate nodes and execute tasks for the backend tasks according to the final scheduling scheme, so as to make full use of system resources and ensure that each task is completed on time at the appropriate node.
[0059] Understandably, the scheduling strategy in the final scheduling scheme takes into account the computing power, storage space, network bandwidth, and current load of each node, rationally allocating the most suitable nodes to tasks with different characteristics and priorities to ensure efficient and rational resource allocation. Therefore, computer equipment can directly allocate nodes to each task according to this final scheduling scheme. Furthermore, it can perform orderly scheduling and dynamic adjustments to tasks based on the execution status of nodes, thereby improving the overall operating efficiency of the backend system, reducing task response time and resource waste, and achieving efficient backend task processing.
[0060] In the above embodiments, during backend task scheduling, task feature data of the backend tasks to be scheduled can be extracted first to quantify various key information. Simultaneously, a system state vector can be generated based on the real-time status information of the backend system, enabling real-time capture of dynamic changes in system resources. Next, a reinforcement learning model can be used to analyze the task feature data and system state vector to generate a preliminary scheduling scheme. A genetic algorithm is then used to iteratively optimize the preliminary scheme to obtain an optimized scheduling scheme. This allows reinforcement learning to react quickly to the real-time system status and adapt rapidly to dynamic environments, while the genetic algorithm effectively avoids the problem of reinforcement learning easily getting trapped in local optima, thereby improving the global optimality of the scheduling scheme. Subsequently, the advantages of these two schemes can be analyzed and they can be complemented and integrated, resulting in a final scheduling scheme with greater flexibility and adaptability. Finally, backend tasks can be assigned nodes and executed according to the final scheduling scheme to fully utilize system resources and ensure that each task is completed on time at the appropriate node.
[0061] In one embodiment, the process of extracting features from the backend task to be scheduled in step S110 to obtain task feature data may include:
[0062] S111: Input the backend task to be scheduled into the task parsing module so that the task parsing module can parse the information of the backend task and obtain key information.
[0063] S112: Standardize the key information to obtain standardized information, and extract task feature data from the standardized information.
[0064] In this embodiment, the computer device can input the backend task to be scheduled into the task parsing module, so that the task parsing module can parse the information of the backend task, obtain key information, and then perform standardization processing on this key information to obtain standardized information. Task feature data can be extracted from the standardized information, thereby realizing the quantification of various key information.
[0065] Specifically, the task parsing module is primarily responsible for parsing the input backend tasks and extracting key information such as task type, priority, required resources, and deadline. Task types can include batch processing and real-time computing, while required resources include CPU, memory, and network bandwidth. After extracting the key information, the computer can standardize it, for example, by converting and normalizing data of different formats and dimensions to form standardized information with a unified structure and comparability. Based on this standardized information, task feature data can then be further extracted, transforming complex task information into quantifiable data representations for subsequent scheduling analysis by the task scheduling model.
[0066] In one embodiment, the process of generating a system state vector based on the real-time state information of the backend system in step S110 may include:
[0067] S113: Real-time monitoring of the backend system, and input of the real-time status information obtained from the monitoring into the status awareness module; the status awareness module pre-stores historical scheduling data.
[0068] S114: The state awareness module is used to integrate and quantify real-time state information and historical scheduling data to form a system state vector.
[0069] In this embodiment, the computer device can monitor the backend system in real time and input the real-time status information obtained from the monitoring into the status perception module. Since the status perception module has pre-stored historical scheduling data, the status perception module can integrate and quantify the real-time status information and historical scheduling data to form a system status vector and then output it.
[0070] Understandably, historical scheduling data records the running status and scheduling results of the backend system under different time periods, resource configurations, and task combinations, while real-time status information covers the resource usage of each server node in the current system, such as CPU utilization, memory usage, network bandwidth usage, as well as the node load and task execution progress.
[0071] Therefore, the state awareness module can accurately grasp the current resource changes of the system through real-time state information, and at the same time, combine historical scheduling data to predict potential trends and possible resource conflicts in advance. Here, the state awareness module can deeply integrate and analyze real-time state information with historical scheduling data, and form a system state vector that can accurately characterize the dynamic changes of system resources through quantitative modeling. This can accelerate the convergence speed of scheduling strategies and enhance the adaptability to dynamic environments.
[0072] In one embodiment, the process of using a reinforcement learning model to perform scheduling analysis on task feature data and system state vectors to generate a preliminary scheduling scheme in step S120 may include:
[0073] S121: Determine the reinforcement learning model; the reinforcement learning model is obtained by training the agent generated based on the task scheduling process using a deep reinforcement learning algorithm.
[0074] S122: Input the task feature data and system state vector into the reinforcement learning model so that the reinforcement learning model can make scheduling action suggestions based on the task feature data based on the system state vector and output a preliminary scheduling scheme.
[0075] In this embodiment, when analyzing backend task scheduling, the computer device can first determine the reinforcement learning model. This model is trained on an agent generated based on task scheduling process modeling using a deep reinforcement learning algorithm. Therefore, after inputting task feature data and system state vector into the reinforcement learning model, the model can make scheduling action suggestions based on the system state vector and task feature data, so that the scheduling action suggestions can quickly adapt to the dynamically changing environment and output a preliminary scheduling scheme.
[0076] Understandably, during model training, the agent continuously interacts with the simulated task scheduling environment, receiving corresponding rewards or penalties for scheduling actions taken based on different task characteristics and system states. As training iterates, the agent gradually learns and masters the strategy of selecting the optimal scheduling action under different states. In this application, the computer device can model the task scheduling process as a Markov decision process, where the state is the system state vector, the action is the decision to assign a task to a server node, and the reward is the performance index after task scheduling. Then, a deep reinforcement learning algorithm, such as the DQN algorithm, is used to train the agent, enabling it to make preliminary scheduling action suggestions based on the current system state.
[0077] Therefore, in the actual task scheduling process, when the computer equipment inputs the task feature data and system state vector into the reinforcement learning model, the model can combine the resource usage and dynamic change characteristics reflected in the system state vector to intelligently analyze the input task feature data, provide corresponding scheduling action suggestions, and output these scheduling action suggestions to form a preliminary scheduling scheme.
[0078] In one embodiment, the process of using a genetic algorithm to iteratively optimize the preliminary scheduling scheme to obtain an optimized scheduling scheme in step S120 may include:
[0079] S121: Using the initial scheduling scheme as the initial population, the individuals in the initial population are optimized using a genetic algorithm to obtain the optimization results, and the fitness value of the optimization results is determined by the fitness function.
[0080] S122: Iteratively optimize the optimization results based on the fitness value until the optimization results meet the preset termination conditions, thus forming an optimized scheduling scheme.
[0081] In this embodiment, when optimizing the initial scheduling scheme, the computer device can use the initial scheduling scheme as the initial population, use a genetic algorithm to optimize the individuals in the initial population, obtain the optimization result, and determine the fitness value of the optimization result through a fitness function. Then, iterative optimization can be performed on the optimization result based on the fitness value until the optimization result meets the preset termination condition, thus forming an optimized scheduling scheme. In this way, the optimized scheduling scheme not only has the real-time adaptability of reinforcement learning, but also has the global optimal feature of genetic algorithm.
[0082] Specifically, the computer device can use the preliminary scheduling scheme obtained from reinforcement learning as the initial population, and then encode the initial population, with each individual representing a task allocation scheme. Furthermore, a fitness function can be defined, which comprehensively considers factors such as task completion time, resource utilization, and task priority; a higher fitness value indicates a better scheduling scheme. Based on this fitness function, the computer device can perform selection, crossover, and mutation operations on the initial population, continuously optimizing the individuals in the population and gradually enriching the population's diversity to expand the search space. After multiple generations of iterative evolution, when the optimization result meets a preset termination condition, such as the fitness value reaching a threshold or the number of iterations reaching an upper limit, convergence occurs, and the final optimized scheduling scheme is output.
[0083] Furthermore, during each iteration, the computer device can evaluate the optimization results using a pre-defined fitness function, calculating the fitness value of each individual to measure the current solution's performance in terms of task completion efficiency, resource utilization, load balancing, and latency control. Subsequently, the computer device can filter individuals based on their fitness values, retaining those with higher fitness and prioritizing their participation in the next generation's evolution to ensure the continuous transmission and accumulation of superior genes.
[0084] In one embodiment, step S130, which involves performing an advantage analysis on the preliminary and optimized scheduling schemes and determining the final scheduling scheme based on the analysis results, may include:
[0085] S131: Determine the fitness values of the preliminary scheduling scheme and the optimized scheduling scheme respectively, and determine whether the fitness value of the optimized scheduling scheme is greater than the fitness value of the preliminary scheduling scheme.
[0086] S132: If so, the optimized scheduling scheme will be used as the final scheduling scheme.
[0087] S133: If not, then the preliminary scheduling scheme and the optimized scheduling scheme are fused to generate the final scheduling scheme.
[0088] In this embodiment, when determining the final scheduling scheme, the computer device can determine the fitness values of the preliminary scheduling scheme and the optimized scheduling scheme respectively. If the fitness value of the optimized scheduling scheme is greater than the fitness value of the preliminary scheduling scheme, the optimized scheduling scheme can be used as the final scheduling scheme; otherwise, the preliminary scheduling scheme and the optimized scheduling scheme are fused to generate the final scheduling scheme.
[0089] Understandably, when the fitness value of the optimized scheduling scheme is detected to be significantly higher than that of the initial scheduling scheme, the computer can directly adopt the optimized scheduling scheme as the final scheduling scheme to ensure that the overall scheduling result achieves a better configuration globally. However, if the fitness value of the optimized scheduling scheme fails to exceed that of the initial scheduling scheme, the computer can further fuse the two, combining the advantages of the initial scheduling scheme in real-time response and dynamic adaptation with the advantages of the optimized scheduling scheme in global optimization and improved resource utilization. This generates a final scheduling scheme that balances rapid adaptability and global optimality, thus avoiding the limitations of relying solely on a single scheme.
[0090] In one embodiment, the method may further include:
[0091] S150: Dynamically update the parameters of the reinforcement learning model and genetic algorithm based on the execution results.
[0092] In this embodiment, after receiving the execution result of the backend task, the computer device can transmit the execution result to the parameter update module, so that the parameter update module can dynamically update the parameters of the reinforcement learning model and genetic algorithm in the fusion decision module based on the execution result, so that the task scheduling model can continuously adapt to the dynamic changes of the backend system, thereby improving the accuracy and effectiveness of scheduling decisions.
[0093] Specifically, based on the execution results, the parameter update module can adjust the policy network or value function in the reinforcement learning model, correcting the agent's behavioral policy according to the actual task execution results, enabling it to make more accurate scheduling actions when facing similar tasks or system states. Simultaneously, the parameter update module can also optimize and adjust the fitness evaluation, selection, crossover, and mutation parameters in the genetic algorithm, allowing the optimization algorithm to better reflect the actual resource usage and task execution performance in subsequent iterations, thereby improving global search efficiency and optimization accuracy.
[0094] Furthermore, the computer equipment can also feed back the execution results to the state awareness module, using the execution results as short-term data for real-time feedback. This helps the state awareness module to more comprehensively characterize the system state, thereby enabling timely adjustments to the system's long-term operating patterns and providing richer evidence for the subsequent generation of system state vectors, ultimately improving the quality of the next round of task scheduling decisions.
[0095] The backend task scheduling and execution apparatus provided in the embodiments of this application is described below. The backend task scheduling and execution apparatus described below can be referred to in correspondence with the backend task scheduling and execution method described above.
[0096] In one embodiment, such as Figure 2 As shown, Figure 2 This application provides a schematic diagram of a backend task scheduling and execution device according to an embodiment of the present application. The present application also provides a backend task scheduling and execution device, including a data acquisition module 210, a scheme generation module 220, a scheme determination module 230, and a task execution module 240, specifically comprising the following:
[0097] The data acquisition module 210 is used to extract features from the backend tasks to be scheduled, obtain task feature data, and generate a system state vector based on the real-time status information of the backend system.
[0098] The scheme generation module 220 is used to perform scheduling analysis on task feature data and system state vector using a reinforcement learning model to generate a preliminary scheduling scheme, and to use a genetic algorithm to iteratively optimize the preliminary scheduling scheme to obtain an optimized scheduling scheme.
[0099] The scheme determination module 230 is used to perform advantage analysis on the preliminary scheduling scheme and the optimized scheduling scheme, and determine the final scheduling scheme based on the analysis results.
[0100] The task execution module 240 is used to allocate nodes and execute tasks for the backend tasks according to the final scheduling scheme, and obtain the execution results.
[0101] In the above embodiments, during backend task scheduling, task feature data of the backend tasks to be scheduled can be extracted first to quantify various key information. Simultaneously, a system state vector can be generated based on the real-time status information of the backend system, enabling real-time capture of dynamic changes in system resources. Next, a reinforcement learning model can be used to analyze the task feature data and system state vector to generate a preliminary scheduling scheme. A genetic algorithm is then used to iteratively optimize the preliminary scheme to obtain an optimized scheduling scheme. This allows reinforcement learning to react quickly to the real-time system status and adapt rapidly to dynamic environments, while the genetic algorithm effectively avoids the problem of reinforcement learning easily getting trapped in local optima, thereby improving the global optimality of the scheduling scheme. Subsequently, the advantages of these two schemes can be analyzed and they can be complemented and integrated, resulting in a final scheduling scheme with greater flexibility and adaptability. Finally, backend tasks can be assigned nodes and executed according to the final scheduling scheme to fully utilize system resources and ensure that each task is completed on time at the appropriate node.
[0102] In one embodiment, the data acquisition module 210 may include:
[0103] The task parsing submodule is used to input the backend tasks to be scheduled into the task parsing module, so that the task parsing module can parse the information of the backend tasks and obtain key information.
[0104] The feature extraction submodule is used to standardize key information to obtain standardized information, and then extract task feature data from the standardized information.
[0105] In one embodiment, the data acquisition module 210 may further include:
[0106] The information monitoring submodule is used to monitor the backend system in real time and input the real-time status information obtained from the monitoring into the status perception module; the status perception module stores historical scheduling data in advance.
[0107] The data integration submodule is used to integrate and quantify real-time status information and historical scheduling data using the status awareness module to form a system status vector.
[0108] In one embodiment, the solution generation module 220 may include:
[0109] The model determination submodule is used to determine the reinforcement learning model; the reinforcement learning model is obtained by training the agent generated based on the task scheduling process using a deep reinforcement learning algorithm.
[0110] The model output submodule is used to input task feature data and system state vector into the reinforcement learning model, so that the reinforcement learning model can make scheduling action suggestions based on the task feature data based on the system state vector and output a preliminary scheduling scheme.
[0111] In one embodiment, the solution generation module 220 may further include:
[0112] The population optimization submodule is used to optimize the individuals in the initial population using a genetic algorithm, based on the preliminary scheduling scheme, to obtain the optimization results, and to determine the fitness value of the optimization results through a fitness function.
[0113] The iterative optimization submodule is used to iteratively optimize the optimization results based on the fitness value until the optimization results meet the preset termination conditions, thus forming an optimized scheduling scheme.
[0114] In one embodiment, the scheme determination module 230 may include:
[0115] The scheme comparison submodule is used to determine the fitness values of the preliminary scheduling scheme and the optimized scheduling scheme respectively, and to determine whether the fitness value of the optimized scheduling scheme is greater than the fitness value of the preliminary scheduling scheme.
[0116] The first determination submodule is used to determine the final scheduling scheme when the fitness value of the optimized scheduling scheme is greater than that of the preliminary scheduling scheme.
[0117] The second determining submodule is used to perform decision fusion on the preliminary scheduling scheme and the optimized scheduling scheme to generate the final scheduling scheme when the fitness value of the optimized scheduling scheme is not greater than the fitness value of the preliminary scheduling scheme.
[0118] In one embodiment, the apparatus may further include:
[0119] The dynamic update module is used to dynamically update the parameters of the reinforcement learning model and genetic algorithm based on the execution results.
[0120] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the backend task scheduling execution method as described in any of the above embodiments.
[0121] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the backend task scheduling execution method as described in any of the above embodiments.
[0122] Indicatively, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 3 The computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the backend task scheduling execution method of any of the above embodiments.
[0123] The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate on an operating system stored in memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0124] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0125] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0126] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0127] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A backend task scheduling and execution method, characterized in that, The method comprises: feature extraction is performed on the to-be-scheduled backend task to obtain task feature data, and a system state vector is generated according to real-time state information of a backend system; a reinforcement learning model is used to perform scheduling analysis on the task feature data and the system state vector, a preliminary scheduling scheme is generated, and a genetic algorithm is used to iteratively optimize the preliminary scheduling scheme to obtain an optimized scheduling scheme; advantage analysis is performed on the preliminary scheduling scheme and the optimized scheduling scheme, and a final scheduling scheme is determined according to an analysis result; node allocation and task execution are performed on the backend task according to the final scheduling scheme to obtain an execution result.
2. The back-end task scheduling execution method according to claim 1, wherein, The feature extraction performed on the to-be-scheduled backend task to obtain task feature data comprises: the to-be-scheduled backend task is input into a task analysis module, so that the task analysis module analyzes information of the backend task to obtain key information; standardization processing is performed on the key information to obtain standardized information, and task feature data is extracted from the standardized information.
3. The back-end task scheduling execution method of claim 1, wherein, The system state vector is generated according to real-time state information of a backend system, comprising: the backend system is monitored in real time, and the monitored real-time state information is input into a state perception module; the state perception module pre-stores historical scheduling data; the state perception module is used to integrate and quantify the real-time state information and the historical scheduling data to form a system state vector.
4. The back-end task scheduling execution method of claim 1, wherein, The reinforcement learning model is used to perform scheduling analysis on the task feature data and the system state vector to generate a preliminary scheduling scheme, comprising: determining a reinforcement learning model; the reinforcement learning model is obtained by training an agent based on a task scheduling process modeling generated by a deep reinforcement learning algorithm; the task feature data and the system state vector are input into the reinforcement learning model, so that the reinforcement learning model suggests a scheduling action for the task feature data based on the system state vector, and outputs a preliminary scheduling scheme.
5. The back-end task scheduling execution method of claim 1, wherein, The genetic algorithm is used to iteratively optimize the preliminary scheduling scheme to obtain an optimized scheduling scheme, comprising: using the preliminary scheduling scheme as an initial population, using a genetic algorithm to optimize individuals in the initial population to obtain an optimization result, and determining an adaptability value of the optimization result through an adaptability function; iteratively optimizing the optimization result based on the adaptability value until the optimization result meets a preset ending condition to form an optimized scheduling scheme.
6. The back-end task scheduling execution method of claim 1, wherein, The advantage analysis is performed on the preliminary scheduling scheme and the optimized scheduling scheme, and a final scheduling scheme is determined according to an analysis result, comprising: the adaptability values of the preliminary scheduling scheme and the optimized scheduling scheme are determined respectively, and it is judged whether the adaptability value of the optimized scheduling scheme is greater than the adaptability value of the preliminary scheduling scheme; if yes, the optimized scheduling scheme is taken as the final scheduling scheme; if no, the preliminary scheduling scheme and the optimized scheduling scheme are fused to generate a final scheduling scheme.
7. The back-end task scheduling and execution method according to any one of claims 1-6, characterized in that, The method further comprises: parameters of the reinforcement learning model and the genetic algorithm are dynamically updated based on the execution result.
8. A back-end task scheduling and execution apparatus, characterized by comprising: comprises: The data acquisition module is configured to perform feature extraction on the to-be-scheduled backend task to obtain task feature data, and generate a system state vector according to real-time state information of the backend system; The scheme generation module is configured to perform scheduling analysis on the task feature data and the system state vector by using a reinforcement learning model, generate a preliminary scheduling scheme, and perform iterative optimization on the preliminary scheduling scheme by using a genetic algorithm to obtain an optimized scheduling scheme; The scheme determination module is configured to perform advantage analysis on the preliminary scheduling scheme and the optimized scheduling scheme, and determine a final scheduling scheme according to an analysis result. The task execution module is configured to perform node allocation and task execution on the backend task according to the final scheduling scheme to obtain an execution result.
9. A storage medium characterized by: The storage medium stores computer readable instructions, and the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the backend task scheduling execution method according to any one of claims 1 to 7.
10. A computer device, comprising: comprise: one or more processors, and a memory; The memory stores computer readable instructions, and the computer readable instructions, when executed by the one or more processors, perform the steps of the backend task scheduling execution method according to any one of claims 1 to 7.