Bank multi-job scheduling optimization method, device and storage medium based on genetic algorithm
Patent Information
- Application Number
- CN202610648025.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-12
- Publication Date
- 2026-08-18
AI Technical Summary
传统人工排班或规则引擎主要依赖管理者主观判断,难以量化员工个体间的效率差异
[0042] The elite retention strategy ensures that the current optimal solution is not lost due to crossover or mutation operations, thus guaranteeing the convergence of the algorithm. Experience shows that genetic algorithms without elite retention may experience optimal solution degeneration, leading to slow convergence or even non-convergence. By retaining elites, the optimal fitness value remains non-decreasing in each generation, enabling the algorithm to stably approximate the optimal scheduling scheme within a finite number of iterations, improving the reliability of the output.
Smart Images

Figure CN122596473A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of financial technology and operations research optimization, and in particular relates to a method for optimizing the scheduling of multiple jobs in banks based on genetic algorithms, which integrates financial business scenarios with combinatorial optimization techniques in operations research. Background Technology
[0002] In bank branch operations, scheduling requires coordinating multiple roles such as tellers, account managers, and lobby staff to ensure that manpower allocation matches business needs at different times. However, existing scheduling methods have the following technical shortcomings:
[0003] (1) Reliance on experience and lack of efficiency quantification. Traditional manual scheduling or rule engines mainly rely on the subjective judgment of managers, making it difficult to quantify the efficiency differences between individual employees. For example, a skilled teller may be more than 30% faster than an ordinary teller in processing business, but traditional scheduling cannot effectively incorporate this difference into allocation decisions, resulting in highly skilled employees being idle or used for low-value positions.
[0004] (2) Ignoring the dynamic nature of labor costs. The salary levels, overtime rates and other cost factors of different employees are different. Existing methods usually do not consider cost factors when scheduling, which can easily lead to high-paid employees being assigned to inefficient time slots or low-value jobs, thus increasing overall labor expenditure.
[0005] (3) Unable to respond to fluctuations in business volume in real time. Customer traffic at bank branches shows obvious peaks and troughs in different time periods, but the static schedule lacks a flexible adjustment mechanism, often resulting in a shortage of staff during peak hours and a surplus of staff during off-peak hours, leading to a misallocation of human resources.
[0006] In the field of operations research and optimization, integer programming (IP) can be used for small-scale scheduling problems, but as the number of employees, time slices and job types increases, the combinatorial explosion problem becomes serious, making it difficult to apply. Heuristic algorithms (such as greedy algorithms) are computationally efficient, but they are prone to getting trapped in local optima and cannot obtain a globally satisfactory scheduling scheme.
[0007] In recent years, genetic algorithms have been attempted for scheduling optimization. For example, patent document CN116646068B discloses a nurse scheduling method based on demand selection, but it only addresses the shift work of a single job (nurse), does not involve multi-job collaboration scenarios, and does not achieve simultaneous optimization of both efficiency and cost objectives. Furthermore, the constraints unique to bank scheduling (such as dynamic customer flow, continuous working time limits, and job skill matching requirements) are not effectively handled in the aforementioned technologies.
[0008] In summary, existing technologies lack a multi-job scheduling method for banks that can quantify differences in employee efficiency, dynamically weigh labor costs, and adapt to fluctuations in business volume. Summary of the Invention
[0009] In view of the above-mentioned defects in the existing technology, the purpose of this invention is to provide a method, equipment and storage medium for optimizing multi-job scheduling in banks based on genetic algorithm. By improving the genetic algorithm framework, the invention achieves dual-objective collaborative optimization of efficiency and cost, and designs a job matching constraint coding mechanism to generate a globally optimal scheduling scheme.
[0010] This invention solves the above-mentioned technical problems through the following technical solution: a multi-job scheduling optimization method for banks based on genetic algorithms, comprising:
[0011] Step 1: Obtain basic data, which includes employee set, business demand matrix and standard business volume for each job. The employee set defines for each employee: the set of job skills that the employee can perform, the efficiency weight of the employee for different jobs, and the cost weight of the employee. The business demand matrix is used to represent the minimum number of people required for each job in each time slice.
[0012] Step 2: Based on the aforementioned basic data, a scheduling scheme is generated using a genetic algorithm, which specifically includes the following sub-steps:
[0013] S2.1 Population initialization: Generate multiple initial individuals, each individual using a coding method to represent a scheduling scheme. The coding method can determine the job assigned to each employee in each time slice, and during initialization, ensure that the job assigned to each employee belongs to its job skill set. The same employee can be assigned to at most one job in the same time slice.
[0014] S2.2 Fitness Calculation: For each individual, a fitness value is calculated based on the scheduling scheme it represents. The fitness value is a weighted sum of efficiency, cost and penalty terms.
[0015] The efficiency item is calculated based on the actual job type assigned to each employee, the efficiency weight, and the standard workload of each job type.
[0016] The cost item is calculated based on the actual job type and cost weight assigned to each employee.
[0017] The penalty items include at least: a penalty for unmet demand calculated based on the difference between the actual number of employees assigned to each job type in each time slice and the minimum number of employees corresponding to the business demand matrix, and a time penalty calculated based on the degree to which an employee's continuous working time exceeds the upper limit of continuous working time.
[0018] S2.3 Selection operation: Select parent individuals from the current population based on their fitness values;
[0019] S2.4 Crossover operation: Crossover is performed based on time slices. One or more consecutive time slice intervals are randomly selected, and the gene segments corresponding to all employees in the time slice intervals of two parent individuals are exchanged to generate offspring individuals; individuals that do not meet the skill matching constraints after crossover are corrected.
[0020] S2.5 Mutation Operation: Change the job assignment corresponding to at least one gene locus of an individual with a mutation probability, and the changed job belongs to the job skill set of the corresponding employee.
[0021] S2.6 Iteration and Output: Repeat sub-steps S2.2 to S2.5 until the preset termination condition is met, and output the scheduling scheme represented by the optimal individual.
[0022] This invention defines efficiency weights for each employee across different job types within the basic data and incorporates these weights into the efficiency term of the fitness function, taking into account the standard workload of each job type. This allows the genetic algorithm to prioritize the allocation of highly efficient employees to critical time slices and key job types during the evolutionary process. Thus, while meeting the staffing requirements for each job type, it achieves precise quantification and utilization of individual employee efficiency differences, significantly increasing the total workload per unit time compared to traditional manual scheduling or rule engine methods.
[0023] This invention defines a cost weight for each employee in the basic data and sets a cost item in the fitness function, which is then weighted and combined with an efficiency item and a penalty item. This allows the genetic algorithm to balance business efficiency and labor costs when generating scheduling plans. When high-cost employees are assigned to low-value positions or inefficient time slots, the cost item will lower its fitness value, thus guiding the algorithm to avoid such assignments. Therefore, while ensuring business processing efficiency, dynamic optimization of labor costs is achieved, reducing overall salary expenditures.
[0024] This invention uses a business demand matrix (representing the minimum number of workers required for each job type in each time slice) as input and sets a penalty for unmet demand in the fitness function (calculated based on the difference between the actual number of workers allocated and the required number). This allows the algorithm to prioritize meeting the staffing needs of each time period and job type during the evolution process. Simultaneously, the "time slice-based" design in the cross-operation allows the algorithm to independently adjust job allocation in different time periods, enhancing the adaptability of the scheduling scheme to peak and off-peak passenger flow. Therefore, the scheduling scheme can dynamically match the time distribution of business volume, significantly reducing the unmet demand rate and mitigating the mismatch of human resources caused by the coexistence of peak congestion and off-peak idleness.
[0025] This invention transforms the scheduling problem, which originally relied on human experience, into a quantifiable combinatorial optimization problem by using a dual-objective (efficiency and cost) weighted fitness function and a multi-constraint penalty mechanism (skill matching constraint, one person, one job constraint). The iterative search capability of the genetic algorithm ensures that the optimal solution that balances efficiency and cost is found in the solution space. Compared to existing integer programming (which cannot handle combinatorial explosion) or greedy algorithms (which are prone to getting trapped in local optima), this invention has stronger global optimization capabilities and practical deployment feasibility, and can flexibly adjust the weight coefficients according to the business scenario to obtain a satisfactory scheduling solution.
[0026] Furthermore, the efficiency weight is obtained by quantifying the employee's historical business processing speed. The higher the efficiency weight value, the higher the relative business processing efficiency of the employee for the corresponding job.
[0027] The above-mentioned method of obtaining efficiency weights ensures that efficiency weights have an objective and traceable data source, avoiding bias caused by subjective assignment. At the same time, by directly mapping efficiency weights to historical business processing speeds, the actual differences in employees' work abilities can be accurately reflected (for example, the efficiency weight of skilled tellers is set to 0.9, and that of ordinary tellers is set to 0.6). This allows for precise guidance of high-efficiency employees to key positions in the fitness calculation of the genetic algorithm, further improving the optimization effect of business processing volume.
[0028] Furthermore, the formula for calculating the fitness value is as follows:
[0029] ;
[0030] in, This is the fitness value; , and These are efficiency weight, cost weight, and penalty weight, respectively, and all are positive numbers; , and These represent efficiency, cost, and penalty items, respectively.
[0031] The above fitness value calculation formula clarifies the mathematical combination relationship between efficiency, cost, and penalty terms, transforming the optimization objective of the genetic algorithm from a fuzzy "better solution" to a precisely calculable numerical maximization problem. This is achieved by adjusting the weight coefficients ( , and The scheduling system can flexibly adapt to different business scenarios (such as increasing the number of passengers during peak hours). With an emphasis on efficiency, the cost control period has increased. (To reduce expenditures), the algorithm has achieved a rapid response capability to different management objectives.
[0032] Furthermore, the specific calculation method for the penalty for unmet demand is as follows: for each time slice and each job type, if the actual number of people allocated is less than the minimum number of people corresponding to the business demand matrix, then the penalty value is accumulated according to the shortfall.
[0033] The specific calculation method for the duration penalty is as follows: for each employee, if their continuous working time exceeds the upper limit of continuous working time, the penalty value is accumulated based on the excess time.
[0034] The specific calculation methods for the aforementioned unmet requirements penalties and time-related penalties transform the abstract concept of "violation of constraints" into quantifiable penalty values, enabling the genetic algorithm to provide clear negative evaluations of solutions involving staff shortages or excessive working hours. The vacancy accumulation mechanism ensures that the algorithm prioritizes filling the most in-demand positions, while the overtime accumulation mechanism effectively prevents employee fatigue, thus achieving a balance between meeting business needs and complying with labor regulations.
[0035] Furthermore, individuals that do not meet the skill matching constraints after crossover are corrected by randomly replacing the job number in the crossover gene locus with a valid job number in the corresponding employee's job skill set, or replacing it with a preset value indicating no scheduling.
[0036] The aforementioned correction method not only ensures the feasibility of individuals after crossover operations (avoiding the generation of illegal scheduling schemes), but also preserves population diversity through random replacement, making it more efficient than directly deleting illegal individuals or imposing mandatory penalties. Furthermore, providing the option to "replace with unscheduled" allows the algorithm to generate valid solutions even in extreme cases where skill matching cannot be satisfied, enhancing the algorithm's robustness.
[0037] Furthermore, the mutation probability employs an adaptive adjustment strategy:
[0038] ;
[0039] in, This is the adjusted mutation probability; The base mutation probability; k is the adjustment coefficient; The maximum number of iterations; Let be the current iteration algebra.
[0040] The aforementioned adaptive adjustment strategy maintains a high mutation probability in the early stages of the algorithm's search, which is beneficial for extensively exploring the solution space and avoiding getting trapped in local optima. Reducing the mutation probability in the later stages of the algorithm helps to finely optimize the found optimal solutions and accelerate convergence. Compared to a fixed mutation probability, this strategy balances the "exploration" and "development" capabilities of the genetic algorithm, increasing the likelihood of finding the global optimum while reducing unnecessary computational overhead.
[0041] Furthermore, the genetic algorithm also employs an elite retention strategy, where a certain percentage of individuals with the highest fitness values in each generation are directly retained for the next generation.
[0042] The elite retention strategy ensures that the current optimal solution is not lost due to crossover or mutation operations, thus guaranteeing the convergence of the algorithm. Experience shows that genetic algorithms without elite retention may experience optimal solution degeneration, leading to slow convergence or even non-convergence. By retaining elites, the optimal fitness value remains non-decreasing in each generation, enabling the algorithm to stably approximate the optimal scheduling scheme within a finite number of iterations, improving the reliability of the output.
[0043] Furthermore, the encoding method is a two-dimensional integer encoding, where rows correspond to employees, columns correspond to time slices, and the value of each gene bit is the job number assigned to the corresponding employee in the corresponding time slice. The preset value of 0 indicates that no shift has been scheduled.
[0044] Alternatively, the encoding method is a three-dimensional integer encoding, where the three dimensions correspond to employees, time slices, and job types, respectively. Each gene bit has a value of 0 or 1. A value of 1 indicates that the corresponding employee is assigned to the corresponding job type in the corresponding time slice, and a value of 0 indicates that the employee is not assigned. Each employee has at most one gene bit with a value of 1 for each job type in each time slice.
[0045] This invention provides two optional encoding methods: two-dimensional integer encoding (rows to employees, columns to time slices, and gene values to job type numbers) or three-dimensional integer encoding (three dimensions corresponding to employees, time slices, and job types respectively, with gene values as 0 / 1 allocation flags). This allows the invention to flexibly choose the encoding method according to the actual application scenario: two-dimensional encoding occupies less storage space and has a faster decoding speed, suitable for scenarios with a large number of employees or coarse-grained time slices; three-dimensional encoding has strong expressive power and intuitive hard constraint checks, suitable for scenarios with a large number of job types or requiring fine-grained expression of the allocation of each job type. Both encoding methods facilitate flexible deployment under different bank branch sizes and data characteristics.
[0046] Based on the same concept, the present invention also provides an electronic device, including a memory, a processor, and a computer program or instructions stored in the memory, wherein the processor executes the computer program or instructions to implement the bank multi-job scheduling optimization method as described above.
[0047] Based on the same concept, the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implements the bank multi-job scheduling optimization method as described above. Attached Figure Description
[0048] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only one embodiment of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart of the bank multi-job scheduling optimization method in an embodiment of the present invention;
[0050] Figure 2 This is an example diagram of the three-dimensional encoding method in an embodiment of the present invention. Detailed Implementation
[0051] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0053] Example 1
[0054] Taking a bank branch as an example, this branch has 20 employees, covering 3 job types: teller (No. 1), customer manager (No. 2), and lobby guide (No. 3). Time slots are divided into several consecutive 30-minute units, for example, 09:00-09:30 is the first time slot t1, 09:30-10:00 is the second time slot t2, and so on.
[0055] Reference Figure 1 The multi-job scheduling optimization method for banks based on genetic algorithms provided by this invention includes the following steps:
[0056] Step 1: Obtain basic data. Basic data includes the employee set, business demand matrix, standard workload for each job type, and preset maximum continuous working hours.
[0057] Employee set: For each employee, the definition is:
[0058] Job skills set: One or more jobs that the employee is capable of performing. For example, employee A's skills set is {1,3} (can work as a teller and lobby guide), and employee B's skills set is {1,2,3} (can work as a teller, account manager, and lobby guide).
[0059] Efficiency weight The value ranges from 0 to 1, representing the employee's relative business processing efficiency across different job types. This weight is obtained by analyzing the employee's historical business processing speed. For example, teller A's historical business processing speed is 30 transactions / hour, and the branch's average processing speed is 25 transactions / hour, so the normalized efficiency weight is 0.9; teller B's processing speed is 20 transactions / hour, so the weight is 0.6.
[0060] Cost weight This refers to the employee's hourly wage, for example, teller A earns 80 yuan per hour, and teller B earns 60 yuan per hour.
[0061] Business requirement matrix D{t,s}: The minimum number of personnel required for each job type in each time slot. For example, during the peak period of 10:00-11:30 (corresponding to time slots t3, t4, and t5, each time slot is 30 minutes), the requirements are: 8 tellers, 4 account managers, and 2 lobby guides. This requirement applies to all three time slots t3, t4, and t5, meaning that this number of personnel must be met in each time slot.
[0062] Standard workload W for each job type s This is used to quantify the business output per unit of time for each job type. For example, the standard business volume for a teller is set at 30 transactions / 30 minutes, the standard business volume for an account manager is 10 customer inquiries / 30 minutes, and the standard business volume for a lobby guide is 20 guidance sessions / 30 minutes.
[0063] Maximum continuous working time T max This is used to limit the maximum duration of a single continuous work session for an employee. For example, according to relevant laws or internal branch regulations, a maximum of 4 hours of continuous work may be set (i.e., 8 time slots, each 30 minutes).
[0064] Step 2: Based on the basic data, use a genetic algorithm to generate a shift schedule.
[0065] S2.1 Population initialization.
[0066] A genetic algorithm is used for shift scheduling optimization. First, the population is initialized: 100 individuals are randomly generated (i.e., 100 possible shift schedules). Each individual uses a unique encoding method to represent the shift schedule. This implementation uses a three-dimensional integer encoding, with the three dimensions corresponding to employees, time slices, and job types, respectively. Specifically, the total number of employees is 20, the total number of time slices is 20 (each time slice is 30 minutes), and the total number of job types is 3. Each individual can then be represented as a three-dimensional matrix, where each gene bit has a value of 0 or 1: a value of 1 indicates that the corresponding employee is assigned to the corresponding job in the corresponding time slice, and a value of 0 indicates that they are not assigned. Simultaneously, a hard constraint must be satisfied: each employee can have at most one job type with a gene bit value of 1 in each time slice (i.e., the same employee can only perform one job type or not be scheduled in the same time slice). During initialization, for each employee in each time slice, one job type is randomly selected from their job skill set (or they choose not to be scheduled), and the corresponding gene bit is set to 1, while the gene bits for other job types are set to 0; if they choose not to be scheduled, then all job type gene bits are 0. During initialization, it is ensured that:
[0067] Each employee's assigned job number must belong to that employee's job skill set;
[0068] The same employee can be assigned to at most one job type in the same time slice (that is, in each time slice, the same employee's row has only one non-zero value or all zeros).
[0069] As an example, suppose employee A's skill set is {teller, lobby guide}, and the time slice is t3 (10:00-10:30). If this employee is assigned to teller, then in time slice t3, the gene locus corresponding to teller is 1, while the gene locus corresponding to customer manager and lobby guide is 0. The visualization of the 3D encoding method is as follows... Figure 2 As shown, this three-dimensional encoding method intuitively expresses the allocation of each employee to various job types in each time slice, and the hard constraint check is simple (it only needs to check that the number of 1s under each employee × time slice does not exceed 1).
[0070] As an alternative, two-dimensional integer encoding (row employees, column time slices, and gene values for job type numbers) can also be used, but three-dimensional encoding is clearer in terms of expressive power, especially suitable for scenarios with a large number of job types or where one person is required to be assigned to one job.
[0071] S2.2 Fitness calculation.
[0072] For each individual, a fitness value is calculated based on the scheduling scheme they represent. The fitness value is a weighted sum of efficiency, cost, and penalty terms. In this implementation, the following formula is used:
[0073] (1)
[0074] in, This is the fitness value; , and These are efficiency weight, cost weight, and penalty weight, respectively, and all are positive numbers; , and These represent efficiency, cost, and penalty items, respectively. In this embodiment, , and The values are 0.5, 0.3, and 0.2 respectively, and the specific values of each weight can be dynamically adjusted according to the business scenario, such as increasing the weight during peak hours. This is to make the algorithm more focused on efficiency.
[0075] Efficiency Item The calculation is based on the actual job type, efficiency weight, and standard workload of each employee in each time slot. The specific formula is as follows:
[0076] (2)
[0077] Where m is the total number of employees (m=20 in this embodiment); T is the total number of time slices (each time slice is 30 minutes, T=20 in this embodiment); and S is the total number of job types (S=3 in this embodiment). This represents the gene value in a three-dimensional integer encoding, taking the value 0 or 1. This indicates that employee e is assigned to job s during time slice t. This indicates that no job is assigned; each employee has at most one job type per time slot. ; The efficiency weight of employee e relative to job type s, with a value range of (0,1], is obtained by quantifying historical business processing speed. The larger the value, the higher the efficiency. The standard business volume for job type s is the baseline business output of that job type within a unit of time (a time slice) (for example, the standard business volume for a teller is 30 transactions / 30 minutes).
[0078] Cost items The formula is calculated based on the actual job assignments and cost weights of each employee.
[0079] (3)
[0080] in, Let employee e be the cost weight, which is the employee's hourly wage (in this embodiment, it is calculated based on the wage per time slice, where each time slice is 30 minutes; therefore, if the hourly wage is...). ,but .
[0081] The penalty items include at least: a demand unmet penalty calculated based on the difference between the actual number of employees assigned to each job type in each time slice and the minimum number of employees corresponding to the business demand matrix; and a duration penalty calculated based on the degree to which an employee's continuous working hours exceed the upper limit of continuous working hours. The penalty item equals the sum of the demand unmet penalty and the duration penalty. for:
[0082] (4)
[0083] in, The minimum number of workers required for job type s in time slice t in the business requirements matrix; The number of employees actually assigned to job type s within time slice t. .
[0084] The penalty for unmet demand measures the personnel shortage for each job type at each time period; the larger the shortage, the greater the penalty.
[0085] Duration penalty for:
[0086] (5)
[0087] in, Let be the maximum continuous working time of employee e (in units of time slices). Continuous working time is defined as: within multiple consecutive time slices, the employee is assigned at least one job type (i.e., there exists a s such that...). If the number of these consecutive time slices is zero, then the duration of a continuous working segment is equal to the number of consecutive time slices. The maximum value among all consecutive segments is taken as the longest continuous working segment. .
[0088] The duration penalty is triggered only when an employee's maximum continuous working time exceeds the limit; the more time slices exceeded, the greater the penalty.
[0089] S2.3, Selection Operation.
[0090] Parent individuals are selected from the current population based on their fitness values. This implementation uses a tournament selection method: each time, five individuals are randomly selected from the population, their fitness values are compared, and the individual with the highest fitness value is selected as one of the parents. This process is repeated until a sufficient number of parent individuals are selected. Tournament selection can prioritize the retention of efficient and low-cost individuals while maintaining population diversity.
[0091] S2.4, Cross Operation.
[0092] Crossover is performed based on time slices. The specific steps are as follows:
[0093] Randomly select a continuous time slice interval, for example, from the 3rd time slice to the 5th time slice (i.e., 10:00-11:30, including t3, t4, and t5).
[0094] For two parent individuals (each individual is a three-dimensional matrix) They swap the gene segments corresponding to all employees and all job types within that time slice interval. That is, for each time slice t∈[3,5], for each employee e and each job type s, they swap the gene segments of parent generation A and parent generation B. Values.
[0095] The swap generates two offspring individuals. Because the swap may result in some employees being assigned multiple jobs within the same time slice (i.e.,...) >1), which violates the hard constraints, therefore correction is required.
[0096] Correction method: For each employee e and each time slice t, count the number of currently assigned jobs. If it is greater than 1, randomly select one job to retain (set its corresponding gene bit to 1), and clear the gene bits of the remaining jobs to zero; if it is equal to 0 (i.e., no job has been assigned), you can choose to keep all 0s or randomly assign a job from the employee's skill set. Simultaneously, it is necessary to check whether the assigned job belongs to the employee's job skill set—since the exchange comes from two legitimate parents, and the parents already satisfy the skill constraints, any illegal jobs that may appear after the exchange will only occur if the same employee in the same time slice has all 1s in different jobs. The above "randomly retain one" ensures that the retained job belongs to the skill set (because the 1s in the parents all come from legitimate assignments). To be more explicit, the random retention can be restricted to selecting only jobs from the job skill set.
[0097] Example: Suppose employee A's skill set is {1,3} (teller, lobby guide), and time slice t3 occurs after crossover. =1 and =1 (job type 2 is illegal and conflicting), then during the correction, job type 1 will be randomly selected to be retained and job type 2 will be cleared; or all jobs will be cleared (unscheduled).
[0098] S2.5, Mutation operation.
[0099] The job assignment of an individual at least once in a time slice is changed using a mutation probability, and the changed job must belong to the corresponding employee's job skill set. In this implementation, each employee e and each time slice t is iterated to adaptively adjust the mutation probability. Determine whether to mutate the employee's allocation for that time slice. If determined to mutate, perform the following actions:
[0100] Clear all job positions for employee e in time slice t, that is, for all job positions s, let ;
[0101] Randomly select a job skill s′ from the employee's skill set (or select "not scheduled"). If "not scheduled" is selected, keep all values 0; if job skill s′ is selected, then let... .
[0102] The mutation probability adopts an adaptive adjustment strategy:
[0103] (6)
[0104] in, This is the adjusted mutation probability; The base mutation probability is 0.05 in this implementation; k is the adjustment coefficient (0.0005 in this implementation). The maximum number of iterations (500 in this implementation); Let be the current iteration number. In the early stages of the algorithm (when gen is small), the mutation probability is relatively high (approximately 0.05 + 0.0005 × 500 = 0.3), which is beneficial for extensive exploration of the solution space; in the later stages of the algorithm, the mutation probability gradually decreases to around 0.05, which is beneficial for fine-tuning.
[0105] S2.6 Iteration and Output.
[0106] Repeat sub-steps S2.2 to S2.5, with each iteration being called a generation. In this embodiment, the preset termination condition is that the number of iterations reaches 500 generations. Simultaneously, an elite retention strategy is adopted in each generation: the top 20% of individuals in the current population with the highest fitness values are directly copied to the next generation without participating in crossover or mutation, ensuring that the optimal solution is not lost.
[0107] After 500 iterations, the scheduling scheme represented by the individual with the highest fitness value is output as the optimal scheduling scheme under this weight configuration. In practical applications, if administrators need to weigh different efficiency-cost preferences, they can run the method of this invention multiple times by adjusting the weight coefficients (α, β, γ) in the fitness function to obtain multiple optimal schemes under different preferences, and then select the scheduling scheme that best meets the current business needs. For example, α can be increased during peak passenger flow periods to emphasize efficiency, while β can be increased during cost control periods to emphasize cost.
[0108] Following the above implementation method, a test was conducted at a branch with 20 employees across 3 job types. During peak hours (10:00-11:30), the required staff consisted of 8 tellers, 4 account managers, and 2 lobby guides. The algorithm-generated scheduling plan showed that during peak hours, 8 tellers, 4 account managers, and 2 lobby guides were actually allocated, achieving a 100% demand fulfillment rate. Simultaneously, highly efficient tellers (efficiency weight 0.9) were prioritized for the cash window, and high-cost account managers (high cost weight) were assigned to serve high-net-worth clients. Overall, the business volume increased by approximately 15% compared to traditional manual scheduling, while labor costs decreased by approximately 8%.
[0109] Example 2
[0110] This invention also provides an electronic device, which includes a memory, a processor, and a computer program or instructions stored in the memory. The processor executes the computer program or instructions to implement the bank multi-job scheduling optimization method in this invention.
[0111] Although not shown, the electronic device includes a processor that can perform various appropriate operations and processes based on programs and / or data stored in read-only memory (ROM) or loaded from a storage portion into random access memory (RAM). The processor can be a multi-core processor or may contain multiple processors. In some embodiments, the processor may include a general-purpose main processor and one or more specialized coprocessors, such as a central processing unit, graphics processing unit (GPU), neural network processor (NPU), digital signal processor (DSP), etc. Various programs and data required for device operation are also stored in RAM. The processor, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0112] The processor and memory described above are used together to execute programs / instructions stored in the memory. When the program / instructions are executed by the computer, they can implement the methods, steps, or functions described in the above embodiments.
[0113] Although not shown, embodiments of the present invention also provide a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implements the bank multi-job scheduling optimization method of the present invention.
[0114] Readable storage media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0115] The above description only discloses specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or modifications that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for optimizing multi-job scheduling in banks based on genetic algorithms, characterized in that, The method includes: Step 1: Obtain basic data, which includes employee set, business demand matrix and standard business volume for each job. The employee set defines for each employee: the set of job skills that the employee can perform, the efficiency weight of the employee for different jobs, and the cost weight of the employee. The business demand matrix is used to represent the minimum number of people required for each job in each time slice. Step 2: Based on the aforementioned basic data, a scheduling scheme is generated using a genetic algorithm, which specifically includes the following sub-steps: S2.1 Population initialization: Generate multiple initial individuals, each individual using a coding method to represent a scheduling scheme. The coding method can determine the job assigned to each employee in each time slice, and during initialization, ensure that the job assigned to each employee belongs to its job skill set. The same employee can be assigned to at most one job in the same time slice. S2.2 Fitness Calculation: For each individual, a fitness value is calculated based on the scheduling scheme it represents. The fitness value is a weighted sum of efficiency, cost and penalty terms. The efficiency item is calculated based on the actual job type assigned to each employee, the efficiency weight, and the standard workload of each job type. The cost item is calculated based on the actual job type and cost weight assigned to each employee. The penalty items include at least: a penalty for unmet demand calculated based on the difference between the actual number of employees assigned to each job type in each time slice and the minimum number of employees corresponding to the business demand matrix, and a time penalty calculated based on the degree to which an employee's continuous working time exceeds the upper limit of continuous working time. S2.3 Selection operation: Select parent individuals from the current population based on their fitness values; S2.4 Crossover operation: Crossover is performed based on time slices. One or more consecutive time slice intervals are randomly selected, and the gene segments corresponding to all employees in the time slice intervals of two parent individuals are exchanged to generate offspring individuals; individuals that do not meet the skill matching constraints after crossover are corrected. S2.5 Mutation Operation: Change the job assignment corresponding to at least one gene locus of an individual with a mutation probability, and the changed job belongs to the job skill set of the corresponding employee. S2.6 Iteration and Output: Repeat sub-steps S2.2 to S2.5 until the preset termination condition is met, and output the scheduling scheme represented by the optimal individual.
2. The bank multi-job scheduling optimization method according to claim 1, characterized in that, The efficiency weight is quantified by the employee's historical business processing speed. The higher the efficiency weight value, the higher the relative business processing efficiency of the employee for the corresponding job.
3. The bank multi-job scheduling optimization method according to claim 1, characterized in that, The formula for calculating the fitness value is: ; in, This is the fitness value; , and These are efficiency weight, cost weight, and penalty weight, respectively, and all are positive numbers; , and These represent efficiency, cost, and penalty items, respectively.
4. The bank multi-job scheduling optimization method according to claim 1, characterized in that, The specific calculation method for the penalty for unmet demand is as follows: for each time slice and each job type, if the actual number of people allocated is less than the minimum number of people corresponding to the business demand matrix, then the penalty value is accumulated based on the shortfall. The specific calculation method for the duration penalty is as follows: for each employee, if their continuous working time exceeds the upper limit of continuous working time, the penalty value is accumulated based on the excess time.
5. The bank multi-job scheduling optimization method according to claim 1, characterized in that, For individuals that do not meet the skill matching constraints after crossover, corrections are made. Specifically, the job number in the crossover gene locus is randomly replaced with a valid job number in the corresponding employee's job skill set, or replaced with a preset value indicating no scheduling.
6. The bank multi-job scheduling optimization method according to claim 1, characterized in that, The mutation probability adopts an adaptive adjustment strategy: ; in, This is the adjusted mutation probability; The base mutation probability; k is the adjustment coefficient; The maximum number of iterations; Let be the current iteration algebra.
7. The bank multi-job scheduling optimization method according to claim 1, characterized in that, The genetic algorithm also employs an elite retention strategy, where a certain percentage of individuals with the highest fitness values in each generation are directly retained for the next generation.
8. The bank multi-job scheduling optimization method according to claim 1, characterized in that, The encoding method is a two-dimensional integer encoding, where rows correspond to employees, columns correspond to time slices, and the value of each gene bit is the job number assigned to the corresponding employee in the corresponding time slice. The preset value of 0 indicates that no shift has been scheduled. Alternatively, the encoding method is a three-dimensional integer encoding, where the three dimensions correspond to employees, time slices, and job types, respectively. Each gene bit has a value of 0 or 1. A value of 1 indicates that the corresponding employee is assigned to the corresponding job type in the corresponding time slice, and a value of 0 indicates that the employee is not assigned. Each employee has at most one gene bit with a value of 1 for each job type in each time slice.
9. An electronic device comprising a memory, a processor, and a computer program or instructions stored in the memory, characterized in that, The processor executes the computer program or instructions to implement the bank multi-job scheduling optimization method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by the processor, they implement the bank multi-job scheduling optimization method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
A method of nurse scheduling based on demand selection
CN116646068B