Server-free computing-oriented task dynamic allocation method, device and equipment

By building a combination of directed call graphs and dynamic computing functions, combined with lightweight wrapper management, optimizing resource allocation for serverless computing platforms, the problems of low resource utilization and insufficient security in the existing solutions are solved, and more efficient resource utilization and performance improvement are achieved.

CN120448121AActive Publication Date: 2025-08-08湖南工商大学
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510548333.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-08
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

When handling complex call graphs, existing serverless computing solutions have low resource utilization and high communication overhead, making them difficult to adapt to multi-platform and multi-language environments, and lack of security and scalability, resulting in limited system real-time and scalability.

Method used

Build a directed call graph, based on the call relationship between functions and communication costs, dynamically calculate the function combination and generate composite function groups, optimize resource allocation through the reverse pricing mechanism, combine lightweight wrappers to manage intermediate results and communication, and monitor data update strategies in real time.

Benefits of technology

Improve cloud server resource utilization efficiency and performance, reduce communication costs and cold start time, enhance system security and scalability, and adapt to dynamically changing workloads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448121A_ABST
    Figure CN120448121A_ABST
Patent Text Reader

Abstract

The invention discloses a server-free computing-oriented task dynamic allocation method and device, equipment and a medium. The method comprises the following steps of: constructing a directed call graph according to a task execution structure; initializing each function as an independent group, calculating an initial performance score of each group based on the calling relationship, and generating a candidate function group pair set based on the initial performance scores; traversing candidate function group pairs in the candidate function group pair set, dynamically calculating inter-group fusion benefits of the candidate function group pairs based on the initial performance score, and merging the candidate function group pairs of which the inter-group fusion benefits meet a preset condition to obtain a composite function group; verifying whether the resource consumption of the generated composite function group meets the platform constraint or not, and if the resource consumption exceeds the memory quota limit, reallocating the resource; and updating a function grouping strategy according to real-time monitoring data, and selecting an optimal composite function group set for maximizing platform utility through a reverse pricing mechanism to execute a task. According to the invention, the resource utilization efficiency and performance of the cloud server are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud server technology, and in particular to a method, device and apparatus for dynamically allocating tasks for serverless computing. Background Art

[0002] As more and more organizations turn to cloud platforms to deploy serverless applications, this trend mainly benefits from the continuously updated and automatically managed infrastructure, software, and tools provided by cloud service providers. In public cloud environments, serverless computing has been widely used due to its high scalability and on-demand billing model. In recent years, it has made in-depth developments in fields 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 scale to ensure efficient task execution; the on-demand billing model is particularly suitable for applications with large fluctuations in computing demand, which helps to reduce resource costs; cloud service providers are responsible for infrastructure maintenance and upgrades, so developers do not need to manage computing clusters, thereby improving deployment efficiency and lowering technical barriers.

[0003] However, efficiently parallelizing computing tasks (such as multidimensional data processing, streaming computations, or complex business logic) in serverless architectures remains a challenge. The modular design of serverless platforms favors fine-grained function decomposition, which leads to frequent remote calls and high communication overhead, while also increasing computing and storage costs. Therefore, building adaptive strategies that dynamically adjust fusion solutions based on runtime data to improve overall performance and reduce operating costs remains a core issue that needs to be addressed.

[0004] Existing solutions for optimizing serverless computing primarily focus on resource allocation for individual functions. For example, Aquatope employs Bayesian models for QoS-aware resource management and mitigates cold start issues by optimizing container preheating. Astra focuses on autonomous memory configuration for data-intensive FaaS tasks, leveraging graph algorithms to solve constrained shortest path problems and optimizing intermediate data management to ensure execution times meet 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 approach 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. Their research focused on JavaScript applications running on the AWS Lambda platform, analyzing their event-driven execution logic to address the limitations of traditional call graphs in serverless environments.

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

[0007] Czentye et al. proposed a solution for optimizing serverless applications. Using function fusion, they combined basic serverless functions into composite functions to reduce the performance overhead associated with inter-function calls and cold starts. The researchers also developed a cost and performance model that considers parallel execution of function instances and internal state management to achieve more efficient resource allocation and optimization. To address computational complexity, they proposed precise algorithms, heuristics, and approximate methods to provide feasible solutions in practical applications.

[0008] In the process of implementing the present invention, the inventors found that the existing methods have at least the following problems:

[0009] The Aquatope and Astra approaches fail to consider the collaborative optimization between serverless components, resulting in high call overhead and low resource utilization. The Scheuner and Leitner approach has limitations in handling indirect data dependencies, particularly in the case of public variable access. The static analysis of Scheuner et al.'s solution fails to capture dynamic events and state changes at runtime, resulting in inaccurate identification of some interactions. Furthermore, with the increasing complexity of serverless architectures, static analysis faces performance bottlenecks, impacting analysis efficiency. Furthermore, the approach's scalability is limited, making it difficult to adapt to multi-platform and multi-language environments, thus restricting its application in a wider range of scenarios. Methods in the Fusionize framework often ignore memory allocation calculations and rely on strict constraints or greedy decision-making to achieve fast algorithm runtimes and optimize their (re)deployment control flows. Furthermore, the simplified decision-making process may fail to fully consider security, increasing the risk of memory leaks and security vulnerabilities and providing attack points for potential attackers. The solution proposed by Czentye et al. is limited by its reliance on predefined execution models and assumptions, making it difficult to adapt to dynamic and variable workloads in cloud environments. While this approach offers some improvements in optimizing resource allocation and addressing cold start issues, its high computational complexity can affect the scalability and real-time performance of large-scale, complex serverless applications. Therefore, its processing power is insufficient for complex call graphs.

[0010] Based on the above limitations, with the increasing complexity of stateless function calling patterns, the increasing demand for external management of intermediate states, and the adaptation issues of cloud resources in data-intensive applications, how to improve resource utilization efficiency and security when allocating tasks for serverless computing has become a difficult problem that needs to be solved urgently. Summary of the Invention

[0011] Embodiments of the present invention provide a method, apparatus, computer equipment, and storage medium for dynamic task allocation for serverless computing, so as to improve the efficiency of cloud service resource utilization and enhance the performance of cloud servers.

[0012] In order to solve the above technical problems, an embodiment of the present application provides a method for dynamic task allocation for 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 relationships and communication costs between functions. Node attributes include execution time, memory requirements, call frequency, and cold start time.

[0014] Initialize each function as an independent group, calculate the initial performance score of each group based on the call relationship, and generate a set of candidate function group pairs based on the initial performance score, wherein the initial performance score includes fusion gain, resource utilization, and cold start time constraints;

[0015] Traversing the candidate function pairs in the candidate function pair set, dynamically calculating the inter-group fusion benefits of the candidate function pairs based on the initial performance scores, merging the candidate function pairs whose inter-group fusion benefits meet the preset conditions to obtain a composite function group, and synchronously calling 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 limit and cold start time threshold. If the resource consumption exceeds the memory quota limit, the function group splitting or resource reallocation is triggered;

[0017] The function grouping strategy is updated based on real-time monitoring data, and the optimal composite function group set that maximizes the platform utility is selected through the inverse pricing mechanism to execute the task.

[0018] Optionally, the dynamically calculating the inter-group fusion benefits of the candidate function pairs based on the initial performance scores includes:

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

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

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

[0022] Calculate the end-to-end latency reduction after chain function merging based on the communication cost in the directed call graph. Force the merge if the communication cost reduction rate exceeds a preset threshold.

[0023] A differentiation strategy is adopted for asynchronous call paths. When the coupling degree is lower than the dynamic threshold 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 cache, 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 calling relationship is standardized through the pre-declared data format;

[0027] Reporting the memory usage indicator of the verified composite function group in real time through the monitoring service interface of the lightweight wrapper integration platform;

[0028] The intermediate result cache is managed based on the LRU algorithm to retain the output data of nodes with high call frequency.

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

[0030] Detecting a memory overflow event of a composite function group, and automatically triggering the isolated execution of sub-functions of the lightweight wrapper;

[0031] When the platform deployment quota changes, the composite function group is split level by level in descending order of performance score;

[0032] Mark function groups that frequently time out and expand resources.

[0033] Optionally, selecting an optimal composite function set that maximizes platform utility through an inverse pricing mechanism to perform the task includes:

[0034] Get the virtual bid price of each serverless function based on execution time and memory requirements;

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

[0036] Based on the virtual bid, minimizing the communication cost and the cold start time constraint, a greedy algorithm is used to approximately solve the optimal solution set of the fusion benefit in polynomial time as the optimal composite function group set;

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

[0038] In order to solve the above technical problems, the embodiment of the present application further provides a task dynamic allocation device for serverless computing, comprising:

[0039] A directed graph construction module is used to 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. Node attributes include execution time, memory requirements, call frequency, and cold start time.

[0040] a performance calculation module, configured to initialize each function into an independent group, calculate an initial performance score for each group based on the call relationship, and generate a set of candidate function group pairs based on the initial performance score, wherein the initial performance score includes fusion gain, resource utilization, and cold start time constraints;

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

[0042] A 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 splitting or resource reallocation is triggered;

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

[0044] Optionally, the function fusion module includes:

[0045] Structure recognition unit, used to identify the linear execution chain structure in the task;

[0046] A cost calculation unit, configured to calculate the end-to-end delay reduction after chain functions are merged based on the communication cost in the directed call graph, and force merging if the communication cost reduction rate exceeds a preset threshold;

[0047] The strategy update unit is used to adopt a differentiated strategy for the asynchronous call path. When the coupling degree is lower than the dynamic threshold M*, function splitting or independent resource allocation is performed.

[0048] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for dynamic task allocation for serverless computing are implemented.

[0049] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned method for dynamic task allocation for serverless computing.

[0050] The embodiment of the present invention provides a method, apparatus, computer equipment and storage medium for dynamic task allocation for serverless computing. The method constructs a directed call graph based on the task execution structure, wherein the nodes of the directed call graph represent serverless functions, the edges of the directed call graph represent the call relationships and communication costs between functions, and the node attributes include execution time, memory requirements, call frequency and cold start time; initializes each function as an independent group, calculates the initial performance score of each group based on the call relationship, and generates a set of candidate function group pairs based on the initial performance score, wherein the initial performance score includes fusion gain, resource utilization and cold start time constraints; traverses the candidate function group pairs, and generates a set of candidate function group pairs based on the initial performance score. The candidate function pairs in the function pair set are dynamically calculated based on the initial performance scores for the inter-group fusion benefits of the candidate function pairs. The candidate function pairs whose inter-group fusion benefits meet the preset conditions are merged to obtain a composite function group, and the composite function group in the call path is called synchronously. The resource consumption of the generated composite function group is verified to meet the platform constraints, including the memory quota limit and the cold start time threshold. If the resource consumption exceeds the memory quota limit, the 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 the platform utility is selected through the reverse pricing mechanism to execute the task. This achieves a comprehensive consideration of the function call relationship, resource requirements and communication costs, ensuring that the computing requirements are executed in the best way during the function fusion process, thereby maximizing the utility of the serverless computing platform and improving the resource utilization efficiency and performance of the cloud server. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0052] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

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

[0054] Figure 3 This is a schematic architecture of a composite function in an embodiment of a method for dynamic task allocation for serverless computing in the present application;

[0055] Figure 4 1 is a schematic structural diagram of an embodiment of a device for dynamically allocating tasks for serverless computing according to the present application;

[0056] Figure 5It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

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

[0059] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0060] See also Figure 1 ,like Figure 1 As shown, 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, 103, a network 104, and a serverless computing platform 105. Network 104 serves as a communication medium, supporting event triggering and data interaction between client devices 101, 102, 103 and serverless computing platform 105. Network 104 can include multiple connection types, such as wireless networks (such as 5G, Wi-Fi), wired networks, or cloud-based 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-triggered requests, such as user message delivery, status updates, or subscription notifications, to the serverless computing platform 105 via network 104. Based on the dynamic task allocation method provided by the embodiments of the present invention, the serverless computing platform 105 allocates and executes serverless functions on demand, automatically scaling to accommodate changes in event load, and providing feedback to the client devices.

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

[0063] Message receiving function: verify and parse user messages.

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

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

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

[0067] According to 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 (e.g., 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, and cold start time constraints), and generates a set of candidate function group pairs. The platform then dynamically calculates the fusion benefits between groups. For example, if the content filtering function and notification distribution function have high communication costs and similar call frequencies, 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 they exceed the quota (e.g., memory overflow), function splitting or resource reallocation is triggered. If the number of chat application users surges (e.g., in group chat scenarios), the platform updates the grouping strategy based on real-time monitoring data and uses an inverse pricing mechanism to select the optimal set of composite function groups to ensure high throughput and low latency. Finally, the notification is successfully pushed to the client devices 102 and 103 of users B and C, completing the status update.

[0068] It should be noted that the method for dynamic task allocation for serverless computing provided in the embodiments of the present application is executed by the serverless computing platform 105. Accordingly, the apparatus for dynamic task allocation for serverless computing is deployed in the serverless computing platform 105. The serverless computing platform 105 uses an event-driven architecture to launch function instances on demand without requiring users to manage the underlying servers, fully embodying the automatic expansion and pay-per-use features of serverless computing. Figure 1 The number of client devices, networks, and serverless computing platforms shown in the figure is for illustrative purposes only. System architecture 100 can support any number of client devices and event triggers, depending on actual needs. For example, client devices 101, 102, and 103 can correspond to different user terminals running a chat application, a real-time monitoring system, or e-commerce promotion notifications.

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

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

[0071] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only illustrative. According to the implementation requirements, there can be any number of terminal devices, networks and servers. The terminal devices 101, 102, 103 in the embodiment of the present application can specifically correspond to application systems in actual production.

[0072] See also Figure 2 , Figure 2 A method for dynamically allocating tasks for serverless computing provided by an embodiment of the present invention is shown. Figure 1 The server in the example is used as an example, and the details are as follows:

[0073] S201: Construct a directed call graph based on the task execution structure, wherein the nodes of the directed call graph represent serverless functions, the edges of the directed call graph represent the calling relationships and communication costs between functions, and 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 as a global model, which contains a basic black-box function set F and its call relationship E. These call relationships can be predefined by the developer or extracted from the monitoring records of the serverless computing platform (for example, AWS has a third-party component called CloudWatch, which can automatically record function execution logs and use distributed tracing tools (such as AWS X-Ray) to obtain the complete function call chain. The call relationship of the serverless application can be automatically extracted to construct a directed call graph). Each function f∈F is described by multiple key features, including the execution time t measured under the reference configuration (single-core vCPU) f , the peak memory requirement m required during function execution f , the calling frequency per unit time r f , and the cold start time (s) required for restarting after the first execution or after instance recycling f In addition, each call edge e f ∈E has data externalization overhead d f , that is, assuming that the platform-managed memory cache service is used, the additional transmission delay caused by intermediate data access. A dedicated root node is introduced in the modeling To represent the serverless platform itself and set up the connection Where f1 is the entry function of the application, which is used to characterize the initial call rate and input data size. In order to optimize the function fusion layout and execution, since task t i By multiple functions F={f1,f2,…,f n When the functions are completed collaboratively, the calling relationship between functions and the impact of data transmission costs on the overall performance require the design of a reasonable function fusion solution to better execute the task.

[0075] The task execution structure is modeled as a directed acyclic graph (DAG). Node attributes include function execution time, memory requirements, call frequency, and cold start time. Edges represent inter-function call relationships and communication costs. When the inter-function communication characteristics meet the execution requirements of the task, combining them into a single execution unit can lead to performance degradation. Conversely, fusing multiple functions can reduce cross-function call overhead and improve overall performance.

[0076] Specifically, complex tasks in serverless computing environments are completed by multiple fine-grained functions working together in a specific order, often involving dependencies and resource coordination. For example, in real-time video streaming processing, the task requires sequentially calling frame segmentation, feature extraction, and encoding and 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 a different execution environment. This modular design impacts task execution efficiency and communication costs.

[0077] For example, a task T is composed of several functions, which can be expressed as The subscripts represent the order of the functions in the task. Each function has a predefined execution cost, which is expressed as b ,i In addition, the communication cost between functions is expressed as To express, the execution time and communication overhead of each function depends on its deployment environment and resource configuration, for example, frame segmentation, feature extraction, and encoding compression functions in video processing.

[0078] In existing methods, each function is executed separately, and its output is passed to the next function as input. Passing data between functions not only increases communication overhead but also introduces additional latency. Function fusion technology combines multiple functions within a task into a larger function based on performance gains. This fusion not only reduces communication costs between functions but also lowers latency. Specifically, by first analyzing function execution time and communication costs, we identify which functions, if fused, will significantly improve performance and reduce communication costs. Then, based on the order in which tasks are executed, these functions are hierarchically combined into a larger processing unit, thereby optimizing the execution flow of the entire task.

[0079] This embodiment utilizes a function fusion and workflow execution model. Task execution can be viewed as the ordered execution of a series of functions, which have dependencies and need to communicate with each other during execution. In serverless computing platforms, functions are loosely connected and their execution is scheduled through workflow orchestration. However, function fusion technology requires tighter integration between functions to reduce redundant computation and cross-function data transfer during task execution.

[0080] Specifically, function fusion combines multiple independent task requests into a composite function. When executed, the composite function can optimize the data transmission and computing resource utilization internally. During this process, the communication data format and calling syntax between functions must match to ensure that the functions can be efficiently fused and executed. In addition, since each function may be called by multiple predecessor 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. The schematic architecture of the composite function and its instance management and communication mode are shown below. Figure 3 shown. Figure 3 This is a schematic architecture of a composite function in one embodiment of a method for dynamic task allocation for serverless computing in this application. This approach allows for precise control over the execution of each function, reducing cold start overhead and enabling better resource utilization in a multi-core environment, ultimately achieving lower execution costs.

[0081] Among them, the serverless function f i With f j Communication cost between Its fusion benefit B(f i ,f j ) is negatively correlated, and its communication cost is:

[0082]

[0083] In order to ensure that B(f i ,f j )∈(0,1], a normalized benchmark is introduced. The larger its value, the more significant the benefit of fusion. λ represents the theoretical maximum cost per unit data transmission (for example, network latency and serialization overhead). Therefore, the above formula can be equivalently rewritten as:

[0084]

[0085] When f i With f j Communication cost between When the number of benefits from their integration increases, B f i ,f j ) decreases, and vice versa. In addition, it is assumed that the dependencies between functions are asymmetric, that is, for all f i ,f j ∈F, satisfying:

[0086] B(f i ,f j )≠B(f j ,f i )

[0087] When tasks in a serverless application are i By the function set F i When completed, the total communication cost is recorded as It can be calculated as follows:

[0088]

[0089] If f i With f j Computational task t i With t j Need to be inlined, so the fusion configuration is f ij , then remove edge f i With f j Dependency relationship, add edge (f ij , f l ), (f l is the original called function). If |F i |=1, then

[0090] S202: Initialize each function as an independent group, calculate the initial performance score of each group based on the call 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.

[0091] Specifically, this embodiment defines the function fusion group selection problem of the task and proves that the function fusion group selection problem is NP-hard. Let U(t i ,F i ) means that when task t i By the function set F i When completed, U(t i ,F i ) is equal to task t i Perform the total fusion benefit subtraction with the function set F i Communication costs associated with completing tasks and function set F i The problem can be formally stated as follows:

[0092]

[0093] in, b ,i is the function f j To perform the task t i The goal of this problem is to select an optimal function combination to maximize U(t i ,F i ), while satisfying the following constraints:

[0094] Task allocability constraint: Each task t i Must be executed by at least one function, namely: |F i |≥1.

[0095] Functional coverage constraint: Task t i All the features needed G i The function set F must be selected i supply:

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

[0097] Among them, the resource constraints for each composite function group are Resource consumption must meet platform restrictions:

[0098] ∑ f∈G m f ≤M mm(Memory limit)

[0099] (vCPU core number limit)

[0100] Among them, the cold start constraint is that if the composite function group G contains the cold start function f (i.e. s f >0), then its total cold start time must be lower than the threshold:

[0101] ∑ f∈G s f ≤S mm .

[0102] S203: Traverse the candidate function pairs in the candidate function pair set, dynamically calculate the inter-group fusion benefits of the candidate function pairs based on the initial performance scores, 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.

[0103] Specifically, this embodiment divides function calls into two categories: synchronous calls and asynchronous calls, and formulates different fusion strategies for each: in the synchronous call path, the function fusion strategy mainly depends on two key factors: one is to evaluate the performance gain after fusion, and the other is to calculate the communication cost brought about by this. Under the synchronous path, the purpose of calculating the performance gain of fusion is to reduce remote call overhead and cold start delay. In the asynchronous call path, due to the low degree of coupling between functions, the fusion benefit is small. Therefore, in this case, the function splitting or resource adjustment strategy is more effective. Specifically, by dynamically adjusting the splitting or merging of functions according to the resource requirements and call frequency of the function, resource utilization efficiency is improved and response time is reduced. The function fusion benefit is determined by the communication intensity and resource complementarity, and is quantified through a dynamic game model.

[0104] In the DAG directed call graph S = (F, E), function f j With f k The fusion benefit B(f j ,f k ) uses dynamic game to balance communication relevance, resource constraints, and task topology coupling, and is defined as:

[0105]

[0106] Among them, the communication correlation e ,j Table function f j With f k The actual call frequency accounts for the global proportion, reflecting the communication intensity of the directed edge. Compared with this, a j with a k The random expected call ratios are deg + For out-degree, deg - For the entry degree. is the task topology density, representing the function f j With f k The relevant subgraph density is calculated through critical path analysis to reflect the coupling relationship between functions.

[0107] In this embodiment, based on the results of the above function group collection, the optimal function group is selected to perform specific computing tasks, thereby maximizing platform utility. This solution comprehensively considers function call relationships, resource requirements, and communication costs. When traversing the function group, the optimal function fusion is selected based on the calling relationships between functions and cost-effectiveness to execute the task, ensuring that the computing requirements are met and redundant functions are removed. Ultimately, the optimal function fusion is returned to maximize the overall platform efficiency.

[0108] In a specific embodiment, in step S203, dynamically calculating the inter-group fusion benefits of candidate function pairs based on the initial performance scores includes:

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

[0110] A directed call graph is constructed on all functions F, which can be expressed as S = (F, E, B (·, ·)), where F is the function set, E is the call relationship between functions, and B (f k , f j ) is the fusion gain between functions. In order to minimize the cross-function call overhead and improve the overall execution performance, when performing function fusion, the call relevance and the complementarity of computing resources are considered at the same time. For this purpose, the modularity increment method in the FastNewman algorithm is adopted, and the calculation of the average performance gain is introduced. At the same time, in order to avoid excessive merging of functions with similar computing logic, a dynamic threshold parameter is introduced. When the number of functions for computing logic exceeds M * When , the computational gain of the computational logic will no longer be considered. Under a given function call graph, by adjusting M * The value of can be used to find an optimal choice that maximizes the overall computational efficiency.

[0111] In this embodiment, based on the dynamic threshold, the optimal function set 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 G l , calculate its performance score Q j , the calculation formula is:

[0113]

[0114] During the iteration, all candidate pairs of functions (G m , G n ), calculate the fusion benefit between the set of functions to be fused, and the calculation method of its call correlation is When calculating the performance gain, let the average performance gain of each computing task in the function set l be During the iteration process, if there is no calling relationship between the two function sets, then the corresponding Δq is set to negative infinity. If all the calculation logics in the two function sets have reached the set threshold M * , then the fusion gain is calculated as Δq ,n ←(e ,n -a m a n ), otherwise, the fusion gain mode is in Represents the effective gain of each computing task after merging the function sets. When the Δq of all function sets is negative infinity, the algorithm terminates, otherwise the function set with the largest Δq is selected for merging and the graph is updated, otherwise it terminates and finally returns the group set with the largest Q value.

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

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

[0117] Calculate the end-to-end latency reduction after chain function merging based on the communication cost in the directed call graph. Force the merge if the communication cost reduction rate exceeds a preset threshold.

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

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

[0120] This embodiment, targeting the characteristics of serverless computing, comprehensively considers function call frequency, resource consumption, cold start overhead, execution latency, and load variations. By evaluating the calling relationships and computational logic similarity between functions and calculating the fusion benefit, it gradually merges function groups that will improve overall performance, thereby reducing cross-function call communication overhead and scheduling latency. Furthermore, a precise performance-cost model is introduced to dynamically guide the update process of function group sets, ensuring that the selected set is optimal.

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

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

[0123] In this embodiment, each assembled function group is expanded into a lightweight wrapper that simulates the front-end function's API and manages the intermediate data transmission of local calls, ensuring efficient data flow during function execution. Furthermore, this wrapper utilizes the platform's in-memory storage service to extract and cache sub-results between composite functions, reducing repeated computation and data transmission overhead.

[0124] When multiple functions depend on the calculation results of previous functions, the wrapper will first check whether there is a cached intermediate result. If there is a cache, the cached result will be returned directly; if not, the calculation will be performed and the result will be cached.

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

[0126] In a specific embodiment, 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 calling relationship is standardized through the pre-declared data format;

[0128] Through the lightweight wrapper integration platform monitoring service interface, the memory usage indicators of the verified composite function group are reported in real time;

[0129] The intermediate result cache is managed based on the LRU algorithm to retain 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 the memory quota limit and the cold start time threshold. If the resource consumption exceeds the memory quota limit, the function group splitting or resource reallocation is triggered.

[0131] Among them, the memory quota limit and cold start time threshold can be set according to actual needs.

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

[0133] Detect memory overflow events of composite function groups and automatically trigger the isolated execution of sub-functions of lightweight wrappers;

[0134] When the platform deployment quota changes, the composite function group is split level by level in descending order of performance score;

[0135] Mark function groups that frequently time out and expand resources.

[0136] S205: The function grouping strategy is updated according to the real-time monitoring data, and the optimal composite function group set that maximizes the platform utility is selected through the reverse pricing mechanism to execute the task.

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

[0138] Get the virtual bid price of each serverless function based on execution time and memory requirements;

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

[0140] Based on virtual bidding, minimizing communication cost and cold start time constraints, a greedy algorithm is used to approximate the optimal solution set of fusion benefits in polynomial time as the optimal composite function set;

[0141] Execute tasks based on a set of optimal composite function groups.

[0142] Specifically, the goal of this embodiment is to select a set of optimal functions to perform a specific computing task t i , thereby maximizing the platform utility. This algorithm is based on the inverse pricing mechanism and comprehensively considers the calling relationship between functions, resource requirements and communication costs. The input of the algorithm includes the function call graph S = (F, E, B (·, ·)) and the function group set obtained by the above algorithm 1 The output is the final selected function set G i , first, initialize G i is an empty set used to store the final selected function set. Initialize G m is an empty set used to store the set of functions currently being considered. Each function f i Submit a bid b based on its resource requirements and expected execution time ,i In the iterative loop, traverse the function group set G oo Each function group in For each function group, if there are unassigned functions in it and G m When it is not empty, execute the following loop. Initialize ω * =0, used to record the maximum benefit of the current function group and traverse the function group Not assigned to G m The function f in j If the function f j There is a calling relationship between S ,i ≠0) and calculate the benefit ω j And update ω *If there is no call relationship, then j Set to 0, if ω * If it is still 0, exit the loop. Otherwise, add the function with the greatest benefit to F m .

[0143] Next, the function set is evaluated and selected. For each function group If G m Can meet the task i Calculate the demand R and iteratively remove F m The possible redundant functions in the , until no redundant functions exist, and calculate the platform utility formula (6). If G m Unable to meet task t i Calculation requirements, then U(t i ,G m ) is set to 0. Finally, select the function set G that can produce the maximum platform utility m , if U(t i ,G m )≤0, then return failure; otherwise, G i Set to G m and returns G i .

[0144] In summary, by comprehensively considering the calling relationship, resource requirements, and communication costs of functions, we can ensure that computing requirements are executed in the optimal way during the function fusion process, 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, wherein the nodes of the directed call graph represent serverless functions, the edges of the directed call graph represent the call relationships and communication costs between functions, and the node attributes include execution time, memory requirements, call frequency, and cold start time; each function is initialized as an independent group, and based on the call relationship, the initial performance score of each group is calculated, and a set of candidate function group pairs is generated based on the initial performance score, wherein the initial performance score includes fusion gain, resource utilization, and cold start time constraints; the candidate function group pairs in the candidate function group pair set are traversed, and the inter-group fusion benefits of the candidate function group pairs are dynamically calculated based on the initial performance scores. The candidate function group pairs whose inter-group fusion benefits meet the preset conditions are merged to obtain a composite function group, and the composite function groups in the call path are synchronized; the resource consumption of the generated composite function group is verified to meet the platform constraints, including the memory quota limit and the cold start time threshold. If the resource consumption exceeds the memory quota limit, the function group splitting or resource reallocation is triggered; the function grouping strategy is updated according to the real-time monitoring data, and the optimal composite function group set that maximizes the platform utility is selected through the inverse pricing mechanism to execute the task. It comprehensively considers the calling relationship, resource requirements and communication costs of functions, ensures that computing requirements are executed in the optimal way during the function fusion process, thereby maximizing the effectiveness of the serverless computing platform and improving the resource utilization efficiency and performance of cloud servers.

[0146] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean 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 The principle block diagram of the task dynamic allocation device for serverless computing is shown in one-to-one correspondence with the task dynamic allocation method for serverless computing in the above embodiment. Figure 4 As shown, the serverless computing-oriented 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. The functional modules are described in detail as follows:

[0148] A directed graph construction module 31 is configured to construct a directed call graph based on the task execution structure, wherein the nodes of the directed call graph represent serverless functions, the edges of the directed call graph represent the call relationships and communication costs between functions, and the node attributes include execution time, memory requirements, call frequency, and cold start time;

[0149] A performance calculation module 32 is configured to initialize each function into an independent group, calculate an initial performance score for each group based on the call relationship, and generate a set of candidate function group pairs based on the initial performance score, where 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 benefits of the candidate function pairs based on the initial performance scores, 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;

[0151] Resource monitoring module 34, 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, it will trigger the function group splitting or resource reallocation;

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

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

[0154] Structure recognition unit, used to identify the linear execution chain structure in the task;

[0155] A cost calculation unit, configured to calculate the end-to-end delay reduction after chain functions are merged based on the communication cost in the directed call graph, and force merging if the communication cost reduction rate exceeds a preset threshold;

[0156] The strategy update unit is used to adopt a differentiated strategy for the asynchronous call path. When the coupling degree is lower than the dynamic threshold M*, function splitting or independent resource allocation is performed.

[0157] For the specific definition of the task dynamic allocation device for serverless computing, please refer to the definition of the task dynamic allocation method for serverless computing above, which will not be repeated here. The various modules in the above-mentioned task dynamic allocation device for serverless computing can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0158] To solve the above technical problems, the present application also provides a computer device. Figure 5 , Figure 5 This is a basic structural block diagram of the computer device in this embodiment.

[0159] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components connected to the memory 41, the processor 42, and the network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform 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 may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.

[0161] The memory 41 includes at least one type of readable storage medium, including flash memory, a hard disk, a multimedia card, a 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 storage, a magnetic disk, an 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, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the dynamic task 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 are to 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 generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute program code stored in the memory 41 or process data, such as executing program code for a method for dynamic task allocation for serverless computing.

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

[0164] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores an interface display program, and the interface display program can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned method for dynamic task allocation for serverless computing.

[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course 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 the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0166] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.

Claims

1. A method for dynamic task allocation for serverless computing, characterized in that: include: 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 relationships and communication costs between functions. Node attributes include execution time, memory requirements, call frequency, and cold start time. Initialize each function as an independent group, calculate the initial performance score of each group based on the call relationship, and generate a set of candidate function group pairs based on the initial performance score, wherein the initial performance score includes fusion gain, resource utilization, and cold start time constraints; Traversing the candidate function pairs in the candidate function pair set, dynamically calculating the inter-group fusion benefits of the candidate function pairs based on the initial performance scores, merging the candidate function pairs whose inter-group fusion benefits meet the preset conditions to obtain a composite function group, and synchronously calling the composite function group in the path; 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 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 the platform utility is selected through the inverse pricing mechanism to execute the task.

2. The method for dynamic task allocation for serverless computing according to claim 1, wherein: The dynamic calculation of the inter-group fusion benefits of the candidate function pairs based on the initial performance scores includes: The modularity increment method is adopted, based on the calculation of average performance gain, and a dynamic threshold parameter M* is applied to control the merging of functions with similar computational logic: when the number of functions of the same type in a group exceeds M*, the calculation of their fusion gain is stopped.

3. The method for dynamic task allocation for serverless computing according to claim 1, wherein: The composite function group in the synchronous call path includes: Identify the linear execution chain structure in the task; Calculate the end-to-end latency reduction after chain function merging based on the communication cost in the directed call graph. Force the merge if the communication cost reduction rate exceeds a preset threshold. A differentiation strategy is adopted for asynchronous call paths. When the coupling degree is lower than the dynamic threshold M*, function splitting or independent resource allocation is performed.

4. The method for dynamic task allocation for serverless computing according to claim 1, wherein: A lightweight wrapper is generated for the composite function group. The wrapper preloads initialization data and manages intermediate result cache, and serializes cross-function communication through memory mapping technology.

5. The method for dynamic task allocation for serverless computing according to claim 4, wherein: The method for dynamic task allocation for serverless computing further includes: The lightweight wrapper is used to simulate the front-end function API interface and the syntax of the calling relationship is standardized through the pre-declared data format; Reporting the memory usage indicator of the verified composite function group in real time through the monitoring service interface of the lightweight wrapper integration platform; The intermediate result cache is managed based on the LRU algorithm to retain the output data of nodes with high call frequency.

6. The method for dynamic task allocation for serverless computing according to claim 4, wherein: If resource consumption exceeds the memory quota limit, triggering function group splitting or resource reallocation includes: Detecting a memory overflow event of a composite function group, and automatically triggering the isolated execution of sub-functions of the lightweight wrapper; When the platform deployment quota changes, the composite function group is split level by level in descending order of performance score; Mark function groups that frequently time out and expand resources.

7. The method for dynamic task allocation for serverless computing according to any one of claims 1 to 6, characterized in that: The task of selecting the optimal composite function set that maximizes the platform utility through the reverse pricing mechanism includes: Get the virtual bid price of each serverless function based on execution time and memory requirements; Construct a multi-objective optimization model to simultaneously minimize communication cost and cold start time constraints; Based on the virtual bid, minimizing the communication cost and the cold start time constraint, a greedy algorithm is used to approximately solve the optimal solution set of the fusion benefit in polynomial time as the optimal composite function group set; The task is executed based on the optimal set of composite functions.

8. A task dynamic 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. 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. Node attributes include execution time, memory requirements, call frequency, and cold start time. a performance calculation module, configured to initialize each function into an independent group, calculate an initial performance score for each group based on the call relationship, and generate a set of candidate function group pairs based on the initial performance score, wherein the initial performance score includes fusion gain, resource utilization, and cold start time constraints; a function fusion module, configured to traverse the candidate function pairs in the candidate function pair set, dynamically calculate the inter-group fusion benefits of the candidate function pairs based on the initial performance scores, merge the candidate function pairs whose inter-group fusion benefits meet preset conditions to obtain a composite function group, and synchronously call the composite function group in the path; A 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 splitting or resource reallocation is triggered; The dynamic update module is used to update the function grouping strategy based on real-time monitoring data, and select the optimal composite function group set that maximizes the platform utility to execute tasks through the inverse pricing mechanism.

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

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

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

  • Multi-user multi-task scheduling method based on non-service edge computing

    CN119052240A

  • Serverless Workflow Enablement and Execution Platform

    US20230176928A1

  • Efficient serverless resource allocation method and system based on reinforcement learning

    WO2024192952A1