Task priority control method and system for multi-tenant SaaS services

By dynamically adjusting the task queue based on tenant priority and task type in a multi-tenant SaaS service, the problem of urgent tasks not being executed in a timely manner is solved, and task processing efficiency is improved.

CN117632417BActive Publication Date: 2024-11-12BEIJING SHENZHOU YUNHE DATA TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311593813.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-27
Publication Date
2024-11-12
Estimated Expiration
2043-11-27

AI Technical Summary

Technical Problem

In multi-tenant SaaS services, urgent or important tasks cannot be executed immediately according to priority, resulting in low work efficiency.

Method used

By receiving task requests and dynamically adjusting the position of tasks in the queue based on tenant priority and task type, the priority of tasks is increased to ensure that urgent or important tasks are processed first.

Benefits of technology

It effectively solved the task blocking problem, improved the efficiency of task processing, and ensured the timely completion of urgent or important tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117632417B_ABST
    Figure CN117632417B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computers, and provides a method and system for controlling the task priority of a multi-tenant SaaS service, wherein the method comprises: receiving a task request initiated by a tenant, and sending the task request to a task center; determining the priority of the tenant, and placing the task request in a queue corresponding to the priority; and returning the processing result to the tenant after the task request is processed in the queue. The method is used to solve the defect of low work efficiency in the prior art, and can flexibly and dynamically allocate tasks for execution according to the task type and priority of the tenant, thereby improving work efficiency.
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 priority control method and system for multi-tenant SaaS services. Background Art

[0002] SaaS is a software operation service, a new form of software service for users. Users do not need to install software products on their own computers or servers. Instead, they can directly obtain the services they need with corresponding software functions from a dedicated provider through the Internet according to a certain service level agreement (SLA).

[0003] In multi-tenant SaaS services, when asynchronous tax reporting tasks are executed, they can only be queued and executed in order. When urgent tasks or some key tasks with long execution time are generated and need to be executed in advance, they can only be queued and executed in order. This is likely to affect the work efficiency of urgent tasks. Summary of the invention

[0004] The present invention provides a task priority control method and system for a multi-tenant SaaS service, which is used to solve the defect of low work efficiency in the prior art. Tasks can be flexibly and dynamically allocated for execution according to the task type and priority of the tenant, thereby improving work efficiency.

[0005] The present invention provides a task priority control method for a multi-tenant SaaS service, comprising:

[0006] Receive task requests initiated by tenants and send them to the task center;

[0007] Determine the priority of tenants and place task requests in queues corresponding to the priority;

[0008] After the task request is processed in the queue, the processing result will be returned to the tenant.

[0009] According to the task priority control method of multi-tenant SaaS service provided by the present invention,

[0010] Determine the type of task request;

[0011] Determine the priority corresponding to the task request based on the type of the task request and the preset correspondence between the type of the task request and the priority;

[0012] Place the task request in the queue corresponding to the priority.

[0013] According to the task priority control method of multi-tenant SaaS service provided by the present invention,

[0014] Record the waiting time of the task request in the queue;

[0015] If the waiting time exceeds the set time, the priority of the task request will be increased by one level, and the task request will be put back into a queue with a higher priority.

[0016] According to the task priority control method of multi-tenant SaaS service provided by the present invention,

[0017] Re-queue the task request to a higher priority queue, including:

[0018] Place the task request in a queue with a higher priority and delete the task request from the original queue.

[0019] According to the task priority control method of the multi-tenant SaaS service provided by the present invention, the priority of the tenant is determined, including:

[0020] Based on the preset correspondence between tenants and priority sequences, the priority of the tenants is determined.

[0021] According to the task priority control method of the multi-tenant SaaS service provided by the present invention, the task types include tax filing tasks, invoice tasks and data synchronization tasks, and the priority of tax filing tasks and invoice tasks is higher than that of data synchronization tasks.

[0022] The present invention also provides a task priority control system for a multi-tenant SaaS service, comprising:

[0023] The receiving module is used to receive the task request initiated by the tenant and send the task request to the task center;

[0024] A determination module, used to determine the priority of the tenant and place the task request into a queue corresponding to the priority;

[0025] The processing module is used to return the processing results to the tenant after the task request is processed in the queue.

[0026] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a task priority control method for a multi-tenant SaaS service as described above is implemented.

[0027] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a task priority control method for any of the multi-tenant SaaS services described above.

[0028] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements a task priority control method for any of the multi-tenant SaaS services described above.

[0029] In the solution of the present application, by setting priorities for tasks, important, urgent tenant tasks, or special tasks are processed first, and unimportant tasks are processed later, which effectively solves the problem of unimportant tasks piling up, causing all tasks to be blocked and unable to be completed, and improves the efficiency of task processing. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0031] Figure 1 This is one of the flow charts of the task priority control method of the multi-tenant SaaS service provided by the embodiment of the present invention;

[0032] Figure 2 This is a second flow chart of a method for controlling task priority of a multi-tenant SaaS service provided by an embodiment of the present invention;

[0033] Figure 3 This is a flowchart of a method for controlling task priority of a multi-tenant SaaS service provided by an embodiment of the present invention;

[0034] Figure 4 It is a structural diagram of a task priority control system for a multi-tenant SaaS service provided by an embodiment of the present invention;

[0035] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] Figure 1 This is one of the flow charts of the task priority control method of the multi-tenant SaaS service provided by the embodiment of the present invention;

[0038] Figure 2 This is a second flow chart of a method for controlling task priority of a multi-tenant SaaS service provided by an embodiment of the present invention;

[0039] Figure 3 This is a flowchart of a method for controlling task priority of a multi-tenant SaaS service provided by an embodiment of the present invention;

[0040] like Figure 1-3 As shown, this embodiment provides a task priority control method for a multi-tenant SaaS service, including:

[0041] Step 101, receiving a task request initiated by a tenant, and sending the task request to a task center;

[0042] Step 102, determine the priority of the tenant and place the task request into a queue corresponding to the priority;

[0043] Step 103: After the task request is processed in the queue, the processing result is returned to the tenant.

[0044] In an exemplary embodiment, it further includes:

[0045] Determine the type of task request;

[0046] Determine the priority corresponding to the task request based on the type of the task request and the preset correspondence between the type of the task request and the priority;

[0047] Place the task request in the queue corresponding to the priority.

[0048] In an exemplary embodiment, it further includes:

[0049] Record the waiting time of the task request in the queue;

[0050] If the waiting time exceeds the set time, the priority of the task request will be increased by one level, and the task request will be put back into a queue with a higher priority.

[0051] In an exemplary embodiment, re-placing a task request into a queue with a higher priority includes:

[0052] Place the task request in a queue with a higher priority and delete the task request from the original queue.

[0053] In an exemplary embodiment, determining the priority of the tenants includes:

[0054] Based on the preset correspondence between tenants and priority sequences, the priority of the tenants is determined.

[0055] In actual applications, the priority weight of tenants can be identified based on payment status and cooperation closeness.

[0056] In an exemplary embodiment, the task types include a tax filing task, an invoice task, and a data synchronization task, and the tax filing task and the invoice task have higher priorities than the data synchronization task.

[0057] The task priority control system of the multi-tenant SaaS service provided by the present invention is described below. The task priority control system of the multi-tenant SaaS service described below and the task priority control method of the multi-tenant SaaS service described above can be referenced to each other.

[0058] Figure 4 It is a structural diagram of a task priority control system for a multi-tenant SaaS service provided by an embodiment of the present invention.

[0059] like Figure 4 As shown, the task priority control system of the multi-tenant SaaS service provided by this embodiment includes:

[0060] The receiving module 401 is used to receive a task request initiated by a tenant and send the task request to a task center;

[0061] A determination module 402 is used to determine the priority of the tenant and place the task request into a queue corresponding to the priority;

[0062] The processing module 403 is used to return the processing result to the tenant after the task request is processed in the queue.

[0063] The specific implementation method of the task priority control system of the multi-tenant SaaS service provided in this embodiment can be implemented with reference to the above embodiment and will not be repeated here.

[0064] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the task priority control method of the multi-tenant SaaS service, and the method includes:

[0065] Receive task requests initiated by tenants and send them to the task center;

[0066] Determine the priority of tenants and place task requests in queues corresponding to the priority;

[0067] After the task request is processed in the queue, the processing result will be returned to the tenant.

[0068] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0069] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the task priority control method of the multi-tenant SaaS service provided by the above methods, the method includes:

[0070] Receive task requests initiated by tenants and send them to the task center;

[0071] Determine the priority of tenants and place task requests in queues corresponding to the priority;

[0072] After the task request is processed in the queue, the processing result will be returned to the tenant.

[0073] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute a task priority control method for a multi-tenant SaaS service provided by the above methods, the method comprising:

[0074] Receive task requests initiated by tenants and send them to the task center;

[0075] Determine the priority of tenants and place task requests in queues corresponding to the priority;

[0076] After the task request is processed in the queue, the processing result will be returned to the tenant.

[0077] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0078] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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. However, 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 invention.

Claims

1. Task priority control method for multi-tenant SaaS services, It is characterized in that include: Receive task requests initiated by tenants and send the task requests to the task center; Determine the priority of the tenant and place the task request into a queue corresponding to the priority; After the task request is processed in the queue, the processing result is returned to the tenant; The determining the priority of the tenant includes: Determining the priority of the tenant based on a preset correspondence between the tenant and the priority sequence; determining a type of the task request; Determining the priority corresponding to the task request based on the type of the task request and a preset correspondence between the type of the task request and the priority; Placing the task request into a queue corresponding to the priority; The types of task requests include tax filing tasks, invoice tasks and data synchronization tasks, and the tax filing tasks and invoice tasks have higher priorities than the data synchronization tasks; Recording the waiting time of the task request in the queue; If the waiting time exceeds the set time, the priority corresponding to the task request is increased by one level, and the task request is re-placed into a queue with a higher priority; The task priority control method of multi-tenant SaaS service specifically includes: The tenant submits a task to the multi-tenant tax return service, and the multi-tenant tax return service submits the tenant ID and the type of task request to the task center; The task center obtains the tenant weight based on the tenant information. If the weight is high, the task is published to the high-priority queue; if the weight is low, the task is published to the low-priority queue; The task queue submits the task to the task processing service. After the task processing service completes the task, it returns the result to the task queue, and the task queue returns the result to the task center. If the task processing service fails to process the task within the maximum waiting time, the task queue deletes the task and upgrades it to a high-priority queue; The task center returns the task ID to the multi-tenant tax declaration service, and the multi-tenant tax declaration service returns the task ID to the tenant; The tenant obtains the task result from the multi-tenant tax filing service based on the task id. The multi-tenant tax filing service obtains the task result from the task center based on the task id. The task center returns the result to the multi-tenant tax filing service, and the multi-tenant tax filing service returns the result to the tenant.

2. The task priority control method for multi-tenant SaaS services according to claim 1, It is characterized in that The step of re-placing the task request into a queue with a higher priority level comprises: The task request is placed in a queue with a higher priority, and the task request is deleted from the original queue.

3. A task priority control system for a multi-tenant SaaS service, applied to the task priority control method for a multi-tenant SaaS service as claimed in claim 1, It is characterized in that include: A receiving module, used to receive a task request initiated by a tenant and send the task request to a task center; A determination module, used to determine the priority of the tenant and place the task request into a queue corresponding to the priority; The processing module is used to return the processing result to the tenant after the task request is processed in the queue.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the task priority control method for the multi-tenant SaaS service as described in claim 1 or 2 is implemented.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the task priority control method for a multi-tenant SaaS service as described in claim 1 or 2.

6. A computer program product, comprising a computer program, which, when executed by a processor, implements the task priority control method for a multi-tenant SaaS service as described in claim 1 or 2.