Task assignment method and device

By determining the target task queue and order based on the business attributes and inbound time of the task, the problem of low task allocation efficiency and reliability in the prior art is solved, and orderly dispatch and efficient processing of tasks are achieved.

CN119226006APending Publication Date: 2024-12-31BEIJING JINGDONG YUANSHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411336937.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The prior art cannot handle high-priority tasks in time when task dispatch, resulting in a task backlog and a reduction in dispatch efficiency. When multiple tasks have the same priority, the dispatch sequence is chaotic, affecting efficiency and reliability.

Method used

By determining the business attributes and incoming time of the tasks to be assigned, creating a target task queue, and determining the order of tasks in the queue based on the weight value, ensuring that tasks are dispatched in order, avoiding dispatch errors and disordered order.

Benefits of technology

It improves the efficiency and reliability of task dispatch, ensures timely handling of high-priority tasks, and avoids the problems of task backlog and confusing dispatch sequence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226006A_ABST
    Figure CN119226006A_ABST
Patent Text Reader

Abstract

The invention provides a task assignment method and device, and the method comprises the steps: determining a target task queue corresponding to the business attribute of a to-be-assigned task; determining the sequence of the to-be-dispatched tasks in the target task queue according to the incoming time and the service attributes of the to-be-dispatched tasks; the incoming time is the duration between the time when the to-be-assigned task is received and the creation time of the to-be-assigned task; and putting the to-be-dispatched tasks into the target task queue according to the sequence, and dispatching the to-be-dispatched tasks through the target task queue. According to the embodiment, it can be guaranteed that the tasks to be dispatched can be dispatched according to the sequence in the target task queue, and the task dispatching efficiency and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a task dispatching method and device. Background Art

[0002] When performing task dispatching, the prior art usually puts all the tasks to be dispatched into a task pool, and then the timed task scans and dispatches each task according to a fixed period. However, since the processing priorities of different tasks may be different, the prior art method cannot process high-priority tasks in a timely manner, which may cause a backlog of tasks in the task pool, thereby reducing the efficiency and reliability of task dispatching. In addition, when there are multiple tasks with the same priority, the prior art usually uses random dispatching of these tasks, which may cause the order of task dispatching to be chaotic, further reducing the efficiency and reliability of task dispatching. Summary of the invention

[0003] In view of this, the embodiments of the present disclosure at least provide a task dispatching method, device, electronic device and storage medium, which can ensure that the tasks to be dispatched can be dispatched in the order in the target task queue, thereby improving the efficiency and reliability of task dispatching.

[0004] In a first aspect, an embodiment of the present disclosure provides a task dispatching method, comprising:

[0005] Determine a target task queue corresponding to the business attributes of the task to be assigned;

[0006] Determine the order of the tasks to be assigned in the target task queue according to their incoming time and business attributes; the incoming time is the time between the time when the tasks to be assigned are received and the time when the tasks to be assigned are created;

[0007] The tasks to be dispatched are placed into the target task queue according to the order, and the tasks to be dispatched are dispatched through the target task queue.

[0008] Optionally, determining the order of the tasks to be assigned in the target task queue according to the incoming time and business attributes of the tasks to be assigned includes:

[0009] Determine the incoming time factor of the task to be assigned according to the incoming time of the task to be assigned, and determine the business weight factor of the task to be assigned according to the business attribute of the task to be assigned; the incoming time factor is used to measure the delay degree of receiving the task to be assigned;

[0010] Determine the weight value of the task to be assigned based on the incoming line time factor and the business weight factor;

[0011] The order of the tasks to be dispatched in the target task queue is determined according to the weight values.

[0012] Optionally, determining a target task queue corresponding to a business attribute of the task to be assigned includes:

[0013] In response to the absence of a target task queue corresponding to the business attribute of the task to be dispatched, a task queue corresponding to the business attribute of the task to be dispatched is created, and the created task queue is used as the target task queue.

[0014] Optionally, dispatching tasks to be dispatched through a target task queue includes:

[0015] According to the number set by the task processor corresponding to the business attribute, a corresponding number of tasks to be assigned in the target task queue are assigned to the task processor.

[0016] Optionally, after dispatching the task to be dispatched through the target task queue, the following is further included:

[0017] In response to determining that the task to be dispatched has been completed according to the task status of the task to be dispatched, the task to be dispatched is removed from the target task queue.

[0018] Optionally, the business attributes include a task source and a business classification of the task to be assigned; the method includes:

[0019] Determine the target task queue for the task to be assigned based on the business classification of the task to be assigned;

[0020] The order of the tasks to be assigned in the target task queue is determined based on the task source and the incoming time of the tasks to be assigned.

[0021] In a second aspect, an embodiment of the present disclosure provides a task dispatching device, including:

[0022] A queue determination module, used to determine a target task queue corresponding to the business attributes of the task to be assigned;

[0023] The order determination module is used to determine the order of the tasks to be assigned in the target task queue according to the incoming time and business attributes of the tasks to be assigned; the incoming time is the time between the time when the tasks to be assigned are received and the time when the tasks to be assigned are created;

[0024] The dispatching module is used to put the tasks to be dispatched into the target task queue according to the order, and dispatch the tasks to be dispatched through the target task queue.

[0025] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the above-mentioned first aspect, or the steps in any optional implementation of the first aspect are performed.

[0026] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect, or any optional implementation of the first aspect are executed.

[0027] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the method of any of the above embodiments when executed by a processor.

[0028] Any of the above aspects or any implementation methods of any of the aspects, by placing the tasks to be assigned into the target task queue corresponding to its business attributes, the tasks to be assigned can be stored respectively according to the business attributes. Since the tasks with different business attributes that can be processed by the task processing party are different, by storing the tasks to be assigned with different task attributes into different target task queues respectively, only the data in the task queue that the processing party can process can be pushed to the processing party, thereby improving the efficiency of subsequent task dispatching, avoiding the possibility of dispatching errors, and improving the reliability of task dispatching. In addition, the order of the tasks to be assigned in the target task queue is determined according to the incoming line time and business attributes of the tasks to be assigned, so that when the tasks to be assigned are dispatched in order in the future, the orderly dispatch of the tasks can be guaranteed, avoiding the problem of disordered task dispatching order, and further improving the efficiency and reliability of task dispatching.

[0029] The effects of the above-mentioned task dispatching device, electronic device and storage medium can be found in the description of the above-mentioned task dispatching method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0031] Figure 1 A flowchart of a task dispatching method provided by an embodiment of the present disclosure is shown;

[0032] Figure 2 A schematic diagram of a task queue in the task dispatching method provided by an embodiment of the present disclosure is shown;

[0033] Figure 3 A schematic diagram of a process of placing a task to be assigned into a target task queue in a task assignment method provided by an embodiment of the present disclosure is shown;

[0034] Figure 4 A schematic diagram of a target task queue in the task dispatching method provided by an embodiment of the present disclosure is shown;

[0035] Figure 5 A schematic diagram of a process of assigning tasks to be assigned in the task assigning method provided in an embodiment of the present disclosure is shown;

[0036] Figure 6 A schematic diagram of a task dispatching device provided by an embodiment of the present disclosure is shown;

[0037] Figure 7 An exemplary system architecture is shown in which embodiments of the present disclosure may be applied;

[0038] Figure 8 A schematic diagram of the structure of a computer system of a terminal device or a server used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0040] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.

[0041] The raising of the above problems and the solutions are the results obtained by the inventor after practice and careful research. The discovery process of the above problems and the solutions proposed for the above problems should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0042] The technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0043] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0044] To facilitate understanding of this embodiment, a task dispatching method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the task dispatching method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the task dispatching method can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0045] See also Figure 1 FIG. 1 is a flowchart of a task dispatching method provided by an embodiment of the present disclosure, and the method includes S101 to S103, wherein:

[0046] S101: Determine a target task queue corresponding to the business attribute of the task to be assigned.

[0047] In the embodiments of the present disclosure, there can be any number of task queues, and each task queue can correspond to a different business attribute. The business attributes here may include the source of the business, such as which customer the business comes from; it may also include business classification, which may include consulting business, claims business, etc.; it may also include a processing department, such as the business needs to be handled by the technical department, the public relations department, etc. It should be noted that the above example for business attributes is only a possible implementation method in the embodiments of the present disclosure, and does not constitute an improper limitation on the present invention. In actual applications, different task queues can be divided according to any of the above business attributes, or business queues can be divided based on multiple business attributes. The embodiments of the present disclosure do not make specific limitations on this, and the function can be realized.

[0048] In a possible implementation, the target task queue of the tasks to be dispatched may be determined according to the business classification of the tasks to be dispatched; and the order of the tasks to be dispatched in the target task queue may be determined according to the task sources and incoming time of the tasks to be dispatched.

[0049] In a specific implementation, since it takes a certain amount of time for the task to be assigned to be created and received by the execution subject of the embodiment of the present disclosure, the time between the time when the task to be assigned is received and the time when the task to be assigned is created can be used as the execution time, and the order of the task to be assigned in the target task queue can be determined based on the incoming time. Taking the division of task queues according to business classification as an example, Figure 2 A schematic diagram of a task queue in a task dispatching method provided in an embodiment of the present disclosure, such as Figure 2 As shown, the embodiment of the present disclosure divides a complete task pool into multiple slices, each slice corresponds to a task queue. When a task to be assigned is received, the task queue to be placed in can be determined according to the business classification of the task to be assigned. Finally, the task queue corresponding to the task to be assigned is the target task queue. For example, assuming Figure 2 The business classification of the task queue corresponding to shard 1 is consulting business, the business classification of the task queue corresponding to shard 2 is claims business, and the task queue corresponding to shard 3 is complaint business; at this time, if there is a task to be assigned with a business classification of claims business, the task queue in shard 2 can be used as the target task queue for the task to be assigned. The method of determining the order of the tasks to be assigned in the target task queue according to the task source and the incoming time of the tasks to be assigned is described in detail in S102, which will not be repeated here.

[0050] If the current task pool does not include a task queue corresponding to the task classification of the task to be assigned, then a new task queue corresponding to the task classification can be created, and the newly created task queue is determined as the target message queue of the task to be assigned. Specifically, determining the target task queue corresponding to the business attribute of the task to be assigned includes: in response to the absence of a target task queue corresponding to the business attribute of the task to be assigned, creating a task queue corresponding to the business attribute of the task to be assigned, and using the created task queue as the target task queue. In a specific implementation, it is assumed that the task pool only includes the above three fragments, and there is currently a task to be classified as a feedback-type business, and there is no fragment (i.e., task queue) corresponding to the business classification in the existing task pool. At this time, a new task queue corresponding to the task classification can be created in the task pool to store the task to be assigned, and when the task to be assigned corresponding to the business classification is subsequently received, it can also be placed in the current newly created task queue.

[0051] In another possible implementation, since some business categories have a small amount of tasks to be assigned, creating a separate task queue for each business category with a small amount of tasks may have a certain impact on the performance of the system. In such a case, a task queue corresponding to the main business category (that is, a task queue corresponding to the business category with a large amount of tasks to be assigned) can be created in advance in the task pool, and other task queues with smaller tasks can be merged together, and a corresponding secondary task queue can be created for each of them. When a task to be assigned is received, it can be first determined whether the business category of the task belongs to the main business category. If it does, it can be placed in the corresponding task queue. If not, it can be placed in a unified secondary task queue.

[0052] S102: Determine the order of the tasks to be assigned in the target task queue according to the incoming time and service attributes of the tasks to be assigned.

[0053] In this step, after determining which task queue the to-be-dispatched task should be placed in, the order in which the to-be-dispatched task should be arranged in the target task queue can be determined.

[0054] In a possible implementation, the order of the tasks to be assigned in the target task queue can be determined based on the incoming time of the tasks to be assigned. Since the tasks to be assigned have been classified according to the business attributes in the above steps and the target task queue of the tasks to be assigned has been determined, when determining the order of the tasks to be assigned in the target task queue, only the incoming time of the tasks can be referred to, thereby ensuring that the tasks that come in first can be processed first.

[0055] The incoming time can represent a point in time or a length of time; when the incoming time represents a point in time, the creation time of the task to be assigned or the time when the execution subject of the embodiment of the present disclosure receives the task to be assigned can be used as the incoming time of the task to be assigned; when the incoming time represents a length of time, the duration between the creation time of the task to be assigned and the time when the execution subject of the embodiment of the present disclosure receives the task to be assigned can be used as the incoming time. It should be noted that the above-mentioned setting method of the incoming time is only used as an example of possible implementation methods in the embodiment of the present disclosure, and does not constitute an improper limitation on the present invention. In actual applications, the incoming time can be defined according to actual needs, and the embodiment of the present disclosure does not make specific limitations on this.

[0056] In the specific implementation, the Flink task can be used to monitor the event status. When the event status is monitored to be dispatched, the Flink task can send a message to the target task queue. When the target task queue in the task pool receives the message, the online time of the task to be dispatched can be determined, and the online time factor of the task to be dispatched can be calculated based on the online time. Among them, the Flink task is a stream processing task, which refers to a task that continuously processes and analyzes data when the data flows into the system in real time. In addition to using Flink tasks to monitor event status, you can also use stream processing frameworks such as Apache Spark Streaming and Apache Kafka Streams to monitor event status and send messages to the target task queue.

[0057] For example, when the incoming time is set to a time point, it is assumed that there are two tasks to be assigned, where the incoming time of task 1 is 6:00, the incoming time of task 2 is 8:30, and the current time is 10:00. A maximum allowed time difference can be set in advance, and the incoming time factor can be mapped to the range of 0-1. Assuming that the maximum allowed time difference is 10 hours, the incoming time difference of task 1 is 4 hours, and the incoming time difference of task 2 is 1.5 hours. The incoming time factors of task 1 and task 2 can be obtained by using the ratio between the incoming time difference and the maximum allowed time difference. The incoming time factor of task 1 is 0.4, and the processing time factor of task 2 is 0.15. By calculating the incoming time factor to determine the order of the tasks to be assigned in the target task queue, it can represent the waiting time of each task to be assigned in the target task queue. The system can determine the processing order of the tasks according to the incoming time factor to ensure that more urgent tasks or tasks with longer or shorter waiting times are processed first. When the incoming line time is set to a period of time, there is no need to obtain the current time to obtain the corresponding time interval, and only the difference between the incoming line time and the maximum allowed time is needed to determine the incoming line time factor.

[0058] It should be noted that the above method of calculating the incoming time factor of the task to be dispatched is only illustrated as a possible implementation method of the embodiment of the present disclosure, and does not constitute an improper limitation of the present invention. In practical applications, the incoming time factor can be calculated according to any method; or, the incoming time factor can be determined jointly according to the actual incoming time and a randomly generated random number, thereby ensuring that the same order will not appear in the same task queue, avoiding the problem of confusion in the task dispatching order caused by the same order.

[0059] In a possible implementation, the order of the tasks to be assigned in the target task queue can also be determined based on the business attributes of the tasks to be assigned. The business attributes here can include the source of business, such as which customer the business comes from; it can also include business classification, which can include consulting business, claims business, etc.; it can also include processing departments, such as whether the business needs to be handled by the technical department, the public relations department, etc. In a specific implementation, different weight values ​​can be set in advance for different values ​​under each business attribute, so when the tasks to be assigned are received, the corresponding business weight factor can be obtained based on the specific information of each task, and then the order of the tasks to be assigned in the target task queue can be determined according to the business weight factor.

[0060] For example, the target task queue for tasks to be assigned is determined according to the business classification, and the order of tasks to be assigned in the target task queue is determined according to the source of the tasks. Consulting services issued by clients A and B will be placed in the task queue corresponding to the consulting services, and the weight values ​​of clients A and B may be different. For relatively important clients, their weight values ​​may be set higher, so that tasks issued by important clients can be processed preferentially according to the task order. Alternatively, the order of tasks to be assigned in the target task queue can also be determined based on the two dimensions of task source and processing department. The determination method is similar to the above method and will not be repeated here.

[0061] In another possible implementation, the order of the tasks to be assigned in the target task queue can also be determined based on the incoming time and business attributes of the tasks to be assigned. Specifically, the order of the tasks to be assigned in the target task queue is determined based on the incoming time and business attributes of the tasks to be assigned, including: determining the incoming time factor of the tasks to be assigned based on the incoming time of the tasks to be assigned, determining the business weight factor of the tasks to be assigned based on the business attributes of the tasks to be assigned; determining the weight value of the tasks to be assigned based on the incoming time factor and the business weight factor; and determining the order of the tasks to be assigned in the target task queue based on the weight value.

[0062] In a specific implementation, the target task queue of the task to be assigned can also be determined based on the incoming time and the business attributes. Among them, the incoming time factor of the task to be assigned can be determined based on the execution time of the task to be assigned, and the specific confirmation method is similar to the method described above, which will not be repeated here; the business weight factor of the task to be assigned can also be determined based on the business attributes of the task to be assigned, and the specific confirmation method is also similar to the method described above, which will not be repeated here.

[0063] For example, assume that there are tasks A, B, and C, and the service source is used to represent the service attribute (the service weight from customer A is 0.8, the service weight from customer B is 0.5, and the service weight from customer C is 0.2), where the incoming time of task A is 8:00, the incoming time of task B is 9:00, and the incoming time of task C is 7:30. According to the calculation method of the incoming time factor described above, it can be determined that the incoming time factor of task A is 0.2, the incoming time factor of task B is 0.1, and the incoming time factor of task C is 0.25. Assume that task A comes from customer A, task B comes from customer B, and task C comes from customer C; in addition, since the importance of the incoming time factor and the service weight factor in calculating the weight values ​​of different tasks is different, some scenarios or some tasks may pay more attention to the influence of the incoming time on the order of the tasks to be assigned in the target task queue; while some scenarios or some tasks may pay more attention to the influence of the service weight factor, so the respective weight coefficients of the incoming time factor and the service weight factor can be set to indicate their importance in calculating the task weight value. Assume that the weight coefficients of the incoming time factor and the business weight factor are both 0.5. Then the weight value of task A can be expressed by the product of the incoming time factor and the weight coefficient of the incoming time factor plus the product of the business weight factor and the weight coefficient of the business weight factor; among which, the product of the incoming time factor and the weight coefficient of the incoming time factor represents the influence of the incoming time on the order of the task to be dispatched in the target task queue, and the product of the business weight factor and the weight coefficient of the business weight factor represents the influence of the business weight on the order of the task to be dispatched in the target task queue. The specific formula can be expressed as follows:

[0064]

[0065] in, represents the weight value of task A, Indicates the weight coefficient of the incoming line time factor, Indicates the line time factor, represents the weight coefficient of the business weight factor, Indicates the business weight factor. Similarly, we can calculate that the weight of task B is 0.3 and the weight of task C is 0.225. That is, task A has the highest priority and will be processed first, followed by task B, and finally task C. This is because although task A is connected later than task C, its business priority is higher, making its overall weight value the highest. Although task B is connected shorter, its business attributes are not as prioritized as task A, resulting in a slightly lower weight value.

[0066] It should be noted that the above method of determining the order of tasks to be assigned in the target task queue according to the incoming line time and business attributes is only exemplified as a possible implementation method of the embodiment of the present disclosure. In practical applications, the processing department of the task, the difficulty of the task, etc. can also be used as reference dimensions to determine the order of tasks to be assigned in the target task queue. For example, different priorities can be set for different processing departments, and then the weight factor of the order of tasks to be assigned in the target task queue under the processing department dimension can be determined based on the priority. Exemplarily, the priority of the department that handles urgent customer complaints can be set to the highest; correspondingly, the priority of the general information query department can also be set to the lowest. Then, according to the priority of the processing department corresponding to the task to be assigned, the corresponding weight value of the task to be assigned under the processing department dimension can be determined, and then its order in the target task queue can be determined. In addition, the tasks to be assigned can be classified according to their difficulty, and the weight values ​​of the tasks to be assigned under the task difficulty dimension can be determined. For example, simple, fast, and resource-saving tasks can be set as low-difficulty tasks; tasks that require certain professional knowledge and resources and have a medium processing time can be set as medium-difficulty tasks; tasks with very complex processing steps that require very professional knowledge and a long processing time to complete can be set as high-difficulty tasks. Then, according to the task difficulty corresponding to the task to be assigned, its weight value under the task difficulty dimension can be determined, and then used as a weight factor when determining the order of the tasks to be assigned in the target task queue, so as to determine the order of the tasks to be assigned in the target task queue.

[0067] The embodiments of the present disclosure do not specifically limit the dimensions referenced when determining the order of tasks to be assigned in the target task queue and the number of reference dimensions, subject to the ability to achieve its functions. In addition, the above-mentioned specific calculation method for the incoming time factor, the service weight factor, and the weight value is only used as an example of a possible implementation method and does not constitute an improper limitation on the present invention. In actual applications, any calculation method can be used for calculation according to actual needs and circumstances, and the embodiments of the present disclosure do not specifically limit this.

[0068] S103: Put the tasks to be dispatched into a target task queue according to the order, and dispatch the tasks to be dispatched through the target task queue.

[0069] In a possible implementation, Figure 3 As shown, after the target task queue of the tasks to be dispatched and the order in the target task queue are determined, the tasks to be dispatched can be directly put into the target task queue according to the determined order.

[0070] If the current task pool does not include a task queue corresponding to the task classification of the task to be dispatched, a new task queue corresponding to the task classification can be created. In a specific implementation, assume that there is currently a task to be classified with a task classification of feedback business, and there is no shard (i.e., task queue) corresponding to the business classification in the existing task pool. At this time, a new task queue corresponding to the task classification can be created in the task pool to store the task to be dispatched, and when a task to be dispatched corresponding to the business classification is received later, it can also be placed in the currently newly created task queue.

[0071] Or, since some business categories have very few tasks to be assigned, creating a separate task queue for each business category with a small amount of tasks may have a certain impact on the performance of the system. In such a case, you can create a task queue corresponding to the main business category in the task pool in advance (that is, the task queue corresponding to the business category with a large amount of tasks to be assigned), and other task queues with smaller tasks can be merged together, and a corresponding secondary task queue can be created for each of them. When receiving a task to be assigned, you can first determine whether the business category of the task belongs to the main business category. If it does, you can put it into the corresponding task queue. If not, you can put it into a unified secondary task queue.

[0072] In another possible implementation, Figure 4 As shown, after determining the target task queue and the order of the task to be dispatched in the target task queue, it can be placed in the task pool to be dispatched in the target task queue, and the delay time of the task to be dispatched is determined according to the order of the task to be dispatched. There is a timer in the delay node, and the tasks in the task pool to be dispatched that have met the time are placed in a ready queue through the timer. The tasks in the ready queue are used for subsequent dispatching steps. This can further ensure that the tasks to be dispatched can be dispatched in order, ensuring the efficiency and reliability of task dispatching.

[0073] In the disclosed embodiment, dispatching the to-be-dispatched tasks through the target task queue includes: dispatching a corresponding number of the to-be-dispatched tasks in the target task queue to the task processors according to the number set by the task processors corresponding to the business attributes.

[0074] In the specific implementation, Figure 5As shown, after logging into the system, the task processor can switch the state to the ready state, indicating that the assigned tasks can be received and processed. After the task processor switches the state to the ready state, if the task queue in the aforementioned steps is divided according to different business classifications, the tasks to be assigned of the corresponding task classification can be assigned to the task processor that can handle the business classification according to the business classification that different task processors can handle. In other words, the tasks to be assigned in the target task queue can be assigned to the business processor that can handle the business classification. In the case where the target task queue includes multiple businesses to be assigned, the corresponding number of tasks to be assigned can be assigned to the task processor according to the current amount of tasks to be processed by each task processor; when the amount of tasks to be processed by the task processor has reached the upper limit, new tasks can not be assigned to the task processor. Alternatively, the number of tasks assigned to the task processor can also be set by the task processor itself, and the disclosed embodiment does not specifically limit this.

[0075] For a task processor that can handle tasks to be assigned under multiple task queues, it can determine which tasks the task processor should handle first based on the priorities of different task queues; for example, the priority of complaint services can be higher than that of consulting services. If there is a task processor that can handle both complaint services and consulting services, then the complaint services can be assigned to the task manager first. Alternatively, the task processor can select the tasks assigned to itself, which is not specifically limited in the embodiments of the present disclosure.

[0076] It should be noted that the above dispatching steps can be executed in parallel in each task queue, thereby ensuring that each task queue (that is, each shard) is not affected by each other, which helps to improve the efficiency and reliability of task dispatching.

[0077] In the embodiment of the present disclosure, after the to-be-dispatched task is dispatched through the target task queue, the method further includes: in response to determining that the to-be-dispatched task has been completed according to the task status of the to-be-dispatched task, removing the to-be-dispatched task from the target task queue.

[0078] In a specific implementation, the task status of the task to be assigned may include to be assigned, assigned, in process, pending review, completed, cancelled, etc. For example, assuming that there is a user support system, when the user submits a problem description, the system can generate a corresponding task. At this time, the task has not been assigned to the corresponding processing personnel, and the task can automatically enter the "to be assigned" state when it is created. Then the target task queue and the order in the target task queue of the task can be determined, and the task can be assigned through the target task queue. At this time, the task has been assigned, and the task status of the task can be changed to "assigned". When the relevant processing personnel pull the task from the corresponding assigned list and process it, the status of the task is changed from "assigned" to "in process". After the processing personnel complete the processing, it can also be handed over to the reviewer for review, and the task status at this time can be "in review"; when the reviewer determines that the review is passed, the status of the task can be manually or automatically changed to "completed", and the user is notified that the problem has been solved.

[0079] In the embodiments of the present disclosure, the conditions for changing the task status can be set according to actual needs. For example, the "completed" status in the above example indicates that the current task processing is completed, and the "completed" status can also indicate that the current task assignment is completed. The embodiments of the present disclosure do not specifically limit the conditions for changing the task status, and the conditions are based on the ability to achieve its functions.

[0080] In a specific implementation, when the "Completed" status indicates that the current task has been assigned, the task to be assigned can be removed from the target task queue after it is determined that the task has been completed, that is, after the task to be assigned has been successfully assigned to the corresponding task processor. Alternatively, the task to be assigned can be retained in the target task queue, and when the task processor determines that the task has been processed, it can be removed from the target task queue; thus, when the task needs to be transferred later, it can be deleted from the current processor's pending tasks and directly assigned to other processors through the target task queue, saving the time of reassignment and improving the efficiency of task assignment.

[0081] According to a second aspect of the embodiment of the present disclosure, Figure 6 As shown, a task dispatching device 600 is provided, comprising:

[0082] A queue determination module 601 is used to determine a target task queue corresponding to the business attribute of the task to be assigned;

[0083] The order determination module 602 is used to determine the order of the tasks to be assigned in the target task queue according to the incoming time and business attributes of the tasks to be assigned; the incoming time is the time between the time when the tasks to be assigned are received and the time when the tasks to be assigned are created;

[0084] The dispatching module 603 is used to put the tasks to be dispatched into the target task queue according to the order, and dispatch the tasks to be dispatched through the target task queue.

[0085] Optionally, the sequence determination module 602 is specifically configured to:

[0086] Determine the incoming time factor of the task to be assigned according to the incoming time of the task to be assigned, and determine the business weight factor of the task to be assigned according to the business attribute of the task to be assigned; the incoming time factor is used to measure the delay degree of receiving the task to be assigned;

[0087] Determine the weight value of the task to be assigned based on the incoming line time factor and the business weight factor;

[0088] The order of the tasks to be dispatched in the target task queue is determined according to the weight values.

[0089] Optionally, the queue determination module 601 is specifically configured to:

[0090] In response to the absence of a target task queue corresponding to the business attribute of the task to be dispatched, a task queue corresponding to the business attribute of the task to be dispatched is created, and the created task queue is used as the target task queue.

[0091] Optionally, the dispatching module 603 is specifically used for:

[0092] According to the number set by the task processor corresponding to the business attribute, a corresponding number of tasks to be assigned in the target task queue are assigned to the task processor.

[0093] Optionally, the dispatching module 603 is further used for:

[0094] In response to determining that the task to be dispatched has been completed according to the task status of the task to be dispatched, the task to be dispatched is removed from the target task queue.

[0095] Optionally, the business attributes include the task source and business classification of the task to be assigned; the queue determination module 601 is specifically used for:

[0096] Determine the target task queue for the task to be assigned based on the business classification of the task to be assigned;

[0097] The sequence determination module 602 is specifically used for:

[0098] The order of the tasks to be assigned in the target task queue is determined based on the task source and the incoming time of the tasks to be assigned.

[0099] According to the third aspect of an embodiment of the present disclosure, there is provided an electronic device for task dispatching, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present invention.

[0100] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present disclosure is implemented.

[0101] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and the computer program implements the method of any of the above embodiments when executed by a processor.

[0102] Figure 7 An exemplary system architecture 700 to which the task dispatching method or task dispatching apparatus implemented by the present disclosure can be applied is shown.

[0103] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0104] The user can use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 701, 702, 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0105] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0106] The server 705 may be a server that provides various services, such as a background management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 701, 702, and 703. The background management server may process the received task assignment request and feed back the processing result (only an example) to the terminal device.

[0107] It should be noted that the task dispatching method provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the task dispatching device is generally set in the server 705. The task dispatching method provided in the embodiment of the present invention can also be executed by the terminal devices 701, 702, 703, and accordingly, the task dispatching device can be set in the terminal devices 701, 702, 703.

[0108] It should be understood that Figure 7 The 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.

[0109] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 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.

[0110] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0111] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0112] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.

[0113] 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.

[0114] 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.

[0115] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be arranged in a processor. For example, a processor includes a queue determination module, an order determination module, and a dispatch module, wherein the names of these modules do not constitute a limitation on the modules themselves under certain circumstances. For example, the queue determination module may also be described as a "target task queue module that determines the business attributes of the task to be dispatched".

[0116] 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 implements the following method: determining a target task queue corresponding to the business attributes of the task to be dispatched; determining the order of the task to be dispatched in the target task queue according to the incoming time and business attributes of the task to be dispatched; placing the task to be dispatched into the target task queue according to the order, and dispatching the task to be dispatched through the target task queue.

[0117] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A task assignment method, characterized in that: include: Determine a target task queue corresponding to the business attributes of the task to be assigned; Determine the order of the tasks to be assigned in the target task queue according to the incoming time and business attributes of the tasks to be assigned; the incoming time is the time between the time when the tasks to be assigned are received and the time when the tasks to be assigned are created; The tasks to be dispatched are placed into the target task queue according to the sequence, and the tasks to be dispatched are dispatched through the target task queue.

2. The method according to claim 1, characterized in that Determining the order of the tasks to be assigned in the target task queue according to the incoming time and service attributes of the tasks to be assigned, including: Determine the incoming time factor of the task to be assigned according to the incoming time of the task to be assigned, and determine the business weight factor of the task to be assigned according to the business attribute of the task to be assigned; the incoming time factor is used to measure the delay degree of receiving the task to be assigned; Determining a weight value of the task to be assigned based on the incoming line time factor and the business weight factor; The order of the tasks to be assigned in the target task queue is determined according to the weight values.

3. The method according to any one of claims 1-2, characterized in that: Determine the target task queue corresponding to the business attributes of the task to be assigned, including: In response to the absence of a target task queue corresponding to the business attribute of the task to be dispatched, a task queue corresponding to the business attribute of the task to be dispatched is created, and the created task queue is used as the target task queue.

4. The method according to any one of claims 1 to 3, characterized in that: Dispatching the to-be-dispatched task through the target task queue includes: According to the number set by the task processor corresponding to the business attribute, a corresponding number of tasks to be assigned in the target task queue are assigned to the task processor.

5. The method according to any one of claims 1 to 4, characterized in that: After dispatching the to-be-dispatched task through the target task queue, the method further includes: In response to determining, according to the task status of the task to be dispatched, that the task to be dispatched has been completed, removing the task to be dispatched from the target task queue.

6. The method according to any one of claims 1 to 5, characterized in that: The business attributes include the task source and business classification of the task to be assigned; the method includes: Determining a target task queue for the task to be assigned according to the business classification of the task to be assigned; The order of the tasks to be assigned in the target task queue is determined according to the task sources and the incoming time of the tasks to be assigned.

7. A task dispatching device, characterized in that: include: A queue determination module, used to determine a target task queue corresponding to the business attributes of the task to be assigned; An order determination module, used to determine the order of the tasks to be assigned in the target task queue according to the incoming time and business attributes of the tasks to be assigned; the incoming time is the time between the time when the tasks to be assigned are received and the time when the tasks to be assigned are created; The dispatching module is used to put the tasks to be dispatched into the target task queue according to the sequence, and dispatch the tasks to be dispatched through the target task queue.

8. 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 6.

9. 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 6 is implemented.

10. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.