Search

CN-122029519-A - Multi-task management method and system based on priority

CN122029519ACN 122029519 ACN122029519 ACN 122029519ACN-122029519-A

Abstract

A method for managing a multi-task queue based on priority includes receiving a plurality of tasks associated with data stored on a blockchain (16) from a user, each of the plurality of tasks requiring one or more required resource tickets (26) to be executed by the processor (20) based on a load imposed on the processor (20) by the task, identifying a priority of each of the plurality of tasks, assigning one or more resource tickets (26) to each of the plurality of tasks per unit time based on the priority of each of the plurality of tasks, and executing one or more of the plurality of tasks per unit time if the one or more resource tickets (26) assigned to the one or more of the plurality of tasks is equal to greater than the one or more required resource tickets (26 b).

Inventors

  • HUANG HAOLUN
  • XU XIN

Assignees

  • 株式会社电装

Dates

Publication Date
20260512
Application Date
20241003
Priority Date
20231019

Claims (18)

  1. 1. A method for managing a multi-task queue based on priority, the method comprising: Receiving from a user a plurality of tasks related to data stored on a blockchain (16), each of the plurality of tasks requiring one or more required resource tickets (26) to be executed by a processor (20) in accordance with a load imposed on the processor (20) by the task; identifying a priority of each of the plurality of tasks; Assigning one or more resource tickets per unit time to each of the plurality of tasks according to the priority of each of the plurality of tasks, and Executing one or more of the plurality of tasks per unit time if one or more resource tickets assigned to the one or more of the plurality of tasks are equal to greater than the one or more required resource tickets, wherein The number of resource tickets allocated for each of the plurality of tasks is increased as the priority of each of the plurality of tasks increases.
  2. 2. The method of claim 1, wherein The plurality of tasks includes a first task having a first priority and a second task having a second priority lower than the first priority, and Allocating one or more resource tickets includes allocating N resource tickets for the first task and allocating N/2 tickets for the second task.
  3. 3. The method of claim 2, wherein The plurality of tasks further includes a third task having a third priority lower than the second priority, and Assigning one or more resource tickets includes assigning N/4 tickets to the third task.
  4. 4. A method according to claim 3, wherein N=4。
  5. 5. The method of any one of claims 1 to 4, wherein The blockchain stores vehicle data collected from a plurality of vehicles (18), The plurality of tasks includes a data query task for retrieving the vehicle data from the blockchain and a data management task for collecting the vehicle data from the plurality of vehicles and recording the vehicle data on the blockchain, and The data query task has a higher priority than the data management task.
  6. 6. The method of claim 5, wherein The plurality of tasks further includes a tamper-resistant inspection task for inspecting tamper-resistance of the vehicle data on the blockchain, and The tamper-resistant inspection task has a lower priority than the data management task.
  7. 7. A multi-tasking queue management system comprising: A storage server configured to store data on a blockchain (16), and A management server (12), the management server (12) configured to manage a plurality of tasks related to data stored on the blockchain, wherein The management server comprises at least one processor (20) programmed to: receiving the plurality of tasks from a user, each of the plurality of tasks requiring one or more required resource tickets (26) to be executed by the at least one processor in accordance with a load imposed by the task on the at least one processor; identifying a priority of each of the plurality of tasks; Assigning one or more resource tickets per unit time to each of the plurality of tasks according to the priority of each of the plurality of tasks, and Executing one or more of the plurality of tasks per unit time if one or more resource tickets assigned to the one or more of the plurality of tasks are equal to or greater than the one or more required resource tickets, wherein The at least one processor is further programmed to increase the number of resource tickets allocated for each of the plurality of tasks as the priority of each of the plurality of tasks increases.
  8. 8. The multi-tasking queue management system of claim 7, wherein The plurality of tasks includes a first task having a first priority and a second task having a second priority lower than the first priority, and The at least one processor is further programmed to assign N resource tickets to the first task and N/2 tickets to the second task.
  9. 9. The multi-tasking queue management system of claim 8, wherein The plurality of tasks further includes a third task having a third priority lower than the second priority, and The at least one processor is further programmed to assign N/4 tickets to the third task.
  10. 10. The multi-tasking queue management system of claim 9, wherein N=4。
  11. 11. The multi-tasking queue management system according to any of claims 7 to 10, wherein The storage server is configured to store vehicle data collected from a plurality of vehicles (18) on the blockchain, The plurality of tasks includes a data query task for retrieving the vehicle data from the blockchain and a data management task for collecting the vehicle data from the plurality of vehicles and recording the vehicle data on the blockchain, and The data query task has a higher priority than the data management task.
  12. 12. The multi-tasking queue management system of claim 11, wherein The plurality of tasks further includes a tamper-resistant inspection task for inspecting tamper-resistance of the vehicle data on the blockchain, and The tamper-resistant inspection task has a lower priority than the data management task.
  13. 13. A non-transitory computer readable tangible storage medium storing a program for managing a multi-tasking queue, which when executed by at least one processor (20) causes the at least one processor to perform: Receiving from a user a plurality of tasks related to data stored on a blockchain (16), each of the plurality of tasks requiring one or more required resource tickets (26) to be executed by the at least one processor in accordance with a load imposed by the task on the at least one processor; identifying a priority of each of the plurality of tasks; Assigning one or more resource tickets per unit time to each of the plurality of tasks according to the priority of each of the plurality of tasks, and Executing one or more of the plurality of tasks per unit time if one or more resource tickets assigned to the one or more of the plurality of tasks are equal to or greater than the required resource ticket, wherein The program further causes the at least one processor to execute increasing the number of resource tickets allocated for each of the plurality of tasks as the priority of each of the plurality of tasks increases.
  14. 14. The medium of claim 13, wherein The plurality of tasks includes a first task having a first priority and a second task having a second priority lower than the first priority, and The program also causes the at least one processor to execute assigning N resource tickets for the first task and N/2 tickets for the second task.
  15. 15. The medium of claim 14, wherein the plurality of tasks further comprises a third task having a third priority lower than the second priority, and The program further causes the at least one processor to execute assigning N/4 tickets to the third task.
  16. 16. The medium of claim 15, wherein N=4。
  17. 17. The medium of any one of claims 13 to 16, wherein The blockchain stores vehicle data collected from a plurality of vehicles (18), The plurality of tasks includes a data query task for retrieving the vehicle data from the blockchain and a data management task for collecting the vehicle data from the plurality of vehicles and recording the vehicle data on the blockchain, and The data query task has a higher priority than the data management task.
  18. 18. The medium of claim 17, wherein The plurality of tasks further includes a tamper-resistant inspection task for inspecting tamper-resistance of the vehicle data on the blockchain, and The tamper-resistant inspection task has a lower priority than the data management task.

Description

Multi-task management method and system based on priority Cross reference The present application claims priority from U.S. non-provisional application Ser. No. 18/490,646, filed on 10/19 of 2023, the entire disclosure of which is incorporated herein by reference. Technical Field The present disclosure relates to a multitasking method and system for managing multiple tasks based on priority. Background Business entities or organizations have attempted to share data to incubate new business and new technologies in the industry. The accuracy of the stored data is very important to advances in the field of propulsion. Blockchain technology using distributed data storage is one of the solutions to prevent data from being altered illegally after being sealed in blocks. A typical blockchain platform with smart contracts, such as ethernet (registered trademark), is using processing fees (referred to as "GAS") attached to all transactions to identify application priorities. Since in this unlicensed type of blockchain all transactions are anonymously posted on the public internet, they need to pay more if the user wants to process the transaction with a better response time. At the same time, the transaction fee will also prevent malicious users from damaging the blockchain system. Disclosure of Invention According to one aspect of the disclosure, a method for managing a multi-task queue based on priority includes receiving a plurality of tasks related to data stored on a blockchain from a user, each of the plurality of tasks requiring one or more required resource tickets to be executed by a processor according to a load caused by the task to the processor, identifying a priority of each of the plurality of tasks, assigning one or more resource tickets to each of the plurality of tasks per unit time according to the priority of each of the plurality of tasks, and executing one or more of the plurality of tasks per unit time if the one or more resource tickets assigned to the one or more of the plurality of tasks are equal to or greater than the one or more required resource tickets. The number of resource tickets allocated for each of the plurality of tasks increases as the priority of each of the plurality of tasks increases. Drawings The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate various systems, methods, and other embodiments of the present disclosure. It should be appreciated that the element boundaries (e.g., boxes, groups of boxes, or other shapes) shown in the figures represent one embodiment of the boundaries. In some implementations, elements may not be drawn to scale. [ FIG. 1] Fig. 1 is a block diagram showing an overall structure of a multitasking system according to an embodiment. [ FIG. 2] FIG. 2 is a table showing the type of job, given priority, required ticket and ticket assigned per unit time. [ FIG. 3A ] Fig. 3A shows the overall process of managing a multi-tasking queue at timing t=t 0. [ FIG. 3B ] Fig. 3B shows the overall process of managing the multi-tasking queue at timing t=t 1. [ FIG. 3C ] Fig. 3C shows the overall process of managing the multi-tasking queue at timing t=t 2. [ FIG. 3D ] Fig. 3D shows the overall process of managing the multi-tasking queue at timing t=t 3. [ FIG. 3E ] Fig. 3E shows the overall process of managing the multi-tasking queue at timing t=t 4. [ FIG. 3F ] Fig. 3F shows the overall process of managing the multi-tasking queue at timing t=t 5. [ FIG. 3G ] Fig. 3G shows the overall process of managing the multi-tasking queue at timing t=t 6. [ FIG. 4] Fig. 4 shows a flow chart of a multitasking procedure performed by a processor of a management server. Detailed Description First, for the sake of understanding only the following embodiments, the related art will be described first. In an ethernet house using the GAS economic model, tasks with higher GAS fees will be processed with higher priority. However, if the additional GAS fee is low, the transaction may need to wait a long time in the queue. For large use cases, it is also difficult to estimate the ratio between execution time and GAS cost, and thus it is difficult to maintain stability of service. A first aspect of the present disclosure is a method for managing a multi-task queue based on priority, comprising receiving a plurality of tasks related to data stored on a blockchain from a user, each of the plurality of tasks requiring one or more required resource tickets to be executed by the processor according to a load imposed on the processor by the task, identifying a priority of each of the plurality of tasks, assigning one or more resource tickets to each of the plurality of tasks per unit time according to the priority of each of the plurality of tasks, and executing one or more of the plurality of tasks per unit time if the one or more resource tickets assigned to the one or more of the plurality of tasks are equal to or greater than the one or