Service resource allocation method, apparatus, electronic device and storage medium
Patent Information
- Application Number
- HK42023069124
- Authority / Receiving Office
- HK · HK
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2041-06-30
AI Technical Summary
In existing technologies, the distribution of customer inquiries to customer service representatives can easily lead to uneven workloads and low efficiency.
By obtaining the service resource allocation list and the target number of objects to be served, a list splitting flag is set to divide the service resource allocation list into two sub-list areas, and objects to be served are allocated to each service resource provider according to the number of idle service resources.
It improved the efficiency of service resource allocation and balanced the workload of various service resource providers.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and specifically to a service resource allocation method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of information technology, various application products are widely used in people's lives. For application products with a large number of customers, there may be tens of thousands of users making customer service inquiries every day. How to evenly distribute the number of inquiries among customer service representatives to ensure that the workload of each representative is evenly distributed is a crucial aspect of the service scenarios of application products.
[0003] In current related technologies, customers are generally randomly assigned to various customer service representatives. This can easily lead to significant differences in workload among the representatives, and the allocation efficiency of this method is also low. Summary of the Invention
[0004] This application provides a service resource allocation method, apparatus, electronic device, and storage medium, which can improve the allocation efficiency of service resources and enhance the balance of workload among various service resource providers.
[0005] This application provides a service resource allocation method, including:
[0006] Obtain a service resource allocation list and the target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource. The status identifier indicates whether the service resource is in an idle state or a service state.
[0007] When the number of idle service resources in the service resource allocation list is greater than the target number, a list splitting identifier is set at the target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the idle service resources in the resource status queue.
[0008] The service resource allocation list is divided into two sub-list areas by moving the list dividing marker in the direction of the first list by a preset step size.
[0009] When the number of idle service resources in the target sublist area is not greater than the target number, the service objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sublist area.
[0010] Output resource allocation results.
[0011] Accordingly, embodiments of this application provide a service resource allocation apparatus, including:
[0012] The acquisition unit is used to acquire a service resource allocation list and the target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource. The status identifier indicates whether the service resource is in an idle state or a service state.
[0013] The setting unit is used to set a list splitting identifier at a target position in the service resource allocation list when the number of service resources in the idle state in the service resource allocation list is greater than the target number. The target position is determined according to the position of the status identifier of the service resources in the idle state in the resource status queue.
[0014] A moving unit is used to move the list dividing marker in the service resource allocation list in the direction of the first list by a preset step size, thereby dividing the service resource allocation list into two sub-list areas.
[0015] The allocation unit is used to allocate the service objects to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sublist area when the number of idle service resources in the target sublist area is not greater than the target number.
[0016] The output unit is used to output the resource allocation results.
[0017] Optionally, in some embodiments of this application, the resource status queue includes a service sub-status queue and an idle sub-status queue. The service sub-status queue includes status identifiers of service resources in a service state, and the idle sub-status queue includes status identifiers of service resources in an idle state.
[0018] Optionally, in some embodiments of this application, the service resource allocation device may further include a resource allocation unit, as follows:
[0019] The resource allocation unit is configured to allocate the service objects to each service resource provider based on the number of idle service resources corresponding to each service resource provider in the service resource allocation list when the number of idle service resources in the service resource allocation list is not greater than the target number.
[0020] Optionally, in some embodiments of this application, the service resource allocation device may further include an identifier movement unit and an update unit, as follows:
[0021] The identifier moving unit is used to move the list segment identifier in the service resource allocation list toward the first list direction by the preset step size when the number of service resources in the target sublist area that are in an idle state is greater than the target number.
[0022] The update unit is used to update the two sub-list areas of the service resource allocation list based on the moved list splitting identifier, to obtain the updated two sub-list areas, until the number of service resources in the target sub-list area that are in an idle state is not greater than the target number.
[0023] Optionally, in some embodiments of this application, the allocation unit may include a determining subunit and an allocation subunit, as follows:
[0024] The determining subunit is used to determine the initial number of pending objects to be allocated to each service resource provider based on the number of idle service resources corresponding to each service resource provider in the target sublist area.
[0025] The allocation subunit is used to allocate the objects to be served to each service resource provider based on the initial quantity and the target quantity.
[0026] Optionally, in some embodiments of this application, the allocation subunit may be used to allocate the service objects to each service resource provider based on the initial quantity when the sum of the initial quantities corresponding to each service resource provider is not less than the target quantity.
[0027] Optionally, in some embodiments of this application, the allocation subunit may be specifically used to determine the unallocated quantity of the objects to be served based on the initial quantity of each service resource provider and the target quantity when the sum of the initial quantities of each service resource provider is less than the target quantity; and to allocate the objects to be served to each service resource provider based on the unallocated quantity and the initial quantity of each service resource provider.
[0028] Optionally, in some embodiments of this application, the step "allocating the objects to be served to each service resource provider based on the unallocated quantity and the initial quantity corresponding to each service resource provider" may include:
[0029] Update the status identifier of the service resources that are idle in the target sublist area to the service status;
[0030] The list delimiter is moved in the direction of the second list by a preset step size in the service resource allocation list.
[0031] Based on the moved list splitting identifier, the two sub-list areas of the service resource allocation list are updated to obtain the updated two sub-list areas;
[0032] Based on the number of idle service resources in the updated target sublist area, the number of unallocated resources, and the initial number corresponding to each service resource provider, the service objects to be served are allocated to each service resource provider.
[0033] Optionally, in some embodiments of this application, the step of "assigning the service objects to be served to each service resource provider based on the number of service resources in an idle state in the updated target sublist area, the unallocated number, and the initial number corresponding to each service resource provider" may include:
[0034] When the number of idle service resources in the updated target sublist area is not less than the unallocated number, a reference number of pending objects to be allocated to each service resource provider is determined based on the idle service resources corresponding to each service resource provider in the updated target sublist area.
[0035] Based on the reference quantity, the initial quantity corresponding to each service resource provider is updated to obtain the target allocation quantity of the objects to be served to each service resource provider.
[0036] Based on the target allocation quantity, the service objects are allocated to each service resource provider.
[0037] Optionally, in some embodiments of this application, the step of "assigning the service objects to be served to each service resource provider based on the number of service resources in an idle state in the updated target sublist area, the unallocated number, and the initial number corresponding to each service resource provider" may include:
[0038] When the number of idle service resources in the updated target sublist area is less than the unallocated quantity, the initial quantity and the unallocated quantity corresponding to each service resource provider are updated based on the idle service resources corresponding to each service resource provider in the updated target sublist area.
[0039] Update the status flag of the service resources that are idle in the updated target sublist area to the service status;
[0040] Return to the step of moving the list delimiter in the service resource allocation list in the direction of the second list by a preset step size, so as to allocate the service object to each service resource provider.
[0041] An electronic device provided in this application includes a processor and a memory. The memory stores multiple instructions, and the processor loads the instructions to execute the steps in the service resource allocation method provided in this application.
[0042] Furthermore, embodiments of this application also provide a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps in the service resource allocation method provided in embodiments of this application.
[0043] This application provides a service resource allocation method, apparatus, electronic device, and storage medium. It can obtain a service resource allocation list and a target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. Each resource status queue includes a status identifier for at least one service resource, indicating whether the service resource is in an idle or serviced state. When the number of idle service resources in the service resource allocation list exceeds the target number, a list splitting identifier is set at a target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the idle service resources in the resource status queues. The list splitting identifier is moved in a first list direction with a preset step size, dividing the service resource allocation list into two sub-list areas. When the number of idle service resources in the target sub-list area is not greater than the target number, the objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area. The resource allocation result is then output. This application can allocate service resources by moving the list delimiter in the service resource allocation list, thereby improving the allocation efficiency of service resources and improving the balance of workload among various service resource providers. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1a This is a schematic diagram of a scenario illustrating the service resource allocation method provided in an embodiment of this application;
[0046] Figure 1b This is a flowchart of the service resource allocation method provided in the embodiments of this application;
[0047] Figure 1cThis is a schematic diagram illustrating the service resource allocation method provided in the embodiments of this application;
[0048] Figure 1d This is another illustrative diagram illustrating the service resource allocation method provided in the embodiments of this application;
[0049] Figure 1e This is another illustrative diagram illustrating the service resource allocation method provided in the embodiments of this application;
[0050] Figure 1f This is another illustrative diagram illustrating the service resource allocation method provided in the embodiments of this application;
[0051] Figure 1g This is another illustrative diagram illustrating the service resource allocation method provided in the embodiments of this application;
[0052] Figure 1h This is another illustrative diagram illustrating the service resource allocation method provided in the embodiments of this application;
[0053] Figure 1i This is an explanatory diagram of the service resource allocation method provided in the embodiments of this application;
[0054] Figure 2 This is another flowchart of the service resource allocation method provided in the embodiments of this application;
[0055] Figure 3 This is a schematic diagram of the service resource allocation device provided in the embodiments of this application;
[0056] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] This application provides a service resource allocation method, apparatus, electronic device, and storage medium. Specifically, the service resource allocation apparatus can be integrated into an electronic device, which may be a terminal or server, etc.
[0059] It is understood that the service resource allocation method of this embodiment can be executed on a terminal, on a server, or jointly by a terminal and a server. The above examples should not be construed as limiting this application.
[0060] like Figure 1a As shown, taking the joint execution of a service resource allocation method by a terminal and a server as an example, the service resource allocation system provided in this application embodiment includes a terminal 10 and a server 11, etc.; the terminal 10 and the server 11 are connected via a network, such as a wired or wireless network, etc., wherein the service resource allocation device can be integrated into the server.
[0061] Server 11 can be used to: obtain a service resource allocation list and a target number of objects to be served; the service resource allocation list includes resource status queues corresponding to multiple service resource providers, and the resource status queues include at least one service resource status identifier, which indicates whether the service resource is in an idle or service state; when the number of idle service resources in the service resource allocation list is greater than the target number, set a list splitting identifier at a target position in the service resource allocation list, the target position being determined based on the position of the status identifier of the idle service resources in the resource status queue; move the list splitting identifier in the service resource allocation list in a first list direction by a preset step size, dividing the service resource allocation list into two sub-list areas; when the number of idle service resources in the target sub-list area is not greater than the target number, allocate the objects to be served to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area; and output the resource allocation results to terminal 10. Server 11 can be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0062] Terminal 10 can receive resource allocation results sent by server 11 and allocate service resources to the target device based on these results. Terminal 10 may include a mobile phone, smart TV, tablet computer, laptop computer, or personal computer (PC). A client may also be configured on terminal 10, which can be an application client or a browser client, etc.
[0063] The steps of allocating service resources by server 11 can also be performed by terminal 10.
[0064] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0065] This embodiment will be described from the perspective of a service resource allocation device, which can be integrated into an electronic device, such as a server or a terminal.
[0066] The service resource allocation method of this application embodiment can be applied to various service resource allocation scenarios. For example, if an instant messaging application receives millions of customer service inquiries daily, the service resource allocation method provided in this embodiment can quickly allocate service resources, and can also improve the balance of workload among various service resource providers.
[0067] like Figure 1b As shown, the specific process of this service resource allocation method can be as follows:
[0068] 101. Obtain the service resource allocation list and the target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource. The status identifier indicates whether the service resource is in an idle state or a service state.
[0069] The service resource allocation list is specifically a list used to allocate service resources. The "clients to be served" refers to the customers to be served, and the target number of clients to be served is the number of customers requiring service. Service resource providers are the entities that provide the service resources; specifically, they can be customer service representatives. Each service resource provider can correspond to a resource status queue. Optionally, each service resource provider in the service resource allocation list can have the same number of service resources.
[0070] Specifically, in some embodiments, service resources can be represented by customer service seats. In an online customer service system, a customer service seat refers to the window through which a customer service representative receives inquiries from users, that is, the window through which they provide consultation services. Generally, a customer service representative can set up multiple customer service seats to handle inquiries from multiple customers simultaneously, while a service resource can be used to provide services to one customer.
[0071] Specifically, for a resource status queue corresponding to a certain service resource provider, the service resources in the resource status queue may include service status and idle status; or, the resource status queue may only contain service resources in service status; or, the resource status queue may only contain service resources in idle status, depending on the actual service situation of the service resource provider.
[0072] In some embodiments, the status identifiers of service resources in the resource status queue can be sorted according to preset rules. For example, in the resource status queue, the status identifiers of service resources in the service status can be arranged before the status identifiers of service resources in the idle status.
[0073] Optionally, in this embodiment, the resource status queue includes a service sub-status queue and an idle sub-status queue. The service sub-status queue includes status identifiers of service resources in a service state, and the idle sub-status queue includes status identifiers of service resources in an idle state.
[0074] In the resource status queue, the service sub-status queue and the idle sub-status queue can be connected.
[0075] In a specific scenario, such as Figure 1c The image shows a service resource allocation list, including 4 customer service representatives (i.e., service resource providers). Each customer service representative's resource status queue includes 8 customer service seats (i.e., service resource status identifiers). Each small box represents a customer service seat. Gray customer service seats indicate that their corresponding service resource status is "serviced," meaning they are currently serving customers, while white customer service seats are "idle." Figure 1c It can be seen that there are 13 service resources in the service resource allocation list that are in an idle state.
[0076] 102. When the number of service resources in the service resource allocation list that are in an idle state is greater than the target number, a list splitting identifier is set at the target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the service resources in the idle state in the resource status queue.
[0077] First, the number of idle service resources in the service resource allocation list can be counted to obtain the total number of idle resources. When the total number of idle resources exceeds the number of customers to be served (i.e., the target number), service resources can be allocated using the Hungarian matching method. Specifically, a list splitting marker can be set in the service resource allocation list, and service resources can be allocated based on the movement of the list splitting marker. This allows for the even and rapid batch allocation of customers to multiple customer service representatives, ensuring that the workload of each customer service representative is even, meaning that each customer service representative serves as many people as possible at the same time.
[0078] Among them, the Hungarian matching method is a combinatorial optimization algorithm that solves the task allocation problem in polynomial time; it is a trial-and-error method.
[0079] In some embodiments, the target location is specifically at either end of the resource status queue. Specifically, if the status identifier of an idle service resource is at the head of the resource status queue, then the target location is at the head of the queue, and a list split identifier can be set at the head of the resource status queue. If the status identifier of an idle service resource is at the tail of the resource status queue, then the target location is at the tail of the queue, and a list split identifier can be set at the tail of the resource status queue. This embodiment does not impose such limitations. It should be noted that the target location can be considered as the initial position of the list split identifier in the service resource allocation list.
[0080] In one specific embodiment, the list delimiter can be represented by a leader, such as... Figure 1d As shown, the resource status queues in the service resource allocation list can be aligned, and the target position can be the tail of each resource status queue, that is, a benchmark is set at the tail of each resource status queue. In this embodiment, each resource status queue can include the status identifiers of 8 service resources, and the target position of the benchmark can be recorded as k=8.
[0081] Optionally, in this embodiment, the service resource allocation method may further include:
[0082] When the number of idle service resources in the service resource allocation list is not greater than the target number, the service objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the service resource allocation list.
[0083] Specifically, when the number of customers requiring service (i.e., the target number) is greater than or equal to the number of idle service resources in the service resource allocation list (i.e., the total number of idle resources), service providers can directly allocate service objects to each provider with the same number of idle service resources in their resource status queues. For example, assuming that Customer Service 1 has 6 idle service resources in its resource status queue and Customer Service 2 has 3 idle service resources in its resource status queue, and the target number is greater than or equal to the total number of idle resources, 6 service objects can be directly allocated to Customer Service 1, or it can be considered as allocating 6 service objects to Customer Service 1 and directly allocating 3 service objects to Customer Service 2, that is, allocating 3 service objects to Customer Service 2.
[0084] 103. Move the list splitting identifier in the service resource allocation list in the direction of the first list by a preset step size to divide the service resource allocation list into two sub-list areas.
[0085] The preset step size can be set according to actual conditions, and this embodiment does not impose any restrictions on it. For example, the preset step size can be the length corresponding to the status identifier of a service resource. In this way, each time the preset step size is moved, it is equivalent to the list delimiter moving the length of the status identifier of a service resource in the resource status queue.
[0086] In some embodiments, the first list direction is the direction in which the list split identifier moves within the resource state queue. Specifically, if the list split identifier is located at the tail of the resource state queue, the first list direction can be towards the head of the resource state queue; conversely, if the list split identifier is located at the head of the resource state queue, the first list direction can be towards the tail of the resource state queue.
[0087] In a specific scenario, such as Figure 1d As shown, the service resource allocation list includes resource status queues for 4 customer service representatives. The list splitter is located at the target position in the service resource allocation list, that is, at position k=8. The preset step size can be set to the length of one service resource status identifier, that is, the preset step size is one square. The first list direction can be to the left of the marker (i.e., the list splitter). Moving the list splitter in the service resource allocation list one preset step towards the first list direction will divide the service resource allocation list into two sub-list areas, as shown below. Figure 1e As shown, the moved list divider is located at position k=7; there is a sublist area to the left of the list divider and a sublist area to the right of the list divider.
[0088] Optionally, in this embodiment, the service resource allocation method may further include:
[0089] When the number of idle service resources in the target sublist area is greater than the target number, the list segmentation identifier is moved in the service resource allocation list towards the first list direction by the preset step size.
[0090] Based on the moved list splitting identifier, the two sub-list areas of the service resource allocation list are updated to obtain the updated two sub-list areas, until the number of idle service resources in the target sub-list area is no greater than the target number.
[0091] Specifically, the target sublist area is the area in the first list direction of the list splitting identifier.
[0092] Specifically, if, after moving the list split marker in the service resource allocation list, the number of idle service resources in the resulting target sub-list area exceeds the target number, the list split marker needs to be moved again. The sub-list area is then updated based on the moved list split marker. If the number of idle service resources in the updated target sub-list area still exceeds the target number, the list split marker needs to be moved again, and the sub-list area updated, until the number of idle service resources in the target sub-list area is no greater than the target number.
[0093] In one embodiment, such as Figure 1e As shown, the target sublist area can specifically be the sublist area to the left of the list separator. Figure 1e It can be seen that there are 10 idle service resources in the target sublist area. If the target number of objects to be served is 9, then the number of idle service resources in the target sublist area is greater than the target number, and the list splitting marker still needs to be moved. For example, it can be moved towards the first list direction with a preset step size. The moved list splitting marker is as follows: Figure 1f As shown, the moved list delimiter is located at position k=6, and the sub-list region is updated based on the moved list delimiter. Specifically, the region to the left of the moved list delimiter is taken as the new target sub-list region. Figure 1f It can be seen that there are 7 idle service resources in the new target sublist area, while the target number of objects to be served is 9. Therefore, the number of idle service resources in the new target sublist area is not greater than the target number, and the loop process is broken.
[0094] 104. When the number of idle service resources in the target sublist area is not greater than the target number, the service resource to be served is allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sublist area.
[0095] Optionally, in this embodiment, the step "assigning the service objects to be served to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area" may include:
[0096] Based on the number of idle service resources corresponding to each service resource provider in the target sublist area, determine the initial number of pending objects to be allocated to each service resource provider.
[0097] Based on the initial quantity and the target quantity, the objects to be served are allocated to each service resource provider.
[0098] The initial number of pending objects allocated to each service resource provider can specifically be the number of idle service resources corresponding to each service resource provider within the target sublist area.
[0099] In some embodiments, such as Figure 1f As shown, when the list splitting identifier moves from k=8 to k=6, if the number of idle service resources in the target sublist area is not greater than the target number, then service objects can be assigned to each customer service representative based on the number of idle service resources in the resource status queue of each customer service representative in the target sublist area. Figure 1f Within the target sublist area, Customer Service 1 has 4 idle service resources in its resource status queue, Customer Service 2 has 1 idle service resource, Customer Service 3 has 2 idle service resources, and Customer Service 4 has 0 idle service resources. Based on the number of idle service resources in each customer service representative's resource status queue within the target sublist area, the initial number of pending service objects to be assigned to each customer service representative can be determined. For example, the initial number of pending service objects assigned to Customer Service 1 can be 4, to Customer Service 2 can be 1, to Customer Service 3 can be 2, and to Customer Service 4 can be 0. Figure 1g As shown, the number of shaded boxes in the resource status queue of each customer service representative represents the initial number of pending objects assigned to that customer service representative.
[0100] Optionally, in this embodiment, the step "allocating the objects to be served to each service resource provider based on the initial quantity and the target quantity" may include:
[0101] When the sum of the initial quantities of each service resource provider is not less than the target quantity, the service objects to be served are allocated to each service resource provider based on the initial quantities.
[0102] If the sum of the initial quantities corresponding to each service resource provider is not less than the target quantity, it means that the number of service resources in the target sublist area that are in an idle state is equal to the target quantity. Therefore, the service objects can be allocated just enough. In other words, the initial quantity corresponding to each service resource provider is the final target allocation quantity of the service objects allocated to that service resource provider. Based on the target allocation quantity, the service objects are allocated to each service resource provider, and the service resource allocation process ends.
[0103] Optionally, in this embodiment, the step "allocating the objects to be served to each service resource provider based on the initial quantity and the target quantity" may include:
[0104] When the sum of the initial quantities corresponding to each service resource provider is less than the target quantity, the unallocated quantity of the object to be served is determined based on the initial quantities corresponding to each service resource provider and the target quantity.
[0105] Based on the unallocated quantity and the initial quantity corresponding to each service resource provider, the objects to be served are allocated to each service resource provider.
[0106] If the sum of the initial quantities for each service resource provider is less than the target quantity, it means that there are still unassigned service objects. Therefore, it is necessary to determine the number of unassigned service objects (i.e., the unassigned quantity) and then allocate the remaining service objects to each service resource provider based on the number of unassigned objects.
[0107] This involves statistically analyzing the initial quantity of each service resource provider to obtain the initial quantity statistics, and then performing a difference calculation between the target quantity and the statistical results to obtain the unallocated quantity of the objects to be served.
[0108] Optionally, in this embodiment, the step "allocating the objects to be served to each service resource provider based on the unallocated quantity and the initial quantity corresponding to each service resource provider" may include:
[0109] Update the status identifier of the service resources that are idle in the target sublist area to the service status;
[0110] The list delimiter is moved in the direction of the second list by a preset step size in the service resource allocation list.
[0111] Based on the moved list splitting identifier, the two sub-list areas of the service resource allocation list are updated to obtain the updated two sub-list areas;
[0112] Based on the number of idle service resources in the updated target sublist area, the number of unallocated resources, and the initial number corresponding to each service resource provider, the service objects to be served are allocated to each service resource provider.
[0113] Specifically, the direction of the second list is the opposite of the direction of the first list. For example, if the first list direction is towards the head of the resource status queue, then the second list direction is towards the tail of the resource status queue. Conversely, if the first list direction is towards the tail of the resource status queue, then the second list direction is towards the head of the resource status queue.
[0114] Once the initial number of service recipients allocated to each service resource provider has been determined, the allocated service resources can be updated to a service status.
[0115] In a specific scenario, such as Figure 1g In the service resource allocation list shown, the number of shaded boxes in each resource status queue represents the initial number of pending objects allocated to each service resource provider. When the sum of the initial numbers for each service resource provider is less than the target number, the status of the shaded boxes can be updated from idle to service, and the benchmark (i.e., the list delimiter) can be moved towards the second list direction with a preset step size. Specifically, it can move from position k=6 to position k=7. The service resource allocation list after the benchmark movement is as follows: Figure 1h As shown, the sublist area can be updated based on the moved benchmark. Specifically, the area to the left of the moved benchmark can be used as the new target sublist area.
[0116] Optionally, in this embodiment, the step "assigning the service objects to each service resource provider based on the number of idle service resources in the updated target sublist area, the unallocated number, and the initial number corresponding to each service resource provider" may include:
[0117] When the number of idle service resources in the updated target sublist area is not less than the unallocated number, the reference number of pending objects to be allocated to each service resource provider is determined based on the idle service resources corresponding to each service resource provider in the updated target sublist area.
[0118] Based on the reference quantity, the initial quantity corresponding to each service resource provider is updated to obtain the target allocation quantity of the objects to be served to each service resource provider.
[0119] Based on the target allocation quantity, the service objects are allocated to each service resource provider.
[0120] For example, refer to Figure 1h Since the status identifier of the service resource within the shaded box has been updated to the service status, therefore, Figure 1hThe updated target sublist area has 3 idle service resources. If the target number of pending service objects is 9, and the initial number of pending service objects allocated to each customer service representative is 7, then the number of unallocated pending service objects is 2. Therefore, the number of idle service resources in the updated target sublist area is not less than the number of unallocated pending objects. Unallocated pending service objects can be allocated based on the idle service resources in the resource status queues of each customer service representative in the updated target sublist area. For example, if customer service representatives 1, 2, and 3 each have 1 idle service resource in their resource status queues in the updated target sublist area, while customer service representative 4 has 0 idle service resources in their resource status queue, and the number of unallocated pending service objects is 2, then these two unallocated pending service objects can be randomly allocated to two of customer service representatives 1, 2, and 3. For instance, they can be allocated to customer service representatives 1 and 2 respectively. Figure 1h As shown, the number of dotted boxes in the resource service queue represents the reference number of pending service objects allocated to the corresponding customer service representatives. This allocation process can be understood as updating the idle service resources in the updated target sub-list area based on the number of unallocated pending service objects.
[0121] The step "updating the initial quantity corresponding to each service resource provider based on the reference quantity to obtain the target allocation quantity of the objects to be served to each service resource provider" may include:
[0122] For each service resource provider, the initial quantity and reference quantity corresponding to the service resource provider are summed to obtain the target allocation quantity of the objects to be served to each service resource provider.
[0123] After calculating the target allocation quantity for each service resource provider, the corresponding target allocation quantity of service objects can be allocated to each service resource provider.
[0124] Optionally, in this embodiment, the step "assigning the service objects to each service resource provider based on the number of idle service resources in the updated target sublist area, the unallocated number, and the initial number corresponding to each service resource provider" may include:
[0125] When the number of idle service resources in the updated target sublist area is less than the unallocated quantity, the initial quantity and the unallocated quantity corresponding to each service resource provider are updated based on the idle service resources corresponding to each service resource provider in the updated target sublist area.
[0126] Update the status flag of the service resources that are idle in the updated target sublist area to the service status;
[0127] Return to the step of moving the list delimiter in the service resource allocation list in the direction of the second list by a preset step size, so as to allocate the service object to each service resource provider.
[0128] Specifically, if the number of idle service resources in the updated target sublist area is less than the number of unallocated resources, it indicates that further allocation of service objects is required. In this embodiment, the initial quantity corresponding to each service resource provider can be updated based on the number of idle service resources in the resource status queue of each service resource provider in the updated target sublist area, and the unallocated quantity can also be updated until all service objects are allocated.
[0129] Specifically, updating the unallocated quantity can be achieved by adding the number of idle service resources in the resource status queues of each service resource provider within the updated target sublist area to obtain the idle quantity, and then subtracting the idle quantity from the current unallocated quantity to get the updated unallocated quantity.
[0130] Specifically, the step "update the initial quantity corresponding to each service resource provider based on the number of idle service resources in the resource status queue of each service resource provider within the updated target sublist area" is as follows:
[0131] For each service resource provider, the current initial quantity of the service resource provider and the number of idle service resources in the resource status queue of the service resource provider in the updated target sublist area can be added together to obtain the updated initial quantity of the service resource provider's pending objects.
[0132] 105. Output resource allocation results.
[0133] Specifically, the resource allocation result is the target number of pending objects allocated to each service resource provider. Optionally, the resource allocation result can be sent to the terminal so that the terminal can allocate service resources based on the resource allocation result.
[0134] In a specific scenario, such as Figure 1iThe diagram illustrates the architecture and process of service resource allocation. In a customer service allocation system, a target number of customers to be served can be selected from a customer queue. Customers in the queue can be arranged according to their service request time; for example, customers with earlier service requests can be placed at the front of the queue, while those with later requests are placed further back. In this embodiment, the target number of customers (i.e., those to be served) at the front of the queue can be selected, and the resource status queue of at least one customer service representative (i.e., service resource provider) can be obtained. Then, the service resource allocation method provided in this application establishes a service association between the customer service representatives and the customers, that is, the target number of customers are allocated to each customer service representative. After allocation, a certain number of customers can be selected from the customer queue again for service resource allocation, and this process is repeated cyclically to perform the service resource allocation task.
[0135] The service resource allocation method proposed in this application can ensure that the batch allocation of 10,000 users in a 10,000-user online customer service system takes less than one second. This solves the problem of rapid matching of customer service personnel when 10,000 people are consulting in the customer service system, which can improve the utilization rate of customer service personnel and enhance the user consultation experience.
[0136] As can be seen from the above, this embodiment can obtain a service resource allocation list and a target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource, which indicates whether the service resource is in an idle or service state. When the number of idle service resources in the service resource allocation list is greater than the target number, a list splitting identifier is set at a target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the idle service resource in the resource status queue. The list splitting identifier is moved in the first list direction with a preset step size in the service resource allocation list, dividing the service resource allocation list into two sub-list areas. When the number of idle service resources in the target sub-list area is not greater than the target number, the objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area. The resource allocation result is output. This application can allocate service resources by moving the list splitting identifier in the service resource allocation list, thereby improving the allocation efficiency of service resources and improving the balance of workload among various service resource providers.
[0137] Based on the method described in the preceding embodiments, the following will provide a more detailed explanation by taking the specific integration of the service resource allocation device into a server as an example.
[0138] This application provides a service resource allocation method, such as... Figure 2 As shown, the specific process of this service resource allocation method can be as follows:
[0139] 201. The server obtains a service resource allocation list and the target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource. The status identifier indicates whether the service resource is in an idle state or a service state.
[0140] In this context, a service resource provider is an entity that provides services to others, specifically a customer service representative. Each service resource provider can correspond to a resource status queue. Optionally, each service resource provider in the service resource allocation list can have the same number of service resources.
[0141] Specifically, in some embodiments, service resources can be represented by customer service seats. In an online customer service system, a customer service seat refers to the window through which a customer service representative receives inquiries from users, that is, the window through which they provide consultation services. Generally, a customer service representative can set up multiple customer service seats to handle inquiries from multiple customers simultaneously, while a service resource can be used to provide services to one customer.
[0142] Specifically, for a resource status queue corresponding to a certain service resource provider, the service resources in the resource status queue may include service status and idle status; or, the resource status queue may only contain service resources in service status; or, the resource status queue may only contain service resources in idle status, depending on the actual service situation of the service resource provider.
[0143] In some embodiments, the status identifiers of service resources in the resource status queue can be sorted according to preset rules. For example, in the resource status queue, the status identifiers of service resources in the service status can be arranged before the status identifiers of service resources in the idle status.
[0144] Optionally, in this embodiment, the resource status queue includes a service sub-status queue and an idle sub-status queue. The service sub-status queue includes status identifiers of service resources in a service state, and the idle sub-status queue includes status identifiers of service resources in an idle state.
[0145] 202. The server determines whether the number of service resources in the service resource allocation list that are in an idle state is greater than the target number; if yes, proceed to step 204; if no, proceed to step 203.
[0146] 203. The server allocates the service objects to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the service resource allocation list, and ends the process.
[0147] Specifically, when the number of customers requiring service (i.e., the target number) is greater than or equal to the number of idle service resources in the service resource allocation list (i.e., the total number of idle resources), service providers can directly allocate service objects to each provider with the same number of idle service resources in their resource status queues. For example, assuming that Customer Service 1 has 6 idle service resources in its resource status queue and Customer Service 2 has 3 idle service resources in its resource status queue, and the target number is greater than or equal to the total number of idle resources, 6 service objects can be directly allocated to Customer Service 1, or it can be considered as allocating 6 service objects to Customer Service 1 and directly allocating 3 service objects to Customer Service 2, that is, allocating 3 service objects to Customer Service 2.
[0148] 204. The server sets a list splitting identifier at a target location in the service resource allocation list. The target location is determined based on the position of the status identifier of the service resource in the idle state in the resource status queue.
[0149] In some embodiments, the target location is specifically at either end of the resource status queue. Specifically, if the status identifier of an idle service resource is at the head of the resource status queue, then the target location is at the head of the queue, and a list split identifier can be set at the head of the resource status queue. If the status identifier of an idle service resource is at the tail of the resource status queue, then the target location is at the tail of the queue, and a list split identifier can be set at the tail of the resource status queue. This embodiment does not impose such limitations. It should be noted that the target location can be considered as the initial position of the list split identifier in the service resource allocation list.
[0150] 205. The server moves the list splitting identifier in the service resource allocation list in the direction of the first list by a preset step size, thereby dividing the service resource allocation list into two sub-list areas.
[0151] The preset step size can be set according to actual conditions, and this embodiment does not impose any restrictions on it. For example, the preset step size can be the length corresponding to the status identifier of a service resource. In this way, each time the preset step size is moved, it is equivalent to the list delimiter moving the length of the status identifier of a service resource in the resource status queue.
[0152] In some embodiments, the first list direction is the direction in which the list split identifier moves within the resource state queue. Specifically, if the list split identifier is located at the tail of the resource state queue, the first list direction can be towards the head of the resource state queue; conversely, if the list split identifier is located at the head of the resource state queue, the first list direction can be towards the tail of the resource state queue.
[0153] 206. The server determines whether the number of service resources in the target sublist area that are in an idle state is greater than the target number. If yes, proceed to step 207; if no, proceed to step 208.
[0154] Specifically, the target sublist area is the area in the first list direction of the list splitting identifier.
[0155] 207. The server moves the list segmentation identifier in the service resource allocation list towards the first list direction by the preset step size; based on the moved list segmentation identifier, the server updates the two sub-list areas of the service resource allocation list to obtain the updated two sub-list areas, and returns to step 206 until the number of service resources in the target sub-list area that are in an idle state is not greater than the target number.
[0156] 208. The server allocates the objects to be served to each service resource provider based on the number of idle service resources corresponding to each service resource provider in the target sublist area.
[0157] Optionally, in this embodiment, the step "assigning the service objects to be served to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area" may include:
[0158] Based on the number of idle service resources corresponding to each service resource provider in the target sublist area, determine the initial number of pending objects to be allocated to each service resource provider.
[0159] Based on the initial quantity and the target quantity, the objects to be served are allocated to each service resource provider.
[0160] 209. The server outputs the resource allocation results.
[0161] As can be seen from the above, this embodiment can obtain a service resource allocation list and a target number of objects to be served through a server. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource, which indicates whether the service resource is in an idle or service state. The system then determines whether the number of idle service resources in the service resource allocation list is greater than the target number. If not, based on the number of idle service resources corresponding to each service resource provider in the service resource allocation list, the system allocates the objects to be served to each service resource provider and ends the process. If yes, a list splitting identifier is set at a target position in the service resource allocation list, where the target position is determined based on the position of the status identifier of the idle service resource in the resource status queue. The method involves moving the list splitting marker in the service resource allocation list towards the first list direction by a preset step size, dividing the service resource allocation list into two sub-list areas. It then determines whether the number of idle service resources in the target sub-list area is greater than the target number. If so, the list splitting marker is moved in the service resource allocation list towards the first list direction by the preset step size. Based on the moved list splitting marker, the two sub-list areas of the service resource allocation list are updated to obtain updated sub-list areas until the number of idle service resources in the target sub-list area is not greater than the target number. If not, the service resources are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area. The server outputs the resource allocation result. This application can allocate service resources by moving the list splitting marker in the service resource allocation list, improving the efficiency of service resource allocation and simultaneously improving the balance of workload among various service resource providers.
[0162] To better implement the above methods, embodiments of this application also provide a service resource allocation device, such as... Figure 3 As shown, the service resource allocation device may include an acquisition unit 301, a setting unit 302, a moving unit 303, an allocation unit 304, and an output unit 305, as follows:
[0163] (1) Obtain unit 301;
[0164] The acquisition unit 301 is used to acquire a service resource allocation list and a target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource. The status identifier indicates whether the service resource is in an idle state or a service state.
[0165] Optionally, in some embodiments of this application, the resource status queue includes a service sub-status queue and an idle sub-status queue. The service sub-status queue includes status identifiers of service resources in a service state, and the idle sub-status queue includes status identifiers of service resources in an idle state.
[0166] (2) Set unit 302;
[0167] Setting unit 302 is used to set a list splitting identifier at a target position in the service resource allocation list when the number of service resources in the idle state in the service resource allocation list is greater than the target number. The target position is determined according to the position of the status identifier of the service resources in the idle state in the resource status queue.
[0168] Optionally, in some embodiments of this application, the service resource allocation device may further include a resource allocation unit, as follows:
[0169] The resource allocation unit is configured to allocate the service objects to each service resource provider based on the number of idle service resources corresponding to each service resource provider in the service resource allocation list when the number of idle service resources in the service resource allocation list is not greater than the target number.
[0170] (3) Moving unit 303;
[0171] The moving unit 303 is used to move the list dividing marker in the service resource allocation list in the direction of the first list by a preset step size, thereby dividing the service resource allocation list into two sub-list areas.
[0172] Optionally, in some embodiments of this application, the service resource allocation device may further include an identifier movement unit and an update unit, as follows:
[0173] The identifier moving unit is used to move the list segment identifier in the service resource allocation list toward the first list direction by the preset step size when the number of service resources in the target sublist area that are in an idle state is greater than the target number.
[0174] The update unit is used to update the two sub-list areas of the service resource allocation list based on the moved list splitting identifier, to obtain the updated two sub-list areas, until the number of service resources in the target sub-list area that are in an idle state is not greater than the target number.
[0175] (4) Allocation unit 304;
[0176] The allocation unit 304 is used to allocate the service objects to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sublist area when the number of idle service resources in the target sublist area is not greater than the target number.
[0177] Optionally, in some embodiments of this application, the allocation unit may include a determining subunit and an allocation subunit, as follows:
[0178] The determining subunit is used to determine the initial number of pending objects to be allocated to each service resource provider based on the number of idle service resources corresponding to each service resource provider in the target sublist area.
[0179] The allocation subunit is used to allocate the objects to be served to each service resource provider based on the initial quantity and the target quantity.
[0180] Optionally, in some embodiments of this application, the allocation subunit may be used to allocate the service objects to each service resource provider based on the initial quantity when the sum of the initial quantities corresponding to each service resource provider is not less than the target quantity.
[0181] Optionally, in some embodiments of this application, the allocation subunit may be specifically used to determine the unallocated quantity of the objects to be served based on the initial quantity of each service resource provider and the target quantity when the sum of the initial quantities of each service resource provider is less than the target quantity; and to allocate the objects to be served to each service resource provider based on the unallocated quantity and the initial quantity of each service resource provider.
[0182] Optionally, in some embodiments of this application, the step "allocating the objects to be served to each service resource provider based on the unallocated quantity and the initial quantity corresponding to each service resource provider" may include:
[0183] Update the status identifier of the service resources that are idle in the target sublist area to the service status;
[0184] The list delimiter is moved in the direction of the second list by a preset step size in the service resource allocation list.
[0185] Based on the moved list splitting identifier, the two sub-list areas of the service resource allocation list are updated to obtain the updated two sub-list areas;
[0186] Based on the number of idle service resources in the updated target sublist area, the number of unallocated resources, and the initial number corresponding to each service resource provider, the service objects to be served are allocated to each service resource provider.
[0187] Optionally, in some embodiments of this application, the step of "assigning the service objects to be served to each service resource provider based on the number of service resources in an idle state in the updated target sublist area, the unallocated number, and the initial number corresponding to each service resource provider" may include:
[0188] When the number of idle service resources in the updated target sublist area is not less than the unallocated number, the reference number of pending objects to be allocated to each service resource provider is determined based on the idle service resources corresponding to each service resource provider in the updated target sublist area.
[0189] Based on the reference quantity, the initial quantity corresponding to each service resource provider is updated to obtain the target allocation quantity of the objects to be served to each service resource provider.
[0190] Based on the target allocation quantity, the service objects are allocated to each service resource provider.
[0191] Optionally, in some embodiments of this application, the step of "assigning the service objects to be served to each service resource provider based on the number of service resources in an idle state in the updated target sublist area, the unallocated number, and the initial number corresponding to each service resource provider" may include:
[0192] When the number of idle service resources in the updated target sublist area is less than the unallocated quantity, the initial quantity and the unallocated quantity corresponding to each service resource provider are updated based on the idle service resources corresponding to each service resource provider in the updated target sublist area.
[0193] Update the status flag of the service resources that are idle in the updated target sublist area to the service status;
[0194] Return to the step of moving the list delimiter in the service resource allocation list in the direction of the second list by a preset step size, so as to allocate the service object to each service resource provider.
[0195] (5) Output unit 305;
[0196] Output unit 305 is used to output the resource allocation results.
[0197] As can be seen from the above, in this embodiment, the service resource allocation list and the target number of objects to be served can be obtained by the acquisition unit 301. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource. The status identifier indicates whether the service resource is in an idle state or a service state. When the number of service resources in the service resource allocation list that are in an idle state is greater than the target number, the setting unit 302 sets a list splitting identifier at a target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the service resource in the idle state in the resource status queue. The moving unit 303 moves the list splitting identifier in the service resource allocation list in the direction of the first list with a preset step size, dividing the service resource allocation list into two sub-list areas. When the number of service resources in the target sub-list area that are in an idle state is not greater than the target number, the allocation unit 304 allocates the objects to be served to each service resource provider according to the number of service resources in the target sub-list area that are in an idle state. The output unit 305 outputs the resource allocation result. This application can allocate service resources by moving the list delimiter in the service resource allocation list, thereby improving the allocation efficiency of service resources and improving the balance of workload among various service resource providers.
[0198] This application also provides an electronic device, such as... Figure 4 The diagram shows a structural schematic of an electronic device involved in an embodiment of this application. This electronic device can be a terminal or a server, specifically:
[0199] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0200] The processor 401 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0201] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0202] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0203] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0204] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:
[0205] Obtain a service resource allocation list and a target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. Each resource status queue includes a status identifier for at least one service resource, indicating whether the service resource is in an idle or serviced state. When the number of idle service resources in the service resource allocation list exceeds the target number, a list splitting identifier is set at a target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the idle service resources in the resource status queue. The list splitting identifier is moved in the service resource allocation list towards a first list direction by a preset step size, dividing the service resource allocation list into two sub-list areas. When the number of idle service resources in the target sub-list area is not greater than the target number, the objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area. The resource allocation result is then output.
[0206] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0207] As can be seen from the above, this embodiment can obtain a service resource allocation list and a target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. The resource status queue includes a status identifier of at least one service resource, which indicates whether the service resource is in an idle or service state. When the number of idle service resources in the service resource allocation list is greater than the target number, a list splitting identifier is set at a target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the idle service resource in the resource status queue. The list splitting identifier is moved in the first list direction with a preset step size in the service resource allocation list, dividing the service resource allocation list into two sub-list areas. When the number of idle service resources in the target sub-list area is not greater than the target number, the objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area. The resource allocation result is output. This application can allocate service resources by moving the list splitting identifier in the service resource allocation list, thereby improving the allocation efficiency of service resources and improving the balance of workload among various service resource providers.
[0208] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0209] Therefore, embodiments of this application provide a storage medium storing multiple instructions that can be loaded by a processor to execute steps in any of the service resource allocation methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0210] Obtain a service resource allocation list and a target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. Each resource status queue includes a status identifier for at least one service resource, indicating whether the service resource is in an idle or serviced state. When the number of idle service resources in the service resource allocation list exceeds the target number, a list splitting identifier is set at a target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the idle service resources in the resource status queue. The list splitting identifier is moved in the service resource allocation list towards a first list direction by a preset step size, dividing the service resource allocation list into two sub-list areas. When the number of idle service resources in the target sub-list area is not greater than the target number, the objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sub-list area. The resource allocation result is then output.
[0211] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0212] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0213] Since the instructions stored in the storage medium can execute the steps in any of the service resource allocation methods provided in the embodiments of this application, the beneficial effects that any of the service resource allocation methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0214] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations of the above-described service resource allocation.
[0215] The above provides a detailed description of a service resource allocation method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A service resource allocation method, characterized in that, include: Obtain a service resource allocation list and the target number of objects to be served. The service resource allocation list includes resource status queues corresponding to multiple service resource providers. Each resource status queue uniquely corresponds to a service resource provider. Each resource status queue includes a status identifier of the service resource of its corresponding service resource provider. The status identifier indicates whether the service resource is in an idle state or a service state. When the number of idle service resources in the service resource allocation list is greater than the target number, a list splitting identifier is set at the target position in the service resource allocation list. The target position is determined based on the position of the status identifier of the idle service resources in the resource status queue. When the number of idle service resources in the service resource allocation list is not greater than the target number, the service objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the service resource allocation list. The service resource allocation list is divided into two sub-list areas by moving the list dividing marker in the direction of the first list by a preset step size. When the number of idle service resources in the target sublist area is greater than the target number, the list segmentation identifier is moved in the service resource allocation list towards the first list direction by the preset step size; based on the moved list segmentation identifier, the two sublist areas of the service resource allocation list are updated to obtain the updated two sublist areas, until the number of idle service resources in the target sublist area is not greater than the target number. When the number of idle service resources in the target sublist area is not greater than the target number, the service objects to be served are allocated to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sublist area. Output resource allocation results.
2. The method according to claim 1, characterized in that, The resource status queue includes a service sub-status queue and an idle sub-status queue. The service sub-status queue includes status identifiers of service resources that are in a service state, and the idle sub-status queue includes status identifiers of service resources that are in an idle state.
3. The method according to claim 1, characterized in that, The step of allocating the objects to be served to each service resource provider based on the number of idle service resources corresponding to each service resource provider within the target sub-list area includes: Based on the number of idle service resources corresponding to each service resource provider in the target sublist area, determine the initial number of pending objects to be allocated to each service resource provider. Based on the initial quantity and the target quantity, the objects to be served are allocated to each service resource provider.
4. The method according to claim 3, characterized in that, The process of allocating the objects to be served to each service resource provider based on the initial quantity and the target quantity includes: When the sum of the initial quantities of each service resource provider is not less than the target quantity, the service objects to be served are allocated to each service resource provider based on the initial quantities.
5. The method according to claim 3, characterized in that, The process of allocating the objects to be served to each service resource provider based on the initial quantity and the target quantity includes: When the sum of the initial quantities corresponding to each service resource provider is less than the target quantity, the unallocated quantity of the object to be served is determined based on the initial quantities corresponding to each service resource provider and the target quantity. Based on the unallocated quantity and the initial quantity corresponding to each service resource provider, the objects to be served are allocated to each service resource provider.
6. The method according to claim 5, characterized in that, The process of allocating the objects to be served to each service resource provider based on the unallocated quantity and the initial quantity corresponding to each service resource provider includes: Update the status identifier of the service resources that are idle in the target sublist area to the service status; The list delimiter is moved in the direction of the second list by a preset step size in the service resource allocation list. Based on the moved list splitting identifier, the two sub-list areas of the service resource allocation list are updated to obtain the updated two sub-list areas; Based on the number of idle service resources in the updated target sublist area, the number of unallocated resources, and the initial number corresponding to each service resource provider, the service objects to be served are allocated to each service resource provider.
7. The method according to claim 6, characterized in that, The process of allocating the service objects to be served to each service resource provider based on the number of idle service resources in the updated target sublist area, the number of unallocated resources, and the initial number corresponding to each service resource provider includes: When the number of idle service resources in the updated target sublist area is not less than the unallocated number, a reference number of pending objects to be allocated to each service resource provider is determined based on the idle service resources corresponding to each service resource provider in the updated target sublist area. Based on the reference quantity, the initial quantity corresponding to each service resource provider is updated to obtain the target allocation quantity of the objects to be served to each service resource provider. Based on the target allocation quantity, the service objects are allocated to each service resource provider.
8. The method according to claim 6, characterized in that, The process of allocating the service objects to be served to each service resource provider based on the number of idle service resources in the updated target sublist area, the number of unallocated resources, and the initial number corresponding to each service resource provider includes: When the number of idle service resources in the updated target sublist area is less than the unallocated quantity, the initial quantity and the unallocated quantity corresponding to each service resource provider are updated based on the idle service resources corresponding to each service resource provider in the updated target sublist area. Update the status flag of the service resources that are idle in the updated target sublist area to the service status; Return to the step of moving the list delimiter in the service resource allocation list in the direction of the second list by a preset step size, so as to allocate the service object to each service resource provider.
9. A service resource allocation device, characterized in that, include: The acquisition unit is used to acquire a service resource allocation list and the target number of objects to be served. The service resource allocation list includes multiple resource status queues corresponding to service resource providers. Each resource status queue uniquely corresponds to a service resource provider. Each resource status queue includes a status identifier of the service resource of its corresponding service resource provider. The status identifier indicates whether the service resource is in an idle state or a service state. The setting unit is used to set a list splitting identifier at a target position in the service resource allocation list when the number of service resources in the idle state in the service resource allocation list is greater than the target number. The target position is determined according to the position of the status identifier of the service resources in the idle state in the resource status queue. The resource allocation unit is used to allocate the service objects to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the service resource allocation list when the number of idle service resources in the service resource allocation list is not greater than the target number. A moving unit is used to move the list dividing marker in the service resource allocation list in the direction of the first list by a preset step size, thereby dividing the service resource allocation list into two sub-list areas. The identification movement unit is used to move the list segmentation identifier in the service resource allocation list towards the first list direction by the preset step size when the number of service resources in the target sublist area is greater than the target number. The update unit is used to update the two sub-list areas of the service resource allocation list based on the moved list splitting identifier to obtain the updated two sub-list areas until the number of service resources in the target sub-list area that are in an idle state is not greater than the target number. The allocation unit is used to allocate the service objects to each service resource provider according to the number of idle service resources corresponding to each service resource provider in the target sublist area when the number of idle service resources in the target sublist area is not greater than the target number. The output unit is used to output the resource allocation results.
10. An electronic device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor runs the application program within the memory to perform the operations in the service resource allocation method according to any one of claims 1 to 8.
11. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the steps of the service resource allocation method according to any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium; the processor of the computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the service resource allocation method according to any one of claims 1 to 8.