Multi-tenant task scheduling method and device, computer equipment and storage medium
By obtaining and isolating tenants' task data in multi-tenant task scheduling, updating task queues, and executing tasks, the problem of low personalization and security in traditional methods is solved, and higher personalization, security and scalability are achieved.
Patent Information
- Application Number
- CN202411976386.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-06
AI Technical Summary
The traditional multi-tenant task scheduling method has the problem of low personalization or low security.
Isolate task data by obtaining the permissions of each target tenant, distribute tasks to obtain the default task queue, and update the task queue according to the task queue configuration parameters to form a standard task queue. Execute the tasks to be executed and the associated subtasks in the standard task queue in turn.
Improved the personalization, security and scalability of multi-tenant task scheduling.
Smart Images

Figure CN119938264A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of task scheduling, and in particular to a multi-tenant task scheduling method, apparatus, computer equipment and storage medium. Background Art
[0002] Multi-tenancy technology, also known as multi-tenancy technology, is a software architecture technology that explores and implements how to share the same system or program components in a multi-user environment while still ensuring data isolation between users and performance isolation of shared resources, effectively saving the cost of developing applications.
[0003] However, traditional multi-tenant task scheduling methods have problems such as low personalization or low security. Summary of the invention
[0004] Based on this, it is necessary to provide a multi-tenant task scheduling method, device, computer equipment and storage medium that can improve personalization and security in response to the above technical problems.
[0005] In a first aspect, a multi-tenant task scheduling method is provided, the method comprising:
[0006] Obtain the permission isolation task data of each target tenant, and assign tasks to each permission isolation task data to obtain the default task queue of each target tenant; the target tenant is the tenant whose identity authentication result is successful;
[0007] According to the task queue configuration parameters of each target tenant, the default task queue of the corresponding target tenant is updated to obtain the standard task queue of the corresponding target tenant; wherein the task queue configuration parameters include task type, task generation time, default task sorting and set task sorting;
[0008] The current to-be-executed tasks in the standard task queue of each target tenant and the subtasks associated with the corresponding current to-be-executed tasks are executed in sequence; wherein the current to-be-executed tasks are tasks in the standard task queue corresponding to the current moment whose task status is unexecuted.
[0009] In one of the embodiments, obtaining the permission isolation task data of each target tenant includes: receiving the identity authentication data sent by each tenant, and obtaining the identity authentication result of each tenant after performing identity authentication according to the identity authentication data of each tenant; the identity authentication result includes authentication success or authentication failure; in response to receiving the permission authentication data of the corresponding target tenant, determining the data access rights of the corresponding target tenant according to the permission authentication data of each target tenant; performing permission isolation processing on the task data of the corresponding target tenant according to the data access rights of each target tenant, and obtaining the permission isolation task data of the corresponding target tenant.
[0010] In one of the embodiments, the default task queue of the corresponding target tenant is updated according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant, including: adjusting the queue task order of the default task queue of the corresponding target tenant according to the task type, task generation time and default task order of each target tenant to obtain the adjusted default task queue of the corresponding target tenant; in response to the default task order of the target tenant being the same as the set task order of the corresponding target tenant, using the adjusted default task queue of the corresponding target tenant as the standard task queue of the corresponding target tenant.
[0011] In one of the embodiments, the default task queue of the corresponding target tenant is updated according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant, and also includes: in response to the default task order of the target tenant and the set task order of the corresponding target tenant being different, the queue task order of the adjusted default task queue of the corresponding target tenant is updated according to the set task order of the corresponding target tenant to obtain the standard task queue of the corresponding target tenant.
[0012] In one of the embodiments, the method further includes: in response to the existence of a current to-be-executed task being updated to a currently executing task, adding an occupied state to the currently executing task; wherein the currently executing task is the current to-be-executed task whose task state in the standard task queue corresponding to the current moment changes to an executing state.
[0013] In one of the embodiments, the method also includes: in response to the existence of a currently executing task being updated to a currently executed task, task scheduling statistics of the corresponding target tenant are counted based on the task record data of the currently executed task; wherein the task record data includes the estimated task completion time, the average task completion time and the number of completed tasks; the currently executed task is the currently executing task whose task status in the standard task queue corresponding to the current moment changes to the executed status.
[0014] In one of the embodiments, the method further includes: generating a task scheduling statistics graph and a task scheduling statistics table of the corresponding target tenant according to the task scheduling statistics data of each target tenant; and displaying the task scheduling statistics graph and the task scheduling statistics table of each target tenant.
[0015] In a second aspect, a multi-tenant task scheduling device is provided, which includes a data acquisition module, a queue update module and a task scheduling module.
[0016] Among them, the data acquisition module is used to obtain the permission isolation task data of each target tenant, and obtain the default task queue of each target tenant after task assignment for each permission isolation task data; the target tenant is the tenant whose identity authentication result is successful authentication; the queue update module is used to update the default task queue of the corresponding target tenant according to the task queue configuration parameters of each target tenant, and obtain the standard task queue of the corresponding target tenant; wherein the task queue configuration parameters include task type, task generation time, default task sorting and set task sorting; the task scheduling module is used to execute the current to-be-executed task in the standard task queue of each target tenant and the corresponding subtasks associated with the current to-be-executed task in sequence; wherein the current to-be-executed task is the task whose task status is unexecuted in the standard task queue corresponding to the current moment.
[0017] In a third aspect, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of any method in the above method embodiments are implemented.
[0018] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any method in the above method embodiments are implemented.
[0019] The above-mentioned multi-tenant task scheduling method, device, computer equipment and storage medium obtain the permission isolation task data of each target tenant, and obtain the default task queue of each target tenant after assigning tasks to each permission isolation task data; the target tenant is a tenant whose identity authentication result is successful authentication; then, the default task queue of the corresponding target tenant is updated according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant; wherein the task queue configuration parameters include task type, task generation time, default task sorting and set task sorting; then, the current task to be executed in the standard task queue of each target tenant and each subtask associated with the corresponding current task to be executed are executed in turn; wherein the current task to be executed is the task whose task status is unexecuted in the standard task queue corresponding to the current moment. This improves the personalization, security and scalability of multi-tenant task scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 An application environment diagram of a multi-tenant task scheduling method in one embodiment;
[0021] Figure 2 A first flow chart of a multi-tenant task scheduling method according to an embodiment;
[0022] Figure 3A schematic diagram of a process for obtaining permission isolation task data of each target tenant in an embodiment;
[0023] Figure 4 A schematic diagram of a process of updating the default task queue of a corresponding target tenant according to the task queue configuration parameters of each target tenant in an embodiment to obtain the standard task queue of the corresponding target tenant;
[0024] Figure 5 A second flow chart of a multi-tenant task scheduling method according to an embodiment;
[0025] Figure 6 is a structural block diagram of a multi-tenant task scheduling device in one embodiment;
[0026] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0030] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.
[0031] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.
[0032] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" etc. specify the presence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof.
[0033] The multi-tenant task scheduling method provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0034] In a specific example, the multi-tenant task scheduling method can be, but is not limited to, using a software operation service platform (Software as a Service, SaaS). The above is only a specific example, and it is flexibly set according to user needs in actual applications and is not limited here.
[0035] In one embodiment, Figure 2 As shown, a multi-tenant task scheduling method is provided, which is applied to Figure 1 The server 104 in the example is used for explanation, and the steps include the following steps 201 to 203.
[0036] Step 201: Acquire the permission isolation task data of each target tenant, and assign tasks to each permission isolation task data to obtain a default task queue of each target tenant.
[0037] The target tenant is a tenant whose identity authentication result is successful; the tenant is any service platform. Specifically, the server 104 obtains the permission isolation task data of each target tenant, and obtains the default task queue of each target tenant after performing task assignment on each permission isolation task data.
[0038] In one embodiment, if Figure 3 As shown, obtaining the permission isolation task data of each target tenant includes steps 301 to 303.
[0039] Step 301, receiving identity authentication data sent by each tenant, and performing identity authentication according to the identity authentication data of each tenant to obtain the identity authentication result of each tenant;
[0040] Step 302, in response to receiving the permission authentication data of the corresponding target tenant, determining the data access rights of the corresponding target tenant according to the permission authentication data of each target tenant;
[0041] Step 303 , performing permission isolation processing on the task data of the corresponding target tenant according to the data access rights of each target tenant, and obtaining the permission isolation task data of the corresponding target tenant.
[0042] Among them, the authentication result includes authentication success or authentication failure. Specifically, the server 104 can receive the authentication data sent by each tenant, and obtain the authentication result of each tenant after performing identity authentication according to the identity authentication data of each tenant; then, in response to receiving the permission authentication data of the corresponding target tenant, determine the data access rights of the corresponding target tenant according to the permission authentication data of each target tenant; then, perform permission isolation processing on the task data of the corresponding target tenant according to the data access rights of each target tenant, and obtain the permission isolation task data of the corresponding target tenant, which improves the convenience and efficiency of obtaining the permission isolation data of the target tenant, and also improves the security of multi-tenant task scheduling, and further improves the security mechanism of multi-tenant task scheduling.
[0043] In a specific example, in response to a tenant's identity authentication result being an authentication failure, an authentication failure prompt message is output to the tenant whose identity authentication result is an authentication failure, and the tenant whose identity authentication result is an authentication failure is recorded. The above is only a specific example, and can be flexibly set according to needs in actual applications, and is not limited here.
[0044] In this embodiment, the identity authentication data sent by each tenant is received, and the identity authentication result of each tenant is obtained after identity authentication is performed according to the identity authentication data of each tenant; then, in response to receiving the permission authentication data of the corresponding target tenant, the data access rights of the corresponding target tenant are determined according to the permission authentication data of each target tenant; then, according to the data access rights of each target tenant, the task data of the corresponding target tenant is permission isolated, and the permission isolated task data of the corresponding target tenant is obtained, which improves the convenience and efficiency of obtaining the permission isolation data of the target tenant, and also improves the security of multi-tenant task scheduling, and further improves the security mechanism of multi-tenant task scheduling.
[0045] Step 202 : updating the default task queue of the corresponding target tenant according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant.
[0046] The task queue configuration parameters include task type, task generation time, default task order and set task order. Specifically, the server 104 can update the default task queue of the corresponding target tenant according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant.
[0047] In one embodiment, if Figure 4 As shown, the default task queue of the corresponding target tenant is updated according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant, including steps 401 to 402.
[0048] Step 401, adjusting the queue task order of the default task queue of the corresponding target tenant according to the task type, task generation time and default task order of each target tenant, to obtain the adjusted default task queue of the corresponding target tenant;
[0049] Step 402: In response to the default task order of the target tenant being the same as the set task order of the corresponding target tenant, the adjusted default task queue of the corresponding target tenant is used as the standard task queue of the corresponding target tenant.
[0050] Specifically, the server 104 can adjust the queue task order of the default task queue of the corresponding target tenant according to the task type, task generation time and default task order of each target tenant, and obtain the adjusted default task queue of the corresponding target tenant; then, in response to the default task order of the target tenant and the set task order of the corresponding target tenant being the same, the adjusted default task queue of the corresponding target tenant is used as the standard task queue of the corresponding target tenant, thereby improving the convenience and personalization of task scheduling.
[0051] In this embodiment, the queue task order of the default task queue of the corresponding target tenant is adjusted according to the task type, task generation time and default task order of each target tenant, so as to obtain the adjusted default task queue of the corresponding target tenant; then, in response to the default task order of the target tenant being the same as the set task order of the corresponding target tenant, the adjusted default task queue of the corresponding target tenant is used as the standard task queue of the corresponding target tenant, thereby improving the convenience and personalization of task scheduling.
[0052] In one embodiment, if Figure 4 As shown, according to the task queue configuration parameters of each target tenant, the default task queue of the corresponding target tenant is updated to obtain the standard task queue of the corresponding target tenant, and step 403 is also included.
[0053] Step 403, in response to the default task order of the target tenant being different from the set task order of the corresponding target tenant, the queue task order of the adjusted default task queue of the corresponding target tenant is updated according to the set task order of the corresponding target tenant to obtain the standard task queue of the corresponding target tenant.
[0054] Specifically, in response to the fact that the default task order of the target tenant is different from the set task order of the corresponding target tenant, server 104 updates the queue task order of the adjusted default task queue of the corresponding target tenant according to the set task order of the corresponding target tenant, and obtains the standard task queue of the corresponding target tenant, thereby improving the convenience and personalization of task scheduling.
[0055] In this embodiment, in response to the fact that the default task order of the target tenant and the set task order of the corresponding target tenant are different, the queue task order of the adjusted default task queue of the corresponding target tenant is updated according to the set task order of the corresponding target tenant to obtain the standard task queue of the corresponding target tenant, thereby improving the convenience and personalization of task scheduling.
[0056] Step 203: sequentially execute the current to-be-executed tasks in the standard task queue of each target tenant and the subtasks associated with the corresponding current to-be-executed tasks.
[0057] Among them, the current to-be-executed task is a task in the standard task queue corresponding to the current moment whose task status is unexecuted. Specifically, the server 104 can sequentially execute the current to-be-executed task in the standard task queue of each target tenant and each subtask associated with the corresponding current to-be-executed task, thereby improving the personalization, security and scalability of multi-tenant task scheduling.
[0058] Based on this, the above multi-tenant task scheduling method obtains the permission isolation task data of each target tenant, and obtains the default task queue of each target tenant after assigning tasks to each permission isolation task data; the target tenant is the tenant whose identity authentication result is successful authentication; then, the default task queue of the corresponding target tenant is updated according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant; wherein the task queue configuration parameters include task type, task generation time, default task sorting and set task sorting; then, the current task to be executed in the standard task queue of each target tenant and the corresponding subtasks associated with the current task to be executed are executed in turn; wherein the current task to be executed is the task whose task status is unexecuted in the standard task queue corresponding to the current moment. This improves the personalization, security and scalability of multi-tenant task scheduling.
[0059] In one embodiment, if Figure 5As shown, the method further includes step 501.
[0060] In response to the current to-be-executed task being updated to be a currently-executed task, an occupied state is added to the currently-executed task.
[0061] Among them, the currently executing task is the current pending task whose task state changes to the executing state in the standard task queue corresponding to the current moment. Specifically, in response to the current pending task being updated to the currently executing task, the server 104 adds the occupied state to the currently executing task, thereby avoiding abnormalities or errors in task scheduling caused by other tenants calling the task data of the currently executing task at the same time during the execution of the task, thereby improving the accuracy and convenience of task scheduling.
[0062] In this embodiment, in response to the current to-be-executed task being updated to the currently executing task, the currently executing task is added to an occupied state, thereby preventing the currently executing task from being simultaneously called by other tenants during the execution of the task, causing task scheduling anomalies or errors, thereby improving the accuracy and convenience of task scheduling.
[0063] In one embodiment, if Figure 5 As shown, the method further includes step 502.
[0064] Step 502 : In response to the currently executing task being updated to the currently executed task, task scheduling statistics data of the target tenant corresponding to the task record data of the currently executed task are counted.
[0065] Among them, the task record data includes the estimated completion time of the task, the average completion time of the task and the number of completed tasks; the currently executed task is the currently executing task whose task status in the standard task queue corresponding to the current moment has changed to the executed status.
[0066] Specifically, in response to the existence of a currently executing task being updated as a currently executed task, the server 104 collects task scheduling statistics of the target tenant corresponding to the task record data of the currently executed task, thereby improving the efficiency and convenience of task scheduling.
[0067] In a specific example, the method further includes:
[0068] In response to the currently executing task being updated to the currently executed task, the execution status of the currently executed task is recorded; wherein the execution status of the currently executed task includes successful execution or abnormal execution.
[0069] A task execution log for the corresponding target tenant is generated according to the execution status of all currently executed tasks of each target tenant, so that the staff can understand the execution status of all tasks in the standard task queue of each target tenant through the task execution log of each target tenant. The above is only a specific example. In actual application, it is flexibly set according to user needs and is not limited here.
[0070] In a specific example, the method further includes:
[0071] In response to the execution status of the currently executed task being an execution exception, the currently executed task is updated to a task to be re-executed, and the task to be re-executed is re-executed, thereby improving the accuracy and completeness of task scheduling; the task to be re-executed is the currently executed task whose task status in the standard task queue corresponding to the current moment is updated from the executed state to the pending state. The above is only a specific example, and it can be flexibly set according to user needs in actual applications, and is not limited here.
[0072] In this embodiment, in response to the current executing task being updated to the currently executed task, the task scheduling statistics of the target tenant corresponding to the task record data of the currently executed task are counted, thereby improving the efficiency and convenience of task scheduling.
[0073] In one embodiment, if Figure 5 As shown, the method further includes step 503 and step 504.
[0074] Step 503: Generate a task scheduling statistics graph and a task scheduling statistics table of the corresponding target tenant according to the task scheduling statistics of each target tenant;
[0075] Step 504: Display the task scheduling statistics chart and task scheduling statistics table of each target tenant.
[0076] Specifically, the server 104 generates a task scheduling statistics chart and a task scheduling statistics table of the corresponding target tenants according to the task scheduling statistics of each target tenant; then, the task scheduling statistics chart and the task scheduling statistics table of each target tenant are displayed, thereby improving the visualization and convenience of task scheduling.
[0077] In this embodiment, a task scheduling statistics chart and a task scheduling statistics table of the corresponding target tenant are generated according to the task scheduling statistical data of each target tenant; then, the task scheduling statistics chart and the task scheduling statistics table of each target tenant are displayed, thereby improving the visualization and convenience of task scheduling.
[0078] It should be understood that although Figure 2-5The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0079] Second, as Figure 6 As shown, a multi-tenant task scheduling device is provided, which includes a data acquisition module 610, a queue update module 620 and a task scheduling module 630.
[0080] Among them, the data acquisition module 610 is used to obtain the permission isolation task data of each target tenant, and obtain the default task queue of each target tenant after task assignment for each permission isolation task data; the target tenant is a tenant whose identity authentication result is successful authentication; the queue update module 620 is used to update the default task queue of the corresponding target tenant according to the task queue configuration parameters of each target tenant, and obtain the standard task queue of the corresponding target tenant; wherein the task queue configuration parameters include task type, task generation time, default task sorting and set task sorting; the task scheduling module 630 is used to execute the current to-be-executed task in the standard task queue of each target tenant and the corresponding subtasks associated with the current to-be-executed task in sequence; wherein the current to-be-executed task is the task whose task status is unexecuted in the standard task queue corresponding to the current moment.
[0081] In one embodiment, the data acquisition module 610 includes a data acquisition unit.
[0082] Among them, the data acquisition unit is used to receive the identity authentication data sent by each tenant, and obtain the identity authentication result of each tenant after performing identity authentication according to the identity authentication data of each tenant; the identity authentication result includes authentication success or authentication failure; the data acquisition unit is used to respond to the receipt of the permission authentication data of the corresponding target tenant, and determine the data access rights of the corresponding target tenant according to the permission authentication data of each target tenant; the data acquisition unit is used to perform permission isolation processing on the task data of the corresponding target tenant according to the data access rights of each target tenant, and obtain the permission isolation task data of the corresponding target tenant.
[0083] In one embodiment, the queue updating module 620 includes a first queue updating unit.
[0084] Among them, the first queue update unit is used to adjust the queue task order of the default task queue of the corresponding target tenant according to the task type, task generation time and default task order of each target tenant, so as to obtain the adjusted default task queue of the corresponding target tenant; the first queue update unit is used to respond to the default task order of the target tenant and the set task order of the corresponding target tenant being the same, and use the adjusted default task queue of the corresponding target tenant as the standard task queue of the corresponding target tenant.
[0085] In one embodiment, the queue updating module 620 includes a second queue updating unit.
[0086] Among them, the second queue update unit is used to respond to the fact that the default task order of the target tenant and the set task order of the corresponding target tenant are different, and update the queue task order of the adjusted default task queue of the corresponding target tenant according to the set task order of the corresponding target tenant to obtain the standard task queue of the corresponding target tenant.
[0087] In one of the embodiments, the device further includes an occupancy status adding module.
[0088] Among them, the occupied status adding module is used to add an occupied status to the currently executing task in response to the current pending task being updated to the currently executing task; wherein the currently executing task is the current pending task whose task status in the standard task queue corresponding to the current moment changes to the executing state.
[0089] In one of the embodiments, the device further includes a data statistics module.
[0090] Among them, the data statistics module is used to respond to the existence of a currently executing task being updated to a currently executed task, and to generate task scheduling statistics for the corresponding target tenant based on the task record data of the currently executed task; wherein the task record data includes the estimated completion time of the task, the average completion time of the task and the number of completed tasks; the currently executed task is the currently executing task whose task status in the standard task queue corresponding to the current moment changes to the executed status.
[0091] In one of the embodiments, the device further includes a chart generating module.
[0092] Among them, the chart generation module is used to generate the task scheduling statistics chart and task scheduling statistics table of the corresponding target tenant according to the task scheduling statistical data of each target tenant; the chart generation module is used to display the task scheduling statistics chart and task scheduling statistics table of each target tenant.
[0093] For the specific limitations of the multi-tenant task scheduling device, please refer to the limitations of the multi-tenant task scheduling method above, which will not be repeated here. Each module in the above-mentioned multi-tenant task scheduling device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0094] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the permission isolation task data of each target tenant. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a multi-tenant task scheduling method is implemented.
[0095] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0096] In a third aspect, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of any method in the above method embodiments are implemented.
[0097] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any method in the above method embodiments are implemented.
[0098] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0099] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0100] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A multi-tenant task scheduling method, the method comprising: Obtaining the permission isolation task data of each target tenant, and assigning tasks to each permission isolation task data to obtain the default task queue of each target tenant; The target tenant is a tenant whose identity authentication result is successful; According to the task queue configuration parameters of each target tenant, the default task queue of the corresponding target tenant is updated to obtain the standard task queue of the corresponding target tenant; wherein the task queue configuration parameters include task type, task generation time, default task sorting and set task sorting; The current to-be-executed task in the standard task queue of each target tenant and each subtask associated with the corresponding current to-be-executed task are executed in sequence; wherein the current to-be-executed task is a task in the standard task queue corresponding to the current moment whose task status is unexecuted.
2. The method according to claim 1, characterized in that The step of obtaining the permission isolation task data of each target tenant includes: Receiving identity authentication data sent by each of the tenants, and obtaining the identity authentication result of each of the tenants after performing identity authentication according to the identity authentication data of each of the tenants; the identity authentication result includes the authentication success or authentication failure; In response to receiving the permission authentication data of the corresponding target tenant, determining the data access rights of the corresponding target tenant according to the permission authentication data of each target tenant; According to the data access rights of each target tenant, permission isolation processing is performed on the task data of the corresponding target tenant to obtain the permission isolation task data of the corresponding target tenant.
3. The method according to claim 1, characterized in that The updating of the default task queue of the corresponding target tenant according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant includes: According to the task type, the task generation time and the default task order of each target tenant, the default task queue of the corresponding target tenant is adjusted to obtain the adjusted default task queue of the corresponding target tenant; In response to the default task order of the target tenant being the same as the set task order of the corresponding target tenant, the adjusted default task queue of the corresponding target tenant is used as the standard task queue of the corresponding target tenant.
4. The method according to claim 3, characterized in that The updating of the default task queue of the corresponding target tenant according to the task queue configuration parameters of each target tenant to obtain the standard task queue of the corresponding target tenant also includes: In response to the fact that the default task order of the target tenant and the set task order of the corresponding target tenant are different, the queue task order of the adjusted default task queue of the corresponding target tenant is updated according to the set task order of the corresponding target tenant to obtain the standard task queue of the corresponding target tenant.
5. The method according to claim 1, characterized in that The method further comprises: In response to the current to-be-executed task being updated to the currently-executed task, the currently-executed task is added with an occupied state; wherein the currently-executed task is the current to-be-executed task whose task state in the standard task queue corresponding to the current moment changes to the executing state.
6. The method according to claim 5, characterized in that The method further comprises: In response to the existence of the currently executing task being updated to the currently executed task, the task scheduling statistics of the target tenant corresponding to the task record data of the currently executed task are counted; wherein the task record data includes the estimated task completion time, the average task completion time and the number of completed tasks; the currently executed task is the currently executing task whose task status in the standard task queue corresponding to the current moment changes to the executed status.
7. The method according to claim 6, characterized in that The method further comprises: Generate a task scheduling statistics graph and a task scheduling statistics table of the corresponding target tenant according to the task scheduling statistics data of each target tenant; The task scheduling statistics graph and the task scheduling statistics table of each target tenant are displayed.
8. A multi-tenant task scheduling device, characterized in that: The device comprises: A data acquisition module is used to acquire the permission isolation task data of each target tenant, and obtain the default task queue of each target tenant after performing task assignment on each permission isolation task data; the target tenant is a tenant whose identity authentication result is successful authentication; A queue update module, used to update the default task queue of the corresponding target tenant according to the task queue configuration parameters of each target tenant, so as to obtain the standard task queue of the corresponding target tenant; wherein the task queue configuration parameters include task type, task generation time, default task sorting and set task sorting; The task scheduling module is used to execute the current to-be-executed tasks in the standard task queue of each target tenant and the corresponding subtasks associated with the current to-be-executed tasks in sequence; wherein the current to-be-executed tasks are tasks in the standard task queue corresponding to the current moment whose task status is unexecuted.
9. A computer 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 having a computer program stored thereon, 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.