Task scheduling method and device, electronic equipment and readable storage medium

By routing task requests within the application integration platform through cluster gateways and tenant gateways, the inefficiency of task scheduling in traditional platforms under multi-tenant and high-concurrency scenarios is resolved, achieving flexibility and stability in resource isolation and task scheduling.

CN121279679APending Publication Date: 2026-01-06CISDI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511380826.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Traditional application integration platforms struggle to efficiently schedule task requests in multi-tenant environments and high-concurrency scenarios, resulting in low task execution efficiency.

Method used

By using the cluster gateway and tenant gateway of the application integration platform, task requests are routed to the task execution area associated with the tenant based on the tenant identifier and task identifier, and the target processing sub-area is determined from multiple processing sub-areas for processing, supporting flexible allocation and efficient scheduling of task requests.

Benefits of technology

It achieves resource isolation and task scheduling flexibility in multi-tenant scenarios, and improves the stability and efficiency of task execution in high-concurrency scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121279679A_ABST
    Figure CN121279679A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method and device, electronic equipment and a readable storage medium. The method comprises the steps of determining a tenant identifier and a task identifier carried by a task request; according to the tenant identifier, routing the task request to a task operation area associated with the tenant through a cluster gateway of an application integration platform, and determining a target processing sub-area in the plurality of processing sub-areas, and routing the task request to a target processing sub-region for processing through a tenant gateway in the task operation region. According to the method, logic and physical isolation of resources among different tenants can be realized in a multi-tenant scene and a high-concurrency task scene, so that the tasks can be reasonably allocated to the corresponding tenant operation resources, fine management and efficient scheduling of the multi-tenant scene and the high-concurrency task scene are realized, resource conflicts are effectively avoided, and the user experience is improved. The independence and security of tasks among different tenants are ensured, and the efficiency of resource allocation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of software application technology, and in particular relates to a task scheduling method, apparatus, electronic device and readable storage medium. Background Technology

[0002] With the continuous development of computer software application technology, enterprises have increasingly higher requirements for application integration platforms. Traditional application integration platforms struggle to allocate resources efficiently when handling complex tasks, resulting in low task execution efficiency. For example, when facing task requests in multi-tenant environments and high-concurrency scenarios, traditional application integration platforms lack flexible scheduling mechanisms and cannot accurately schedule task requests to appropriate resources for processing, thus affecting the processing capacity and stability of the entire system. Summary of the Invention

[0003] In view of the shortcomings of the prior art, the purpose of this invention is to provide a task scheduling method, apparatus, electronic device and readable storage medium to solve the above problems.

[0004] The present invention provides a task scheduling method, comprising: obtaining a tenant's task request and determining the tenant identifier and task identifier carried in the task request; routing the task request to a task execution area associated with the tenant through the cluster gateway of the application integration platform according to the tenant identifier, wherein the task execution area includes multiple processing sub-areas; determining a target processing sub-area among the multiple processing sub-areas according to the task identifier, and routing the task request to the target processing sub-area for processing through the tenant gateway in the task execution area.

[0005] In one embodiment of the present invention, before routing task requests to the task execution area associated with the tenant through the cluster gateway of the application integration platform, the method further includes: dividing the application integration platform into processing areas through the target container platform to obtain multiple task processing areas of the application integration platform, wherein each task processing area has a unique associated tenant; and dividing each task processing area into processing areas based on a preset division strategy to obtain multiple processing sub-areas corresponding to each task processing area.

[0006] In one embodiment of the present invention, the method further includes: multiple sub-processing areas including a main running area, an extended running area, a specific business running area, and a plugin area; the main running area is used to process core general-purpose tasks, the extended running area is used to process high-load tasks, the specific business running area is used to process specific tasks, and the plugin area is used to deploy third-party and / or custom plugins.

[0007] In one embodiment of the present invention, each processing sub-region includes multiple instances; before routing task requests to the target processing sub-region for processing through the tenant gateway in the task processing region, the method further includes: registering and managing the multiple instances included in each processing sub-region through a registration center to monitor the online and offline information of the multiple instances included in each processing sub-region; and constructing online and offline instance clients based on the online and offline information.

[0008] In one embodiment of the present invention, routing a task request to a target processing sub-region for processing via a tenant gateway in the task processing region includes: determining the current online information of multiple instances based on online and offline instance clients; determining a target instance from the multiple instances included in the target running region based on the current online information; and routing the task request to the target instance for processing via a tenant gateway in the task running region.

[0009] In one embodiment of the present invention, after the task request is routed to the target instance for processing through the tenant gateway in the task execution area, the method further includes: in the event that the target instance fails to execute the task request; based on the online and offline instance clients, the task request is routed to other available instances in the same processing sub-area for processing through a preset retry mechanism and the tenant gateway in the task processing area.

[0010] In one embodiment of the present invention, the method further includes at least one of the following: monitoring the scheduling and operation of multiple processing sub-regions in each task processing area to obtain the operation monitoring information of the associated tenants of each task processing area, and visually displaying the operation monitoring information; recording the key scheduling information of task requests during the task scheduling process, and writing the key scheduling information into a target database so that the associated tenants can query the execution status of each task request through the target database; analyzing the operation monitoring information through a preset alarm mechanism, and sending alarm information to the target client when the operation monitoring information meets the alarm conditions.

[0011] The present invention also provides a task scheduling device, comprising: a task acquisition module configured to acquire a tenant's task request and determine the tenant identifier and task identifier carried in the task request; a first routing module configured to route the task request to a task execution area associated with the tenant through a cluster gateway of an application integration platform based on the tenant identifier, wherein the task execution area includes multiple processing sub-areas; and a second routing module configured to determine a target processing sub-area among the multiple processing sub-areas based on the task identifier, and to route the task request to the target processing sub-area for processing through a tenant gateway in the task execution area.

[0012] The present invention also provides an electronic device, comprising: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the steps of the above-described method.

[0013] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the steps of implementing the above-described method.

[0014] The beneficial effects of this technical solution are as follows: This solution obtains the tenant's task request and determines the tenant identifier and task identifier carried in the task request. Based on the tenant identifier, the task request is routed to the task execution area associated with the tenant through the cluster gateway of the application integration platform. The task execution area includes multiple processing sub-areas. This enables logical and physical isolation of resources between different tenants, improving adaptability and security in multi-tenant scenarios. Simultaneously, based on the task identifier, a target processing sub-area is determined among the multiple processing sub-areas, and the task request is routed to the target processing sub-area for processing through the tenant gateway in the task execution area. This supports flexible allocation of task requests across multiple processing sub-areas associated with the tenant, improving the scheduling flexibility and operational stability of task requests in high-concurrency scenarios, and achieving fine-grained management and efficient scheduling in multi-tenant and high-concurrency task scenarios. It avoids the problem of inefficient resource allocation and low task execution efficiency in existing technologies when handling complex tasks.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0017] Figure 1 This is a flowchart illustrating a task scheduling method according to an exemplary embodiment of the present invention;

[0018] Figure 2 This is a schematic diagram of a task scheduling system shown in an exemplary embodiment of the present invention;

[0019] Figure 3 This is a schematic diagram of the structure of a task scheduling device shown in an exemplary embodiment of the present invention;

[0020] Figure 4 A schematic diagram of a computer system suitable for implementing embodiments of the present invention is shown. Detailed Implementation

[0021] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0022] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0023] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0024] Please see Figure 1 , Figure 1 This is a flowchart illustrating a task scheduling method according to an exemplary embodiment of the present invention. Figure 1 As shown, in an exemplary embodiment, the task scheduling method includes steps S110 to S130, and each step is described in detail below.

[0025] S110, Obtain the tenant's task request and determine the tenant identifier and task identifier carried in the task request;

[0026] Specifically, the first step is to obtain the tenant's task request, which can be an HTTP interface request task, a timed request task, or an MQ listening request task.

[0027] It is understandable that the tenant's task request carries a tenant identifier and a task identifier, where the tenant identifier can represent the identity of the tenant and the task identifier can represent the type of task request.

[0028] S120, based on the tenant identifier, routes the task request to the task execution area associated with the tenant through the cluster gateway of the application integration platform, wherein the task execution area includes multiple processing sub-areas;

[0029] Specifically, after receiving a tenant's task request, the application integration platform can use the cluster gateway of the application integration platform to route the task request to the task execution area associated with the tenant for processing, based on the tenant identifier carried in the task request.

[0030] It is understandable that, in multi-tenant scenarios, the cluster gateway of the application integration platform can route task requests to the associated task execution area corresponding to each tenant based on the tenant identifier, so as to achieve request isolation by tenant, avoid mutual interference between task requests of different tenants, and ensure the independence of task processing for each tenant.

[0031] Furthermore, it should be noted that the application integration platform in this embodiment can also configure independent routing and forwarding policies for different tenants, ensuring data isolation and operational independence in multi-tenant scenarios. Simultaneously, the application integration platform can centrally configure dynamic routing rules and hot update mechanisms, allowing operations and maintenance personnel to adjust and update routing policies online in real time through the configuration center or console.

[0032] Furthermore, the task execution area includes multiple processing sub-areas, each of which can process different types of task requests in a targeted manner based on the task identifier, so as to achieve efficient task distribution and accurate processing.

[0033] S130: Based on the task identifier, determine the target processing sub-region among multiple processing sub-regions, and route the task request to the target processing sub-region for processing through the tenant gateway in the task running region.

[0034] Specifically, a target processing sub-region is determined among multiple processing sub-regions to handle task requests. Through the tenant gateway within the task execution region, the tenant's task requests are precisely routed to this target processing sub-region. This allows for targeted processing of task requests based on the type of task request indicated by the task identifier, thereby improving the efficiency and accuracy of task processing, ensuring that different types of tasks are processed in the appropriate processing sub-region, and guaranteeing the rational use of application integration platform resources and efficient scheduling of task requests.

[0035] In some examples, the scheduling method provided in this embodiment can build a scheduling center based on an open-source framework (such as Spring Boot and Vue). During the scheduling process, parameters such as task type, triggering conditions, priority and execution frequency can be set at the tenant level. Task requests are scheduled based on the set parameters, and dynamic adjustments can be made through a visual interface or configuration file.

[0036] In some examples, the scheduling center can also maintain the task execution area and its multiple processing sub-areas. When the task execution area or multiple processing sub-areas change, mechanisms such as Feign can be used to clear the cache of the old task execution area or multiple processing sub-areas to achieve real-time updates of the area.

[0037] In addition, in some examples, the elastic-job scheduled task framework can be used to periodically scan the request tasks and set rules, automatically trigger the task and match it to the corresponding processing sub-region when the request task meets the set rule conditions, thus achieving intelligent scheduling.

[0038] Furthermore, after a task request is routed to the task execution area associated with a tenant, this embodiment routes the request by configuring a tenant gateway in the task execution area, rather than using the cluster gateway of the integration platform. This further enhances data isolation and operational independence in multi-tenant scenarios, providing more reliable and secure task scheduling for different tenants.

[0039] In some examples, the tenant gateway can be configured for routing based on the cluster gateway, preferably using components such as Nginx and Istio to achieve unified access and allocation of task requests. The cluster gateway serves as the unified entry point for the application integration platform, responsible for receiving and managing all task requests from clients or external systems. By parsing the tenant identifier in the task request (such as the tenant identifier in the request URL / headers / parameters), and combining this with preset tenant routing rules, it accurately forwards the task request to the tenant gateway in the task execution area associated with the tenant, achieving request isolation and traffic distribution based on tenant. The tenant gateway serves as the entry point for the task execution area, used to receive task requests from associated tenants and route them to the multiple processing sub-areas included in the task execution area.

[0040] According to the technical solution provided in this application embodiment, by obtaining the tenant's task request and determining the tenant identifier and task identifier carried in the task request, and based on the tenant identifier, the task request is routed to the task execution area associated with the tenant through the cluster gateway of the application integration platform. The task execution area includes multiple processing sub-areas. This enables logical and physical isolation of resources between different tenants, improving adaptability and security in multi-tenant scenarios. Simultaneously, based on the task identifier, a target processing sub-area is determined among the multiple processing sub-areas, and the task request is routed to the target processing sub-area for processing through the tenant gateway in the task execution area. This supports flexible allocation of task requests across multiple processing sub-areas associated with the tenant, improving the scheduling flexibility and operational stability of task requests in high-concurrency scenarios, and achieving fine-grained management and efficient scheduling in multi-tenant and high-concurrency task scenarios. It avoids the problem of low task execution efficiency caused by the difficulty in efficiently allocating resources when handling complex task scenarios in existing technologies.

[0041] In some embodiments, before routing task requests to the task execution area associated with the tenant through the cluster gateway of the application integration platform, the method further includes: dividing the application integration platform into processing areas through the target container platform to obtain multiple task processing areas of the application integration platform, wherein each task processing area has a unique associated tenant; and dividing each task processing area into processing areas based on a preset partitioning strategy to obtain multiple processing sub-areas corresponding to each task processing area.

[0042] Specifically, before routing task requests to the task execution area associated with a tenant through the cluster gateway of the application integration platform, the application integration platform can be pre-divided into regions using the target container platform. For example, multiple task processing areas of the application integration platform can be built using the Kubernetes container platform, and tenant identification management (e.g., introducing tenantId or tenantCode) can be referenced in each task processing area, ensuring that each task processing area has a uniquely associated tenant, thereby achieving tenant-level isolation and management of the application integration platform's runtime resources. For example, tenant-level isolation and management can be achieved through Kubernetes' namespaces, labels, and node selectors.

[0043] Furthermore, based on a preset partitioning strategy, each task processing area is divided into business sub-areas, resulting in multiple processing sub-areas corresponding to each task processing area. The preset partitioning strategy can be determined according to actual task requirements.

[0044] In some embodiments, the multiple sub-processing areas include a main running area, an extended running area, a specific business running area, and a plug-in area;

[0045] The main execution area handles core general-purpose tasks, the extended execution area handles high-load tasks, the specific business execution area handles specific types of tasks, and the plugin area is used to deploy third-party and / or custom plugins. Furthermore, resource isolation and independent management of different functions are implemented within the task execution area.

[0046] It should be noted that specific business operation areas are used to process specific types of tasks. That is, they are operation areas that are independently deployed for specific businesses. When a specific business includes multiple types, multiple specific business operation areas can be deployed so that each specific business operation area can independently process the specific business and avoid data interference between specific businesses.

[0047] In some examples, the plugin area can leverage the OSGi plugin mechanism to enable modular operation and dynamic loading of plugins. When a plugin is released or updated, the application integration platform persistently stores the association information between the plugin and its corresponding running microservice (including plugin name, version number, bound service name, tenant, and activation status) in a relational database (such as MySQL). During application integration platform startup or plugin initialization, this plugin metadata information can be loaded into a local cache to accelerate runtime access efficiency. In actual operation, when a task request needs to invoke a target plugin in the plugin area, the application integration platform can locate the target plugin and obtain its bound service name based on the task context or scheduling rules. Then, it queries the corresponding list of running plugin instances through the registry (preferably Nacos) using the service name as the key. Furthermore, it can combine the service instance's health status, current load, and tenant identifier to filter available instances from the instance list. Finally, it initiates a call request to the target plugin instance through a built instance client (such as one based on Feign or an RPC framework) to complete the remote execution of the plugin logic.

[0048] In some embodiments, each processing sub-region includes multiple instances; before routing task requests to the target processing sub-region for processing through the tenant gateway in the task processing region, the method further includes: registering and managing the multiple instances included in each processing sub-region through a registration center to monitor the online and offline information of the multiple instances included in each processing sub-region; and constructing online and offline instance clients based on the online and offline information.

[0049] Specifically, the registration center manages the registration of multiple instances in each processing sub-region. This means that multiple instances automatically synchronize their service metadata to the registration center, allowing the tenant gateway to monitor changes in the instances running under its own tenant.

[0050] In some examples, the registry center can be Nacos.

[0051] Understandably, through the registry center, the tenant gateway can monitor the online / offline status of multiple instances in each processing sub-region in real time. When an instance comes online, the registry center can promptly update the instance status and add it to the list of available instances; when an instance goes offline, the registry center can also promptly update the instance status, removing the instance from the list of available instances. In this way, the tenant gateway can dynamically perceive changes in instances and adjust its task routing strategy accordingly.

[0052] Furthermore, based on the online / offline information provided by the registry center, the application integration platform can build online / offline instance clients (these clients can be built using RPC frameworks such as Feign, RestTemplate, and Dubbo). These online / offline instance clients can intelligently select suitable instances from the target processing sub-regions for task processing based on currently available instance information.

[0053] In addition, the registry can periodically perform health status checks on multiple instances in each processing sub-region to obtain health information for each instance.

[0054] In some embodiments, routing task requests to a target processing sub-region for processing via a tenant gateway in the task processing region includes: determining the current instance online information of multiple instances based on online and offline instance clients; determining a target instance from multiple instances included in the target running region based on the current instance online information; and routing the task request to the target instance for processing via a tenant gateway in the task running region.

[0055] Specifically, the online / offline instance client can determine the current online information of multiple instances, that is, determine which instances are available and which instances are unavailable, ensuring that task requests are only routed to online instances that can be processed normally.

[0056] Furthermore, after determining the current instance's online information, the target instance is determined from among the multiple instances included in the target operating region based on the current instance's online information.

[0057] In some examples, the criteria for determining the target instance from multiple instances may include the instance's current load, historical processing performance, etc.

[0058] Furthermore, the task requests are routed to the target instance for processing via the tenant gateway in the task execution area. It should be noted that during the tenant gateway routing process, resource isolation control is required based on the tenant identifier to ensure that task requests are only allocated to the dedicated execution instance of that tenant, preventing resource sharing or data cross-access between different tenants.

[0059] In some embodiments, after routing a task request to a target instance for processing via a tenant gateway in the task processing area, the method further includes: if the target instance fails to execute the task request, routing the target instance to another available instance in the same processing sub-area via a preset retry mechanism.

[0060] Specifically, this embodiment also introduces a failure retry mechanism in the routing process. When a task request fails to execute, the application integration platform can automatically retry according to the configuration strategy. In some examples, the number of retries and the interval can be configured. At the same time, it supports setting scheduling priorities according to task type, urgency, etc., to achieve reasonable queuing and preemptive execution of tasks.

[0061] In some examples, after a task request is completed, the execution status and result information of the task can be recorded, and the scheduling log can be used for unified archiving and backtracking analysis to ensure the efficiency, stability and traceability of the entire runtime scheduling process.

[0062] In some embodiments, the method further includes at least one of the following:

[0063] Firstly, the operation of multiple processing sub-regions in each task processing area is monitored to obtain the operation monitoring information of the tenants associated with each task processing area, and the operation monitoring information is visualized.

[0064] Specifically, in some examples, the monitoring process can be built on monitoring metric collection frameworks such as Prometheus and VictoriaMetrics to achieve real-time monitoring of the status of resources and tasks in various regions of the application integration platform.

[0065] It should be noted that the runtime monitoring information may include CPU utilization, memory usage, disk I / O, network throughput, task success rate, failure rate, task duration, etc.

[0066] In some examples, the Prometheus Exporter component can be integrated into the instance nodes of each processing sub-region, and the runtime monitoring information can be exposed as a standard metric collection interface through a tracking framework (such as Spring Actuator or Micrometer). Prometheus pulls the runtime monitoring information of each node at a certain crawling period and stores it in a time-series database (such as VictoriaMetrics) for persistence.

[0067] In some examples, the front-end interface can be built based on the Vue framework, combined with the API interfaces provided by the monitoring system (such as Prometheus) and the PromQL query language to achieve real-time aggregation and dynamic display of monitoring data from various processing sub-regions. Furthermore, the application integration platform can integrate chart rendering components (such as ECharts or Grafana) into the front end for visualizing operational monitoring information.

[0068] Secondly, it records key scheduling information of task requests during the task scheduling process and writes this key scheduling information into the target database so that associated tenants can query the execution status of each task request through the target database.

[0069] Third, the system analyzes the operation monitoring information through a preset alarm mechanism, and sends alarm information to the target client when the operation monitoring information meets the alarm conditions.

[0070] Specifically, the preset alarm mechanism can handle abnormal situations such as task failure rate, CPU utilization exceeding threshold, and service unavailability. When the monitoring information meets the alarm conditions, Alertmanager can perform preprocessing. Alertmanager supports classifying, merging, and suppressing alarm events by tenant dimension, and pushes alarm information to target clients (such as email, SMS, WeChat Work, DingTalk, and other notification channels) according to the configured alarm policy.

[0071] Figure 2 This is a schematic diagram of a task scheduling system illustrating an exemplary embodiment of the present invention, such as... Figure 2 As shown, this exemplary task scheduling system includes:

[0072] The cluster gateway is used to receive task requests from external tenants and route the task request to the associated tenant based on the tenant identifier carried in the task request.

[0073] Each task processing area is associated with a unique tenant. For example, task processing area one is associated with tenant A; task processing area two is associated with tenant B. Each task processing area includes a tenant gateway, a main running area, an extended running area, a specific business running area, and a plugin area.

[0074] The tenant gateway is used to receive task requests routed by the cluster gateway and route the task requests to the target instance; the main running area, extended running area, and specific business running area contain multiple instances that can be used to process task requests; and the plugin area is used to deploy third-party and / or custom plugins.

[0075] In addition, the task scheduling system also includes a configuration center, a log center, and a monitoring center. The configuration center can be used to configure the corresponding scheduling rules and update the corresponding running areas. The log center is used to record log information during the task scheduling process. The monitoring center is used to monitor the running monitoring information during the task scheduling process, such as CPU utilization, memory usage, disk I / O, network throughput, task success rate, failure rate, task time, etc.

[0076] Figure 3 This is a schematic diagram illustrating the structure of a task scheduling device according to an exemplary embodiment of the present invention. Figure 3 As shown, the exemplary task scheduling device includes:

[0077] The task acquisition module 310 is configured to acquire the tenant's task request and determine the tenant identifier and task identifier carried in the task request.

[0078] The first routing module 320 is configured to route task requests to the task execution area associated with the tenant through the cluster gateway of the application integration platform based on the tenant identifier, wherein the task execution area includes multiple processing sub-areas;

[0079] The second routing module 330 determines the target processing sub-region from multiple processing sub-regions based on the task identifier, and routes the task request to the target processing sub-region for processing through the tenant gateway in the task running region.

[0080] In some embodiments, the first routing module 320 is further configured to divide the application integration platform into processing areas through the target container platform to obtain multiple task processing areas of the application integration platform, wherein each task processing area has a unique associated tenant; and to divide each task processing area into processing areas based on a preset division strategy to obtain multiple processing sub-areas corresponding to each task processing area.

[0081] In some embodiments, the first routing module 320 is further configured as multiple sub-processing areas including a main running area, an extended running area, a specific business running area, and a plugin area; the main running area is used to process core general-purpose tasks, the extended running area is used to process high-load tasks, the specific business running area is used to process specific tasks, and the plugin area is used to deploy third-party and / or custom plugins.

[0082] In some embodiments, each processing sub-region includes multiple instances, and the second routing module 330 is further configured to register and manage the multiple instances included in each processing sub-region through a registration center, so as to monitor the online and offline information of the multiple instances included in each processing sub-region; and to construct online and offline instance clients based on the online and offline information.

[0083] In some embodiments, the second routing module 330 is further configured to determine the current instance online information of multiple instances based on the online and offline instance clients; determine the target instance from the multiple instances included in the target running area based on the current instance online information; and route the task request to the target instance for processing through the tenant gateway in the task running area.

[0084] In some embodiments, the second routing module 330 is further configured to, in the event that the target instance fails to execute the task request, route the task request to other available instances in the same processing sub-region for processing based on the online and offline instance clients, through a preset retry mechanism and the tenant gateway in the task processing region.

[0085] In some embodiments, the second routing module 330 is further configured to monitor the scheduling and operation of multiple processing sub-regions in each task processing area, obtain the operation monitoring information of the associated tenants in each task processing area, and visualize the operation monitoring information; record the key scheduling information of task requests during the task scheduling process, and write the key scheduling information into the target database so that the associated tenants can query the execution status of each task request through the target database; analyze the operation monitoring information through a preset alarm mechanism, and send alarm information to the target client when the operation monitoring information meets the alarm conditions.

[0086] It should be noted that the task scheduling device and the task scheduling method provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the task scheduling device provided in the above embodiments can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not a limitation here.

[0087] Embodiments of the present invention also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the methods provided in the above embodiments.

[0088] Figure 4 A schematic diagram of a computer system suitable for implementing embodiments of the present invention is shown. It should be noted that... Figure 4 The computer system 400 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0089] like Figure 4As shown, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 402 or programs loaded from Storage Unit 408 into Random Access Memory (RAM) 403. The RAM 403 also stores various programs and data required for system operation. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An Input / Output (I / O) interface 405 is also connected to the bus 404.

[0090] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to I / O interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.

[0091] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs various functions defined in the system of the present invention.

[0092] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0094] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0095] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0096] Another aspect of the present invention provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods described in the various embodiments above.

[0097] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the present invention.

Claims

1. A task scheduling method, characterized by, The method comprises the following steps: acquiring a task request of a tenant and determining a tenant identifier and a task identifier carried by the task request; routing the task request to a task running area associated with the tenant through a cluster gateway of an application integration platform according to the tenant identifier, wherein the task running area comprises a plurality of processing sub-areas; determining a target processing sub-area in the plurality of processing sub-areas according to the task identifier, and routing the task request to the target processing sub-area for processing through a tenant gateway in the task running area.

2. The method of claim 1, wherein, Before the step of routing the task request to the task running area associated with the tenant through the cluster gateway of the application integration platform, the method further comprises the following steps: performing processing area division on the application integration platform by a target container platform to obtain a plurality of task processing areas of the application integration platform, wherein each task processing area is associated with a unique tenant; performing processing area division on each task processing area based on a preset division strategy to obtain the plurality of processing sub-areas corresponding to each task processing area.

3. The method of claim 2, wherein, The method further comprises the following steps: the plurality of sub-processing areas comprise a main running area, an extended running area, a specific business running area and a plug-in area; the main running area is used for processing core general tasks, the extended running area is used for processing high-load tasks, the specific business running area is used for processing specific tasks, and the plug-in area is used for deploying third-party and / or self-defined plug-ins.

4. The method of claim 1, wherein, Each processing sub-area comprises a plurality of instances; before the step of routing the task request to the target processing sub-area for processing through the tenant gateway in the task processing area, the method further comprises the following steps: registering and managing the plurality of instances included in each processing sub-area through a registration center to monitor the online and offline information of the plurality of instances included in each processing sub-area; constructing an online and offline instance client according to the online and offline information.

5. The method of claim 4, wherein, The step of routing the task request to the target processing sub-area for processing through the tenant gateway in the task processing area comprises the following steps: determining current instance online information of the plurality of instances according to the online and offline instance client; determining a target instance from the plurality of instances included in the target running area according to the current instance online information; routing the task request to the target instance for processing through the tenant gateway in the task running area.

6. The method of claim 5, wherein, After the step of routing the task request to the target instance for processing through the tenant gateway in the task running area, the method further comprises the following steps: in the case that the target instance fails to execute the task request; routing the task request to other available instances of the same processing sub-area for processing through the tenant gateway in the task processing area according to the online and offline instance client and a preset retry mechanism.

7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises at least one of the following steps: monitoring the scheduling and running conditions of the plurality of processing sub-areas in each task processing area to obtain running monitoring information of the tenant associated with each task processing area, and visually displaying the running monitoring information. record the scheduling key information of the task request in a task scheduling process, and write the scheduling key information into a target database, so that a related tenant can query the execution of each task request through the target database; analyze the running monitoring information through a preset alarm mechanism, and send alarm information to a target client when the running monitoring information meets an alarm condition.

8. A task scheduling apparatus characterized by comprising: The method comprises: a task acquisition module configured to acquire a task request of a tenant and determine a tenant identifier and a task identifier carried by the task request; a first routing module configured to route the task request to a task running area associated with the tenant through a cluster gateway of an application integration platform according to the tenant identifier, wherein the task running area comprises a plurality of processing sub-areas; a second routing module configured to determine a target processing sub-area in the plurality of processing sub-areas according to the task identifier, and route the task request to the target processing sub-area for processing through a tenant gateway in the task running area.

9. An electronic device, comprising: The method comprises: one or more processors and a memory having stored thereon a computer program, which, when executed by the one or more processors, causes the device to perform the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, a computer program stored thereon, which, when executed by one or more processors, causes the device to perform the method of any one of claims 1 to 7.