Task scheduling method, electronic equipment, readable storage medium and program product
Through multiple iterative games of non-cooperative game theory and counterfactual regret minimization theory, the real-time and accuracy issues of task scheduling in multi-server cluster systems are solved, and efficient task scheduling and resource utilization are achieved.
Patent Information
- Application Number
- CN202511270482.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-09-08
AI Technical Summary
The existing cluster system with multiple servers has poor real-time task scheduling, low accuracy and low system resource utilization in scenarios with new types of tasks or sudden requests.
Adopting non-cooperative game theory and counterfactual regret minimization theory, the game process of task scheduling game instance is simulated through multiple iterative games, the regret value of each game participant at each decision point is determined, and then the task scheduling strategy is determined.
It improves the real-time and accuracy of task scheduling, improves system resource utilization, adapts to new types of task scenarios, and reduces system congestion.
Smart Images

Figure CN120762866A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a task scheduling method, electronic equipment, a readable storage medium, and a program product. Background Art
[0002] Currently, the most common task scheduling method for multi-server cluster systems relies on models trained offline. This approach is less adaptable to new types of tasks or sudden requests, and model prediction accuracy can decrease due to changes in historical data distribution, impacting real-time scheduling. This results in low task scheduling accuracy and low system resource utilization. Summary of the Invention
[0003] The present invention provides a task scheduling method, electronic equipment, readable storage medium and program product, which at least solve the problems of poor real-time performance of task scheduling, low task scheduling accuracy and low system resource utilization in related technologies.
[0004] The present invention provides a task scheduling method, comprising: Reading configuration parameters; wherein the configuration parameters include at least the number of game participants, the resource status of the game participants, the number of iterations, and the number of tasks; Creating a task scheduling game instance according to the configuration parameters; By sampling and simulating the game process of the task scheduling game instance, the regret value corresponding to each game participant at each decision point is determined; Determine the task scheduling strategy based on the regret values corresponding to each iteration; Obtaining status information of target game participants corresponding to each decision point in the task scheduling strategy; Select actions according to each state information and obtain the results of each action selection; Task scheduling is performed based on the results of each action selection.
[0005] The present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above-mentioned task scheduling methods when executing the computer program.
[0006] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned task scheduling methods are implemented.
[0007] The present invention also provides a computer program product, comprising a computer program, which implements the steps of any of the above-mentioned task scheduling methods when executed by a processor.
[0008] Through the present invention, due to the adoption of non-cooperative game theory and multiple iterative games, the final task scheduling strategy is determined according to the regret values corresponding to each iteration. Based on the counterfactual regret minimization theory, the game process of the task scheduling game instance is sampled and simulated to determine the regret value corresponding to each game participant at each decision point, and then the task scheduling strategy is determined according to the regret values corresponding to each iteration. It is also applicable to new types of task scenarios. Therefore, it can solve the technical problems of poor real-time task scheduling, low task scheduling accuracy, and low system resource utilization, and achieve the technical effect of improving the real-time task scheduling, improving the task scheduling accuracy, and improving the system resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0010] Figure 1 A structural block diagram of a task scheduling system provided by an embodiment of the present invention; Figure 2 A flowchart of an implementation of a task scheduling method provided by an embodiment of the present invention; Figure 3 A flowchart of another task scheduling method according to an embodiment of the present invention; Figure 4 This is a structural block diagram of a task scheduling device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0011] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0012] It should be noted that, in the description of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. The terms "first," "second," etc., in the present invention are used to distinguish similar objects, and are not used to describe a particular order or precedence.
[0013] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0014] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the task scheduling method depends, the specific application environment architecture or specific hardware architecture is described here.
[0015] See also Figure 1 , Figure 1 This is a structural block diagram of a task scheduling system provided by an embodiment of the present invention. A data processing unit (DPU) is provided, comprising a central processing unit (CPU) board and a field-programmable gate array (FPGA) board. The CPU board includes dynamic random access memory (DRAM), an accelerator, and a CPU. The FPGA board includes a field programmable gate array (FPGA) and a remote direct memory access (RDMA) network port. The CPU board and the FPGA board can communicate via a high-speed peripheral component interconnect (PCIE). The FPGA can also communicate with external components via the high-speed PCIE and establish remote communication connections with remote devices via the remote direct memory access (RDMA) network port. The task scheduling system provided by an embodiment of the present invention includes a CPU, possesses computing power, and is capable of self-task awareness. This eliminates the need for separate external nodes dedicated to task scheduling, thereby improving task scheduling efficiency. Through hardware acceleration of dedicated computing, the utilization rate of the central processing unit can be effectively reduced, the number of input / output (I / O) processing programs running on the central processing unit can be reduced, and performance can be indirectly improved. The performance of network data transmission and storage can be effectively improved, and system-level performance bottlenecks can be avoided.
[0016] An embodiment of the present invention provides a task scheduling method, which is described in detail in conjunction with the execution flow of the task scheduling method.
[0017] See also Figure 2 , Figure 2 This is a flowchart of an implementation of a task scheduling method provided by an embodiment of the present invention. The method may include the following steps.
[0018] S201: Read configuration parameters.
[0019] The configuration parameters include at least the number of game participants, the resource status of the game participants, the number of iterations and the number of tasks.
[0020] The configuration file contains pre-set configuration parameters, which include at least the number of game participants, their resource status, the number of iterations, and the number of tasks. Configuration parameters may also include task response time, task completion time, and Proportional–Integral–Derivative (PID) controller parameters, namely, proportional gain (KP), integral gain (KI), and derivative gain (KD).
[0021] The game participants are the network cards within the server's CPU. Task scheduling and the transmission of related data are tied to these cards. The number of game participants is the number of network cards. This can be calculated by multiplying the number of network cards in a single CPU, the number of CPUs in a single server, and the number of servers in the cluster.
[0022] S202: Create a task scheduling game instance according to the configuration parameters.
[0023] After reading the configuration parameters, a task scheduling game instance is created based on the configuration parameters. For example, a scheduling game instance can be created based on the number of game participants, the resource status of the game participants, the number of iterations, and the number of tasks.
[0024] S203: Determine the regret value corresponding to each game participant at each decision point by sampling and simulating the game process of the task scheduling game instance.
[0025] After creating a task scheduling game instance, we simulate the game process of the task scheduling game instance by sampling and determining the regret value corresponding to each player at each decision point. By iterating according to the number of iterations specified in the configuration parameters, we obtain multiple regret values corresponding to each player at each decision point.
[0026] S204: Determine a task scheduling strategy according to the regret values corresponding to each iteration.
[0027] After obtaining multiple regret values corresponding to each player at each decision point through multiple iterations, a task scheduling strategy is determined based on the regret values corresponding to each iteration. For example, for any decision point, the average regret value of each player at that decision point is calculated across all iterations. The player corresponding to each decision point is selected based on the average regret value, and task scheduling is performed based on the selected regret value.
[0028] S205: Obtain state information of the target game participants corresponding to each decision point in the task scheduling strategy.
[0029] Since the network card may be faulty or receive a burst task, etc., which will affect the task execution of the network card at the current decision point, therefore, after determining the task scheduling strategy according to the regret value corresponding to each iteration, the state information of the target game participants corresponding to each decision point in the task scheduling strategy is obtained.
[0030] S206: Select actions according to each state information to obtain each action selection result.
[0031] After obtaining the state information of the target game participants corresponding to each decision point in the task scheduling strategy, actions are selected according to each state information to obtain each action selection result. The action selection result can include executing a task and skipping a task.
[0032] S207: Schedule tasks according to each action selection result.
[0033] After obtaining each action selection result, tasks are scheduled according to each action selection result. For the decision point with the action selection result of executing a task, the target game participant corresponding to the decision point is directly used to execute the task, and for the decision point with the action selection result of skipping a task, the suboptimal game participant corresponding to the decision point needs to be selected again according to the previous multiple iteration results, and if it is detected that the state of the game participant selected again is normal, the game participant selected again is used to execute the task.
[0034] According to the present application, since the non-cooperative game theory is adopted, multiple iterations of games are performed, the final task scheduling strategy is determined according to the regret value corresponding to each iteration, based on the counterfactual regret minimization theory, the game process of the task scheduling game instance is simulated by sampling to determine the regret value of each game participant corresponding to each decision point, and then the task scheduling strategy is determined according to the regret value corresponding to each iteration, which is also applicable to new types of task scenarios, so that the technical problems of poor real-time task scheduling, low task scheduling accuracy, and low system resource utilization can be solved, and the technical effects of improving the real-time task scheduling, improving the task scheduling accuracy, and improving the system resource utilization are achieved.
[0035] Referring to Figure 3 , Figure 3 An implementation flowchart of a task scheduling method provided by an embodiment of the present application can include the following steps.
[0036] S301: Read configuration parameters.
[0037] The configuration parameters include at least the number of game participants, the resource status of the game participants, the number of iterations and the number of tasks.
[0038] You can also create a task scheduling thread and a task completion thread, and pre-create a task cache queue to add tasks to be scheduled. The scheduling thread can sense the arrival of new tasks through the semaphore mechanism.
[0039] S302: Create a task scheduling game instance according to the configuration parameters.
[0040] You can also create a game wrapper to encapsulate your custom game into a game type that can be recognized by the game framework and define game properties such as the number of game participants, action space, and payoff range.
[0041] S303: Determine the regret value corresponding to each game participant at each decision point by sampling and simulating the game process of the task scheduling game instance.
[0042] S304: Calculate the average regret value of each game participant's corresponding regret value for each iteration at each decision point.
[0043] After determining the regret value corresponding to each game participant at each decision point, the average regret value of the regret values corresponding to each game participant in each iteration is calculated at each decision point. That is, for any decision point, each game participant has a regret value corresponding to each iteration. The average of the multiple regret values obtained in each iteration is calculated to obtain the average regret value of the regret values in each iteration.
[0044] S305: Select the maximum value among the average regret values corresponding to each decision point.
[0045] After calculating the average regret value of each participant's regret value across all iterations at each decision point, the maximum value among the average regret values corresponding to each decision point is selected. For example, the multiple average regret values corresponding to each decision point can be sorted by size, and the first average regret value with the highest value in the sorted result is the maximum value among the average regret values.
[0046] S306: Determine a task scheduling strategy based on each maximum value.
[0047] After selecting the maximum value among the average regret values corresponding to each decision point, a task scheduling strategy is determined based on these maximum values. The game participant corresponding to the maximum value among these average regret values can be selected to perform the task at that decision point. By determining the task scheduling strategy based on the maximum value among the average regret values corresponding to each decision point, accurate selection of game participants at each decision point is achieved, thereby improving task scheduling efficiency.
[0048] In one specific embodiment of the present application, step S306 can include the following steps: Step one: find the target game participants corresponding to each maximum value; Step two: build the binding relationship between each target game participant and each decision point; Step three: determine the task scheduling strategy according to each binding relationship.
[0049] For convenience of description, the above three steps can be combined for description.
[0050] After selecting the maximum value in each average regret value corresponding to each decision point, find the target game participants corresponding to each maximum value, build the binding relationship between each target game participant and each decision point, and determine the task scheduling strategy according to each binding relationship. By selecting the target game participants corresponding to each decision point according to the maximum value in each average regret value corresponding to each decision point, and establishing the binding relationship between each target game participant and each decision point, the accurate allocation of each decision point task is realized, and the accuracy of task scheduling is improved.
[0051] S307: Obtain the state information of the target game participants corresponding to each decision point in the task scheduling strategy.
[0052] S308: Select actions according to each state information respectively, and obtain each action selection result.
[0053] S309: Select a task execution action from each action selection result, and execute the task of the corresponding decision point by using the target game participant corresponding to the selected task execution action.
[0054] After selecting actions according to each state information respectively and obtaining each action selection result, a task execution action is selected from each action selection result, and the action selection result is a task execution action, which indicates that the state of the corresponding target game participant is normal, and the target game participant corresponding to the selected task execution action is used to execute the task of the corresponding decision point.
[0055] S310: Select a task skipping action from each action selection result, and determine the target game participant corresponding to the selected task skipping action.
[0056] A task skipping action is selected from each action selection result, and the target game participant corresponding to the selected task skipping action is determined. The action selection result is a task skipping action, which indicates that the state of the corresponding target game participant is abnormal.
[0057] S311: Determine the decision point corresponding to the determined target game participant as the target decision point.
[0058] After determining the target game participant corresponding to the selected task skipping action, the decision point corresponding to the determined target game participant is determined as the target decision point, that is, the target decision point where the game participant needs to be switched is determined.
[0059] S312: Switch the game participants at the target decision point to obtain the switched game participants.
[0060] After determining the target decision point requiring a player switch, the player switch is performed at the target decision point to obtain the player after the switch. For example, a suboptimal player can be selected based on the average regret value of each player across iterations at the target decision point, and this suboptimal player is used as the player after the switch. By executing the task when the action selection result is a task execution action and switching the player when the action selection result is a task skip action, the task scheduling process is accelerated, task blocking is avoided, and task scheduling efficiency is improved.
[0061] In a specific embodiment of the present invention, step S312 may include the following steps: Step 1: Sort the average regret values corresponding to the target decision point by size to obtain the sorting result; where each average regret value is calculated by averaging the regret values of each game participant in each iteration at the target decision point; Step 2: Select the second-ranked average regret value from the larger end of the sorting results; Step 3: Determine the game participant corresponding to the second-ranked average regret value as the post-switching game participant.
[0062] For the convenience of description, the above three steps can be combined for explanation.
[0063] After determining the target decision point where a player switch is required, the regret values of each player corresponding to each iteration can be averaged to obtain the average regret values. The average regret values corresponding to the target decision point are then sorted to obtain a sorted result. The second-highest average regret value is selected from the highest end of the sorted result, and the player corresponding to the second-highest average regret value is determined as the player to be switched. By selecting the player corresponding to the second-highest average regret value as the player to be switched, the advantage of the selected player to be switched after the switch is fully utilized, thereby improving task scheduling efficiency.
[0064] In a specific embodiment of the present invention, switching the game participants at the target decision point may include the following steps: Step 1: Get the preset action space; Step 2: Switch the game participants at the target decision point in the action space.
[0065] For the convenience of description, the above two steps can be combined for explanation.
[0066] An action space can be pre-set. This can include different network cards within the same CPU, different network cards within multiple central servers within the same server, and different network cards within multiple central servers within a server cluster. The pre-set action space is obtained, and the game participants are switched within the action space at the target decision point. By switching game participants within the action space, task scheduling overhead is reduced and task scheduling efficiency is improved.
[0067] S313: Utilize the switched game participants to execute the task at the target decision point.
[0068] After obtaining the post-switching game participants, the post-switching game participants are used to execute the tasks of the target decision point, thereby realizing the sequential execution of the tasks of the target decision point.
[0069] The task scheduling method provided by embodiments of the present invention may also include a game termination judgment process. This process can determine whether all game participants have selected a task, or whether there are no available tasks. The game is stopped when at least one of these judgment conditions is met. Furthermore, if the game is stopped because all game participants have selected a task, if a game participant is detected to have completed the assigned task, task scheduling is continued using the progress of the task scheduling process that was taken over by that participant before the game was paused. By setting the game termination judgment conditions, resources are fully utilized while avoiding task congestion and improving task scheduling efficiency.
[0070] Embodiments of the present invention support task scheduling across multiple computer nodes in a cluster, effectively resolving single-node task congestion and avoiding system downtime caused by single-node failures. By adjusting task allocation and scheduling strategies in real time based on the task's operating status and system load, the system can adapt to varying workloads and system requirements. To address the conflicting situations of multiple urgent tasks simultaneously, a scheduling algorithm based on reinforcement learning employs non-cooperative game theory, running multiple game processes to try different task allocation schemes and selecting the optimal system solution based on the results. This significantly reduces the problem of urgent task congestion caused by multiple conflicts without relying on manually preset rules or static models. Based on the theory of counterfactual regret minimization (CFR), Monte Carlo sampling is used to improve computational efficiency. The Monte-Carlo Counterfactual Regret Minimization (MCCFR) algorithm is used to sample across the entire game path. This algorithm is suitable for highly randomized games and for novel tasks or sudden request scenarios, significantly improving prediction accuracy.
[0071] In a specific embodiment of the present invention, after performing task scheduling according to the task scheduling policy, the method may further include the following steps: Step 1: Generate the task reward value and remaining resource value corresponding to each game participant based on the action space; Step 2: Output and display the task reward value and remaining resource value.
[0072] For the convenience of description, the above two steps can be combined for explanation.
[0073] Because scheduling tasks within the action space significantly reduces scheduling overhead compared to scheduling tasks outside the action space, the task reward value for tasks scheduled within the action space can be pre-set, as can the residual value evaluation criteria. After scheduling tasks according to the task scheduling strategy, the task reward value and residual resource value corresponding to each game participant are generated based on the action space, and these values are displayed. This display of the task reward value and residual resource value allows users to clearly observe the scheduling advantages brought by the current task scheduling strategy.
[0074] In a specific embodiment of the present invention, after outputting and displaying the task reward value and the remaining resource value, the method may further include the following steps: Release the resources occupied by the task scheduling game instance.
[0075] After the output display of the task reward value and the residual resource value, the resources occupied by the task scheduling game instance are released, so that the resources are recycled, and the recycled resources are facilitated to be used for subsequent task scheduling.
[0076] In one specific embodiment of the present application, after the post-switch game participants are obtained, the method can further include the following steps: Step one: obtaining resource requirement information of a task corresponding to a target decision point; Step two: performing residual resource deduction on the post-switch game participants according to the resource requirement information.
[0077] For convenience of description, the above two steps can be combined for description.
[0078] After the post-switch game participants are obtained, the resource requirement information of the task corresponding to the target decision point is obtained, and the residual resource deduction is performed on the post-switch game participants according to the resource requirement information. By performing the residual resource deduction on the post-switch game participants according to the resource requirement information of the task corresponding to the target decision point, the available resources of the game participants are updated in time, which provides an effective reference for subsequent task scheduling.
[0079] In one specific embodiment of the present application, obtaining the resource requirement information of the task corresponding to the target decision point can include the following steps: Step one: obtaining a preset load threshold value and a load value of the post-switch game participants; Step two: determining the resource requirement information of the task corresponding to the target decision point according to the load threshold value and the load value.
[0080] For convenience of description, the above two steps can be combined for description.
[0081] The load threshold value can be preset, the preset load threshold value and the load value of the post-switch game participants are obtained, and the resource requirement information of the task corresponding to the target decision point is determined according to the load threshold value and the load value. By comparing the load value of the post-switch game participants with the preset load threshold value, the resource requirement information of the task corresponding to the target decision point is determined according to the comparison result. Thus, the current load state of the post-switch game participants is fully considered, and the smooth progress of the task scheduling is ensured.
[0082] In one specific embodiment of the present application, determining the resource requirement information of the task corresponding to the target decision point according to the load threshold value and the load value can include the following steps: Step one: when the load value is higher than the load threshold value, randomly generating the resource requirement information of the task corresponding to the target decision point; Step two: when the load value is lower than the load threshold value, predicting the resource requirement information of the task corresponding to the target decision point.
[0083] For the convenience of description, the above two steps can be combined for description.
[0084] After obtaining the preset load threshold and the load value of the post-switch game participant, the load value of the post-switch game participant is compared with the preset load threshold. When the load value is higher than the load threshold, it indicates that the current load is high, and the resource demand information of the task corresponding to the target decision point is randomly generated, such as generating the resource demand information of the task corresponding to the target decision point through a random number generator. When the load value is lower than the load threshold, it indicates that the current load is low, and the resource demand information of the task corresponding to the target decision point is predicted. By determining the resource demand information of the task corresponding to the target decision point according to the comparison result of the load value of the post-switch game participant and the preset load threshold, the current load state of the post-switch game participant is fully considered, and the smooth progress of task scheduling is ensured.
[0085] In one specific embodiment of the present application, creating a task scheduling game instance according to configuration parameters can include the following steps: Step one: constructing a task reward matrix and a task resource demand matrix according to configuration parameters; wherein the task reward matrix includes the reward values corresponding to each task completed by each game participant; and the task resource demand matrix includes the resource demand information required for executing each task; Step two: creating a task scheduling game instance according to the task reward matrix and the task resource demand matrix.
[0086] For the convenience of description, the above two steps can be combined for description.
[0087] After reading the configuration parameters, a task reward matrix and a task resource demand matrix are constructed according to the configuration parameters. The task reward matrix includes the reward values corresponding to each task completed by each game participant, and the task resource demand matrix includes the resource demand information required for executing each task. A task scheduling game instance is created according to the task reward matrix and the task resource demand matrix. By constructing a task reward matrix and a task resource demand matrix, and creating a task scheduling game instance according to the task reward matrix and the task resource demand matrix, the task scheduling game instance is quickly and accurately created.
[0088] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment.
[0089] Embodiments of the present application also provide a task scheduling device.
[0090] Referring to Figure 4 ,Figure 4 A structural block diagram of a task scheduling device provided in an embodiment of the present invention, the device may include: Configuration parameter reading module 41, used to read configuration parameters; wherein the configuration parameters include at least the number of game participants, game participant resource status, number of iterations and number of tasks; An instance creation module 42 is used to create a task scheduling game instance according to configuration parameters; The regret value determination module 43 is used to determine the regret value corresponding to each game participant at each decision point by sampling and simulating the game process of the task scheduling game instance; A task scheduling strategy determination module 44 is configured to determine a task scheduling strategy based on the regret values corresponding to each iteration; A state information acquisition module 45 is used to obtain the state information of the target game participants corresponding to each decision point in the task scheduling strategy; An action selection result obtaining module 46 is used to select actions according to each state information and obtain each action selection result; The task scheduling module 47 is used to schedule tasks according to the results of each action selection.
[0091] Through the present invention, due to the adoption of non-cooperative game theory and multiple iterative games, the final task scheduling strategy is determined according to the regret values corresponding to each iteration. Based on the counterfactual regret minimization theory, the game process of the task scheduling game instance is sampled and simulated to determine the regret value corresponding to each game participant at each decision point, and then the task scheduling strategy is determined according to the regret values corresponding to each iteration. It is also applicable to new types of task scenarios. Therefore, it can solve the technical problems of poor real-time task scheduling, low task scheduling accuracy, and low system resource utilization, and achieve the technical effect of improving the real-time task scheduling, improving the task scheduling accuracy, and improving the system resource utilization.
[0092] In a specific embodiment of the present invention, the task scheduling strategy determination module 44 may include: The average regret value calculation submodule is used to calculate the average regret value of each game participant's corresponding regret value of each iteration at each decision point; The maximum value selection submodule is used to select the maximum value of the average regret values corresponding to each decision point; The task scheduling strategy determination submodule is used to determine the task scheduling strategy according to each maximum value.
[0093] In a specific embodiment of the present invention, the task scheduling strategy determination submodule may include: A game participant search unit, used to search for target game participants corresponding to each maximum value; A binding relationship building unit, used to build a binding relationship between each target game participant and each decision point; The task scheduling strategy determining unit is used to determine the task scheduling strategy according to each binding relationship.
[0094] In a specific embodiment of the present invention, the task scheduling module 47 may include: The first task execution submodule is used to select a task execution action from each action selection result, and use the target game participant corresponding to the selected task execution action to execute the task corresponding to the decision point; A game participant determination submodule is used to select a task skipping action from each action selection result and determine the target game participant corresponding to the selected task skipping action; A target decision point determination submodule is used to determine the decision point corresponding to the determined target game participant as the target decision point; A submodule for obtaining the game participants after switching is used to switch the game participants at the target decision point to obtain the game participants after switching; The second task execution submodule is used to use the switched game participants to execute the task at the target decision point.
[0095] In a specific embodiment of the present invention, the post-switching game participant acquisition submodule may include: A sorting result obtaining unit is used to sort the average regret values corresponding to the target decision point to obtain a sorting result; wherein each average regret value is obtained by calculating the average regret value of each game participant corresponding to each iteration at the target decision point; An average regret value selection unit is used to select the average regret value ranked second from the larger end of the sorting result; The post-switching game participant determination unit is used to determine the game participant corresponding to the second-ranked average regret value as the post-switching game participant.
[0096] In a specific embodiment of the present invention, the post-switching game participant acquisition submodule may include: An action space acquisition unit, used to acquire a preset action space; The game participant switching unit is used to switch the game participants at the target decision point in the action space.
[0097] In a specific embodiment of the present invention, the device may further include: The reward value and value generation module is used to generate the task reward value and remaining resource value corresponding to each game participant according to the action space after the task scheduling is performed according to the task scheduling strategy; The output display module is used to output and display the task reward value and the remaining resource value.
[0098] In a specific embodiment of the present invention, the device may further include: The resource release module is used to release the resources occupied by the task scheduling game instance after outputting and displaying the task reward value and the remaining resource value.
[0099] In a specific embodiment of the present invention, the device may further include: The resource requirement information acquisition module is used to obtain the resource requirement information of the task corresponding to the target decision point after obtaining the post-switching game participants; The remaining resource deduction module is used to deduct the remaining resources of the game participants after switching according to the resource demand information.
[0100] In a specific embodiment of the present invention, the resource demand information acquisition module may include: The load threshold and load value acquisition submodule is used to obtain the preset load threshold and the load value of the game participant after switching; The resource requirement information determination submodule is used to determine the resource requirement information of the task corresponding to the target decision point according to the load threshold and the load value.
[0101] In a specific embodiment of the present invention, the resource requirement information determination submodule may include: A random generation unit, configured to randomly generate resource requirement information of a task corresponding to a target decision point when the load value is higher than a load threshold; The resource requirement information prediction unit is used to predict the resource requirement information of the task corresponding to the target decision point when the load value is lower than the load threshold.
[0102] In a specific embodiment of the present invention, the instance creation module 42 may include: The matrix construction submodule is used to construct the task reward matrix and the task resource requirement matrix based on the configuration parameters; the task reward matrix includes the reward values corresponding to each game participant completing each task; the task resource requirement matrix includes the resource requirement information required for each task to be executed; The instance creation submodule is used to create a task scheduling game instance based on the task reward matrix and the task resource requirement matrix.
[0103] For the description of the features in the embodiment corresponding to the task scheduling device, please refer to the relevant description of the embodiment corresponding to the task scheduling method, and no further details will be given here.
[0104] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned task scheduling method embodiments.
[0105] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned task scheduling method embodiments when running.
[0106] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0107] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above-mentioned task scheduling method embodiments are implemented.
[0108] An embodiment of the present invention also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned task scheduling method embodiments.
[0109] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0110] The above is a detailed introduction to a task scheduling method, electronic device, readable storage medium and program product provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A task scheduling method, characterized in that: include: Reading configuration parameters; wherein the configuration parameters include at least the number of game participants, the resource status of the game participants, the number of iterations, and the number of tasks; Creating a task scheduling game instance according to the configuration parameters; By sampling and simulating the game process of the task scheduling game instance, the regret value corresponding to each game participant at each decision point is determined; Determine the task scheduling strategy based on the regret values corresponding to each iteration; Obtaining status information of target game participants corresponding to each decision point in the task scheduling strategy; Select actions according to each state information and obtain the results of each action selection; Task scheduling is performed based on the results of each action selection.
2. The task scheduling method according to claim 1, characterized in that: The task scheduling strategy is determined based on the regret values corresponding to each iteration, including: Calculate the average regret value of each game participant's corresponding regret value for each iteration at each decision point; Select the maximum value of the average regret values corresponding to each decision point; The task scheduling strategy is determined according to each maximum value.
3. The task scheduling method according to claim 2, characterized in that: Determining the task scheduling strategy according to each maximum value includes: Find the target game participants corresponding to each maximum value; Constructing binding relationships between each target game participant and each decision point; The task scheduling strategy is determined according to each binding relationship.
4. The task scheduling method according to claim 1, wherein: Task scheduling is performed based on the results of each action selection, including: Select a task execution action from each action selection result, and use the target game participant corresponding to the selected task execution action to execute the task corresponding to the decision point; Selecting a task skipping action from each action selection result, and determining a target game participant corresponding to the selected task skipping action; Determine the decision point corresponding to the determined target game participant as the target decision point; Switching the game participants at the target decision point to obtain the switched game participants; The game participant after the switch is used to perform the task of the target decision point.
5. The task scheduling method according to claim 4, characterized in that: Switching the game participants at the target decision point to obtain the switched game participants includes: The average regret values corresponding to the target decision point are sorted by size to obtain a sorting result; wherein the average regret value is obtained by calculating the average regret value of each iteration corresponding to each game participant at the target decision point; Select the second average regret value from the larger end of the sorting results; The game participant corresponding to the second-ranked average regret value is determined as the post-switching game participant.
6. The task scheduling method according to claim 4, characterized in that: Switching the game participants at the target decision point includes: Get the preset action space; The game participant is switched at the target decision point in the action space.
7. The task scheduling method according to claim 6, characterized in that: After performing task scheduling according to the task scheduling strategy, the method further includes: Generate task reward values and remaining resource values corresponding to each game participant according to the action space; The task reward value and the remaining resource value are output and displayed.
8. The task scheduling method according to claim 7, characterized in that: After outputting and displaying the task reward value and the remaining resource value, the method further includes: The resources occupied by the task scheduling game instance are released.
9. The task scheduling method according to claim 4, characterized in that: After obtaining the post-switching game participants, it also includes: Obtaining resource requirement information of the task corresponding to the target decision point; Deduct the remaining resources of the game participants after the switch according to the resource demand information.
10. The task scheduling method according to claim 9, characterized in that: Obtaining resource requirement information for the task corresponding to the target decision point includes: Obtaining a preset load threshold and a load value of the game participant after the switching; The resource requirement information of the task corresponding to the target decision point is determined according to the load threshold and the load value.
11. The task scheduling method according to claim 10, characterized in that: Determining resource requirement information of the task corresponding to the target decision point according to the load threshold and the load value includes: When the load value is higher than the load threshold, randomly generating resource requirement information of the task corresponding to the target decision point; When the load value is lower than the load threshold, resource requirement information of the task corresponding to the target decision point is predicted.
12. The task scheduling method according to claim 1, wherein: Creating a task scheduling game instance according to the configuration parameters includes: Constructing a task reward matrix and a task resource requirement matrix based on the configuration parameters; wherein the task reward matrix includes the reward value corresponding to each game participant completing each task; and the task resource requirement matrix includes the resource requirement information required for each task to be executed; The task scheduling game instance is created according to the task reward matrix and the task resource requirement matrix.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the task scheduling method according to any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the task scheduling method according to any one of claims 1 to 12.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the task scheduling method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Cloud computing resource scheduling method based on game theory
CN107193658A
Edge scheduling optimization method based on congestion game
CN110851268A
Artificial intelligence decision-making method and system based on game theory and Nash equilibrium
CN111905373A
Formation decision-making method and system for confrontation game, medium and equipment
CN112742028A
Incomplete information game method and system based on reinforcement learning and electronic equipment
CN112926744A