Task processing method and system, storage medium and computer program product

By introducing a temporary lease mechanism into the serverless architecture, the gateway pre-subscribes to computing resources and directly calls the temporary lease resources to process tasks, which solves the problem of high system latency and improves the processing efficiency of high QPS and low function execution time business.

CN121217818APending Publication Date: 2025-12-26ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410833486.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

In existing serverless architectures, each request requires the service gateway to request computing resources from the scheduling component, resulting in high average call latency on the system side, which affects performance, especially in business scenarios with high QPS and low function execution time.

Method used

By introducing a temporary lease mechanism, the gateway pre-subscribes to computing resources from the scheduling component and directly calls the computing resources with temporary leases to process tasks, reducing the dependence on the scheduling component. The gateway manages the real-time concurrency of computing resources to determine the target computing resources.

Benefits of technology

It reduces system-side latency for accessing scheduling components during task processing, improves the processing efficiency of target type services, and saves server resources for gateways and scheduling components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121217818A_ABST
    Figure CN121217818A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task processing method and system and a storage medium. According to the method, under the condition that the task processing request is determined to be the target type service, the gateway determines the target computing resource from the computing resources with the temporary lease and directly sends the task processing request to the target computing resource for task processing, so that the task processing efficiency is improved when the gateway processes the task processing request of the target type service. The corresponding computing resource is determined without accessing the scheduling component, so that the system side delay generated by accessing the scheduling component in the task processing process is reduced, and the processing efficiency of the target type service is improved; meanwhile, the gateway does not need to send a corresponding predetermined request to the scheduling component, and the scheduling component does not need to determine the computing resource and feed back the computing resource identifier, so that server resources on the gateway and the scheduling component are saved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and more particularly, to a task processing method, system, storage medium and computer program product. BACKGROUND

[0002] Serverless technology refers to that a user creates and runs a software application and a service in a cloud server, and the user does not need to care about the content related to information technology (IT) facilities (such as management, upgrade, etc.), which is a product of further evolution of IT architecture, and mainly has the following characteristics: fine-grained computing resource allocation is achieved; no pre-allocated resources are needed, and no operating system configuration and management are needed; it has true high scalability and elasticity, supports on-demand scaling; and it is used on demand and charged on demand.

[0003] Under the conventional architecture of Serverless, computing resources are often dynamically created. In order to provide the high elasticity capability required by the Serverless architecture and reduce the system cold start probability, a dynamic routing scheduling scheme is usually adopted, that is, the service gateway under the Serverless architecture usually requests the scheduling component to allocate computing resources for processing the task processing request when receiving the request, and requests the scheduling component to release the computing resources after the computing resources are executed.

[0004] Since each request needs the service gateway to request the scheduling component to allocate corresponding computing resources in the existing Serverless architecture, the average call delay of the system side is high. This is a disaster and unacceptable for businesses with high queries-per-second (QPS) and low function execution time. SUMMARY

[0005] The present application provides a task processing method, system, storage medium and computer program product to solve the problem of high average call delay of the system side in the existing Serverless architecture.

[0006] In a first aspect, an embodiment of the present application provides a task processing method applied to a gateway, and the method comprises the following steps:

[0007] receiving a task processing request sent by a client;

[0008] if the task processing request is a task processing request of a target type business, determining a target computing resource from a computing resource with a temporary lease; the computing resource with the temporary lease is a computing resource subscribed from a scheduling component;

[0009] sending the task processing request to a target computing resource for task processing.

[0010] In a possible implementation, the determining the target computing resource from the computing resources comprises:

[0011] obtaining a real-time concurrency degree of the computing resource;

[0012] determining, based on the real-time concurrency degree of the computing resource and the supported single-instance concurrency degree, whether there is an available computing resource from the computing resources;

[0013] if there is the available computing resource, determining the target computing resource from the available computing resource.

[0014] In a possible implementation, the determining, based on the real-time concurrency degree of the computing resource and the supported single-instance concurrency degree, whether there is an available computing resource from the computing resources comprises:

[0015] determining whether the real-time concurrency degree reaches the single-instance concurrency degree;

[0016] if the real-time concurrency degree does not reach the single-instance concurrency degree, determining that the computing resource is the available computing resource;

[0017] if the real-time concurrency degree reaches the single-instance concurrency degree, determining that the computing resource is an unavailable computing resource.

[0018] In a possible implementation, the method further comprises:

[0019] if there is no available computing resource, continuing to subscribe to a computing resource from the scheduling component, and taking the subscribed computing resource as the target computing resource.

[0020] In a possible implementation, the subscribing to a computing resource from the scheduling component comprises:

[0021] sending a subscription request to the scheduling component, the subscription request being used to request the scheduling component to allocate a computing resource for processing the target type of service;

[0022] receiving a subscription response fed back by the scheduling component, the subscription response being used to indicate a subscribed computing resource, the indicated subscribed computing resource being determined from a computing resource without a temporary lease and used for processing the target type of service.

[0023] In a possible implementation, the method further comprises:

[0024] recording a subscription duration of the computing resource with the temporary lease;

[0025] if the recorded duration of the subscription reaches the maximum duration of the subscription of the computing resource, a renewal request is sent to the scheduling component, the renewal request being used to request the scheduling component to perform a renewal operation on the computing resource;

[0026] A renewal response fed back by the scheduling component is received, and the duration of the subscription of the computing resource is recorded again.

[0027] In a possible implementation, the subscription response is further used to indicate the maximum duration of the subscription of the computing resource.

[0028] Alternatively, the method further includes: negotiating the maximum duration of the subscription of the computing resource with a system component.

[0029] In a possible implementation, after the real-time concurrency of the computing resource is acquired, the method further includes:

[0030] In a case where the real-time concurrency of the computing resource meets a preset condition, a duration, during which the real-time concurrency of the computing resource meets the preset condition, is recorded, and the preset condition includes: the real-time concurrency is less than or equal to a preset concurrency.

[0031] If the duration reaches a preset duration, a release request is sent to the scheduling component, the release request being used to request the scheduling component to perform a release operation on the computing resource.

[0032] In a possible implementation, before the task processing request sent by the client is received, the method further includes:

[0033] Configuration information sent by a system component is received, and the configuration information is used to indicate that a computing resource with a temporary lease is used to perform task processing on a target service type.

[0034] According to the configuration information, a task processing scenario of the target type service is configured.

[0035] In a second aspect, an embodiment of the present application provides a task processing method, applied to a scheduling component, and the method includes:

[0036] A subscription request sent by a gateway is received, and the subscription request is used to request an allocation of a computing resource for processing a target type service;

[0037] A computing resource for processing the target type service is determined from computing resources without a temporary lease and used to process the target type service, and a temporary lease between the computing resource and the gateway is established;

[0038] A subscription response is fed back to the gateway, and the subscription response is used to indicate the computing resource with the temporary lease.

[0039] In a possible implementation, the scheduling component is configured with a lease interface, and the method further includes:

[0040] receiving, through the lease interface, a renewal request sent by the gateway, the renewal request being used to request a renewal operation on the computing resource;

[0041] determining the computing resource corresponding to the renewal request, and renewing the temporary lease of the computing resource and the gateway;

[0042] feeding back, to the gateway, a renewal response of the computing resource.

[0043] In a possible implementation, the method further includes:

[0044] receiving a release request sent by the gateway, the release request being used to request a release operation on the computing resource;

[0045] determining the computing resource corresponding to the release request, canceling the temporary lease of the computing resource and the gateway, and performing the release operation on the computing resource.

[0046] In a third aspect, an embodiment of the present application provides a task processing method, applied to a cloud platform, the cloud platform including a system component, and a plurality of gateways, a plurality of computing resources and a plurality of scheduling components located in different available areas, and the method includes:

[0047] the system component receives a task processing request sent by a client, and forwards the task processing request to at least two target gateways in the plurality of gateways;

[0048] the target gateway determines a target computing resource from computing resources with a temporary lease in a case where the task processing request is a task processing request of a target type of business; the computing resource with the temporary lease is a computing resource subscribed from a scheduling component;

[0049] the target gateway sends the task processing request to the target computing resource for task processing.

[0050] In a fourth aspect, the present application provides a task processing device, applied to a gateway, and the device includes:

[0051] a receiving module, configured to receive a task processing request sent by a client;

[0052] a processing module, configured to determine a target computing resource from computing resources with a temporary lease in a case where the task processing request is a task processing request of a target type of business; the computing resource with the temporary lease is a computing resource subscribed from a scheduling component;

[0053] The sending module is configured to send the task processing request to a target computing resource for task processing.

[0054] In a fifth aspect, the present application provides a task processing apparatus applied to a scheduling component, the apparatus comprising:

[0055] The receiving module is configured to receive a subscription request sent by a gateway, the subscription request being used to request allocation of a computing resource for processing a target type of service;

[0056] The processing module is configured to determine a computing resource for processing the target type of service from among computing resources without a temporary lease and used for processing the target type of service, and establish a temporary lease between the computing resource and the gateway;

[0057] The sending module is configured to feed back a subscription response to the gateway, the subscription response being used to indicate a computing resource with a temporary lease.

[0058] In a sixth aspect, the present application provides an electronic device, comprising a memory, a processor and a communication interface;

[0059] The memory stores computer-executed instructions, and the communication interface is configured to communicate with other devices through a transmission medium.

[0060] The processor executes the computer-executed instructions stored in the memory to implement the task processing method according to any one of the possible implementation manners of the first aspect, the second aspect and the third aspect.

[0061] In a seventh aspect, the present application provides a task processing system, comprising a system component, and a plurality of gateways, a plurality of computing resources and a plurality of scheduling components located in different availability zones,

[0062] The system component is configured to receive a task processing request sent by a client, and forward the task processing request to at least two target gateways in the plurality of gateways;

[0063] The target gateway is configured to, in a case where it is determined that the task processing request is a target type of service, determine a target computing resource from among computing resources with a temporary lease, the computing resources with a temporary lease being computing resources subscribed from a scheduling component, and the target computing resource being in the same availability zone as the target gateway.

[0064] The target gateway is further configured to send the task processing request to the target computing resource for task processing.

[0065] In an eighth aspect, the present application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the processor is caused to perform the task processing method according to any possible implementation manner of the first aspect, the second aspect, and the third aspect.

[0066] In a ninth aspect, the present application provides a computer program product, comprising a computer program, and when the computer program is executed by a processor, the task processing method according to any possible implementation manner of the first aspect, the second aspect, and the third aspect is implemented.

[0067] The present application provides a task processing method, system, storage medium, and computer program product. In the method, when it is determined that a task processing request is a target type of business, a gateway determines a target computing resource from computing resources with a temporary lease, and directly sends the task processing request to the target computing resource for task processing. Thus, when processing a task processing request of a target type of business, the gateway does not need to access a scheduling component to determine a corresponding computing resource, thereby reducing system side delay caused by accessing the scheduling component in the task processing process, and improving the processing efficiency of the target type of business. Meanwhile, since the gateway does not need to send a corresponding predetermined request to the scheduling component, the scheduling component does not need to determine a computing resource and feed back a computing resource identifier, thereby saving server resources on the gateway and the scheduling component. BRIEF DESCRIPTION OF DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0069] Figure 1 is a possible structure of a task processing system provided by the embodiments of the present application;

[0070] Figure 2 is a flowchart of an existing task scheduling scheme;

[0071] Figure 3 is a flowchart of a possible gateway calling a scheduling component provided by the embodiments of the present application;

[0072] Figure 4 is a flowchart of a possible task processing method provided by the embodiments of the present application Figure 1 ;

[0073] Figure 5is a flowchart of a possible task processing method provided by an embodiment of the present application Figure 2 ;

[0074] Figure 6 is an interaction diagram of a possible task processing method provided by an embodiment of the present application Figure 1 ;

[0075] Figure 7 is an interaction diagram of a possible task processing method provided by an embodiment of the present application Figure 2 ;

[0076] Figure 8 is a flowchart of a possible task processing method provided by an embodiment of the present application Figure 3 ;

[0077] Figure 9 is a structural diagram of a possible task processing apparatus provided by an embodiment of the present application Figure 1 ;

[0078] Figure 10 is a structural diagram of a possible task processing apparatus provided by an embodiment of the present application Figure 2 ;

[0079] Figure 11 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0080] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0081] First, the terms involved in the embodiments of the present application are introduced.

[0082] Serverless, a cloud computing mode, in the architecture, users do not need to manage servers, and the cloud platform automatically allocates resources and provides services. Serverless architecture has high elasticity and pay-per-use characteristics.

[0083] Computing resources generally refer to central processing unit (CPU) resources, memory resources, hard disk resources and network resources required when a computer program runs. The computing resources in the embodiments may be, for example, function instances in a Serverless architecture.

[0084] Function instance: A basic execution unit in a serverless architecture, responsible for executing specific business logic of a user function.

[0085] Scheduling component: A component in a serverless architecture responsible for dynamically allocating function instances to handle requests based on request priority and resource usage.

[0086] Single-instance concurrency, the number of concurrent requests that a single function instance can handle. When the real-time concurrency on a single instance reaches the single-instance concurrency, new requests are assigned to other function instances that have not reached the single-instance concurrency.

[0087] Queries-per-second (QPS), the amount of request data processed by a unit of computing resources per unit of time.

[0088] Disaster recovery (DR), the ability of an IT system to quickly and effectively recover business operations in the event of a major natural disaster, human destruction, network attack, etc.

[0089] RTA (Real Time Application Programming Interface) business, used to meet the real-time personalized delivery needs of advertisers, reducing waste in bidding.

[0090] The embodiments shown in the present application can be applied to a serverless architecture of cloud services, for example. First, the task processing system under the serverless architecture of cloud services is explained.

[0091] Figure 1 A possible structure diagram of a task processing system provided by the embodiments of the present application. The task processing system can be deployed entirely in a cloud environment. The cloud environment is an entity that provides cloud services to users using basic resources in a cloud computing mode. The cloud environment includes a large number of basic resources (including computing resources, storage resources, and network resources) owned by cloud service providers. The computing resources included in the cloud environment can be a large number of computing devices (such as servers). The cloud environment can be deployed in different regions, and each region contains at least one availability zone, and the computing resources can be deployed in the at least one availability zone.

[0092] As shown in Figure 1 The task processing system includes system components, gateways, computing resources, and scheduling components. The system components are communicatively connected to multiple different availability zones, and at least one gateway, computing resource, and scheduling component can be deployed in each availability zone. For example, availability zone 1 has at least gateway 11, scheduling component 12, and computing resource 13 deployed therein.

[0093] The gateway can communicate with the scheduling component or the computing resource in the same availability zone, or communicate with the scheduling component or the computing resource in different availability zones. During the task processing, considering the disaster recovery capability of the business, computing resources of at least two availability zones are usually required to execute the corresponding business.

[0094] The task processing system can be abstracted by a cloud service provider into a task processing service on a cloud platform, and provided to a user after the user purchases the cloud service on the cloud platform (for example, pre-recharge and then settle according to the use of the final resource). The cloud platform provides the user with a task processing service by using the task processing system.

[0095] It can be understood that the task processing system can be logically divided into multiple parts, each part having different functions. The deployment of the task processing system is flexible, and the task processing system can be deployed as a whole in a cloud data center, or each part with different functions can be deployed in any two or three of a client, an edge environment and a cloud environment.

[0096] The client can include at least one of a terminal server, a smart phone, a notebook computer, a tablet computer, a personal desktop computer, and the like. The edge environment is an environment including a set of edge computing devices close to the client, and the edge computing devices include an edge server, an edge small station with computing power, and the like. The parts of the task processing system deployed in different environments or devices cooperate to provide the user with the task processing function. It should be understood that the embodiments of the present application do not limit the parts of the task processing system to be deployed in the environment. In actual application, the deployment can be adapted according to the computing power of the client, the resource occupation of the edge environment and the cloud environment, or specific application requirements.

[0097] The existing task scheduling scheme under the Serverless architecture of the cloud service will be explained and described below.

[0098] In the Serverless architecture, function instances are often dynamically created. In order to provide the high elasticity capability required by the Serverless architecture and reduce the cold start probability of the system, a dynamic routing task scheduling scheme is usually adopted. Figure 2 The flowchart of the existing task scheduling scheme is shown in FIG. 1. In the Serverless architecture, Figure 1 The gateway shown in FIG. 1 can be, for example, an application programming interface (API) service gateway in Figure 2 The scheduling component shown in FIG. 1 can be, for example, a routing scheduling component in Figure 2 The computing resource shown in FIG. 1 can be, for example, a computing resource in Figure 2function instance in the function service. In the function service, the Reserve interface and the Ide interface are deployed on the scheduling component. As shown in Figure 2 The specific process of the existing task scheduling solution includes the following steps.

[0099] After the API service gateway obtains the task processing request, the API service gateway reserves a function instance for executing the task processing request through the Reserve interface to the routing scheduling component. The routing scheduling component confirms and returns the corresponding function instance identifier. The API service gateway determines and invokes the function instance for task processing according to the function instance identifier. After the function instance completes the task processing, the function instance feeds back the processing result to the API service gateway. After the API service gateway receives the processing result fed back by the function instance, the API service gateway requests the routing scheduling component to release the function instance. The routing scheduling component releases the function instance through the Ide interface based on the release request.

[0100] It can be understood that, in the above process, because each request needs the API service gateway to request the routing scheduling component to allocate a function instance for processing the request, and the function instance is released after the function instance completes the task processing, the system side delay includes at least twice network delay of the API service gateway accessing the routing scheduling component in the execution process of each task processing request.

[0101] The above task scheduling solution is applicable in most scenarios, but in a business scenario with high QPS and low function execution time, the above task scheduling solution affects the performance of the business. The business with high QPS and low function execution time described in the embodiments of the present application may include, for example, RTA-like business. The following takes the RTA-like business as an example for description.

[0102] Specifically, the QPS of the RTA-like business can reach more than 100,000 QPS, and the function execution time of the RTA-like business is usually only about 10 milliseconds (ms). Because the QPS of the RTA-like business is very high, when processing the RTA-like business, the API service gateway usually reserves function instances for at least two routing scheduling components distributed in different availability zones in consideration of disaster recovery capability.

[0103] Figure 3 A possible flowchart of gateway invoking scheduling component provided in the embodiments of the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the gateway A and the scheduling component B are arranged in the availability zone A, and the gateway B and the scheduling component B are arranged in the availability zone B.

[0104] In a case that the gateway A in the available zone A receives the task processing request sent by the client, the gateway A will reserve function instances to the scheduling component A in the same available zone and the scheduling component B in the different available zone; the scheduling component A and the scheduling component B will respectively feed back the function instance identifiers to the gateway A. The scheduling component will generally determine the function instances in the same available zone and feed back the corresponding function instance identifiers.

[0105] Similarly, the gateway B in the available zone B calls the scheduling component in the same way as the gateway A, which will not be described here.

[0106] Based on the above Figure 3 As can be seen from the above, in the execution process of the task processing request, the gateway will access at least one scheduling component across the available zones, which will cause the system side delay to include at least two cross-access zone accesses. Since the network delay of the same region across the available zones and the network delay of the same available zone can be different by 10 times at most. Therefore, in the case that each request needs to pass through the scheduling component, the cross-available zone call causes further growth of the system side scheduling delay. In the actual scenario, the above case can bring an additional 10ms+ system side average scheduling delay.

[0107] And the business execution time of such a business is very short, so that the existing task scheduling scheme cannot meet the needs of the business with high QPS and low function execution time, and at the same time affects the execution efficiency of such a business.

[0108] To solve the above problems, the embodiment of the present application provides a task processing method, which pre-allocates computing resources to the gateway, so that the gateway can directly call the computing resources for task processing, solves the problem that each request needs to pass through the scheduling component in the prior art, which causes large network delay, and at the same time, since the gateway does not need to access the scheduling component in the process of executing the request, the scheduling component also does not need to feed back the call response to the gateway, thereby saving the server resources of the gateway and the scheduling component.

[0109] The technical scheme of the present application and how the technical scheme of the present application solves the above technical problems will be described in detail in the following specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0110] First, the task processing system shown in the embodiment of the present application is explained. In combination with the above Figure 1It can be known that the functions of the gateway and the scheduling component of the task processing system are adjusted in the present application to support pre-allocation of computing resources for the gateway. The functions of the gateway and the scheduling component of the task processing system are adjusted so as to facilitate landing and implementation under the current existing system architecture without the need to modify and adjust the hardware architecture.

[0111] The task processing system shown in the embodiment includes a system component, a plurality of gateways, a plurality of computing resources, and a plurality of scheduling components located in different availability zones.

[0112] The system component is configured to receive a task processing request sent by a client and forward the task processing request to a gateway.

[0113] It can be understood that when forwarding, the system component considers the service type of the task processing request and forwards the task processing request to at least one gateway.

[0114] For example, when the service has high QPS and low function execution time, the system component forwards the task processing request to at least two gateways deployed in different availability zones to improve the disaster recovery capability of the service.

[0115] In actual scenarios, at least one gateway, scheduling component, and computing resource can be deployed in an availability zone, and the specific deployment quantity is determined according to actual conditions.

[0116] The scheduling component in the embodiment is configured with a lease interface in addition to the existing Reserve / Ide interface. It can be understood that the lease interface can be a software interface or a hardware interface. The specific implementation is determined according to actual conditions. For example, the implementation of the lease interface can adopt the implementation of the software interface in the prior art. The lease interface is configured to receive a renewal request sent by a gateway.

[0117] The computing resource in the embodiment can be, for example, a function instance in a Serverless architecture, which is mainly responsible for executing specific business logic of a user function.

[0118] The gateway can be, for example, an API service gateway. The gateway can receive a task processing request sent by a client or a system component, and determine corresponding computing resources for task processing based on the task type of the task processing request. It can be understood that the computing resources determined by the gateway can be in the same availability zone as the gateway or in different availability zones from the gateway. The present application does not limit this, and the specific implementation is determined according to actual conditions.

[0119] The temporary lease mechanism is introduced between the gateway and the scheduling component in the embodiment. The following takes a task processing scenario of a class RTA service as an example for explanation and description.

[0120] Specifically, the system component can configure a temporary lease mechanism for the gateway and the scheduling component, and the temporary lease mechanism is used to indicate a mechanism in which the gateway leases computing resources for processing a corresponding type of business to the scheduling component.

[0121] Under the temporary lease mechanism, the scheduling component can establish a temporary lease between the computing resource and the gateway, so that the gateway can directly invoke the computing resource with the temporary lease to process a task within a maximum lease duration.

[0122] It can be understood that the scheduling component leases the computing resource for the gateway, and the computing resource with the temporary lease will not be released when it does not process a task, and at this time, the gateway has the ability to directly invoke the computing resource within the maximum lease duration.

[0123] In a possible implementation, the gateway can record the real-time concurrency of the computing resource with the temporary lease. That is, the real-time concurrency of the computing resource with the temporary lease is controlled by the gateway.

[0124] The real-time concurrency refers to the number of task processing requests currently processed by the computing resource in parallel. The real-time concurrency is not greater than the single-instance concurrency supported by the computing resource.

[0125] If the real-time concurrency of the computing resource is less than the single-instance concurrency supported by the computing resource, it indicates that the computing resource is currently in an unsaturated state, and the computing resource can currently undertake a new task processing request; if the real-time concurrency of the computing resource reaches the single-instance concurrency supported by the computing resource, it indicates that the computing resource is currently in a saturated state, and the computing resource cannot currently undertake more task processing requests.

[0126] It can be understood that the gateway can determine the real-time concurrency of the computing resource with the temporary lease, and allocate task processing requests to the computing resource based on the real-time concurrency of the computing resource.

[0127] In a possible implementation, there is a single-lease relationship between the computing resource and the gateway. The single-lease relationship refers to that, for any one computing resource, the scheduling component leases it to one gateway. After leasing the computing resource to the gateway, the scheduling component will not lease the computing resource to other gateways as long as the computing resource is not released.

[0128] It can be understood that the gateway can lease the computing resource to the scheduling component through a Reserve interface of the scheduling component, or lease the computing resource to the scheduling component through a leasing interface of the scheduling component, and the present application does not make special limitations thereon.

[0129] The system component shown in this embodiment can send configuration information for indicating that a target type of business is to be processed by a computing resource with a temporary lease to the gateway and the scheduling component, and the gateway and the scheduling component receive the configuration information sent by the system component, and configure a task processing scenario of the target type of business according to the configuration information.

[0130] The gateway can send a lease request to the scheduling component, the lease request being used to request the scheduling component to allocate a computing resource for processing the target type of business; the scheduling component determines the corresponding computing resource based on the lease request, and establishes a temporary lease between the computing resource and the gateway, the temporary lease being used to indicate that the gateway processes a task processing request of the target type of business by the computing resource within a lease duration.

[0131] In a case where it is determined that the received task processing request is a task processing request of the target type of business, the gateway can determine a target computing resource from the computing resources with the temporary leases, and directly send the task processing request to the target computing resource for task processing.

[0132] It can be understood that, due to the introduction of the temporary lease mechanism, the gateway does not need to access the scheduling component to determine the corresponding computing resource when processing the task processing request of the target type of business, thereby reducing the system side delay caused by accessing the scheduling component in the entire task processing process; meanwhile, the gateway does not need to send a corresponding predetermined request to the scheduling component in the entire task processing process, and the scheduling component does not need to determine the computing resource and feed back the computing resource identifier, thereby saving the server resources on the gateway and the scheduling component.

[0133] Figure 4 A possible task processing method flow provided by the embodiment of the present application Figure 1 The execution subject of the embodiment may, for example, be the gateway in the task processing system shown in the above embodiments. As shown in Figure 4 The task processing method comprises:

[0134] S401: receiving a task processing request sent by a client.

[0135] When the client needs to process a task by a cloud environment, the client can send a task processing request to a cloud service platform. Different task types can correspond to different task processing requests.

[0136] After receiving the task processing request sent by the client, the gateway needs to determine the task type corresponding to the task processing request to determine the corresponding computing resource for task processing.

[0137] S402: if the task processing request is a task processing request of a target type of business, determining a target computing resource from the computing resources with the temporary leases.

[0138] The target type of service may include, for example, a service with high QPS and low function execution time, and the performance of the target type of service is related to the architecture of the task processing system. For example, the target type of service may be an RTA-like service in a Serverless architecture.

[0139] The computing resources include various types, and different types of computing resources are used to process task processing requests of corresponding types of services. The computing resources with temporary leases in this step refer to computing resources that the gateway subscribes from the scheduling component to process the target type of service. The performance of the computing resources is related to the architecture of the task processing system. For example, the computing resources may be function instances in a Serverless architecture.

[0140] The number of computing resources with temporary leases may be one or more, for example. The gateway may determine the target computing resource from one or more computing resources with temporary leases.

[0141] It can be understood that the gateway may determine the target computing resource from the computing resources with temporary leases by using a preset determination strategy, for example. The determination strategy may include, for example, determining a computing resource in the same availability zone as the gateway as the target computing resource, or determining a computing resource with a network delay between the gateway and the computing resource less than a preset network delay as the target computing resource, or determining a computing resource with a real-time concurrency degree that does not reach a supported single-instance concurrency degree as the target computing resource. The present application does not limit this, and the specific determination strategy is subject to actual conditions.

[0142] S403: Send the task processing request to the target computing resource for task processing.

[0143] The task processing method provided in this embodiment can determine the target computing resource from the computing resources with temporary leases when the task processing request is a target type of service, and send the task processing request directly to the target computing resource for task processing. Thus, when processing the task processing request of the target type of service, the gateway does not need to access the scheduling component to determine the corresponding computing resource, thereby reducing the system-side delay caused by accessing the scheduling component in the task processing process and improving the processing efficiency of the target type of service. At the same time, since the gateway of this embodiment does not need to send a corresponding predetermined request to the scheduling component, the scheduling component does not need to determine the computing resource and feed back the computing resource identifier, thereby saving server resources on the gateway and the scheduling component.

[0144] Figure 5 Flowchart of a possible task processing method provided in this embodiment Figure 2 This embodiment is based on the above Figure 4Based on the embodiment, a possible implementation of the gateway determining a target computing resource from the computing resources with temporary leases is described in detail. As shown in Figure 5 The method comprises the following steps.

[0145] S501: Obtain a real-time concurrency of the computing resource.

[0146] The real-time concurrency refers to a number of task processing requests currently processed by the computing resource in parallel.

[0147] Since the computing resource is a computing resource leased by the gateway from the scheduling component, that is, the scheduling resource leases the computing resource to the gateway for task processing within a lease period. Therefore, in the case where the gateway determines that the task processing request is a task processing request of the target type of business, the gateway needs to allocate the corresponding computing resource for the task processing request for task processing, that is, the real-time concurrency of the computing resource is controlled by the gateway. Based on this, the gateway can count the real-time concurrency of the computing resource.

[0148] S502: Determine whether there is an available computing resource from the computing resource based on the real-time concurrency of the computing resource and a single-instance concurrency supported by the computing resource; if yes, execute step S503, and if no, execute step S504.

[0149] The single-instance concurrency can be used to represent the parallel processing capability of the corresponding computing resource. The single-instance concurrency supported by different computing resources can be the same or different. The available computing resource can indicate, for example, a computing resource that does not reach a saturation state at present.

[0150] After obtaining the real-time concurrency of the computing resource, the computing resource that does not reach a saturation state at present can be determined from the computing resource based on the real-time concurrency of the computing resource and the single-instance concurrency supported by the computing resource.

[0151] For example, the available computing resource can be determined in the case where the real-time concurrency does not reach the single-instance concurrency; the available computing resource can also be determined in the case where a ratio of the real-time concurrency to the single-instance concurrency does not reach a preset ratio; the effective real-time concurrency number can be determined according to the single-instance concurrency, and then the available computing resource can be determined in the case where the real-time concurrency is less than the effective real-time concurrency number. The specific implementation of determining whether there is an available computing resource is not specially limited in the present application.

[0152] In a possible implementation, the step of determining whether there is available computing resource can comprise: judging whether the real-time concurrency of the computing resource reaches the supported single-instance concurrency; if the real-time concurrency of the computing resource does not reach the single-instance concurrency supported by the computing resource, it indicates that the computing resource can currently undertake and process a new task processing request, it is determined that there is available computing resource, and the computing resource is taken as the available computing resource.

[0153] If the real-time concurrency of the computing resource reaches the single-instance concurrency supported by the computing resource, it indicates that the computing resource cannot currently undertake and process a new task processing request, and the computing resource is determined as unavailable computing resource.

[0154] It can be understood that, in the case where the number of computing resources is one, if the real-time concurrency of the computing resource reaches the supported single-instance concurrency, it is determined that there is no available computing resource in the computing resource.

[0155] In the case where the number of computing resources is multiple, if the real-time concurrency of each computing resource reaches the supported single-instance concurrency, it is determined that there is no available computing resource in the computing resource.

[0156] S503: determining the target computing resource from the available computing resources.

[0157] In the case where the number of available computing resources is one, the available computing resource is determined as the target computing resource.

[0158] In the case where the number of available computing resources is multiple, the target computing resource can be determined from the multiple available computing resources by using the determination strategy in step S402, and the specific process is referred to the explanation of step S402, which will not be repeated here.

[0159] S504: continuing to subscribe to the computing resource from the scheduling component, and taking the subscribed computing resource as the target computing resource.

[0160] In the case where it is determined that there is no available computing resource, that is, the computing resources with temporary lease subscribed by the gateway from the scheduling component cannot currently undertake and process a new task processing request, the gateway needs to continue to subscribe to new computing resource from the scheduling component for calling, and the specific subscription process is referred to the following embodiment.

[0161] The gateway can take the newly subscribed computing resource as a target computing resource after the gateway subscribes the new computing resource from the scheduling component. Since the gateway immediately subscribes a new computing resource from the scheduling component when the gateway determines that the computing resource currently subscribed by the gateway does not have available computing resources available for undertaking and processing a new task processing request, the gateway overcomes the lack of elasticity in the prior art, retains the high elasticity of the Serverless system architecture under the conventional mechanism, and achieves the effect of rapidly expanding the required computing resources when facing impulse traffic.

[0162] It should be understood that the gateway can also request a computing resource for executing a task processing request from the scheduling component in the existing manner and asynchronously perform subscription processing of the computing resource with the scheduling component in the case where the target computing resource does not exist. In this subscription scenario, the computing resource requested from the scheduling component in the existing manner can also be within the scope of the subscription or not within the scope of the subscription. The present application does not limit this

[0163] The task processing method provided by the embodiment has the following advantages. Since the real-time concurrency of the computing resource is managed by the gateway, the real-time concurrency of the computing resource can be counted by the gateway, and the counting result is still accurate. Meanwhile, the gateway can determine the available computing resource according to the current real-time concurrency of the computing resource and the supported single-instance concurrency, so that the task processing request can be executed by the computing resource.

[0164] Figure 6 Interaction diagram of a possible task processing method provided by the embodiment of the present application Figure 1 The embodiment is based on the above Figure 4 embodiment or Figure 5 the embodiment. The embodiment further describes a possible implementation of the gateway subscribing a computing resource. As shown in the Figure 6 , the method comprises the following steps.

[0165] S601: The gateway sends a subscription request to the scheduling component.

[0166] The subscription request is used to request the scheduling component to allocate a computing resource for processing a target type of business.

[0167] It can be understood that the timing of the gateway sending the subscription request to the scheduling component can include, for example, that all computing resources with temporary leases are unavailable computing resources, or the number of available computing resources in the computing resources with temporary leases is less than a preset threshold, or the gateway currently has no subscribed computing resource. The case where the gateway currently has no subscribed computing resource can include, for example, before the gateway enables the temporary lease mechanism, or the gateway currently has no computing resource with a temporary lease.

[0168] The gateway can send a subscription request to the scheduling component through a lease interface deployed on the scheduling component, or send the subscription request to the scheduling component through a Reserve / Ide interface deployed on the scheduling component. The present application does not limit this.

[0169] In the case where the gateway leases computing resources from the scheduling component through the Reserve interface of the scheduling component, the task processing system can, for example, continue to use the existing task processing system, so that the task processing method provided by the present embodiment has good adaptability, and the cost of using the existing task processing system is also low.

[0170] In the case where the gateway leases computing resources from the scheduling component through the lease interface of the scheduling component, the pressure on the Reserve interface of the scheduling component can be alleviated, thereby improving the data processing efficiency of the business.

[0171] S602: The scheduling component determines a computing resource for processing the target type of business from among the computing resources that have no temporary lease and are used for processing the target type of business, and establishes a temporary lease between the computing resource and the gateway.

[0172] Different types of businesses correspond to different computing resources.

[0173] When the scheduling component receives the subscription request sent by the gateway, the scheduling component determines at least one computing resource corresponding to the target type of business according to the subscription request, and determines a computing resource that is currently not leased, i.e., a computing resource that has no temporary lease, from among the at least one computing resource; and then establishes a temporary lease between the computing resource and the gateway.

[0174] It can be understood that when the scheduling component establishes a temporary lease between the computing resource and the gateway, i.e., when the scheduling component leases the computing resource to the gateway, a single lease relationship is formed between the computing resource and the gateway.

[0175] For example, gateway 1 sends a subscription request to the scheduling component, and the scheduling component establishes a temporary lease between computing resource 1 and gateway 1. Computing resource 1 can be directly called by gateway 1 within the subscription duration, and other gateways cannot use computing resource 1 to process tasks within the subscription duration.

[0176] The purpose of forming a single lease relationship between the computing resource and the gateway is to facilitate the gateway in managing the real-time concurrency of the leased computing resource, so as to preserve the accurate concurrency statistical capability under the Serverless system architecture.

[0177] S603: The scheduling component feeds back a subscription response to the gateway.

[0178] The subscription response is used to indicate the computing resources subscribed by the gateway. The subscribed computing resources are determined from computing resources without temporary leases and used to process target type services.

[0179] After the scheduling component establishes a temporary lease between the computing resource and the gateway, the scheduling component sends a subscription response carrying the computing resource identifier back to the gateway, so that the gateway can determine and call the corresponding computing resource for task processing based on the computing resource identifier.

[0180] Understandably, during a single contract signing process, the scheduling component can sign up for one or more computing resources from the gateway. The number of computing resources signed up can be determined by the scheduling component itself or indicated by the gateway.

[0181] In one possible implementation, the scheduling component can determine the number of computing resources to be subscribed to by the gateway according to a preset subscription strategy. The subscription strategy may include, for example, the scheduling component determining the number of computing resources to be subscribed to based on its own resource usage, or based on the service type corresponding to the subscription request, or based on the current usage of at least one computing resource corresponding to the target type service, or based on the number of computing resources in the availability zone where the gateway is located, etc. This application does not limit the subscription strategy; the specific strategy shall prevail.

[0182] In one possible implementation, the subscription request may include, for example, the number of computing resources to be subscribed. In this case, the scheduling component may, for example, subscribe to the gateway for the number of computing resources to be subscribed based on the gateway's instruction.

[0183] Meanwhile, even after receiving the number of computing resources to be contracted from the gateway, the scheduling component can still determine the number of computing resources to be contracted to the gateway according to the preset contracting strategy.

[0184] The task processing method provided in this embodiment subscribes to the scheduling component for computing resources used to process target type services. This allows the gateway to directly call the computing resources for task processing when processing task processing requests for target type services, without having to access the scheduling component to determine the corresponding computing resources. This reduces system-side latency caused by accessing the scheduling component during task processing and improves the processing efficiency of target type services. At the same time, since the gateway in this embodiment does not need to send the corresponding pre-submission request to the scheduling component, and the scheduling component does not need to determine the computing resources and return the computing resource identifier, server resources on the gateway and the scheduling component are saved.

[0185] Figure 7 An interactive illustration of a possible task processing method provided in an embodiment of this application.Figure 2 The embodiment is based on any of the above Figures 4-6 Embodiments, to supplement a possible implementation of gateway renewing computing resources. As Figure 7 shown, the method comprises:

[0186] S701: The gateway records the signing duration of the computing resource with a temporary lease.

[0187] Wherein, the signing duration can be used to indicate the real-time signing duration of the computing resource, and the gateway can record the real-time signing duration of the computing resource signed by itself.

[0188] The start time of the signing duration can be calculated from the time when the gateway receives the signing response or the renewal response sent by the scheduling component, or it can be determined by the signing start time carried in the signing response or the renewal response. The application does not make any limitation.

[0189] S702: In the case where the recorded signing duration reaches the maximum signing duration of the computing resource, the gateway sends a renewal request to the scheduling component.

[0190] Wherein, the maximum signing duration is used to indicate the maximum duration that the gateway can directly schedule the computing resource to process tasks in a single signing. The maximum signing duration of different computing resources can be the same or different.

[0191] The renewal request can be used to request the scheduling component to renew the computing resource. If the gateway determines that the recorded signing duration reaches the maximum signing duration of the computing resource, it means that the computing resource has reached the maximum duration that can be directly scheduled, and the gateway cannot continue to directly schedule the computing resource for task processing in the subsequent duration. At this time, the gateway can send a renewal request to the scheduling component to renew the computing resource. The renewal request may, for example, include the computing resource identifier.

[0192] S703: The scheduling component determines the computing resource corresponding to the renewal request and performs renewal processing on the temporary lease of the computing resource and the gateway.

[0193] Wherein, the scheduling component determines the computing resource to be renewed after receiving the renewal request sent by the gateway; and performs renewal processing on the temporary lease of the computing resource to be renewed and the gateway.

[0194] The renewal processing may, for example, be re-establishing the temporary lease between the computing resource and the gateway, or updating the signing duration of the temporary lease based on the established temporary lease. The application does not make any special limitation on the specific steps of the renewal processing, as long as the renewal processing is performed.

[0195] In a possible implementation, the scheduling component side can also record the lease duration of the computing resource with the temporary lease. When the scheduling component determines the computing resource to be renewed, the scheduling component can perform zero processing on the lease duration of the computing resource recorded by itself, or synchronize the lease duration of the computing resource recorded by itself to the gateway when the lease duration recorded by itself does not match the computing resource identifier in the lease request. As long as the lease duration between the gateway and the scheduling component is matched, the lease duration between the gateway and the scheduling component is matched.

[0196] S704: The scheduling component feeds back a renewal response of the computing resource to the gateway.

[0197] S705: The gateway re-records the lease duration of the computing resource.

[0198] The renewal response is used to indicate that the computing resource has been renewed.

[0199] When the gateway receives the renewal response fed back by the scheduling component, the gateway needs to re-record the lease duration of the computing resource, so as to perform the renewal operation again when the subsequent lease duration reaches the maximum lease duration.

[0200] In a possible implementation, the maximum lease duration can be set by the scheduling component, or can be determined by the gateway in cooperation with the system component.

[0201] In the case where the maximum lease duration is set by the scheduling component, the renewal response fed back by the scheduling component to the gateway can also be used to indicate the maximum lease duration of the computing resource, and the gateway can determine the maximum lease duration of the computing resource according to the received renewal response.

[0202] In the case where the maximum lease duration is determined by the gateway in cooperation with the system component, the gateway can determine the maximum lease duration through the maximum lease duration setting parameter sent by the system component.

[0203] The task processing method provided in this embodiment records the lease duration of the computing resource with the temporary lease, and performs the renewal operation on the scheduling component when the lease duration reaches the maximum lease duration, so as to ensure that the gateway has the computing resource that can be directly invoked at any time. At the same time, in the task processing process, the gateway only needs to perform one renewal operation when there is no available computing resource, and can directly invoke the computing resource for task processing within the maximum lease duration, thereby reducing the system side delay caused by accessing the scheduling component in the task processing process, and improving the processing efficiency of the target type business.

[0204] In a possible implementation, when the number of task processing requests handled by the gateway is small and the number of computing resources with temporary leases is large, the gateway can further request the scheduling component to release the idle computing resources. The specific process of releasing the computing resources is as follows:

[0205] When the gateway determines that the real-time concurrency of the computing resource is less than or equal to the preset concurrency, the gateway can record the duration for which the real-time concurrency of the computing resource is less than or equal to the preset concurrency.

[0206] If the duration reaches the preset duration, the gateway sends a release request to the scheduling component, so that the scheduling component releases the computing resource.

[0207] The preset concurrency may be pre-set by the system component or set by the gateway according to actual conditions. The release request is used to request the scheduling component to perform a release operation on the computing resource.

[0208] Figure 8 A possible task processing method provided by the embodiment of the application Figure 3 The embodiment is applied to a cloud platform, and the cloud platform includes a system component, a plurality of gateways located in different availability zones, a plurality of computing resources, and a plurality of scheduling components. As shown in Figure 8 The task processing method provided by the embodiment includes the following steps.

[0209] S801: The system component receives a task processing request sent by a client.

[0210] S802: The system component forwards the task processing request to at least two target gateways in the plurality of gateways located in different availability zones.

[0211] S803: The target gateway determines a target computing resource from the computing resources with temporary leases when determining that the task processing request is a target type business task processing request. The computing resource with a temporary lease is a computing resource subscribed from the scheduling component.

[0212] S804: The target gateway A sends the task processing request to the target computing resource A for task processing.

[0213] S805: The target gateway B sends the task processing request to the target computing resource B for task processing.

[0214] There is no explicit time sequence relationship between step S804 and step S805. Step S804 can be executed first, and then step S805 can be executed. Step S805 can be executed first, and then step S804 can be executed. Step S804 and step S805 can be executed simultaneously. The application does not limit this.

[0215] The method of the embodiments of the present application is applied to the task processing system in the foregoing embodiments, and the implementation principle and technical effects are described in the foregoing embodiments, which will not be described here.

[0216] Figure 9 A possible structure of a task processing device provided by the embodiments of the present application Figure 1 The task processing device is applied to a gateway, as shown in Figure 9 The device 900 includes:

[0217] The receiving module 901 is configured to receive a task processing request sent by a client.

[0218] The processing module 902 is configured to, in a case where the task processing request is a task processing request of a target type service, determine a target computing resource from computing resources with a temporary lease; the computing resources with the temporary lease are computing resources signed from a scheduling component.

[0219] The sending module 903 is configured to send the task processing request to the target computing resource for task processing.

[0220] In a possible implementation manner, the device further includes an obtaining module 904 and a judging module 905.

[0221] The obtaining module 904 is configured to obtain a real-time concurrency degree of the computing resource.

[0222] The judging module 905 is configured to determine, based on the real-time concurrency degree of the computing resource and a supported single-instance concurrency degree, whether there is an available computing resource from the computing resource.

[0223] The processing module 902 is further configured to, in a case where there is a computing resource, determine the target computing resource from the available computing resource.

[0224] In a possible implementation manner, the judging module 905 is specifically configured to judge whether the real-time concurrency degree reaches the single-instance concurrency degree.

[0225] The processing module 902 is further configured to, in a case where the real-time concurrency degree does not reach the single-instance concurrency degree, determine that the computing resource is an available computing resource; and in a case where the real-time concurrency degree reaches the single-instance concurrency degree, determine that the computing resource is an unavailable computing resource.

[0226] In a possible implementation manner, the processing module 902 is further configured to, in a case where there is no available computing resource, continue to sign computing resources from the scheduling component, and determine the signed computing resource as the target computing resource.

[0227] In a possible implementation, the sending module 903 is further configured to send a subscription request to the scheduling component, where the subscription request is used to request the scheduling component to allocate a computing resource for processing the target type of service;

[0228] The receiving module 901 is further configured to receive a subscription response fed back by the scheduling component, where the subscription response is used to indicate a subscribed computing resource, and the indicated subscribed computing resource is determined from a computing resource without a temporary lease and a computing resource used for processing the target type of service.

[0229] In a possible implementation, the processing module 902 is further configured to record a subscription duration of the computing resource with the temporary lease.

[0230] The sending module 903 is further configured to send a renewal request to the scheduling component when the recorded subscription duration reaches a maximum subscription duration of the computing resource, where the renewal request is used to request the scheduling component to perform a renewal operation on the computing resource.

[0231] The receiving module 901 is further configured to receive a renewal response fed back by the scheduling component.

[0232] The processing module 902 is further configured to re-record the subscription duration of the computing resource.

[0233] In a possible implementation, the subscription response is further used to indicate the maximum subscription duration of the computing resource, or the processing module 902 is further configured to negotiate the maximum subscription duration of the computing resource with a system component.

[0234] In a possible implementation, the processing module 902 is further configured to, in a case where the real-time concurrency of the computing resource meets a preset condition, record a duration in which the real-time concurrency of the computing resource meets the preset condition, where the preset condition includes that the real-time concurrency is less than or equal to a preset concurrency.

[0235] The sending module 903 is further configured to send a release request to the scheduling component in a case where the duration reaches a preset duration, where the release request is used to request the scheduling component to perform a release operation on the computing resource.

[0236] In a possible implementation, the receiving module 901 is further configured to receive configuration information sent by a system component, where the configuration information is used to indicate that a target type of service is processed by using a computing resource with a temporary lease.

[0237] The processing module 902 is further configured to configure a task processing scenario of the target type of service according to the configuration information.

[0238] Figure 10 A possible structure of a task processing apparatus provided by an embodiment of the present application Figure 2 The task processing apparatus is applied to a scheduling component. As shown in Figure 10 The apparatus 1000 includes:

[0239] The receiving module 1001 is configured to receive a subscription request sent by a gateway, where the subscription request is used to request allocation of a computing resource for processing a target type of service.

[0240] The processing module 1002 is configured to determine a computing resource for processing the target type of service from among computing resources that have no temporary lease and are used for processing the target type of service, and establish a temporary lease of the computing resource by the gateway.

[0241] The sending module 1003 is configured to feed back a subscription response to the gateway, where the subscription response is used to indicate the computing resource with the temporary lease.

[0242] In a possible implementation, the receiving module 1001 is further configured to receive a renewal request sent by the gateway through the lease interface, where the renewal request is used to request a renewal operation on a computing resource.

[0243] The processing module 1002 is further configured to determine a computing resource corresponding to the renewal request, and perform a renewal process on the temporary lease of the computing resource by the gateway.

[0244] The sending module 1003 is further configured to feed back a renewal response of the computing resource to the gateway.

[0245] In a possible implementation, the receiving module 1001 is further configured to receive a release request sent by the gateway, where the release request is used to request a release operation on a computing resource.

[0246] The processing module 1002 is further configured to determine a computing resource corresponding to the release request, cancel the temporary lease of the computing resource by the gateway, and perform a release operation on the computing resource.

[0247] Figure 11 A possible structure of an electronic device provided by an embodiment of the present application is shown in Figure 11 As shown in the figure, the electronic device 1100 can include at least one processor 1101, at least one storage medium 1102, and a communication interface 1103. The at least one processor 1101 is configured to implement the task processing method provided by the embodiments of the present application.

[0248] At least one memory 1102 is configured to store program instructions and / or data. The memory 1102 is coupled to the processor 1101. The coupling between the various means, units or modules in the embodiments of the present application can be indirect coupling or communication connection between the means, units or modules, which can be electrical, mechanical or other form, for information interaction between the means, units or modules. The processor 1101 can operate in cooperation with the memory 1102. The processor 1101 can execute the program instructions stored in the memory 1102. At least one of the at least one memory can be included in the processor.

[0249] The communication interface 1103 is configured to communicate with other devices through a transmission medium, so that the electronic device 1100 can communicate with other devices. The communication interface 1103 can be, for example, a transceiver, an interface, a bus, a circuit or a device capable of realizing the transceiving function. The processor 1101 can utilize the communication interface 1103 to transceive data and / or information, and is configured to implement the method provided by the embodiments of the present application. For details, refer to the detailed description in the foregoing embodiments, which will not be repeated here.

[0250] The specific connection medium between the processor 1101, the memory 1102 and the communication interface 1103 in the embodiments of the present application is not limited. In the embodiments of the present application, the processor 1101, the memory 1102 and the communication interface 1103 are connected through the bus 1104. Figure 11 Figure 11 The connection mode between other components is only schematically illustrated, and is not limited. The bus can be divided into an address bus, a data bus, a control bus and the like. For convenience of representation, only one thick line is used to represent the bus in the embodiments of the present application, but it does not mean that there is only one bus or only one type of bus. Figure 11

[0251] ​​It should be understood that the processor in the embodiments of the present application can be an integrated circuit chip with a signal processing capability. In the implementation process, the steps of the above method embodiments can be completed by an integrated logic circuit or an instruction in the form of software in the processor. The processor mentioned above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.

[0252] It should also be appreciated that the memory in the embodiments of the present application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct Rambus RAM (DR RAM). It should be noted that the memory of the system and method described herein is intended to include, but not be limited to, these and any other suitable types of memory.

[0253] The present application also provides a computer readable storage medium, which stores a computer program (also referred to as code or instructions). When the computer program is run by a processor, the computer program causes the computer to perform the task processing method in any of the preceding embodiments.

[0254] The present application also provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the task processing method in any of the preceding embodiments.

[0255] Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of both. The choice of hardware or software, or combinations of both, would be dependent on the specific application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The steps of a method, process, or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by an electronic processor, or in a combination of the two. A software module can reside in RAM (random access memory), flash memory, ROM (read-only memory), EPROM (erasable programmable ROM), EEPROM (electrically erasable programmable ROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC (application-specific integrated circuit).

[0256] The units described as separate units can or can not be physically separate, and the units shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0257] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be physically present separately, or two or more units can be integrated into one unit.

[0258] In the above embodiments, the functions of the functional units can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the software can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (for example, infrared, wireless, microwave, etc.)) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, digital video disc (DVD)), or a semiconductor medium (for example, solid state disk (SSD)) and the like.

[0259] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various media that can store program codes.

[0260] The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0261] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A task processing method characterized by, The method applied to a gateway comprises: receiving a task processing request sent by a client; if the task processing request is a task processing request of a target type service, determining a target computing resource from a computing resource with a temporary lease; the computing resource with a temporary lease is a computing resource leased from a scheduling component; sending the task processing request to the target computing resource for task processing.

2. The method of claim 1, wherein, The method further comprises: obtaining a real-time concurrency degree of the computing resource; based on the real-time concurrency degree of the computing resource and a supported single-instance concurrency degree, determining whether there is an available computing resource from the computing resource; if there is an available computing resource, determining the target computing resource from the available computing resource.

3. The method of claim 2, wherein, The method further comprises: if there is no available computing resource, continuing to lease a computing resource from the scheduling component, and taking the leased computing resource as the target computing resource. The method further comprises: sending a lease request to the scheduling component, the lease request being used to request the scheduling component to allocate a computing resource for processing the target type service; 4. The method of claim 2, wherein, receiving a lease response fed back by the scheduling component, the lease response being used to indicate a leased computing resource, the indicated leased computing resource being determined from a computing resource without a temporary lease and used for processing the target type service. The method further comprises:

5. The method according to any one of claims 1 to 4, characterized in that, recording a lease duration of the computing resource with a temporary lease; if the recorded lease duration reaches a maximum lease duration of the computing resource, sending a renewal request to the scheduling component, the renewal request being used to request the scheduling component to perform a renewal operation on the computing resource; receiving a renewal response fed back by the scheduling component, and re-recording the lease duration of the computing resource.

6. The method of claim 5, wherein, The lease response is also used to indicate the maximum lease duration of the computing resource; or, the method further comprises: negotiating the maximum lease duration of the computing resource with a system component. The method further comprises: if the real-time concurrency degree of the computing resource meets a preset condition, recording a continuous duration in which the real-time concurrency degree of the computing resource meets the preset condition, the preset condition comprising: the real-time concurrency degree is less than or equal to a preset concurrency degree; 7. The method of claim 6, wherein, if the continuous duration reaches a preset duration, sending a release request to the scheduling component, the release request being used to request the scheduling component to perform a release operation on the computing resource. The method further comprises:

8. The method of claim 2, wherein, ​ ​ ​ 9. The method of claim 1, wherein, ​ A system component receives configuration information sent by a scheduling component, the configuration information being used to indicate that a target service type is to be processed using a computing resource with a temporary lease; According to the configuration information, a task processing scenario of the target type service is configured.

10. A task processing method characterized by comprising: The method is applied to a scheduling component, and the method comprises: A gateway sends a subscription request to the scheduling component, the subscription request being used to request allocation of a computing resource for processing a target type service; The scheduling component determines a computing resource for processing the target type service from among computing resources without a temporary lease and used for processing the target type service, and establishes a temporary lease between the computing resource and the gateway; The scheduling component feeds back a subscription response to the gateway, the subscription response being used to indicate the computing resource with the temporary lease.

11. The method of claim 10, wherein, The scheduling component is configured with a lease interface, and the method further comprises: The scheduling component receives a renewal request sent by the gateway through the lease interface, the renewal request being used to request a renewal operation on the computing resource; The scheduling component determines the computing resource corresponding to the renewal request, and performs a renewal operation on the temporary lease between the computing resource and the gateway; The scheduling component feeds back a renewal response of the computing resource to the gateway.

12. The method of claim 10, wherein, The method further comprises: The scheduling component receives a release request sent by the gateway, the release request being used to request a release operation on the computing resource; The scheduling component determines the computing resource corresponding to the release request, cancels the temporary lease between the computing resource and the gateway, and performs a release operation on the computing resource.

13. A task processing method characterized by, The method is applied to a cloud platform, and the cloud platform comprises a system component, and a plurality of gateways, a plurality of computing resources and a plurality of scheduling components located in different availability zones, and the method comprises: The system component receives a task processing request sent by a client, and forwards the task processing request to at least two target gateways in the plurality of gateways; The target gateways determine a target computing resource from among computing resources with a temporary lease in a case where the target gateways determine that the task processing request is a task processing request of a target type service; the computing resources with the temporary lease are computing resources subscribed from a scheduling component; The target gateways send the task processing request to the target computing resource for task processing.

14. An electronic device, comprising: Comprise: A memory, a processor and a communication interface; The memory stores computer execution instructions, and the communication interface is used to communicate with other devices through a transmission medium; The processor executes the computer execution instructions stored in the memory to implement the task processing method in any one of claims 1-13.

15. A task processing system characterized by comprising: The task processing system comprises a system component, and a plurality of gateways, a plurality of computing resources and a plurality of scheduling components located in different availability zones, The system component is configured to receive a task processing request sent by a client, and forward the task processing request to at least two target gateways in the plurality of gateways; The target gateways are configured to determine a target computing resource from among computing resources with a temporary lease in a case where the target gateways determine that the task processing request is a task processing request of a target type service; the computing resources with the temporary lease are computing resources subscribed from a scheduling component, and the target computing resource is in the same availability zone as the target gateway; The target gateway is further configured to send the task processing request to a target computing resource for task processing.

16. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the processor executes the task processing method in any one of claims 1-13.

17. A computer program product comprising a computer program which, when executed by a processor, implements the task processing method of any one of claims 1-13.