A distributed scheduling method, device and medium under a micro-service architecture

By dividing the server into scheduling and execution microservice units and business microservice units in the microservice architecture, and deploying them in a distributed manner according to business type, the imperfect architecture of task distribution and scheduling in multi-tenant environments is solved, and high-concurrency and high-availability task management is achieved.

CN114138435BActive Publication Date: 2026-02-13INSPUR GENERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111408109.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2026-02-13
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

In existing multi-tenant environments, the architecture for task distribution and microservice unit scheduling and execution is not ideal in terms of completeness and availability, making it difficult to meet the requirements of high concurrency and high availability.

Method used

By dividing the server into scheduling execution microservice units and business microservice units, and deploying them in a distributed manner according to business type, determining tenant database access permissions and thread status, distributing planned tasks using scheduling execution microservice units, and allocating tasks based on the number of threads and their working status, high concurrency and high availability in a multi-tenant environment are supported.

Benefits of technology

It enables unified management of planned tasks in a multi-tenant environment, improves the system's high concurrency and high availability, and ensures the efficiency and reliability of task distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114138435B_ABST
    Figure CN114138435B_ABST
Patent Text Reader

Abstract

The application discloses a distributed scheduling method and device under a micro-service architecture and a medium. The method comprises the following steps: determining a scheduled task to be distributed, wherein the scheduled task refers to a business logic executed according to a set timer rule; according to different business types, dividing servers into a scheduling execution micro-service unit and a business micro-service unit, and distributing the business micro-service unit; determining a tenant database corresponding to the scheduling execution micro-service unit, wherein the tenant database only allows the corresponding scheduling execution micro-service unit to access; determining the number of threads corresponding to the scheduling execution micro-service unit and the working state of the threads, and determining scheduled task information; and according to the number of threads, the working state of the threads and the scheduled task information, distributing the scheduled task in the tenant database to other scheduling execution micro-service units and business micro-service units through the scheduling execution micro-service unit.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of architecture design, in particular to a distributed scheduling method under micro-service architecture, equipment and medium. BACKGROUND

[0002] With the deep development of enterprise management cloudization and automation, the demand for various asynchronous execution of scheduled tasks (such as payment, push and call tasks) is increasingly put on the agenda, and multi-tenant, micro-service architecture and distributed deployment also put forward urgent demand for high concurrency and high availability of the system.

[0003] However, in the existing system, the architecture perfection and availability of task distribution and scheduling execution of designated micro-service units in the multi-tenant environment are not ideal. Therefore, a distributed scheduling method under micro-service architecture is urgently needed. SUMMARY

[0004] In order to solve the above problems, the present application provides a distributed scheduling method under micro-service architecture, equipment and medium, wherein the method comprises:

[0005] determining a scheduled task to be distributed, the scheduled task being a business logic executed according to a set timer rule; dividing servers into scheduling execution micro-service units and business micro-service units according to different business types, and distributing the scheduling execution micro-service units and the business micro-service units; determining tenant databases corresponding to the scheduling execution micro-service units respectively, the tenant databases allowing only the corresponding scheduling execution micro-service units to access; determining the number of threads corresponding to the scheduling execution micro-service units respectively and the working state of the threads, and determining the scheduled task information; and distributing the scheduled tasks in the tenant databases to other scheduling execution micro-service units and the business micro-service units through the scheduling execution micro-service units according to the number of threads, the working state of the threads and the scheduled task information.

[0006] In one example, before determining the scheduled task to be distributed, the method further comprises: receiving a micro-service request sent by a tenant, and converting the micro-service request into the scheduled task; storing the scheduled task to the tenant database, and updating the task state of the scheduled task to be distributed in the tenant database; and sending a response success information to the tenant.

[0007] In one example, determining the tenant databases corresponding to the scheduling execution micro-service units respectively specifically comprises: determining scheduled tasks in the tenant databases, recording the scheduling execution micro-service units that access the tenant databases for the first time; and taking the scheduling execution micro-service units as the scheduling execution micro-service units corresponding to the tenant databases.

[0008] In one example, the method further comprises: determining the thread quantity corresponding to each of the scheduling execution microservice units and the working state of the threads, and determining the scheduled task information, specifically comprising: determining the number of threads in an idle state in the server according to the working state of the threads; determining whether the scheduled task requires a specified business microservice unit to execute, so as to determine the scheduled task information; if yes, distributing the scheduled task to the specified business microservice unit through remote procedure call; if no, distributing the scheduled task to the scheduling execution microservice unit with the largest number of threads in the idle state.

[0009] In one example, the method further comprises: determining the thread quantity corresponding to each of the scheduling execution microservice units and the working state of the threads, and determining the scheduled task information, specifically comprising: determining whether the scheduled task requires a specified business microservice unit to execute, so as to determine the scheduled task information; determining the scheduled task load of the thread in an occupied state in the server according to the working state of the threads; determining that all threads in the server are in the occupied state, and selecting the thread with the smallest scheduled task load to distribute the scheduled task to be distributed.

[0010] In one example, the method further comprises: determining the workload of the scheduled task; if the workload is greater than a preset threshold, persistently storing the intermediate data during execution of the scheduled task into a master database or a task scheduling database other than the tenant database.

[0011] In one example, after the scheduled task in the tenant database is distributed to the server, the method further comprises: determining that all threads in the server are in the occupied state, and the execution authority of the scheduled task is priority execution; determining whether the scheduled task with the priority execution authority requires the business microservice unit to execute; if yes, stopping the current scheduled task executed by the specified business microservice unit, and distributing the scheduled task with the priority execution authority to the specified business microservice unit; if no, stopping the current scheduled task executed by a random server, and distributing the scheduled task with the priority execution authority to the random server.

[0012] In one example, the timing scheduling underlying of the scheduled task is implemented based on Quartz.

[0013] The application further provides a distributed scheduling device under a micro-service architecture, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the following: determining a scheduled task to be distributed, wherein the scheduled task refers to business logic executed according to a set timer rule; according to different business types, dividing servers into a scheduling execution micro-service unit and a business micro-service unit, and distributing the scheduling execution micro-service unit and the business micro-service unit; determining a tenant database corresponding to the scheduling execution micro-service unit, wherein the tenant database only allows the corresponding scheduling execution micro-service unit to access; determining a thread quantity corresponding to the scheduling execution micro-service unit and a working state of the thread, and determining scheduled task information; and according to the thread quantity, the working state of the thread and the scheduled task information, distributing, by the scheduling execution micro-service unit, the scheduled task in the tenant database to other scheduling execution micro-service units and the business micro-service unit.

[0014] The application further provides a non-volatile computer storage medium storing computer executable instructions, which are configured to: determine a scheduled task to be distributed, wherein the scheduled task refers to business logic executed according to a set timer rule; according to different business types, divide servers into a scheduling execution micro-service unit and a business micro-service unit, and distribute the scheduling execution micro-service unit and the business micro-service unit; determine a tenant database corresponding to the scheduling execution micro-service unit, wherein the tenant database only allows the corresponding scheduling execution micro-service unit to access; determine a thread quantity corresponding to the scheduling execution micro-service unit and a working state of the thread, and determine scheduled task information; and according to the thread quantity, the working state of the thread and the scheduled task information, distribute, by the scheduling execution micro-service unit, the scheduled task in the tenant database to other scheduling execution micro-service units and the business micro-service unit.

[0015] The method provided by the application can enable the system to uniformly manage scheduled tasks of all tenants or part of tenants in the environment under a multi-tenant environment, and under a micro-service architecture, the system can assign business-related micro-service unit nodes to execute scheduled tasks. This architecture can simultaneously satisfy multiple asynchronous execution scheduled tasks, and has good high concurrency and availability for multi-tenant, micro-service architecture and distributed deployment. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0017] Figure 1 A flow diagram of a distributed scheduling method under a micro-service architecture in an embodiment of the application is shown in FIG. 1.

[0018] Figure 2 A schematic diagram of a micro-service architecture in an embodiment of the application is shown in FIG. 2.

[0019] Figure 3 A schematic diagram of a distributed scheduling device under a micro-service architecture in an embodiment of the application is shown in FIG. 3. DETAILED DESCRIPTION

[0020] To make the objectives, technical solutions, and advantages of the application clearer, the following will describe the technical solutions of the application in conjunction with specific embodiments of the application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the application, but not all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the application.

[0021] The implementation of the analysis method involved in the embodiments of the application can be a terminal device or a server, and the application does not make special limitations on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a terminal device as an example.

[0022] The technical solutions provided by the embodiments of the application are described in detail below with reference to the accompanying drawings.

[0023] As shown in FIGS. 1, 2, and 3, the embodiments of the application provide a distributed scheduling method under a micro-service architecture, which includes the following steps. Figure 1 Figure 2 S101: Determine a scheduled task to be distributed, wherein the scheduled task refers to a business logic executed according to a set timer rule.

[0024] S101: Determine a scheduled task to be distributed, wherein the scheduled task refers to a business logic executed according to a set timer rule.

[0025] Before scheduling, the terminal device first needs to determine the scheduled task to be distributed. The scheduled task here refers to a business logic executed according to a timer rule, for example, sending a reminder at 7 o'clock in the morning every day, or backing up various data every hour. That is, do something at a regular time point, and the regularity can be very complex.

[0026] ​S102: According to different business types, the server is divided into a scheduling execution micro-service unit and a business micro-service unit, and the scheduling execution micro-service unit and the business micro-service unit are distributedly deployed.

[0027] The single architecture mode is convenient for development, testing, deployment and running when the project is small at the beginning. However, as the application is added with more and more functions over time, the application will eventually become huge, and there may be millions of lines of code in a project. In order to prevent the entire system from being unable to operate normally due to an error in the execution of a type of service, the system can be split into several modules and services. Therefore, the terminal device needs to divide the server into a scheduling execution micro-service unit and a business micro-service unit according to the business type. The scheduling execution micro-service unit is used to access the tables in the tenant database and distribute scheduled tasks to each server. The scheduling execution micro-service unit can also be used to execute scheduled tasks, and the business micro-service unit is used to process specific businesses that are decomposed according to functional requirements. The scheduling execution micro-service unit and the business micro-service unit both support distributed deployment.

[0028] For example, there are two modules of finance and human resources in the system, the finance is responsible for reimbursement, and the human resources is responsible for recruitment, so two micro-services can be split out, so that when one of the module nodes is down, the business of the other module can still be carried out normally. It should be noted that the server corresponding to the service unit can be a single device or a system composed of multiple devices, i.e., a distributed server, which is not limited in the present application.

[0029] S103: Determine the tenant databases corresponding to the scheduling execution micro-service units respectively, and the tenant databases only allow the corresponding scheduling execution micro-service units to access.

[0030] After the terminal device splits the overall system into several micro-services according to the functional requirements of the system, it needs to determine the number of scheduling execution micro-service units and business micro-service units responsible for distributing scheduled tasks. At the same time, in order to prevent multiple scheduling execution micro-service units from accessing the same single task in the same tenant database at the same time, the tenant database can be locked during the distribution of the single task.

[0031] S104: Determine the number of threads corresponding to the scheduling execution micro-service units respectively and the working status of the threads, and determine the scheduled task information.

[0032] In order to reasonably utilize computing resources, when distributing tasks, the terminal device needs to count the number of threads in the server and the working state of each thread, that is, count the idle computing resources of each server. It also needs to determine various information of the scheduled task, such as the service function that the scheduled task can call, the amount of computing resources that can be needed, and whether a specific business microservice unit is needed to execute the scheduled task.

[0033] S105: According to the number of threads, the working state of the threads and the scheduled task information, the scheduling execution microservice unit distributes the scheduled task in the tenant database to other scheduling execution microservice units and the business microservice unit.

[0034] After the terminal device counts the number of threads in each server and the working state of the threads and the information of the scheduled task, the scheduling execution microservice unit will distribute the scheduled task to be distributed to the server through the above information.

[0035] In one embodiment, before the task is distributed, if the tenant does not receive the response notification of the microservice request for a long time, the software use experience of the tenant will undoubtedly be reduced. Based on this, before the task is distributed, the terminal device can first determine the received microservice request issued by the tenant, convert the microservice request into a scheduled task, then store the scheduled task in the tenant database, and update the task state of the scheduled task to be distributed. After determining that the scheduled task is stored successfully, the tenant is sent information that the response is successful, which improves the user experience of the tenant.

[0036] In one embodiment, when determining the scheduling execution microservice unit corresponding to the tenant database, the terminal device first needs to determine the scheduled task stored in the tenant database, record the scheduling execution microservice unit that first accesses the tenant database, and establish the corresponding relationship between the scheduling execution microservice unit and the tenant database, so that only the scheduling execution microservice unit is allowed to access the single task in the tenant database. For example, the tenant is T1, and there are two scheduling execution microservice units, SU1 and SU2. When distributing the single task in the tenant database of tenant T1, if SU1 first accesses the data in the T1 database, then the scheduling execution microservice unit SU1 will lock the tenant database of tenant T1 at this time, and thereafter SU2 will ignore the single task data in T1, that is, the single task in T1 is only responsible for distribution by SU1.

[0037] In one embodiment, after determining the correspondence between the scheduling execution microservice unit and the tenant database, the terminal device needs to determine the number of server internal threads and the working state of the threads, wherein the working state of the threads includes an idle state and an occupied state. The number of idle threads in each server internal thread pool is determined, that is, the idle computing resources corresponding to each server are determined. It is also necessary to determine whether the scheduled task needs to be executed by a specified business microservice unit. For example, a financial-related microservice request proposed by a financial staff will be executed by a business microservice unit specially responsible for the financial module.

[0038] After determining the idle computing resources corresponding to the server, if the scheduled task does not need to be executed by a specified business microservice unit, the scheduling execution microservice unit with the most idle computing resources is allocated by the scheduling execution microservice unit. That is, if the scheduled task does not specify a business microservice unit, the scheduled task will be executed in the scheduling execution microservice unit by default. If the scheduled task needs to be executed by a specified business microservice unit, the scheduled task is distributed to the specified business microservice unit in the form of a remote procedure call.

[0039] Further, if it is found through statistics that all threads in the scheduling execution microservice unit are in the occupied state, in order to improve the tightness of the scheduling of the scheduled task, the terminal device can count the task load of each scheduling execution microservice unit. Here, the approximate time for the scheduling execution microservice unit to complete all scheduled tasks of the current load can be estimated, and then the scheduling execution microservice unit with the smallest task load, that is, the earliest scheduling execution microservice unit that completes all current load scheduled tasks, is selected for distribution.

[0040] In one embodiment, the architecture provides two basic job storage types, one of which is memory storage, that is, in the case of saving the running information of the task scheduling in the memory. This method provides the best performance because data access in the memory is the fastest. The disadvantage is the lack of data persistence. When the program stops or the system crashes, all running information will be lost. The other is JDBC job storage, which saves the running information of the scheduling to the master library or the Scheduler library table of the non-tenant database for persistent processing. Although the operation speed is slightly slower, even if the program stops in the middle, the intermediate data will still be left in the master library and the non-tenant database. Therefore, the two job storage types can be flexibly selected according to the needs of the scheduled task. If the workload of the scheduled task is large, in order to prevent data loss, the job storage of JDBC can be selected to persistently store the intermediate data to the task scheduling library of the master library or the non-tenant database.

[0041] In one embodiment, some scheduled tasks are important and have priority execution permission. If all threads in all servers are in the occupied state at this time, it is first determined whether the scheduled task with priority execution permission requires a specified business microservice unit to execute. If so, the scheduled task with priority execution permission is distributed to the business microservice unit, and the scheduled task currently being performed by the business microservice unit is stopped. If not, a scheduling execution microservice unit is randomly selected for distribution, and the scheduled task currently being performed by the scheduling server is stopped.

[0042] In one example, the timing scheduling underlying of the scheduled task can be implemented based on Quartz.

[0043] As shown in Figure 3 The embodiments of the present application also provide a distributed scheduling device under a microservice architecture, which comprises:

[0044] at least one processor; and

[0045] a memory in communication connection with the at least one processor; wherein

[0046] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: determine a scheduled task to be distributed, the scheduled task being a business logic executed according to a set timer rule; according to different business types, divide servers into scheduling execution microservice units and business microservice units, and distribute the business microservice units; determine tenant databases corresponding to the scheduling execution microservice units respectively, the tenant databases allowing only the corresponding scheduling execution microservice units to access; determine the number of threads corresponding to the scheduling execution microservice units respectively and the working states of the threads, and determine the scheduled task information; according to the number of threads, the working states of the threads and the scheduled task information, distribute the scheduled tasks in the tenant databases to other scheduling execution microservice units and the business microservice units through the scheduling execution microservice units.

[0047] The embodiment of the present application further provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are configured to: determine a scheduled task to be distributed, the scheduled task being a business logic executed according to a set timer rule; according to different business types, divide servers into a scheduling execution micro-service unit and a business micro-service unit, and distribute the business micro-service unit; determine a tenant database corresponding to the scheduling execution micro-service unit, the tenant database allowing only the corresponding scheduling execution micro-service unit to access; determine a thread quantity corresponding to the scheduling execution micro-service unit and a working state of the thread, and determine scheduled task information; according to the thread quantity, the working state of the thread and the scheduled task information, distribute, by the scheduling execution micro-service unit, the scheduled task in the tenant database to other scheduling execution micro-service units and the business micro-service unit.

[0048] Each of the embodiments in the present application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each of the embodiments mainly describes the difference from other embodiments. Especially, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the related parts can be referred to the part of the description of the method embodiments.

[0049] The device and medium provided by the embodiments of the present application are one-to-one corresponding to the method, and therefore, the device and medium also have the similar beneficial technical effects as the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device and medium will not be described here.

[0050] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can adopt a computer program product implemented on one or more computer usable storage media containing computer usable program codes (including but not limited to disk memory, CD-ROM, optical memory, etc.).

[0051] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0052] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0053] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0054] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0055] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, etc. in the form of computer-readable media. The memory is an example of computer-readable media.

[0056] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0057] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0058] The above only describes the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A distributed scheduling method under a microservice architecture, characterized in that, include: Identify the planned tasks to be distributed, where the planned tasks refer to the business logic executed according to the set timer rules; Based on different business types, the server is divided into scheduling and execution microservice units and business microservice units, and the scheduling and execution microservice units and the business microservice units are deployed in a distributed manner. Determine the tenant database corresponding to each of the scheduling and execution microservice units, and the tenant database is only accessible to the corresponding scheduling and execution microservice unit. Determine the number of threads corresponding to each of the scheduled execution microservice units and the working status of the threads, and determine the planned task information; Based on the number of threads, the working status of the threads, and the planned task information, the planned tasks in the tenant database are distributed to other scheduling execution microservice units and the business microservice unit through the scheduling execution microservice unit; Determine the number of threads corresponding to each of the scheduled execution microservice units and the working status of each thread, and determine the planned task information, specifically including: Based on the working status of the threads, determine the number of threads in the server that are in an idle state; Determine whether the planned task requires execution by a specified business microservice unit to determine the planned task information; If so, the planned task is distributed to the designated business microservice unit via remote procedure call; If not, the scheduled task will be distributed to the scheduling execution microservice unit with the largest number of idle threads; After distributing the scheduled tasks from the tenant database to the server, the tasks further include: It is determined that all threads within the server are in an occupied state, and the scheduled task has priority for execution; Determine whether the scheduled task with priority execution requires the specified business microservice unit to execute; If so, then stop the current scheduled task being executed by the designated business microservice unit, and distribute the scheduled task with priority execution permission to the designated business microservice unit; If not, a random server is selected to stop executing the current scheduled task, and the scheduled task with priority execution is distributed to the random server.

2. The method according to claim 1, characterized in that, Before determining the planned tasks to be distributed, the method further includes: Receive microservice requests sent by tenants and convert the microservice requests into the scheduled tasks; The planned task is stored in the tenant database, and the task status of the planned task is updated to "pending distribution" in the tenant database. Send a success response message to the tenant.

3. The method according to claim 1, characterized in that, Determining the tenant database corresponding to each of the scheduled execution microservice units specifically includes: Determine the planned tasks in the tenant database and record the scheduling execution microservice unit that first accesses the tenant database; The scheduling and execution microservice unit is used as the scheduling and execution microservice unit corresponding to the tenant database.

4. The method according to claim 1, characterized in that, Determine the number of threads corresponding to each of the scheduled execution microservice units and the working status of each thread, and determine the planned task information, specifically including: Determine whether the planned task requires execution by a specified business microservice unit to determine the planned task information; Based on the working state of the threads, determine the planned task load of the threads that are in an occupied state within the server. If all threads within the server are in an occupied state, select the thread with the lowest scheduled task load to distribute the scheduled task.

5. The method according to claim 1, characterized in that, The method further includes: Determine the workload of the planned task; If the workload exceeds a preset threshold, the intermediate data during the execution of the planned task will be persistently stored in the main database or the task scheduling database of a non-tenant database.

6. The method according to claim 1, characterized in that, The scheduled task is based on Quartz.

7. A distributed scheduling device under a microservice architecture, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the steps of the method as claimed in any one of claims 1-6.

8. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are configured to perform the steps of the method as claimed in any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-tenant data processing method, apparatus, device and system based on micro-service

    CN111814177A

  • Distributed scheduling system architecture and micro-service workflow scheduling method

    CN113535362A