Task management method and device
By grouping and sorting customer service personnel and using a hash ring to determine the target grouping queue, the problem of unreasonable task allocation under the polling method is solved, the user experience and task allocation efficiency are improved, and it is suitable for task management in the customer service system.
Patent Information
- Application Number
- CN202310751227.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2024-12-27
AI Technical Summary
In the existing customer service system, the polling method can not achieve differentiated and reasonable allocation of tasks to different customer service personnel, resulting in poor user experience and the inability to evaluate the work efficiency of customer service personnel.
By grouping and sorting customer service personnel, using a hash ring to determine the target group queue of pending tasks, and assigning tasks to the target customer service personnel who are ranked first, reducing the time complexity of the LRU algorithm.
It improves user experience, is conducive to the assessment of the task volume of customer service personnel, and improves the efficiency of task allocation.
Smart Images

Figure CN119204467A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a task management method and device. Background Art
[0002] In the customer service system, the efficiency and satisfaction of customer service staff in responding to user outbound call requests have a great impact on user experience. At present, the customer service system uses polling to allocate tasks, which has the advantages of simple implementation and equal distribution of tasks. However, this method cannot achieve differentiated and reasonable allocation of tasks for different customer service staff, resulting in poor user experience, and it is impossible to evaluate the work efficiency of customer service staff by the amount of tasks. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a method for task management, by grouping and sorting customer service personnel to obtain a group queue, using a hash ring to determine the target group queue corresponding to the task to be processed, and then assigning the task to be processed to the target customer service personnel who is ranked first for processing, thereby improving the user experience, and at the same time facilitating the assessment of the task volume of the customer service personnel, reducing the time complexity of the LRU algorithm.
[0004] To achieve the above object, according to one aspect of an embodiment of the present invention, a task management method is provided, comprising:
[0005] Obtaining a first mapping result of a group queue corresponding to each group in a hash ring, wherein the group is obtained by dividing all customer service personnel, and the group queue is obtained by sorting each customer service personnel in the group;
[0006] In response to receiving a task to be processed, determining a second mapping result of the task to be processed in the hash ring;
[0007] A target group queue corresponding to the task to be processed is determined according to the first mapping result and the second mapping result, and the task to be processed is assigned to the target customer service personnel ranked first in the target group queue.
[0008] Optionally, divide all customer service personnel into:
[0009] Get the region ID corresponding to each customer service staff;
[0010] All customer service personnel are divided into a plurality of groups according to the area identifications.
[0011] Optionally, sorting the customer service personnel in the group includes:
[0012] Obtaining a first weight of each customer service staff in the group; the first weight indicates a scoring result of the customer service staff;
[0013] The customer service personnel in the group are sorted according to the first weight to obtain a group queue corresponding to the group.
[0014] Optionally, the first mapping result indicates a first slot of the packet queue in the hash ring, and obtaining a first mapping result of the packet queue corresponding to each packet in the hash ring includes:
[0015] Obtaining a group identifier corresponding to the group queue;
[0016] Determine a hash value corresponding to the group queue according to the group identifier;
[0017] The first slot is determined according to a hash value corresponding to the group queue.
[0018] Optionally, the second mapping result indicates a second slot of the task to be processed in the hash ring; determining the second mapping result of the task to be processed in the hash ring includes:
[0019] Obtaining a user ID corresponding to the task to be processed;
[0020] Determine the hash value corresponding to the task to be processed according to the user identifier;
[0021] The second slot is determined according to the hash value corresponding to the task to be processed.
[0022] Optionally, the first mapping result indicates a first slot of the packet queue in the hash ring, and the second mapping result indicates a second slot of the task to be processed in the hash ring; determining a target packet queue corresponding to the task to be processed according to the first mapping result and the second mapping result includes:
[0023] Determine whether there is a first slot that is the same as the second slot;
[0024] If so, taking the first slot identical to the second slot as the target slot, and determining the target group queue according to the group queue corresponding to the target slot;
[0025] If not, search the hash ring for the first slot closest to the second slot in a clockwise direction, take the first slot closest to the second slot as the target slot, and determine the target group queue according to the group queue corresponding to the target slot.
[0026] Optionally, the task to be processed indicates a user identifier; and determining the target group queue according to the group queue corresponding to the target slot includes:
[0027] If the target slot corresponds to a group queue, the group queue is used as the target group queue;
[0028] If the target slot corresponds to multiple packet queues, obtain the number of packet queues corresponding to the target slot; determine the hash value corresponding to the user identifier according to the number of packet queues, and determine the target packet queue according to the hash value corresponding to the user identifier.
[0029] Optionally, after allocating the to-be-processed task to the target customer service personnel ranked first in the target group queue, the method further comprises:
[0030] Enable the target customer service personnel to process the pending tasks and leave the target group queue;
[0031] After the target customer service staff completes the pending task, obtaining a second weight corresponding to the pending task;
[0032] Updating the first weight according to the second weight to obtain an updated first weight;
[0033] Determine the sorting position of the target customer service staff in the target group queue according to the updated first weight;
[0034] The target customer service personnel are inserted into the target group queue according to the sorting position to update the target group queue.
[0035] According to another aspect of an embodiment of the present invention, there is provided a task management device, comprising:
[0036] An acquisition module, which acquires a first mapping result of a group queue corresponding to each group in a hash ring, wherein the group is obtained by dividing all customer service personnel, and the group queue is obtained by sorting each customer service personnel in the group;
[0037] A first determining module determines a first mapping result of the packet queue in the hash ring;
[0038] A second determining module, in response to receiving a task to be processed, determines a second mapping result of the task to be processed in the hash ring;
[0039] The allocation module determines a target group queue corresponding to the task to be processed according to the first mapping result and the second mapping result, and allocates the task to be processed to a target customer service personnel ranked first in the target group queue.
[0040] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0041] one or more processors;
[0042] a storage device for storing one or more programs,
[0043] When the one or more programs are executed by the one or more processors, the one or more processors implement the task management method provided by the present invention.
[0044] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for task management provided by the present invention is implemented.
[0045] An embodiment of the above invention has the following advantages or beneficial effects: the task management method is implemented using a weighted LRU algorithm, first obtaining a first mapping result of the group queue corresponding to each group in the hash ring; after receiving the task to be processed, determining a second mapping result of the task to be processed in the hash ring, determining the target group queue corresponding to the task to be processed based on the first mapping result and the second mapping result, and then assigning the task to be processed to the target customer service personnel ranked first in the target group queue, so that the target customer service personnel processes the task to be processed, thereby realizing the assignment of the task to be processed. The task management method obtains a group queue by grouping and sorting customer service personnel, and uses the mapping results of the group queue and the pending tasks on the hash ring to determine the target group queue corresponding to the pending tasks, and then determines the target customer service personnel, so that the pending tasks are preferentially assigned to the target customer service personnel, and the tasks are preferentially assigned to the customer service personnel with higher user satisfaction, thereby improving the user experience; and the method can distinguish the task volume of the customer service personnel, so that the customer service personnel with higher ranking in the target group queue are increased, providing a reference indicator for the performance evaluation of the customer service personnel; the task management method reduces the time complexity of the algorithm by grouping and sorting the customer service personnel and using the mapping of the hash ring to determine the target customer service personnel, thereby improving the efficiency of task allocation.
[0046] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0048] Figure 1 is a schematic diagram of the main process of a task management method according to an embodiment of the present invention;
[0049] Figure 2 is a schematic diagram of the main process of another task management method according to an embodiment of the present invention;
[0050] Figure 3 is a schematic diagram of the main process of another task management method according to an embodiment of the present invention;
[0051] Figure 4 is a schematic diagram of main modules of a task management apparatus according to an embodiment of the present invention;
[0052] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0053] Figure 6 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
[0054] 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.
[0055] Figure 1 is a schematic diagram of the main process of a task management method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0056] Step S101: obtaining a first mapping result of a group queue corresponding to each group in a hash ring, where the group is obtained by dividing all customer service personnel, and the group queue is obtained by sorting each customer service personnel in the group;
[0057] Step S102: in response to receiving the task to be processed, determining a second mapping result of the task to be processed in the hash ring;
[0058] Step S103: determining a target group queue corresponding to the task to be processed according to the first mapping result and the second mapping result, and assigning the task to be processed to the target customer service personnel ranked first in the target group queue.
[0059] In an embodiment of the present invention, the task management method can be applied to a customer service system to assign tasks of user outbound call requests to customer service personnel in the customer service system to improve user experience.
[0060] In the embodiment of the present invention, the first mapping result of the group queue corresponding to each group in the hash ring is first obtained. Prior to this, all customer service personnel of the customer service system are obtained, all customer service personnel are divided into multiple groups, and all customer service personnel in each group are sorted to obtain the group queue. The data structure of the group queue is a bidirectional linked list structure, which can reduce the complexity of data addition and deletion, such as reducing the complexity of customer service personnel leaving or inserting the group queue.
[0061] In an embodiment of the present invention, all customer service personnel are divided into multiple groups. The division can be performed by random grouping. According to the number of all customer service personnel and the preset number of customer service personnel in each group or the number of divided groups, all customer service personnel are divided into multiple groups, each group including multiple customer service personnel.
[0062] In an embodiment of the present invention, all customer service personnel are divided, including: obtaining the area identifier corresponding to each customer service personnel; and dividing all customer service personnel into multiple groups according to the area identifier, that is, dividing the same area identifier into one group, and the number of groups is determined according to the number of area identifiers.
[0063] In an embodiment of the present invention, a group queue corresponds to a group, and the group queue is obtained after sorting each customer service staff in the group. Sorting each customer service staff in each group may include: obtaining the task volume of each customer service staff, sorting each customer service staff in the group in descending order according to the task volume, and obtaining a group queue corresponding to the group. Sorting each customer service staff in the group according to the task volume can give priority to assigning tasks to customer service staff with a larger task volume, which is conducive to assessing the task volume of the customer service staff.
[0064] In an embodiment of the present invention, sorting the customer service personnel in a group includes: obtaining a first weight of each customer service personnel in the group; the first weight indicates a scoring result of the customer service personnel; and sorting the customer service personnel in the group according to the first weight to obtain a group queue corresponding to the group.
[0065] When sorting the customer service personnel in each group, the sorting can be performed according to the first weight of each customer service personnel. The first weight can be a user score. The user score is used to sort the customer service personnel in the group, so that when the tasks to be processed are assigned, they can be assigned to customer service personnel with higher user scores first, thereby improving the user experience. Among them, the user score can be obtained based on the number of tasks handled by the customer service personnel and the user's score after each task is processed, such as the average of the user scores of multiple tasks. The first weight can also be a score set according to other preset rules.
[0066] In an embodiment of the present invention, the first mapping result indicates the first slot of the group queue in the hash ring, and obtaining the first mapping result of the group queue corresponding to each group in the hash ring includes: obtaining the group identifier corresponding to the group queue; determining the hash value corresponding to the group queue according to the group identifier; and determining the first slot according to the hash value corresponding to the group queue.
[0067] In an embodiment of the present invention, the first mapping result of the group queue corresponding to each group in the hash ring is the position of the group queue in the hash ring, that is, the first slot. The hash ring includes a preset number of slots, such as 16384 or, that is, the hash ring has 16384 slots. Each slot can correspond to one or more group queues. When all customer service personnel are divided, multiple groups are obtained, each group has a corresponding group identifier, and the group identifier can be a group number, that is, after multiple groups are divided, each group can be numbered according to the number of groups, and each group queue has a corresponding group identifier. According to the group identifier, a consistent hashing algorithm is used to obtain a hash value corresponding to the group identifier. Specifically, the number of slots in the hash ring is modulo the user identifier to obtain a hash value corresponding to the group queue, and then the hash value corresponding to the group queue obtains the first slot of the group queue in the hash ring, and each first slot can correspond to one or more group queues.
[0068] In an embodiment of the present invention, the second mapping result indicates the second slot of the task to be processed in the hash ring; determining the second mapping result of the task to be processed in the hash ring includes: obtaining a user identifier corresponding to the task to be processed; determining a hash value corresponding to the task to be processed based on the user identifier; determining the second slot based on the hash value corresponding to the task to be processed.
[0069] In an embodiment of the present invention, the second mapping result of the pending task in the hash ring is the second slot of the pending task in the hash ring. When determining the second slot of the pending task in the hash ring, obtain the user identifier corresponding to the pending task. The pending task is a call request of the user, that is, the pending task is an outbound call task of the user. Therefore, the pending task indicates the user identifier, and the user identifier can be a preset user number. Then, the hash value corresponding to the pending task is determined according to the user identifier and the consistent hashing algorithm. Specifically, the hash value corresponding to the pending task is determined according to the user identifier and the consistent hashing algorithm, including: using the user identifier to take the modulus of the number of slots in the hash ring to obtain the hash value corresponding to the pending task. Then, the position of the pending task in the hash ring can be determined according to the hash value corresponding to the pending task.
[0070] In an embodiment of the present invention, after receiving the task to be processed, a task number can be assigned to the task to be processed, and the hash value corresponding to the task to be processed can be determined according to the task code using a consistent hashing algorithm, and the second slot can be determined according to the hash value corresponding to the task to be processed and the number of slots in the hash ring.
[0071] In the embodiment of the present invention, the first mapping result indicates the first slot of the packet queue in the hash ring, and the second mapping result indicates the second slot of the task to be processed in the hash ring; Figure 2 As shown, in step S103, determining the target group queue corresponding to the task to be processed according to the first mapping result and the second mapping result includes:
[0072] Step S201: Determine whether there is a first slot that is the same as the second slot; if so, execute step S202; if not, execute step S203;
[0073] Step S202: taking the first slot identical to the second slot as the target slot, and determining the target group queue according to the group queue corresponding to the target slot;
[0074] Step S203: searching the hash ring for the first slot closest to the second slot in a clockwise direction, taking the first slot closest to the second slot as the target slot, and determining the target packet queue according to the packet queue corresponding to the target slot.
[0075] In an embodiment of the present invention, when determining the target group queue corresponding to the task to be processed, it is first determined whether there is a first slot that is the same as the second slot. If so, the first slot is used as the target slot to determine the target group queue based on the target slot. If not, the first slot that is closest to the second slot can be found in the hash ring in sequence, and the first slot is used as the target slot to determine the target group queue, that is, the LRU (Least recently used) queue. The task management method is implemented using the LRU algorithm.
[0076] In an embodiment of the present invention, the target slot corresponds to one or more group queues. If it corresponds to one group queue, the group queue is the target group queue; if it corresponds to multiple group queues, one group queue can be randomly selected from the multiple group queues as the target group queue, or one group queue can be selected as the target group queue in a polling manner.
[0077] In the embodiment of the present invention, the task to be processed indicates a user identifier; determining the target group queue according to the group queue corresponding to the target slot includes:
[0078] If the target slot corresponds to a group queue, then the group queue is used as the target group queue;
[0079] If the target slot corresponds to multiple group queues, the number of group queues corresponding to the target slot is obtained; the hash value corresponding to the user identifier is determined according to the number of group queues, so as to determine the target group queue according to the hash value corresponding to the user identifier.
[0080] In an embodiment of the present invention, for the case where a target slot corresponds to multiple group queues, a consistent hashing algorithm can be used to determine the hash value corresponding to the user identifier. Specifically, the user identifier can be used to take the modulus of the number of group queues to determine the hash value corresponding to the user identifier, thereby determining the target group queue based on the determined hash value.
[0081] In an embodiment of the present invention, in the task management method, if Figure 3 As shown, after step S103, that is, after allocating the task to be processed to the target customer service personnel ranked first in the target group queue, the method further includes:
[0082] Step S301: enabling the target customer service personnel to process pending tasks and leave the target group queue;
[0083] Step S302: After the target customer service staff completes the pending task, obtain a second weight corresponding to the pending task;
[0084] Step S303: updating the first weight according to the second weight to obtain an updated first weight;
[0085] Step S304: determining the ranking position of the target customer service personnel in the target group queue according to the updated first weight;
[0086] Step S305: inserting the target customer service personnel into the target group queue according to the sorting position to update the target group queue.
[0087] In an embodiment of the present invention, after determining the target group queue corresponding to the task to be processed, the task to be processed is assigned to the target customer service personnel ranked first in the target group queue, so that the target customer service personnel processes the task to be processed. When the customer service personnel processes the task to be processed, they leave the target group queue. When the processing is completed, a second weight corresponding to the task to be processed is obtained, and the first weight is updated according to the second weight to obtain an updated first weight, that is, after the customer service personnel obtains a user score after processing the task each time, the user score of the customer service personnel is updated. Specifically, according to the amount of tasks processed and the user score obtained after each task processing, the average value of the user score is calculated, which is the updated user score. The updated first weight, that is, the updated user score, is used to determine the ranking position of the target customer service personnel in the target group queue. Since each customer service personnel in the target group queue is sorted according to the user score, the target customer service personnel can be inserted into the corresponding ranking position in the target group queue according to the updated user score, so that the ranking position of each customer service personnel in the target group queue is updated, thereby realizing the update of the target group queue, so that each customer service personnel in the target group queue is arranged in descending order according to the user score. By continuously updating the target grouping queue, pending tasks can be assigned to customer service personnel with higher user ratings, thus improving user experience.
[0088] In an embodiment of the present invention, a target customer service personnel is enabled to process pending tasks and to leave the target group queue. After the target customer service personnel completes processing the pending tasks, the target customer service personnel is inserted into the target group queue at the sorting position of the target customer service personnel when leaving the target group queue. After receiving the second weight of the target customer service personnel after processing the pending tasks, the first weight of the target customer service personnel is updated, and then the sorting position of the target customer service personnel in the target group queue is updated according to the updated first weight, thereby realizing the update of the target group queue.
[0089] The task management method of the embodiment of the present invention is implemented by a weighted LRU algorithm. First, the first mapping result of the group queue corresponding to each group in the hash ring is obtained; after receiving the task to be processed, the second mapping result of the task to be processed in the hash ring is determined, and the target group queue corresponding to the task to be processed is determined according to the first mapping result and the second mapping result, and then the task to be processed is assigned to the target customer service personnel ranked first in the target group queue, so that the target customer service personnel processes the task to be processed, and the assignment of the task to be processed is realized. The task management method obtains the group queue by grouping and sorting the customer service personnel, and determines the target group queue corresponding to the task to be processed by using the mapping results of the group queue and the task to be processed on the hash ring, and then determines the target customer service personnel, so that the task to be processed is preferentially assigned to the target customer service personnel, and the task is preferentially assigned to the customer service personnel with higher user satisfaction, thereby improving the user experience; and the method can distinguish the task volume of the customer service personnel, so that the customer service personnel ranked first in the target group queue are increased, providing a reference indicator for the performance evaluation of the customer service personnel; the task management method reduces the time complexity of the algorithm by grouping and sorting the customer service personnel, and determines the target customer service personnel by mapping the hash ring, thereby improving the efficiency of task assignment.
[0090] like Figure 4 As shown, according to another aspect of an embodiment of the present invention, a task management apparatus 400 is provided, comprising:
[0091] An acquisition module 401 acquires a first mapping result of a group queue corresponding to each group in a hash ring, wherein the group is obtained by dividing all customer service personnel, and the group queue is obtained by sorting each customer service personnel in the group;
[0092] A first determination module 402 determines a first mapping result of the packet queue in the hash ring;
[0093] A second determination module 403, in response to receiving the task to be processed, determines a second mapping result of the task to be processed in the hash ring;
[0094] The allocation module 404 determines the target group queue corresponding to the task to be processed according to the first mapping result and the second mapping result, and allocates the task to be processed to the target customer service personnel ranked first in the target group queue.
[0095] In the embodiment of the present invention, the acquisition module 401 is further used to: acquire the area identifier corresponding to each customer service staff; and divide all customer service staff into multiple groups according to the area identifier.
[0096] In an embodiment of the present invention, the acquisition module 401 is further used to: obtain a first weight of each customer service staff in the group; the first weight indicates a scoring result of the customer service staff; and sort the customer service staff in the group according to the first weight to obtain a group queue corresponding to the group.
[0097] In an embodiment of the present invention, the first mapping result indicates the first slot of the group queue in the hash ring, and the first determination module 402 is further used to: obtain the group identifier corresponding to the group queue; determine the hash value corresponding to the group queue according to the group identifier; determine the first slot according to the hash value corresponding to the group queue.
[0098] In an embodiment of the present invention, the second mapping result indicates the second slot of the task to be processed in the hash ring; the second determination module 403 is further used to: obtain a user identifier corresponding to the task to be processed; determine the hash value corresponding to the task to be processed based on the user identifier; determine the second slot based on the hash value corresponding to the task to be processed.
[0099] In an embodiment of the present invention, the first mapping result indicates the first slot of the group queue in the hash ring, and the second mapping result indicates the second slot of the task to be processed in the hash ring; the allocation module 404 is further used to: determine whether there is a first slot that is identical to the second slot; if so, take the first slot that is identical to the second slot as the target slot, and determine the target group queue according to the group queue corresponding to the target slot; if not, search the hash ring in a clockwise direction for the first slot that is closest to the second slot, take the first slot that is closest to the second slot as the target slot, and determine the target group queue according to the group queue corresponding to the target slot.
[0100] In an embodiment of the present invention, the task to be processed indicates a user identifier; the allocation module 404 is further used to: if the target slot corresponds to a group queue, then the group queue is used as the target group queue; if the target slot corresponds to multiple group queues, the number of group queues corresponding to the target slot is obtained; the hash value corresponding to the user identifier is determined according to the number of group queues, so as to determine the target group queue according to the hash value corresponding to the user identifier.
[0101] In an embodiment of the present invention, the allocation module 404 is also used to: after allocating the pending task to the target customer service personnel ranked first in the target group queue, enable the target customer service personnel to process the pending task and leave the target group queue; after the target customer service personnel completes the pending task, obtain the second weight corresponding to the pending task; update the first weight according to the second weight to obtain an updated first weight; determine the ranking position of the target customer service personnel in the target group queue according to the updated first weight; insert the target customer service personnel into the target group queue according to the ranking position to update the target group queue.
[0102] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the task management method provided by the present invention.
[0103] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for task management provided by the present invention is implemented.
[0104] Figure 5 An exemplary system architecture 500 is shown to which the method or apparatus for task management according to an embodiment of the present invention may be applied.
[0105] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0106] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0107] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0108] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0109] It should be noted that the task management method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the task management device is generally set in the server 505 .
[0110] It should be understood that Figure 5The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0111] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 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.
[0112] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0113] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0114] 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 includes a 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 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0115] 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.
[0116] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation 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.
[0117] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor, for example, they may be described as: a processor includes an acquisition module, a first determination module, a second determination module and an allocation module. The names of these modules do not, in some cases, constitute limitations on the modules themselves, for example, the acquisition module may also be described as "a module for obtaining the first mapping result of the group queue corresponding to each group in the hash ring".
[0118] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it 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: obtaining a first mapping result of a group queue corresponding to each group in a hash ring, the group is obtained by dividing all customer service personnel, and the group queue is obtained by sorting each customer service personnel in the group; in response to receiving a task to be processed, determining a second mapping result of the task to be processed in the hash ring; determining a target group queue corresponding to the task to be processed based on the first mapping result and the second mapping result, and assigning the task to be processed to the target customer service personnel ranked first in the target group queue.
[0119] According to the technical solution of the embodiment of the present invention, the task management method is implemented by a weighted LRU algorithm, first obtaining the first mapping result of the group queue corresponding to each group in the hash ring; after receiving the pending task, determining the second mapping result of the pending task in the hash ring, determining the target group queue corresponding to the pending task according to the first mapping result and the second mapping result, and then assigning the pending task to the target customer service personnel ranked first in the target group queue, so that the target customer service personnel processes the pending task, and realizes the allocation of the pending task. The task management method obtains the group queue by grouping and sorting the customer service personnel, and determines the target group queue corresponding to the pending task by using the mapping results of the group queue and the pending task on the hash ring, and then determines the target customer service personnel, so that the pending task is preferentially assigned to the target customer service personnel, and the task is preferentially assigned to the customer service personnel with higher user satisfaction, thereby improving the user experience; and the method can distinguish the task volume of the customer service personnel, so that the customer service personnel ranked first in the target group queue increase, providing a reference indicator for the performance evaluation of the customer service personnel; the task management method reduces the time complexity of the algorithm by grouping and sorting the customer service personnel, and determines the target customer service personnel by mapping the hash ring, thereby improving the efficiency of task allocation.
[0120] 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 task management method, characterized in that: include: Obtaining a first mapping result of a group queue corresponding to each group in a hash ring, wherein the group is obtained by dividing all customer service personnel, and the group queue is obtained by sorting each customer service personnel in the group; In response to receiving a task to be processed, determining a second mapping result of the task to be processed in the hash ring; A target group queue corresponding to the task to be processed is determined according to the first mapping result and the second mapping result, and the task to be processed is assigned to the target customer service personnel ranked first in the target group queue.
2. The method according to claim 1, characterized in that All customer service personnel are divided into: Get the region ID corresponding to each customer service staff; All customer service personnel are divided into a plurality of groups according to the area identifications.
3. The method according to claim 1, characterized in that Sorting the customer service personnel in the group includes: Obtaining a first weight of each customer service staff in the group; the first weight indicates a scoring result of the customer service staff; The customer service personnel in the group are sorted according to the first weight to obtain a group queue corresponding to the group.
4. The method according to claim 1, characterized in that: The first mapping result indicates a first slot of the packet queue in the hash ring, and obtaining a first mapping result of the packet queue corresponding to each packet in the hash ring includes: Obtaining a group identifier corresponding to the group queue; Determine a hash value corresponding to the group queue according to the group identifier; The first slot is determined according to a hash value corresponding to the group queue.
5. The method according to claim 1, characterized in that The second mapping result indicates a second slot of the task to be processed in the hash ring; Determining a second mapping result of the task to be processed in the hash ring includes: Obtaining a user ID corresponding to the task to be processed; Determine the hash value corresponding to the task to be processed according to the user identifier; The second slot is determined according to the hash value corresponding to the task to be processed.
6. The method according to claim 1, characterized in that The first mapping result indicates a first slot of the packet queue in the hash ring, and the second mapping result indicates a second slot of the to-be-processed task in the hash ring; Determining a target group queue corresponding to the task to be processed according to the first mapping result and the second mapping result includes: Determine whether there is a first slot that is the same as the second slot; If so, taking the first slot identical to the second slot as the target slot, and determining the target group queue according to the group queue corresponding to the target slot; If not, search the hash ring for the first slot closest to the second slot in a clockwise direction, take the first slot closest to the second slot as the target slot, and determine the target group queue according to the group queue corresponding to the target slot.
7. The method according to claim 6, characterized in that The task to be processed indicates a user ID; Determining the target group queue according to the group queue corresponding to the target slot includes: If the target slot corresponds to a group queue, the group queue is used as the target group queue; If the target slot corresponds to multiple packet queues, obtain the number of packet queues corresponding to the target slot; determine the hash value corresponding to the user identifier according to the number of packet queues, and determine the target packet queue according to the hash value corresponding to the user identifier.
8. The method according to claim 3, characterized in that After allocating the to-be-processed task to the target customer service personnel ranked first in the target group queue, the method includes: Enable the target customer service personnel to process the pending tasks and leave the target group queue; After the target customer service staff completes the pending task, obtaining a second weight corresponding to the pending task; Updating the first weight according to the second weight to obtain an updated first weight; Determine the sorting position of the target customer service staff in the target group queue according to the updated first weight; The target customer service personnel are inserted into the target group queue according to the sorting position to update the target group queue.
9. A task management device, characterized in that: include: An acquisition module, which acquires a first mapping result of a group queue corresponding to each group in a hash ring, wherein the group is obtained by dividing all customer service personnel, and the group queue is obtained by sorting each customer service personnel in the group; A first determining module determines a first mapping result of the packet queue in the hash ring; A second determining module, in response to receiving a task to be processed, determines a second mapping result of the task to be processed in the hash ring; The allocation module determines a target group queue corresponding to the task to be processed according to the first mapping result and the second mapping result, and allocates the task to be processed to a target customer service personnel ranked first in the target group queue.
10. 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 8.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
