Distributed scheduling method, device, equipment, system, medium and product without server computing

By using distributed scheduling methods in cloud-edge distributed scenarios and selecting appropriate function instances and resources based on business types and attributes, the problem of response delay and cost control of serverless computing tasks is solved, and efficient task scheduling is achieved.

CN118819811APending Publication Date: 2024-10-22CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410205431.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-23
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

In the field of cloud computing, existing technologies are difficult to efficiently and flexibly schedule serverless computing tasks in cloud-edge distributed scenarios, resulting in difficulty in achieving response delays and cost control.

Method used

By implementing a distributed scheduling method between the edge scheduler and the central scheduler, service requests are obtained and target function instances and resources are determined based on business types and attributes. Local or neighboring nodes are prioritized for processing. If the requirements are not met, they are forwarded to the center. The scheduler combines performance-first and cost-first scoring mechanisms for sorting and selection.

Benefits of technology

It realizes serverless computing task scheduling in cloud-edge distributed scenarios, reduces response delays, lowers usage costs, and meets task scheduling needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819811A_ABST
    Figure CN118819811A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed scheduling method, device, equipment and system without server computing, a medium and a product. The method comprises the following steps: acquiring a service request which carries a first identifier for indicating a service type; if it is determined that at least one function instance meeting the service type exists on the node equipment managed by the edge scheduler based on the first identifier, selecting a target function instance from the at least one function instance; otherwise, detecting whether at least one function instance meeting the service type exists on the node equipment managed by the adjacent edge scheduler, if so, sending a service request to the adjacent edge scheduler, and if not, obtaining resource information of the node equipment managed locally and / or the node equipment managed by the adjacent edge scheduler; if it is determined that the resources meeting the set requirements exist based on the resource information, starting a function instance for processing the service request based on the resources; and if it is determined that the resources meeting the set requirements do not exist based on the resource information, sending a service request to a central scheduler.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing, and in particular to a distributed scheduling method, apparatus, device, system, medium and product for serverless computing. Background Art

[0002] Serverless computing means building and running applications without managing infrastructure such as servers. It describes a more fine-grained deployment model in which applications are broken down into one or more fine-grained functions, uploaded to a platform, and then executed, scaled, and billed based on current needs.

[0003] Serverless computing is a new cloud computing service paradigm that manages lifecycles at the function level and has the characteristics of high elasticity and fine granularity. As serverless computing matures, more and more applications are expected to migrate to serverless computing platforms in the future, such as social networks that are sensitive to response latency and model training that is sensitive to computing costs. This poses a severe challenge to how to reasonably, efficiently and flexibly schedule tasks on cloud-edge resources. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a distributed scheduling method, device, equipment, system, medium and product for serverless computing, which is intended to meet the scheduling requirements of serverless computing in cloud-edge distributed scenarios.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a distributed scheduling method for serverless computing, which is applied to an edge scheduler, and the method includes:

[0007] Obtaining a service request, where the service request carries a first identifier indicating a service type;

[0008] If it is determined based on the first identifier that at least one function instance that meets the service type exists on the node device managed by the edge scheduler, selecting a target function instance for processing the service request from the at least one function instance;

[0009] If it is determined based on the first identifier that there are no function instances satisfying the service type on any of the node devices managed by the edge scheduler, then detect whether there is at least one function instance satisfying the service type on the node devices managed by the adjacent edge scheduler; if so, send the service request to the adjacent edge scheduler; if not, obtain resource information of the locally managed node devices and / or the node devices managed by the adjacent edge scheduler;

[0010] If it is determined based on the resource information that there are resources that meet the set requirements, a function instance for processing the service request is started based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, the service request is sent to the central scheduler.

[0011] In the above solution, the service request further carries a second identifier indicating a service attribute, and the selecting a target function instance for processing the service request from the at least one function instance includes:

[0012] sorting the at least one function instance based on parameter information of the node device to which it belongs and a service attribute determined according to the second identifier;

[0013] Based on the sorting result of the sorting, a target function instance for processing the service request is selected.

[0014] In the above solution, the types of the service attributes include: a first attribute with performance priority and a second attribute with cost priority, and the sorting of the at least one function instance based on the parameter information of the node device to which it belongs and the service attribute determined according to the second identifier includes:

[0015] For the at least one function instance, based on parameter information of the node device to which it belongs, obtain a first indicator and a second indicator of each of the function instances, wherein the first indicator represents a peak request processing rate of the function instance, and the second indicator represents resources consumed by the function instance;

[0016] If the business attribute determined according to the second identifier is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each of the function instances are input into a first evaluation function to obtain a first score value of each of the function instances, and the function instances are sorted based on the first score value;

[0017] If the business attribute determined according to the second identifier is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance, and the function instances are sorted based on the second score value.

[0018] In the above scheme, the method further includes:

[0019] If it is detected that at least one function instance that satisfies the service type exists on the node devices managed by multiple adjacent edge schedulers, an edge scheduler with the smallest transmission delay is selected from the multiple adjacent edge schedulers as the target edge scheduler;

[0020] The sending the service request to the adjacent edge scheduler includes:

[0021] Send the service request to the target edge scheduler.

[0022] In the above solution, the obtaining of resource information of the locally managed node device and / or the node device managed by the adjacent edge scheduler includes:

[0023] Obtain resource information of locally managed node devices; and

[0024] An edge scheduler whose transmission delay meets a set delay requirement and whose stability meets a set stability requirement is selected from multiple adjacent edge schedulers, and resource information of a node device managed by the selected edge scheduler is obtained.

[0025] In the above solution, the service request further carries a second identifier indicating a service attribute, and the method further includes:

[0026] sorting the resources that meet the set requirements based on parameter information of the node devices to which they belong and service attributes determined according to the second identifier;

[0027] Based on the sorting result of the sorting, a target resource is selected, and a function instance for processing the service request is deployed on the target resource.

[0028] In the above scheme, the types of the service attributes include: a first attribute of performance priority and a second attribute of cost priority, and the resources that meet the set requirements are sorted based on the parameter information of the node device to which they belong and the service attributes determined according to the second identifier, including:

[0029] For the resources that meet the set requirements, based on the parameter information of the node devices to which they belong, a third indicator and a fourth indicator of each of the resources are obtained, wherein the third indicator represents the computing peak rate of the resource, and the fourth indicator represents the resources consumed by the resource deployment function instance;

[0030] If the business attribute determined according to the second identifier is the first attribute, inputting the third indicator and the fourth indicator of each resource into a third evaluation function to obtain a third score value of each resource, and sorting each resource based on the third score value;

[0031] If the business attribute determined according to the second identifier is the second attribute, the third indicator and the fourth indicator of each resource are input into a fourth evaluation function to obtain a fourth score value of each resource, and the resources are sorted based on the fourth score value.

[0032] In a second aspect, an embodiment of the present application provides a distributed scheduling method for serverless computing, which is applied to a central scheduler, and the method includes:

[0033] Obtaining a service request, where the service request carries a first identifier indicating a service type;

[0034] If it is determined based on the first identifier that at least one function instance that meets the service type exists on the node device managed by the central scheduler, then a target function instance for processing the service request is selected from the at least one function instance;

[0035] If it is determined based on the first identifier that there is no function instance satisfying the service type on any node device managed by the central scheduler, then obtaining resource information of the managed node device;

[0036] If it is determined based on the resource information that there are resources that meet the set requirements, a function instance for processing the service request is started based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, the service request is sent to the edge scheduler.

[0037] In the above solution, the service request further carries a second identifier indicating a service attribute, and the selecting a target function instance for processing the service request from the at least one function instance includes:

[0038] sorting the at least one function instance based on parameter information of the node device to which it belongs and a service attribute determined according to the second identifier;

[0039] Based on the sorting result of the sorting, a target function instance for processing the service request is selected.

[0040] In the above solution, the types of the service attributes include: a first attribute with performance priority and a second attribute with cost priority, and the sorting of the at least one function instance based on the parameter information of the node device to which it belongs and the service attribute determined according to the second identifier includes:

[0041] For the at least one function instance, based on parameter information of the node device to which it belongs, obtain a first indicator and a second indicator of each of the function instances, wherein the first indicator represents a peak request processing rate of the function instance, and the second indicator represents resources consumed by the function instance;

[0042] If the business attribute determined according to the second identifier is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each of the function instances are input into a first evaluation function to obtain a first score value of each of the function instances, and the function instances are sorted based on the first score value;

[0043] If the business attribute determined according to the second identifier is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance, and the function instances are sorted based on the second score value.

[0044] In a third aspect, an embodiment of the present application provides a distributed scheduling device for serverless computing, which is applied to an edge scheduler, and the device includes:

[0045] A first acquisition module, used to acquire a service request, where the service request carries a first identifier indicating a service type;

[0046] A first processing module is used for selecting a target function instance for processing the service request from the at least one function instance if it is determined based on the first identifier that there is at least one function instance that satisfies the business type on the node device managed by the edge scheduler; if it is determined based on the first identifier that there is no function instance that satisfies the business type on any of the node devices managed by the edge scheduler, detecting whether there is at least one function instance that satisfies the business type on the node device managed by an adjacent edge scheduler; if so, sending the service request to the adjacent edge scheduler; if not, obtaining resource information of the locally managed node device and / or the node device managed by the adjacent edge scheduler; if it is determined based on the resource information that there are resources that meet the set requirements, starting the function instance for processing the service request based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, sending the service request to the central scheduler.

[0047] In a fourth aspect, an embodiment of the present application provides a distributed scheduling device for serverless computing, which is applied to a central scheduler, and the device includes:

[0048] A second acquisition module, used to acquire a service request, where the service request carries a first identifier indicating a service type;

[0049] A second processing module is used for selecting a target function instance for processing the service request from the at least one function instance if it is determined based on the first identifier that there is at least one function instance that meets the business type on the node device managed by the central scheduler; obtaining resource information of the managed node devices if it is determined based on the first identifier that there is no function instance that meets the business type on any of the node devices managed by the central scheduler; starting a function instance for processing the service request based on the resources if it is determined based on the resource information that there are resources that meet the set requirements; and sending the service request to the edge scheduler if it is determined based on the resource information that there are no resources that meet the set requirements.

[0050] In a fifth aspect, an embodiment of the present application provides an edge scheduler, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method described in the first aspect of the embodiment of the present application.

[0051] In a sixth aspect, an embodiment of the present application provides a central scheduler, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method described in the second aspect of the embodiment of the present application.

[0052] In the seventh aspect, an embodiment of the present application provides a distributed scheduling system for serverless computing, including the edge scheduler described in the fifth aspect of the embodiment of the present application and the central scheduler described in the sixth aspect of the embodiment of the present application.

[0053] In an eighth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any aspect of the embodiment of the present application are implemented.

[0054] In a ninth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in any aspect of the embodiment of the present application.

[0055] The technical solution provided by the embodiment of the present application is that the edge scheduler obtains a service request, and the service request carries a first identifier indicating the business type; if it is determined based on the first identifier that there is at least one function instance that meets the business type on the node device managed by the edge scheduler, then the target function instance for processing the service request is selected from the at least one function instance; if it is determined based on the first identifier that there is no function instance that meets the business type on the node device managed by the edge scheduler, then it is detected whether there is at least one function instance that meets the business type on the node device managed by the adjacent edge scheduler. If so, a service request is sent to the adjacent edge scheduler, if not, the resource information of the locally managed node device and / or the node device managed by the adjacent edge scheduler is obtained; if it is determined based on the resource information that there are resources that meet the set requirements, the function instance for processing the service request is started based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, then the service request is sent to the central scheduler. In this way, the scheduling task of the service request can be implemented preferentially by the edge scheduler near the gateway, which can reduce the response delay and effectively reduce the use cost, so as to better meet the scheduling requirements of serverless computing in the cloud-edge distributed scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1A flow chart of a distributed scheduling method for serverless computing according to an embodiment of the present application;

[0057] Figure 2 A flow chart of a distributed scheduling method for serverless computing according to another embodiment of the present application;

[0058] Figure 3 This is a schematic diagram of the structure of the scheduling system in the application embodiment of the present application;

[0059] Figure 4 This is a schematic diagram of the workflow of the side scheduler in the application embodiment of this application;

[0060] Figure 5 This is a schematic diagram of the structure of a distributed scheduling device for serverless computing according to an embodiment of the present application;

[0061] Figure 6 A schematic diagram of the structure of a distributed scheduling device for serverless computing according to another embodiment of the present application;

[0062] Figure 7 This is a schematic diagram of the structure of the edge scheduler in the embodiment of the present application;

[0063] Figure 8 Schematic diagram of the structure of the central scheduler in the embodiment of the present application. DETAILED DESCRIPTION

[0064] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0066] In the related art, there is a serverless computing scheduling system and method based on the intermediate expression of functions. The scheduling system includes: a function feature acquisition module, a function aggregation module, a mapping module and an adjustment module, wherein the function feature acquisition module acquires the programming language features of the function, the runtime phase features of the function and the micro-architecture features of the function; the function aggregation module aggregates the functions into different function sets according to different features; the mapping module divides the CPU cores into initialization phase CPU cores, runtime phase CPU cores and hybrid CPU cores according to different function sets; the adjustment module deploys the function to the specified core according to the features of the function and the classification of the CPU core, and periodically migrates the function and adjusts the frequency of each core according to the changes in the function features, so as to ensure that the serverless computing function can run at the optimal operating point. This system can improve the energy efficiency of the serverless computing system. However, the above scheme only considers the function features, and does not consider factors such as the service quality requirements and call costs of the application.

[0067] Based on this, in various embodiments of the present application, factors such as resource supply, application service quality requirements and cost budget are comprehensively considered to achieve optimal task scheduling of serverless computing in cloud-edge distributed scenarios.

[0068] like Figure 1 As shown, an embodiment of the present application provides a distributed scheduling method for serverless computing, which is applied to an edge scheduler, and the method includes:

[0069] Step 101: Obtain a service request, where the service request carries a first identifier indicating a service type.

[0070] It should be noted that in the embodiment of the present application, the distributed scheduling system includes a two-layer scheduling architecture: a central scheduler and an edge scheduler, wherein the central scheduler is responsible for request scheduling in a global scope, and the edge scheduler is responsible for request scheduling of a local node.

[0071] Exemplarily, the edge scheduler may receive a service request forwarded by a nearby gateway device. The service request carries a first identifier indicating a service type, and the edge scheduler may schedule a matching function instance based on the first identifier, thereby implementing task scheduling at a function granularity.

[0072] Step 102: If it is determined based on the first identifier that there is at least one function instance that meets the service type on the node device managed by the edge scheduler, a target function instance for processing the service request is selected from the at least one function instance.

[0073] Here, after the edge scheduler obtains the service request, it can determine whether there is at least one function instance that meets the business type on the locally managed node device based on the first identifier. If there is at least one function instance that meets the business type, a target function instance that processes the service request is selected from the at least one function instance to complete the scheduling of the service request.

[0074] Step 103: If it is determined based on the first identifier that there are no function instances that meet the business type on any node device managed by the edge scheduler, then detect whether there is at least one function instance that meets the business type on the node device managed by an adjacent edge scheduler. If so, send the service request to the adjacent edge scheduler.

[0075] Here, after the edge scheduler obtains the service request, it can determine whether there is at least one function instance that satisfies the service type on the locally managed node device based on the first identifier. If there is no at least one function instance that satisfies the service type, it will detect whether there is at least one function instance that satisfies the service type on the node device managed by the adjacent edge scheduler. If so, the service request is sent to the adjacent edge scheduler. In this way, when it is determined that there is no function instance that satisfies the service type on the locally managed node device, and there is a function instance that satisfies the service type on the node device managed by the adjacent edge scheduler, the service request can be sent to the adjacent edge scheduler, and the adjacent edge scheduler completes the scheduling of the service request.

[0076] Step 104: If it is determined based on the first identifier that there are no function instances that meet the business type on any of the node devices managed by the edge scheduler, then detect whether there is at least one function instance that meets the business type on the node devices managed by the adjacent edge scheduler; if not, obtain resource information of the locally managed node devices and / or the node devices managed by the adjacent edge scheduler; if it is determined based on the resource information that there are resources that meet the set requirements, then start the function instance that processes the service request based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, then send the service request to the central scheduler.

[0077] Here, after the edge scheduler obtains the service request, it can determine whether there is at least one function instance that meets the service type on the locally managed node device based on the first identifier. If there is no at least one function instance that meets the service type, it detects whether there is at least one function instance that meets the service type on the node device managed by the adjacent edge scheduler. If not, it obtains the resource information of the locally managed node device and / or the node device managed by the adjacent edge scheduler; if it is determined based on the resource information that there are resources that meet the set requirements, it starts the function instance that processes the service request based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, it sends the service request to the central scheduler. In this way, when it is determined that there is no function instance that meets the service type on the locally managed node device and there is no function instance that meets the service type on the node device managed by the adjacent edge scheduler, it can obtain the resource information of the node device managed by the local and / or adjacent edge scheduler, determine that there are resources that meet the set requirements based on the resource information, start the function instance that processes the service request based on the resources, or determine that there are no resources that meet the set requirements based on the resource information, it sends the service request to the central scheduler, and then implements the scheduling of the service request.

[0078] It is understandable that in the embodiment of the present application, the edge scheduler can schedule the service request to a locally managed node device for processing, or it can schedule the service request to an adjacent edge scheduler for processing, or it can schedule the service request to a central scheduler for processing. Based on the above processing logic of the embodiment of the present application, the scheduling task of the service request can be implemented preferentially by the edge scheduler near the gateway, which can reduce the response delay and effectively reduce the cost of use, thereby better meeting the scheduling requirements of serverless computing in cloud-edge distributed scenarios.

[0079] Exemplarily, the service request further carries a second identifier indicating a service attribute, and the selecting a target function instance for processing the service request from the at least one function instance includes:

[0080] sorting the at least one function instance based on parameter information of the node device to which it belongs and a service attribute determined according to the second identifier;

[0081] Based on the sorting result of the sorting, a target function instance for processing the service request is selected.

[0082] In an embodiment of the present application, the edge scheduler can also select the optimal target function instance based on business attributes from multiple function instances that meet the business type, thereby achieving optimal task scheduling considering factors such as resource supply, application service quality requirements and cost budget.

[0083] Exemplarily, the types of the service attributes include: a first attribute of performance priority and a second attribute of cost priority, and the sorting of the at least one function instance based on parameter information of the node device to which it belongs and the service attribute determined according to the second identifier includes:

[0084] For the at least one function instance, based on parameter information of the node device to which it belongs, obtain a first indicator and a second indicator of each of the function instances, wherein the first indicator represents a peak request processing rate of the function instance, and the second indicator represents resources consumed by the function instance;

[0085] If the business attribute determined according to the second identifier is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each of the function instances are input into a first evaluation function to obtain a first score value of each of the function instances, and the function instances are sorted based on the first score value;

[0086] If the business attribute determined according to the second identifier is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance, and the function instances are sorted based on the second score value.

[0087] For example, the function instance can obtain the corresponding first index and second index according to the location of the node device and the type of the processor. The quantization rules of the first index and the second index can be reasonably set based on expert experience, which is not limited in the embodiment of the present application.

[0088] Exemplarily, the edge scheduler also maintains a request queue for each function instance, and determines the current number of pending service requests for each function instance based on the request queue.

[0089] It is understandable that if the business attribute of the service request is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the first evaluation function to obtain the first score value of each function instance. Exemplarily, the function instance with the largest first score value can be selected as the target function instance. If there are multiple function instances with the same first score value, the function instance on the node device with lower resource utilization can be selected as the target function instance.

[0090] It is understandable that if the business attribute of the service request is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance. Exemplarily, the function instance with the largest second score value can be selected as the target function instance. If there are multiple function instances with the same second score value, the function instance on the node device with lower resource utilization can be selected as the target function instance.

[0091] Exemplarily, the method further includes:

[0092] If it is detected that at least one function instance that satisfies the service type exists on the node devices managed by multiple adjacent edge schedulers, an edge scheduler with the smallest transmission delay is selected from the multiple adjacent edge schedulers as the target edge scheduler;

[0093] The sending the service request to the adjacent edge scheduler includes:

[0094] Send the service request to the target edge scheduler.

[0095] Here, the transmission delay can represent the physical distance between two adjacent edge schedulers. In this way, by selecting the edge scheduler with the smallest transmission delay as the target edge scheduler and forwarding the service request to the target edge scheduler for processing, the processing delay can be effectively reduced and the reliability of the service can be guaranteed.

[0096] Exemplarily, the acquiring resource information of the locally managed node device and / or the adjacent edge scheduler managed node device includes:

[0097] Obtain resource information of locally managed node devices; and

[0098] An edge scheduler whose transmission delay meets a set delay requirement and whose stability meets a set stability requirement is selected from multiple adjacent edge schedulers, and resource information of a node device managed by the selected edge scheduler is obtained.

[0099] In an embodiment of the present application, when the edge scheduler determines that there is no function instance that meets the business type on both the locally managed node device and the node device managed by the adjacent edge scheduler, it can determine whether there are resources that meet the set requirements based on the resource information of the locally managed node device and the resource information of the node device managed by the adjacent edge scheduler that meets the set latency requirements and the set stability requirements. If so, start the function instance to process the service request based on the resources.

[0100] It should be noted that by selecting adjacent edge schedulers that meet the set delay requirements and the set stability requirements, invalid resource information can be effectively eliminated to ensure the reliability of the service. Among them, the set delay requirements and the set stability requirements can be reasonably set based on demand, and the embodiments of the present application do not limit this.

[0101] Here, determining whether there are resources that meet the set requirements based on the resource information may be to determine whether there are resources that meet the function instance deployment requirements in the resource information, and if so, determining that there are resources that meet the set requirements.

[0102] Exemplarily, the service request further carries a second identifier indicating a service attribute, and the method further includes:

[0103] sorting the resources that meet the set requirements based on parameter information of the node devices to which they belong and service attributes determined according to the second identifier;

[0104] Based on the sorting result of the sorting, a target resource is selected, and a function instance for processing the service request is deployed on the target resource.

[0105] In an embodiment of the present application, the edge scheduler can also select the optimal target resource from multiple resources that meet the set requirements based on business attributes, thereby achieving optimal task scheduling considering factors such as resource supply, application service quality requirements and cost budget.

[0106] Exemplarily, the types of the service attributes include: a first attribute of performance priority and a second attribute of cost priority, and the sorting of the resources that meet the set requirements based on the parameter information of the node device to which they belong and the service attributes determined according to the second identifier includes:

[0107] For the resources that meet the set requirements, based on the parameter information of the node devices to which they belong, a third indicator and a fourth indicator of each of the resources are obtained, wherein the third indicator represents the computing peak rate of the resource, and the fourth indicator represents the resources consumed by the resource deployment function instance;

[0108] If the business attribute determined according to the second identifier is the first attribute, inputting the third indicator and the fourth indicator of each resource into a third evaluation function to obtain a third score value of each resource, and sorting each resource based on the third score value;

[0109] If the business attribute determined according to the second identifier is the second attribute, the third indicator and the fourth indicator of each resource are input into a fourth evaluation function to obtain a fourth score value of each resource, and the resources are sorted based on the fourth score value.

[0110] It is understandable that if the business attribute of the service request is the first attribute, the third indicator and the fourth indicator of each resource are input into the third evaluation function to obtain the third score value of each resource. Exemplarily, the resource with the largest third score value can be selected as the target resource. If there are multiple resources with the same third score value, the resource on the node device with lower resource utilization can be selected as the target resource.

[0111] It is understandable that if the business attribute of the service request is the second attribute, the third indicator and the fourth indicator of each resource are input into the fourth evaluation function to obtain the fourth score value of each resource. Exemplarily, the resource with the largest fourth score value can be selected as the target resource. If there are multiple resources with the same fourth score value, the resource on the node device with lower resource utilization can be selected as the target resource.

[0112] Exemplarily, the embodiment of the present application provides a distributed scheduling method for serverless computing, which is applied to a central scheduler, such as Figure 2 As shown, the method includes:

[0113] Step 201: Obtain a service request, where the service request carries a first identifier indicating a service type.

[0114] Here, the central scheduler can receive service requests forwarded by the edge scheduler.

[0115] Step 202: If it is determined based on the first identifier that there is at least one function instance that meets the service type on the node device managed by the central scheduler, a target function instance for processing the service request is selected from the at least one function instance.

[0116] Here, after the central scheduler obtains the service request, it can determine whether there is at least one function instance that meets the business type on the locally managed node device (i.e., the central node) based on the first identifier. If there is at least one function instance that meets the business type, a target function instance that processes the service request is selected from the at least one function instance to complete the scheduling of the service request.

[0117] Step 203: If it is determined based on the first identifier that there are no function instances satisfying the service type on any of the node devices managed by the central scheduler, resource information of the managed node devices is obtained.

[0118] Step 204: If it is determined based on the resource information that there are resources that meet the set requirements, a function instance for processing the service request is started based on the resources.

[0119] Step 205: If it is determined based on the resource information that there are no resources that meet the set requirements, the service request is sent to the edge scheduler.

[0120] It can be understood that in the embodiments of the present application, the scheduling task of the service request can be preferentially implemented by the edge scheduler near the gateway. In addition, when the edge scheduler cannot complete the scheduling task, the service request can be forwarded to the central scheduler, and the scheduling task of the service request can be completed by the central scheduler. This can ensure the reliability of the business on the basis of satisfying the principle of local processing, and can better meet the scheduling requirements of serverless computing in cloud-edge distributed scenarios.

[0121] It should be noted that if the central scheduler determines that the central node does not have a function instance to process the service request and there are no resources that meet the set requirements, it can forward the service request to an edge scheduler that is not the source of the service request. That is, the central scheduler forwards the service request to other edge schedulers other than the edge scheduler that sent the service request to the central scheduler for processing. The service request can be processed by function instances or resources on node devices managed by other edge schedulers to ensure the reliability of business processing.

[0122] Exemplarily, the service request further carries a second identifier indicating a service attribute, and the selecting a target function instance for processing the service request from the at least one function instance includes:

[0123] sorting the at least one function instance based on parameter information of the node device to which it belongs and a service attribute determined according to the second identifier;

[0124] Based on the sorting result of the sorting, a target function instance for processing the service request is selected.

[0125] In an embodiment of the present application, the central scheduler can also select the optimal target function instance based on business attributes from multiple function instances that meet the business type, thereby achieving optimal task scheduling considering factors such as resource supply, application service quality requirements and cost budget.

[0126] Exemplarily, the types of the service attributes include: a first attribute of performance priority and a second attribute of cost priority, and the sorting of the at least one function instance based on parameter information of the node device to which it belongs and the service attribute determined according to the second identifier includes:

[0127] For the at least one function instance, based on parameter information of the node device to which it belongs, obtain a first indicator and a second indicator of each of the function instances, wherein the first indicator represents a peak request processing rate of the function instance, and the second indicator represents resources consumed by the function instance;

[0128] If the business attribute determined according to the second identifier is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each of the function instances are input into a first evaluation function to obtain a first score value of each of the function instances, and the function instances are sorted based on the first score value;

[0129] If the business attribute determined according to the second identifier is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance, and the function instances are sorted based on the second score value.

[0130] It can be understood that the process of selecting the objective function instance by the central scheduler is similar to the selection process of the aforementioned edge scheduler. For details, please refer to the relevant description of the aforementioned edge scheduler, which will not be repeated here.

[0131] Exemplarily, the central scheduler can also select the best target resource from multiple resources that meet the set requirements based on business attributes, thereby achieving optimal task scheduling considering factors such as resource supply, application service quality requirements, and cost budget. The process of selecting the target resource is similar to the selection process of the aforementioned edge scheduler. For details, please refer to the relevant description of the aforementioned edge scheduler, which will not be repeated here.

[0132] The present application is further described in detail below in conjunction with application examples.

[0133] The structure of the scheduling system of this application embodiment is as follows Figure 3 As shown in Figure 1, the scheduling system consists of a two-layer scheduling architecture: a central scheduler and an edge scheduler. The central scheduler is responsible for global request scheduling, while the edge scheduler is responsible for local node (edge ​​node and end node) request scheduling. The two-layer scheduler components have similar functions, which are described as follows:

[0134] Recording unit: collects and records information such as function instances, request scheduling, and resources.

[0135] Coordination unit (only for edge scheduler): coordinates scheduling with adjacent edge schedulers.

[0136] Decision making unit: selects a function instance to process a service request.

[0137] The scheduler works as follows:

[0138] 1) Both the central scheduler and the edge scheduler have the function of receiving service requests and selecting appropriate function instances for service requests. Usually, the gateway will forward service requests to the nearest edge scheduler for processing, while the central scheduler mainly receives service requests forwarded by the edge scheduler.

[0139] 2) The central scheduler can dispatch service requests to nodes (function instances) within the global scope for processing; if the service request needs to be dispatched to an edge or end node, the service request needs to be forwarded to the edge scheduler for processing.

[0140] 3) The edge scheduler can dispatch the service request to the local node for processing; it can also dispatch the service request directly to the adjacent edge scheduler for processing; it can also request the central scheduler to process.

[0141] Combine the following Figure 4 , the workflow of the edge scheduler in this application embodiment is exemplarily described, such as Figure 4 As shown, the workflow includes:

[0142] Step 401: Receive a service request.

[0143] The edge scheduler receives a service request sent by a gateway device, where the service request carries a first identifier indicating a service type.

[0144] Step 402, determine whether there is a local function instance, if so, execute step 403, if not, execute step 404.

[0145] Here, the decision unit queries the recording unit to check whether there is an available function instance on the local edge node or end node. For example, based on the aforementioned first identifier and the mapping relationship between the business type and the function instance stored in the recording unit, the query is performed to determine whether there is an available function instance. If so, a suitable function instance is selected for the service request. If not, step 404 is executed.

[0146] Here, local edge nodes and end nodes can be understood as node devices locally managed by the edge scheduler, where the edge node refers to a node device with higher computing power and closer to the central scheduler than the end node.

[0147] Step 403: dispatch the service request to a suitable function instance for processing.

[0148] Exemplarily, the service request further carries a second identifier indicating a service attribute, and the method for selecting the function instance is as follows:

[0149] Function instances vary in performance and cost, denoted as Fp and Fc, depending on their locations such as edges and end nodes, or their types such as CPUs and GPUs. Fp usually refers to the peak request processing rate of a single function instance (i.e., the number of requests processed per unit time), and Fc usually refers to the resources consumed by a single (or a certain number of) function instances.

[0150] The function instance maintains a request queue, and the number of service requests to be processed in the current queue is recorded as Qc.

[0151] Exemplarily, for a service request that prioritizes performance, the first evaluation function is as follows:

[0152] S = Fp / ((Qc+1)*log(Fc+1));

[0153] Exemplarily, for a cost-prioritized service request, the second evaluation function is as follows:

[0154] S = Fp / ((Qc+1)*e^Fc).

[0155] Exemplarily, the decision unit schedules the service request to the function instance with the largest S value (ie, the aforementioned first score value or second score value). When the S values ​​are the same, the function instance deployed on the node with lower resource utilization is selected.

[0156] Step 404, determine whether the neighbor has a function instance, if so, execute step 405, if not, execute step 406.

[0157] Here, the decision unit asks the coordination unit to detect (one or more) adjacent edge schedulers to determine whether there is a function instance matching the business type of the first identifier. If so, the service request is forwarded to the adjacent edge scheduler; if not, step 406 is executed.

[0158] Exemplarily, the coordination unit maintains an adjacent edge scheduler information table, which records the information of the adjacent edge schedulers collected regularly, such as but not limited to: function instance type, stability, transmission delay, etc. When the decision unit needs help from the adjacent edge scheduler, the coordination unit sends a request in the following order: 1) Prioritize the edge scheduler that has the target function instance and the smallest transmission delay during the most recent information collection, send a request for assistance to it, and if the other party agrees, forward the service request to the other party; 2) Then select the edge scheduler that meets the stability and transmission delay requirements to obtain available resource information.

[0159] Exemplarily, the adjacent edge scheduler information table is shown in Table 1 below:

[0160] Table 1

[0161] Transmission delay Function instance type stability Edge Scheduler-1 D1 f1,f3,f5…… Sn1 Edge Scheduler-2 D2 f2,f4,f6…… Sn2 edge scheduler-n

[0162] The transmission delay represents the physical distance between two adjacent edge schedulers. The calculation formula of the transmission delay D can be: Dn = A*d + B*D(n-1), d is the delay of this measurement, D(n-1) is the delay calculated in the last measurement, A and B are the delay adjustment coefficients, which can be set to 0.6 and 0.4 by default. Set a delay upper limit threshold. If it exceeds the threshold, it is considered that the delay is large and does not meet the set delay requirement.

[0163] Stability indicates the success rate of information collection over a period of time. For example, information collection is performed based on a request-response mode to obtain the success rate of information collection. The edge scheduler can set a lower threshold. If the threshold is lower than the lower threshold, the stability is low and the stability requirement is not met.

[0164] Step 405: dispatch the service request to the neighbor edge scheduler for processing.

[0165] Exemplarily, if it is detected that there is at least one function instance that satisfies the service type on the node devices managed by multiple adjacent edge schedulers, the edge scheduler with the smallest transmission delay is selected from the multiple adjacent edge schedulers as the target edge scheduler, and the service request is scheduled to the target edge scheduler.

[0166] Step 406, determine whether there are resources that meet the conditions, if so, execute step 407, if not, execute step 408.

[0167] Here, the decision unit performs step 407 based on the resource information returned by the local and neighboring edge schedulers that meet the transmission delay requirements and stability requirements, if it is determined that there are resources that meet the set requirements, otherwise, it performs step 408.

[0168] Step 407, select resources and deploy function instances.

[0169] Exemplarily, the resource selection method is as follows:

[0170] Resources vary in performance and cost depending on their location, such as edge or end, or their types, such as CPU or GPU, and are denoted as Rp and Rc, respectively. Rp usually refers to the peak computing rate of the CPU or GPU, and Rc usually refers to the resources consumed by deploying a certain number of function instances.

[0171] Exemplarily, for a service request that prioritizes performance, the third evaluation function is as follows:

[0172] S = Rp / log(Rc+1)

[0173] Exemplarily, for a cost-prioritized service request, the fourth evaluation function is as follows:

[0174] S=Rp / e^Rc

[0175] The decision unit selects the resource with the largest S value to deploy the function instance. When the S values ​​are the same, the node with low resource utilization is selected to deploy the function instance.

[0176] Step 408, request the central scheduler to process.

[0177] Here, the working logic of the central scheduler and the edge scheduler is similar. The difference is that the central scheduler first selects the target function instance or resource on the central node to process the request. If the central node does not have the target function instance or there are no resources that meet the requirements, the request is forwarded to the edge scheduler that is not the source of the service request, and finally processed by the function instance on the edge or end node.

[0178] It is understandable that the method of this application embodiment is positioned in the cloud-edge distributed scenario, and comprehensively considers factors such as resource supply, application service quality (response delay) requirements, and cost to achieve optimal task scheduling. It can meet the scheduling needs of local processing, thereby reducing the scheduling processing of the central scheduler, effectively reducing the response delay and usage cost, and thus better meet the scheduling needs of serverless computing in the cloud-edge distributed scenario.

[0179] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a distributed scheduling device for serverless computing, which is applied to the edge scheduler. The distributed scheduling device for serverless computing corresponds to the distributed scheduling method for serverless computing on the above-mentioned edge scheduler side, and each step in the embodiment of the distributed scheduling method for serverless computing on the above-mentioned edge scheduler side is also fully applicable to the embodiment of the distributed scheduling device for serverless computing.

[0180] like Figure 5As shown, the distributed scheduling device for serverless computing includes: a first acquisition module 501 and a first processing module 502. The first acquisition module 501 is used to acquire a service request, and the service request carries a first identifier indicating a business type; the first processing module 502 is used to select a target function instance for processing the service request from the at least one function instance if it is determined based on the first identifier that there is at least one function instance that satisfies the business type on the node device managed by the edge scheduler; if it is determined based on the first identifier that there is no function instance that satisfies the business type on any node device managed by the edge scheduler, then detect whether there is at least one function instance that satisfies the business type on the node device managed by the adjacent edge scheduler, if so, send the service request to the adjacent edge scheduler, if not, obtain resource information of the locally managed node device and / or the node device managed by the adjacent edge scheduler; if it is determined based on the resource information that there are resources that meet the set requirements, then start the function instance for processing the service request based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, then send the service request to the central scheduler.

[0181] Exemplarily, the service request further carries a second identifier indicating a service attribute, and the selecting a target function instance for processing the service request from the at least one function instance includes:

[0182] sorting the at least one function instance based on parameter information of the node device to which it belongs and a service attribute determined according to the second identifier;

[0183] Based on the sorting result of the sorting, a target function instance for processing the service request is selected.

[0184] Exemplarily, the types of the service attributes include: a first attribute of performance priority and a second attribute of cost priority, and the sorting of the at least one function instance based on parameter information of the node device to which it belongs and the service attribute determined according to the second identifier includes:

[0185] For the at least one function instance, based on parameter information of the node device to which it belongs, obtain a first indicator and a second indicator of each of the function instances, wherein the first indicator represents a peak request processing rate of the function instance, and the second indicator represents resources consumed by the function instance;

[0186] If the business attribute determined according to the second identifier is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each of the function instances are input into a first evaluation function to obtain a first score value of each of the function instances, and the function instances are sorted based on the first score value;

[0187] If the business attribute determined according to the second identifier is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance, and the function instances are sorted based on the second score value.

[0188] Exemplarily, the first processing module 502 is further configured to:

[0189] If it is detected that at least one function instance that satisfies the service type exists on the node devices managed by multiple adjacent edge schedulers, an edge scheduler with the smallest transmission delay is selected from the multiple adjacent edge schedulers as the target edge scheduler;

[0190] The sending the service request to the adjacent edge scheduler includes:

[0191] Send the service request to the target edge scheduler.

[0192] Exemplarily, the acquiring resource information of the locally managed node device and / or the adjacent edge scheduler managed node device includes:

[0193] Obtain resource information of locally managed node devices; and

[0194] An edge scheduler whose transmission delay meets a set delay requirement and whose stability meets a set stability requirement is selected from multiple adjacent edge schedulers, and resource information of a node device managed by the selected edge scheduler is obtained.

[0195] Exemplarily, the service request further carries a second identifier indicating a service attribute, and the first processing module 502 is further configured to:

[0196] sorting the resources that meet the set requirements based on parameter information of the node devices to which they belong and service attributes determined according to the second identifier;

[0197] Based on the sorting result of the sorting, a target resource is selected, and a function instance for processing the service request is deployed on the target resource.

[0198] Exemplarily, the types of the service attributes include: a first attribute of performance priority and a second attribute of cost priority, and the sorting of the resources that meet the set requirements based on the parameter information of the node device to which they belong and the service attributes determined according to the second identifier includes:

[0199] For the resources that meet the set requirements, based on the parameter information of the node devices to which they belong, a third indicator and a fourth indicator of each of the resources are obtained, wherein the third indicator represents the computing peak rate of the resource, and the fourth indicator represents the resources consumed by the resource deployment function instance;

[0200] If the business attribute determined according to the second identifier is the first attribute, inputting the third indicator and the fourth indicator of each resource into a third evaluation function to obtain a third score value of each resource, and sorting each resource based on the third score value;

[0201] If the business attribute determined according to the second identifier is the second attribute, the third indicator and the fourth indicator of each resource are input into a fourth evaluation function to obtain a fourth score value of each resource, and the resources are sorted based on the fourth score value.

[0202] In actual application, the first acquisition module 501 and the first processing module 502 can be implemented by a processor in the edge scheduler. Of course, the processor needs to run the computer program in the memory to implement its function.

[0203] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a distributed scheduling device for serverless computing, which is applied to the central scheduler. The distributed scheduling device for serverless computing corresponds to the distributed scheduling method for serverless computing on the above-mentioned central scheduler side, and each step in the embodiment of the distributed scheduling method for serverless computing on the above-mentioned central scheduler side is also fully applicable to the embodiment of the distributed scheduling device for serverless computing.

[0204] like Figure 6 As shown, the distributed scheduling device for serverless computing includes: a second acquisition module 601 and a second processing module 602. The second acquisition module 601 is used to obtain a service request, and the service request carries a first identifier indicating a business type; the second processing module 602 is used to select a target function instance for processing the service request from the at least one function instance if it is determined based on the first identifier that there is at least one function instance that meets the business type on the node device managed by the central scheduler; if it is determined based on the first identifier that there is no function instance that meets the business type on any node device managed by the central scheduler, then obtain resource information of the managed node device; if it is determined based on the resource information that there are resources that meet the set requirements, then start the function instance for processing the service request based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, then send the service request to the edge scheduler.

[0205] Exemplarily, the service request further carries a second identifier indicating a service attribute, and the selecting a target function instance for processing the service request from the at least one function instance includes:

[0206] sorting the at least one function instance based on parameter information of the node device to which it belongs and a service attribute determined according to the second identifier;

[0207] Based on the sorting result of the sorting, a target function instance for processing the service request is selected.

[0208] Exemplarily, the types of the service attributes include: a first attribute of performance priority and a second attribute of cost priority, and the sorting of the at least one function instance based on parameter information of the node device to which it belongs and the service attribute determined according to the second identifier includes:

[0209] For the at least one function instance, based on parameter information of the node device to which it belongs, obtain a first indicator and a second indicator of each of the function instances, wherein the first indicator represents a peak request processing rate of the function instance, and the second indicator represents resources consumed by the function instance;

[0210] If the business attribute determined according to the second identifier is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each of the function instances are input into a first evaluation function to obtain a first score value of each of the function instances, and the function instances are sorted based on the first score value;

[0211] If the business attribute determined according to the second identifier is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance, and the function instances are sorted based on the second score value.

[0212] It should be noted that: the distributed scheduling device for serverless computing provided in the above embodiment only uses the division of the above program modules as an example when performing distributed scheduling of serverless computing. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the distributed scheduling device for serverless computing provided in the above embodiment and the distributed scheduling method embodiment for serverless computing belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0213] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an edge scheduler. Figure 7 Only an exemplary structure of the edge scheduler is shown, not the entire structure, and can be implemented as needed. Figure 7 Partial or complete structure shown.

[0214] like Figure 7 As shown, the edge scheduler 700 provided in the embodiment of the present application includes: at least one processor 701, a memory 702, a user interface 703 and at least one network interface 704. The various components in the edge scheduler 700 are coupled together through a bus system 705. It can be understood that the bus system 705 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 705 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 7 Various buses are labeled as bus system 705.

[0215] The user interface 703 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.

[0216] The memory 702 in the embodiment of the present application is used to store various types of data to support the operation of the edge scheduler. Examples of such data include: any computer program used to operate on the edge scheduler.

[0217] The distributed scheduling method for serverless computing disclosed in the embodiment of the present application can be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the distributed scheduling method for serverless computing can be completed by the hardware integrated logic circuit or software instructions in the processor 701. The above-mentioned processor 701 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 701 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 702, and the processor 701 reads the information in the memory 702, and completes the steps of the distributed scheduling method for serverless computing provided in the embodiment of the present application in combination with its hardware.

[0218] In an exemplary embodiment, the edge scheduler can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0219] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a central scheduler. Figure 8 Only an exemplary structure of the central scheduler is shown, not all structures, and can be implemented as needed. Figure 8 Partial or complete structure shown.

[0220] like Figure 8 As shown, the central scheduler 800 provided in the embodiment of the present application includes: at least one processor 801, a memory 802, a user interface 803 and at least one network interface 804. The various components in the central scheduler 800 are coupled together through a bus system 805. It can be understood that the bus system 805 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 805 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 8 Various buses are labeled as bus system 805 .

[0221] The user interface 803 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.

[0222] The memory 802 in the embodiment of the present application is used to store various types of data to support the operation of the central scheduler. Examples of such data include: any computer program used to operate on the central scheduler.

[0223] The distributed scheduling method for serverless computing disclosed in the embodiment of the present application can be applied to the processor 801, or implemented by the processor 801. The processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the distributed scheduling method for serverless computing can be completed by the hardware integrated logic circuit or software instructions in the processor 801. The above-mentioned processor 801 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 801 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 802, and the processor 801 reads the information in the memory 802, and completes the steps of the distributed scheduling method for serverless computing provided in the embodiment of the present application in combination with its hardware.

[0224] In an exemplary embodiment, the central scheduler 800 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general purpose processors, controllers, MCUs, Microprocessors, or other electronic components to perform the aforementioned methods.

[0225] It can be understood that the memory 702, 802 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0226] In an exemplary embodiment, an embodiment of the present application provides a distributed scheduling system for serverless computing, including the edge scheduler described in the embodiment of the present application and the central scheduler described in the embodiment of the present application.

[0227] In an exemplary embodiment, the embodiment of the present application further provides a computer storage medium, which can be a computer-readable storage medium, for example, a memory 702 storing a computer program, which can be executed by a processor 701 of a side scheduler 700 to complete the steps described in the method of the embodiment of the present application; another example includes a memory 802 storing a computer program, which can be executed by a processor 801 of a central scheduler 800 to complete the steps described in the method of the embodiment of the present application. The computer-readable storage medium can be a memory such as a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disk, or a CD-ROM.

[0228] In an exemplary embodiment, the embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the processor 701 of the edge scheduler 700 or by the processor 801 of the central scheduler 800 to complete the steps described in the method of the embodiment of the present application.

[0229] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0230] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0231] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A distributed scheduling method for serverless computing, characterized in that: Applied to an edge scheduler, the method comprises: Obtaining a service request, where the service request carries a first identifier indicating a service type; If it is determined based on the first identifier that at least one function instance that meets the service type exists on the node device managed by the edge scheduler, selecting a target function instance for processing the service request from the at least one function instance; If it is determined based on the first identifier that there are no function instances satisfying the service type on any of the node devices managed by the edge scheduler, then detect whether there is at least one function instance satisfying the service type on the node devices managed by the adjacent edge scheduler; if so, send the service request to the adjacent edge scheduler; if not, obtain resource information of the locally managed node devices and / or the node devices managed by the adjacent edge scheduler; If it is determined based on the resource information that there are resources that meet the set requirements, a function instance for processing the service request is started based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, the service request is sent to the central scheduler.

2. The method according to claim 1, characterized in that The service request also carries a second identifier indicating a service attribute, and the selecting a target function instance for processing the service request from the at least one function instance includes: sorting the at least one function instance based on parameter information of the node device to which it belongs and a service attribute determined according to the second identifier; Based on the sorting result of the sorting, a target function instance for processing the service request is selected.

3. The method according to claim 2, characterized in that The types of the service attributes include: a first attribute with performance priority and a second attribute with cost priority, and the sorting of the at least one function instance based on parameter information of the node device to which it belongs and the service attribute determined according to the second identifier includes: For the at least one function instance, based on parameter information of the node device to which it belongs, obtain a first indicator and a second indicator of each of the function instances, wherein the first indicator represents a peak request processing rate of the function instance, and the second indicator represents resources consumed by the function instance; If the business attribute determined according to the second identifier is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each of the function instances are input into a first evaluation function to obtain a first score value of each of the function instances, and the function instances are sorted based on the first score value; If the business attribute determined according to the second identifier is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance, and the function instances are sorted based on the second score value.

4. The method according to claim 1, characterized in that: The method further comprises: If it is detected that at least one function instance that satisfies the service type exists on the node devices managed by multiple adjacent edge schedulers, an edge scheduler with the smallest transmission delay is selected from the multiple adjacent edge schedulers as the target edge scheduler; The sending the service request to the adjacent edge scheduler includes: Send the service request to the target edge scheduler.

5. The method according to claim 1, characterized in that The acquiring of resource information of the locally managed node device and / or the adjacent edge scheduler managed node device includes: Obtain resource information of locally managed node devices; and An edge scheduler whose transmission delay meets a set delay requirement and whose stability meets a set stability requirement is selected from multiple adjacent edge schedulers, and resource information of a node device managed by the selected edge scheduler is obtained.

6. The method according to claim 5, characterized in that The service request also carries a second identifier indicating a service attribute, and the method further includes: sorting the resources that meet the set requirements based on parameter information of the node devices to which they belong and service attributes determined according to the second identifier; Based on the sorting result of the sorting, a target resource is selected, and a function instance for processing the service request is deployed on the target resource.

7. The method according to claim 6, characterized in that The types of the service attributes include: a first attribute of performance priority and a second attribute of cost priority, and the sorting of the resources that meet the set requirements based on the parameter information of the node devices to which they belong and the service attributes determined according to the second identifier includes: For the resources that meet the set requirements, based on the parameter information of the node devices to which they belong, a third indicator and a fourth indicator of each of the resources are obtained, wherein the third indicator represents the computing peak rate of the resource, and the fourth indicator represents the resources consumed by the resource deployment function instance; If the business attribute determined according to the second identifier is the first attribute, inputting the third indicator and the fourth indicator of each resource into a third evaluation function to obtain a third score value of each resource, and sorting each resource based on the third score value; If the business attribute determined according to the second identifier is the second attribute, the third indicator and the fourth indicator of each resource are input into a fourth evaluation function to obtain a fourth score value of each resource, and the resources are sorted based on the fourth score value.

8. A distributed scheduling method for serverless computing, characterized in that: Applied to a central scheduler, the method comprises: Obtaining a service request, where the service request carries a first identifier indicating a service type; If it is determined based on the first identifier that at least one function instance that meets the service type exists on the node device managed by the central scheduler, then a target function instance for processing the service request is selected from the at least one function instance; If it is determined based on the first identifier that there is no function instance satisfying the service type on any node device managed by the central scheduler, then obtaining resource information of the managed node device; If it is determined based on the resource information that there are resources that meet the set requirements, a function instance for processing the service request is started based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, the service request is sent to the edge scheduler.

9. The method according to claim 8, characterized in that The service request also carries a second identifier indicating a service attribute, and the selecting a target function instance for processing the service request from the at least one function instance includes: sorting the at least one function instance based on parameter information of the node device to which it belongs and a service attribute determined according to the second identifier; Based on the sorting result of the sorting, a target function instance for processing the service request is selected.

10. The method according to claim 9, characterized in that The types of the service attributes include: a first attribute with performance priority and a second attribute with cost priority, and the sorting of the at least one function instance based on parameter information of the node device to which it belongs and the service attribute determined according to the second identifier includes: For the at least one function instance, based on parameter information of the node device to which it belongs, obtain a first indicator and a second indicator of each of the function instances, wherein the first indicator represents a peak request processing rate of the function instance, and the second indicator represents resources consumed by the function instance; If the business attribute determined according to the second identifier is the first attribute, the first indicator, the second indicator and the number of service requests to be processed of each of the function instances are input into a first evaluation function to obtain a first score value of each of the function instances, and the function instances are sorted based on the first score value; If the business attribute determined according to the second identifier is the second attribute, the first indicator, the second indicator and the number of service requests to be processed of each function instance are input into the second evaluation function to obtain the second score value of each function instance, and the function instances are sorted based on the second score value.

11. A distributed scheduling device for serverless computing, characterized in that: Applied to an edge scheduler, the device comprises: A first acquisition module, used to acquire a service request, where the service request carries a first identifier indicating a service type; A first processing module is used for selecting a target function instance for processing the service request from the at least one function instance if it is determined based on the first identifier that there is at least one function instance that satisfies the business type on the node device managed by the edge scheduler; if it is determined based on the first identifier that there is no function instance that satisfies the business type on any of the node devices managed by the edge scheduler, detecting whether there is at least one function instance that satisfies the business type on the node device managed by an adjacent edge scheduler; if so, sending the service request to the adjacent edge scheduler; if not, obtaining resource information of the locally managed node device and / or the node device managed by the adjacent edge scheduler; if it is determined based on the resource information that there are resources that meet the set requirements, starting the function instance for processing the service request based on the resources; if it is determined based on the resource information that there are no resources that meet the set requirements, sending the service request to the central scheduler.

12. A distributed scheduling device for serverless computing, characterized in that: Applied to a central dispatcher, the device comprises: A second acquisition module, used to acquire a service request, where the service request carries a first identifier indicating a service type; A second processing module is used for selecting a target function instance for processing the service request from the at least one function instance if it is determined based on the first identifier that there is at least one function instance that meets the business type on the node device managed by the central scheduler; obtaining resource information of the managed node devices if it is determined based on the first identifier that there is no function instance that meets the business type on any of the node devices managed by the central scheduler; starting a function instance for processing the service request based on the resources if it is determined based on the resource information that there are resources that meet the set requirements; and sending the service request to the edge scheduler if it is determined based on the resource information that there are no resources that meet the set requirements.

13. An edge scheduler, characterized in that: include: A processor and a memory for storing a computer program that can be executed on the processor, wherein: The processor is used to execute the steps of the method according to any one of claims 1 to 7 when running a computer program.

14. A central scheduler, characterized in that: include: A processor and a memory for storing a computer program that can be executed on the processor, wherein: The processor is used to execute the steps of the method according to any one of claims 8 to 10 when running a computer program.

15. A distributed scheduling system for serverless computing, characterized in that: It comprises the edge scheduler as claimed in claim 13 and the central scheduler as claimed in claim 14.

16. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.