Task scheduling method and device, electronic equipment and storage medium

By generating the optimal scheduling scheme through genetic algorithms, the problem of existing task scheduling methods relying on human experience is solved, thereby improving scheduling efficiency and stability and adapting to the needs of complex and dynamic communication operation and maintenance tasks.

CN120996416APending Publication Date: 2025-11-21CHINA TELECOM CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510934236.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing task scheduling methods rely too heavily on human experience, resulting in low scheduling efficiency and unstable results, making it difficult to meet the increasingly complex and large-scale installation and maintenance task needs of telecommunications operators.

Method used

A genetic algorithm is used for task scheduling. Through operations such as generating an initial population, iterative optimization, roulette wheel selection, partial matching crossover, and local search, the optimal scheduling scheme that meets the constraints is generated, reducing the reliance on human experience.

Benefits of technology

It improves the efficiency of task scheduling and the stability of results, enabling it to better handle diverse and high-frequency installation and maintenance tasks, adapt to dynamic environmental changes, and find the best balance between efficiency and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996416A_ABST
    Figure CN120996416A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling method and device, electronic equipment and a storage medium, and the task scheduling method comprises the steps: obtaining task information and worker information; based on the task information and the worker information, an initial population is generated, the initial population comprises a plurality of scheduling scheme individuals, each individual is coded as a chromosome, and elements of each chromosome comprise a worker identifier, a task identifier and task starting time; determining the initial population as a target population, and performing iterative optimization on the target population to obtain an optimized target population; and selecting a scheduling scheme individual with the highest fitness from the optimized target population to obtain a target scheduling scheme, and performing task scheduling based on the target scheduling scheme. By applying the technical scheme provided by the invention, the scheduling efficiency and the scheduling result stability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer application, and in particular, relates to a task scheduling method and device, an electronic device, and a storage medium. BACKGROUND

[0002] With the rapid development of the communication industry and technological progress, the installation and maintenance tasks faced by communication operators are increasingly complex and large. The core of communication operation and maintenance is to ensure the normal operation of network equipment, including installation, maintenance, and fault repair of equipment. These installation and maintenance tasks are directly related to the stability of network services and customer satisfaction, and therefore higher requirements are placed on task scheduling.

[0003] Currently, task scheduling is mainly based on preset rules and manual experience to assign tasks to corresponding installation and maintenance workers. This task scheduling method relies too much on subjective experience, and if the scheduling is unreasonable, it needs to be adjusted again, resulting in low scheduling efficiency and poor stability of the scheduling result. SUMMARY

[0004] The purpose of the present application is to provide a task scheduling method, device, electronic device, and storage medium to improve scheduling efficiency and stability of the scheduling result.

[0005] To solve the above technical problems, the present application provides the following technical solutions:

[0006] In a first aspect, a task scheduling method is provided, comprising:

[0007] obtaining task information and worker information;

[0008] generating an initial population based on the task information and the worker information, the initial population comprising a plurality of scheduling scheme individuals, each individual being encoded as a chromosome, and each element of the chromosome comprising a worker identifier, a task identifier, and a task start time;

[0009] determining the initial population as a target population, and iteratively optimizing the target population to obtain an optimized target population;

[0010] selecting a scheduling scheme individual with the highest fitness from the optimized target population to obtain a target scheduling scheme, and scheduling tasks based on the target scheduling scheme;

[0011] In each iteration of the optimization of the target population:

[0012] performing a roulette selection operation based on the fitness of each scheduling scheme individual in the target population;

[0013] performing a partial match crossover operation on the selected scheduling scheme individual to generate a new scheduling scheme individual;

[0014] performing at least one of a two-element optimization local search operation and a mutation operation on the new scheduling scheme individual;

[0015] filtering out individuals satisfying constraint conditions to obtain a new target population.

[0016] In a second aspect, a task scheduling apparatus is provided, comprising:

[0017] an acquisition module configured to acquire task information and worker information;

[0018] a generation module configured to generate an initial population based on the task information and the worker information, the initial population comprising a plurality of scheduling scheme individuals, each individual being coded as a chromosome, and each chromosome comprising worker identifiers, task identifiers, and task start times;

[0019] an optimization module configured to determine the initial population as a target population, and iteratively optimize the target population to obtain an optimized target population;

[0020] a scheduling module configured to select a scheduling scheme individual with the highest fitness from the optimized target population to obtain a target scheduling scheme, and perform task scheduling based on the target scheduling scheme;

[0021] In each iteration of the optimization of the target population, the optimization module is specifically configured to:

[0022] perform a roulette wheel selection operation based on the fitness of each scheduling scheme individual in the target population;

[0023] perform a partial match crossover operation on the selected scheduling scheme individual to generate a new scheduling scheme individual;

[0024] perform at least one of a two-element optimization local search operation and a mutation operation on the new scheduling scheme individual;

[0025] filter out individuals satisfying constraint conditions to obtain a new target population.

[0026] In a third aspect, an electronic device is provided, comprising:

[0027] a memory configured to store a computer program;

[0028] a processor configured to implement the steps of the task scheduling method of the first aspect when executing the computer program.

[0029] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the task scheduling method of the first aspect.

[0030] In a fifth aspect, a computer program product is provided, which comprises computer instructions stored in a computer readable storage medium and adapted to be read and executed by a processor to enable a computer device having the processor to perform the steps of the task scheduling method according to the first aspect.

[0031] According to the technical solution provided in the embodiments of the present application, after the task information and the worker information are obtained, an initial population is generated based on the task information and the worker information, the initial population comprises a plurality of scheduling scheme individuals, the initial population is determined as a target population, the target population is iteratively optimized to obtain an optimized target population, the scheduling scheme individual with the highest fitness is selected from the optimized target population to obtain a target scheduling scheme, and the task scheduling is performed based on the target scheduling scheme. In each iterative optimization process of the target population, the roulette selection operation is performed based on the fitness of each scheduling scheme individual in the target population, the partial matching crossover operation is performed on the selected scheduling scheme individual to generate a new scheduling scheme individual, at least one of the two-element optimization local search operation and the mutation operation is performed on the new scheduling scheme individual, the individual satisfying the constraint condition is screened out to obtain a new target population. The optimal target scheduling scheme is obtained by improving the genetic algorithm without relying on artificial experience, which helps to improve the scheduling efficiency and the stability of the scheduling result.

[0032] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application. BRIEF DESCRIPTION OF DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0034] Figure 1 is an implementation flowchart of a task scheduling method in the embodiments of the present application;

[0035] Figure 2 is a structural schematic diagram of a task scheduling system in the embodiments of the present application;

[0036] Figure 3 is a structural schematic diagram of a task scheduling device in the embodiments of the present application;

[0037] Figure 4 is a structural schematic diagram of an electronic device in the embodiments of the present application. DETAILED DESCRIPTION

[0038] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.

[0039] The terms "first", "second", and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second" are usually a category and do not limit the number of objects, for example, the first object can be one or more.

[0040] The core of the present application is to provide a task scheduling method, which can be applied in task scheduling management, task allocation management and the like. Task scheduling can also be understood as worker scheduling, task allocation, etc., that is, assigning tasks to workers or assigning tasks to workers.

[0041] In communication operation and maintenance, tasks can be installation and maintenance tasks, and workers can be installation and maintenance workers. With the increase of business volume and the improvement of task complexity, the traditional task scheduling method has been difficult to meet the efficient and accurate needs. The necessity of intelligent scheduling gradually appears, mainly reflected in the following aspects:

[0042] Task diversification and high frequency: communication operators need to handle a large number of installation and maintenance tasks of various types, which need to be completed within a specific time window and have different priorities;

[0043] Complex constraints: scheduling schemes need to consider various constraints such as worker skills, working hours, geographical location, etc., to ensure reasonable task allocation and improve worker utilization;

[0044] Dynamic environment response: in actual operation, the status of tasks and workers will change constantly, and unexpected events such as task changes and worker unavailability require the scheduling system to quickly respond and adjust the scheme;

[0045] Efficiency and cost balance: scheduling needs to find the best balance between task completion efficiency and operation cost (such as driving distance and time) to improve overall operation efficiency.

[0046] The task scheduling method provided by the embodiments of the present application takes into account the above factors, and realizes intelligent scheduling.

[0047] It should be noted that in the embodiments of the present application, the full name of AM is "ante meridiem", which means morning, and the full name of PM is "post meridiem", which means afternoon.

[0048] Referring to Figure 1 As shown in the flowchart of the implementation process of the task scheduling method provided by the embodiments of the present application, the method can include the following steps:

[0049] S110: Obtain task information and worker information.

[0050] In the embodiments of the present application, the trigger condition can be set in advance, such as when a set time interval is reached, or when a set time point is reached, or when the worker or task changes, it is considered that the trigger condition is reached. In the case where the set trigger condition is reached, the task scheduling can be triggered, and the task information and the worker information are obtained.

[0051] Optionally, the task information can include at least one of task identification, task area, task urgency, task estimated working hours, and task type. The task identification can be understood as an identification uniquely representing a task, such as T_001, the task area can be understood as a geographical area where the task is located, such as XX City A Street, the task urgency can be determined according to the task priority, the higher the task priority, the higher the urgency, and the earlier the start time, the task estimated working hours can be understood as the working hours required to complete the task, such as 1.5 hours, and the task type can be understood as the type to which the task belongs, such as broadband installation, and the skill requirement of the task can be determined through the task type. The task information can be generated in real time.

[0052] Optionally, the worker information can include at least one of worker identification, worker skill level, worker working area, worker working hours, and number of tasks to be completed by the worker. The worker identification can be understood as an identification uniquely representing a worker, such as W_001, W_002, etc., the worker skill level can be understood as the skill that the worker is good at, such as W_001 is good at broadband installation, W_002 is good at lock installation, etc., the worker working area can be understood as the area where the worker works, such as XX City A Street, the worker working hours can be understood as the working hours of the worker in a set time period, and the number of tasks to be completed by the worker can be understood as the number of tasks to be completed among the tasks allocated to the worker, such as W_001 has 2 tasks to be completed, and W_002 has 1 task to be completed. The set time period can be dynamically set according to the task quantity, the worker working cycle (such as eight-hour working system), business demand, etc.

[0053] The task information and the worker information will serve as the basis for subsequent task scheduling.

[0054] Optionally, the worker-related information and the task-related information can be subjected to multi-dimensional comprehensive analysis through a pre-constructed multi-level situational intelligent model to obtain worker information and task information.

[0055] The multi-level situational intelligent model can include:

[0056] a task attribute analysis unit configured to analyze an urgency of a task, a type of the task, and an estimated working time, etc.

[0057] a skill matching unit configured to establish a skill-task association matrix according to a skill level of a worker and a historical completion quality;

[0058] a historical scheduling learning unit configured to mine a space-time rule of historical scheduling data by using a time sequence neural network;

[0059] a geographic information system (GIS) dynamic evaluation unit configured to integrate real-time traffic data and geographic topological relations to calculate a worker moving cost.

[0060] S120: generating an initial population based on the task information and the worker information.

[0061] The initial population includes multiple scheduling scheme individuals, each individual is coded as a chromosome, and each element of the chromosome includes a worker identifier, a task identifier, and a task start time.

[0062] In the embodiments of the present application, after the task information and the worker information are obtained, multiple scheduling scheme individuals can be randomly generated based on the task information and the worker information to form an initial population. Each individual is coded as a chromosome, and each element of the chromosome includes a worker identifier, a task identifier, and a task start time. The task start time is determined by a task order and a worker available time. Alternatively, it can be understood that the chromosome is a coding combination of a worker identifier, a task identifier, and a task execution order, and each gene of the chromosome represents an allocation relationship of "worker identifier-task identifier-start time".

[0063] For example, a certain scheduling scheme individual is coded as the following chromosome:

[0064] [(W_001, T_001, 10:00 AM), (W_003, T_003, 11:00 AM)];

[0065] In the chromosome, the elements include worker identities {W_001, W_003}, task identities {T_001, T_003}, and task start times {10:00 AM, 11:00 AM}. The first gene of the chromosome represents an assignment relationship of (W_001, T_001, 10:00 AM), and the second gene represents an assignment relationship of (W_003, T_003, 11:00 AM).

[0066] S130: determine the initial population as the target population, and perform iterative optimization on the target population to obtain an optimized target population;

[0067] In each iteration of the optimization of the target population, the following operations are performed:

[0068] Based on the fitness of each scheduling scheme individual in the target population, a roulette wheel selection operation is performed.

[0069] For the selected scheduling scheme individual, a partial match crossover operation is performed to generate a new scheduling scheme individual.

[0070] At least one of a 2-optimization local search operation and a mutation operation is performed on the new scheduling scheme individual.

[0071] Individuals that satisfy the constraint condition are screened out to obtain a new target population.

[0072] In the embodiments of the present application, after the initial population is generated based on the task information and the worker information, the initial population can be further determined as the target population, and the target population is iteratively optimized.

[0073] In each iteration of the optimization of the target population, the fitness of each scheduling scheme individual in the target population can be calculated first, and then a roulette wheel selection operation is performed based on the fitness of each scheduling scheme individual in the target population. Roulette wheel selection is a selection strategy mainly used in genetic algorithms and other optimization algorithms to select individuals into the next generation. The basic idea is to assign a probability value to each individual according to its fitness. The higher the fitness of an individual, the greater the probability it occupies, and the more likely it is to be selected when the roulette wheel is spun.

[0074] For the selected scheduling scheme individual, a partial match crossover operation is performed to generate a new scheduling scheme individual. For example, the partial genes of the task order in the parent individual can be exchanged to generate a new scheduling scheme individual. Each new scheduling scheme individual corresponds to a scheduling scheme.

[0075] At least one of a 2-optimization local search operation and a mutation operation is performed on the new scheduling scheme individual to obtain a new target population.

[0076] Local search refers to starting from an initial solution in the solution space, and gradually improving the current solution by searching for a better solution in its neighborhood. Two-element optimization local search is a local search strategy, the core idea of which is to optimize the total distance or total time of a path by swapping the order of two tasks in the path. The two-element optimization local search operation can improve the solution quality of the genetic algorithm. For example, a pair of tasks can be randomly selected, and their execution order can be tried to be swapped, and it can be checked whether the efficiency can be improved, the driving distance or the driving time can be reduced, if the adjusted fitness is improved, the new adjustment can be accepted, otherwise the original scheme is kept. Or after swapping the order of the tasks, if the driving distance between the tasks is reduced, the change is accepted.

[0077] The mutation operation can include at least one of a transposition mutation operation, a reverse mutation operation, and an insertion mutation operation.

[0078] The transposition mutation operation includes: for each new scheduling scheme individual, randomly swapping the execution order of two tasks in the current new scheduling scheme individual or assigning to different workers. The current new scheduling scheme individual refers to the new scheduling scheme individual to which the current operation is directed.

[0079] For example, there is a new scheduling scheme individual as follows:

[0080] [(W_001, T_001, 10:00 AM), (W_003, T_003, 11:00 AM), (W_004, T_002, 1:00 PM)].

[0081] Two tasks are randomly selected, and their execution order is swapped. It is assumed that T_001 and T_002 are swapped, and the mutated individual is obtained as follows:

[0082] [(W_001, T_002, 10:00 AM), (W_003, T_003, 11:00 AM), (W_004, T_001, 1:00 PM)].

[0083] In this example, the execution order of T_001 and T_002 is swapped. After the task order is transposed, the task start time is recalculated.

[0084] The reverse mutation operation includes: for each new scheduling scheme individual, reversing the order of consecutive tasks in the current new scheduling scheme individual.

[0085] For example: there is a new scheduling scheme individual as follows:

[0086] [(W_001, T_001, 10:00 AM), (W_003, T_003, 11:00 AM), (W_004, T_002, 1:00 PM)].

[0087] Suppose the subsequence [T_003, T_002] is selected, and its order is reversed. The mutated individual is obtained as follows:

[0088] [(W_001, T_001, 10:00AM), (W_004, T_002, 1:00PM), (W_003, T_003, 11:00AM)].

[0089] In this example, the order of tasks T_003 and T_002 is reversed. The reverse mutation explores potential high-quality solutions by changing the execution order of tasks.

[0090] The insertion mutation operation includes: for each new scheduling scheme individual, randomly selecting a task in the current new scheduling scheme individual to be inserted into the position of another task.

[0091] For example, there is a new scheduling scheme individual as follows:

[0092] [(W_001, T_001, 10:00AM), (W_004, T_002, 1:00PM)].

[0093] Suppose the task T_003 is selected, and it is inserted between T_001 and T_002, and the mutated individual is obtained as follows:

[0094] [(W_001, T_001, 10:00AM), (W_003, T_003, 11:00AM), (W_004, T_002, 1:00PM)].

[0095] In this example, T_003 is inserted between tasks T_001 and T_002, resulting in a change in the order of tasks.

[0096] After the two-element optimization local search operation and at least one of the mutation operations are performed on the new scheduling scheme individual, more or better individuals can be obtained.

[0097] The individuals can be screened based on the constraint condition, and the individuals satisfying the constraint condition are screened out, and the individuals not satisfying the constraint condition are discarded, to obtain a new target population.

[0098] Optionally, the constraint condition can include at least one of the following:

[0099] 1) The start time of a task is not earlier than the time at which the worker assigned to the task can start the task;

[0100] It can be understood that each task must start at a specified time point. That is:

[0101] T start (t i) ≥ T available (w j );

[0102] wherein, T start (t i ) represents the start time of task t i ; T available (w j ) represents the time when worker w j can start the task.

[0103] For example, a customer requires a broadband installation task to start at 10:00 am, and this time point is the task time constraint. According to the time requirement of the task and the time when the worker arrives at the task point, it is necessary to ensure that each task starts at the time required by the customer. For example, the available time of W_001 is from 9:00 to 12:00, and it takes half an hour to arrive at the task site, so according to whether the time when the worker arrives at the task site is before the time required by the task, it can be judged whether it is appropriate to assign the task to the worker.

[0104] 2) The total duration of all tasks completed by the worker is less than or equal to the maximum working hours;

[0105] It can be understood as a working hours limit, which ensures that the working hours of each worker does not exceed the specified maximum working hours. That is:

[0106]

[0107] wherein, represents the total duration of all tasks completed by worker w j ; T max (w j ) represents the maximum working hours of worker w j .

[0108] For example, the maximum working hours of W_001 is 8 hours, and it is necessary to ensure that the total duration of all tasks completed by the worker does not exceed 8 hours. If W_001 has already completed 5 hours of work, it is necessary to avoid assigning a task that exceeds 3 hours to W_001 to avoid exceeding the maximum working hours limit of W_001.

[0109] The maximum working hours corresponding to different workers can be the same or different.

[0110] 3) High priority tasks are assigned first;

[0111] It can be understood as a task priority constraint, which assigns workers according to the urgency and priority of the task to ensure that high priority tasks are completed first. That is:

[0112]

[0113] where Priority(t i ) represents the priority of task t i ; Priority(t j ) represents the priority of task t j ; T represents the set of tasks; T start (t j ) represents the start time of task t j .

[0114] For example, the priority of task T_002 is high (customer installs broadband), and the priority of task T_003 is low (customer installs door lock). High-priority tasks can be considered first to ensure that high-priority tasks (urgent tasks) are completed first in task scheduling. Because the priority of T_002 is higher than the priority of T_003, T_002 should be assigned to W_001 first even if W_001 does not conflict with T_003 in time.

[0115] 4) The area where the task assigned to the worker is the same as the working area of the worker;

[0116] It can be understood as a working area constraint to ensure that the worker performs the task within his designated working area. That is:

[0117]

[0118] where Area(w j ) is the working area of worker w j ; Area(t i ) represents the area where task t i is located; T(w j ) represents the set of all tasks assigned to worker w j .

[0119] For example, W_001 is responsible for tasks on A Street, and W_002 is responsible for tasks on B Street. If task T_001 is on A Street, it should be assigned to W_001 and not assigned to W_002.

[0120] 5) The skill level of the worker meets the skill requirement of the task assigned to the worker.

[0121] It can be understood as a skill level constraint, and the skill level of the worker should meet the skill level required by the task.

[0122] For example, a broadband installation task requires the worker to have broadband installation skills. If W_002 does not have broadband installation skills, the task should be excluded from the assignable tasks of W_002.

[0123] After obtaining the new target population, the following steps can be repeated for the new target population: performing roulette selection based on the fitness of each scheduling scheme individual in the target population, performing partial match crossover on the selected scheduling scheme individual to generate a new scheduling scheme individual, performing at least one of two-element optimization local search and mutation on the new scheduling scheme individual, screening individuals that meet the constraint condition to obtain a new target population. Until the iteration number requirement is met or the convergence requirement is met, an optimized target population is obtained.

[0124] In S140, a scheduling scheme individual with the highest fitness is selected from the optimized target population to obtain a target scheduling scheme, and task scheduling is performed based on the target scheduling scheme.

[0125] After the initial population is determined as the target population and the target population is iteratively optimized to obtain an optimized target population, the fitness of each scheduling scheme individual in the optimized target population can be calculated, and a scheduling scheme individual with the highest fitness can be selected to obtain a target scheduling scheme including task execution order and worker task allocation relationship, and task scheduling is performed based on the target scheduling scheme.

[0126] According to the method provided in the embodiments of the present application, after obtaining task information and worker information, an initial population including multiple scheduling scheme individuals is generated based on the task information and the worker information, the initial population is determined as a target population, the target population is iteratively optimized to obtain an optimized target population, a scheduling scheme individual with the highest fitness is selected from the optimized target population to obtain a target scheduling scheme, and task scheduling is performed based on the target scheduling scheme. In each iterative optimization of the target population, roulette selection is performed based on the fitness of each scheduling scheme individual in the target population, partial match crossover is performed on the selected scheduling scheme individual to generate a new scheduling scheme individual, at least one of two-element optimization local search and mutation is performed on the new scheduling scheme individual, and individuals that meet the constraint condition are screened to obtain a new target population. The optimal target scheduling scheme is obtained by improving the genetic algorithm without relying on artificial experience, which helps to improve scheduling efficiency and scheduling result stability.

[0127] In some embodiments of the present application, the fitness of each scheduling scheme individual is determined based on an objective function, the positive benefit indicator of the objective function includes task completion efficiency, and the negative cost indicator of the objective function includes total driving distance and total driving time.

[0128] In the embodiments of the present application, the objective function can be constructed in advance, the positive reward indicators of the objective function include task completion efficiency, which is related to task priority, weighting coefficient and time required for completing the task, and the negative cost indicators of the objective function include total driving distance and total driving time, the total driving distance refers to the sum of distances between tasks, and the total driving time refers to the sum of driving times between tasks.

[0129] That is, the target is to maximize the task completion efficiency and minimize the total driving distance or total driving time.

[0130] Optionally, the objective function Objective Function is as follows:

[0131] Objective Function = α × Efficiency - β × D - γ × T total . total ;

[0132] Wherein, α, β and γ represent weight factors, which can be preset empirical values or obtained through historical data training, such as manual adjustment according to business priority or fitting optimal weights through machine learning; Efficiency represents task completion efficiency; D represents total driving distance; T represents total driving time. total total .

[0133] Optionally, a Pareto frontier sorting mechanism can be used to generate a non-dominated solution set, and a visual weight adjustment can be made through an interactive decision interface.

[0134]

[0135] Wherein, Priority(t i ) represents the priority of task t i ; Weight(t i ) represents the weighting coefficient of task t i ; Completion Time(t i ) represents the time required for completing task t i .

[0136] For example, the priority of task T_001 is high (Priority = 10), the weighting coefficient is 2, and the completion time is 1.5 hours, and the completion efficiency calculated by the above formula is:

[0137]

[0138] The priority of task T_002 is low (Priority = 4), the weighting coefficient is 1, and the completion time is 2 hours, and the completion efficiency calculated by the above formula is: ​

[0139]

[0140] The task T_001 can be assigned to the worker in priority due to high completion efficiency.

[0141]

[0142] wherein, W represents a worker set; Dist(t i ,t k ) represents a distance between the task t i and the task t k .

[0143] The task T_001 and the task T_002 are respectively on the A1 road and the A2 road of the A street, and the distance therebetween is 10 kilometers. The distance between the tasks is required to be reduced as much as possible to reduce the transportation cost.

[0144]

[0145] wherein, Time(t i ,t k ) represents a driving time between the task t i and the task t k .

[0146] The driving distance or the driving time between the tasks can be reduced by adjusting the task execution order between the workers or adjusting the task worker assignment result.

[0147] The fitness function can be obtained based on the objective function, so that the fitness of each scheduling scheme individual can be determined. In this way, the subsequent selection operation and the like based on the fitness of each scheduling scheme individual can be facilitated.

[0148] In some embodiments of the present application, the roulette selection operation based on the fitness of each scheduling scheme individual in the target population can include the following steps:

[0149] standardizing the fitness of each scheduling scheme individual in the target population;

[0150] determining the selection probability of each scheduling scheme individual based on the dynamic adjustment factor and the standardized fitness of each scheduling scheme individual;

[0151] constructing a roulette based on the selection probability of each scheduling scheme individual;

[0152] selecting the scheduling scheme individual according to the random number and the cumulative selection probability of each scheduling scheme individual in the roulette.

[0153] For the convenience of description, the above steps are combined for description.

[0154] In the embodiments of the present application, the target population includes a plurality of scheduling scheme individuals. After the fitness of each scheduling scheme individual in the target population is calculated, the fitness of each scheduling scheme individual can be normalized, for example, the fitness of each scheduling scheme individual can be linearly mapped to a unified interval, so that the fitnesses of different orders of magnitude are comparable.

[0155] The embodiments of the present application introduce a dynamic adjustment factor. Optionally, the dynamic adjustment factor is determined based on a preset maximum value of the dynamic adjustment factor, a preset minimum value of the dynamic adjustment factor, a maximum iteration number, and a current iteration number.

[0156] For example, the following formula can be used:

[0157]

[0158] wherein λ max represents the preset maximum value of the dynamic adjustment factor; λ min represents the preset minimum value of the dynamic adjustment factor; λ(t) represents the dynamic adjustment factor, which is the dynamic adjustment factor in the tth iteration process; T max represents the preset maximum iteration number; and t represents the current iteration number.

[0159] Based on the dynamic adjustment factor and the normalized fitness of each scheduling scheme individual, the selection probability of each scheduling scheme individual is determined.

[0160] Optionally, the selection probability can be dynamically adjusted by the following formula:

[0161]

[0162] wherein P(i) represents the final selection probability of the ith scheduling scheme individual; U represents the uniform distribution probability; n represents the total number of scheduling scheme individuals in the target population; and N(i) represents the normalized fitness of the ith scheduling scheme individual. Based on the selection probability of each scheduling scheme individual, a roulette wheel can be constructed. For each scheduling scheme individual, the greater the selection probability of the scheduling scheme individual, the greater the corresponding sector area in the roulette wheel, and the easier the scheduling scheme individual is selected.

[0163] After the roulette wheel is constructed, the selection of the scheduling scheme individual can be further performed according to a random number and the cumulative selection probability of each scheduling scheme individual in the roulette wheel.

[0164] The cumulative selection probability of the kth scheduling scheme individual in the roulette wheel is

[0165]

[0166] ​roulette wheel selection: generate a random number r in the range [0, 1] and select the first scheduling scheme individual k that satisfies CumulativeProbability(k) ≥ r.

[0167] For the convenience of understanding, examples are given.

[0168] Assume λ max = 0.9, λ min = 0.1, T max = 100, t = 50;

[0169] Based on the above information, the dynamic adjustment factor is calculated, and the dynamic adjustment factor λ(t) = 0.5 is obtained.

[0170] For each scheduling scheme individual in the target population, first, its normalized fitness N(i) needs to be calculated.

[0171] For example: the fitness of scheduling scheme individual 1 is 0.8, the minimum fitness of scheduling scheme individuals in the target population is 0.5, and the maximum fitness is 1.0, then the normalized fitness N(1) of scheduling scheme individual 1 is:

[0172]

[0173] Dynamic adjustment of selection probability:

[0174] Assume there are 10 scheduling scheme individuals, λ(t) = 0.5, and the normalized fitness N(1) of scheduling scheme individual 1 is 0.6, then the selection probability P(1) of scheduling scheme individual 1 is 0.35.

[0175] This adjustment ensures that in the early iterations, scheduling scheme individuals with high fitness are more likely to be selected, and as the iterations proceed, the selection probability gradually balances, increasing the diversity of the population.

[0176] According to the selection probability P(i) of each scheduling scheme individual, a roulette wheel can be constructed, and scheduling scheme individuals can be selected according to the cumulative selection probability of each scheduling scheme individual in the roulette wheel.

[0177] The cumulative selection probability of the kth scheduling scheme individual is CumulativeProbability(k).

[0178] The selection probabilities of the 10 scheduling scheme individuals are respectively: P(1) = 0.35, P(2) = 0.25, P(3) = 0.15…, after constructing the roulette wheel, the cumulative selection probability of each scheduling scheme individual in the roulette wheel is:

[0179] CumulativeProbability(1) = P(1) = 0.35;

[0180] Cumulative Probability(2) = P(l) + P(2) = 0.60;

[0181] Cumulative Probability(3) = P(l) + P(2) + P(3) = 0.75;

[0182]

[0183] And so on.

[0184] Then, a random number r is generated in the range of [0, 1], assuming r = 0.62, because Cumulative Probability(2) = 0.60 < 0.62 and Cumulative Probability(3) = 0.75 > 0.62, the third scheduling scheme individual will be selected.

[0185] In the embodiment, the roulette selection method combined with the dynamically adjusted selection probability can realize a more intelligent and efficient individual selection mechanism, thereby improving the overall performance of the communication operator task intelligent scheduling system based on the improved genetic algorithm; through the dynamic adjustment factor, more exploration is performed in the early stage of the algorithm (increasing the diversity of individual selection), and more development is performed in the later stage of the algorithm (increasing the selection probability of excellent individuals), thereby improving the global search ability and convergence speed of the algorithm; in different evolution stages, the selection pressure is dynamically adjusted according to the demand, so as to avoid premature convergence and falling into local optimum.

[0186] In some embodiments of the present application, the selected scheduling scheme individual is subjected to a partial matching crossover operation, which can include the following steps:

[0187] According to the fitness of each scheduling scheme individual in the target population, the fitness information of the target population is determined, and the fitness information of the target population includes the average fitness, the maximum fitness and the minimum fitness of the target population;

[0188] Based on the fitness information of the target population, the crossover rate is determined;

[0189] Based on the crossover rate, the selected scheduling scheme individual is subjected to a partial matching crossover operation.

[0190] For convenience of description, the above steps are combined for description.

[0191] In the embodiments of the present application, in each iteration optimization process of the target population, based on the fitness of each scheduling scheme individual in the target population, after the roulette selection operation, the fitness information of the target population can be determined according to the fitness of each scheduling scheme individual in the target population, and the fitness information includes the average fitness, the maximum fitness and the minimum fitness of the target population. The average fitness of the target population is the average value of the fitness of the scheduling scheme individuals in the target population, the maximum fitness of the target population is the maximum value in the fitness of the scheduling scheme individuals in the target population, and the minimum fitness of the target population is the minimum value in the fitness of the scheduling scheme individuals in the target population.

[0192] Based on the fitness information of the target population, the crossover rate can be determined.

[0193] Alternatively, the crossover rate can be determined by the following formula:

[0194]

[0195] Wherein, P c,min represents the minimum value of the preset crossover rate; P c,max represents the maximum value of the preset crossover rate; f avg represents the average fitness of the current population; f min represents the minimum fitness of the current population; f max represents the maximum fitness of the current population; P c represents the adjusted crossover rate. The current population here can be understood as the current target population.

[0196] Suppose there is an initial setting: P c,min = 0.6, P c,max = 0.9, and the fitness information of the current population is as follows: f avg = 0.75; f min = 0.5, f max = 1, these values are substituted into the above crossover rate formula to obtain: P v = 0.75.

[0197] Therefore, the adjusted crossover rate P c = 0.75.

[0198] Based on the crossover rate, the selected scheduling scheme individuals can be subjected to the partial match crossover operation.

[0199] In each iteration, first, the average fitness, the minimum fitness and the maximum fitness of the current population are calculated. Then, the crossover rate is dynamically adjusted according to the above formula, so that the new crossover rate is used in the partial match crossover operation. In this way, the genetic algorithm can dynamically adapt to the state of the current population, and improve the effect of global search and local optimization.

[0200] In some embodiments of the present application, the mutation operation on the new scheduling scheme individual can be performed by the following steps:

[0201] According to the fitness of each new scheduling scheme individual, the fitness information of the new population composed of the new scheduling scheme individuals is determined, and the fitness information of the new population includes the average fitness, the maximum fitness and the minimum fitness of the new population;

[0202] Based on the fitness information of the new population, the mutation rate is determined;

[0203] Based on the mutation rate, the mutation operation on the new scheduling scheme individual is performed.

[0204] For the convenience of description, the above steps are combined for description.

[0205] In the embodiments of the present application, in each iteration optimization process of the target population, based on the fitness of each scheduling scheme individual in the target population, the roulette selection operation is performed, and for the selected scheduling scheme individual, the partial match crossover operation is performed to generate a new scheduling scheme individual. After that, according to the fitness of each new scheduling scheme individual, the fitness information of the new population composed of the new scheduling scheme individuals is determined, and the fitness information includes the average fitness, the maximum fitness and the minimum fitness of the new population. The average fitness of the new population is the average value of the fitness of the scheduling scheme individuals in the new population, the maximum fitness of the new population is the maximum value of the fitness of the scheduling scheme individuals in the new population, and the minimum fitness of the new population is the minimum value of the fitness of the scheduling scheme individuals in the new population.

[0206] Based on the fitness information of the new population, the mutation rate can be determined.

[0207] Optionally, the mutation rate can be determined by the following formula:

[0208]

[0209] Wherein, P m,min represents the minimum value of the preset mutation rate; P m,max represents the maximum value of the preset mutation rate; f avg represents the average fitness of the current population; f min represents the minimum fitness of the current population; f max represents the maximum fitness of the current population; P m represents the adjusted mutation rate. The current population here can be understood as the current new population.

[0210] Suppose there is an initial setting: P m,max = 0..3, P m,min = 0.1, and the fitness information of the current population is as follows: f avg = 0.75; fmin = 0.5, f max = 1, these values are substituted into the mutation rate formula to calculate: P m = 0.3.

[0211] Therefore, the adjusted mutation rate P m = 0.3.

[0212] Based on the mutation rate, the new scheduling scheme individual can be subjected to a mutation operation.

[0213] In each iteration, first calculate the average fitness, minimum fitness and maximum fitness of the current population. Then dynamically adjust the mutation rate according to the above formula, so as to use the new mutation rate in the mutation operation. In this way, the genetic algorithm can dynamically adapt to the state of the current population, and improve the optimization effect.

[0214] In some embodiments of the present application, the two-element optimization local search operation can be performed on the new scheduling scheme individual by the following steps:

[0215] For each new scheduling scheme individual, transform the execution order of any two tasks in the current new scheduling scheme individual to obtain the transformed individual corresponding to the current new scheduling scheme individual.

[0216] If the fitness of the transformed individual corresponding to the current new scheduling scheme individual is higher than the fitness of the current new scheduling scheme individual, then in the current new scheduling scheme individual and the transformed individual corresponding to the current new scheduling scheme individual, the transformed individual corresponding to the current new scheduling scheme individual is selected to be retained.

[0217] For convenience of description, the above steps are combined for description.

[0218] In the embodiments of the present application, in each iteration optimization process of the target population, based on the fitness of each scheduling scheme individual in the target population, a roulette selection operation is performed, and for the selected scheduling scheme individual, a partial matching crossover operation is performed to generate a new scheduling scheme individual. For each new scheduling scheme individual, the execution order of any two tasks in the current new scheduling scheme individual can be transformed to obtain the transformed individual corresponding to the current new scheduling scheme individual. The current new scheduling scheme individual refers to the new scheduling scheme individual to which the current operation is directed. The transformed individual corresponding to the current new scheduling scheme individual can be one or more.

[0219] The fitness of each transformed individual corresponding to the current new scheduling scheme individual is determined, and the fitness of the current new scheduling scheme individual is determined; for each transformed individual corresponding to the current new scheduling scheme individual, if the fitness of the current transformed individual is higher than the fitness of the current new scheduling scheme individual, it is considered that the current transformed individual has higher completion efficiency, shorter inter-task travel distance or travel time, and the current transformed individual can be retained and the current new scheduling scheme individual is discarded.

[0220] This helps to obtain a better scheduling scheme individual.

[0221] In some embodiments of the present application, the method can further include the following steps:

[0222] In the case of an abnormal event of a worker or a task, the steps of obtaining the task information and the worker information are repeatedly performed.

[0223] In the embodiments of the present application, the working conditions of the workers and the progress of the tasks can be monitored in real time, so that abnormal events of the workers or the tasks can be found in time, such as a worker needs to pause work, a new task is added, or a task is cancelled. In the case of an abnormal event of a worker or a task, the task information and the worker information can be re-obtained, and the task scheduling can be performed based on the re-obtained task information and worker information, so as to ensure that a scheduling scheme can be regenerated when an abnormal event occurs, thereby dynamically optimizing the scheduling result and achieving efficient processing of complex scheduling requirements.

[0224] The technical scheme provided in the embodiments of the present application can be implemented by an intelligent scheduling system, as shown in Figure 2 The intelligent scheduling system includes an information acquisition unit, a constraint and target definition unit, a genetic algorithm scheduling engine, and a scheduling result and optimization feedback unit.

[0225] The information acquisition unit is configured to acquire task information and worker information.

[0226] The constraint and target definition unit includes a constraint subunit and a target definition subunit. The constraint conditions constructed in the constraint subunit include time constraints, work time limits, task priorities, and work area limits; and the target definition subunit defines a target function based on maximizing task completion efficiency, minimizing travel distance and time.

[0227] The genetic algorithm scheduling engine includes a fitness function unit, a coding and decoding unit, a local search unit, and a mutation operation unit. The fitness function unit is configured to construct a fitness function based on a target function; the coding and decoding unit is configured to encode worker identifiers, task identifiers, and execution sequences into chromosomes. Specifically, the worker-task allocation scheme can be encoded into chromosomes using integer coding, and the path planning can be encoded into chromosomes using floating-point coding. Then, a specific scheduling scheme is generated based on the information of the chromosomes. The 2-opt local search strategy is introduced in the local search unit to improve the quality of the solution by exchanging part of the task sequence in the chromosome. The mutation operation unit is configured to generate a better scheduling scheme by means of transformation mutation, reverse mutation, and insertion mutation.

[0228] The scheduling result and optimization feedback unit is configured to monitor the positions of the workers and the progress of the tasks in real time. When an abnormal event occurs, the feedback is fed back to the genetic algorithm scheduling engine to regenerate a scheduling scheme. Thus, the scheduling result is dynamically optimized, and the complex scheduling requirements are efficiently processed.

[0229] The following is an example of a possible implementation process of the genetic algorithm scheduling engine:

[0230] Task information:

[0231] T_001: broadband installation, location: A street, required start time: 10:00 AM, estimated working hours: 1.5 hours, task type: broadband installation;

[0232] T_002: broadband installation, location: B street, required start time: 1:00 PM, estimated working hours: 2 hours, task type: broadband fault;

[0233] T_003: door lock installation, location: A street, required start time: 11:00 AM, estimated working hours: 1 hour, task type: door lock installation.

[0234] Worker information:

[0235] W_001: skill: broadband installation, high, working area: A street, working time: 9:00 AM-12:00 PM, tasks to be completed: 0;

[0236] W_002: skill: broadband installation, medium, working area: A street, working time: 9:00 AM-12:00 PM, tasks to be completed: 1;

[0237] W_003: skill: door lock installation, high, working area: B street, working time: 10:00 AM-1:00 PM, tasks to be completed: 0.

[0238] W_004: Skill: Broadband installation, High, Work Area: B Street, Work Time: 10:00AM-1:00PM, Tasks to Complete: 1.

[0239] Initialize population: Randomly generate an initial population of different scheduling solutions. Each individual represents a combination of worker-task assignments and task execution order.

[0240] Each individual (i.e., scheduling solution) in the population consists of a set of genes, each gene representing a certain assignment of workers to tasks and execution order.

[0241] A gene can be a sequence representing the assignment of tasks. For example, an individual can be represented by the following structure: (W_001, T_001, 10:00AM), (W_003, T_003, 11:00AM), (W_004, T_002, 1:00PM);

[0242] Where each gene has 3 parts:

[0243] Worker (W_001, W_002, W_003, W_004);

[0244] Task (T_001, T_002, T_003);

[0245] Task start time (10:00AM, 1:00PM);

[0246] Each assignment of tasks to workers and the order of task execution is represented by a list, tuple, or array. For example, suppose a task list T = [T_001, T_002, T_003] and a worker list W = [W_001, W_002, W_003, W_004], a gene of an individual population can be as follows:

[0247] individual = [(W_001, T_001, 10:00AM), (W_003, T_003, 11:00AM), (W_004, T_002, 1:00PM)];

[0248] Each gene is actually a combination of a worker, a task, and a task start time, representing a scheduling arrangement.

[0249] Fitness function calculation: Calculate the fitness of each individual, measuring the pros and cons of the scheduling solution. For example, the fitness function includes task completion efficiency, travel distance, and travel time.

[0250] Selection operation: Use roulette wheel selection to select individuals with higher fitness, selecting those with high completion efficiency, short travel distance, or short travel time.

[0251] Crossover operation: Partial match crossover operation swaps the task execution order of two parent individuals to generate new offspring.

[0252] Crossover example: There are two parent individuals:

[0253] Parent A: [(W_001, T_001, 10:00AM), (W_003, T_002, 1:00PM)];

[0254] Parent B: [(W_003, T_003, 11:00AM), (W_001, T_002, 1:00PM)];

[0255] By swapping the task order, two offspring are generated:

[0256] Offspring A: [(W_001, T_001, 10:00AM), (W_001, T_002, 1:00PM)]

[0257] Offspring B: [(W_003, T_003, 11:00AM), (W_003, T_002, 1:00PM)]

[0258] The goal of crossover operation is to generate new individuals that may be better than the parent individuals.

[0259] Local search: Reduce the total distance or total time of a path by swapping the execution order of two tasks in a schedule; randomly select a pair of tasks, try to swap their execution order, check if it can improve the completion efficiency, reduce the travel distance or travel time. Compare the fitness before and after adjustment, if the fitness improves, accept the new adjustment, otherwise keep the original scheme. In the existing individual, if the travel distance between tasks is reduced after swapping the task order, accept this change.

[0260] Mutation operation: includes transformation mutation, reverse mutation and insertion mutation;

[0261] Among them, transformation mutation randomly selects a task and swaps its execution order or assigns it to a different worker;

[0262] Example: There is an individual (schedule) as follows:

[0263] [(W_001, T_001, 10:00AM), (W_003, T_003, 11:00AM), (W_004, T_002, 1:00PM)];

[0264] Randomly select two tasks and swap their execution order. Suppose T_001 and T_002 are swapped, and the mutated individual is obtained:

[0265] [(W_001,T_002,10:00AM),(W_003,T_003,11:00AM),(W_004,T_001,1:00PM)];

[0266] In this example, the task order of T_001 and T_002 is swapped.

[0267] Reverse mutation: Select a task sequence in a chromosome, and reverse the order of tasks in the sequence.

[0268] Example: There is an individual as follows:

[0269] [(W_001,T_001,10:00AM),(W_003,T_003,11:00AM),(W_004,T_002,1:00PM)];

[0270] Select the subsequence [T_003,T_002] and reverse its order. The mutated individual is obtained:

[0271] [(W_001,T_001,10:00AM),(W_004,T_002,1:00PM),,(W_003,T_003,11:00AM)].

[0272] In this example, the task order of T_003 and T_002 is reversed. Reverse mutation explores potential high-quality solutions by changing the execution order of tasks.

[0273] Insertion mutation: Randomly select a task and insert it into the position of another task.

[0274] Example: There is an individual as follows: [(W_001,T_001,10:00AM),(W_004,T_002,1:00PM)];

[0275] Suppose task T_003 is selected and inserted between T_001 and T_002, resulting in the mutated individual: [(W_001,T_001,10:00AM),(W_003,T_003,11:00AM),(W_004,T_002,1:00PM)].

[0276] In this example, T_003 is inserted between tasks T_001 and T_002, causing the task order to change.

[0277] Filter individuals based on constraints: All generated individuals must meet the time window of tasks, the working hours of workers, task priority, skill level, and regional restrictions. If an individual does not meet these constraints, the system will discard the scheme that does not meet the conditions.

[0278] Termination condition: when the optimal scheduling scheme is found, i.e., the scheme with the highest fitness, the algorithm ends and outputs the optimal scheduling scheme.

[0279] Task allocation:

[0280] T_001: broadband installation task, with a required start time of 10:00 AM. Since workers W_001 and W_002 are both working on A Street, and W_001 is available from 9:00 AM to 12:00 PM, W_001 is assigned to T_001 (start time 10:00 AM).

[0281] T_003: door lock installation task, with a required start time of 11:00 AM and a location on A Street. Since W_003 is a high-skilled worker for door lock installation and is available from 10:00 AM to 1:00 PM, W_003 is assigned to T_003 (start time 11:00 AM).

[0282] T_002: broadband installation task, with a required start time of 1:00 PM and a location on B Street. Since worker W_004 is in this area and is available from 10:00 AM to 1:00 PM, W_004 is assigned to T_002 (start time 1:00 PM).

[0283] Specifically, as shown in Table 1:

[0284] Table 1

[0285] Task ID Worker ID Task Type Start Time Estimated Hours Task Location T_001 W_001 Broadband Installation 10:00 AM 1.5 hours A Street T_003 W_003 Door Lock Installation 11:00 AM 1 hour A Street T_002 W_004 Broadband Installation 1:00 PM 2 hours B Street

[0286] The embodiments of the present application realize intelligent scheduling of tasks by introducing an improved genetic algorithm. By obtaining task information and worker information, and based on constraint conditions such as time constraints, work time limits, task priorities, and work area limits, as well as objective functions of maximizing task completion efficiency and minimizing travel distance and time, a fitness function is constructed. The artificial ID, task ID, and execution order are encoded into chromosomes using the encoding and decoding unit, and the quality of the solution is improved through the 2-opt local search strategy and various mutation operations. The real-time monitoring module provides a feedback mechanism to ensure that a scheduling scheme can be regenerated when an abnormal event occurs, thereby dynamically optimizing the scheduling result and achieving efficient processing of complex scheduling requirements.

[0287] Corresponding to the method embodiments above, the embodiments of the present application also provide a task scheduling device. The task scheduling device described below can be mutually referred to the task scheduling method described above.

[0288] Referring to Figure 3 As shown in the figure, the task scheduling device 300 includes:

[0289] The acquisition module 310 is configured to acquire task information and worker information.

[0290] The generation module 320 is configured to generate an initial population based on the task information and the worker information, the initial population including a plurality of scheduling scheme individuals, each individual being coded as a chromosome, and each chromosome including elements of worker identifiers, task identifiers, and task start times.

[0291] The optimization module 330 is configured to determine the initial population as a target population, and iteratively optimize the target population to obtain an optimized target population.

[0292] The scheduling module 340 is configured to select, from the optimized target population, a scheduling scheme individual with the highest fitness, to obtain a target scheduling scheme, and perform task scheduling based on the target scheduling scheme.

[0293] In each iteration of the optimization of the target population, the optimization module 330 is configured to:

[0294] perform a roulette wheel selection operation based on the fitness of each scheduling scheme individual in the target population;

[0295] perform a partial match crossover operation on the selected scheduling scheme individual to generate a new scheduling scheme individual;

[0296] perform at least one of a two-element optimization local search operation and a mutation operation on the new scheduling scheme individual;

[0297] select individuals that satisfy the constraint condition to obtain a new target population.

[0298] With the apparatus provided in the embodiments of the present application, after the task information and the worker information are acquired, an initial population is generated based on the task information and the worker information, the initial population including a plurality of scheduling scheme individuals, the initial population is determined as a target population, the target population is iteratively optimized to obtain an optimized target population, a scheduling scheme individual with the highest fitness is selected from the optimized target population to obtain a target scheduling scheme, and task scheduling is performed based on the target scheduling scheme. In each iteration of the optimization of the target population, a roulette wheel selection operation is performed based on the fitness of each scheduling scheme individual in the target population, a partial match crossover operation is performed on the selected scheduling scheme individual to generate a new scheduling scheme individual, at least one of a two-element optimization local search operation and a mutation operation is performed on the new scheduling scheme individual, and individuals that satisfy the constraint condition are selected to obtain a new target population. The optimal target scheduling scheme is obtained by improving the genetic algorithm without relying on artificial experience, which helps to improve the scheduling efficiency and the stability of the scheduling result.

[0299] In some embodiments of the present application, the constraint condition includes at least one of the following:

[0300] a start time of the task is not earlier than a time at which a worker assigned to the task is able to start the task;

[0301] a total duration of time for which the worker completes all tasks assigned to the worker is less than or equal to a maximum work time;

[0302] a high-priority task is assigned in priority;

[0303] a task assigned to the worker is in a same area as a work area of the worker;

[0304] a skill level of the worker satisfies a skill requirement of a task assigned to the worker.

[0305] In some embodiments of the present application, the fitness of each scheduling scheme individual is determined based on an objective function, a positive benefit indicator of the objective function including a task completion efficiency, and a negative cost indicator of the objective function including a total travel distance and a total travel time.

[0306] In some embodiments of the present application, the optimization module 330 is specifically configured to:

[0307] standardize the fitness of each scheduling scheme individual in the target population;

[0308] determine a selection probability of each scheduling scheme individual based on the dynamic adjustment factor and the standardized fitness of each scheduling scheme individual;

[0309] construct a roulette wheel based on the selection probability of each scheduling scheme individual;

[0310] select a scheduling scheme individual according to a random number and a cumulative selection probability of each scheduling scheme individual in the roulette wheel.

[0311] In some embodiments of the present application, the dynamic adjustment factor is determined based on a preset maximum dynamic adjustment factor, a preset minimum dynamic adjustment factor, a maximum iteration number, and a current iteration number.

[0312] In some embodiments of the present application, the optimization module 330 is specifically configured to:

[0313] determine fitness information of the target population according to the fitness of each scheduling scheme individual in the target population, the fitness information of the target population including an average fitness, a maximum fitness, and a minimum fitness of the target population;

[0314] determine a crossover rate based on the fitness information of the target population;

[0315] perform a partial match crossover operation on the selected scheduling scheme individual based on the crossover rate.

[0316] In some embodiments of the present application, the optimization module 330 is specifically configured to perform a mutation operation on the new scheduling scheme individual by the following steps:

[0317] According to the fitness of each new scheduling scheme individual, determine the fitness information of a new population composed of the new scheduling scheme individuals, the fitness information of the new population including the average fitness, the maximum fitness and the minimum fitness of the new population;

[0318] Based on the fitness information of the new population, determine a mutation rate;

[0319] Based on the mutation rate, perform a mutation operation on the new scheduling scheme individual.

[0320] In some embodiments of the present application, the mutation operation includes at least one of a transposition mutation operation, a reverse mutation operation and an insertion mutation operation;

[0321] The transposition mutation operation includes: for each new scheduling scheme individual, randomly exchanging the execution order of two tasks in the current new scheduling scheme individual or assigning to different workers;

[0322] The reverse mutation operation includes: for each new scheduling scheme individual, reversing the order of consecutive tasks in the current new scheduling scheme individual;

[0323] The insertion mutation operation includes: for each new scheduling scheme individual, randomly selecting a task in the current new scheduling scheme individual to insert into the position of another task.

[0324] In some embodiments of the present application, the optimization module 330 is specifically configured to perform a two-element optimization local search operation on the new scheduling scheme individual by the following steps:

[0325] For each new scheduling scheme individual, transposing the execution order of any two tasks in the current new scheduling scheme individual to obtain a transposed individual corresponding to the current new scheduling scheme individual;

[0326] If the fitness of the transposed individual corresponding to the current new scheduling scheme individual is higher than the fitness of the current new scheduling scheme individual, in the current new scheduling scheme individual and the transposed individual corresponding to the current new scheduling scheme individual, the transposed individual corresponding to the current new scheduling scheme individual is selected to be retained.

[0327] In some embodiments of the present application, further comprising a repeated execution module configured to:

[0328] In the case of an abnormal event of the worker or the task, repeat the steps of obtaining the task information and the worker information.

[0329] As to the apparatus in the above embodiments, the specific manners in which the respective modules perform operations have been described in detail in the embodiments of the method, and thus will not be described in detail here.

[0330] Corresponding to the above method embodiments, the embodiments of the present application further provide an electronic device, comprising:

[0331] a memory for storing a computer program;

[0332] a processor for implementing the steps of the above task scheduling method when executing the computer program.

[0333] As shown in the figure, it is a schematic diagram of the composition structure of the electronic device, which can include a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all complete communication with each other through the communication bus 13. Figure 4

[0334] In the embodiments of the present application, the processor 10 can be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.

[0335] The processor 10 can call the program stored in the memory 11, specifically, the processor 10 can execute the operations in the embodiments of the task scheduling method.

[0336] The memory 11 is used to store one or more programs, which can include program codes including computer operation instructions. In the embodiments of the present application, the memory 11 at least stores programs for implementing the following functions:

[0337] obtaining task information and worker information;

[0338] generating an initial population based on the task information and the worker information, the initial population including multiple scheduling scheme individuals, each individual being coded as a chromosome, and each chromosome element including a worker identifier, a task identifier and a task start time;

[0339] determining the initial population as a target population, and iteratively optimizing the target population to obtain an optimized target population;

[0340] selecting a scheduling scheme individual with the highest fitness from the optimized target population to obtain a target scheduling scheme, and performing task scheduling based on the target scheduling scheme;

[0341] In each iteration and optimization process of the target population:

[0342] ​Based on the fitness of each scheduling scheme individual in the target population, a roulette wheel selection operation is performed;

[0343] For the selected scheduling scheme individual, a partial match crossover operation is performed to generate a new scheduling scheme individual;

[0344] At least one of a two-element optimization local search operation and a mutation operation is performed on the new scheduling scheme individual;

[0345] Individuals satisfying the constraint condition are screened to obtain a new target population.

[0346] In a possible implementation, the memory 11 can include a program storage area and a data storage area, where the program storage area can store an operating system, and application programs required by at least one function, and the like; and the data storage area can store data created during use.

[0347] In addition, the memory 11 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device or other volatile solid-state storage device.

[0348] The communication interface 12 can be an interface of a communication module, configured to connect with other devices or systems.

[0349] Of course, it should be noted that, Figure 4 The structures shown do not constitute a limitation on the electronic device in the embodiments of the present application, and the electronic device can include more or fewer components than Figure 4 those shown, or combine certain components.

[0350] Corresponding to the above method embodiments, the embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the above task scheduling method.

[0351] In addition, it should be noted that: the embodiments of the present application also provide a computer program product or a computer program. The computer program product or the computer program can include computer instructions, which can be stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium. The processor can execute the computer instructions, so that the computer device executes the description of the task scheduling method in the foregoing embodiments. Therefore, here will not be described in detail. In addition, the beneficial effects of using the same method will not be described in detail. For technical details of the computer program product or the computer program embodiments involved in the present application, please refer to the description of the method embodiments of the present application.

[0352] Various embodiments are described herein with reference to a particular software embodiment. Alternative embodiments can be implemented using other types of software, firmware, or hardware, including a general purpose software program or the like. For example, individual functions of one or more embodiments can be performed by a general purpose computer or processor. Additionally, different parts of the software can be implemented by different computers or processors of a computer or processor.

[0353] It should be noted that, as used in this specification and the appended claims, the singular forms "a," "an," and "the" include plural referents unless the content clearly dictates otherwise. Thus, for example, reference to "a component" or "the component" can include a plurality of processes, and so forth. It should also be noted that the term "or" is used herein in a nonexclusive sense, such that, for example, "A or B" means "A, B, or both A and B." In addition, it should be noted that the terms "comprise / comprising" or "include / including" when used in this specification and more specifically, the claims, specify the presence of stated features, integers, steps, operations, elements, or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. Furthermore, to the extent that the terms "include", "have", "with", or other variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term "comprise / comprising" or "include / including."

[0354] Those skilled in the art can clearly understand the units and algorithm steps of each example described in combination with the embodiments disclosed in the present document can be realized by electronic hardware, computer software or combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0355] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in Random-Access Memory (RAM), flash memory, Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), registers, hard disk, a removable disk, a compact disc read-only memory (CD-ROM), or any other form of storage medium known in the art including a storage medium in a server or a computer cloud available via the Internet or extranet, including a series of instructions for causing a processor to execute a series of instructions. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, hard disk can be a part of the processor. A storage medium disk can also include any suitable media including a storage device readable by a processor.

[0356] The embodiments of the present application are described above with reference to the accompanying drawings, and the above description of the embodiments is only used to help understand the technical solutions of the present application and the core ideas thereof. It should be noted that the present application is not limited to the above specific embodiments, and the above specific embodiments are only illustrative, but not restrictive. For those skilled in the art, many forms of implementation can be made without departing from the scope of the present application, and the present application can be modified and improved in several ways, and these implementation, modification and improvement all belong to the protection scope of the present application.

Claims

1. A task scheduling method, characterized in that, include: Obtain task information and worker information; Based on the task information and the worker information, an initial population is generated. The initial population includes multiple scheduling scheme individuals. Each individual is encoded as a chromosome. The elements of each chromosome include worker identifier, task identifier, and task start time. The initial population is determined as the target population, and the target population is iteratively optimized to obtain the optimized target population; In the optimized target population, the individual with the highest fitness in the scheduling scheme is selected to obtain the target scheduling scheme, and task scheduling is performed based on the target scheduling scheme. In each iterative optimization process of the target population: Based on the fitness of each individual scheduling scheme in the target population, a roulette wheel selection operation is performed; For the selected individual scheduling schemes, perform partial matching and crossover operations to generate new individual scheduling schemes; Perform at least one of a two-element optimization local search operation and a mutation operation on the individual of the new scheduling scheme; Individuals that meet the constraints are selected to obtain a new target population.

2. The method according to claim 1, characterized in that, The constraints include at least one of the following: The start time of a task shall not be earlier than the time when the worker assigned to the task is able to begin the task; The total time it takes for a worker to complete all assigned tasks is less than or equal to the maximum working hours; High-priority tasks will be assigned first; The area where the task assigned to the worker is located is the same as the worker's work area; The worker's skill level meets the skill requirements of the task assigned to that worker.

3. The method according to claim 1, characterized in that, The fitness of each scheduling scheme is determined based on an objective function, where the positive benefit indicators of the objective function include task completion efficiency, and the negative cost indicators of the objective function include total travel distance and total travel time.

4. The method according to claim 1, characterized in that, The roulette wheel selection operation based on the fitness of each scheduling scheme individual in the target population includes: The fitness of each individual scheduling scheme in the target population is standardized. Based on the dynamic adjustment factor and the standardized fitness of each individual scheduling scheme, the selection probability of each individual scheduling scheme is determined. A roulette wheel is constructed based on the selection probability of each individual scheduling scheme. The selection of individual scheduling schemes is based on a random number and the cumulative selection probability of each individual scheduling scheme in the roulette wheel.

5. The method according to claim 4, characterized in that, The dynamic adjustment factor is determined based on the preset maximum value of the dynamic adjustment factor, the preset minimum value of the dynamic adjustment factor, the maximum number of iterations, and the current number of iterations.

6. The method according to claim 1, characterized in that, The partial matching and crossover operation on the selected scheduling scheme individuals includes: The fitness information of the target population is determined based on the fitness of each individual scheduling scheme in the target population. The fitness information of the target population includes the average fitness, maximum fitness, and minimum fitness of the target population. Based on the fitness information of the target population, the crossover rate is determined; Based on the crossover rate, a partial matching crossover operation is performed on the selected scheduling scheme individuals.

7. The method according to claim 1, characterized in that, The new scheduling scheme individuals are mutated using the following steps: Based on the fitness of each new scheduling scheme individual, the fitness information of the new population composed of the new scheduling scheme individuals is determined. The fitness information of the new population includes the average fitness, maximum fitness, and minimum fitness of the new population. Based on the fitness information of the new population, the mutation rate is determined; Based on the mutation rate, mutation operations are performed on the individuals of the new scheduling scheme.

8. The method according to claim 7, characterized in that, The mutation operation includes at least one of the transformation mutation operation, the inversion mutation operation, and the insertion mutation operation; The transformation and mutation operation includes: for each new scheduling scheme individual, randomly swapping the execution order of two tasks in the current new scheduling scheme individual or assigning them to different workers; The reverse mutation operation includes: for each new scheduling scheme individual, reversing the order of consecutive tasks in the current new scheduling scheme individual; The insertion mutation operation includes: for each new scheduling scheme individual, randomly selecting one task from the current new scheduling scheme individual and inserting it into the position of another task.

9. The method according to claim 1, characterized in that, The new scheduling scheme is subjected to a two-element optimized local search operation through the following steps: For each new scheduling scheme individual, the execution order of any two tasks in the current new scheduling scheme individual is changed to obtain the transformed individual corresponding to the current new scheduling scheme individual; If the fitness of the transformed individual corresponding to the current new scheduling scheme individual is higher than the fitness of the current new scheduling scheme individual, then the transformed individual corresponding to the current new scheduling scheme individual is selected to be retained from the current new scheduling scheme individual and the transformed individual corresponding to the current new scheduling scheme individual.

10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: In the event of an abnormal event involving a worker or task, repeat the steps of obtaining task information and worker information.

11. A task scheduling device, characterized in that, include: The acquisition module is used to acquire task information and worker information; The generation module is used to generate an initial population based on the task information and the worker information. The initial population includes multiple scheduling scheme individuals, each individual is encoded as a chromosome, and the elements of each chromosome include worker identifier, task identifier, and task start time. The optimization module is used to determine the initial population as the target population, and to perform iterative optimization on the target population to obtain the optimized target population. The scheduling module is used to select the individual with the highest fitness in the optimized target population to obtain the target scheduling scheme, and to perform task scheduling based on the target scheduling scheme. Specifically, the optimization module is used in each iterative optimization process of the target population: Based on the fitness of each individual scheduling scheme in the target population, a roulette wheel selection operation is performed; For the selected individual scheduling schemes, perform partial matching and crossover operations to generate new individual scheduling schemes; Perform at least one of a two-element optimization local search operation and a mutation operation on the individual of the new scheduling scheme; Individuals that meet the constraints are selected to obtain a new target population.

12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the task scheduling method as described in any one of claims 1 to 10 when executing the computer program.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the task scheduling method as described in any one of claims 1 to 10.

Citation Information

Cited By

  • Task scheduling scheme determination method, electronic equipment and storage medium

    CN122334899A