Resource allocation method and device
Through an automated resource allocation method, duty tasks are assigned balanced according to service cycle and resource schedule, solving the problems of cumbersome and unfair shift operations in the existing technology, and achieving more efficient and fair duty tasks allocation.
Patent Information
- Application Number
- CN202411410844.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the scheduling operations are cumbersome, making it difficult to balance the workload of each duty personnel, resulting in unfair allocation of duty tasks.
By determining the service cycle and resource scheduling, the target service resources are automatically allocated according to the service weights of the service resources and their location in the target resource queue, and placed them at the tail of the queue to avoid rapid redistribution, and the service weights are modified to reflect the workload.
The scheduling operation is simplified, the workload of each duty personnel is balanced, and the duty tasks are assigned fairly, which improves the efficiency and fairness of scheduling.
Smart Images

Figure CN119514917A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of resource allocation, and in particular to a resource allocation method and device. Background Art
[0002] Large companies need to handle company business at different times. Many companies also have complex infrastructure deployed internally. Therefore, duty is an important part of the company's operations. Duty personnel ensure the normal and continuous processing of the company's business and the stable operation of the company's infrastructure. In the current scheduling process, duty personnel are usually directly designated by the department head to complete the duty. The scheduling operation is cumbersome and it is difficult to balance the workload of each duty personnel. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a resource allocation method and device, which can simplify the scheduling operation, balance the workload of each on-duty personnel, and fairly allocate on-duty tasks to each on-duty personnel.
[0004] In a first aspect, an embodiment of the present invention provides a resource allocation method, including:
[0005] identifying at least one resource type;
[0006] Determine a service period and at least one resource schedule corresponding to each resource type of the service period;
[0007] For each of the resource schedules: determine the target resource type and the number of resources corresponding to the resource schedule; determine at least one service resource and a target resource queue corresponding to the target resource type; determine the number of target service resources from the at least one service resource based on the service weight of the service resource and the position of the service resource in the target resource queue, and allocate the target service resources to the resource schedule; take out each of the target service resources from the target resource queue, and put the target service resources from the end of the target resource queue into the target resource queue; modify the service weight of each of the target service resources based on the scheduling weight corresponding to the resource schedule.
[0008] Optionally, after determining at least one resource type, the method further includes:
[0009] Putting at least one service resource corresponding to the resource type into a resource queue corresponding to the resource type;
[0010] Initialize the service weight of each service resource corresponding to the resource type.
[0011] Optionally, determining the number of target service resources from the at least one service resource according to the service weight of the service resource and the position of the service resource in the target resource queue includes:
[0012] In response to the existence of service weights of the first resource and the second resource both meeting the selection condition, determining a first position of the first resource in the target resource queue and a second position of the second resource in the target resource queue;
[0013] In response to the first position being before the second position, determining the first resource as the target service resource;
[0014] In response to the first position being after the second position, determining the second resource as the target service resource.
[0015] Optionally, after determining the service period and at least one resource schedule of each resource type corresponding to the service period, the method further includes:
[0016] receiving a preview instruction for the service cycle;
[0017] A plurality of resource schedules corresponding to the service period and service resources allocated to each of the resource schedules are displayed.
[0018] Optionally, after determining the service period and at least one resource schedule of each resource type corresponding to the service period, the method further includes:
[0019] Receiving query instructions for target resources;
[0020] At least one resource schedule of the target resource within the service period is obtained and displayed.
[0021] Optionally, after determining the service period and at least one resource schedule of each resource type corresponding to the service period, the method further includes:
[0022] Receiving a modification instruction for a target schedule, and determining a target resource and a replacement resource corresponding to the modification request;
[0023] Modify the target resource allocated to the target schedule to the replacement resource;
[0024] The service weights of the target resource and the replacement resource are modified according to the scheduling weight corresponding to the target scheduling.
[0025] Optionally, after allocating the target service resource to the resource schedule, the method further includes:
[0026] Determine the scheduling time and scheduling authority corresponding to the resource scheduling;
[0027] Execute an authorization instruction, where the authorization instruction is used to enable the target service resource to have the scheduling authority within the scheduling time.
[0028] In a second aspect, an embodiment of the present invention provides a resource allocation device, including:
[0029] A resource determination module, configured to determine at least one resource type;
[0030] A scheduling determination module, used to determine a service period and at least one resource schedule of each resource type corresponding to the service period;
[0031] A resource allocation module is used to: determine, for each resource schedule, the target resource type and the number of resources corresponding to the resource schedule; determine at least one service resource and a target resource queue corresponding to the target resource type; determine the number of target service resources from the at least one service resource based on the service weight of the service resource and the position of the service resource in the target resource queue, and allocate the target service resources to the resource schedule; take out each target service resource from the target resource queue, and put the target service resource from the end of the target resource queue into the target resource queue; and modify the service weight of each target service resource based on the scheduling weight corresponding to the resource schedule.
[0032] Optionally, it also includes:
[0033] an initialization module, configured to place at least one service resource corresponding to the resource type into a resource queue corresponding to the resource type;
[0034] Initialize the service weight of each service resource corresponding to the resource type.
[0035] Optionally, the resource allocation module is specifically used to:
[0036] In response to the existence of service weights of the first resource and the second resource both meeting the selection condition, determining a first position of the first resource in the target resource queue and a second position of the second resource in the target resource queue;
[0037] In response to the first position being before the second position, determining the first resource as the target service resource;
[0038] In response to the first position being after the second position, determining the second resource as the target service resource.
[0039] Optionally, it also includes:
[0040] A preview module, configured to receive a preview instruction for the service cycle;
[0041] A plurality of resource schedules corresponding to the service period and service resources allocated to each of the resource schedules are displayed.
[0042] Optionally, it also includes:
[0043] A query module, used for receiving query instructions for target resources;
[0044] At least one resource schedule of the target resource within the service period is obtained and displayed.
[0045] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0046] one or more processors;
[0047] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0048] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.
[0049] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which implements the method described in any of the above embodiments when executed by a processor.
[0050] An embodiment of the above invention has the following advantages or beneficial effects: determining at least one resource schedule for each resource type corresponding to a service period. Determining the target resource type and the number of resources corresponding to the resource schedule; determining the number of service resources from at least one service resource corresponding to the target resource type according to the service weight of each service resource corresponding to the target resource type, and allocating the determined service resources to the resource schedule. The resource type may correspond to a duty post, the service resource may correspond to a duty personnel, and the service weight may represent the workload of the duty personnel. The scheme of the embodiment of the present invention can automatically determine the duty personnel corresponding to each resource schedule, simplify the scheduling operation, balance the workload of each duty personnel, and fairly allocate duty tasks to each duty personnel.
[0051] In addition, after the target service resource is determined based on the service weight of the service resource and its position in the target resource queue, the current service resource is taken out from the target resource queue and the target service resource is placed in the target resource queue from the end of the target resource queue to avoid the service resource that has just been allocated being quickly allocated again. This can balance the workload of each on-duty personnel and the time intervals between assigned shifts.
[0052] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0054] Figure 1 is a flow chart of a resource allocation method provided by the first embodiment of the present invention;
[0055] Figure 2 is a flow chart of a resource allocation method provided by the second embodiment of the present invention;
[0056] Figure 3 is a flow chart of a resource allocation method provided by the third embodiment of the present invention;
[0057] Figure 4 is a structural schematic diagram of a resource allocation device provided by an embodiment of the present invention;
[0058] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0060] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0061] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0062] Figure 1 is a flow chart of a resource allocation method provided by the first embodiment of the present invention, such as Figure 1 As shown, the method includes:
[0063] Step 101: Determine at least one resource type.
[0064] Resource types and service resources can be set according to specific needs. For example, for warehousing applications, resource types can be various commodity types, and service resources can be various commodities. For scheduling applications, resource types can correspond to duty positions, and service resources can correspond to duty personnel. For project planning applications, resource types can correspond to various item types or job positions, and service resources can correspond to items or staff. The following takes the scheduling application as an example to explain the solution of the embodiment of the present invention.
[0065] Step 102: Determine a service period and at least one resource schedule of each resource type corresponding to the service period.
[0066] The service period can be set as needed. The service period can be one day, one week, one month, half a year, etc. Different resource types correspond to different resource schedules in the same service period. Determine at least one resource schedule for each resource type in the service period. Each resource schedule corresponds to a resource type.
[0067] For example, if the service cycle is one week, the first position needs to be on duty every day, including: morning shift and evening shift. The second position needs to be on duty from Monday to Friday, including: morning shift, mid-shift and evening shift. The resource scheduling corresponding to the first position includes: Monday morning shift, Monday evening shift, Tuesday morning shift...Sunday morning shift, Sunday evening shift. The resource scheduling corresponding to the second position includes: Monday morning shift, Monday mid-shift, Monday evening shift, Tuesday morning shift...Friday morning shift, Friday mid-shift, Friday evening shift.
[0068] Step 103: For each resource schedule: determine the target resource type and resource quantity corresponding to the resource schedule; determine at least one service resource and target resource queue corresponding to the target resource type.
[0069] The number of resources can be the number of people on duty that need to be arranged during the resource schedule. For example, if the resource schedule is the Monday morning shift corresponding to the first position, and the resource schedule requires 2 first position on duty personnel, then the number of resources is 2.
[0070] Each resource type corresponds to at least one service resource. Each resource type corresponds to a resource queue. At least one service resource corresponding to the resource type is placed in the resource queue corresponding to the resource type. The service resources corresponding to each resource type are stored and sorted through the resource queue. Step 104: According to the service weight of the service resource and the position of the service resource in the target resource queue, a target service resource is determined from at least one service resource, and the target service resource is allocated to the resource schedule.
[0071] The service weight represents the workload of the on-duty personnel. According to the service weight of each service resource corresponding to the target resource type and the position of each service resource in the target resource queue, a resource number target service resource is determined from at least one service resource corresponding to the target resource type. For example, a resource number service resource with the smallest workload and a position before a preset position in the target resource queue can be selected as the target service resource. Alternatively, a resource number service resource with a workload less than a workload threshold and a position before a preset position in the target resource queue can be selected as the target service resource.
[0072] Step 105: Take each target service resource from the target resource queue, and put the target service resource from the tail of the target resource queue into the target resource queue; modify the service weight of each target service resource according to the scheduling weight corresponding to the resource scheduling.
[0073] The resource queue generally takes out service resources from the head and puts in service resources from the tail. After the target service resource is determined, the target service resource is taken out from the target resource queue and put into the target resource queue from the tail of the target resource queue to prevent the service resource that has just been allocated from being quickly allocated again.
[0074] The scheduling weight corresponding to the resource schedule is used to represent the workload corresponding to the resource schedule. After the determined service resources are allocated to the resource schedule, the service weights of the service resources allocated to the resource schedule are modified so that the service weights of the allocated service resources accurately represent the workload of the service resources.
[0075] In the scheme of the embodiment of the present invention, at least one resource schedule corresponding to each resource type for a service period is determined. The target resource type and the number of resources corresponding to the resource schedule are determined; according to the service weights of each service resource corresponding to the target resource type, a number of service resources are determined from at least one service resource corresponding to the target resource type, and the determined service resources are allocated to the resource schedule. The scheme of the embodiment of the present invention can automatically determine the on-duty personnel corresponding to each resource schedule, simplify the scheduling operation, balance the workload of each on-duty personnel, and fairly allocate the on-duty tasks to each on-duty personnel.
[0076] In addition, after the target service resource is determined, the current service resource is taken out from the target resource queue and the target service resource is placed in the target resource queue from the end of the queue to avoid the newly allocated service resource being allocated quickly, which can balance the workload of each on-duty personnel and the time intervals between assigned shifts.
[0077] In one embodiment of the present invention, after determining at least one resource type, it also includes: placing at least one service resource corresponding to the resource type into a resource queue corresponding to the resource type; and initializing the service weights of each service resource corresponding to the resource type.
[0078] At least one service resource corresponding to the resource type is placed in a resource queue corresponding to the resource type. Each service resource is sorted by the resource queue. The service weight of each service resource corresponding to the resource type is initialized to assign an initial weight to each service resource, and the initial weight may be 0.
[0079] In one embodiment of the present invention, a number of target service resources are determined from at least one service resource based on a service weight of a service resource and a position of the service resource in a target resource queue, including: in response to the existence of a first resource and a second resource whose service weights both meet a selection condition, determining a first position of the first resource in the target resource queue and a second position of the second resource in the target resource queue; in response to the first position being before the second position, determining the first resource as the target service resource; in response to the first position being after the second position, determining the second resource as the target service resource.
[0080] If the service weights of the first resource and the second resource both meet the selection criteria, the allocated resources are determined according to the positions of the first resource and the second resource in the target resource queue to balance the workload of each on-duty personnel and the time intervals between the assigned on-duty shifts as much as possible.
[0081] The selection condition can be set according to the demand. The selection condition can be: the service weight is the smallest, the service weight is less than the weight threshold, etc. The target service resources can be determined from the target resource queue in a loop until the number of determined target service resources reaches the number of resources.
[0082] For example, the selection condition may be: the service weight is the smallest. The selection step of resource scheduling may be: determining the service resource with the smallest service weight as the target service resource. If the service weights of the first resource and the second resource are the same, and the service weights of the first resource and the second resource are both the smallest, then the service resource at the front of the target resource queue is determined as the target service resource.
[0083] Referring to the above method, new target service resources are continuously determined until the number of determined target service resources reaches the number of resources. It should be noted that the service resources that have been determined as target service resources will no longer participate in the subsequent selection steps of the resource scheduling. That is, the same service resource can only be selected once for the same resource scheduling.
[0084] In one embodiment of the present invention, after determining the service cycle and at least one resource schedule of each resource type corresponding to the service cycle, it also includes: receiving a preview instruction for the service cycle; displaying multiple resource schedules corresponding to the service cycle and the service resources allocated to each resource schedule.
[0085] After allocating corresponding service resources to each resource schedule, users with on-duty administrator privileges can preview the allocation of each resource schedule through the preview command, and can flexibly adjust the allocated service resources. After confirming that there is no problem, they can be released.
[0086] In one embodiment of the present invention, after determining the service period and at least one resource schedule for each resource type corresponding to the service period, it also includes: receiving a modification instruction for the target schedule, and determining the target resources and replacement resources corresponding to the modification request; modifying the target resources allocated to the target schedule to replacement resources; and modifying the service weights of the target resources and replacement resources according to the scheduling weights corresponding to the target schedule.
[0087] If the on-duty personnel need to take a replacement shift, they can request a replacement shift through a modification instruction. The resource types of the target resource and the replacement resource are both the resource types corresponding to the target schedule. After the modification instruction is reviewed by a user with on-duty administrator privileges, the target resource assigned to the target schedule is modified to the replacement resource. The service weight of the target resource needs to be subtracted from the scheduling weight corresponding to the target schedule, and the service weight of the replacement resource needs to be added to the scheduling weight corresponding to the target schedule.
[0088] Figure 2 is a flow chart of a resource allocation method provided by the second embodiment of the present invention, such as Figure 2 As shown, the method includes:
[0089] Step 201: Determine at least one resource type.
[0090] Step 202: Determine a service period and at least one resource schedule of each resource type corresponding to the service period.
[0091] Step 203: For each resource schedule: determine the target resource type and the number of resources corresponding to the resource schedule; determine at least one service resource and a target resource queue corresponding to the target resource type.
[0092] Step 204: Determine a number of target service resources from at least one service resource according to the service weight of the service resource and the position of the service resource in the target resource queue, and allocate the target service resources to the resource schedule.
[0093] Step 205: Take each target service resource from the target resource queue, and put the target service resource from the tail of the target resource queue into the target resource queue; modify the service weight of each target service resource according to the scheduling weight corresponding to the resource scheduling.
[0094] Step 206: Receive a query instruction for the target resource.
[0095] Step 207: Obtain and display at least one resource schedule of the target resource within the service period.
[0096] The query instruction can be issued by the duty personnel corresponding to the target resource. The query instruction can also include: query date, service cycle, resource schedule, resource type, shift type, etc. The shift type may include: morning shift, mid-shift, evening shift, etc. The system obtains and displays at least one resource schedule that matches the query instruction. The displayed resource schedule is within the above service cycle, and the service resources are allocated to the displayed resource schedule.
[0097] In the solution of the embodiment of the present invention, after allocating service resources to each resource schedule, the user can query the resource schedule corresponding to the target resource and perform operations such as resource replacement and resource adjustment. The user can better arrange subsequent work based on the queried resource allocation.
[0098] Figure 3 is a flow chart of a resource allocation method provided by the third embodiment of the present invention, such as Figure 3 As shown, the method includes:
[0099] Step 301: Determine at least one resource type.
[0100] Step 302: Determine a service period and at least one resource schedule of each resource type corresponding to the service period.
[0101] Step 303: For each resource schedule: determine the target resource type and resource quantity corresponding to the resource schedule; determine at least one service resource and target resource queue corresponding to the target resource type.
[0102] Step 304: Determine a number of target service resources from at least one service resource according to the service weight of the service resource and the position of the service resource in the target resource queue, and allocate the target service resources to the resource schedule.
[0103] Step 305: Take each target service resource from the target resource queue, and put the target service resource from the tail of the target resource queue into the target resource queue; modify the service weight of each target service resource according to the scheduling weight corresponding to the resource scheduling.
[0104] Step 306: Determine the scheduling time and scheduling authority corresponding to the resource scheduling.
[0105] The scheduling time and scheduling authority corresponding to resource scheduling can be set according to business needs. For example, if the resource scheduling is: Monday morning shift corresponding to the first position, the scheduling time is Monday 8:00-18:00; if the resource scheduling is: Monday night shift corresponding to the first position, the scheduling time is Monday 18:00-8:00.
[0106] Scheduling permissions may include: permissions to access information, database query permissions, system login permissions, access card system permissions, and other permissions that require card swiping and verification.
[0107] Step 307: Execute the authorization instruction, where the authorization instruction is used to allow the service resource corresponding to the resource schedule to have scheduling authority within the scheduling time.
[0108] In one embodiment of the present invention, after determining the scheduling time and scheduling authority corresponding to the resource scheduling, it also includes: configuring notification information. The notification information may include: the amount of advance time, the notification method, etc. According to the scheduling time of the resource scheduling, according to the notification information, a notification notification is sent to the personnel corresponding to the assigned service resource. The notification notification may include: scheduling information, work information, authority information, etc. The background service calculates the notification time in real time, and once the notification time is reached, the notification information is sent to the personnel corresponding to the service resource to remind the on-duty personnel to be on duty.
[0109] In the solution of the embodiment of the present invention, after determining the service resources corresponding to each resource schedule, the authorization instruction is executed so that the service resources corresponding to the resource schedule have scheduling authority within the scheduling time. Each service resource assigned to the resource schedule can better complete the corresponding work by using the granted authority.
[0110] To make the scheme of the embodiment of the present invention easier to understand, the following takes the scheduling of the technical department as an example to explain the scheme of the embodiment of the present invention. In this scheme, the resource type corresponds to the duty post, the service resource corresponds to the duty personnel, and the service weight corresponds to the workload of the duty personnel. The service cycle corresponds to the duty cycle. The duty cycle can be one week, one month, half a year, a statutory holiday, etc. The scheme includes:
[0111] Step 1: Sort out the duty posts according to the needs of the operation and maintenance scenarios. Duty posts may include: infrastructure duty post, database engineer duty post, middleware engineer duty post, computer room duty post, and application personnel duty post. After sorting out the duty posts, determine the duty personnel corresponding to each duty post and arrange the duty personnel for each duty post.
[0112] Step 2: Configure the duty cycle information of each duty post, such as weekday duty, weekend duty, holiday duty, make-up duty information, etc. Configure the duty time period, which includes: day shift, night shift, custom time, etc.
[0113] Step 3: Automatically generate a shift schedule. The duty manager automatically generates a shift schedule based on the duty cycle, duty post, duty personnel corresponding to the duty post, time period configuration information, etc. The shift schedule consists of multiple resource schedules and the duty personnel corresponding to each resource schedule.
[0114] The minimum weight algorithm is used to calculate the weights of the on-duty personnel in multiple duty periods under the same indicator position. The personnel with the smallest weight value are arranged first. The on-duty personnel corresponding to each duty position are maintained by resource queues to ensure that the personnel are orderly and first-in-first-out. For on-duty personnel with the same weight, they are arranged according to their positions in the resource queue. The workload and duty interval of the on-duty personnel are balanced through weights and resource queues.
[0115] Step 4: After the shift schedule is automatically generated, you can preview the schedule data. The on-duty manager can flexibly adjust the on-duty personnel and publish it after confirming that there is no problem.
[0116] Step 5: The duty personnel check their own shift schedule data, duty calendar, etc. If the duty personnel need to take leave, they can click on the duty calendar to submit an application for replacement or shift change, and the duty personnel of the same position will replace them. The replacement personnel will review and determine whether the replacement personnel agrees to replace or shift change, and the shift schedule can be adjusted flexibly.
[0117] Step 6: Configure notification information at the duty post and set advance notification according to the duty period to remind the duty personnel to go on duty.
[0118] The method of the embodiment of the present invention uses automated scheduling to make scheduling more efficient. Through resource weights, the unfairness of manual scheduling is solved, and automated scheduling avoids subjective scheduling. Scheduling errors and conflicts are avoided, and the accuracy and balance of scheduling are guaranteed, and compliance is met. Automated scheduling is performed by configuring duty posts, personnel, time periods, etc., to solve the problem of poor scheduling flexibility. The scheduling results can also be previewed for adjustment, and the on-duty personnel can initiate shift changes or replacements to flexibly adjust the scheduling information.
[0119] Figure 4 is a schematic diagram of a resource allocation device provided by an embodiment of the present invention. Figure 4 As shown, the device comprises:
[0120] The resource determination module 401 is used to determine at least one resource type;
[0121] A schedule determination module 402, used to determine a service period and at least one resource schedule for each resource type corresponding to the service period;
[0122] The resource allocation module 403 is used for each resource schedule: determining the target resource type and the number of resources corresponding to the resource schedule; determining at least one service resource and a target resource queue corresponding to the target resource type; determining a number of target service resources from at least one service resource based on the service weight of the service resource and the position of the service resource in the target resource queue, and allocating the target service resources to the resource schedule; taking each target service resource from the target resource queue, and placing the target service resource from the end of the target resource queue into the target resource queue; and modifying the service weight of each target service resource based on the scheduling weight corresponding to the resource schedule.
[0123] Optionally, it also includes:
[0124] An initialization module, used to put at least one service resource corresponding to the resource type into a resource queue corresponding to the resource type;
[0125] Initialize the service weight of each service resource corresponding to the resource type.
[0126] Optionally, the resource allocation module 403 is specifically configured to:
[0127] In response to the existence of service weights of the first resource and the second resource both meeting the selection condition, determining a first position of the first resource in the target resource queue and a second position of the second resource in the target resource queue;
[0128] In response to the first location being before the second location, determining the first resource as a target service resource;
[0129] In response to the first location being after the second location, the second resource is determined to be the target service resource.
[0130] Optionally, it also includes:
[0131] A preview module, configured to receive a preview instruction for a service cycle;
[0132] Displays multiple resource schedules corresponding to the service cycle and the service resources allocated to each resource schedule.
[0133] Optionally, it also includes:
[0134] A query module, used for receiving query instructions for target resources;
[0135] Obtain and display at least one resource schedule of the target resource within the service period.
[0136] Optionally, it also includes:
[0137] A resource modification module is used to receive modification instructions for target scheduling and determine target resources and replacement resources corresponding to the modification request;
[0138] Change the target resource assigned to the target schedule to a replacement resource;
[0139] Modify the service weights of the target resources and replacement resources based on the scheduling weights corresponding to the target schedule.
[0140] Optionally, it also includes:
[0141] Authorization module, used to determine the scheduling time and scheduling authority corresponding to resource scheduling;
[0142] Execute the authorization instruction, which is used to enable the target service resource to have scheduling authority within the scheduling time.
[0143] An embodiment of the present invention provides an electronic device, including:
[0144] one or more processors;
[0145] The storage device is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.
[0146] An embodiment of the present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the resource allocation method in the embodiment of the present invention is implemented.
[0147] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0148] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0149] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0150] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0151] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0152] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, they may be described as: a resource determination module, a scheduling determination module, and a resource allocation module. The names of these modules do not, in some cases, constitute limitations on the modules themselves, for example, the resource determination module may also be described as a "module for determining at least one resource type."
[0154] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0155] identifying at least one resource type;
[0156] Determine a service period and at least one resource schedule for each resource type corresponding to the service period;
[0157] For each resource schedule: determine the target resource type and number of resources corresponding to the resource schedule; determine at least one service resource and a target resource queue corresponding to the target resource type; determine a target service resource with a certain number of resources from at least one service resource based on the service weight of the service resource and the position of the service resource in the target resource queue, and allocate the target service resources to the resource schedule; take out each target service resource from the target resource queue, and put the target service resource from the end of the target resource queue into the target resource queue; modify the service weight of each target service resource based on the scheduling weight corresponding to the resource schedule.
[0158] According to the technical solution of the embodiment of the present invention, at least one resource schedule for each resource type corresponding to the service period is determined. The target resource type and the number of resources corresponding to the resource schedule are determined; according to the service weights of each service resource corresponding to the target resource type, the number of service resources is determined from at least one service resource corresponding to the target resource type, and the determined service resources are allocated to the resource schedule. The resource type may correspond to a duty post, the resource may correspond to the duty personnel, and the service weight may represent the workload of the duty personnel. The solution of the embodiment of the present invention can automatically determine the duty personnel corresponding to each resource schedule, simplify the scheduling operation, balance the workload of each duty personnel, and fairly allocate duty tasks to each duty personnel.
[0159] In addition, after the target service resource is determined, the current service resource is taken out from the target resource queue and placed into the target resource queue from the end of the target resource queue to avoid the newly allocated service resource from being allocated again, which can balance the workload of each on-duty personnel and the time intervals between assigned shifts.
[0160] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A resource allocation method, characterized in that: include: identifying at least one resource type; Determine a service period and at least one resource schedule corresponding to each resource type of the service period; For each resource schedule: determine the target resource type and the number of resources corresponding to the resource schedule; determine at least one service resource and a target resource queue corresponding to the target resource type; determine the number of target service resources from the at least one service resource according to the service weight of the service resource and the position of the service resource in the target resource queue, and allocate the target service resources to the resource schedule; take out each target service resource from the target resource queue, and put the target service resource into the target resource queue from the tail of the target resource queue; The service weight of each of the target service resources is modified according to the scheduling weight corresponding to the resource scheduling.
2. The method according to claim 1, characterized in that After determining at least one resource type, the method further includes: Putting at least one service resource corresponding to the resource type into a resource queue corresponding to the resource type; Initialize the service weight of each service resource corresponding to the resource type.
3. The method according to claim 1, characterized in that The step of determining the number of target service resources from the at least one service resource according to the service weight of the service resource and the position of the service resource in the target resource queue comprises: In response to the existence of service weights of the first resource and the second resource both meeting the selection condition, determining a first position of the first resource in the target resource queue and a second position of the second resource in the target resource queue; In response to the first position being before the second position, determining the first resource as the target service resource; In response to the first position being after the second position, determining the second resource as the target service resource.
4. The method according to claim 1, characterized in that: After determining the service period and at least one resource schedule corresponding to each resource type of the service period, the method further includes: receiving a preview instruction for the service cycle; A plurality of resource schedules corresponding to the service period and service resources allocated to each of the resource schedules are displayed.
5. The method according to claim 1, characterized in that After determining the service period and at least one resource schedule corresponding to each resource type of the service period, the method further includes: Receiving query instructions for target resources; At least one resource schedule of the target resource within the service period is obtained and displayed.
6. The method according to claim 1, characterized in that After determining the service period and at least one resource schedule corresponding to each resource type of the service period, the method further includes: Receiving a modification instruction for a target schedule, and determining a target resource and a replacement resource corresponding to the modification request; Modify the target resource allocated to the target schedule to the replacement resource; The service weights of the target resource and the replacement resource are modified according to the scheduling weight corresponding to the target scheduling.
7. The method according to claim 1, characterized in that After allocating the target service resource to the resource schedule, the method further includes: Determine the scheduling time and scheduling authority corresponding to the resource scheduling; Execute an authorization instruction, where the authorization instruction is used to enable the target service resource to have the scheduling authority within the scheduling time.
8. A resource allocation device, characterized in that: include: A resource determination module, configured to determine at least one resource type; A scheduling determination module, used to determine a service period and at least one resource schedule of each resource type corresponding to the service period; A resource allocation module, for each of the resource schedules: determining the target resource type and the number of resources corresponding to the resource schedule; determining at least one service resource and a target resource queue corresponding to the target resource type; determining the number of target service resources from the at least one service resource according to the service weight of the service resource and the position of the service resource in the target resource queue, and allocating the target service resources to the resource schedule; taking each of the target service resources from the target resource queue, and placing the target service resource from the tail of the target resource queue into the target resource queue; The service weight of each of the target service resources is modified according to the scheduling weight corresponding to the resource scheduling.
9. The device according to claim 8, characterized in that Also includes: an initialization module, configured to place at least one service resource corresponding to the resource type into a resource queue corresponding to the resource type; Initialize the service weight of each service resource corresponding to the resource type.
10. The device according to claim 8, characterized in that The resource allocation module is specifically used for: In response to the existence of service weights of the first resource and the second resource both meeting the selection condition, determining a first position of the first resource in the target resource queue and a second position of the second resource in the target resource queue; In response to the first position being before the second position, determining the first resource as the target service resource; In response to the first position being after the second position, determining the second resource as the target service resource.
11. The device according to claim 8, characterized in that Also includes: A preview module, configured to receive a preview instruction for the service cycle; A plurality of resource schedules corresponding to the service period and service resources allocated to each of the resource schedules are displayed.
12. The device according to claim 8, characterized in that Also includes: A query module, used for receiving query instructions for target resources; At least one resource schedule of the target resource within the service period is obtained and displayed.
13. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
14. A computer readable medium having a computer program stored thereon, characterized in that When the program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.