Serverless computing-oriented task dynamic allocation method, device and equipment

By constructing a directed call graph and leveraging the inter-group fusion benefits of dynamic computation function pairs, the resource allocation of serverless computing is optimized, solving the problems of low resource utilization and insufficient security in serverless computing architecture, and achieving more efficient resource utilization and performance improvement.

CN120448121BActive Publication Date: 2026-05-01湖南工商大学
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
湖南工商大学
Filing Date
2025-04-28
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In serverless computing architectures, existing technologies struggle to effectively optimize resource utilization and security, especially in complex call graphs and multi-platform environments, where high communication overhead and low resource utilization persist.

Method used

A directed call graph is constructed, and the inter-group fusion benefits of function pairs are dynamically calculated based on the call relationships and communication costs between functions. Composite function groups are generated, and the optimal set of function groups is selected through an inverse pricing mechanism to optimize resource allocation and call paths.

Benefits of technology

It improves the efficiency and performance of cloud server resource utilization, reduces communication costs and cold start time, and enhances the scalability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448121B_ABST
    Figure CN120448121B_ABST
Patent Text Reader

Abstract

The application discloses a task dynamic allocation method and device for serverless computing, equipment and medium, comprising: constructing a directed call graph according to a task execution structure; initializing each function as an independent group, calculating the initial performance score of each group based on the call relationship, and generating a candidate function group pair set based on the initial performance score; traversing the candidate function group pairs in the candidate function group pair set, dynamically calculating the inter-group fusion benefit of the candidate function group pair based on the initial performance score, merging the candidate function group pairs with inter-group fusion benefits meeting preset conditions to obtain a composite function group; verifying whether the resource consumption of the generated composite function group meets platform constraints, and if the resource consumption exceeds the memory quota limit, reallocating resources; updating the function grouping strategy according to real-time monitoring data, and selecting the optimal composite function group set that maximizes the platform utility to execute the task through a reverse pricing mechanism. The application improves the cloud server resource utilization efficiency and performance.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus and equipment for dynamic task allocation in serverless computing Technical Field

[0001] This invention relates to the field of cloud server technology, and in particular to a method, apparatus, and device for dynamic task allocation in serverless computing. Background Technology

[0002] As more and more organizations shift to cloud platforms to deploy serverless applications, this trend primarily benefits from the continuously updated and automatically managed infrastructure, software, and tools provided by cloud service providers. In public cloud environments, serverless computing has gained widespread adoption due to its high scalability and pay-as-you-go billing model, and in recent years has seen significant development in areas such as data-intensive scientific computing, machine learning tasks, and parallel video processing. Its advantages are mainly reflected in the following three aspects: serverless functions can adaptively adjust computing resources according to changes in input size, ensuring efficient task execution; the pay-as-you-go billing model is particularly suitable for applications with fluctuating computing demands, helping to reduce resource costs; and cloud service providers are responsible for the maintenance and upgrades of the infrastructure, freeing developers from managing computing clusters, thereby improving deployment efficiency and lowering the technical barrier.

[0003] However, efficiently parallelizing computational tasks (such as multidimensional data processing, streaming computing, or complex business logic) in serverless architectures remains a challenge. Because the modular design of serverless platforms tends towards fine-grained function decomposition, this leads to frequent remote calls and high communication overhead, while also increasing computational and storage costs. Therefore, how to construct adaptive strategies that can dynamically adjust the fusion scheme based on runtime data to improve overall performance and reduce operating costs remains a core problem that urgently needs to be solved.

[0004] For serverless computing optimization, existing solutions primarily focus on resource allocation for individual functions. For example, Aquatope employs a Bayesian model for QoS-aware resource management and mitigates the cold start problem by optimizing preheating containers; Astra focuses on autonomous memory configuration for data-intensive FaaS tasks, using graph algorithms to solve the constrained shortest path problem and optimizing intermediate data management to ensure execution time meets QoS requirements. Scheuner (Chalmers University of Technology) and Leitner (University of Gothenburg) proposed the concept of function fusion, which automatically splits and deploys applications to simplify migration.

[0005] Scheuner et al. proposed an extended service call graph to capture the interactions between serverless applications and cloud platform services. Using static analysis techniques, this method parses event declarations in application code and identifies the function calls that trigger these events, accurately constructing the control flow across functions and platform services. The research focuses on JavaScript applications on the AWS Lambda platform, analyzing their event-driven execution logic to overcome the limitations of traditional call graphs in serverless environments.

[0006] Researchers at LocalStack and others have developed a fusion optimization framework called Fusionize, which dynamically eliminates double billing by greedily dividing the application call graph into subtrees and converting them into deployable function units.

[0007] Czentye et al. proposed a scheme to optimize serverless applications by combining basic serverless functions into composite functions through function fusion technology, thereby reducing the performance overhead caused by inter-function calls and cold starts. The researchers also developed cost and performance models that consider parallel execution of function instances and internal state management to achieve more efficient resource allocation and optimization. To address computational complexity issues, they proposed exact algorithms, heuristics, and approximation methods to provide feasible solutions for practical applications.

[0008] In the process of developing this invention, the inventors discovered that the existing methods have at least the following problems:

[0009] The research solutions of Aquatope and Astra do not consider the collaborative optimization between serverless components, resulting in high call overhead and low resource utilization. The research methods of Scheuner and Leitner have limitations in handling indirect data dependencies, especially in scenarios involving access to common variables. The static analysis in Scheuner et al.'s solution cannot capture dynamic events and state changes at runtime, leading to inaccurate identification of some interaction relationships. Furthermore, as the complexity of serverless architectures increases, static analysis faces performance bottlenecks, impacting analysis efficiency. Simultaneously, the scalability of the methods is limited, making it difficult to adapt to multi-platform and multi-language environments, thus restricting its application in broader scenarios. The Fusionize framework typically ignores memory configuration computation and relies on strict constraints or greedy decisions to achieve fast algorithm execution time, thereby optimizing its (re)deployment control flow. Moreover, the simplified decision-making process may fail to fully consider security, increasing the risk of memory leaks and security vulnerabilities, providing attack points for potential attackers. The limitation of the solution proposed by Czentye et al. lies in its reliance on predefined execution models and assumptions, making it difficult to adapt to dynamic changes and varied workloads in cloud environments. While this approach improves upon resource allocation and cold start issues, its high computational complexity impacts system scalability and real-time performance when handling large-scale, complex serverless applications. Therefore, the solution's processing capability is insufficient when dealing with complex call graphs.

[0010] Given the aforementioned limitations, with the increasing complexity of stateless function call patterns, the growing need for external management of intermediate states, and the adaptation issues of cloud resources in data-intensive applications, improving resource utilization efficiency and security has become an urgent problem to be solved when allocating tasks for serverless computing. Summary of the Invention

[0011] This invention provides a method, apparatus, computer device, and storage medium for dynamic task allocation in serverless computing, in order to improve the efficiency of cloud service resource utilization and enhance cloud server performance.

[0012] To address the aforementioned technical problems, embodiments of this application provide a method for dynamic task allocation in serverless computing, the method comprising:

[0013] A directed call graph is constructed based on the task execution structure. The nodes of the directed call graph represent serverless functions, and the edges of the directed call graph represent the call relationship and communication cost between functions. The node attributes include execution time, memory requirements, call frequency, and cold start time.

[0014] Each function is initialized as an independent group. Based on the calling relationship, the initial performance score of each group is calculated, and a set of candidate function pairs is generated based on the initial performance score. The initial performance score includes fusion gain, resource utilization and cold start time constraints.

[0015] Traverse the candidate function pairs in the candidate function pair set, dynamically calculate the inter-group fusion benefit of the candidate function pairs based on the initial performance score, merge the candidate function pairs whose inter-group fusion benefit meets the preset conditions to obtain a composite function group, and synchronously call the composite function group in the path;

[0016] Verify whether the resource consumption of the generated composite function group meets the platform constraints, including memory quota limits and cold start time thresholds. If the resource consumption exceeds the memory quota limit, trigger function group splitting or resource reallocation.

[0017] The function grouping strategy is updated based on real-time monitoring data, and the optimal set of composite function groups that maximizes platform utility is selected for task execution through a reverse pricing mechanism.

[0018] Optionally, the dynamic calculation of the inter-group fusion benefit of candidate function pairs based on the initial performance score includes:

[0019] The modularity incremental method is adopted, based on the calculation of average performance gain, and a dynamic threshold parameter M* is applied to control the merging of similar computational logic functions: when the number of functions of the same type in a group exceeds M*, the calculation of its fusion gain is stopped.

[0020] Optionally, the composite function group in the synchronous call path includes:

[0021] Identify linear execution chain structures in the task;

[0022] The end-to-end latency reduction after chain function merging is calculated based on the communication cost in the directed call graph. If the communication cost reduction rate exceeds a preset threshold, merging is forced.

[0023] A differentiated strategy is adopted for asynchronous call paths. When the coupling degree is lower than the dynamic threshold parameter M*, function splitting or independent resource allocation is performed.

[0024] Optionally, a lightweight wrapper is generated for the composite function group. The wrapper preloads initialization data and manages intermediate result caching, and serializes cross-function communication through memory mapping technology.

[0025] Optionally, the method for dynamic task allocation for serverless computing further includes:

[0026] The lightweight wrapper is used to simulate the front-end function API interface, and the syntax of the call relationship is standardized by pre-declared data format;

[0027] The memory usage metrics of the composite function group are reported in real time through the monitoring service interface of the lightweight wrapper integration platform.

[0028] The intermediate result cache is managed using the LRU algorithm, retaining the output data of nodes with high call frequency.

[0029] Optionally, triggering function group splitting or resource reallocation if resource consumption exceeds memory quota limits includes:

[0030] Detect memory overflow events in a composite function group and automatically trigger the isolated execution of the sub-functions of the lightweight wrapper.

[0031] When platform deployment quotas change, composite function groups are split in descending order of performance score.

[0032] Add a flag to function groups that frequently time out, and then expand their resource capacity.

[0033] Optionally, the step of selecting the optimal set of composite functions that maximizes platform utility through a reverse pricing mechanism to perform the task includes:

[0034] Obtain the virtual bid for each serverless function based on its execution time and memory requirements;

[0035] Construct a multi-objective optimization model to minimize communication cost and cold start time constraints;

[0036] Based on the virtual bid, minimizing communication costs, and cold start time constraints, a greedy algorithm is used to approximately solve for the optimal set of fusion benefits in polynomial time, which is then used as the optimal set of composite functions.

[0037] The task is executed based on the set of the optimal composite functions.

[0038] To address the aforementioned technical problems, this application also provides a task dynamic allocation device for serverless computing, comprising:

[0039] The directed graph construction module is used to construct a directed call graph based on the task execution structure. In the directed call graph, the nodes represent serverless functions, the edges represent the call relationships and communication costs between functions, and the node attributes include execution time, memory requirements, call frequency, and cold start time.

[0040] The performance calculation module is used to initialize each function as an independent group, calculate the initial performance score of each group based on the calling relationship, and generate a set of candidate function group pairs based on the initial performance score. The initial performance score includes fusion gain, resource utilization and cold start time constraint.

[0041] The function fusion module is used to traverse the candidate function pairs in the candidate function pair set, dynamically calculate the inter-group fusion benefit of the candidate function pairs based on the initial performance score, merge the candidate function pairs whose inter-group fusion benefits meet the preset conditions to obtain a composite function group, and synchronously call the composite function group in the path.

[0042] The resource monitoring module is used to verify whether the resource consumption of the generated composite function group meets the platform constraints, including memory quota limits and cold start time thresholds. If the resource consumption exceeds the memory quota limit, the function group will be split or resources will be reallocated.

[0043] The dynamic update module is used to update the function grouping strategy based on real-time monitoring data, and select the optimal set of composite function groups that maximizes platform utility to execute tasks through a reverse pricing mechanism.

[0044] Optionally, the function fusion module includes:

[0045] The structure recognition unit is used to identify the linear execution chain structure in a task.

[0046] The cost calculation unit is used to calculate the end-to-end latency reduction after chain function merging based on the communication cost in the directed call graph. If the communication cost reduction rate exceeds a preset threshold, merging is forced.

[0047] The strategy update unit is used to apply differentiated strategies to asynchronous call paths. When the coupling degree is lower than the dynamic threshold parameter M*, it performs function splitting or independent resource allocation.

[0048] To address the aforementioned technical problems, this application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the aforementioned task dynamic allocation method for serverless computing.

[0049] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for dynamic task allocation in serverless computing.

[0050] The present invention provides a method, apparatus, computer device, and storage medium for dynamic task allocation in serverless computing. It constructs a directed call graph based on the task execution structure, where nodes represent serverless functions, edges represent call relationships and communication costs between functions, and node attributes include execution time, memory requirements, call frequency, and cold start time. Each function is initialized as an independent group. Based on the call relationships, an initial performance score is calculated for each group, and a candidate function pair set is generated based on the initial performance scores. The initial performance score includes fusion gain, resource utilization, and cold start time constraints. The candidate pairs are then traversed. The system dynamically calculates the inter-group fusion benefit of candidate function pairs in the function group set based on initial performance scores. Candidate function pairs whose inter-group fusion benefits meet preset conditions are merged to obtain composite function groups, which are then synchronously invoked in the call path. The system verifies whether the resource consumption of the generated composite function groups meets platform constraints, including memory quota limits and cold start time thresholds. If resource consumption exceeds memory quota limits, function group splitting or resource reallocation is triggered. The function grouping strategy is updated based on real-time monitoring data, and an inverse pricing mechanism is used to select the optimal composite function group set that maximizes platform utility for task execution. This system comprehensively considers function call relationships, resource requirements, and communication costs to ensure that computational needs are executed optimally during function fusion, thereby maximizing the utility of the serverless computing platform and improving cloud server resource utilization efficiency and performance. Attached Figure Description

[0051] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 is an exemplary system architecture diagram in which this application can be applied;

[0053] Figure 2 is a flowchart of an embodiment of the task dynamic allocation method for serverless computing of this application;

[0054] Figure 3 is a schematic architecture of a composite function in one embodiment of a task dynamic allocation method for serverless computing according to this application;

[0055] Figure 4 is a schematic diagram of a structure of an embodiment of the task dynamic allocation device for serverless computing according to this application;

[0056] Figure 5 is a schematic diagram of the structure of an embodiment of a computer device according to this application. Detailed Implementation

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0058] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0060] Please refer to Figure 1. As shown in Figure 1, system architecture 100 illustrates a typical event-driven application scenario for serverless computing, aiming to achieve efficient function scheduling and resource optimization through dynamic task allocation. System architecture 100 includes client devices 101, 102, and 103, a network 104, and a serverless computing platform 105. Network 104 serves as the communication medium, supporting event triggering and data interaction between client devices 101, 102, and 103 and the serverless computing platform 105. Network 104 can include various connection types, such as wireless networks (e.g., 5G, Wi-Fi), wired networks, or cloud API gateways.

[0061] In this embodiment, client devices 101, 102, and 103 are terminal devices running serverless applications, such as smartphones, tablets, desktop browsers, or smart wearable devices. These devices send event triggering requests, such as user message sending, status updates, or subscription notifications, to the serverless computing platform 105 via network 104. Based on the dynamic task allocation method provided in this embodiment, the serverless computing platform 105 allocates and executes serverless functions on demand, automatically expands to cope with changes in event load, and feeds back the results to the client devices.

[0062] Taking a specific serverless application as an example, suppose system architecture 100 supports a real-time chat application. Client device 101 (user A's smartphone) sends a new message via network 104, triggering a workflow on serverless computing platform 105. This workflow consists of the following serverless functions:

[0063] Message receiving function: Verifies and parses user messages.

[0064] Content filtering function: checks whether the message content is compliant.

[0065] Notification distribution function: Pushes notifications to message recipients (users B, C, etc.).

[0066] Status update function: Records the message sending status to the database.

[0067] According to the method of the present invention, the serverless computing platform 105 first constructs a directed call graph based on the task execution structure, where nodes represent the aforementioned serverless functions, and edges represent the call relationships and communication costs between functions (such as network latency from message filtering to notification distribution). The platform initializes each function as an independent group, calculates initial performance scores (fusion gain, resource utilization, cold start time constraints), and generates a set of candidate function group pairs. Next, the platform dynamically calculates the fusion benefits between groups. For example, if the communication costs of the content filtering function and the notification distribution function are high and their call frequencies are similar, they are merged into a composite function group to reduce latency. Simultaneously, the platform verifies whether the memory usage and cold start time of the composite function group meet the constraints. If the limits are exceeded (such as memory overflow), function splitting or resource reallocation is triggered. If the number of users in the chat application surges (such as in group chat scenarios), the platform updates the grouping strategy by monitoring data in real time and uses a reverse pricing mechanism to select the optimal set of composite function groups, ensuring high throughput and low latency. Finally, the notification is successfully pushed to the client devices 102 and 103 of users B and C, and the status update is completed.

[0068] It should be noted that the dynamic task allocation method for serverless computing provided in this embodiment is executed by the serverless computing platform 105, and correspondingly, the dynamic task allocation device for serverless computing is deployed in the serverless computing platform 105. The serverless computing platform 105, through an event-driven architecture, starts function instances on demand, eliminating the need for user management of the underlying server, thus fully demonstrating the automatic scaling and pay-as-you-go characteristics of serverless computing. The number of client devices, networks, and the serverless computing platform in Figure 1 is for illustrative purposes only. Depending on actual needs, the system architecture 100 can support any number of client devices and event triggers. For example, client devices 101, 102, and 103 can correspond to different user terminals running chat applications, real-time monitoring systems, or e-commerce promotional notifications.

[0069] It should be understood that the serverless computing platform 105 in this embodiment can be implemented based on existing serverless computing frameworks (such as AWS Lambda, Google Cloud Functions, and Alibaba Cloud Function Compute) or a customized event-driven computing environment. The dynamic allocation method of this embodiment significantly improves the response speed and resource efficiency of serverless applications by optimizing function call paths and resource allocation, and is suitable for various event-driven scenarios.

[0070] It should be noted that the task dynamic allocation method for serverless computing provided in this application embodiment is executed by the server, and correspondingly, the task dynamic allocation device for serverless computing is set in the server.

[0071] It should be understood that the number of terminal devices, networks, and servers in Figure 1 is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included. The terminal devices 101, 102, and 103 in this embodiment can specifically correspond to application systems in actual production.

[0072] Please refer to Figure 2, which illustrates a method for dynamic task allocation in serverless computing provided by an embodiment of the present invention. The method is described in detail below, taking its application to the server in Figure 1 as an example:

[0073] S201: Construct a directed call graph based on the task execution structure. The nodes of the directed call graph represent serverless functions, and the edges of the directed call graph represent the call relationships and communication costs between functions. The node attributes include execution time, memory requirements, call frequency, and cold start time.

[0074] In this embodiment, the execution structure of the serverless application is represented as a directed acyclic graph, serving as a global model that includes a basic set of black-box functions. and their calling relationships These call relationships can be predefined by the developer or extracted from monitoring records of serverless computing platforms (for example, AWS has a third-party component called CloudWatch, which can automatically record function execution logs, and combined with distributed tracing tools (such as AWS X-Ray) to obtain the complete function call chain, it can automatically extract the call relationships of serverless applications and build a directed call graph). Each function Described by several key characteristics, including execution time measured under a reference configuration (single-core vCPU). Peak memory requirements during function execution Call frequency per unit time And the cold start time required to restart after initial execution or instance reclamation. In addition, each calling edge It has data externalization overhead This refers to the additional transmission latency caused by intermediate data access when using a platform-managed memory caching service. A dedicated root node is introduced during modeling. To represent the serverless platform itself, and to configure the connection. ,in This is the application's entry function, used to characterize the initial call rate and input data scale. To optimize function fusion layout and execution, due to the task... Consisting of multiple functions When collaborative tasks are completed, the impact of function call relationships and data transfer costs on overall performance requires the design of a reasonable function fusion scheme to better execute the task.

[0075] The task execution structure is modeled as a directed acyclic graph (DAG), where node attributes include function execution time, memory requirements, call frequency, and cold start time, and edges represent inter-function call relationships and communication costs. When the characteristics of inter-function communication and the task execution requirements are combined into a single execution unit, performance degrades. Conversely, merging multiple functions can reduce the overhead of cross-function calls and improve overall performance.

[0076] Specifically, complex tasks in serverless computing environments are completed collaboratively by multiple fine-grained functions in a specific order, often involving dependencies and resource coordination. Taking real-time video stream processing as an example, the task needs to sequentially call frame segmentation, feature extraction, and encoding / compression functions, forming a linear execution chain, with the output of each function serving as the input to the next. Each function is typically deployed independently and runs in different execution environments; this modular design impacts the task's execution efficiency and communication costs.

[0077] For example, task It consists of several functions, represented as The subscripts indicate the order of functions in the task. Each function has a predefined execution cost, expressed as... To represent this. Furthermore, the communication cost between functions is expressed using... This means that the execution time and communication overhead of each function depend on its deployment environment and resource configuration, such as frame segmentation, feature extraction, and encoding compression functions in video processing.

[0078] In existing methods, each function executes independently, and its output is passed to the next function as input. This data transfer between functions not only increases communication overhead but also introduces additional latency. Function fusion technology combines multiple functions in a task into a larger function based on performance gains. This fusion reduces communication costs and latency. Specifically, by analyzing function execution time and communication costs, it first identifies which function fusions can significantly improve performance and reduce communication costs. Then, according to the task's execution order, these functions are hierarchically combined into a larger processing unit, thereby optimizing the overall task execution flow.

[0079] In this embodiment, a function fusion and workflow execution model is adopted. Task execution can be viewed as the ordered execution of a series of functions with certain dependencies and requiring communication between them during execution. In serverless computing platforms, functions are loosely connected and scheduled through workflow orchestration. However, function fusion technology requires tighter integration between functions to reduce redundant computations and cross-function data transfer during task execution.

[0080] Specifically, function fusion combines multiple independent task requests into a composite function. During execution, the composite function can internally optimize data transmission and the utilization of computing resources. In this process, the communication data format and calling syntax between functions must match to ensure efficient fusion and execution. Furthermore, since each function may be called by multiple preceding functions, these fused function instances need to be managed and optimized. This management process includes implicitly initializing and managing these instances, in addition to the automatic scaling capabilities provided by the serverless computing platform. A schematic architecture of the composite function and its instance management and communication modes are shown in Figure 3. Figure 3 is a schematic architecture of the composite function in one embodiment of a dynamic task allocation method for serverless computing according to this application. In this way, the execution of each function can be finely controlled, which not only reduces the overhead of cold starts but also better utilizes resources in a multi-core environment, ultimately achieving lower execution costs.

[0081] Among them, serverless functions and Communication costs between Its integration benefits Negative correlation, its communication cost is:

[0082] =

[0083] To ensure In between, a normalized benchmark is introduced, and the larger its value, the more significant the benefits of table fusion. This represents the theoretical maximum cost per unit of data transmission (e.g., network latency and serialization overhead). Therefore, the above formula can be equivalently rewritten as:

[0084]

[0085] when and Communication costs between When added, the benefits that can be obtained from their integration Decrease, and vice versa. Furthermore, the dependencies between hypothesis functions are asymmetric, meaning that for all... , ,satisfy:

[0086]

[0087] When tasks in a serverless application From function set Upon completion, its total communication cost is recorded as It can be calculated using the following formula:

[0088] =

[0089] like and Computational tasks and Intralinking is required, therefore the integrated configuration is implemented as follows: Then remove the edge. and Dependencies, adding edges , ( (The original called function). If ,but .

[0090] S202: Initialize each function as an independent group, calculate the initial performance score of each group based on the calling relationship, and generate a set of candidate function pairs based on the initial performance score. The initial performance score includes fusion gain, resource utilization and cold start time constraints.

[0091] Specifically, this embodiment defines the function fusion group selection problem for a task and proves the NP-hardness of the function fusion group selection problem, letting Indicates when the task From function set Upon completion, equals task Execute total fusion benefit minus function set Communication costs related to completing the task and function set The execution cost. The problem can be formally stated as follows:

[0092] -

[0093] in, , For function To carry out the mission The goal of this problem is to select an optimal combination of functions to maximize the execution cost. It also satisfies the following constraints:

[0094] Task assignability constraint: Each task It must be executed by at least one function, that is: .

[0095] Functional coverage constraints: Task All required feature sets It must be determined by the selected function set. supply: , .

[0096] Function fusion constraints include resource constraints and cold start constraints.

[0097] Wherein, the resource constraint is a set of composite functions. Resource consumption must meet platform limitations:

[0098] (Memory Limit)

[0099] (vCPU core count limit)

[0100] Wherein, the cold start constraint is if the composite function group Includes cold start function (Right now If the total cold start time is less than the threshold, then the total cold start time must be less than the threshold.

[0101] .

[0102] S203: Traverse the candidate function pairs in the candidate function pair set, dynamically calculate the inter-pair fusion benefit of the candidate function pairs based on the initial performance score, merge the candidate function pairs whose inter-pair fusion benefits meet the preset conditions to obtain the composite function group, and synchronously call the composite function group in the path.

[0103] Specifically, this embodiment categorizes function calls into synchronous and asynchronous calls, and formulates different fusion strategies for each. In synchronous call paths, the function fusion strategy mainly relies on two key factors: first, evaluating the performance gain after fusion; and second, calculating the resulting communication costs. In synchronous paths, calculating the performance gain aims to reduce remote call overhead and cold start latency. In asynchronous call paths, due to the lower coupling between functions, the fusion benefit is smaller. Therefore, in this case, function splitting or resource adjustment strategies are more effective. Specifically, by dynamically adjusting the splitting or merging of functions based on their resource requirements and call frequency, resource utilization efficiency is improved and response time is reduced. The function fusion benefit is determined by communication strength and resource complementarity, quantified through a dynamic game theory model.

[0104] In a Directed Call Graph In, function and Integration benefits By dynamically balancing communication relevance, resource constraints, and task topology coupling through game theory, it is defined as:

[0105] =

[0106] Among them, communication correlation Table functions and The actual call frequency as a percentage of the global frequency reflects the strength of directed edge communication. In comparison, and The random expected call ratios are respectively , For the purpose of going beyond, , For in-degree. It is the task topology density, representing the function and The density of the relevant subgraphs is calculated through critical path analysis to reflect the coupling relationship between functions.

[0107] In this embodiment, based on the results of the aforementioned function set, the optimal function set is selected to execute a specific computational task, thereby maximizing platform utility. This scheme comprehensively considers function call relationships, resource requirements, and communication costs. While traversing the function set, the optimal function fusion is selected to execute the task based on the call relationships and cost-effectiveness between functions, ensuring that the computational requirements are met and removing redundant functions. Finally, the best function fusion is returned, maximizing the overall platform performance.

[0108] In one specific implementation, step S203, dynamically calculating the inter-group fusion benefit of candidate function pairs based on the initial performance score, includes:

[0109] The modularity incremental method is adopted, based on the calculation of average performance gain, and a dynamic threshold parameter M* is applied to control the merging of similar computational logic functions: when the number of functions of the same type in a group exceeds M*, the calculation of its fusion gain is stopped.

[0110] In all functions A directed call graph has been constructed above, which can be represented as ,in For a set of functions, This refers to the calling relationships between functions. The fusion gain between functions is considered. To minimize cross-function call overhead and improve overall execution performance, both call relevance and computational resource complementarity are taken into account during function fusion. Therefore, the modularity increment method from the FastNewman algorithm is adopted, and the average performance gain is calculated. Simultaneously, to avoid over-merging functions with similar computational logic, a dynamic threshold parameter is introduced. When the number of functions in the computational logic exceeds At this time, the computational gain of this computational logic will no longer be considered. Under a given function call graph, by adjusting... The value of can be used to find the optimal choice that maximizes overall computational efficiency.

[0111] In this embodiment, based on the dynamic threshold parameter, the optimal set of functions is selected in the following manner.

[0112] First, initialize each function as an independent group and construct an initial directed call graph for each function group. Calculate its performance score. The calculation formula is:

[0113]

[0114] During the iteration process, all candidate pairs of functions are traversed ( , ), calculate the fusion benefit between sets of functions to be fused, and calculate the call correlation as follows: When calculating performance gain, let the function set be... The average performance gain for each computational task within the task is During the iteration process, if there is no calling relationship between two function sets, then let the corresponding... If the value is negative infinity, and all computational logic in both function sets has reached a set threshold... The fusion gain is calculated as follows: Otherwise, the fusion gain method is .in This represents the effective gain of each computational task after merging the function sets. When the sum of all function sets... The algorithm terminates when the value is negative infinity; otherwise, it selects... Merge the largest set of function pairs and update the graph; otherwise, terminate. Finally, return the set with the largest set of function pairs. set of values .

[0115] In one specific implementation, in step S203, the composite function group in the synchronous call path includes:

[0116] Identify linear execution chain structures in the task;

[0117] The end-to-end latency reduction after chain function merging is calculated based on the communication cost in the directed call graph. If the communication cost reduction rate exceeds a preset threshold, merging is forced.

[0118] A differentiated strategy is adopted for asynchronous call paths. When the coupling degree is lower than the dynamic threshold parameter M*, function splitting or independent resource allocation is performed.

[0119] Preferably, this embodiment generates a lightweight wrapper for the composite function group. Referring to Figure 3, Figure 3 is a schematic architecture of composite functions in one embodiment of a task dynamic allocation method for serverless computing according to this application. The wrapper preloads initialization data and manages intermediate result caching, and serializes cross-function communication through memory mapping technology. Based on the fusion technology supported by the wrapper, functions are executed according to a predefined call order, starting from the front-end function, forming a lightweight workflow coordination method. This method does not require any on-site decision-making, instance configuration, or internal scheduling logic, implementing a simple and lightweight workflow coordination middleware with predictable resource consumption. By prioritizing the execution of critical functions, the overall execution time can be effectively controlled, and priority planning can be completed during the design phase, enabling the application to meet user-defined latency constraints. Furthermore, reasonable function grouping can avoid call overhead, state externalization, and premature execution of non-critical functions, thereby improving performance.

[0120] In this embodiment, considering the characteristics of serverless computing, the system comprehensively considers function call frequency, resource consumption, cold start overhead, execution latency, and load changes. By evaluating the call relationships and computational logic similarity between functions, and calculating the fusion benefits, it gradually merges function groups that can improve overall performance, thereby reducing communication overhead and scheduling latency across function calls. Simultaneously, a precise performance-cost model is introduced to dynamically guide the update process of the function group set, ensuring that the selected set is optimal.

[0121] To further optimize inter-function communication overhead, this scheme assumes that the wrapper preloads the initialization data of all merged functions and employs efficient data sharing techniques (such as memory mapping) to reduce the serialization and transmission costs of cross-function communication. This method optimizes execution efficiency by reducing remote calls and redundant data loading, while avoiding the additional communication latency caused by on-demand data retrieval. However, this approach increases the cold start overhead and runtime memory requirements of the overall function group.

[0122] In scenarios requiring efficient data exchange, such as large-scale neural network inference, model weights often far exceed platform deployment quotas (e.g., AWS limit of 250MB), necessitating loading via external storage and resulting in significant communication latency. Function fusion can reduce this external data transfer, improving overall task execution efficiency. Furthermore, in serverless environments, optimizing communication costs requires balancing the cost of data transfer with the benefits of fusion strategies to ensure a performance-to-communication cost balance within QoS constraints (such as input processing latency).

[0123] In this embodiment, each assembled function group is expanded into a lightweight wrapper responsible for simulating the API of the front-end function and managing intermediate data transfer during local calls, ensuring efficient data flow during function execution. Simultaneously, this wrapper can utilize the platform's memory storage services to extract and cache sub-results between compound functions, reducing redundant computations and data transfer overhead.

[0124] When multiple functions depend on the computation results of previous functions, the wrapper first checks if there are any cached intermediate results. If there are, it returns the cached results directly; otherwise, it performs the computation and caches the results.

[0125] In addition, the lightweight wrapper also reports function-level metrics to platform monitoring services (such as Amazon Cloud Watch) to support advanced application management and performance optimization.

[0126] In one specific implementation, the method for dynamic task allocation for serverless computing further includes:

[0127] A lightweight wrapper is used to simulate the front-end function API interface, and the syntax of the call relationship is standardized by pre-declared data format;

[0128] The lightweight wrapper integration platform monitors the service interface and reports the memory usage metrics of the composite function group in real time for verification.

[0129] The intermediate result cache is managed using the LRU algorithm, retaining the output data of nodes with high call frequency.

[0130] S204: Verify whether the resource consumption of the generated composite function group meets the platform constraints, including memory quota limits and cold start time thresholds. If the resource consumption exceeds the memory quota limit, trigger function group splitting or resource reallocation.

[0131] The memory quota limit and cold start time threshold can be set according to actual needs.

[0132] In one specific optional implementation, step S204, triggering function group splitting or resource reallocation if resource consumption exceeds the memory quota limit, includes:

[0133] Detect memory overflow events in a group of composite functions and automatically trigger the isolated execution of the sub-functions of the lightweight wrapper.

[0134] When platform deployment quotas change, composite function groups are split in descending order of performance score.

[0135] Add a flag to function groups that frequently time out, and then expand their resource capacity.

[0136] S205: Update the function grouping strategy based on real-time monitoring data, and select the optimal set of composite function groups that maximizes platform utility to execute tasks through a reverse pricing mechanism.

[0137] In one specific optional implementation, step S205, selecting the optimal set of composite functions that maximizes platform utility through a reverse pricing mechanism to perform the task includes:

[0138] Obtain the virtual bid for each serverless function based on its execution time and memory requirements;

[0139] Construct a multi-objective optimization model to minimize communication cost and cold start time constraints;

[0140] Based on virtual bidding, minimizing communication costs, and cold start time constraints, a greedy algorithm is used to approximately solve for the optimal set of fusion benefits in polynomial time, which serves as the optimal set of composite functions.

[0141] Execute tasks based on the optimal set of composite functions.

[0142] Specifically, the goal of this embodiment is to select an optimal set of functions to perform a specific computational task. This maximizes platform utility. The algorithm is based on a reverse pricing mechanism and comprehensively considers function call relationships, resource requirements, and communication costs. The algorithm's input includes a function call graph. The set of functions obtained by Algorithm 1 above The output is the final set of selected functions. First, initialize This is an empty set used to store the final selected set of functions. For each function group... ,initialization This is an empty set used to store the set of functions currently under consideration. Each function... Submit a bid based on its resource requirements and expected execution time. In the iterative loop, the set of function groups is traversed. Each function group in For each function group, if there are still unassigned functions and If not empty, execute the following loop: Initialization This is used to record the maximum efficiency of the current function group and to iterate through the function group. Not assigned to functions in If the function There are calling relationships between it and other functions (i.e.) And calculate the benefits. And update If there is no calling relationship, then... Set to 0, if If the result is still 0, exit the loop. Otherwise, add the function with the highest efficiency to... .

[0143] Next, the function set is evaluated and selected. For each function set... ,if Able to meet the task Computational requirements Iterative deletion The possible redundant functions are counted until no redundant functions exist, and the platform utility formula (6) is calculated. If Unable to meet the task To calculate the requirements, then... Set it to 0. Finally, select the set of functions that produces the greatest platform utility. ,if If it fails, it will return failure; otherwise, it will return failure. Set as and return .

[0144] In summary, by comprehensively considering function call relationships, resource requirements, and communication costs, we can ensure that computational needs are executed in the optimal way during function fusion, thereby maximizing the utility of the serverless computing platform.

[0145] In this embodiment, a directed call graph is constructed based on the task execution structure. Nodes in the directed call graph represent serverless functions, and edges represent the call relationships and communication costs between functions. Node attributes include execution time, memory requirements, call frequency, and cold start time. Each function is initialized as an independent group. Based on the call relationships, an initial performance score is calculated for each group, and a candidate function pair set is generated based on the initial performance scores. The initial performance scores include fusion gain, resource utilization, and cold start time constraints. The candidate function pairs in the candidate function pair set are traversed, and the inter-group fusion benefit of the candidate function pairs is dynamically calculated based on the initial performance scores. Candidate function pairs whose inter-group fusion benefits meet preset conditions are merged to obtain a composite function group, and the composite function group in the call path is synchronized. It is verified whether the resource consumption of the generated composite function group meets platform constraints, including memory quota limits and cold start time thresholds. If resource consumption exceeds the memory quota limit, function group splitting or resource reallocation is triggered. The function grouping strategy is updated based on real-time monitoring data, and the optimal composite function group set that maximizes platform utility is selected for task execution through a reverse pricing mechanism. By comprehensively considering function call relationships, resource requirements, and communication costs, the system ensures that computational needs are executed in the optimal way during function fusion, thereby maximizing the utility of the serverless computing platform and improving the resource utilization efficiency and performance of cloud servers.

[0146] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0147] Figure 4 shows a block diagram of a serverless computing task dynamic allocation device that corresponds one-to-one with the serverless computing task dynamic allocation method described in the above embodiments. As shown in Figure 4, the serverless computing task dynamic allocation device includes a directed graph construction module 31, a performance calculation module 32, a function fusion module 33, a resource monitoring module 34, and a dynamic update module 35. Detailed descriptions of each functional module are as follows:

[0148] The directed graph construction module 31 is used to construct a directed call graph based on the task execution structure. The nodes of the directed call graph represent serverless functions, the edges of the directed call graph represent the call relationship and communication cost between functions, and the node attributes include execution time, memory requirements, call frequency and cold start time.

[0149] The performance calculation module 32 is used to initialize each function as an independent group, calculate the initial performance score of each group based on the calling relationship, and generate a set of candidate function group pairs based on the initial performance score. The initial performance score includes fusion gain, resource utilization and cold start time constraints.

[0150] The function fusion module 33 is used to traverse the candidate function pairs in the candidate function pair set, dynamically calculate the inter-group fusion benefit of the candidate function pairs based on the initial performance score, merge the candidate function pairs whose inter-group fusion benefits meet the preset conditions to obtain the composite function group, and synchronously call the composite function group in the path.

[0151] Resource monitoring module 34 is used to verify whether the resource consumption of the generated composite function group meets the platform constraints, including memory quota limit and cold start time threshold. If the resource consumption exceeds the memory quota limit, the function group will be split or resources will be reallocated.

[0152] The dynamic update module 35 is used to update the function grouping strategy based on real-time monitoring data, and select the optimal set of composite function groups that maximizes platform utility to execute tasks through a reverse pricing mechanism.

[0153] Optionally, the function fusion module 33 includes:

[0154] The structure recognition unit is used to identify the linear execution chain structure in a task.

[0155] The cost calculation unit is used to calculate the end-to-end latency reduction after chain function merging based on the communication cost in the directed call graph. If the communication cost reduction rate exceeds a preset threshold, merging is forced.

[0156] The strategy update unit is used to apply differentiated strategies to asynchronous call paths. When the coupling degree is lower than the dynamic threshold parameter M*, it performs function splitting or independent resource allocation.

[0157] Specific limitations regarding the task dynamic allocation device for serverless computing can be found in the limitations of the task dynamic allocation method for serverless computing described above, and will not be repeated here. Each module in the aforementioned task dynamic allocation device for serverless computing can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0158] To address the aforementioned technical problems, this application also provides a computer device. Please refer to Figure 5 for details; Figure 5 is a basic structural block diagram of the computer device according to this embodiment.

[0159] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components connected to the memory 41, processor 42, and network interface 43 is shown in the figure; however, it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0160] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0161] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or D-interface display memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as program code for a task dynamic allocation method for serverless computing. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0162] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run program code stored in the memory 41 or process data, for example, to run program code for a dynamic task allocation method for serverless computing.

[0163] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0164] This application also provides another embodiment, namely, a computer-readable storage medium storing an interface display program that can be executed by at least one processor to cause the at least one processor to perform the steps of the above-described task dynamic allocation method for serverless computing.

[0165] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0166] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A method for dynamic task allocation in serverless computing, characterized in that, include: A directed call graph is constructed based on the task execution structure. Nodes in the directed call graph represent serverless functions, and edges represent the call relationships and communication costs between functions. Node attributes include execution time, memory requirements, call frequency, and cold start time. Each function is initialized as an independent group. Based on the call relationships, an initial performance score is calculated for each group, and a candidate function pair set is generated based on the initial performance scores. The initial performance scores include fusion gain, resource utilization, and cold start time constraints. The candidate function pairs in the candidate function pair set are traversed, and the inter-group fusion benefit is dynamically calculated based on the initial performance scores. Candidate function pairs whose inter-group fusion benefits meet preset conditions are merged to obtain composite function groups, and the composite function groups in the call path are synchronized. The resource consumption of the generated composite function groups is verified to meet platform constraints, including memory quota limits and cold start time thresholds. If resource consumption exceeds the memory quota limit, function group splitting or resource reallocation is triggered. The function grouping strategy is updated based on real-time monitoring data, and the optimal composite function group set that maximizes platform utility is selected for task execution through a reverse pricing mechanism.

2. The task dynamic allocation method for serverless computing as described in claim 1, characterized in that, The inter-group fusion benefit of dynamically calculating candidate function pairs based on the initial performance score includes: using a modularity increment method, calculating the average performance gain, and applying a dynamic threshold parameter M* to control the merging of functions with similar computational logic functions: when the number of functions of the same type within a group exceeds M*, the calculation of its fusion gain is stopped, and the dynamic threshold parameter M* is a parameter used to control the merging of functions with similar computational logic functions.

3. The task dynamic allocation method for serverless computing as described in claim 1, characterized in that, The composite function group in the synchronous call path includes: identifying the linear execution chain structure in the task; calculating the end-to-end latency reduction after merging the chained functions based on the communication cost in the directed call graph, and forcing the merging if the communication cost reduction rate exceeds a preset threshold; and adopting a differentiated strategy for the asynchronous call path, where the execution function is split or independently allocated when the coupling degree is lower than the dynamic threshold parameter M*.

4. The task dynamic allocation method for serverless computing as described in claim 1, characterized in that, A lightweight wrapper is generated for the composite function group. The wrapper preloads initialization data and manages intermediate result caches, and serialization for cross-function communication is performed through memory mapping technology.

5. The task dynamic allocation method for serverless computing as described in claim 4, characterized in that, The dynamic task allocation method for serverless computing further includes: using the lightweight wrapper to simulate the front-end function API interface, and standardizing the syntax of the call relationship through the pre-declared data format; using the lightweight wrapper to integrate the platform monitoring service interface and report the memory usage indicators of the verified composite function group in real time; and managing the intermediate result cache based on the LRU algorithm to retain the output data of nodes with high call frequency.

6. The task dynamic allocation method for serverless computing as described in claim 4, characterized in that, The step of triggering function group splitting or resource reallocation if resource consumption exceeds memory quota limits includes: detecting memory overflow events of composite function groups and automatically triggering the isolated execution of sub-functions of the lightweight wrapper; splitting composite function groups in descending order of performance score when the platform deployment quota changes; and adding markers to function groups that frequently time out and expanding their resource capacity.

7. The method for dynamic task allocation for serverless computing as described in any one of claims 1 to 6, characterized in that, The step of selecting the optimal set of composite functions to maximize platform utility through the reverse pricing mechanism includes: obtaining the virtual bid proposed by each serverless function based on execution time and memory requirements; constructing a multi-objective optimization model to minimize communication costs and cold start time constraints; based on the virtual bid, minimizing communication costs and cold start time constraints, using a greedy algorithm to approximately solve for the optimal set of fusion benefits in polynomial time, which is then used as the optimal set of composite functions; and executing the task based on the optimal set of composite functions.

8. A dynamic task allocation device for serverless computing, characterized in that, include: A directed graph construction module is used to construct a directed call graph based on the task execution structure. Nodes in the directed call graph represent serverless functions, and edges represent the call relationships and communication costs between functions. Node attributes include execution time, memory requirements, call frequency, and cold start time. A performance calculation module is used to initialize each function as an independent group, calculate the initial performance score for each group based on the call relationships, and generate a candidate function pair set based on the initial performance scores. The initial performance scores include fusion gain, resource utilization, and cold start time constraints. A function fusion module is used to traverse the candidate function pairs in the candidate function pair set. Based on the initial performance score, the inter-group fusion benefit of candidate function pairs is dynamically calculated. Candidate function pairs whose inter-group fusion benefits meet preset conditions are merged to obtain composite function groups, and the composite function groups in the call path are synchronously invoked. The resource monitoring module is used to verify whether the resource consumption of the generated composite function groups meets the platform constraints, including memory quota limits and cold start time thresholds. If the resource consumption exceeds the memory quota limit, function group splitting or resource reallocation is triggered. The dynamic update module is used to update the function grouping strategy according to real-time monitoring data, and select the optimal set of composite function groups that maximizes platform utility to execute tasks through a reverse pricing mechanism.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the dynamic task allocation method for serverless computing as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the dynamic task allocation method for serverless computing as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cold start optimization method, system and equipment for non-inductive framework of server and medium

    CN117931316A

  • Function-as-a-service workflow arrangement method, device, system, equipment and medium

    CN118093063A