FaaS edge-center deployment decision-making system based on large language model
Through the edge-center FaaS deployment decision system based on a large language model, the problem of lack of intelligence and adaptability of FaaS deployment decisions in the existing technology is solved, and the optimal deployment decisions are made based on complex application characteristics and dynamic system environments are realized, and system performance and resource utilization are improved.
Patent Information
- Application Number
- CN202411893674.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing FaaS deployment systems lack intelligence and adaptability in the edge-center decision-making process, and cannot make optimal deployment decisions based on complex application characteristics and dynamic system environments, resulting in unbalanced resource utilization and performance bottlenecks.
The edge-center FaaS deployment decision system is adopted based on the large language model. The system includes the Serverless application FaaS module feature extractor and the edge-center deployment decision-maker based on the large language model. By automatically extracting the key features of the FaaS module and using the large language model to generate intelligent deployment decisions, combining system state and network conditions for multi-objective optimization.
It significantly improves the intelligence and adaptability of FaaS deployment decisions, can make optimal decisions based on complex application characteristics and dynamic system environments, improves function execution performance, reduces manual intervention, and realizes a continuously optimized decision model.
Smart Images

Figure BDA0005201207320000081 
Figure BDA0005201207320000082 
Figure BDA0005201207320000083
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing and edge computing technology, and in particular to a Function as a Service (FaaS) deployment decision system and method based on a large language model. The system is used to automatically determine whether the FaaS module in a Serverless application should be deployed on an edge device or a central cloud server to optimize system performance and resource utilization. Background Art
[0002] Function as a Service (FaaS), as a core component of the Serverless architecture, has important applications in the fields of cloud computing and edge computing. FaaS allows developers to focus on writing and deploying a single function without having to manage the underlying infrastructure, greatly improving development efficiency and resource utilization. With the rapid development of the Internet of Things and 5G technologies, FaaS is increasingly used in edge computing scenarios, providing a flexible solution for real-time data processing, local intelligent analysis and other needs.
[0003] Currently, there are two main deployment methods for FaaS: central cloud deployment and edge deployment. Central cloud deployment deploys functions in large data centers, using their powerful computing power and abundant resources to process tasks. Edge deployment deploys functions on edge devices close to data sources to reduce latency and data transmission, making it suitable for processing tasks with high real-time requirements. However, these two deployment methods are usually pre-defined and lack the ability to dynamically adjust according to actual application scenarios and system status.
[0004] However, this fixed deployment strategy has obvious limitations. First, it cannot fully consider the dynamic characteristics of applications and the changing system environment, which may lead to uneven resource utilization and performance bottlenecks. Second, as the complexity of applications increases, it becomes increasingly difficult and time-consuming to manually determine the optimal deployment location for each FaaS module. In addition, static deployment strategies are difficult to adapt to real-time changes in factors such as network conditions and computing loads, which may cause system performance degradation and user experience degradation.
[0005] To solve the above problems, some studies have proposed rule-based automatic deployment methods. These methods automatically determine the deployment location of FaaS modules by presetting a series of rules, such as the computational complexity of the function and the size of the data. Although this method improves the flexibility of deployment to a certain extent, it still has limitations. For example, the preset rules are often too simplified to cope with complex and changeable actual scenarios; moreover, the formulation and maintenance of rules require a lot of expertise and manpower investment, and are not easy to expand and update.
[0006] Therefore, there is an urgent need for a more intelligent and adaptive FaaS deployment decision system that can comprehensively consider multi-dimensional factors such as function characteristics, system status, network conditions, etc., and automatically make the best deployment decision. At the same time, the system should have self-learning capabilities and be able to continuously optimize the decision model from historical deployment results. Developing such an intelligent FaaS deployment decision system has become a research hotspot in this field and is of great significance to improving the overall performance and user experience of Serverless applications. Summary of the invention
[0007] The purpose of the present invention is to solve the problem that the existing FaaS deployment system lacks intelligence and adaptability in the edge-to-center decision-making process, especially to solve the problem that it cannot make optimal deployment decisions based on complex application characteristics and dynamic system environments. In addition, the present invention also aims to improve the efficiency and accuracy of FaaS deployment, reduce manual intervention, and achieve a continuously optimized decision-making model.
[0008] To achieve the above objectives, the present invention provides an edge-to-center FaaS deployment decision system based on a large language model, characterized in that it includes a Serverless application FaaS module feature extractor and an edge-to-center deployment decision maker based on a large language model. The system can automatically extract key features of the FaaS module from the YAML configuration file and generate intelligent deployment decisions using the large language model.
[0009] In some embodiments, the system can be integrated with existing Serverless platforms and container orchestration systems to provide developers with end-to-end FaaS deployment optimization services.
[0010] Specifically, the Serverless application FaaS module feature extractor includes a YAML parsing engine and a FaaS feature vector generator. The YAML parsing engine is used to identify and extract key configuration information related to FaaS deployment, while the FaaS feature vector generator generates a feature vector based on this information, including function runtime, memory requirements, timeout settings, and trigger types.
[0011] Furthermore, the system includes a configuration semantic understanding module, which uses a machine learning model to infer the purpose and resource consumption pattern of FaaS functions from feature vectors by learning the relationship between the configuration and actual operation data of deployed FaaS applications, and predict the dynamic characteristics of new applications.
[0012] Preferably, the edge-center deployment decision maker based on the large language model includes a prompt engineering module and a context-aware decision framework. The prompt engineering module converts FaaS features into natural language descriptions that can be understood by the large language model, while the context-aware decision framework integrates environmental factors such as the current system status and network conditions.
[0013] Optionally, the system also includes a multi-round dialogue mechanism for requesting additional information or clarification from the large language model when necessary to improve the accuracy and reliability of decision making.
[0014] In one embodiment, the context-aware decision framework adopts a multi-objective decision-making approach, explicitly pointing out technical and business constraints in prompts, and guiding the large language model to balance multiple objectives.
[0015] In some embodiments, the system includes a decision parsing module for parsing the output of the large language model and converting decision suggestions in natural language form into executable deployment strategies.
[0016] In addition, the present invention may also include a feedback learning module for recording actual deployment effects and for optimizing future decisions, so that the system can continuously learn and improve and improve the quality of long-term decisions.
[0017] In other embodiments, the system may be compatible with a variety of cloud service providers and support cross-platform FaaS deployment decisions.
[0018] In a preferred embodiment, the workflow of this system is as follows: First, the YAML configuration file of the Serverless application is received, and the file is analyzed and key features are extracted through the feature extractor. Then, the features are converted into structured natural language prompts and input into the large language model to obtain deployment suggestions. The system then parses the model output, forms a specific deployment strategy, and instructs the deployment of the FaaS module to the edge or central cloud. Finally, the system records the actual deployment effect for future decision optimization.
[0019] In another preferred embodiment, the system can be used as an independent microservice, integrated with various Serverless platforms and container orchestration systems through APIs to provide scalable intelligent deployment decision services.
[0020] By adopting the above scheme, the present invention has the following beneficial effects: (1) Significantly improves the intelligence and adaptability of FaaS deployment decisions, and can make optimal decisions based on complex application characteristics and dynamic system environments; (2) By properly allocating FaaS modules to the edge or central cloud, the function execution performance is greatly improved. For tasks that require low latency, edge deployment can significantly reduce response time; for computing-intensive tasks, central cloud deployment can provide more powerful computing power, thereby optimizing overall system performance; (3) Significantly reduced manual intervention, improving deployment efficiency and resource utilization; (4) Leveraging the powerful reasoning capabilities of large language models, it can handle complex deployment scenarios and make more accurate and comprehensive decisions; (5) Possessing self-learning capabilities, the decision-making model is continuously optimized through feedback learning modules to improve the quality of long-term decision-making; (6) It provides a flexible integration method that can seamlessly connect with existing Serverless platforms and container orchestration systems, supports multi-cloud environments, and enhances the scalability and adaptability of the system.
[0021] In summary, the present invention provides an innovative FaaS deployment decision-making solution, which not only solves the main problems in the prior art, but also provides an intelligent and adaptive solution for the performance optimization and resource management of Serverless applications. By rationally utilizing edge and central cloud resources, the present invention significantly improves the execution efficiency and user experience of FaaS applications. This invention is of great significance to promoting the integration and development of cloud computing and edge computing technologies, and lays the foundation for a more efficient and flexible distributed computing system in the future. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 This is the architecture diagram of the edge-center FaaS deployment decision system based on the large language model.
[0024] Figure 2 It is a YAML configuration file parsing and feature extraction flow chart.
[0025] Figure 3 It is a decision flowchart of a large language model.
[0026] Figure 4 It is a decision analysis and execution flow chart.
[0027] Figure 5 This is a diagram of the configuration semantic understanding module structure.
[0028] Figure 6 It is the system workflow diagram.
[0029] Figure 7 It is a detailed flowchart of the YAML parsing engine.
[0030] Figure 8 It is a detailed structure diagram of the performance evaluation module.
[0031] Fig. 9It is the structural diagram of the feedback learning module.
[0032] Fig.10 This is the architecture diagram of the model update module.
[0033] Fig.11 It is a diagram of microservice architecture and API gateway.
[0034] Fig.12 It is a system integration and deployment architecture diagram.
[0035] Fig.13 This is a diagram of the cloud-edge hybrid deployment architecture. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] In the description of the present invention, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.
[0038] Example 1: Basic system architecture.
[0039] The present invention provides an edge-to-center FaaS deployment decision system based on a large language model. Its core innovation is to use the powerful reasoning ability of the large language model, combined with the characteristics of FaaS applications and the system environment, to achieve intelligent deployment decisions. Figure 1 As shown in the figure, this system mainly includes the Serverless application FaaS module feature extractor, the edge-center deployment decision maker based on the large language model, the decision execution module and the feedback learning module. These modules work together to form a closed-loop intelligent decision system.
[0040] The main task of the serverless application FaaS module feature extractor is to extract key features from the YAML configuration file of the serverless application. Figure 2As shown in the figure, this component includes a YAML parsing engine and a FaaS feature vector generator. The YAML parsing engine uses a custom syntax analysis algorithm to efficiently identify and extract configuration information related to FaaS deployment. Specifically, the algorithm uses a depth-first search strategy combined with regular expression matching to accurately locate key configuration items. Its time complexity is O(n), where n is the number of lines in the YAML file. The FaaS feature vector generator converts the parsed configuration information into a standardized feature vector, which includes key dimensions such as function runtime, memory requirements, timeout settings, trigger types, estimated execution frequency, and estimated single execution duration. The feature vector is represented by a floating-point array to facilitate subsequent processing of machine learning models.
[0041] The edge-center deployment decision maker based on a large language model is the core innovation of this system. Figure 3 As shown in Figure 1, it includes a prompt engineering module, a context-aware decision framework, and a large language model interface. The prompt engineering module is responsible for converting FaaS feature vectors into structured natural language descriptions. This process uses dynamic template technology to generate optimal prompts based on different feature combinations. For example, for an HTTP-triggered Python function, the generated prompt may include information such as the function's runtime environment, memory requirements, timeout settings, triggering methods, estimated execution frequency, and execution duration, and ask where the function should be deployed considering the characteristics of edge computing and central cloud.
[0042] The context-aware decision framework is another innovation that can dynamically integrate environmental factors such as system status and network conditions. The framework uses a novel multi-objective optimization algorithm that considers key indicators such as latency requirements (L), computing resource utilization (C), network bandwidth consumption (B), and data locality (D). The decision objective function can be expressed as: F=w1L+w2C+w3B+w4D (1) Among them, w i The weight of each indicator can be adjusted dynamically according to the specific application scenario. The large language model interface adopts an asynchronous call mechanism, supports concurrent requests, and improves the system throughput.
[0043] The decision execution module is responsible for parsing the output of the large language model and converting it into specific deployment instructions. This module uses rule-based natural language processing technology to accurately extract key information. For example, for the deployment suggestions and precautions included in the model output, the system can extract core decisions (such as edge deployment) and additional conditions (such as load monitoring requirements).
[0044] The feedback learning module is the key to continuous optimization of the system. It continuously optimizes the decision model by collecting actual deployment effect data, including function execution time, resource utilization, error rate and other indicators. This module uses an online learning algorithm to adjust decision weights in real time to adapt to environmental changes. Experimental results show that through feedback learning, the decision accuracy of the system can be significantly improved as the number of deployments increases, which is better than the traditional rule-based deployment method.
[0045] This embodiment describes the basic architecture and workflow of the system. It should be noted that the design of this system is highly scalable and adaptable, and can be customized and optimized according to specific application scenarios. For example, specific edge computing platform APIs can be integrated, or decision indicators can be expanded to meet different business needs. By leveraging the reasoning capabilities and adaptive learning mechanisms of large language models, this system has achieved significant innovations in the field of FaaS deployment decisions, providing strong support for improving the performance and resource utilization efficiency of Serverless applications.
[0046] Example 2: YAML configuration file parsing and feature extraction.
[0047] This embodiment describes in detail the working principle and implementation method of the feature extractor of the Serverless application FaaS module. Figure 4 As shown in Figure 1, the feature extractor consists of two core components: the YAML parsing engine and the FaaS feature vector generator.
[0048] The YAML parsing engine is the first step in the feature extraction process. Its main task is to identify and extract key configuration information related to FaaS deployment from the YAML configuration file of the Serverless application. The engine uses an innovative custom syntax analysis algorithm that can efficiently process various complex YAML structures. Specifically, the algorithm uses a depth-first search strategy combined with regular expression matching to accurately locate key configuration items.
[0049] The main steps of the algorithm are as follows: (1) Preprocessing: Perform a preliminary scan of the YAML file, remove comments and blank lines, and standardize indentation. (2) Building a tree structure: Building a tree structure representation of YAML based on the indentation level. (3) Key node identification: Use a predefined keyword list to locate FaaS-related nodes in the tree structure. (4) Attribute extraction: For the identified key nodes, extract their relevant attributes and values. (5) Data normalization: Convert the extracted data into a unified format for easy subsequent processing.
[0050] The time complexity of this algorithm is O(n), where n is the number of lines in the YAML file. In practical applications, even for large Serverless applications containing hundreds of function definitions, the parsing process can be completed in milliseconds.
[0051] The FaaS feature vector generator is the second key component of feature extraction. It receives the output of the YAML parsing engine and converts it into a standardized feature vector. The feature vector contains the following key dimensions: Function runtime environment (such as Python version, Node.js version, etc.) Memory requirements (in MB) Timeout setting (in seconds) Trigger type (such as HTTP, scheduled tasks, event-driven, etc.) Estimated execution frequency (based on historical data or configuration inference) Estimate the duration of a single execution (based on function complexity and historical data inference) Function dependencies (such as required libraries or services) Network access mode (such as needing to access external APIs or databases) State management requirements (stateful or stateless) Security requirements (such as required permission levels)
[0052] The feature vector generation process involves a variety of techniques, including data normalization, feature encoding, and feature selection. Data normalization ensures that features of different dimensions are comparable; feature encoding converts categorical variables (such as trigger type) into numerical representations; and feature selection is used to identify the most relevant and influential features to optimize the decision-making process.
[0053] It is worth noting that the feature vector generator does not only rely on static YAML configuration, but can also integrate historical operation data and dynamic monitoring information. This dynamic feature extraction mechanism enables the system to adapt to changes in function behavior and improve the accuracy and adaptability of decision-making.
[0054] The YAML configuration file parsing and feature extraction method in this embodiment is highly efficient. Through optimized algorithm design, it can quickly process the configuration files of large-scale Serverless applications. It is flexible and supports the YAML format of multiple Serverless platforms with good scalability. It is comprehensive and the extracted features cover multiple key aspects that affect FaaS deployment decisions. It is dynamically adaptable and can combine static configuration and dynamic operation data to provide more accurate feature descriptions and other advantages.
[0055] Through this efficient and comprehensive feature extraction method, this system provides a solid data foundation for the subsequent large language model decision-making process, effectively improving the accuracy and reliability of FaaS deployment decisions.
[0056] Embodiment 3: Configuring a semantic understanding module.
[0057] This embodiment describes the design and implementation method of configuring the semantic understanding module. Figure 5 As shown in the figure, this module connects feature extraction and decision generation. Its core task is to infer the purpose and resource consumption pattern of the function from the FaaS feature vector, providing deep semantic information for subsequent deployment decisions.
[0058] The configuration semantic understanding module uses a machine learning model to predict the dynamic characteristics of new applications by learning the relationship between the configuration of deployed FaaS applications and actual running data. The workflow of this module begins with data preprocessing, normalizing and standardizing the input feature vector. i , its standardized formula is: where μ i and σ i are the mean and standard deviation of feature i respectively.
[0059] In the feature enhancement phase, the system constructs new composite features. For example, the computational intensity index CI is calculated using the following formula: The reference value is a constant determined based on system performance.
[0060] The model training phase uses an integrated learning method that combines multiple basic models. Taking random forest as an example, its prediction function is expressed as: Where T is the number of decision trees, f t (x) is the prediction result of the tth decision tree.
[0061] In order to handle the cold start problem in FaaS applications, the system includes a cold start time predictor. Its prediction model is expressed as: T cold =α·S dep +β·C init +γ (5) Where T cold is the predicted cold start time, S dep is the size of the function dependency, C init is an estimate of the initialization complexity, and α, β, and γ are model parameters.
[0062] In terms of uncertainty quantification, the system uses the variance of the integrated model to estimate the confidence of the prediction. Its confidence score C is calculated by the following formula: in is the variance of the prediction results of the ensemble model, Var max is the preset maximum variance threshold.
[0063] The system implements an online learning mechanism and continuously updates the model parameters through the stochastic gradient descent method. For the parameter θ, the update formula is: Where η is the learning rate, L(θ t ) is the loss function under the current parameters.
[0064] The output of the configuration semantic understanding module is a semantically rich function description that contains the original feature vector, inferred high-level features, and corresponding confidence scores. This multi-level semantic representation provides contextual information for subsequent large language model decisions, improving the accuracy and interpretability of decisions.
[0065] Through deep insights, dynamic adaptation, uncertainty quantification, and scalable methods, the system is able to grasp the characteristics and requirements of FaaS functions and lay the foundation for edge-center deployment decisions.
[0066] Example 4: Large language model decision process.
[0067] This embodiment describes in detail the working principle and implementation method of the edge-center deployment decision maker based on a large language model. Figure 6 As shown, the decision maker includes a prompt engineering module, a context-aware decision framework, and a large language model interface. This embodiment is a natural continuation of the previous embodiment, and uses the output of the configuration semantic understanding module as input to generate the final deployment decision.
[0068] The prompt engineering module is the starting point of the decision-making process. Its core task is to convert FaaS feature vectors and semantic information into structured natural language prompts. This process uses dynamic template technology to generate the best prompts based on different feature combinations. Figure 7 As shown, the prompt generation process includes the following steps: (1) Feature selection: Based on the information gain principle, the most relevant features are selected from the input feature set. (2) Template matching: Based on the selected features, the best matching basic template is selected from the predefined template library. (3) Dynamic filling: Fill the feature values and semantic information into the template to generate preliminary prompts. (4) Context enhancement: Incorporating environmental factors such as system status and network conditions to enrich the contextual information of prompts. (5) Prompt optimization: Apply heuristic rules to fine-tune prompts to maximize the understanding and response quality of the large language model.
[0069] The quality of prompts directly affects the accuracy of decision making, so a prompt quality evaluation mechanism is introduced. The prompt quality score Q is defined as: Q=w1·C+w2·R+w3·S (8) Where C stands for completeness, R stands for relevance, S stands for specificity, and w i is the weight coefficient.
[0070] The context-aware decision framework is one of the core innovations of this system. It uses a multi-objective optimization algorithm to comprehensively consider factors such as latency requirements (L), computing resource utilization (U), network bandwidth consumption (B), and data locality (D). The decision objective function is defined as: F=αL+βU+γB+δD (9) Among them, α, β, γ, and δ are dynamically adjusted weight coefficients, which are updated as the environment changes. The weight update adopts the gradient descent method with adaptive learning rate: η t is the adaptive learning rate, calculated by the exponential moving average method:
[0071] The large language model interface uses an asynchronous call mechanism and supports concurrent request processing. The interface design takes into account several key points, including load balancing, using a consistent hashing algorithm to distribute requests to ensure balanced loads on multiple model instances; timeout processing, setting a dynamic timeout threshold to prevent a single request from blocking the entire system; error retry, implementing an exponential backoff algorithm, and intelligently handling temporary failures; result caching, caching recent decision results for similar inputs to improve response speed, etc.
[0072] In order to improve the robustness of decision making, the system implements a multi-model integration mechanism. Define the integrated decision function D: Among them, M i (x) is the output of the ith model, w i is the corresponding weight, and N is the total number of models. i Dynamically adjust through online learning algorithms to adapt to different scenarios.
[0073] The outputs of the decision-making process include: deployment location recommendations (edge / central cloud), confidence scores, decision rationales, and resource allocation recommendations.
[0074] The system also implements a decision explanation generator, which converts the output of a large language model into structured decision descriptions, enhancing the explainability and traceability of the decision.
[0075] The large language model decision process in this embodiment has the following innovations and advantages: (1) Dynamic prompt generation technology improves the efficiency and accuracy of interacting with large language models. (2) The multi-objective optimization algorithm achieves the balance and trade-off of multiple decision-making factors. (3) The asynchronous concurrent processing mechanism greatly improves the system throughput. (4) Multi-model integration and online learning improve the stability and adaptability of decision-making.
[0076] Through this advanced decision-making method, the system can make intelligent edge-center deployment decisions based on the characteristics of FaaS functions and the real-time environment, significantly improving the performance and resource utilization efficiency of Serverless applications.
[0077] The method of this embodiment is not only applicable to FaaS deployment scenarios, but can also be extended to other cloud computing fields that require complex decisions, such as container orchestration, load balancing, etc. Future research directions include introducing reinforcement learning to optimize long-term decision-making strategies, and exploring federated learning technology to utilize multi-party data while protecting privacy.
[0078] Embodiment 5: Decision analysis and execution module.
[0079] This embodiment describes in detail the design and implementation methods of the decision analysis and execution modules. Figure 8 As shown, this module is the last key link of the entire system, responsible for converting the output of the large language model into specific executable deployment instructions. This embodiment is closely related to the previous embodiment, taking the output of the large language model decision process as input, and finally generating and executing the deployment action.
[0080] The core functions of the decision analysis and execution module include decision content analysis, deployment strategy generation, resource allocation optimization, and deployment instruction execution. Fig. 9 The internal structure and data flow of the module are shown. Decision content parsing is the process of converting the natural language output of a large language model into structured data. The process uses a combination of rule-based and machine learning methods, including text preprocessing, key information extraction, semantic relationship analysis, and structured conversion. To improve parsing accuracy, a sequence-to-sequence (Seq2Seq) model based on an attention mechanism is introduced. The objective function of the model is defined as: Where x is the input sequence, y is the output sequence, θ is the model parameter, and T is the sequence length.
[0081] The deployment strategy generation module converts the parsed structured data into a specific deployment strategy. This process takes into account factors such as deployment location, resource allocation, network configuration, scaling strategy, fault tolerance and backup mechanism. Strategy generation uses a combination of rule-based expert system and reinforcement learning. The state space of the reinforcement learning model includes the current system load, network status, etc.; the action space includes possible deployment operations; and the reward function is defined based on the performance indicators after deployment. The policy function π is defined as: π(a|s)=P(A t =a|S t =s) (14) Among them A t is the action at time t, S t is the state at time t.
[0082] The resource allocation optimization module uses the mixed integer programming (MIP) method to optimize resource allocation. The objective function is defined as: subject to: Where N is the number of functions, M is the number of available nodes, K is the number of resource types, and c ij is the deployment cost, x ij is the decision variable, r ik is the resource requirement, C jk It is the resource capacity.
[0083] The deployment instruction execution module is responsible for converting the generated deployment strategy into actual system operations. This module implements an abstraction layer that can adapt to different cloud platforms and edge devices. The core components include instruction converter, execution scheduler, status monitor, and rollback mechanism. The execution schedule uses a directed acyclic graph (DAG) to represent task dependencies and uses a topological sorting algorithm to determine the execution order. The task completion time T is defined as: Where V is the set of tasks, t v is the execution time of task v, and pred(v) is the set of predecessor tasks of v.
[0084] The innovation of this embodiment is mainly reflected in the introduction of the Seq2Seq model based on the attention mechanism, which improves the accuracy and robustness of decision analysis; combines expert systems and reinforcement learning to achieve adaptive deployment strategy generation; adopts mixed integer programming methods to optimize resource allocation efficiency; and designs a flexible abstraction layer to support unified management of multi-cloud and edge environments. Through these innovations, this module can efficiently and accurately convert the decisions of large language models into actual deployment actions, significantly improving the overall performance and reliability of the system.
[0085] The method of this embodiment is not only applicable to FaaS deployment scenarios, but can also be extended to the deployment and management of other cloud-native applications. Future research directions include introducing federated learning technology, optimizing cross-organizational resource allocation while protecting privacy, and exploring decentralized deployment coordination mechanisms based on blockchain. These potential extensions and improvements will further enhance the adaptability and scalability of the system and provide solutions for a wider range of cloud computing and edge computing application scenarios.
[0086] Embodiment 6: Feedback learning module.
[0087] This embodiment describes in detail the design and implementation of the feedback learning module. Fig.10 As shown, this module is a key component for continuous optimization of the system. By collecting actual deployment effect data, the decision model is continuously optimized. The feedback learning module is closely connected with the aforementioned embodiments, especially forming a closed loop with the large language model decision process and decision parsing execution module to achieve adaptive optimization of the system.
[0088] The core functions of the feedback learning module include data collection, performance evaluation, model updating, and knowledge distillation. Fig.11 The internal structure and data flow of the module are shown. The data collection process involves indicators in multiple dimensions, including function execution time, resource utilization, error rate, network latency, etc. These data are collected in real time through a distributed log system and stored in a time series database to ensure efficient data reading, writing, and query performance.
[0089] The performance evaluation phase adopts a multi-index weighted scoring mechanism. The comprehensive performance score S is defined as: Where N is the number of indicators, w i is the weight of each indicator, f i is the normalization function, x i is the original indicator value. Weight w i Dynamic adjustment is made through adaptive algorithms to reflect the relative importance of indicators in different scenarios.
[0090] Model updating is the core step of feedback learning. This system uses an online learning algorithm that can adjust decision weights in real time to adapt to environmental changes. The loss function L(θ) is defined as: Where m is the number of samples, l is the single sample loss function, and y i is the true label, f(x i ; θ) is the model prediction, R(θ) is the regularization term, and λ is the regularization coefficient. The model parameters are updated using the stochastic gradient descent method: Where η is the learning rate, which is adaptively adjusted by the Adam optimizer.
[0091] Knowledge distillation technology is an innovation of this module, which is used to transfer the learned knowledge from complex models to lightweight models to adapt to the computing constraints of edge devices. Define the distillation loss function L D for: Where T is the temperature parameter, KL is the KL divergence, σ is the softmax function, and z t and z s are the output logits of the teacher model and the student model respectively, CE is the cross entropy loss, and α is the balancing factor.
[0092] The feedback learning module also implements an anomaly detection mechanism to identify and handle abnormal deployment behaviors. The isolation forest algorithm is used, and its anomaly score is defined as: where h(x) is the path length of sample x, E(h(x)) is the expected path length, and c(n) is the normalization factor for the number of samples n.
[0093] The innovations of this embodiment are mainly reflected in: (1) A multi-dimensional, real-time performance data collection mechanism was designed to provide a basis for accurate evaluation. (2) A multi-index scoring system with adaptive weights can flexibly respond to different deployment scenarios. (3) An online learning algorithm is implemented, which enables the model to be continuously optimized and adapt to environmental changes. (4) The introduction of knowledge distillation technology solves the problem of limited computing resources of edge devices. (5) Anomaly detection mechanism is integrated to improve the robustness and reliability of the system.
[0094] Through these innovations, the feedback learning module can continuously optimize the system's decision-making capabilities, improve deployment efficiency and resource utilization. Experimental results show that after feedback learning optimization, the system has significantly improved key indicators such as response time, resource utilization and error rate.
[0095] The method of this embodiment is not only applicable to FaaS deployment optimization, but can also be extended to other cloud computing and edge computing scenarios that require continuous optimization. Future research directions include introducing meta-learning technology to improve the model's ability to quickly adapt to new tasks, and exploring multi-agent reinforcement learning to achieve more complex distributed decision optimization. These potential extensions will further enhance the system's learning ability and adaptability, and provide solutions for a wider range of intelligent operations and resource management.
[0096] Example 7: System Integration and Deployment
[0097] This embodiment describes in detail the integration and deployment method of the edge-center FaaS deployment decision system based on a large language model. Fig.12 As shown, this embodiment shows how to integrate all the aforementioned modules into a complete system and deploy it in an actual cloud-edge environment. This embodiment is a comprehensive application of all the previous embodiments, showing the overall architecture and workflow of the system.
[0098] The system integration adopts microservice architecture, and each core module is encapsulated as an independent microservice. This design improves the scalability and flexibility of the system. Fig.13 The detailed design of the microservice architecture is presented. The system is encapsulated using container technology and orchestrated and managed using Kubernetes. To ensure efficient communication between microservices, the system implements a gRPC-based inter-service communication protocol.
[0099] The system deployment adopts a hybrid cloud-edge architecture. The core decision engine is deployed in the central cloud to utilize its powerful computing resources; while the lightweight decision execution module and some pre-processing components are deployed in the edge nodes to reduce latency and improve response speed. In order to deal with network instability in the cloud-edge environment, the system implements an asynchronous communication mechanism based on message queues. Apache Kafka is used as the message middleware to ensure the reliability and consistency of data transmission.
[0100] In order to adapt to different cloud platforms and edge devices, the system designs an abstract adaptation layer. This adaptation layer defines a unified interface for resource management, function deployment, and performance monitoring. The following is the core interface definition of the adaptation layer: public interface CloudProvider{ String deployFunction(FunctionSpec spec); void deleteFunction(String functionId); PerformanceMetrics getMetrics(String functionId); Map<String,String> getAvailableResources(); } public interface EdgeDevice { boolean deployFunction(FunctionSpec spec); void stopFunction(String functionId); PerformanceMetrics collectMetrics(String functionId); DeviceStatus getStatus(); }
[0101] The security and privacy protection of the system is another important consideration. The OAuth 2.0-based authentication and authorization mechanism is implemented to ensure that only authorized users and services can access system resources. At the same time, all data transmission is encrypted via TLS to protect sensitive information from being stolen.
[0102] In order to improve the observability and maintainability of the system, a distributed tracing and log aggregation system is integrated. Jaeger is used for distributed tracing, and the ELK stack (Elasticsearch, Logstash, Kibana) is used for log management and analysis. These tools help operation and maintenance personnel quickly locate and solve system problems.
[0103] The innovations of this embodiment are mainly reflected in: (1) The use of microservice architecture and container technology improves the scalability and deployment flexibility of the system. (2) A cloud-edge hybrid deployment model is designed to fully utilize the computing power of the cloud and the low latency characteristics of the edge. (3) A unified abstract adaptation layer is implemented, enabling the system to adapt to different cloud platforms and edge devices. (4) Integrates advanced security mechanisms and observability tools to improve the security and maintainability of the system.
[0104] Through these innovations, the system implements a highly flexible, secure and reliable deployment architecture that can adapt to various complex cloud-edge computing environments. Actual deployment tests show that the system can effectively manage and optimize the deployment of large-scale FaaS applications, significantly improving resource utilization efficiency and application performance.
[0105] The method of this embodiment is not only applicable to FaaS deployment scenarios, but can also be extended to the management and optimization of other cloud-native applications. Future research directions include exploring decentralized deployment coordination mechanisms based on blockchain and developing smarter adaptive deployment strategies to cope with dynamically changing network and computing environments. These potential extensions will further enhance the adaptability and autonomy of the system and provide a solid foundation for future intelligent cloud-edge collaborative computing.
Claims
1. An edge-to-center FaaS deployment decision system based on a large language model, characterized in that: include: a) Serverless application FaaS module feature extractor, used to extract key features of FaaS modules from the YAML configuration files of Serverless applications; b) An edge-center deployment decider based on a large language model, which is used to utilize the key features of the FaaS module to generate edge or center deployment decisions through a large language model.
2. The system according to claim 1, characterized in that The Serverless application FaaS module feature extractor includes: a) A YAML parsing engine to identify and extract key configuration information related to FaaS deployment; b) A FaaS feature vector generator, used to generate a feature vector including function runtime, memory requirements, timeout settings, and trigger types based on the key configuration information.
3. The system according to claim 2, characterized in that It also includes configuring a semantic understanding module for inferring the purpose and resource consumption pattern of the FaaS function from the feature vector.
4. The system according to claim 3, characterized in that The configuration semantic understanding module uses a machine learning model to predict the dynamic characteristics of new applications by learning the relationship between the configuration of deployed FaaS applications and actual running data.
5. The system according to claim 1, characterized in that The edge-center deployment decision maker based on the large language model includes: a) Prompt Engineering module, which is used to convert FaaS features into natural language descriptions that can be understood by large language models; b) A context-aware decision framework that integrates environmental factors such as the current system status and network conditions.
6. The system according to claim 5, characterized in that A multi-turn dialogue mechanism is also included for requesting additional information or clarification from the large language model when needed.
7. The system according to claim 5, characterized in that The context-aware decision framework adopts a multi-objective decision-making approach, explicitly pointing out technical and business constraints in prompts, and guiding the large language model to balance multiple objectives.
8. The system according to claim 1, characterized in that It also includes a decision parsing module, which is used to parse the output of large language models and form specific deployment strategies.
9. The system according to claim 1, characterized in that It also includes a feedback learning module to record actual deployment effects and optimize future decisions.
10. A FaaS deployment decision method using the system according to any one of claims 1 to 9, characterized in that: The following steps are involved: a) Receive the YAML configuration file of the Serverless application; b) Analyze the YAML file through the Serverless application FaaS module feature extractor to extract key features; c) converting the extracted features into structured natural language prompts; d) Input the generated prompts into the large language model to obtain deployment suggestions; e) Analyze the output of the large language model and form a specific deployment strategy; f) Based on the parsed decision, instruct to deploy the FaaS module to the edge or central cloud; g) Record actual deployment results for optimization of future decisions.
Citation Information
Cited By
Resource arrangement and automatic execution method and system based on hybrid cloud architecture
CN120416294A
Architecture intelligent deployment system and method based on large language model
CN120723253A
An intelligent deployment system and method based on a large language model
CN120723253B