Task allocation method and device based on multistage message queues and storage medium

Through the task allocation method of multi-level message queue, the task scheduler and recycling services are used to dynamically allocate tasks and recycle unprocessed tasks, solving the problems of uneven task allocation and low resource utilization in the existing technology, and achieving high efficiency of tasks Allocation and optimal utilization of resources.

CN119130013APending Publication Date: 2024-12-13LEADOR SPATIAL INFORMATION TECH CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411151135.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing task allocation method relies on a single task queue system, resulting in uneven task allocation, low resource utilization and task backlog, lack of an effective task recovery mechanism, and being unable to reassign long-term unprocessed tasks in a timely manner.

Method used

Using a task allocation method based on multi-level message queue, through the task pool queue and personal task queue, the task scheduler and task recycling service are used to dynamically allocate tasks according to the work efficiency of the task executor, and trigger recovery when the task is not processed for a long time. mechanism, reassign tasks.

Benefits of technology

It realizes flexible scheduling and efficient allocation of tasks, avoids task backlog, improves resource utilization and work efficiency, and ensures that tasks are carried out smoothly as planned.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130013A_ABST
    Figure CN119130013A_ABST
Patent Text Reader

Abstract

The invention provides a task allocation method and device based on multistage message queues and a storage medium. The method comprises the steps that tasks are generated in a system, basic information is configured for each task, and the tasks configured with the basic information are pushed to a task pool queue; task messages in the task pool queue and the personal task queue are monitored, the task consumption condition of the personal task queue is analyzed according to the task messages, and an analysis result is obtained; generating an efficiency value parameter according to an analysis result, and allocating the task from the task pool queue to a corresponding personal task queue by using a task allocation rule; when it is monitored that the task state meets the task recycling requirement, a task recycling mechanism is triggered, queue messages of the tasks meeting the task recycling requirement are deleted from the personal task queue, new queue messages are generated, and the new queue messages are pushed to the task pool queue. Tasks can be automatically scheduled and allocated, task overstock is avoided, and the resource utilization rate and the working efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a task allocation method, device and storage medium based on a multi-level message queue. Background Art

[0002] With the development of map production technology, map production has become more complex and automated, and the demand for task allocation and scheduling services is increasing. Existing task allocation methods usually rely on a single task queue system, which cannot flexibly allocate tasks according to the complexity of the task and the work situation of the executors, resulting in low resource utilization, uneven task allocation, task backlogs and other problems. In addition, the existing technology lacks an effective task recovery mechanism, and when a task has not been processed for a long time, it is impossible to reallocate the task in time.

[0003] Therefore, a new task allocation and scheduling service is urgently needed to manage and coordinate different task allocations, optimize resource utilization, improve work efficiency, and ensure that tasks can proceed smoothly according to the predetermined plan. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a task allocation method, device and storage medium based on a multi-level message queue to solve the problems of uneven task allocation, task backlog, low resource utilization and reduced work efficiency existing in the prior art.

[0005] In a first aspect of an embodiment of the present application, a task allocation method based on a multi-level message queue is provided, comprising: generating tasks in a system, configuring basic information for each task, and pushing the tasks after the basic information is configured to a task pool queue; monitoring task messages in the task pool queue and the personal task queue, and analyzing the task consumption of the personal task queue according to the task messages to obtain analysis results; generating an efficiency value parameter for characterizing the work efficiency of the task executors according to the analysis results, and according to the efficiency value parameter, allocating the tasks from the task pool queue to the corresponding personal task queue using preset task allocation rules; monitoring the task status in the personal task queue, and when the task status reaches a preset task recovery requirement, triggering a task recovery mechanism, the task recovery mechanism is used to delete the queue message corresponding to the task that meets the task recovery requirement from the personal task queue, and generate a new queue message, and push the new queue message to the task pool queue.

[0006] According to a second aspect of an embodiment of the present application, a task allocation device based on a multi-level message queue is provided, comprising: a generation module, configured to generate tasks in a system, configure basic information for each task, and push the tasks after the basic information is configured to a task pool queue; an analysis module, configured to monitor task messages in the task pool queue and the personal task queue, and analyze the task consumption of the personal task queue according to the task message to obtain an analysis result; an allocation module, configured to generate an efficiency value parameter for characterizing the work efficiency of the task executor according to the analysis result, and allocate the task from the task pool queue to the corresponding personal task queue according to the efficiency value parameter using a preset task allocation rule; a recycling module, configured to monitor the task status in the personal task queue, and trigger a task recycling mechanism when the task status reaches a preset task recycling requirement, the task recycling mechanism is used to delete the queue message corresponding to the task that meets the task recycling requirement from the personal task queue, and generate a new queue message, and push the new queue message to the task pool queue.

[0007] According to a third aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the computer program.

[0008] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0009] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:

[0010] By generating tasks in the system and configuring basic information for each task, the tasks with the configured basic information are pushed to the task pool queue; the task messages in the task pool queue and the personal task queue are monitored, and the task consumption of the personal task queue is analyzed according to the task message to obtain the analysis result; the efficiency value parameter used to characterize the work efficiency of the task executor is generated according to the analysis result, and the task is assigned from the task pool queue to the corresponding personal task queue according to the efficiency value parameter using the preset task assignment rule; the task status in the personal task queue is monitored, and when the task status reaches the preset task recovery requirement, the task recovery mechanism is triggered, and the task recovery mechanism is used to delete the queue message corresponding to the task that meets the task recovery requirement from the personal task queue, and generate a new queue message, and push the new queue message to the task pool queue. This application can automatically schedule and assign tasks, avoid task backlogs, and improve resource utilization and work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0012] Figure 1 It is a schematic diagram of the overall process of the task allocation method based on a multi-level message queue in an actual scenario provided by an embodiment of the present application;

[0013] Figure 2 It is a flowchart of a task allocation method based on a multi-level message queue provided in an embodiment of the present application;

[0014] Figure 3 It is a schematic diagram of the overall workflow of the task scheduler provided in the embodiment of the present application;

[0015] Figure 4 This is a schematic diagram of the overall workflow of the task recycling service provided in the embodiment of the present application;

[0016] Figure 5 It is a structural diagram of a task allocation device based on a multi-level message queue provided in an embodiment of the present application;

[0017] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0019] The production of high-precision map data requires the processing of a large number of complex tasks, including production tasks, edge connection tasks, and quality inspection tasks. Traditional task allocation methods may not be able to efficiently manage and coordinate these tasks, resulting in resource waste and inefficiency. With the development of map production technology, there is an urgent need for a task allocation and scheduling service that can optimize resource utilization and improve work efficiency.

[0020] Existing task allocation and scheduling technologies mainly rely on a single task queue system, which cannot flexibly allocate tasks according to the complexity of the tasks and the work status of the executors. This approach may lead to uneven task allocation, task backlogs, or waste of resources. In addition, the existing technology lacks an effective task recycling mechanism, and when a task has not been processed for a long time, it cannot be reassigned in time.

[0021] In order to solve the problems of uneven task allocation, resource waste and task backlog in the prior art, a new task allocation method is needed. This method should be able to flexibly schedule and allocate tasks based on the nature of different tasks and the work status of the executors. In addition, an effective task recycling mechanism is also needed to ensure that unprocessed tasks can be recycled and reallocated in a timely manner.

[0022] In view of the problems existing in the prior art, this application proposes a task allocation method based on a multi-level message queue, which realizes distributed task scheduling and allocation through message middleware. The method uses a two-level message queue system, including a task pool queue and a personal task queue, and realizes efficient task allocation and recycling through a task scheduler and a task recycling service.

[0023] First, the overall implementation process of the task allocation method based on multi-level message queues proposed in this application in actual application scenarios is summarized in combination with the accompanying drawings and embodiments. Figure 1 Schematic diagram of the overall process of the task allocation method based on multi-level message queues in the actual scenario provided by the embodiment of the present application. Figure 1 As shown, the task allocation method based on the multi-level message queue may specifically include:

[0024] Different types of tasks are generated in the system, including production tasks, edge connection tasks, and quality inspection tasks. After these tasks are generated, their basic information is configured and pushed to the task pool queue. The task pool queue is a central message queue responsible for storing and managing all tasks to be assigned.

[0025] Furthermore, the task scheduler is an automated service that is responsible for obtaining tasks from the task pool queue and assigning them to personal task queues. Its work includes:

[0026] Monitor the task pool queue: The task scheduler continuously monitors the task messages in the task pool queue.

[0027] Monitor personal task queues: The task scheduler monitors the message data of all personal task queues at the same time.

[0028] Task allocation: The task scheduler previews and analyzes the task backlog and work efficiency of the personal task queue based on the messages in the personal task queue. According to the preset rules, a set of parameters describing the efficiency value is generated and tasks are allocated. If a person's task queue is empty or the amount of tasks is small, a new task is pushed to him.

[0029] Furthermore, each executor has a personal task queue to store the tasks to be processed. When the task is pushed to the personal task queue, the executor receives the task through the client and executes it.

[0030] Furthermore, the task recycling service is responsible for processing tasks that have not been processed for a long time. Its work content includes:

[0031] Monitoring personal task queues: The task recycling service continuously monitors all personal task queues.

[0032] Determine whether a task has been processed: If a task has not been consumed for a long time in the personal task queue, the task recycling service will predict whether the task is likely to be consumed.

[0033] Recycling tasks: If a task is not processed, the task recycling service will recycle it and delete the queue message in the personal task queue. Then, a new queue message is generated and pushed back to the task pool queue, waiting for the task scheduler to reallocate it.

[0034] In addition, if the executor finds that the task cannot be completed or needs to be abandoned during the execution of the task, he or she can also actively return the task to the task pool queue and the task recycling service will handle it.

[0035] This application achieves efficient task allocation and recovery through a multi-level message queue. The introduction of the task scheduler and task recovery service ensures the flexibility and timeliness of task allocation, optimizes resource utilization, and improves overall work efficiency. This distributed task scheduling and allocation method based on message middleware is suitable for scenarios such as high-precision map data production that require processing a large number of complex tasks.

[0036] The contents of the technical solution of the present application are described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] Figure 2 It is a flowchart of a task allocation method based on a multi-level message queue provided in an embodiment of the present application. Figure 2 The task allocation method based on multi-level message queue can be executed by the task allocation system. Figure 1 As shown, the task allocation method based on the multi-level message queue may specifically include:

[0038] S201, generating tasks in the system, configuring basic information for each task, and pushing the tasks after the basic information is configured to the task pool queue;

[0039] S202, monitoring the task messages in the task pool queue and the personal task queue, and analyzing the task consumption of the personal task queue according to the task messages to obtain the analysis results;

[0040] S203, generating an efficiency value parameter for characterizing the work efficiency of the task executor according to the analysis result, and assigning the task from the task pool queue to the corresponding personal task queue according to the efficiency value parameter using a preset task assignment rule;

[0041] S204, monitor the task status in the personal task queue. When the task status reaches the preset task recycling requirement, trigger the task recycling mechanism. The task recycling mechanism is used to delete the queue message corresponding to the task that meets the task recycling requirement from the personal task queue, generate a new queue message, and push the new queue message to the task pool queue.

[0042] In some embodiments, basic information is configured for each task, and the task after the basic information is configured is pushed to the task pool queue, including:

[0043] Configure basic information for the tasks generated in the system, and push the tasks after configuring basic information to the task pool queue. The basic information includes task type, task priority and task description. The task pool queue is a message queue used to centrally store all tasks to be assigned.

[0044] Specifically, first of all, the system has a creation plan module, a process engine monitoring module and a personal task recovery module, which will generate various types of tasks, including production tasks, edge tasks, quality inspection tasks or other types of tasks. After each module generates a task, the system will configure basic information for these tasks.

[0045] Furthermore, the system specifies the type of each task, such as production task, edge joining task or quality inspection task, etc. And assigns a priority to each task to determine the order in which the tasks are processed. For example, some tasks may have a higher priority and need to be processed first. At the same time, a detailed description of the task is provided to explain the specific content and requirements of the task. This helps the executors understand the task and complete it accurately.

[0046] Furthermore, all tasks that have been configured with basic information will be pushed to the task pool queue. The task pool queue is a message queue used to centrally store all tasks to be assigned, ensuring that all tasks can be managed and scheduled in a unified manner.

[0047] For example, in an example, suppose that in a high-precision map data production system, the creation plan module generates a new production task. The system will configure the following basic information for the task:

[0048] Task type: Production task

[0049] Task priority: High

[0050] Task Description: This task involves preliminary data collection and processing of high-precision maps.

[0051] After configuring the basic information, the system will push the production task to the task pool queue.

[0052] Similarly, the edge connection tasks and quality inspection tasks generated by the system will also go through the same process and be pushed to the task pool queue after configuring basic information. All these tasks are centrally stored in the task pool queue, waiting for further scheduling and allocation.

[0053] Through the above-mentioned method of the embodiment of the present application, the present application can efficiently configure basic information for each task and push it uniformly to the task pool queue to ensure the orderliness and efficiency of the task allocation process.

[0054] In some embodiments, task consumption of a personal task queue is analyzed according to the task message to obtain analysis results, including:

[0055] The task scheduler is used to monitor the message data in the personal task queue, and the task consumption of the personal task queue is analyzed based on the monitored message data to determine the work efficiency of the task executors corresponding to each personal task queue. The analysis results include the current number of tasks in the personal task queue and the number of tasks that have not been processed for more than a preset time.

[0056] Specifically, the working process of the task scheduler provided by the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. Figure 3 Schematic diagram of the overall workflow of the task scheduler provided in the embodiment of the present application. Figure 3 As shown, the overall workflow of the task scheduler may include the following:

[0057] First, the task scheduler continuously monitors the task messages in the task pool queue. The task pool queue is a message queue that centrally stores all tasks to be assigned. The task scheduler obtains the latest task information by monitoring the task pool queue. The task scheduler also monitors the message data in all personal task queues. Each executor has a personal task queue that stores the tasks to be processed by the executor.

[0058] Furthermore, the task scheduler collects the message data in the personal task queue, including the current number of tasks and the processing status of the tasks. It also judges the work efficiency of the task executors based on the following criteria:

[0059] Current number of tasks: The task scheduler determines whether the number of tasks in the personal task queue has reached the upper limit. If the number of tasks in the task queue of an executor is too large, it indicates that the workload is heavy.

[0060] Task backlog: The task scheduler analyzes whether there are tasks that have not been processed for a long time. If there are many tasks that have not been processed in time, it means that the executor may need more help or resources.

[0061] Work efficiency: The task scheduler evaluates the work efficiency parameters of the executors, such as the speed and quality of task completion. An efficient executor should be able to complete the assigned tasks quickly and with high quality.

[0062] Furthermore, based on the collected data, the task scheduler generates analysis results for characterizing the work efficiency of the task executors, including the current number of tasks in the personal task queue and the number of tasks that have not been processed for more than a preset time.

[0063] For example, in an example, assuming that in a high-precision map data production system, the task scheduler is monitoring the task pool queue and the personal task queue. The task scheduler monitors that there are new production tasks to be assigned in the task pool queue.

[0064] The task scheduler monitors the personal task queues of each executor at the same time. For example, there are currently 5 tasks in the personal task queue of executor A, 2 of which have exceeded the preset processing time and have not been completed.

[0065] The task scheduler analyzes the task consumption of executor A according to the following criteria:

[0066] Current number of tasks: There are 5 tasks in the personal task queue of executor A, which is close to the upper limit of the number of tasks set by the system.

[0067] Task backlog: There are two tasks in the queue of executor A that have not been processed for more than the preset time, indicating that there is a task backlog.

[0068] Work efficiency: Based on the previous task completion, the work efficiency parameter of executor A is medium.

[0069] Through the above analysis, the task scheduler generates an analysis result, indicating that the current task load of executor A is heavy and there is a backlog of tasks. Based on this result, the task scheduler may give priority to assigning new tasks to other executors with lighter task loads and higher work efficiency.

[0070] Through the above-mentioned method of the embodiment of the present application, the present application can effectively monitor and analyze the task consumption of the personal task queue, ensure that the tasks can be efficiently and reasonably allocated to the appropriate executors, and improve the work efficiency of the overall system.

[0071] In some embodiments, according to the efficiency value parameter, the task is allocated from the task pool queue to the corresponding personal task queue using a preset task allocation rule, including:

[0072] Determine the work efficiency of each task executor according to the efficiency value parameter, and assign tasks to corresponding task executors according to the work efficiency, or assign tasks to executors whose number of tasks in the personal task queue is lower than a first quantity threshold; when the number of tasks in the personal task queue reaches a preset second quantity threshold, stop assigning tasks to the personal task queue.

[0073] Specifically, the task scheduler first generates a set of parameters describing the efficiency value by previewing and analyzing the message data in the personal task queue. The efficiency value parameters reflect the task completion and work efficiency of the executor, including the speed and quality of task completion and the task backlog.

[0074] Furthermore, based on the generated efficiency value parameters, the task scheduler evaluates the work efficiency of each task executor. Executors with high work efficiency will be given priority in obtaining new task assignments. The task scheduler assigns tasks from the task pool queue to the corresponding personal task queue according to the preset task assignment rules.

[0075] For example, tasks are preferentially assigned to executors whose number of tasks in their personal task queues is lower than a first threshold to ensure that tasks can be processed in a timely manner. When the number of tasks in a certain executor's personal task queue reaches a preset second threshold, the task scheduler will stop assigning new tasks to the executor to avoid excessive task backlogs.

[0076] In one example, assume that in a high-precision map data production system, the task scheduler is performing a task allocation operation. The task scheduler previews and analyzes the message data in the personal task queue. For example, the task of executor A is completed quickly and with high quality, and the generated efficiency value parameter is high, while the task of executor B is completed slowly and with average quality, and the generated efficiency value parameter is low.

[0077] The task scheduler determines that executor A has high work efficiency, while executor B has relatively low work efficiency.

[0078] The task scheduler assigns the task to the executor A according to the preset task assignment rule. If the task scheduler finds that the number of tasks in the personal task queue of the executor A is lower than the first number threshold (such as 5 tasks), it continues to assign new tasks to the executor A.

[0079] If the number of tasks in the personal task queue of executor A reaches a preset second quantity threshold (such as 10 tasks), the task scheduler will stop allocating new tasks to him to avoid excessive backlog of tasks.

[0080] Through the method of the embodiment of the present application, the present application can efficiently allocate tasks from the task pool queue to the corresponding personal task queue according to the efficiency value parameter and the preset task allocation rule. This method ensures the reasonable allocation of tasks, improves the work efficiency of the overall system, and avoids task backlog and resource waste.

[0081] It should be noted that the task scheduler will restart the entire process each time it completes a task assignment. That is to say, after completing the task assignment, the task scheduler will restart the monitoring of the task pool queue and the personal task queue and enter the next cycle. Through continuous cycles, the task scheduler ensures that all tasks can be assigned and processed in a timely manner, maximizing resource utilization and work efficiency.

[0082] In some embodiments, after allocating tasks from the task pool queue to corresponding personal task queues using a preset task allocation rule, the method further includes:

[0083] In response to a task executor picking up a pending task assigned to a personal task queue through a client so that the task executor can execute the content of the pending task, when the pending task is completed, the completed pending task is marked as a consumed task and the consumed task is removed from the personal task queue.

[0084] Specifically, the task scheduler allocates tasks from the task pool queue to the corresponding personal task queue according to the efficiency value parameter and the preset task allocation rule. After the task is allocated, the personal task queue of the executor stores the tasks to be processed.

[0085] Furthermore, the task executor can view the pending tasks assigned to the personal task queue through the client. The executor selects and receives the task assigned to him / her and prepares to start execution. The executor executes the content of the pending task according to the task requirements. During the execution process, the executor can view the detailed information and progress requirements of the task through the client.

[0086] Furthermore, when the pending task is completed, the executor marks the task as completed through the client, that is, the task has been consumed. The completed task is removed from the executor's personal task queue, and the task status is updated to consumed.

[0087] For example, in one example, assume that in a high-precision map data production system, the task scheduler assigns the task to the personal task queue of executor A.

[0088] The task scheduler allocates the new production task from the task pool queue to the personal task queue of executor A according to the preset rules.

[0089] Executor A checks the assigned tasks in his personal task queue through the client and finds that there is a new production task to be processed.

[0090] Executor A clicks to receive the production task and is ready to start the execution. Executor A produces high-precision map data according to the task requirements displayed on the client.

[0091] During the execution process, executor A can view the detailed description and progress requirements of the task through the client at any time to ensure that the task is completed as required.

[0092] After executor A completes the task, he / she marks the task as completed through the client. The system removes the completed task from executor A's personal task queue and updates the task status to consumed.

[0093] Through the above-mentioned method of the embodiment of the present application, the present application can ensure that the executors efficiently receive and complete tasks through the client after the tasks are assigned, and mark the completed tasks as consumed in a timely manner, thereby maintaining the update of the personal task queue and the efficiency of task assignment.

[0094] In some embodiments, the queue message corresponding to the task that meets the task recycling requirement is deleted from the personal task queue, and a new queue message is generated, including:

[0095] Based on the unconsumed time of each task in the personal task queue, determine whether the task will be consumed. When the unconsumed time of the task exceeds the preset time, it is determined that the task will not be consumed, and the queue message corresponding to the task determined to be not consumed is deleted from the personal task queue, and a new queue message is generated for the task that will not be consumed, wherein the new queue message contains the original task information.

[0096] Specifically, after the task scheduler assigns a task to a worker according to a strategy, if the worker fails to claim the task for a long time, the task recycling service will recycle it according to a certain strategy. After recycling, the task message (i.e., queue message) in the current worker's task queue will be deleted (consumed) by the task recycling service, and a new task pool message will be generated to put the task back into the task pool for redistribution. In addition to the automatic recycling strategy, tasks that have been assigned and started to be produced can also be abandoned during the production process, and the task recycling service will recycle them and then schedule them for distribution.

[0097] The working process of the task recycling service provided by this application is described in detail below with reference to the accompanying drawings and specific embodiments. Figure 4 It is a schematic diagram of the overall workflow of the task recycling service provided in the embodiment of the present application.

[0098] like Figure 4 As shown, the overall workflow of the task recycling service may include the following:

[0099] First, the task recycling service continuously monitors all personal task queues and monitors the status of each task. The task status includes information such as the time when the task was received and processed.

[0100] Furthermore, the task recycling service determines whether the task will be consumed based on the time that each task in the personal task queue has not been consumed. When the time that the task has not been consumed exceeds a preset time (such as 48 hours), the task recycling service determines that the task will not be consumed and proceeds to the next step of processing.

[0101] Furthermore, for tasks that are determined not to be consumed, the task recycling service will delete the corresponding queue message from the personal task queue. This process is called "message consumption" or task destruction. The purpose of message consumption is to prevent tasks from being infinitely accumulated in the personal task queue, affecting system performance and task scheduling efficiency.

[0102] Furthermore, the destroyed task does not disappear. The task recycling service generates a new task message and pushes it back to the task pool queue. The new task message contains the information of the original task, ensuring that the task can be reallocated in the new round.

[0103] Furthermore, after the task recycling service completes a task recycling process, it will restart the entire monitoring and judgment process to continuously ensure that the tasks in the task queue can be processed and assigned in a timely manner.

[0104] For example, in an example, suppose that in a high-precision map data production system, the task recycling service is performing a task recycling operation. The task recycling service continuously monitors the personal task queue of executor A and finds that one of the production tasks has not been claimed for more than 48 hours.

[0105] The task recycling service determines that the production task has not been processed for more than a preset time, and determines that the task will not be consumed. The task recycling service deletes the production task from the personal task queue of the executor A to prevent the task from being accumulated in the personal task queue.

[0106] The task recycling service generates a new task message containing the information of the original task and pushes it back to the task pool queue, waiting for the task scheduler to reallocate it.

[0107] After the task recycling service completes the task recycling operation, it restarts to monitor and judge the personal task queue of executor A to ensure that subsequent tasks can be processed and allocated in a timely manner.

[0108] Through the above-mentioned method of the embodiment of the present application, the present application can effectively manage and recycle tasks that have not been processed for a long time, ensure the efficiency and timeliness of task allocation, optimize resource utilization and improve the work efficiency of the overall system.

[0109] In some embodiments, the method further comprises:

[0110] During the task execution process, in response to the task executor's abandonment operation on an unfinished task, a task abandonment request sent by the task executor through the client is received, and according to the task abandonment request, the queue message corresponding to the unfinished task is deleted from the personal task queue, and a new queue message is generated for the unfinished task, and the new queue message corresponding to the unfinished task is pushed to the task pool queue.

[0111] Specifically, during the task execution process, if the task executor finds through the client that a task cannot be completed or needs to be abandoned, he or she can actively initiate a task abandonment request. The task executor sends the task abandonment request through the client, stating the reason why the task cannot be completed.

[0112] Furthermore, after receiving the task abandonment request sent by the task executor through the client, the task recovery service starts to process the request. According to the task abandonment request, the task recovery service deletes the queue message corresponding to the unfinished task from the personal task queue of the task executor. This step is called "message consumption" or task destruction.

[0113] Furthermore, to ensure that unfinished tasks can be reassigned and processed, the task recycling service generates a new task message. The new task message contains the information of the original task, such as task type, priority, and task description, to ensure that the information is complete when the task is reassigned.

[0114] Furthermore, the task recycling service pushes the generated new task message to the task pool queue. The task pool queue is a message queue that centrally stores all tasks to be assigned. After the new task message enters the task pool queue, it waits for the task scheduler to reallocate it.

[0115] For example, in one example, assume that in a high-precision map data production system, executor A is performing a complex production task. During the execution process, executor A finds that the task cannot be completed due to data errors or technical limitations, so he decides to abandon the task.

[0116] Executor A initiates a task abandonment request through the client, stating the reason why the task cannot be completed. The task recovery service receives the task abandonment request. The task recovery service deletes the corresponding task message in the personal task queue of executor A to prevent the task from being accumulated in the personal task queue.

[0117] The task recycling service generates a new task message containing the original task information. The new task message ensures that the task information is complete when it is reassigned. The task recycling service pushes the new task message to the task pool queue, waiting for the task scheduler to reassign it.

[0118] Through the above method of the embodiment of the present application, the present application can timely recover and reallocate tasks in response to the abandonment of unfinished tasks by task executors during the task execution process. This method not only improves the flexibility of task management, but also ensures that tasks can be processed and allocated efficiently and reasonably, thereby improving the work efficiency of the overall system.

[0119] According to the technical solution provided in the embodiments of the present application, the technical solution of the present application has at least the following advantages:

[0120] 1. Flexible and efficient task allocation:

[0121] The task scheduler can intelligently assign tasks to the most suitable executors based on efficiency value parameters and preset task assignment rules. By analyzing the task backlog in the personal task queue and the work efficiency of the executors, the task scheduler can prioritize the assignment of tasks to those with high work efficiency and low task load, ensuring that tasks can be processed in a timely manner.

[0122] This intelligent task allocation mechanism not only improves the flexibility of task allocation, but also significantly improves the efficiency of task processing, ensuring that tasks proceed smoothly according to the predetermined plan.

[0123] 2. Timely task recovery mechanism:

[0124] The task recycling service can timely discover and recycle tasks that have not been processed for a long time by continuously monitoring the personal task queue. For tasks that have not been processed for more than the preset time, the task recycling service will delete them from the personal task queue and generate a new task message and push it to the task pool queue, waiting for reallocation.

[0125] This mechanism effectively avoids the infinite backlog of tasks in personal task queues, ensures that tasks can be recovered and redistributed in a timely manner, and improves the overall efficiency of task management.

[0126] 3. Active task abandonment processing mechanism:

[0127] During the task execution process, if the executor finds that a task cannot be completed, he can actively initiate a task abandonment request through the client. After receiving the request, the task recycling service will delete the task from the personal task queue and generate a new task message and push it to the task pool queue.

[0128] This active task abandonment processing mechanism improves the flexibility of task management and ensures that all tasks can be processed and allocated efficiently.

[0129] 4. Optimize resource utilization:

[0130] Through intelligent task scheduling and timely task recovery mechanism, the system can optimize resource utilization. Tasks are reasonably allocated and processed in a timely manner, avoiding resource waste and task backlog, and improving the overall system efficiency.

[0131] In addition, the collaborative work of the task scheduler and task recycling service ensures that each task in the system can be processed and completed in the shortest time, further improving resource utilization.

[0132] To sum up, the technical solution of the present application ensures the flexibility and efficiency of task allocation, optimizes resource utilization, and significantly improves the overall system work efficiency through intelligent task scheduling, timely task recovery and active task abandonment processing mechanism.

[0133] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0134] Figure 5 Schematic diagram of the structure of the task allocation device based on the multi-level message queue provided in the embodiment of the present application. Figure 5 As shown, the task allocation device based on the multi-level message queue includes:

[0135] The generation module 501 is configured to generate tasks in the system, configure basic information for each task, and push the tasks after the basic information is configured to the task pool queue;

[0136] The analysis module 502 is configured to monitor the task messages in the task pool queue and the personal task queue, and analyze the task consumption of the personal task queue according to the task messages to obtain the analysis results;

[0137] The allocation module 503 is configured to generate an efficiency value parameter for characterizing the work efficiency of the task executor according to the analysis result, and allocate the task from the task pool queue to the corresponding personal task queue according to the efficiency value parameter using a preset task allocation rule;

[0138] The recycling module 504 is configured to monitor the task status in the personal task queue. When the task status reaches the preset task recycling requirement, the task recycling mechanism is triggered. The task recycling mechanism is used to delete the queue message corresponding to the task that meets the task recycling requirement from the personal task queue, generate a new queue message, and push the new queue message to the task pool queue.

[0139] In some embodiments, Figure 5 The generation module 501 configures basic information for the tasks generated in the system, and pushes the tasks after the basic information is configured to the task pool queue, wherein the basic information includes the task type, task priority and task description. The task pool queue is a message queue for centrally storing all tasks to be assigned.

[0140] In some embodiments, Figure 5 The analysis module 502 uses the task scheduler to monitor the message data in the personal task queue, and analyzes the task consumption of the personal task queue based on the monitored message data to determine the work efficiency of the task executors corresponding to each personal task queue, wherein the analysis results include the current number of tasks in the personal task queue and the number of tasks that have not been processed for more than a preset time.

[0141] In some embodiments, Figure 5 The allocation module 503 determines the work efficiency of each task executor according to the efficiency value parameter, and allocates the task to the corresponding task executor according to the work efficiency, or allocates the task to the executor whose number of tasks in the personal task queue is lower than the first quantity threshold; when the number of tasks in the personal task queue reaches the preset second quantity threshold, stop allocating tasks to the personal task queue.

[0142] In some embodiments, Figure 5After the removal module 505 uses the preset task allocation rules to allocate tasks from the task pool queue to the corresponding personal task queue, it responds to the task executor receiving the pending tasks allocated to the personal task queue through the client so that the task executor can execute the content of the pending tasks. When the pending tasks are completed, the completed pending tasks are marked as consumed tasks and the consumed tasks are removed from the personal task queue.

[0143] In some embodiments, Figure 5 The recycling module 504 determines whether the task will be consumed based on the unconsumed time of each task in the personal task queue. When the unconsumed time of the task exceeds the preset time, it is determined that the task will not be consumed, and the queue message corresponding to the task determined to be not consumed is deleted from the personal task queue, and a new queue message is generated for the task that will not be consumed, wherein the new queue message contains the original task information.

[0144] In some embodiments, Figure 5 During the task execution process, the recycling module 504 responds to the task executor's abandonment operation on the unfinished task, receives the task abandonment request sent by the task executor through the client, deletes the queue message corresponding to the unfinished task from the personal task queue according to the task abandonment request, generates a new queue message for the unfinished task, and pushes the new queue message corresponding to the unfinished task to the task pool queue.

[0145] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0146] Figure 6 Schematic diagram of an electronic device 6 provided in an embodiment of the present application. Figure 6 As shown, the electronic device 6 of this embodiment includes: a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 601 executes the computer program 603, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0147] The electronic device 6 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 6 may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that Figure 6 The electronic device 6 is merely an example and does not limit the electronic device 6 . The electronic device 6 may include more or less components than those shown in the figure, or different components.

[0148] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0149] The memory 602 may be an internal storage unit of the electronic device 6, for example, a hard disk or memory of the electronic device 6. The memory 602 may also be an external storage device of the electronic device 6, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. The memory 602 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 602 is used to store computer programs and other programs and data required by the electronic device.

[0150] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0151] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0152] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A task allocation method based on a multi-level message queue, characterized in that: include: Generate tasks in the system, configure basic information for each task, and push the tasks after the basic information is configured to the task pool queue; Monitor the task messages in the task pool queue and the personal task queue, and analyze the task consumption of the personal task queue according to the task messages to obtain analysis results; Generating an efficiency value parameter for characterizing the work efficiency of the task executor according to the analysis result, and assigning the task from the task pool queue to the corresponding personal task queue according to the efficiency value parameter using a preset task assignment rule; The task status in the personal task queue is monitored, and when the task status reaches the preset task recycling requirement, the task recycling mechanism is triggered. The task recycling mechanism is used to delete the queue message corresponding to the task that meets the task recycling requirement from the personal task queue, and generate a new queue message, and push the new queue message to the task pool queue.

2. The method according to claim 1, characterized in that The configuring basic information for each task and pushing the task after the basic information is configured to the task pool queue includes: Configure basic information for the tasks generated in the system, and push the tasks after configuring the basic information to the task pool queue, wherein the basic information includes the task type, task priority and task description. The task pool queue is a message queue for centrally storing all tasks to be assigned.

3. The method according to claim 1, characterized in that The analyzing the task consumption situation of the personal task queue according to the task message to obtain the analysis result includes: The task scheduler is used to monitor the message data in the personal task queue, and the task consumption of the personal task queue is analyzed according to the monitored message data to determine the work efficiency of the task executors corresponding to each personal task queue, wherein the analysis results include the current number of tasks in the personal task queue and the number of tasks that have not been processed for more than a preset time.

4. The method according to claim 1, characterized in that The step of allocating tasks from the task pool queue to corresponding personal task queues using a preset task allocation rule according to the efficiency value parameter includes: Determine the work efficiency of each task executor according to the efficiency value parameter, and assign the task to the corresponding task executor according to the work efficiency, or assign the task to the executor whose number of tasks in the personal task queue is lower than a first quantity threshold; when the number of tasks in the personal task queue reaches a preset second quantity threshold, stop assigning tasks to the personal task queue.

5. The method according to claim 1, characterized in that After allocating the tasks from the task pool queue to the corresponding personal task queue using the preset task allocation rule, the method further includes: In response to a task executor picking up a pending task assigned to the personal task queue through a client so that the task executor can execute the content of the pending task, when the pending task is completed, the completed pending task is marked as a consumed task, and the consumed task is removed from the personal task queue.

6. The method according to claim 1, characterized in that The process of deleting the queue message corresponding to the task that meets the task recycling requirement from the personal task queue and generating a new queue message includes: Based on the unconsumed time of each task in the personal task queue, determine whether the task will be consumed; when the unconsumed time of the task exceeds a preset time, determine that the task will not be consumed, delete the queue message corresponding to the task determined as not to be consumed from the personal task queue, and generate a new queue message for the task that will not be consumed, wherein the new queue message contains the original task information.

7. The method according to claim 1, characterized in that The method further comprises: During the task execution process, in response to the task executor's abandonment operation on an unfinished task, a task abandonment request sent by the task executor through the client is received, and according to the task abandonment request, the queue message corresponding to the unfinished task is deleted from the personal task queue, and a new queue message is generated for the unfinished task, and the new queue message corresponding to the unfinished task is pushed to the task pool queue.

8. A task allocation device based on a multi-level message queue, characterized in that: include: A generation module is configured to generate tasks in the system, configure basic information for each task, and push the tasks after the basic information is configured to the task pool queue; An analysis module is configured to monitor the task messages in the task pool queue and the personal task queue, and analyze the task consumption of the personal task queue according to the task messages to obtain an analysis result; an allocation module configured to generate an efficiency value parameter for characterizing the work efficiency of the task executor according to the analysis result, and to allocate the task from the task pool queue to the corresponding personal task queue according to the efficiency value parameter using a preset task allocation rule; The recycling module is configured to monitor the task status in the personal task queue. When the task status reaches the preset task recycling requirement, the task recycling mechanism is triggered. The task recycling mechanism is used to delete the queue message corresponding to the task that meets the task recycling requirement from the personal task queue, generate a new queue message, and push the new queue message to the task pool queue.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Resume generation method and device, electronic equipment and storage medium

    CN121255065A