Task allocation method and device, equipment, storage medium and program product

By adjusting the first function based on batches, task data and object data during business processing to minimize the working time of the object, the efficiency and performance problems caused by unreasonable task allocation in the prior art are solved, and more efficient task execution and object performance protection are achieved.

CN119692659APending Publication Date: 2025-03-25MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411599132.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

During the business processing process, it is difficult for the prior art to effectively allocate tasks, resulting in adverse impacts on task execution efficiency and object performance.

Method used

The batch and task assigned by the object are determined by determining the first function and its constraints based on the batch, task data and object data within a unit period, and adjusting the sum of the first function until the working time of the object reaches a minimum value.

Benefits of technology

It realizes that when the constraints are met, the optimal task allocation plan is found, ensuring that the object completes all tasks with the sum of the minimum working hours, improving task execution efficiency, and avoiding object performance degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692659A_ABST
    Figure CN119692659A_ABST
Patent Text Reader

Abstract

The invention discloses a task allocation method and device, equipment, a storage medium and a program product, which are used for improving the reasonability of task allocation so as to ensure the task execution efficiency and the performance of an object. The task allocation method comprises the steps of determining a first function and a constraint condition of the first function based on batches, task data and object data in a unit time period; the task data comprises an execution time period of each task, and the object data comprises a first task matched with an object and a working time period of the object; the constraint conditions are conditions required to be met by batches and tasks allocated to the objects; based on the constraint condition, adjusting the first function until the sum of the working durations of the objects reaches the minimum value, and obtaining the adjusted first function; and determining a first batch of object allocation and a second task executed in the first batch based on the adjusted first function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a task allocation method, device, equipment, storage medium and program product. Background Art

[0002] In the process of business processing, it is usually necessary to allocate appropriate batches and tasks to be executed in batches for multiple objects. Inappropriate allocation results will have an adverse impact on the efficiency of task execution and the performance of objects. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a task allocation method, apparatus, device, storage medium and program product for improving the rationality of task allocation to ensure task execution efficiency and object performance.

[0004] In order to achieve the above objectives, the present application embodiment adopts the following technical solutions: In a first aspect, an embodiment of the present application provides a task allocation method, comprising: Based on the batch, task data and object data within a unit time period, determine the first function and the constraint conditions of the first function; the task data includes the execution time period of each task, and the object data includes: the first task matched by the object and the working time period of the object; the constraint conditions are the batches assigned to the object and the conditions that the tasks need to meet; Based on the constraint condition, the first function is adjusted until the sum of the working hours of the objects reaches a minimum value, thereby obtaining an adjusted first function; A first batch of the object allocation and a second task executed in the first batch are determined according to the adjusted first function.

[0005] In a second aspect, an embodiment of the present application provides a task allocation device, including: A first determination module is used to determine a first function and a constraint condition of the first function based on a batch, task data and object data within a unit time period; the task data includes an execution time period of each task, and the object data includes: a first task matched by an object and a working time period of the object; the constraint condition is a batch assigned to the object and a condition that the task needs to satisfy; An adjustment module, configured to adjust the first function based on the constraint condition until the sum of the working hours of the objects reaches a minimum value, thereby obtaining an adjusted first function; The allocation module is used to determine a first batch of the object allocation and a second task to be executed in the first batch according to the adjusted first function.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, including: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the task allocation method provided in the first aspect.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the task allocation method provided in the first aspect.

[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the task allocation method provided in the first aspect.

[0009] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: Since multiple batches within a unit time period, the execution period of tasks, the first task matched by the object and the working period of the object can reflect the conditions that need to be satisfied by the relationship between tasks, objects and batches, based on these data, the conditions that need to be satisfied by the batches and tasks assigned to the objects can be quickly and accurately determined; further, the allocation of batches to objects and the allocation of tasks within batches are integrated into a single comprehensive problem, and the technical concept of finding the optimal solution is adopted. Based on the batches, task data and object data within the unit time period, the first function and the constraints of the first function are determined, and the first function is adjusted based on the constraints until the sum of the working hours of the object reaches the minimum value to obtain the adjusted first function; the first batch assigned to the object and the second task executed within the first batch are determined according to the adjusted first function, and the optimal allocation plan can be found while satisfying the constraints, ensuring that the object can complete all tasks with the minimum sum of working hours, which not only helps to improve the efficiency of task execution, but also avoids the problem of performance degradation of the object due to unreasonable assignment of tasks to the object. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of an implementation environment applicable to a task allocation method provided in an embodiment of the present application; Figure 2 A flowchart of a task allocation method provided for an embodiment of the present application; Figure 3A schematic diagram of an infeasible fractional solution provided for one embodiment of the present application; Figure 4 A schematic diagram of an infeasible fractional solution provided for another embodiment of the present application; Figure 5 A flowchart of a task allocation method provided for another embodiment of the present application; Figure 6 A structural schematic diagram of a task allocation device is provided for an embodiment of the present application; Figure 7 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0011] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0012] The terms "first", "second", etc. in this specification and claims are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein. In addition, "and / or" in this specification and claims means at least one of the connected objects, and the character " / " generally means that the objects associated with each other are in an "or" relationship.

[0013] Explanation of relevant terms: Mixed Integer Programming (MIP): is a type of optimization problem that combines the characteristics of linear programming and integer programming. In linear programming, decision variables can take arbitrary real values, while in integer programming, decision variables are restricted to integer values. Mixed integer programming is a mixture of the two, in which some decision variables are restricted to integer values, while other decision variables can take real values. This type of planning problem is widely used in various practical scenarios, such as production planning, scheduling, transportation, network design, resource allocation, etc., in which some decision variables must be discrete, such as the number of products produced can be integer units, while some costs or resource usage can vary continuously.

[0014] Valid Inequality: It is a very important concept in data optimization, especially in integer programming. It is used to describe additional constraints of the feasible domain. These constraints are in addition to the constraints in the original problem definition, but they will not exclude any original feasible solutions, and may exclude some infeasible solutions, thereby narrowing the search space and helping to find the optimal solution faster.

[0015] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0016] In order to facilitate the understanding of the technical solutions provided by the embodiments of the present application, firstly Figure 1 , the implementation environment applicable to the technical solution provided in the embodiment of the present application is described. It should be understood that the technical solution provided in the embodiment of the present application is applicable to Figure 1 The implementation environment shown is only an exemplary description and should not be understood as a limitation on the implementation environment to which the technical solution is applicable.

[0017] like Figure 1 As shown, an implementation environment applicable to the technical solution provided in the embodiment of the present application includes a server and multiple objects, and each object is connected to the server via a wired or wireless network. Multiple objects can participate in the business processing of the server. During the business processing, the server usually needs to allocate appropriate batches and tasks to be performed in the batches to multiple objects. Among them, the object can be a client, user terminal, server, user, etc. for performing tasks, which is not limited in the embodiment of the present application.

[0018] For example, in a file download scenario, each object is a download client, and the server can allocate a suitable batch and a download task to be executed within the batch to each download client. The download task is used to indicate the data required for business processing to be downloaded from the storage platform.

[0019] For another example, in an outbound call scenario, each object is an agent, and the server can assign a suitable batch and an outbound call task to be performed within the batch to each agent. The outbound call task is used to instruct calls to users on the outbound call list.

[0020] For another example, in a product production scenario, each object is a production device. The server can assign a suitable batch and processing tasks to be performed within the batch to each production device. The processing tasks are used to indicate the parts required to process the product.

[0021] In the related art, a phased task allocation method is often used, that is, first assigning a corresponding batch to an object, and then assigning a corresponding task to the object within the batch. This task allocation method separates task allocation and scheduling, and does not consider the adjustment of tasks and batches at the same time, which often leads to low quality of the allocation plan and cannot guarantee the efficiency of task execution and the performance of the object.

[0022] It can be seen that inappropriate allocation results will have an adverse impact on the efficiency of task execution and the performance of the object. Therefore, it is particularly important to improve the rationality of task allocation to ensure the efficiency of task execution and the performance of the object.

[0023] In view of this, an embodiment of the present application proposes a task allocation method. Since multiple batches within a unit time period, the execution period of tasks, the first task matched by the object and the working period of the object can reflect the conditions that need to be satisfied by the relationship between tasks, objects and batches, based on these data, the conditions that need to be satisfied by the batches and tasks assigned to the objects can be quickly and accurately determined; further, the allocation of batches to objects and the allocation of tasks within batches are integrated into a single comprehensive problem, and the technical concept of finding the optimal solution is adopted. Based on the batches, task data and object data within the unit time period, the first function and the constraints of the first function are determined, and the first function is adjusted based on the constraints until the sum of the working hours of the object reaches the minimum value to obtain the adjusted first function; the first batch of the object assignment and the second task executed within the first batch are determined according to the adjusted first function, and the optimal allocation plan can be found while satisfying the constraints, ensuring that the object can complete all tasks with the minimum sum of working hours, which not only helps to improve the efficiency of task execution, but also avoids the problem of performance degradation of the object due to unreasonable assignment of tasks to the object.

[0024] It should be understood that the task allocation method provided in the embodiment of the present application can be executed by an electronic device. The electronic device referred to here may include a server, such as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. As an example, the above task allocation method can be applied to the above Figure 1 The server shown.

[0025] Please refer to Figure 2 , is a flowchart of a task allocation method provided by an embodiment of the present application, the method comprising the following steps: S202, determining a first function and constraints of the first function based on the batches, task data and object data within a unit time period.

[0026] The batch within the unit time period may be a time interval within the unit time period, and the batch has a corresponding start time and end time. The number of batches within the unit time period may be multiple.

[0027] The length of the unit time period and the time interval of the batch can be set according to actual needs. For example, the length of the unit time period is one day, and the length of each batch is 8 hours, then the unit time period can include three batches, and the time intervals of these three batches are: 0:00~8:00, 8:00~16:00, 16:00~24:00. As an example, the server can display a first control for inputting batches through the interface displayed on the front end, and receive the batch required for executing the task allocation through the first control. As another example, the server can also determine the batch based on the operation status reported by the object.

[0028] Task data is used to describe the tasks to be assigned, and the number of tasks to be assigned can be multiple. Task data may specifically include the execution period of the task. Optionally, task data may also include but is not limited to at least one of the following data: the number of resources, areas and objects required by the task. Task data can be set according to actual needs. As an example, the server can display a second control for inputting task data through an interface displayed on the front end, and receive the task data required for executing task assignment through the second control. As another example, the server can also determine the task data based on the business operation situation.

[0029] Object data is used to describe the objects involved in task allocation, and the number of objects can be multiple. Object data can specifically include the first task that matches the object and the working period of the object. Among them, the first task that matches the object refers to the task that the object can perform. For example, if resource 1 is required to perform task 1, and object 1 has resource 1, then task 1 is determined to be the first task that matches object 1. Optionally, object data can also include but is not limited to at least one of the following data: the resources owned by the object, the area to which the object belongs, etc. Object data can be set according to actual needs. As an example, the server can display a third control for inputting object data through an interface displayed on the front end, and receive the object data required for performing task allocation through the third control. As another example, the server can also determine the object data based on the business operation situation.

[0030] The first function is used to describe the relationship between the batches and tasks assigned to the object and the sum of the working hours of the object. The constraint condition is the condition that the batches and tasks assigned to the object need to meet, which is used to constrain the value range of the first function.

[0031] Since the batches within a unit time period, the execution period of the task, the first task matched by the object and the working period of the object can reflect the conditions that need to be met for the relationship between tasks, objects and batches, based on these data, the conditions that need to be met for object allocation batches and tasks can be quickly and accurately determined.

[0032] In one embodiment, the constraint condition may be determined in the following manner: based on the execution period of the task, determining a second batch matching the task from batches within the unit period; determining the overlapping period between the execution periods of the tasks; and determining the constraint condition based on the second batch matching the task and the overlapping period.

[0033] The second batch matched by the task refers to the batch that can execute the task, that is, the task can be assigned to the batch. Specifically, if the time period corresponding to the batch includes the execution time period of the task, the batch is determined to match the task. For example, if the time interval of batch 1 is 0:00~8:00, and the execution time period of task 1 is 0:00~2:00, then batch 1 is determined to match task 1.

[0034] As an example, the second batch matched by the task can accurately reflect the relationship between the task and the batch, which helps to ensure that the batch assigned to the object can execute the task assigned to the object.

[0035] In order to more accurately represent the relationship between tasks and batches, the matrix A can be used to represent the second batch that can be used for task matching. Each row in the matrix A corresponds to a task, and each column corresponds to a batch. The element in the rth row and sth column of the matrix A is shown in the following formula (1), which represents the relationship between task r and batch s.

[0036] (1) The overlapping time periods between task execution periods can accurately reflect whether different tasks are compatible, that is, whether they can be executed at the same time, which helps to avoid incompatible tasks being executed by the same object in the same time period. For example, if the execution period of Task 1 is 0:00~2:00 and the execution period of Task 2 is 1:00~3:00, then Task 1 and Task 2 are incompatible.

[0037] In order to more accurately represent the compatibility between different tasks, the matrix B can be used to represent the above overlap. Each row in the matrix B corresponds to a task, and each column also corresponds to a task. The element in the i-th row and j-th column of the matrix B is shown in the following formula (1), which indicates that task i and task j are incompatible.

[0038] (2) It can be understood that since the second batch of task matching can accurately reflect the relationship between tasks and batches, it helps to ensure that the batch assigned to the object can execute the task assigned to the object. The overlapping time periods between the execution time periods of different tasks can accurately reflect whether the different tasks are compatible, which helps to avoid incompatible tasks being executed by the same object in the same time period. Determining the constraints based on the above two information helps to ensure the performance of the object while improving the efficiency of task execution.

[0039] In the embodiment of the present application, the constraint conditions may include but are not limited to at least one of the following conditions: Condition 1: The number of objects assigned to the task is greater than or equal to the number of objects required by the task, and the objects assigned to the task match the task.

[0040] For example, task r requires dr objects to complete, and there are J objects in total, namely object 1 to object J, among which object 1 to object J-1 match task r, then task r can only be assigned to object 1 to object J-1, and at least dr objects among these objects are assigned to task r.

[0041] By allocating tasks based on condition 1 above, it can be ensured that the tasks are executed by an appropriate number of objects that are capable of accepting the tasks, thereby accurately meeting the task requirements and ensuring the efficiency of task execution.

[0042] Condition 2: The number of batches to which the object is allocated within a unit time period is less than or equal to a first quantity threshold.

[0043] The first quantity threshold can be set according to actual needs. For example, the first quantity threshold is 1. Thus, it can be ensured that the object runs in at most one batch in a unit time period, avoiding the performance degradation caused by the continuous operation of the object.

[0044] Condition 3: The second task assigned to the object matches the first batch assigned to the object.

[0045] For example, if the execution period of task r is 8:00~10:00, and the period corresponding to the batch s assigned to object j is 8:00~16:00, then task r can be assigned to object j.

[0046] By allocating tasks based on the above condition 3, it can be ensured that the object executes the task in a batch that matches the assigned task, so that the batch assigned to the object matches the task, thereby ensuring the task execution effect.

[0047] Condition 4: The second task assigned to the object matches the object, and the execution periods of the second task assigned to the object do not overlap.

[0048] For example, the first task matching object j includes task 1, task 2 and task 3, and the execution period of task 1 is 8:00~10:00, the execution period of task 2 is 9:00~11:00, and the execution period of task 3 is 11:00~12:00. Since task 1 and task 2 overlap in the execution period, that is, task 1 and task 2 are incompatible, task 1 and task 2 cannot be assigned to object j at the same time; since task 1 and task 3 do not overlap in the execution period, task 1 and task 3 can be assigned to object j at the same time; since task 2 and task 3 do not overlap in the execution period, task 2 and task 3 can also be assigned to object j at the same time.

[0049] By allocating tasks based on condition 4 above, it is possible to prevent objects from executing incompatible tasks at the same time, thus ensuring the effectiveness of task execution.

[0050] Condition 5: The number of unit time slots to which the object is allocated the first batch in the first cycle is less than or equal to the time slot number threshold.

[0051] Among them, the first cycle includes multiple unit time periods arranged based on a time sequence. In an embodiment of the present application, the server may periodically allocate tasks based on the task data, object data, and multiple batches within a unit time range of this cycle. The first cycle in the above condition 5 can be any cycle. The length of each cycle can be set according to actual needs, such as one week, one month, etc., which is not limited in the embodiment of the present application. The time period quantity threshold can also be set according to actual needs. For example, if the length of the first cycle is 7 days, the time period quantity threshold is 5 days.

[0052] By allocating tasks based on the above condition 5, it is possible to avoid performance degradation caused by the continuous operation of the object in the first cycle, thereby ensuring a balance between the object performance and the task execution effect.

[0053] Condition 6: The sum of the working hours of the object in the first cycle is less than or equal to the duration threshold.

[0054] For each object, the sum of the working hours of the object in the first cycle refers to the sum of the lengths of the batches assigned to the object every day in the first cycle. For example, the first cycle includes 7 days, object j is assigned to batch 2 (8:00~16:00) on the first day, batch 3 (16:00~24:00) on the third day, and batch 1 (0:00~8:00) on the fifth day, then the sum of the working hours of object j in the first cycle is 24 hours.

[0055] The duration threshold can be set according to actual needs, for example, the duration threshold is 40 hours.

[0056] By allocating tasks based on the above condition 6, it is possible to avoid the object working for too long in the first cycle, which would lead to performance degradation, thereby ensuring a balance between the object performance and the task execution effect.

[0057] Condition 7: The first batches allocated to the objects in two adjacent unit time periods are not continuous in time.

[0058] The second quantity threshold can be set according to actual needs, and the embodiment of the present application does not limit this. For example, if the second quantity threshold is 1, if object j is assigned batch 3 (16:00~24:00) on day d, then batch 1 (0:00~8:00) cannot be assigned on day d+1.

[0059] By allocating tasks based on the above condition 7, it is possible to avoid the performance degradation of the objects due to too tight batches allocated to the objects, thereby ensuring a balance between the object performance and the task execution effect.

[0060] Condition 8: The first batch allocated for the object matches the object.

[0061] For example, if the working period of object j is 0:00~18:00 and the period corresponding to batch 1 is 0:00~8:00, batch 1 can be allocated to object j.

[0062] Performing task allocation based on the above condition 8 can ensure that the object only runs within its working period, which is conducive to the effective use of resources in the object.

[0063] Optionally, when the constraint conditions include the above condition 4, additional constraint conditions may be added to avoid the problem of incompatibility of tasks not being completely eliminated during the task allocation process, thereby ensuring the performance of the object and the effect of task execution.

[0064] Specifically, the constraint condition may also include at least one of the following: Condition 9: The number of tasks assigned to the object is less than or equal to the number of the first batch of objects assigned in the unit time period, and the first batch of objects assigned in the unit time period matches the second task assigned to the object.

[0065] For example, through the above existing constraints, the task allocation scheme is determined as follows: on day 1, object j is assigned to batch s of day 1, and tasks 12, 37, and 44 are assigned to object j. Since tasks 12, 37, and 44 are incompatible, if the above allocation scheme is followed, object j will execute three tasks at the same time, which will not only greatly reduce the performance of object j, but also be unfavorable to improving the execution efficiency of tasks.

[0066] To this end, the above constraint condition 9 is added: in tasks 12, 37, and 44, the number of objects assigned to object 23 is less than or equal to the batches assigned to the objects every day that match the execution of these tasks. In this way, it can be ensured that each object executes only one task at a time, which not only ensures that the performance of each object will not be reduced due to executing too many tasks, but also is conducive to the execution efficiency of tasks.

[0067] Condition 10: The number of objects assigned to the third task within a unit time period is greater than or equal to the number of objects required by the third task, wherein the third task includes tasks that match the first batch of object assignments.

[0068] For example, through the above constraints, the task allocation scheme is determined as follows: on the first day, batches 7 and 13 are allocated to object j, and both task 8 and task 56 are allocated to object j. However, since task 8 and task 56 overlap in the execution period, that is, the two tasks are incompatible, each task needs to be executed by at least one object. If the above allocation scheme is followed, object j will still execute two tasks at the same time, which will not only greatly reduce the performance of object j, but also be unfavorable to improving the execution efficiency of tasks.

[0069] To this end, the above constraint 10 is added: on the first day, the sum of the number of objects assigned to task 8 and the number of objects assigned to task 56 is greater than 2. In this way, it can be ensured that task 8 and task 56 are assigned to different objects for execution, which not only ensures that the performance of the object will not be reduced due to too many tasks being executed, but also is conducive to the execution efficiency of the tasks.

[0070] The embodiment of the present application shows some constraints here. It should be understood that in actual applications, the constraints may vary according to different business scenarios, and the embodiment of the present application does not limit this.

[0071] S204, based on the constraint condition, adjusting the first function until the sum of the working hours of the objects reaches a minimum value, thereby obtaining an adjusted first function.

[0072] In the above S204, the allocation of batches to objects and the allocation of tasks within batches can be integrated into a single comprehensive problem. The technical concept of finding the optimal solution is adopted. Based on the batch, task data and object data within the unit time period, the first function and the constraints of the first function are determined. The first function is adjusted based on the constraints until the sum of the working hours of the object reaches the minimum value, thereby obtaining the adjusted first function. The first batch to which the object is allocated and the second task to be performed within the first batch are determined based on the adjusted first function. The optimal allocation plan can be found while satisfying the constraints, ensuring that the object can complete all tasks with the minimum sum of working hours. This not only helps to improve the efficiency of task execution, but also avoids the problem of performance degradation of the object due to unreasonable assignment of tasks to the object.

[0073] In one embodiment, the first function includes a decision variable, which is used to describe the relationship between the value of the decision variable and the sum of the working hours of the object. The decision variable is used to describe the relationship between the object, the batch assigned to the object, and the task assigned to the object. The above S204 includes the following steps: S241, performing linear programming based on the first function and the constraint conditions to obtain a first value of the decision variable.

[0074] S242: Obtain an adjusted first function based on the decision variable with the first value.

[0075] The first value is the value of the decision variable when the sum of the working hours of the objects reaches the minimum value under the constraints.

[0076] As an example, the decision variable includes a first variable and a second variable. The first variable is used to describe the number of the second batches matched by the object, as shown in the following formula (3). The second variable is used to describe the first batch to which the object is allocated within a unit period, as shown in the following formula (4). As another example, the decision variable may also include a third variable. The third variable is used to describe the relationship between the object and the batch, as shown in the following formula (5).

[0077] (3) (4) (5) in, represents the first variable, Represents a set of objects; represents the second variable, Indicates multiple batches within a unit period. represents the first cycle, express, represents the object that matches task r, Represents a task set.

[0078] The first function may be generated in various appropriate ways, which is not limited in this embodiment of the present application.

[0079] As an example, the first function is shown in the following formula (6): (6) in, Represents the sum of working hours of all objects. Indicates the duration of the batch, represents the second variable, Indicates the number of the object. Represents a set of objects, Indicates the number of the unit time period, represents the first cycle, Indicates the number of the task. Represents a task set.

[0080] As another example, in the above S241, the first function is obtained in the following manner: based on the first variable, a second function is generated, wherein the second function is used to describe the relationship between the value of the first variable and the number of objects divided into at least one first batch; based on the second variable, a third function is generated, wherein the third function; the second function and the third function are merged to obtain the first function.

[0081] Specifically, the first function is shown in the following formula (1a): (1a) in, is the second function, which is used to describe the first variable The relationship between the value of and the number of objects that are allocated to at least one first batch; is the third function, which is used to describe the second variable The relationship between the value of and the sum of the working hours of all objects; represents the trade-off parameter, It is used to prioritize the two goals of reducing the sum of working hours of all objects and controlling the number of active objects to ensure the balance of the allocation plan.

[0082] It can be understood that in the above-mentioned first function, the second function and the third function are integrated. The second function can prevent the object operation distribution from being extremely uneven (such as only a few objects running in multiple unit time periods), and the third function can play the role of adjusting batches, minimizing the object idle time, and improving task execution efficiency.

[0083] In this case, illustratively, based on the above decision variables and conditions 1 to 8, the constraints shown in the following formulas (1b) to (1l) can be generated, wherein the constraint shown in formula (1b) is used to describe condition 1, the constraint shown in formula (1c) is used to describe condition 2, the constraint shown in formula (1d) is used to describe condition 3, the constraint shown in formula (1e) is used to describe condition 4, the constraint shown in formula (1f) is used to describe condition 5, the constraint shown in formula (1g) is used to describe condition 6, the constraint shown in formula (1h) is used to describe condition 7, the constraint shown in formula (1i) is used to describe condition 8, and formulas (1j) to (1l) are used to describe the value range of the decision variables.

[0084] (1b) (1c) (1d) (1e) (1f) (1g) (1h) (1i) (1j) (1k) (1l) in, represents the maximum number of unit time periods for object j to run in the first cycle, Indicates the maximum working time of object j in the first cycle.

[0085] After obtaining the sum of the first function and its constraints, linear programming is performed based on the first function and the constraints to obtain the first value of the decision variable.

[0086] The first value is the value of the decision variable when the sum of the working hours of the objects reaches the minimum value under the constraint conditions, and specifically may be the value of the decision variable when the sum of the working hours of all objects reaches the minimum value under the constraint conditions.

[0087] As an example, based on the constraint condition, the second value of the decision variable is determined; based on the second value and the first function, the sum of the working hours of the object is determined; if the sum of the working hours of the object does not meet the convergence condition, the following steps are repeated until the sum of the working hours of the object meets the convergence condition: the second value is updated, and based on the updated second value and the first function, the sum of the working hours of the object is determined; if the sum of the working hours of the object meets the convergence condition, the second value after the last update is determined as the first value of the decision variable.

[0088] The second value of the decision variable refers to the initial value of the decision variable. In the above manner, continuous optimization is performed while satisfying the constraints, so that the relationship between the tasks, objects, and batches described by the first value finally determined can satisfy the constraints and minimize the sum of the working hours of the objects, that is, the objects can efficiently perform the assigned tasks with the minimum idle time.

[0089] As another example, a mixed integer programming algorithm in the art may be used to perform linear programming based on the first function and the constraint conditions to obtain a first value of the decision variable.

[0090] It is worth noting that, in practical applications, other linear regression algorithms in the art may also be used to solve the problem and obtain the first value of the decision variable.

[0091] The first function when the sum of the working hours of the objects reaches the minimum value is the adjusted first function.

[0092] S206: Determine a first batch of object allocation and a second task to be executed in the first batch based on the adjusted first function.

[0093] The first value of the decision variable describes the relationship between the object, the task, and the batch, based on which the first batch assigned to the object in the unit time period and the second task performed by the object in the first batch can be determined. , , , then batch 1 is assigned to object j in the first unit period, and object j is determined to perform task 1 in batch 1.

[0094] In the above implementation, the optimal adjustment of task allocation can be achieved based on precise decision variables, the first function, and constraints, which not only takes into account the efficient use of objects, but also takes into account the task execution efficiency and the performance of the objects, and balances the complexity of task allocation and the multi-objective nature of decision-making.

[0095] Optionally, in the process of solving the linear programming based on the first function and the constraints, some situations that are impossible in the actually acceptable integer solutions may occur. To this end, some additional constraints can be added by introducing effective inequalities, which are naturally satisfied in all feasible integer solutions, although they are redundant and are not satisfied at some vertices of the linear relaxation. In this way, the solution time can be shortened and the quality of the solution to the continuous relaxation problem can be improved.

[0096] For example, Figure 3 As shown in the figure, object 23 (j=23) is partially assigned to batch 16 (s=16) in the fractional relaxation solution, with an allocation coefficient of 1 / 3. In batch 16, object 23 also partially performs three tasks, namely task 12, task 37, and task 44, which are incompatible with each other. If this allocation method is followed, the object will perform multiple tasks at the same time, resulting in a decrease in the performance of the object. Therefore, in the final adjusted solution represented by a binary value (i.e., fully allocated or not allocated), this situation will not occur.

[0097] However, in a relaxed problem setting, i.e. one that allows non-integer solutions, such an arrangement is considered feasible, since it ostensibly satisfies constraints (1d) and (1e). These constraints may concern compatibilities and incompatibilities of task assignments, but do not completely exclude such situations that are not practically feasible when dealing with fractional solutions.

[0098] Based on this, valid inequalities can be generated through the above condition 9, that is, condition 9 is used as an additional constraint to eliminate such unreasonable situations, even if these constraints are naturally satisfied in integer solutions but may not be established in continuous relaxation solutions. Doing so can help the solver more closely approach a practical and operational solution, thereby improving the quality of the solution and the accuracy of practical applications.

[0099] In fact, constraint (1e) is intended to prohibit incompatible tasks from being assigned to the same object. However, this constraint only requires that the sum of binary variables assigned to the same batch is not greater than 1, which seems to be satisfied in the current example. The problem is that the solution lacks a constraint connecting the (Y) and (Z) variables for incompatible requests. In this case, an additional constraint can be added to reflect this, as shown in the following formula (7): (7) Based on this, the summation involves all batches that cover at least one of tasks 12, 37, and 44.

[0100] On this basis, a generalized expansion is performed to obtain the effective inequality shown in the following formula (8), which is used to describe the above condition 9.

[0101] (8) Optionally, considering that in the process of solving the linear programming based on the first function and the constraint conditions, another infeasible fractional solution may appear. To this end, more additional constraints can be added by introducing more valid inequalities, which are naturally satisfied in all feasible integer solutions, although they are redundant and are not satisfied at some vertices of the linear relaxation. In this way, the solution time can be shortened and the quality of the solution to the continuous relaxation problem can be improved.

[0102] For example, Figure 4 As shown, object 14 (j=14) is assigned to two batches, batch 7 (s=7) and batch (s=13) in the first unit period (d=1). Therefore, both task (r=8) and task (r=56) can be partially assigned to object j without violating constraints (1d) or (1e). However, adding the above valid inequality (8) does not exclude this allocation scheme, because 1=Z14,8+X14,56 =Y14,7,1+Y14,13,1=1. However, the relaxation boundary can be strengthened.

[0103] Since incompatible tasks 8 and 56 cannot be executed by the same object, at least two fully working batches (executed by different objects) are required to cover these two tasks. Therefore, another additional constraint can be added to reflect this, as shown in the following formula (9): (9) in, represents the object that matches task 8, Represents an object that matches task 56.

[0104] On this basis, a general extension is made: for any set of incompatible tasks, the effective inequality shown in Kusaka formula (10) is added. This effective inequality is used to describe the above condition 10 to ensure that in any case, incompatible tasks cannot be partially or completely executed by the same object in the same batch.

[0105] (10) In practical applications, the above solution process can be performed by a solver. The solver is allowed to perform a preprocessing (presolve) phase. However, for each solution model variant, the present application also solves a pure continuous relaxation problem to evaluate the impact of preprocessing on performance. This method enables the present application to compare the impact of different constraint additions on model solution efficiency and solution quality, while analyzing the specific role of the preprocessing step in simplifying the problem and accelerating the solution process.

[0106] In addition, the above effective inequality can be introduced when the allocation solution solved based on the above first function and constraint conditions does not meet the requirements.

[0107] Specifically, if Figure 5 As shown, after obtaining the task data, object data and batches of unit time periods, based on these data, the second batch of task matching is determined, represented by the first matrix A, and the overlap between the execution time periods of the tasks is determined, represented by the second matrix B. Further, based on the first matrix A and the first matrix B, the constraint conditions are determined.

[0108] Then, the decision variables are determined, and the first function and constraint conditions are generated based on the first matrix A, the first matrix B and the decision variables. Using the solver, the first value of the decision variable is calculated based on the first function and the constraint conditions, with minimizing the sum of the working hours of the objects as the adjustment target, that is, the value of the decision variable when the sum of the working hours of the objects reaches the minimum value under the constraint conditions.

[0109] Further, based on the first value of the decision variable, the first batch to be assigned to the object and the second task to be performed by the first batch are determined. If the allocation scheme does not meet the requirements, the above valid inequality is added and solved again, and the above steps are repeated until the allocation scheme does not meet the requirements.

[0110] In another embodiment, the above S204 and S206 can also be implemented by machine learning. For example, taking the sum of the working hours of the objects as the adjustment target, a text is generated to describe the adjustment target and the constraint conditions, and then the text is input into the solution model for processing, and the first batch to be assigned to the object and the second task to be executed by the first batch are output. The solution model is trained with the sample adjustment target and the sample constraint conditions as input and the sample allocation scheme as the label.

[0111] The embodiment of the present application shows some implementation methods of the above S206. Of course, it should be understood that the above S206 can also be implemented in other ways, and the embodiment of the present application does not limit this.

[0112] One or more embodiments of the present application provide a task allocation method. Due to the multiple batches within a unit time period, the execution period of the task, the first task matched with the object and the working period of the object, the conditions that need to be satisfied by the relationship between the task, the object and the batch can be reflected. Based on these data, the conditions that need to be satisfied by the batches and tasks assigned to the object can be quickly and accurately determined; further, the allocation of batches to objects and the allocation of tasks within batches are integrated into a single comprehensive problem, and the technical concept of finding the optimal solution is adopted. Based on the batches, task data and object data within the unit time period, the first function and the constraints of the first function are determined, and the first function is adjusted based on the constraints until the sum of the working hours of the object reaches the minimum value to obtain the adjusted first function; the first batch assigned to the object and the second task executed within the first batch are determined according to the adjusted first function, and the optimal allocation plan can be found while satisfying the constraints, ensuring that the object can complete all tasks with the minimum sum of working hours, which not only helps to improve the efficiency of task execution, but also avoids the problem of performance degradation of the object due to unreasonable assignment of tasks to the object.

[0113] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0114] Based on the same inventive concept, the present application embodiment also proposes a task allocation device. Figure 6 , is a schematic diagram of a structure of a task allocation device provided by an embodiment of the present application. In a software implementation, the task allocation device 600 includes: a first determination module 610 , an adjustment module 620 and an allocation module 630 .

[0115] The first determination module 610 is used to determine the first function and the constraints of the first function based on the batch, task data and object data within a unit time period; the task data includes the execution time period of each task, and the object data includes: the first task matching the object and the working time period of the object; the constraints are the batches assigned to the object and the conditions that the tasks need to meet.

[0116] The adjustment module 620 is used to adjust the first function based on the constraint condition until the sum of the working hours of the objects reaches a minimum value, thereby obtaining an adjusted first function.

[0117] The allocation module 630 is used to determine a first batch of the object allocation and a second task to be executed in the first batch according to the adjusted first function.

[0118] In another embodiment, the first determining module is used to: Based on the execution period of the task, determining a second batch matching the task from the batches; determining an overlapping period between execution periods of the tasks; The constraint condition is determined based on the second batch corresponding time period matched by the task and the overlapping time period.

[0119] In another embodiment, the first function includes a decision variable, the decision variable being used to describe the relationship between the object, the batch to which the object is assigned, and the task to which the object is assigned; The adjustment module is used for: Linear programming is performed based on the first function and the constraints to obtain a first value of the decision variable, wherein the first value is the value of the decision variable when the sum of the working hours of the objects reaches a minimum value under the constraints; based on the decision variable with the first value, an adjusted first function is obtained.

[0120] In another embodiment, the decision variable includes a first variable and a second variable, the first variable is used to describe the number of the second batches matched by the object, and the second variable is used to describe the first batch to which the object is allocated within a unit time period; The first function is obtained by: Based on the first variable, generating a second function, the second function being used to describe the relationship between the value of the first variable and the number of objects divided into at least one first batch; Based on the second variable, generating a third function, the third function is used to describe the relationship between the value of the second variable and the sum of the working hours; The second function and the third function are merged to obtain the first function.

[0121] In another embodiment, when the adjustment module performs linear programming based on the first function and the constraint condition to obtain the first value of the decision variable, the adjustment module performs the following steps: Based on the constraint condition, determining a second value of the decision variable; Determine the sum of the working hours of the object based on the second value and the first function; If the sum of the working hours of the objects does not meet the convergence condition, repeatedly performing the following steps until the sum of the working hours of the objects meets the convergence condition: updating the second value, and determining the sum of the working hours of the objects based on the updated second value and the first function; If the sum of the working hours of the objects meets the convergence condition, the second value after the last update is determined as the first value of the decision variable.

[0122] In another embodiment, the constraint condition includes at least one of the following: The number of objects assigned to the task is greater than or equal to the number of objects required by the task, and the objects assigned to the task match the task; The number of batches to which the object is allocated within a unit time period is less than or equal to a first quantity threshold; a second task assigned to the object is matched with the first batch assigned to the object; The second task assigned to the object matches the object, and the execution time periods of the second task assigned to the object do not overlap; The number of unit time slots of the first batch to which the object is allocated in a first cycle is less than or equal to a time slot number threshold, the first cycle comprising a plurality of unit time slots arranged based on a time sequence; The sum of the working hours of the object in the first cycle is less than or equal to the duration threshold; The first batches allocated to the object in two adjacent unit time periods are not continuous in time; A first batch allocated for the object matches the object.

[0123] In another embodiment, if the constraint condition includes that the second task assigned to the object matches the object, and the execution time periods of the second task assigned to the object do not overlap, the constraint condition further includes at least one of the following: The number of tasks assigned to the object is less than or equal to the number of the first batch of tasks assigned to the object in a unit time period, and the first batch of tasks assigned to the object in a unit time period matches the second task assigned to the object; The number of objects assigned to the third task within a unit time period is greater than or equal to the number of objects required by the third task, wherein the third task includes tasks that match the first batch of object assignments.

[0124] Obviously, the task allocation device 600 provided in the embodiment of the present application can be used as the above Figure 2 The execution subject of the task allocation method shown in the figure can thus realize the task allocation device in Figure 2 The functions realized are as follows. Since the principles are the same, they will not be described in detail.

[0125] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 7 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0126] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0127] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0128] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a task allocation device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: Based on the batch, task data and object data within a unit time period, determine the first function and the constraint conditions of the first function; the task data includes the execution time period of each task, and the object data includes: the first task matched by the object and the working time period of the object; the constraint conditions are the batches assigned to the object and the conditions that the tasks need to meet; Based on the constraint condition, the first function is adjusted until the sum of the working hours of the objects reaches a minimum value, thereby obtaining an adjusted first function; A first batch of the object allocation and a second task executed in the first batch are determined according to the adjusted first function.

[0129] The above application Figure 2 The method performed by the task allocation device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0130] The electronic device may also perform Figure 2 The method and the task allocation device are implemented in Figures 2 to 5 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0131] Of course, in addition to software implementation, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0132] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 1 The method of the embodiment shown is specifically used to perform the following operations: Based on the batch, task data and object data within a unit time period, determine the first function and the constraint conditions of the first function; the task data includes the execution time period of each task, and the object data includes: the first task matched by the object and the working time period of the object; the constraint conditions are the batches assigned to the object and the conditions that the tasks need to meet; Based on the constraint condition, the first function is adjusted until the sum of the working hours of the objects reaches a minimum value, thereby obtaining an adjusted first function; A first batch of the object allocation and a second task executed in the first batch are determined according to the adjusted first function.

[0133] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the task allocation method provided in the first aspect.

[0134] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0135] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0136] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0137] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0138] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A task allocation method, characterized in that: include: Determine a first function and constraints of the first function based on the batch, task data and object data within a unit time period; The task data includes the execution period of each task, and the object data includes: the first task matched by the object and the working period of the object; the constraint conditions are the batches assigned to the object and the conditions that the tasks need to meet; Based on the constraint condition, the first function is adjusted until the sum of the working hours of the objects reaches a minimum value, thereby obtaining an adjusted first function; A first batch of the object allocation and a second task to be executed in the first batch are determined according to the adjusted first function.

2. The method according to claim 1, characterized in that The constraints are determined in the following way: Based on the execution period of the task, determining a second batch matching the task from the batches; determining an overlapping period between execution periods of the tasks; The constraint condition is determined based on the second batch corresponding time period matched by the task and the overlapping time period.

3. The method according to claim 1, characterized in that The first function includes a decision variable, and the decision variable is used to describe the relationship between the object, the batch assigned to the object, and the task assigned to the object; The first function is adjusted based on the constraint condition until the sum of the working hours of the objects reaches a minimum value, thereby obtaining the adjusted first function, including: Linear programming is performed based on the first function and the constraints to obtain a first value of the decision variable, wherein the first value is the value of the decision variable when the sum of the working hours of the objects reaches a minimum value under the constraints; based on the decision variable with the first value, an adjusted first function is obtained.

4. The method according to claim 3, characterized in that The decision variables include a first variable and a second variable, the first variable is used to describe the number of the second batches matched by the object, and the second variable is used to describe the first batches allocated to the object in a unit time period; The first function is obtained by: Based on the first variable, generating a second function, the second function being used to describe the relationship between the value of the first variable and the number of objects divided into at least one first batch; Based on the second variable, generating a third function, the third function is used to describe the relationship between the value of the second variable and the sum of the working hours; The second function and the third function are merged to obtain the first function.

5. The method according to claim 3, characterized in that: The performing of linear programming based on the first function and the constraint condition to obtain a first value of the decision variable includes: Based on the constraint condition, determining a second value of the decision variable; Determine the sum of the working hours of the object based on the second value and the first function; If the sum of the working hours of the objects does not meet the convergence condition, repeatedly performing the following steps until the sum of the working hours of the objects meets the convergence condition: updating the second value, and determining the sum of the working hours of the objects based on the updated second value and the first function; If the sum of the working hours of the objects meets the convergence condition, the second value after the last update is determined as the first value of the decision variable.

6. The method according to claim 1, characterized in that The constraint condition includes at least one of the following: The number of objects assigned to the task is greater than or equal to the number of objects required by the task, and the objects assigned to the task match the task; The number of batches to which the object is allocated within a unit time period is less than or equal to a first quantity threshold; a second task assigned to the object is matched with the first batch assigned to the object; The second task assigned to the object matches the object, and the execution time periods of the second task assigned to the object do not overlap; The number of unit time slots of the first batch to which the object is allocated in a first cycle is less than or equal to a time slot number threshold, the first cycle comprising a plurality of unit time slots arranged based on a time sequence; The sum of the working hours of the object in the first cycle is less than or equal to the duration threshold; The first batches allocated to the object in two adjacent unit time periods are not continuous in time; A first batch allocated for the object matches the object.

7. The method according to claim 6, characterized in that If the constraint condition includes that the second task assigned to the object matches the object, and the execution time periods of the second task assigned to the object do not overlap, then the constraint condition further includes at least one of the following: The number of tasks assigned to the object is less than or equal to the number of the first batch of tasks assigned to the object in a unit time period, and the first batch of tasks assigned to the object in a unit time period matches the second task assigned to the object; The number of objects assigned to a third task within a unit time period is greater than or equal to the number of objects required by the third task, wherein the third task includes the tasks matched by the first batch of object assignments.

8. A task allocation device, characterized in that: include: A first determination module, configured to determine a first function and constraints of the first function based on batches, task data and object data within a unit time period; The task data includes the execution period of each task, and the object data includes: the first task matched by the object and the working period of the object; the constraint conditions are the batches assigned to the object and the conditions that the tasks need to meet; An adjustment module, configured to adjust the first function based on the constraint condition until the sum of the working hours of the objects reaches a minimum value, thereby obtaining an adjusted first function; The allocation module is used to determine a first batch of the object allocation and a second task to be executed in the first batch according to the adjusted first function.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the task allocation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the task allocation method as claimed in any one of claims 1 to 7.

11. A computer program product, characterized in that The computer program product comprises a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute part or all of the steps in the task allocation method according to any one of claims 1 to 7.