Task Allocation Method, Device, Terminal Device and Medium

Through the combination of neural networks and genetic algorithms, the matching weights and resource requirements of task teams and task characteristics are determined, which solves the problem of inaccurate task allocation in the existing technology and improves the task processing efficiency of the software development team.

CN117436627BActive Publication Date: 2025-07-18SHENZHEN WEIAIZHIYUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311085576.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-25
Publication Date
2025-07-18
Estimated Expiration
2043-08-25

AI Technical Summary

Technical Problem

The existing task allocation and resource scheduling methods fail to take into account the actual performance and resource requirements of the task team, resulting in inaccurate task allocation and affecting processing efficiency.

Method used

The matching weight between the task group and the task characteristics is determined through the preset neural network, a task dependency relationship and resource requirements constraint matrix is constructed, and combined with the task time limit, a genetic algorithm is used to obtain the optimal task allocation solution.

Benefits of technology

It realizes accurate assignment of tasks, improves task processing efficiency, adapts to dynamic changes in tasks and teams, and optimizes resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117436627B_ABST
    Figure CN117436627B_ABST
Patent Text Reader

Abstract

The present invention discloses a task allocation method, apparatus, terminal device and computer-readable storage medium. The method includes: determining a plurality of tasks to be executed and a plurality of task execution groups; obtaining a task feature sequence of the plurality of tasks to be executed and a task group sequence of the plurality of task execution groups, and determining a task matching weight between the task group sequence and the task feature sequence through a preset neural network; determining a task dependency relationship between the plurality of tasks to be executed, and constructing a resource requirement constraint matrix when the task execution group executes the task to be executed; and obtaining an optimal task allocation scheme based on the task dependency relationship, the resource requirement constraint matrix and the task matching weight, and in combination with a task time limit corresponding to each task to be executed. The present invention can achieve precise task allocation, thereby improving task processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a task allocation method, device, terminal device, and computer-readable storage medium. Background Art

[0002] With the advancement of digital transformation, the scale of software development projects has become increasingly large. Against this background, software development teams face a series of challenges in resource allocation and task scheduling.

[0003] For example, for existing resource allocation and task scheduling methods, tasks and required resources are generally allocated to each software development team through a genetic algorithm.

[0004] However, this kind of task allocation and task scheduling method does not take into account many key factors, such as the actual performance of each task group in executing tasks and the resources required for task execution, etc., making it impossible to perform precise task allocation and resource scheduling for each development team, resulting in low subsequent task processing efficiency. Summary of the Invention

[0005] The main purpose of the present invention is to provide a task allocation method, device, terminal device, and computer-readable storage medium, aiming to achieve precise task allocation and thereby improve task processing efficiency.

[0006] To achieve the above object, the present invention provides a task allocation method, and the method includes the following steps:

[0007] Determine a plurality of tasks to be executed and a plurality of task execution groups;

[0008] Obtain the task feature sequences of the plurality of tasks to be executed and the task group sequences of the plurality of task execution groups, and determine the task matching weights between the task group sequences and the task feature sequences through a preset neural network;

[0009] Determine the task dependency relationships between the plurality of tasks to be executed, and construct a resource requirement constraint matrix when the task execution groups execute the tasks to be executed;

[0010] Based on the task dependency relationships, the resource requirement constraint matrix, and the task matching weights, and in combination with the task time limit corresponding to each task to be executed, obtain an optimal task allocation plan.

[0011] Optionally, before the step of obtaining the task feature sequences of the plurality of tasks to be executed and the task group sequences of the plurality of task execution groups, and determining the task matching weights between the task group sequences and the task feature sequences through a preset neural network, it further includes:

[0012] For each of the to-be-executed tasks within the current time window, obtain the task weight of the to-be-executed task;

[0013] Construct the preset neural network according to the sequence sizes of the task feature sequence and the task group sequence;

[0014] The step of determining the task matching weight between the task group sequence and the task feature sequence through the preset neural network includes:

[0015] Map the task feature sequence and the task group sequence into boolean vectors of equal length respectively, and use the boolean vectors as the input of the preset neural network to obtain the task matching weight between the task group sequence and the task feature sequence output by the preset neural network, where the significance probability between the task matching weight and the task weight of the to-be-executed task is less than the preset difference threshold.

[0016] Optionally, after the step of mapping the task feature sequence into a boolean vector of equal length, and using the boolean vector as the input of the preset neural network to obtain the task matching weight between the task execution group and the task feature sequence of the to-be-executed task, it further includes:

[0017] If the significance probability between the task matching weight and the task weight is greater than the preset difference threshold, then train the preset neural network through the backpropagation method until the significance probability between the task matching weight and the task weight is less than the preset difference threshold.

[0018] Optionally, the step of determining the task dependency relationship between the multiple to-be-executed tasks includes:

[0019] Obtain the dependency relationship between the multiple to-be-executed tasks;

[0020] Construct a task dependency graph according to the dependency relationship, where each node of the task dependency graph represents each to-be-executed task, and the directed edge of the task dependency graph represents the dependency relationship.

[0021] Optionally, the step of constructing the resource requirement constraint matrix when the task execution group executes the to-be-executed task includes:

[0022] Obtain the resource requirements of the task execution group for executing the to-be-executed task;

[0023] Construct a resource requirement constraint matrix according to the resource requirements, where the resource requirement constraint matrix includes the resource requirements of each task execution group for executing each to-be-executed task.

[0024] Optionally, before the step of obtaining the optimal task assignment solution based on the task dependency relationship, the resource requirement constraint matrix, and the task matching weight, and in combination with the task time limit corresponding to each to-be-executed task, the method further includes:

[0025] Construct an initial population, where each individual in the initial population represents a task assignment solution;

[0026] Obtain the dependency weight according to the task dependency graph;

[0027] Obtain the inter-group resource load balance weight corresponding to the task execution group according to the resource requirement constraint matrix;

[0028] Perform weight superposition on the task matching weight, the dependency weight, and the inter-group resource load balance weight to obtain a fitness function, and based on the fitness function, in combination with the task time limit corresponding to each task execution group, obtain the optimal task assignment scheduling solution through a genetic algorithm.

[0029] Optionally, the step of obtaining the optimal task assignment solution based on the task dependency relationship, the resource requirement constraint matrix, and the task matching weight, and in combination with the task time limit corresponding to each to-be-executed task, includes:

[0030] Determine the set of to-be-executed tasks corresponding to each task execution group;

[0031] Obtain the task time limits of the to-be-executed tasks in the set of to-be-executed tasks, where the task time limit includes the task execution time and the task execution deadline;

[0032] Calculate the urgency value of each to-be-executed task according to the task execution time and the task execution deadline, and in combination with the current time;

[0033] Optimize the task assignment solution through a genetic algorithm according to the fitness function, and during the optimization process, sort the multiple to-be-executed tasks according to the urgency value until the optimal task assignment solution is obtained.

[0034] To achieve the above object, the present invention further provides a task assignment device, where the task assignment device includes:

[0035] A first determination module, configured to determine a plurality of to-be-executed tasks and a plurality of task execution groups;

[0036] A second determination module, configured to obtain the task feature sequences of the multiple tasks to be executed and the task group sequences of the multiple task execution groups, and determine the task matching weights between the task group sequences and the task feature sequences through a preset neural network;

[0037] A third determination module, configured to determine the task dependency relationships between the multiple tasks to be executed and construct a resource requirement constraint matrix when the task execution groups execute the tasks to be executed;

[0038] An acquisition module, configured to obtain an optimal task allocation plan based on the task dependency relationships, the resource requirement constraint matrix, and the task matching weights, and in combination with the task time limits corresponding to each of the tasks to be executed.

[0039] To achieve the above object, the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a task allocation program stored on the memory and executable on the processor. When the task allocation program is executed by the processor, the steps of the above-mentioned task allocation method are implemented.

[0040] In addition, to achieve the above object, the present invention further proposes a computer-readable storage medium, where a task allocation program is stored on the computer-readable storage medium. When the task allocation program is executed by a processor, the steps of the above-mentioned task allocation method are implemented.

[0041] To achieve the above object, the present invention further provides a computer program product, where the computer program product includes a computer program. When the computer program is executed by a processor, the steps of the above-mentioned task allocation method are implemented.

[0042] The present invention provides a task allocation method, device, terminal device, computer-readable storage medium, and computer program product. By determining multiple tasks to be executed and multiple task execution groups; obtaining the task feature sequences of the multiple tasks to be executed and the task group sequences of the multiple task execution groups, and determining the task matching weights between the task group sequences and the task feature sequences through a preset neural network; determining the task dependency relationships between the multiple tasks to be executed and constructing a resource requirement constraint matrix when the task execution groups execute the tasks to be executed; obtaining an optimal task allocation plan based on the task dependency relationships, the resource requirement constraint matrix, and the task matching weights, and in combination with the task time limits corresponding to each of the tasks to be executed.

[0043] Compared with the task allocation method in the prior art, in the present invention, the task matching weight between the task group sequence and the task feature sequence, the task dependency relationship between multiple tasks to be executed, the resource requirement constraint matrix when each task execution group executes the tasks to be executed, and the task execution time corresponding to the tasks to be executed can be determined through a preset neural network. Through a genetic algorithm, the optimal task allocation scheme can be solved. Therefore, the present invention takes into account the constraint relationship between the task execution group and the tasks to be executed, the constraints between the tasks to be executed, the resource constraints required for task execution, and the task execution time constraint. Under multiple constraint conditions, the optimal task allocation scheme is determined through a genetic algorithm, so that the optimal task allocation scheme can accurately adapt to the task execution capabilities and resource requirements of each group, realizing accurate task allocation, and thus improving the subsequent task processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic structural diagram of the hardware operating environment related to the solution of the embodiment of the present invention;

[0045] Figure 2 It is a schematic diagram of the existing task allocation process of an embodiment of the task allocation method of the present invention;

[0046] Figure 3 It is a schematic diagram of the first process of an embodiment of the task allocation method of the present invention;

[0047] Figure 4 It is a schematic diagram of the second process of an embodiment of the task allocation method of the present invention;

[0048] Figure 5 It is a schematic diagram of the functional modules of an embodiment of the task allocation device of the present invention.

[0049] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] As Figure 1 shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment related to the solution of the embodiment of the present invention.

[0052] The terminal device in the embodiment of the present invention can be a mobile phone, a tablet computer, a computer, a server or other network devices, etc. The terminal device in this embodiment can be used to achieve efficient and accurate task allocation.

[0053] As Figure 1As shown in the figure, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0054] Those skilled in the art can understand that Figure 1 the device structure shown in the figure does not constitute a limitation on the task allocation device, and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.

[0055] As Figure 1 shown, the memory 1005, as a computer storage medium, may include an operation, a network communication module, a user interface module, and a task allocation program. The operation is a program for managing and controlling the hardware and software resources of the device, and supports the operation of the task allocation program and other software or programs. In Figure 1 the device shown in the figure, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 may be used to call the task allocation program stored in the memory 1005 and perform the following operations:

[0056] Determine a plurality of tasks to be executed and a plurality of task execution groups;

[0057] Obtain the task feature sequence of the plurality of tasks to be executed and the task group sequence of the plurality of task execution groups, and determine the task matching weight between the task group sequence and the task feature sequence through a preset neural network;

[0058] Determine the task dependency relationship between the plurality of tasks to be executed, and construct a resource requirement constraint matrix when the task execution group executes the tasks to be executed;

[0059] Based on the task dependency relationship, the resource requirement constraint matrix, and the task matching weight, and in combination with the task time limit corresponding to each task to be executed, obtain an optimal task allocation plan.

[0060] Further, before the step of obtaining the task feature sequences of the multiple to-be-executed tasks and the task group sequences of the multiple task execution groups, and determining the task matching weights between the task group sequences and the task feature sequences through a preset neural network, the processor 1001 may be used to call the task allocation program stored in the memory 1005 and perform the following operations:

[0061] For each of the to-be-executed tasks within the current time window, obtain the task weight of the to-be-executed task;

[0062] Construct the preset neural network according to the sequence sizes of the task feature sequence and the task group sequence;

[0063] The processor 1001 may be used to call the task allocation program stored in the memory 1005 and perform the following operations:

[0064] Map the task feature sequence and the task group sequence into equal-length boolean vectors respectively, and use the boolean vectors as the input of the preset neural network to obtain the task matching weights between the task group sequence and the task feature sequence output by the preset neural network, where the significance probability between the task matching weights and the task weights of the to-be-executed tasks is less than a preset difference threshold.

[0065] Further, after the step of mapping the task feature sequence into an equal-length boolean vector, and using the boolean vector as the input of the preset neural network to obtain the task matching weights between the task execution group and the task feature sequence of the to-be-executed task output by the preset neural network, the processor 1001 may be used to call the task allocation program stored in the memory 1005 and perform the following operations:

[0066] If the significance probability between the task matching weights and the task weights is greater than the preset difference threshold, then train the preset neural network through the backpropagation method until the significance probability between the task matching weights and the task weights is less than the preset difference threshold.

[0067] Further, the processor 1001 may be used to call the task allocation program stored in the memory 1005 and perform the following operations:

[0068] Obtain the dependency relationships between the multiple to-be-executed tasks;

[0069] Construct a task dependency graph according to the dependency relationships, where each node of the task dependency graph represents each of the to-be-executed tasks, and the directed edges of the task dependency graph represent the dependency relationships.

[0070] Further, the processor 1001 may be configured to call the task allocation program stored in the memory 1005 and perform the following operations:

[0071] Obtain the resource requirement quantity for the task execution group to execute the to-be-executed task;

[0072] Construct a resource requirement constraint matrix according to the resource requirement quantity, where the resource requirement constraint matrix includes the resource requirement quantity for each task execution group to execute each to-be-executed task.

[0073] Further, before the step of obtaining the optimal task allocation plan based on the task dependency relationship, the resource requirement constraint matrix, the task matching weight, and in combination with the task time limit corresponding to each to-be-executed task, the processor 1001 may be configured to call the task allocation program stored in the memory 1005 and perform the following operations:

[0074] Construct an initial population, where each individual in the initial population represents a task allocation plan;

[0075] Obtain the dependency relationship weight according to the task dependency graph;

[0076] Obtain the inter-group resource load balance weight corresponding to the task execution group according to the resource requirement constraint matrix;

[0077] Perform weight superposition on the task matching weight, the dependency relationship weight, and the inter-group resource load balance weight to obtain a fitness function, and based on the fitness function, in combination with the task time limit corresponding to each task execution group, obtain the optimal task allocation and scheduling plan through a genetic algorithm.

[0078] Further, the processor 1001 may be configured to call the task allocation program stored in the memory 1005 and perform the following operations:

[0079] Determine the set of to-be-executed tasks corresponding to each task execution group;

[0080] Obtain the task time limit for each to-be-executed task in the set of to-be-executed tasks, where the task time limit includes the task execution time and the task execution deadline;

[0081] Calculate the urgency value of each to-be-executed task according to the task execution time and the task execution deadline, and in combination with the current time;

[0082] Optimize the task allocation plan through a genetic algorithm according to the fitness function, and during the optimization process, sort the multiple to-be-executed tasks according to the urgency value until the optimal task allocation plan is obtained.

[0083] According to the above background description of the present application, for the existing resource allocation and task scheduling, the genetic algorithm is generally used to allocate tasks and required resources to each software development team. For example, as Figure 2 shown, it includes the following steps:

[0084] (1) Problem modeling and encoding: Abstract the task allocation and scheduling problem into an optimization model, and design a suitable encoding scheme to represent the feasible solutions in the solution space as computer-processable data structures;

[0085] (2) Population initialization: Randomly generate a group of initial individuals to form a population, and each individual represents a scheduling scheme;

[0086] (3) Fitness evaluation: Set a fitness function according to the optimization goal, evaluate each individual in the population, and measure the performance of the scheduling scheme corresponding to the individual in the problem;

[0087] (4) Termination condition: Set the conditions for stopping the algorithm from two aspects of computing time and solution accuracy. If the termination condition is not met, continue to execute; otherwise, jump to step VIII to output the optimal individual;

[0088] (5) Selection, crossover, and mutation: Adopt a suitable selection operator, select excellent individuals as parents according to fitness, and generate new individuals through crossover and mutation operations;

[0089] (6) Update the population: Combine the newly generated individuals and some parent individuals to form an updated population;

[0090] (7) Iterative optimization: Repeat steps III to VI, and continuously improve the population through the evolution process;

[0091] (8) Output the optimal individual and decode: After the termination condition is met, select the individual with the highest fitness from the final population as the optimal solution, which is the task allocation and scheduling scheme for the problem.

[0092] According to the above method, the prior art can achieve task allocation and resource scheduling, etc.

[0093] However, this method has at least the following problems:

[0094] (1) Long startup time for new tasks: Only simply classify tasks without considering the similarity between tasks. When a new task is generated, only the random initialization method is used to fill the weights, which affects the accuracy of the algorithm;

[0095] (2) Lack of self - learning mechanism: Static weight parameters are used during fitness evaluation, without considering the learning curves and adaptability of different development teams. This causes the algorithm to be unable to make dynamic adjustments based on the actual performance of different development teams, thus limiting the improvement of overall performance.

[0096] (3) Slow algorithm convergence speed: For the multi - task and multi - resource constraint problem with the addition of the time dimension, the search space for the effective solutions of the genetic algorithm is large, and the convergence speed is slow. A large number of iterations are required to obtain a relatively optimal solution.

[0097] (4) Single - direction fitness evaluation: Only the relevance between tasks and teams is considered, and the task dependencies and resource constraints in the actual development environment are not evaluated.

[0098] Therefore, to solve the above problems, the present invention proposes a task allocation method, aiming to accurately allocate tasks for each task execution team, thereby improving the task processing efficiency.

[0099] Refer to Figure 3 , Figure 3 which is a schematic flowchart of the first embodiment of the task allocation method of the present invention.

[0100] The embodiments of the present invention provide embodiments of the task allocation method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than here.

[0101] Specifically, the task allocation method in this embodiment includes the following steps:

[0102] Step S10, determine multiple tasks to be executed and multiple task execution teams;

[0103] In this embodiment, for a certain project development, the terminal device can pre - determine multiple tasks to be executed and multiple task execution teams. Among them, each task execution team includes at least one developer.

[0104] Specifically, for example:

[0105] (1) Data collection: Set a data collection window with a window spacing of τ and a time span of T.

[0106] (2) Data processing: Assume that there are currently n task execution teams, and the historical performance data of m tasks are collected within a data collection window. After cleaning, transforming, and normalizing the data, it is represented as the following data matrix:

[0107] Ⅰ. Task execution time matrix E nm , where E ij represents the time spent by the i - th team to execute the j - th task.

[0108] II. Task Completion Quality Matrix Q nm , where Q ij represents the quality score of the i-th group for completing the j-th task;

[0109] III. Group Resource Utilization Vector U n , where U i represents the resource utilization rate of the i-th group, i ∈ n;

[0110] IV. Days Overdue Vector D m , where represents the number of days overdue for the j-th task, j ∈ m;

[0111] (3) Determine Task Weight W ij = T ij * U i * P j , where, is the task execution efficiency score, U i = U i is the resource utilization factor, is the overdue penalty factor (α is used to control the impact of the number of days overdue on the penalty factor).

[0112] Through the above operations, the terminal device determines multiple task execution groups and multiple tasks to be executed within a data collection window. In addition, this embodiment also determines the actual task weight W ij of each task to be executed, and subsequently optimizes the neural network based on this actual task weight W ij .

[0113] Step S20, obtain the task feature sequence of the multiple tasks to be executed and the task group sequence of the multiple task execution groups, and determine the task matching weight between the task group sequence and the task feature sequence through a preset neural network;

[0114] In this embodiment, after the terminal device obtains multiple task execution groups and multiple tasks to be executed, it can obtain the task feature sequence corresponding to the multiple tasks to be executed and the task group sequence of the multiple task execution groups. Furthermore, it can determine the task matching weight between the above task group sequence and the task feature sequence through a preset neural network.

[0115] Specifically, for example, the terminal device can obtain the task sequence T: {T1, T2, T3,...} corresponding to the multiple tasks to be executed and the task group sequence Z: {Z1, Z2, Z3,...}, and then perform feature abstraction on the above sequences to obtain a task feature sequence of size x and a task group sequence of size y Each feature in the sequence is indivisible and independent of each other.

[0116] Step S30: Determine the task dependency relationships among the multiple to-be-executed tasks, and construct a resource requirement constraint matrix for the task execution team when executing the to-be-executed tasks.

[0117] In this embodiment, since there may be dependency relationships among the to-be-executed tasks. For example, the to-be-executed task T a needs to be executed after the to-be-executed task T b is completed. Therefore, the terminal device needs to determine the task dependency relationships among the multiple to-be-executed tasks.

[0118] Moreover, since the resources required for task execution are limited, the terminal device also needs to pre-determine the resources required by the task execution team for each to-be-executed task and construct a resource requirement constraint matrix.

[0119] Step S40: Based on the task dependency relationships, the resource requirement constraint matrix, and the task matching weights, and in combination with the task time limit corresponding to each to-be-executed task, obtain an optimal task allocation plan.

[0120] In this embodiment, after the terminal device obtains the above-mentioned task dependency relationships, resource requirement constraint matrix, and task matching weights, it can, according to the above-mentioned task dependency relationships, resource requirement constraint matrix, and task matching weights, and in combination with the task execution time of each to-be-executed task, use a genetic algorithm to obtain an optimal task allocation plan.

[0121] It should be noted that in this embodiment, as Figure 4 shown, before using the genetic algorithm for selection, crossover, and mutation in this embodiment, a fitness function can be constructed according to the above-mentioned task dependency relationships, resource requirement constraint matrix, and the task matching weights output by a preset neural network, rather than the genetic algorithm as Figure 2 shown. Therefore, this embodiment can perform fitness evaluation on the constraints between the team and tasks, inter-group constraints, and inter-task constraints, enhancing the accuracy of evaluating the pros and cons of the plan.

[0122] In this embodiment, for the development of a certain project, the terminal device can pre-determine multiple tasks to be executed and multiple task execution groups. After the terminal device obtains the multiple task execution groups and the multiple tasks to be executed, it can obtain the task feature sequences corresponding to the multiple tasks to be executed and the task group sequences of the multiple task execution groups. Furthermore, through a preset neural network, it can determine the task matching weights between the task group sequences and the task feature sequences. Furthermore, the terminal device can determine the task dependency relationships between the multiple tasks to be executed, and determine the resources required for the task execution groups to execute each task to be executed, and construct a resource requirement constraint matrix. According to the above task dependency relationships, resource requirement constraint matrix, and task matching weights, and in combination with the task execution time of each task to be executed, through a genetic algorithm, an optimal task allocation plan can be obtained.

[0123] Compared with the task allocation methods in the prior art, in the present invention, through a preset neural network, the task matching weights between the task group sequences and the task feature sequences, the task dependency relationships between the multiple tasks to be executed, the resource requirement constraint matrix for each task execution group to execute the tasks to be executed, and the task execution time corresponding to the tasks to be executed can be determined. Through a genetic algorithm, an optimal task allocation plan can be solved. Therefore, the present invention takes into account the constraint relationships between the task execution groups and the tasks to be executed, the constraints between the tasks to be executed, the resource constraints required for task execution, and the task execution time constraints. Under multiple constraint conditions, through a genetic algorithm, an optimal task allocation plan is determined to be obtained, so that the optimal task allocation plan can accurately adapt to the task execution capabilities and resource requirements of each group, realizing accurate task allocation, and thus improving the subsequent task processing efficiency.

[0124] Furthermore, based on the first embodiment of the task allocation of the present invention, a second embodiment of the task allocation of the present invention is proposed.

[0125] In this embodiment, in the above step S20, before "obtaining the task feature sequences of the multiple tasks to be executed and the task group sequences of the multiple task execution groups, and through a preset neural network, determining the task matching weights between the task group sequences and the task feature sequences", it may further include:

[0126] Step S50, for each of the tasks to be executed within the current time window, obtaining the task weight of the task to be executed;

[0127] Step S60, constructing the preset neural network according to the sequence sizes of the task feature sequence and the task group sequence;

[0128] In this embodiment, according to the above description, after the terminal device collects the historical performance data of m tasks within a data collection window, a task execution time matrix E can be constructednm 1. Task Completion Quality Matrix Q nm 2. Group Resource Utilization Vector U n and Overdue Days Vector D m After that, the task weight W of each task to be executed (hereinafter simply referred to as task) can be calculated ij = T ij * U i * P j , where is the task execution efficiency score, U i = U i is the resource utilization factor, is the overdue penalty factor (α is used to control the impact of overdue days on the penalty factor).

[0129] Furthermore, a neural network with an input layer of a 1*(x + y) vector and an output layer of a single node is constructed and its parameters are initialized. Where x is the sequence size of the above task feature sequence, and y is the sequence size of the above task group sequence.

[0130] On this basis, in the above step S20, "determine the task matching weight between the task group sequence and the task feature sequence through a preset neural network" can include:

[0131] Step S201, map the task feature sequence and the task group sequence into equal-length boolean vectors respectively, and use the boolean vectors as the input of the preset neural network to obtain the task matching weight between the task group sequence and the task feature sequence output by the preset neural network, where the significance probability between the task matching weight and the task weight of the task to be executed is less than a preset difference threshold.

[0132] Step S202, if the significance probability between the task matching weight and the task weight is greater than the preset difference threshold, then train the preset neural network through the backpropagation method until the significance probability between the task matching weight and the task weight is less than the preset difference threshold.

[0133] In this embodiment, after the terminal device obtains the task weight of the task to be executed and constructs the neural network corresponding to each group, it can map the task feature sequence and the task group sequence into equal-length boolean vectors respectively, and use the boolean vectors as the input of the neural network to obtain the task matching weight between the task group sequence and the task feature sequence output by the neural network, where the significance rate probability between the task matching weight and the above task weight is less than a preset difference threshold.

[0134] Specifically, for example, the terminal device can perform a T-test on the task weights and the list of output values corresponding to the neural network within the most recent data collection window (the list of output values includes the task matching weights of each task by the group). When it is determined that the difference is not significant (for example, the significance rate probability between the task matching weight and the above-mentioned task weight is less than the preset difference threshold), the neural network parameters are not updated and the data collection window spacing is updated to 2τ.

[0135] When it is determined that the difference is significant (for example, the difference between the task matching weight and the above-mentioned task weight is greater than or equal to the preset difference threshold), the parameters of each neural network are optimized through backpropagation to perform self-learning on the actual environment until the significance rate probability is less than the preset difference threshold.

[0136] For example, the task matching weight of task j by group i is W, and the task weight of task j is W ij If ij the significance rate probability between and W is less than the preset difference threshold (for example, it can be taken as 0.5), then there is no need to update the neural network parameters.

[0137] Among them, in this embodiment, no specific limitation is imposed on the value of the preset difference threshold.

[0138] Furthermore, as Figure 4 shown, a fitness function can be constructed for the genetic algorithm based on the task weights output by the above neural network.

[0139] Therefore, in this embodiment, tasks and task groups are abstracted into indivisible and independent features, and a neural network describing the relationship between features and tasks is constructed based on this. When a new task is generated or the task group changes, only feature decomposition is required, and the actual weight value can be quickly fitted by the neural network. Through data collection, data preprocessing, task characterization, and neural network construction, self-learning fitness weight parameters are introduced, and the start of neural network training is controlled based on significance analysis and time windows, so that the fitness parameters in the genetic algorithm can be effectively updated according to their specific performance during system operation to adapt to the dynamic changes of tasks and teams, ensure the rationality of task allocation, and improve task processing efficiency.

[0140] Furthermore, based on the first and second embodiments of the task allocation of the present invention, a third embodiment of the task allocation of the present invention is proposed.

[0141] In this embodiment, in the above step S30, "determining the task dependency relationship between the multiple tasks to be executed" may include:

[0142] Step S301, obtaining the dependency relationship between the multiple tasks to be executed;

[0143] Step S302: Construct a task dependency graph according to the dependency relationship, where each node of the task dependency graph represents each to-be-executed task, and the directed edges of the task dependency graph represent the dependency relationship.

[0144] It should be noted that in this embodiment, the dependency relationship between multiple tasks can be understood as follows: Task T a is to split a certain system, and task T b is to optimize a certain system. The optimization can be carried out after the splitting. Therefore, the start of T b depends on the completion of T a .

[0145] On this basis, after the terminal device obtains multiple tasks, it can obtain the dependency relationship between multiple to-be-executed tasks. Furthermore, it can construct a task dependency graph according to the dependency relationship. Among them, each node of this task dependency graph includes each to-be-executed task, and the directed edges of the task dependency graph represent the dependency relationship.

[0146] Specifically, for example, the terminal device can establish a task dependency graph G, where the nodes represent tasks and the directed edges represent the dependency relationships between tasks. For instance, if there is a dependency relationship between task T a and T b , then there is a directed edge from node T a to node T b in the task dependency graph G.

[0147] Furthermore, in the above step S30, "construct the resource requirement constraint matrix when the task execution group executes the to-be-executed tasks" may include:

[0148] Step S303: Obtain the resource requirements of the task execution group for executing the to-be-executed tasks;

[0149] Step S304: Construct a resource requirement constraint matrix according to the resource requirements, where the resource requirement constraint matrix includes the resource requirements of each task execution group for executing each to-be-executed task.

[0150] In this embodiment, the terminal device can construct a resource requirement constraint matrix R NM , where N represents the number of groups and M represents the number of tasks. R ij represents the resource requirements of the i-th group for executing the j-th task. When performing task allocation, it is necessary to satisfy R ij ≤A i , and A i represents the available resource amount of the i-th group.

[0151] For example, when the i-th group evaluates that it needs 2.5 person-days to execute the j-th task, but in actuality, only 2 person-days are available in Ai of the i-th group during the corresponding time, then this task cannot be assigned to this group.

[0152] Therefore, in this embodiment, through the above-mentioned various constraints, such as the constraints between groups and tasks, inter-group constraints, and inter-task constraints, fitness evaluation is performed to enhance the accuracy of evaluating the pros and cons of the solution.

[0153] Furthermore, based on the first, second, and third embodiments of the task assignment of the present invention, a fourth embodiment of the task assignment of the present invention is proposed.

[0154] In this embodiment, before the above step S40, "Based on the task dependency relationship, the resource requirement constraint matrix, and the task matching weight, and in combination with the task execution time corresponding to each task execution group, use the genetic algorithm to obtain the optimal task assignment scheduling plan", the following may also be included:

[0155] Step S70, obtain the dependency weight according to the task dependency graph;

[0156] Step S80, obtain the inter-group resource load balance weight corresponding to the task execution group according to the resource requirement constraint matrix;

[0157] Step S90, superimpose the task matching weight, the dependency weight, and the inter-group resource load balance weight to obtain a fitness function;

[0158] Step S100, construct an initial population, where each individual in the initial population represents a task assignment plan;

[0159] In this embodiment, as Figure 4 shown, the terminal device needs to pre-construct the initial population in the genetic algorithm.

[0160] Specifically, for example, if there are N groups and M tasks. Initialize a population of size N, which contains N randomly generated individuals, each individual represents a task assignment plan, represented by a chromosome of length M, and each individual indicates which group the task is assigned to.

[0161] Furthermore, before the terminal device searches for the optimal assignment plan through the genetic algorithm, it needs to pre-construct a fitness function.

[0162] Specifically, for example, the terminal device can define a comprehensive fitness function to evaluate the pros and cons of individuals in the genetic algorithm, and this fitness function is obtained by superimposing three parts:

[0163] (1) Consider the matching degree between the group and the task, that is, the task matching weight output by the above neural network;

[0164] (2) Considering the dependency relationship between tasks, that is, the dependency weight between at least two tasks calculated by the task dependency graph G can refer to the existing directed graph weight solution method, which will not be elaborated here;

[0165] (3) Consider the resource load balancing between groups, that is, the resource demand constraint matrix R NM The inter-group resource load balancing weight corresponding to the group is calculated, wherein the inter-group resource load balancing weight can be understood as the tasks assigned between the groups will achieve a relative balance to avoid overloading of the group.

[0166] The calculation of the resource load balancing weights between the above groups specifically includes:

[0167] Resource demand constraint matrix R NM The value of A i Compare the Boolean matrix W NM , when R ij ≤A i When W ij =1, otherwise W ij =0;

[0168] Calculate the matrix W NM The sum of each row

[0169] Finally, the inter-group resource load balancing weight is in,

[0170] Furthermore, after obtaining the above-mentioned task matching weight, dependency weight and inter-group resource load balancing weight, the terminal device can superimpose the task matching weight, dependency weight and inter-group resource load balancing weight to obtain a fitness function.

[0171] Furthermore, in the above step S40, "based on the task dependency, the resource demand constraint matrix and the task matching weight, and in combination with the task execution time corresponding to each of the task execution groups, obtaining the optimal task allocation and scheduling solution through a genetic algorithm" may include:

[0172] Step S401, determining a set of tasks to be executed corresponding to each task execution group;

[0173] Step S402, obtaining the task time limit of each task to be executed in the set of tasks to be executed, wherein the task time limit includes the task execution time and the task execution deadline;

[0174] Step S403: Calculate the urgency value of each to-be-executed task according to the task execution time, the task execution deadline, and in combination with the current time.

[0175] Step S404: Optimize the task allocation scheme through the genetic algorithm according to the fitness function. During the optimization process, sort the multiple to-be-executed tasks according to the urgency value until the optimal task allocation scheme is obtained.

[0176] In this embodiment, after the terminal device constructs the initialization function and the fitness function, as Figure 4 shown, for the task set within each group corresponding to each chromosome, a scheduling algorithm based on the critical ratio (CR) value is used to perform sorting in the time dimension. This algorithm takes into account the urgency of tasks to meet the time constraints of tasks:

[0177] (1) Determine the set of to-be-executed tasks corresponding to each task execution group; the processing time of task i in this set of to-be-executed tasks is p i , the task execution deadline is d i , and in combination with the current time, calculate the elapsed time t, and then calculate the CR value of each task:

[0178] (2) Sort the tasks in the set of to-be-executed tasks according to the above CR value: Sort all tasks in ascending order according to the calculated CR value.

[0179] (3) Fitness evaluation: According to the above fitness function, evaluate the fitness of each individual in the population to measure the performance of the scheduling scheme corresponding to this individual in the problem.

[0180] (4) Selection, crossover, and mutation: Adopt the roulette wheel selection strategy, select the parent generation according to the performance of each individual during fitness evaluation, and generate new individuals through multi-point crossover and single-gene mutation to maintain the diversity of the population and increase the search space for potential solutions.

[0181] (5) Population update: Update the population to a combination of the newly generated individuals and some parent generation individuals.

[0182] (6) Iterative optimization: Repeat steps (1) to (5) to improve the overall fitness of the population.

[0183] (7) Output the optimal individual and decode: When the termination condition is met (for example, the number of iterations reaches the preset value), take the individual with the highest fitness in the final population as the optimal solution, and obtain the task allocation scheme corresponding to this individual with the highest fitness, which is the optimal task allocation scheme.

[0184] Therefore, in this embodiment, a two-layer scheduling strategy is adopted. That is, first, tasks are assigned to each group through the crossover and mutation operations in the genetic algorithm to optimize resource allocation and consider the constraint relationships between tasks and groups. Then, for the tasks within each group, an in-group scheduling optimization algorithm is used to sort them in the time dimension to meet the time constraints, avoiding problems such as the large search space and long convergence time of the genetic algorithm, ensuring the rationality of task allocation, enabling the group to complete tasks, and thus improving the task processing efficiency.

[0185] Generally speaking, the present invention relates to a multi-task constraint scheduling method and system based on a self-learning genetic algorithm for the optimal configuration of development resources of different groups in a relatively large-scale software development team. This method fully considers the efficiency differences of different groups when developing different tasks, and through a self-learning mechanism, it adjusts the parameters of each group for development tasks in the algorithm in real time to adapt to the dynamic changes of tasks and the team. At the same time, multi-task constraints are comprehensively considered, including not only the constraint relationships between groups and tasks, but also the constraints between tasks and between groups. In addition, in solving the problems of large search space and long convergence time in the conventional technical solutions, the present invention adopts a two-layer scheduling strategy, first performing task allocation through the genetic algorithm, and then performing sorting in the time dimension through the in-group scheduling optimization algorithm. Finally, the control of the convergence direction is achieved through a comprehensive fitness function to find a stable and efficient solution.

[0186] In addition, an embodiment of the present invention also proposes a task allocation device. Referring to Figure 5 , the task allocation device includes:

[0187] A first determination module 10, configured to determine a plurality of tasks to be executed and a plurality of task execution groups;

[0188] A second determination module 20, configured to obtain the task feature sequence of the plurality of tasks to be executed and the task group sequence of the plurality of task execution groups, and determine the task matching weight between the task group sequence and the task feature sequence through a preset neural network;

[0189] A third determination module 30, configured to determine the task dependency relationship between the plurality of tasks to be executed and construct a resource requirement constraint matrix when the task execution group executes the tasks to be executed;

[0190] An acquisition module 40, configured to obtain an optimal task allocation plan based on the task dependency relationship, the resource requirement constraint matrix, the task matching weight, and in combination with the task time limit corresponding to each task to be executed.

[0191] The extended content of the specific implementation manner of the task allocation device of the present invention is basically the same as that of the above embodiments of the task allocation method, and will not be elaborated here.

[0192] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a task allocation program is stored. When the task allocation program is executed by a processor, the steps of the task allocation method described below are implemented.

[0193] For each embodiment of the task allocation device and the computer-readable storage medium of the present invention, reference may be made to each embodiment of the task allocation method of the present invention, which will not be elaborated here.

[0194] It should be noted that in this document, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or system including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the phrase "including a..." does not exclude the existence of additional identical elements in the process, method, article or system including that element.

[0195] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

[0196] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which may be a wearable device, a locator, a smart phone, a tablet computer, etc.) to execute the methods described in the various embodiments of the present invention.

[0197] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A task allocation method, characterized in that, The described task allocation method includes: Determine multiple tasks to be executed and multiple task execution groups; Obtain the task feature sequence of the multiple tasks to be executed and the task group sequence of the multiple task execution groups, and determine the task matching weight between the task group sequence and the task feature sequence through a preset neural network; Determine the task dependency relationship between the multiple tasks to be executed, and construct a resource requirement constraint matrix when the task execution group executes the task to be executed; Construct an initial population, where each individual in the initial population represents a task allocation scheme; Obtain the dependency weight according to the task dependency graph; Obtain the inter-group resource load balance weight corresponding to the task execution group according to the resource requirement constraint matrix; Perform weight superposition on the task matching weight, the dependency weight, and the inter-group resource load balance weight to obtain a fitness function, and based on the fitness function, combine the task time limit corresponding to each task execution group, and obtain the optimal task allocation scheduling scheme through a genetic algorithm; Based on the task dependency relationship, the resource requirement constraint matrix, and the task matching weight, and combining the task time limit corresponding to each task to be executed, obtain the optimal task allocation scheme.

2. The task allocation method according to claim 1, wherein Before the step of obtaining the task feature sequence of the multiple tasks to be executed and the task group sequence of the multiple task execution groups, and determining the task matching weight between the task group sequence and the task feature sequence through a preset neural network, it further includes: For each task to be executed within the current time window, obtain the task weight of the task to be executed; Construct the preset neural network according to the sequence sizes of the task feature sequence and the task group sequence; The step of determining the task matching weight between the task group sequence and the task feature sequence through a preset neural network includes: Map the task feature sequence and the task group sequence into equal-length boolean vectors respectively, and use the boolean vectors as the input of the preset neural network to obtain the task matching weight between the task group sequence and the task feature sequence output by the preset neural network, where the significance probability between the task matching weight and the task weight of the task to be executed is less than a preset difference threshold.

3. The task allocation method according to claim 2, wherein After the step of mapping the task feature sequence into an equal-length boolean vector, and using the boolean vector as the input of the preset neural network to obtain the task matching weight between the task execution group and the task feature sequence of the task to be executed output by the preset neural network, it further includes: If the significance probability between the task matching weight and the task weight is greater than the preset difference threshold, train the preset neural network through the backpropagation method until the significance probability between the task matching weight and the task weight is less than the preset difference threshold.

4. The task allocation method according to claim 1, wherein The step of determining the task dependency relationship between the multiple tasks to be executed includes: Obtain the dependency relationship between the multiple tasks to be executed; Construct the task dependency graph according to the dependency relationship, where each node of the task dependency graph represents each to-be-executed task, and the directed edges of the task dependency graph represent the dependency relationship.

5. The task allocation method according to claim 4, characterized in that The step of constructing the resource requirement constraint matrix when the task execution group executes the to-be-executed task includes: Obtain the resource requirements of the task execution group for executing the to-be-executed task; Construct a resource requirement constraint matrix according to the resource requirements, where the resource requirement constraint matrix includes the resource requirements of each task execution group for executing each to-be-executed task.

6. The task assignment method according to claim 1, wherein, The step of obtaining the optimal task assignment plan based on the task dependency relationship, the resource requirement constraint matrix, and the task matching weight, and combining the task time limit corresponding to each to-be-executed task includes: Determine the set of to-be-executed tasks corresponding to each task execution group; Obtain the task time limits of the to-be-executed tasks in the set of to-be-executed tasks, where the task time limit includes the task execution time and the task execution deadline; Calculate the urgency values of the to-be-executed tasks according to the task execution time and the task execution deadline, and in combination with the current time; According to the fitness function, optimize the task assignment plan through a genetic algorithm, and during the optimization process, sort the multiple to-be-executed tasks according to the urgency value until the optimal task assignment plan is obtained.

7. A task allocation device, characterized in that, The task assignment device includes: A first determination module, configured to determine multiple to-be-executed tasks and multiple task execution groups; A second determination module, configured to obtain the task feature sequence of the multiple to-be-executed tasks and the task group sequence of the multiple task execution groups, and determine the task matching weight between the task group sequence and the task feature sequence through a preset neural network; A third determination module, configured to determine the task dependency relationship between the multiple to-be-executed tasks, and construct a resource requirement constraint matrix when the task execution group executes the to-be-executed task; A first acquisition module, configured to construct an initial population, where each individual in the initial population represents a task assignment plan; obtain the dependency relationship weight according to the task dependency graph; obtain the inter-group resource load balance weight corresponding to the task execution group according to the resource requirement constraint matrix; perform weight superposition on the task matching weight, the dependency relationship weight, and the inter-group resource load balance weight to obtain a fitness function, and based on the fitness function, combine the task time limit corresponding to each task execution group, and obtain the optimal task assignment scheduling plan through a genetic algorithm; An acquisition module, configured to obtain the optimal task assignment plan based on the task dependency relationship, the resource requirement constraint matrix, and the task matching weight, and in combination with the task time limit corresponding to each to-be-executed task.

8. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a base task assignment program stored on the memory and executable on the processor. When the task assignment program is executed by the processor, the steps of the task assignment method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium, characterized in that, A task allocation program is stored on the computer-readable storage medium. When the task allocation program is executed by a processor, the steps of the task allocation method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Cloud test platform task scheduling method based on improved genetic algorithm

    CN112486651A

  • Multi-machine formation task allocation method

    CN115097864A