Job scheduling method, device and electronic equipment

By dynamically calculating and adjusting the number of jobs that can be accommodated in the job group, the problem of low job scheduling efficiency under limited resources is solved, and efficient resource utilization and performance improvement on the equipment is achieved.

CN113821315BActive Publication Date: 2024-12-06INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110549934.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-20
Publication Date
2024-12-06
Estimated Expiration
2041-05-20

AI Technical Summary

Technical Problem

In the case of limited resources, it is difficult for the prior art to effectively schedule jobs, resulting in excessive equipment load, performance problems and low job operation efficiency.

Method used

By determining the objective function and constraints, the number of jobs that can be accommodated by the job group is dynamically calculated, and the number of jobs that can be accommodated by the job group is adjusted during the update cycle using a simulated annealing algorithm to optimize job scheduling.

Benefits of technology

It improves the operation efficiency of the job, makes full use of equipment resources, and avoids performance problems caused by excessive equipment load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821315B_ABST
    Figure CN113821315B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a method, device and electronic device for scheduling jobs. The method includes: determining an objective function and a constraint condition, wherein the objective function is used to evaluate the time utilization of multiple job groups, the time utilization rate is used to represent the usage of the job groups within an update cycle, and the constraint condition is used to constrain the value range of the number of jobs that can be accommodated by each job group and the sum of the number of jobs that can be accommodated by each job group; when the update cycle arrives, the number of jobs that can be accommodated by each job group is set using the objective function and the constraint condition; and according to the number of jobs that can be accommodated, the jobs to be run are scheduled to the job groups. The embodiments of this specification can improve the operation efficiency of jobs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a job scheduling method, device and electronic device. Background Art

[0002] In some business scenarios, there will be a lot of homework.

[0003] These jobs need to be scheduled reasonably to improve their operating efficiency under limited resources. Summary of the invention

[0004] The embodiments of this specification provide a job scheduling method, device and electronic device to improve the operation efficiency of jobs.

[0005] A first aspect of an embodiment of this specification provides a job scheduling method, including:

[0006] Determine an objective function and a constraint condition, wherein the objective function is used to evaluate the time utilization of multiple operation groups, the time utilization is used to represent the usage of the operation groups within an update cycle, and the constraint condition is used to constrain the value range of the number of operations that can be accommodated by each operation group and the sum of the number of operations that can be accommodated by each operation group;

[0007] When the update cycle arrives, the number of jobs that can be accommodated by each job group is set using the objective function and constraints;

[0008] Schedule the jobs to be run to the job group based on the number of jobs that can be accommodated.

[0009] A second aspect of the embodiments of this specification provides a job scheduling device, including:

[0010] A determination unit, used to determine an objective function and a constraint condition, wherein the objective function is used to evaluate the time utilization of multiple operation groups, the time utilization is used to represent the usage of the operation groups within an update cycle, and the constraint condition is used to constrain the value range of the number of operations that can be accommodated by each operation group and the sum of the number of operations that can be accommodated by each operation group;

[0011] A calculation unit, used for setting the number of jobs that can be accommodated by each job group by using the objective function and the constraint conditions when the update cycle arrives;

[0012] The scheduling unit is used to schedule the jobs to be run into the job group according to the number of jobs that can be accommodated.

[0013] According to a third aspect of the embodiments of this specification, an electronic device is provided, including:

[0014] at least one processor;

[0015] A memory storing program instructions, wherein the program instructions are configured to be suitable for being executed by the at least one processor, and the program instructions include instructions for executing the method as described in the first aspect.

[0016] The technical solution provided by the embodiments of this specification can dynamically calculate the number of jobs that can be accommodated by a job group, thereby improving the operating efficiency of jobs when resources are limited. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0018] Figure 1 A schematic diagram of a process flow of a job scheduling method in an embodiment of this specification;

[0019] Figure 2 A schematic diagram of a calculation process for the number of jobs that can be accommodated in an embodiment of this specification;

[0020] Figure 3 This is a schematic diagram of the structure of the job scheduling device in the embodiment of this specification;

[0021] Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of this specification. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0023] A job is the smallest unit of a task. Usually, a task can be decomposed into several computing units, each of which can be called a job. In the related art, multiple job groups can be set, and different job groups correspond to different job types. Each job group can accommodate one or more jobs. Jobs in different job groups can run in parallel, and different jobs in the same job group can also run in parallel. Considering that the resources of the device (such as memory, CPU, etc.) are limited, if the number of jobs running in parallel is too large, the load of the device will be too large, thereby causing performance problems. For this reason, a number of jobs that can be accommodated can be set for each job group. The number of jobs actually accommodated in each job group is less than or equal to the number of jobs that can be accommodated in the job group. The number of jobs that can be accommodated in different job groups can be the same or different. In practice, when a job needs to run, the number of jobs actually accommodated in the target job group can be obtained, and it can be determined whether the number of jobs actually accommodated is less than the number of jobs that can be accommodated in the target job group. If so, the job can be assigned to the target job group. Among them, the target job group can be a job group corresponding to the job type of the job.

[0024] In the above-mentioned related technologies, the number of jobs changes dynamically, but the number of jobs that can be accommodated by the job group is fixed, so that the resources of the equipment cannot be fully utilized, resulting in low operation efficiency of the jobs.

[0025] For example, job group A corresponds to job type A, and job group B corresponds to job type B. The number of jobs corresponding to job type A may be small, and the number of jobs actually accommodated in job group A is less than the number of jobs that can be accommodated in job group A, so that job group A is not fully used. However, the number of jobs corresponding to job type B may be large, and the setting of the number of jobs that can be accommodated makes it impossible for job group B to accommodate more jobs.

[0026] The embodiment of this specification provides a method for scheduling a job. The method can dynamically adjust the number of jobs that can be accommodated by a job group, thereby improving the running efficiency of the job. The method can be executed by an electronic device, and the electronic device can include a job scheduling server, etc. Figure 1 , the job scheduling method may include the following steps.

[0027] Step S11: Determine the objective function and constraints.

[0028] In some embodiments, multiple job groups may be pre-set. Each job group may correspond to one or more job types, and different job groups may correspond to different job types, including payment types, transfer types, bill types, etc. Each job group may contain one or more jobs, and the jobs may include batch jobs, etc. Jobs in different job groups may run in parallel, and different jobs in the same job group may also run in parallel. In this way, grouped concurrency of jobs may be achieved.

[0029] In practice, each job group may correspond to a queue, which may include jobs to be run, and different job groups may correspond to different queues. When a job in a queue needs to be run, the job in the queue may be assigned to the job group.

[0030] Considering that the resources of the device are limited, if the number of jobs running in parallel is too large, the load on the device will be too large, causing performance problems. For this reason, each job group is set with the number of jobs that can be accommodated (the number of concurrent jobs). The number of jobs actually accommodated in the job group is less than or equal to the number of jobs that can be accommodated by the job group. The number of jobs that can be accommodated by different job groups can be the same or different. The number of jobs that can be accommodated by the job group can be updated at regular intervals. The duration of the update cycle can be 1 minute, 10 minutes, etc.

[0031] In some embodiments, the objective function may be used to evaluate time utilization of the plurality of job groups, where the time utilization is used to represent usage of the job groups within an update cycle.

[0032] For example, the objective function may include Where S may represent the duration of the update cycle (for example, when the duration of the update cycle is 10 minutes, S may be 10), m may represent the number of job groups, v may represent the number of jobs actually accommodated by the jth job group during the update cycle, and t u It can represent the running time of the u-th job, P count It can represent the sum of the number of jobs that can be accommodated by each job group. In this way, the number of jobs that can be accommodated by each job group can be set according to the historical time consumed by the jobs run by each job group in the update cycle.

[0033] In some embodiments, the constraint condition may be used to constrain the range of the number of jobs that can be accommodated by each job group and the sum of the number of jobs that can be accommodated by each job group.

[0034] In some scenario examples, the multiple operation groups may include four operation groups, namely, operation group A, operation group B, operation group C, and operation group D. The number of operations that can be accommodated by operation group A can be expressed as P A , the number of jobs that can be accommodated by job group B can be expressed as PB , the number of jobs that can be accommodated by job group C can be expressed as P C , the number of jobs that can be accommodated by job group D can be expressed as P D .P A The value range of can be 10<=P A <=20. B The value range can be 25<=P B <=45. C The value range of can be 5<=P C <=25. D The value range of can be 5<=P D <=10. The sum of the number of jobs that can be accommodated by each job group can be P A +P B +P C +P D =75.

[0035] Step S13: When the update cycle arrives, the number of jobs that can be accommodated by each job group is set using the objective function and constraints.

[0036] In some embodiments, a simulated annealing algorithm may be used to set the number of jobs that can be accommodated by each job group, so that the number of jobs that can be accommodated is allocated to each job group when the sum of the number of jobs that can be accommodated is constant.

[0037] For details, please refer to Figure 2 You can set the number of jobs that each job group can accommodate by following the steps below.

[0038] Step S131: using the constraints, determine the current optimal number of jobs that can be accommodated by each job group.

[0039] For each job group, the number of jobs that can be accommodated by the job group can be randomly generated under the constraints as the current optimal number of jobs that can be accommodated by the job group. A Generate a random number in the range [10, 20] as P A , can be in P B Generate a random number in the range [25, 45] as P B , can be in P C Generate a random number in the range [5, 25] as P C , can be obtained by formula P D =75-P A +P B +P C Calculate P D .

[0040] Step S133: Calculate the candidate accommodable job numbers of each job group based on the current optimal accommodable job number.

[0041] According to the formula p j_new =p j_old +r(T k / N) λ ×sgn(r-0.5)×Δp j Calculate the number of candidate jobs that can be accommodated by each job group. j_new represents the number of candidate jobs that can be accommodated by the jth job group; p j_old represents the current optimal number of jobs that can be accommodated by the jth job group; r represents the first random number, which can be a random number between [0,1]; k represents the current number of iterations; T k represents the simulated annealing temperature, T0 represents the initial simulated annealing temperature (e.g., 500), C represents the attenuation factor (e.g., 0.98), m represents the number of job groups; N represents the maximum number of iterations; λ represents the perturbation constant (e.g., 3); sgn represents the sign function, when r-0.5 is positive, the value of sgn(r-0.5) can be 1, and when r-0.5 is negative, the value of sgn(r-0.5) can be -1; Δp j represents the range of the number of jobs that can be accommodated by the jth job group, Δp j Specifically, it may be the difference between the maximum number of jobs that can be accommodated and the minimum number of jobs that can be accommodated of the j-th job group.

[0042] In the related art, by j_old Perform a completely random perturbation to obtain p j_new (For example, by j_old Add to the first random number to get p j_new ), which is not conducive to the convergence of the fast iterative process. In the embodiment of this specification, p j_new The calculation formula includes T k , so that p j_new The calculation method of can change with the number of iterations. When the simulated annealing temperature is high (the number of iterations is small), p j_old Make a larger perturbation to obtain p j_new When the simulated annealing temperature is low (the number of iterations is large), p j_old Make a small perturbation to obtain p j_new . This can improve the convergence speed.

[0043] Continuing with the previous scenario example, m can be 4. A first random number r can be generated within [0,1], and can be obtained according to the formula p A_new =pA_old +r(T k / N) λ ×sgn(r-0.5)×Δp A , Δp A =20-10=10; the first random number r can be generated in [0,1], according to the formula p B_new =p B_old +r(T k / N) λ ×sgn(r-0.5)×Δp B , Δp B =45-25=20; the first random number r can be generated in [0,1], according to the formula p C_new =p C_old +r(T k / N) λ ×sgn(r-0.5)×Δp C , Δp C =25-5=20; the first random number r can be generated in [0,1], according to the formula p D_new =p D_old +r(T k / N) λ ×sgn(r-0.5)×Δp D , Δp D =10-5=5.

[0044] Step S135: If the objective function value corresponding to the candidate number of jobs that can be accommodated is greater than the objective function value corresponding to the current optimal number of jobs that can be accommodated, the candidate number of jobs that can be accommodated is accepted as the new current optimal number of jobs that can be accommodated; otherwise, the acceptance probability is obtained and the candidate number of jobs that can be accommodated is accepted as the new current optimal number of jobs that can be accommodated with the acceptance probability.

[0045] The candidate number of accommodable jobs can be substituted into the objective function to obtain the objective function value corresponding to the candidate number of accommodable jobs. The current optimal number of accommodable jobs can be substituted into the objective function to obtain the objective function value corresponding to the current optimal number of accommodable jobs. If the objective function value corresponding to the candidate number of accommodable jobs is greater than the objective function value corresponding to the current optimal number of accommodable jobs, the candidate number of accommodable jobs can be used as the new current optimal number of accommodable jobs. Otherwise, the acceptance probability can be obtained, and the candidate number of accommodable jobs can be accepted as the new current optimal number of accommodable jobs with the acceptance probability.

[0046] According to the formula Calculate the acceptance probability. P represents the acceptance probability; h is a preset parameter (for example, it can be 2); ΔE = E new -E old ; E newrepresents the simulated annealing energy corresponding to the number of candidate jobs that can be accommodated, E new =1-f(p 1_new ,p 2_new ,...,p m_new ), p 1_new ,p 2_new ,...,p m_new They represent the number of candidate jobs that can be accommodated; E old represents the simulated annealing energy corresponding to the current optimal number of jobs that can be accommodated, E old =1-f(p 1_old ,p 2_old ,...,p m_old ), p 1_old ,p 2_old ,...,p m_old They represent the current optimal number of jobs that can be accommodated; k represents the current number of iterations, T k represents the simulated annealing temperature. A second random number may be generated; if the acceptance probability is greater than the second random number, the candidate number of accommodable jobs is used as the new current optimal number of accommodable jobs; otherwise, the current optimal number of accommodable jobs is used as the new current optimal number of accommodable jobs.

[0047] For example, a second random number may be generated within [0, 1]. If the acceptance probability is greater than the second random number and less than 1, the candidate number of accommodable jobs is used as the new current optimal number of accommodable jobs. Otherwise, the current optimal number of accommodable jobs is used as the new current optimal number of accommodable jobs.

[0048] In the embodiment of this specification, the calculation formula of the acceptance probability P includes T k , so that the calculation method of the acceptance probability P can change with the number of iterations, which can improve the convergence speed.

[0049] Step S137: After the iteration is completed, the current optimal number of jobs that can be accommodated for each job group is obtained.

[0050] Steps S33 to S35 may be iteratively executed until an iteration end condition is met. After the iteration end condition is met, the optimal number of jobs that can be accommodated for each job group may be obtained. The iteration end condition may include at least one of the following: the number of iterations reaches the maximum number of iterations, the simulated annealing temperature corresponding to the current number of iterations drops to a certain threshold value (e.g., 10 -8 ).

[0051] Step S15: Schedule the jobs to be run to the job group according to the number of jobs that can be accommodated.

[0052] In some embodiments, each job group may correspond to a queue, and the queue may include jobs to be run, and different job groups may correspond to different queues. For each job group, the number of jobs actually accommodated in the job group may be obtained; if the number of jobs actually accommodated in the job group is less than the number of jobs that can be accommodated, the job in the queue may be assigned to the job group.

[0053] In some embodiments, a resource usage index may also be obtained in real time, and the resource usage index is used to indicate the resource usage of the device, and the resource may include memory, CPU, etc. If the resource usage index is less than or equal to a preset threshold, it indicates that the load of the device is small, and the jobs in the queue may be assigned to the job group. If the resource usage index is greater than the preset threshold, it indicates that the load of the device is large, and the assignment of jobs to the job group may be stopped.

[0054] The job scheduling method of the embodiment of the present specification can dynamically calculate the number of jobs that can be accommodated by a job group, thereby improving the operating efficiency of the jobs when resources are limited.

[0055] See also Figure 3 The embodiment of this specification provides a job scheduling device, including the following units:

[0056] A determination unit 31, used to determine an objective function and a constraint condition, wherein the objective function is used to evaluate the time utilization of multiple job groups, the time utilization is used to represent the usage of the job groups within the update cycle, and the constraint condition is used to constrain the value range of the number of jobs that can be accommodated by each job group and the sum of the number of jobs that can be accommodated by each job group;

[0057] A setting unit 33, used to set the number of jobs that can be accommodated by each job group by using the objective function and the constraint conditions when the update cycle arrives;

[0058] The scheduling unit 35 is used to schedule the jobs to be run to the job groups according to the number of jobs that can be accommodated.

[0059] See also Figure 4 The embodiments of this specification also provide a computing device.

[0060] The computing device may include a memory and a processor.

[0061] In this embodiment, the memory includes but is not limited to dynamic random access memory (DRAM) and static random access memory (SRAM), etc. The memory can be used to store computer instructions.

[0062] In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. The processor may be used to execute the computer instructions to implement Figure 1 The corresponding embodiment.

[0063] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment and the computing device embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In addition, it is understandable that after reading this specification document, those skilled in the art can think of any combination of some or all of the embodiments listed in this specification without creative work, and these combinations are also within the scope of disclosure and protection of this specification.

[0064] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

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

[0066] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the present specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.

[0067] This specification can be used in many general or special computer system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0068] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0069] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.

Claims

1. A job scheduling method, comprising: Determine an objective function and constraints, wherein the objective function is used to evaluate the time utilization of multiple job groups, and the objective function includes S represents the duration of the update cycle, m represents the number of job groups, v represents the number of jobs actually contained in the jth job group during the update cycle, and t u represents the running time of the u-th job, P count represents the sum of the number of jobs that can be accommodated by each job group; the time utilization rate is used to represent the usage of the job group within the update cycle, and the constraint condition is used to constrain the value range of the number of jobs that can be accommodated by each job group and the sum of the number of jobs that can be accommodated by each job group; When the update cycle arrives, the number of jobs that can be accommodated for each job group is set by using the objective function and the constraint conditions, which includes: using the simulated annealing algorithm to set the number of jobs that can be accommodated for each job group, wherein the setting of the number of jobs that can be accommodated for each job group includes: using the constraint conditions to determine the current optimal number of jobs that can be accommodated for each job group; iteratively executing the following steps until the iteration end condition is met: according to the current optimal number of jobs that can be accommodated, calculating the candidate number of jobs that can be accommodated for each job group; if the objective function value corresponding to the candidate number of jobs that can be accommodated is greater than the objective function value corresponding to the current optimal number of jobs that can be accommodated, accepting the candidate number of jobs that can be accommodated as the new current optimal number of jobs that can be accommodated, otherwise, obtaining the acceptance probability, and accepting the candidate number of jobs that can be accommodated as the new current optimal number of jobs that can be accommodated with the acceptance probability; after the iteration ends, obtaining the optimal number of jobs that can be accommodated for each job group; According to the number of jobs that can be accommodated, the jobs to be run are scheduled to the job group, wherein each job group corresponds to a queue, and the queue includes the jobs to be run. The scheduling of the jobs to be run to the job group includes: obtaining a resource usage indicator in real time, and the resource usage indicator is used to represent the resource usage of the device; if the number of jobs actually accommodated in the job group is less than the number of jobs that can be accommodated, and the resource usage indicator is less than or equal to a preset threshold, the jobs in the queue are allocated to the job group.

2. The method according to claim 1, wherein the step of calculating the number of candidate accommodable jobs of each job group comprises: According to the formula p j_new =p j_old +r(T k / N) λ ×sgn(r-0.5)×Δp j Calculate the number of candidate jobs that can be accommodated in each job group; j_new represents the number of candidate jobs that can be accommodated by the jth job group, p j_old represents the current optimal number of jobs that can be accommodated by the jth job group, r represents the first random number, k represents the current number of iterations, T k represents the simulated annealing temperature, N represents the maximum number of iterations, λ represents the perturbation constant, sgn represents the sign function, Δp j Represents the range of the number of jobs that can be accommodated by the j-th job group.

3. The method according to claim 1, wherein obtaining the acceptance probability comprises: According to the formula Calculate the acceptance probability; P represents the acceptance probability, h is the preset parameter, ΔE=E new -E old , E new represents the simulated annealing energy corresponding to the number of candidate jobs that can be accommodated, E old represents the simulated annealing energy corresponding to the current optimal number of jobs that can be accommodated, k represents the current number of iterations, T k represents the simulated annealing temperature.

4. The method according to claim 3, wherein E new =1-f(p 1_new ,p 2_new ,...,p m_new ), E old =1-f(p 1_old ,p 2_old ,...,p m_old ), p 1_new ,p 2_new ,...,p m_new They represent the number of candidate jobs that can be accommodated, f(p 1_new ,p 2_new ,...,p m_new ) represents the value of the objective function corresponding to the number of jobs that can be accommodated by the candidate, p 1_old ,p 2_old ,...,p m_old They represent the current optimal number of jobs that can be accommodated, f(p 1_old ,p 2_old ,...,p m_old ) represents the objective function value corresponding to the current optimal number of jobs that can be accommodated, T0 represents the initial simulated annealing temperature, C represents the attenuation factor, and m represents the number of job groups.

5. The method according to claim 1, wherein the step of accepting the candidate number of accommodable jobs as the new current optimal number of accommodable jobs with an acceptance probability comprises: generating a second random number; If the acceptance probability is greater than the second random number, the candidate number of accommodable jobs is accepted as the new current optimal number of accommodable jobs; Otherwise, the current optimal number of jobs that can be accommodated is accepted as the new current optimal number of jobs that can be accommodated.

6. A job scheduling device, comprising: A determination unit is used to determine an objective function and constraints, wherein the objective function is used to evaluate the time utilization of multiple job groups, and the objective function includes S represents the duration of the update cycle, m represents the number of job groups, v represents the number of jobs actually contained in the jth job group during the update cycle, and t u represents the running time of the u-th job, P count represents the sum of the number of jobs that can be accommodated by each job group; the time utilization rate is used to represent the usage of the job group within the update cycle, and the constraint condition is used to constrain the value range of the number of jobs that can be accommodated by each job group and the sum of the number of jobs that can be accommodated by each job group; The setting unit is used to set the number of jobs that can be accommodated for each job group by using the objective function and the constraint conditions when the update cycle arrives, which includes: using the simulated annealing algorithm to set the number of jobs that can be accommodated for each job group, wherein the setting of the number of jobs that can be accommodated for each job group includes: using the constraint conditions to determine the current optimal number of jobs that can be accommodated for each job group; iteratively performing the following steps until the iteration end condition is met: according to the current optimal number of jobs that can be accommodated, calculating the candidate number of jobs that can be accommodated for each job group; if the objective function value corresponding to the candidate number of jobs that can be accommodated is greater than the objective function value corresponding to the current optimal number of jobs that can be accommodated, accepting the candidate number of jobs that can be accommodated as the new current optimal number of jobs that can be accommodated, otherwise, obtaining the acceptance probability, and accepting the candidate number of jobs that can be accommodated as the new current optimal number of jobs that can be accommodated with the acceptance probability; after the iteration ends, obtaining the optimal number of jobs that can be accommodated for each job group; A scheduling unit is used to schedule jobs to be run to a job group according to the number of jobs that can be accommodated, wherein each job group corresponds to a queue, and the queue includes jobs to be run. The scheduling of jobs to be run to the job group includes: obtaining a resource usage indicator in real time, and the resource usage indicator is used to indicate the resource usage of the device; if the number of jobs actually accommodated in the job group is less than the number of jobs that can be accommodated, and the resource usage indicator is less than or equal to a preset threshold, the jobs in the queue are allocated to the job group.

7. An electronic device comprising: at least one processor; A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Design support device, design support method and medium for storing design support program

    CN109202895A

  • Job scheduling method and apparatus based on improved simulated annealing algorithm

    CN109377111A

  • Concurrent control method, device and apparatus

    CN112181498A