Service migration and resource optimization method based on imitation learning
Through the service migration and resource optimization method based on imitation learning, combined with the generative diffusion model, the problem of limited edge network resources is solved, the collaborative allocation of edge cloud resources and service migration scheduling are realized, and the throughput rate and processing efficiency of edge computing are improved. , which meets the needs of heterogeneous resources.
Patent Information
- Application Number
- CN202410801788.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-27
AI Technical Summary
Edge network resources are limited and difficult to meet the huge demand for computing and storage resources. Moreover, the Kubernetes framework has insufficient adaptability to edge networks and cannot effectively solve the problems of service migration and resource scheduling.
Using service migration and resource optimization methods based on imitation learning, through iterative training of expert models and agent models, combined with the generative diffusion model, the collaborative allocation of edge cloud resources and service migration scheduling are realized, and the processing method of services at the edge and cloud is optimized. Meet heterogeneous resource needs.
It achieves long-term maximum throughput and minimized latency of service clusters under the Kubernetes framework, improves edge computing resource utilization and service processing efficiency, and relieves network load pressure.
Smart Images

Figure CN118708343A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of edge networks, and in particular to a service migration and resource optimization method based on imitation learning. Background Art
[0002] With the rapid increase in the scale of users and the development of new applications, the contradiction between heavy load pressure and good network performance has become increasingly prominent, and computing and data processing have gradually shifted to the edge of the network. However, the limited resources of the edge network can hardly meet the huge demand for computing and storage resources for task processing, and the management and resource allocation of edge nodes are also a difficult problem that needs to be solved urgently. The Kubernetes framework for deploying and orchestrating containers provides a new idea for solving the above problems. In order to improve the adaptability of the Kubernetes framework to the edge network, meet the service's demand for heterogeneous resources, and solve the problem of limited model training samples, the present invention proposes a distributed service migration architecture with multi-user access and designs a Kubernetes edge cloud resource scheduler based on imitation learning and diffusion models. Summary of the invention
[0003] The purpose of the present invention is to provide a service migration and resource optimization method based on imitation learning. Under the edge cloud computing framework, containerization technology and imitation learning algorithms are used to solve the problem of collaborative allocation of edge cloud resources with limited training samples and service migration scheduling. By considering the use of computing and storage resources on the edge side, the service requests from users are decomposed and migrated based on the network conditions of the edge network and the cloud center and the performance requirements of the service. A distributed service migration architecture with multi-user access and an edge-cloud collaborative service migration mechanism are proposed, which maximizes the long-term maximum service throughput of the service cluster under the Kubernetes framework and minimizes the service processing delay.
[0004] To achieve the above object, the present invention provides a service migration and resource optimization method based on imitation learning, including an expert model and an agent model.
[0005] The expert model observes the network status and service requirements and makes decisions based on the decision goals to obtain the expert data set;
[0006] Pre-train the proxy model based on the expert data set in the cloud center. After training, place the proxy model in the edge network for decision-making applications and collect decision-related data to generate a proxy data set.
[0007] The proxy data set is input into the expert model, and the expert model makes a decision based on the proxy data set according to the decision target. A new expert data set is obtained and input into the proxy model, and the proxy model is updated by retraining with the new expert data set.
[0008] The above process is a cycle. At the end of each cycle, the optimal decision model under the current network conditions can be obtained. The decision model is updated through iterative cycles to adapt to the dynamic changes of the network.
[0009] Leverage updated decision models to complete service migration and resource optimization.
[0010] Preferably, the decision goal is to maximize the long-term average throughput and minimize the long-term average service processing delay. Through reasonable simplification, it is converted to minimize the task execution delay in the unit time slot and maximize the device throughput in the unit time slot. Based on the function properties and the contradiction proof, it can be obtained that when the absolute value of the delay of the migration processing part and the delay of the non-migrated processing part is the smallest, the total task processing delay is the smallest. At the same time, the delay limit of task processing needs to be met. The optimization formula is converted to:
[0011]
[0012] In the formula, For node E j Processing of un-migrated services' i (t) service processing delay, To process the migration of some services on cloud node C" i (t) service processing delay, s i is the service submitted by the user, S is the set of pending services submitted by the user, For delay limitation.
[0013] Preferably, at node E j Processing of un-migrated services' i The service processing delay of (t) is
[0014]
[0015] In the formula, Processing delay for services, Represents node E j Assigned to service s' i The calculation formula of (t) is:
[0016]
[0017] In the formula, μ i (t) is the service migration rate;
[0018] The image pulling delay includes download delay and waiting delay.
[0019]
[0020] In the formula, For mirroring requirements, is the download rate, The waiting delay for a node to process a transmission request;
[0021] Process the migration of some services on cloud node C" i (t) Service processing delay Data transmission delay and service processing latency When transmitting data, a transmission request needs to be submitted, so it also includes the waiting delay of the node processing the transmission request. By default, the cloud center caches all data packets, so there is no data packet acquisition delay.
[0022]
[0023] Among them, v jc Represents node E j The transmission rate between the cloud center node C, Indicates that the cloud center node C is assigned to service S" i (t) computing resources, Indicates the data size, Indicates computational requirements.
[0024] Preferably, the migration of services to the cloud server processing needs to be based on the service migration rate, and the lower bound of the service migration rate is:
[0025]
[0026] The upper bound of the service migration rate is:
[0027]
[0028] The best service migration rates are:
[0029]
[0030] Therefore, the service migration rate calculation formula is:
[0031]
[0032] Preferably, the service queue S(t) and the device queue E(t) are input into the expert model, and for each service s i (t) For all devices j (t) Traverse and calculate the task migration rate and service processing revenue R ij (t), select the decision with the largest service processing benefit from all decisions as the optimal offloading decision v for the service i (t);
[0033] After the traversal is completed, the optimal unloading decision of the service is made Optimal processing decisions with equipment Matching is performed. If the match is successful, the service is offloaded to the corresponding device for processing. Otherwise, the optimal offloading decision and the optimal processing decision are adjusted and re-matched until the match is successful. After all service decisions are completed, the expert dataset Γ(t) is output.
[0034] Preferably, the proxy model is pre-trained based on the expert data set in the cloud center, and after the training is completed, the proxy model is placed in the edge network, and the proxy model outputs the proxy data set; the proxy data set is input into the expert model, and a new expert data set is output, and the proxy model is updated by retraining with the new expert data set, specifically
[0035] The training part includes a strategy generator G and a strategy discriminator D. Given the discriminator D, the generator G learns the strategy network through reinforcement learning, and calculates the reward function through D to judge the similarity between the training samples and the expert samples, and optimizes the generator G. Given the generator G, the discriminator D uses the expert data as positive samples and the training data generated by the generator G as negative samples to determine the similarity between the two. The generator G and the discriminator D compete with each other to improve.
[0036] Preferably, the discriminator D is a binary classifier, and the loss function is defined as:
[0037]
[0038] Among them, ω i is the sample label, the positive sample label is 1, and the negative sample label is 0; p i is the probability that training sample i is predicted as a positive sample, and N is the number of samples.
[0039] Preferably, a generative diffusion model is introduced into the generator G. The generator G observes the current network environment, finds the optimal strategy in the expert data set, generates Gaussian noise at regular time slots t during the forward propagation process, adds it to the optimal strategy, predicts the noise based on the optimal strategy, calculates the loss function and updates the network. The noise generation formula is:
[0040]
[0041] Among them, A t is the strategy after adding noise, A e is the optimal strategy, δ is the randomly generated noise, τ i is the variance of the noise, and the loss function is:
[0042] L(θ)=E[||AA τ || 2 ]
[0043] In the formula, A is the predicted strategy, A τ is the actual strategy after adding noise, and E is the mathematical expectation.
[0044] Preferably, the game improvement process of the generator G and the discriminator D is modeled as a maximum-minimum optimization, and the optimization goal is:
[0045]
[0046] In the formula, D(x) is the probability that the discriminator determines that X is a positive sample, is the expectation of log D(x), The expectation that the policy generated by the generator is positive.
[0047] Preferably, the decision model is used to complete service migration and resource optimization in three steps: input-execution-output;
[0048] Input: Service processing requires input of service data and the image required for processing the service. When the edge node does not cache the required image, it pulls the image resource from the network and then processes the service.
[0049] Execution: The master node calculates the service migration rate μ i (t)∈[0,1] decomposes services and assigns task processing nodes,
[0050] μ i (t) = 0, the service is processed at the edge node; μ i (t) = 1, the service is processed in the cloud node; 0 < μ i (t)<1, the migrated part is processed in the cloud node, and the non-migrated part is processed in the edge node;
[0051] Output: After both the migrated and non-migrated services are processed, the processing results are transmitted back to the user end to complete the service processing.
[0052] Therefore, the present invention adopts the above-mentioned service migration and resource optimization method based on imitation learning, and the technical effects are as follows:
[0053] (1) In order to alleviate network load pressure and meet high service quality requirements, data computing and request processing are gradually migrated to the edge of the network, shortening the distance between the processing location and the end user and improving service processing efficiency. However, the resources of the edge network are limited, and node management and resource allocation problems are difficult to solve. Containerization technology provides a new perspective for solving resource management and scheduling problems in edge computing. As a container orchestration and deployment platform, Kubernetes has to improve its adaptability and flexibility to the edge network, meet the service's demand for heterogeneous resources, and solve the contradiction between the training sample size and the decision model performance. These problems need to be solved urgently.
[0054] (2) The present invention implements a Kubernetes edge-cloud resource scheduler based on imitation learning. The scheduler decomposes and migrates user-generated services according to the network advantages and service requirements of the edge and cloud sides, and improves task processing efficiency through cloud-edge parallel processing. The advantages of imitation learning in small sample training are utilized to improve the performance of decision models based on small-scale training samples. The generative diffusion model is introduced to reduce the impact of limited computing and storage resources on the edge side on model performance, ultimately achieving long-term cluster throughput maximization and service processing delay minimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The present invention is a flow chart of a service migration and resource optimization method based on imitation learning. DETAILED DESCRIPTION
[0056] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0057] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0058] Edge computing: Edge computing is a distributed computing model that pushes computing and data processing capabilities to the edge of the network closer to the user. In the edge computing mode, service requests generated by users do not need to be transmitted to the cloud center, but are processed on edge nodes closer to the user. Multiple edge nodes share computing and storage resources, and can flexibly deploy and configure edge nodes according to application requirements, shorten the data transmission distance, reduce the risk of data exposure during transmission, reduce service response delays, and alleviate the load pressure in the backbone network. The distance advantage of edge computing complements the powerful computing and storage capabilities of cloud computing, effectively making up for the shortcomings of traditional computing models and becoming a new trend in future network development.
[0059] Containerization: Containerization technology is a lightweight virtualization technology based on operating system virtualization. By packaging the application and all its dependencies into an independent container, it is decoupled from the underlying operating system, thereby achieving rapid deployment, resource isolation, portability and reusability of the application, and effectively improving the robustness of the application. The core of containerization technology is the container image, which is a lightweight, executable, independent software package that contains the application and all its dependencies, libraries, configuration files, etc. Containers are created based on container images, and each container runs in an independent user space, with an independent file system, network, and process space.
[0060] Imitation Learning: Imitation learning aims to improve the performance of the machine by acquiring knowledge and skills by observing and imitating the behavior of experts (humans or other intelligent agents). The core is to match the state-action trajectory distribution generated by the machine with the input trajectory distribution. In the imitation learning framework, the expert's behavior data (state-action pairs) is first collected, and a learning model is constructed using the state as a feature and the action as a label. The optimal action is predicted through classification or regression learning. Imitation learning effectively solves the problem of poor performance of traditional reinforcement learning in the case of insufficient training data and multi-step decision-making, and is widely used in many fields such as autonomous driving, machine control, and game strategy.
[0061] Diffusion Model: The core idea of the diffusion model is to construct the data generation process by simulating the diffusion phenomenon, which is divided into two stages: forward diffusion and reverse diffusion. In the forward diffusion stage, the model gradually adds Gaussian noise to the initial data distribution to destroy the structural information of the data and convert it into random noise or potential representation. Reverse diffusion is the reverse process of forward diffusion. The model generates data that is as similar to the original data as possible by gradually removing noise or restoring structural information. The diffusion model can flexibly generate high-quality data. It can effectively accelerate model convergence when combined with other deep learning technologies. It has stability and scalability and is widely used in time series prediction, image analysis and other fields.
[0062] Embodiment 1
[0063] The present invention provides a service migration and resource optimization method based on imitation learning, comprising:
[0064] 1. Overview of components and symbol definitions in the edge-cloud collaborative system
[0065] In this invention, the edge cloud system consists of an edge cluster and a cloud cluster. According to different geographical locations, the network edge is divided into multiple regions. The edge nodes in the same region form an edge cluster and are connected to the cloud cluster. Different edge clusters are independent and isolated from each other. We only focus on one edge cluster.
[0066] The edge cluster consists of a master node M responsible for managing and controlling the cluster and a set of n edge nodes responsible for processing tasks, E = {E1, E2, ..., E n} and connected to the cloud center C, M and each E i ∈E maintains a task queue. User-generated services are submitted to the edge cluster and added to the task queue of M. At the beginning of each time slot t∈T, M adds the services in the task queue based on the current device status and service requirements. Assign to Node E j And join its task queue Waiting for processing.
[0067] Edge Node E i The properties of (t) include state Remaining computing resources Remaining storage resources Cached container images Task queue information and download speed Services i The properties of (t) include the data size Computing requirements Storage requirements Image requirements and latency constraints
[0068] 2. The expert model observes the network status and service requirements, makes decisions based on the decision-making objectives, obtains the expert data set and inputs it into the agent model
[0069] 2.1 Initial Expert Model
[0070] The expert trajectory in imitation learning is a state-action pair. The state space consists of device queues and task queues, and the action space consists of deployment locations and migration rates. First, the expert data set is obtained by making the best decision based on the network status and service requirements observed by the expert model and input into the agent model; then the agent model is iteratively trained based on the expert data set to obtain a decision model with better performance; finally, the services generated by users are migrated based on the trained decision model to improve service processing quality and resource utilization efficiency. The agent model is updated by continuously updating the expert data set to adapt to the dynamic changes of the network. The model is divided into two parts: expert data generation and agent training update.
[0071] (1) Expert data generation
[0072] Decision model calculates service migration rate μ i (t) and migrate the service to the cloud server based on the service migration rate. The decision optimization goal is to minimize the average task execution delay and maximize the average device throughput. The formula is defined as:
[0073]
[0074] Among them, T i (t) is the processing delay of service i, P j (t) is the throughput rate of device j, s i is the service submitted by the user, and S is the set of pending services submitted by the user. Since some services s' i (t) and migration of some services" i(t) parallel processing, so the service processing delay is the maximum of the two, that is:
[0075]
[0076] in, For node E j Processing of un-migrated services' i (t) service processing delay, To process the migration of some services on cloud node C" i (t) is the service processing delay. After the server obtains the data and image required for processing the service, it uses its own resources to process the service and returns the processing result to the user. Therefore, the processing delay of the unmigrated part is defined as:
[0077]
[0078] in, The image pulling delay includes download delay and waiting delay. The calculation formula is:
[0079]
[0080] Processing delay for services, Represents node E j Assigned to service s' i The calculation formula of (t) is:
[0081]
[0082] μ i (t) is the service migration rate, and the processing delay of the migration part is composed of the data transmission delay and service processing latency When transmitting data, a transmission request needs to be submitted, so it also includes the waiting delay of the node processing the transmission request. By default, the cloud center caches all data packets, so there is no data packet acquisition delay:
[0083]
[0084] Among them, v jc Represents node E j The transmission rate between the cloud center node C, Indicates that the cloud center node C is assigned to service S" i (t) computing resources, The waiting delay for a node to process a transmission request.
[0085] 2.2 Model simplification
[0086] In order to simplify the calculation, the decision-making goal can be converted into minimizing the task execution delay within the unit time slot and maximizing the device throughput within the unit time slot. Based on the function properties and the proof of contradiction, it can be obtained that when the absolute difference between the delay of the migration processing part and the delay of the non-migrated processing part is the smallest, the total task processing delay is the smallest. At the same time, the delay limit of task processing needs to be met. Therefore, the optimization formula can be converted to:
[0087]
[0088] Therefore, the lower bound of the service mobility rate can be calculated as:
[0089]
[0090] The upper bound of the service migration rate is:
[0091]
[0092] The best service migration rates are:
[0093]
[0094] Therefore, the service migration rate calculation formula is:
[0095]
[0096] After inputting the service queue S(t) and the device queue E(t), for each service s i (t) Traverse all devices and calculate the task migration rate and service processing revenue R ij (t), select the decision with the largest processing benefit from all decisions as the optimal offloading decision v for the service i (t). After the traversal is completed, the optimal unloading decision of the service is made. (Which device is the best to offload the service to) and the optimal processing decision of the device (Which service is best processed by the device) is matched. If the match is successful, the service is offloaded to the corresponding device for processing. Otherwise, the optimal offloading decision and the optimal processing decision are adjusted and re-matched until the match is successful. After all service decisions are completed, the expert data set Γ(t) is output.
[0097] 3. Pre-train the proxy model based on the expert data set in the cloud center. After training, place the proxy model in the edge network for decision-making applications and collect decision-related data to generate a proxy data set.
[0098] The proxy data set is input into the expert model, and the expert model makes a decision based on the proxy data set according to the decision target. A new expert data set is obtained and input into the proxy model, and the proxy model is updated by retraining with the new expert data set.
[0099] The above process is a cycle. At the end of each cycle, the optimal decision model under the current network conditions can be obtained. The decision model is updated through iterative cycles to adapt to the dynamic changes of the network.
[0100] The proxy model is trained to obtain a model with better performance through imitation learning of expert data, and makes scheduling decisions in a dynamically changing network environment. The present invention designs a proxy model based on the GAIL algorithm and the generative diffusion model, speeds up model training, avoids the impact of frequent updates on the real-time performance of the model, and reduces training energy consumption.
[0101] The proxy model is pre-trained based on the expert dataset in the cloud center. After training, the proxy model is placed in the edge network and retrained by inputting a new expert dataset to update the proxy model. The key parts of the training include the policy generator G and the policy discriminator D. Given the discriminator D, the generator G learns the policy network through reinforcement learning, and calculates the reward function through D to judge the similarity between the training sample and the expert sample, and optimizes the generator G; given the generator G, the discriminator D uses the expert data as a positive sample and the training data generated by G as a negative sample to determine the similarity between the two. D and G are trained alternately and confront each other to improve the performance of the proxy model.
[0102] The discriminator D is a binary classifier, and the loss function is defined as:
[0103]
[0104] Among them, ω i is the sample label, the positive sample label is 1, and the negative sample label is 0; p i is the probability that training sample i is predicted as a positive sample, and N is the number of samples.
[0105] The generative diffusion model is introduced into the generator G. G observes the current network environment and finds the optimal strategy in the expert data set. During the forward propagation process, Gaussian noise is randomly generated at regular intervals t and added to the optimal strategy. The noise is predicted based on the optimal strategy, and the loss function is calculated to update the network. The noise generation formula is:
[0106]
[0107] Among them, A t is the strategy after adding noise, A e is the optimal strategy, δ is the randomly generated noise, τ i is the variance of the noise. The loss function is:
[0108] L(θ)=E[||AA τ || 2 ]
[0109] In the formula, A is the predicted strategy, A τ is the actual strategy after adding noise, and E is the mathematical expectation.
[0110] The game improvement process of the generator G and the discriminator D can be modeled as a maximum-minimum optimization, and the optimization goal is:
[0111]
[0112] In the formula, D(x) is the probability that the discriminator determines that X is a positive sample, is the expectation of log D(x), The expectation that the policy generated by the generator is positive.
[0113] 4. Use updated decision models to complete service migration and resource optimization
[0114] In order to fully and reasonably and effectively utilize the computing resources of the cloud center and the edge side and reduce the service processing delay, the present invention proposes a service migration processing mechanism of edge decision-making and cloud-edge processing, which is divided into three steps: input-execution-output.
[0115] Input: Service processing requires input of service data and the image required for processing the service. If the edge node does not cache the required image, it needs to pull the image resource from the network and then process the service.
[0116] Execution: The master node calculates the service migration rate μ i (t)∈[0,1] decomposes the service and assigns task processing nodes. If μ i (t) = 0, the service is processed at the edge node; if μ i (t) = 1, the service is processed in the cloud node; if 0 < μ i (t)<1, the migrated part is processed in the cloud node, and the non-migrated part is processed in the edge node.
[0117] Output: After both the migrated and non-migrated services are processed, the processing results are transmitted back to the user end to complete the service processing.
[0118] Therefore, the present invention adopts the above-mentioned service migration and resource optimization method based on imitation learning, and considers decomposing and migrating the service requests generated by users in the edge network according to the advantages and service types of the edge cloud network, thereby realizing parallel processing of services, and then meeting the service requirements for heterogeneous resources, and improving the utilization rate of edge-side resources and the service quality of applications.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A service migration and resource optimization method based on imitation learning, characterized in that: Including expert models and agent models, The expert model observes the network status and service requirements and makes decisions based on the decision goals to obtain the expert data set; Pre-train the proxy model based on the expert data set in the cloud center. After training, place the proxy model in the edge network for decision-making applications and collect decision-related data to generate a proxy data set. The proxy data set is input into the expert model, and the expert model makes a decision based on the proxy data set according to the decision target. A new expert data set is obtained and input into the proxy model, and the proxy model is updated by retraining with the new expert data set. The above process is a cycle. At the end of each cycle, the optimal decision model under the current network conditions can be obtained. The decision model is updated through iterative cycles to adapt to the dynamic changes of the network. Leverage updated decision models to complete service migration and resource optimization.
2. According to claim 1, a method for service migration and resource optimization based on imitation learning is characterized in that: The decision goal is to maximize the long-term average throughput and minimize the long-term average service processing delay. Through reasonable simplification, it is converted to minimize the task execution delay within the unit time slot and maximize the device throughput within the unit time slot. Based on the function properties and contradiction proof, it can be obtained that when the absolute value of the delay of the migration processing part and the delay of the non-migrated processing part is the smallest, the total task processing delay is the smallest. At the same time, the delay limit of task processing needs to be met. The optimization formula is converted to: In the formula, For node E j Processing of un-migrated services' i (t) service processing delay, To process the migration of some services on cloud node C" i (t) service processing delay, s i is the service submitted by the user, S is the set of pending services submitted by the user, For delay limitation.
3. The method for service migration and resource optimization based on imitation learning according to claim 2, characterized in that: At node E j Processing of un-migrated services' i The service processing delay of (t) is: In the formula, Processing delay for services, Represents node E j Assigned to service s' i The calculation formula of (t) is: In the formula, μ i (t) is the service migration rate; The image pulling delay, including download delay and waiting delay, is In the formula, For mirroring requirements, is the download rate, The waiting delay for a node to process a transmission request; Process the migration of some services s' on cloud node C i '(t) service processing delay Data transmission delay and service processing latency When transmitting data, a transmission request needs to be submitted, so it also includes the waiting delay of the node processing the transmission request. By default, the cloud center caches all data packets, so there is no data packet acquisition delay. Among them, v jc Represents node E j The transmission rate between the cloud center node C, Indicates that the cloud center node C is assigned to service S" i (t) computing resources, Indicates the data size, Indicates computational requirements.
4. The method for service migration and resource optimization based on imitation learning according to claim 3, characterized in that: Migrating services to cloud servers requires service migration rate, which is lower bounded by: The upper bound of the service migration rate is: The best service migration rates are: Therefore, the service migration rate calculation formula is:
5. The method for service migration and resource optimization based on imitation learning according to claim 1, characterized in that: The service queue S(t) and the equipment queue E(t) are input into the expert model. For each service s i (t) For all devices j (t) Traverse and calculate the task migration rate and service processing revenue R ij (t), select the decision with the largest service processing benefit from all decisions as the optimal offloading decision v for the service i (t); After the traversal is completed, the optimal unloading decision of the service is made Optimal processing decisions with equipment Matching is performed. If the match is successful, the service is offloaded to the corresponding device for processing. Otherwise, the optimal offloading decision and the optimal processing decision are adjusted and re-matched until the match is successful. After all service decisions are completed, the expert dataset Γ(t) is output.
6. The method for service migration and resource optimization based on imitation learning according to claim 1, characterized in that: The proxy model is pre-trained based on the expert data set in the cloud center. After the training is completed, the proxy model is placed in the edge network. The proxy model outputs the proxy data set. The proxy data set is input into the expert model, and a new expert data set is output. The proxy model is updated by retraining with the new expert data set. Specifically: The training part includes the strategy generator G and the strategy discriminator D. Given the discriminator D, the generator G learns the strategy network through reinforcement learning, and calculates the reward function through D to judge the similarity between the training sample and the expert sample, and optimizes the generator G. Given a generator G, the discriminator D uses the expert data as positive samples and the training data generated by G as negative samples to determine the similarity between the two. The generator G and the discriminator D compete with each other to improve.
7. The method for service migration and resource optimization based on imitation learning according to claim 6, characterized in that: The discriminator D is a binary classifier, and the loss function is defined as: Among them, ω i is the sample label, the positive sample label is 1, and the negative sample label is 0; p i is the probability that training sample i is predicted as a positive sample, and N is the number of samples.
8. The method for service migration and resource optimization based on imitation learning according to claim 6, characterized in that: The generator G introduces a generative diffusion model. The generator G observes the current network environment and finds the optimal strategy in the expert data set. During the forward propagation process, Gaussian noise is generated at regular time slots t and added to the optimal strategy. The noise is predicted based on the optimal strategy, and the loss function is calculated to update the network. The noise generation formula is: Among them, A t is the strategy after adding noise, A e is the optimal strategy, δ is the randomly generated noise, τ i is the variance of the noise, and the loss function is: L(θ)=E[||AA τ || 2 ] In the formula, A is the predicted strategy, A τ is the actual strategy after adding noise, and E is the mathematical expectation.
9. The method for service migration and resource optimization based on imitation learning according to claim 6, characterized in that: The game improvement process of the generator G and the discriminator D is modeled as maximum and minimum optimization, and the optimization goal is: In the formula, D(x) is the probability that the discriminator determines that X is a positive sample, is the expectation of log D(x), The expectation that the policy generated by the generator is positive.
10. The method for service migration and resource optimization based on imitation learning according to claim 1, characterized in that: The decision model is used to complete service migration and resource optimization in three steps: input-execution-output; Input: Service processing requires input of service data and the image required for processing the service. When the edge node does not cache the required image, it pulls the image resource from the network and then processes the service. Execution: The master node calculates the service migration rate μ i (t)∈[0,1] decomposes services and assigns task processing nodes, μ i (t) = 0, the service is processed at the edge node; μ i (t) = 1, the service is processed in the cloud node; 0 < μ i (t)<1, the migrated part is processed in the cloud node, and the non-migrated part is processed in the edge node; Output: After both the migrated and non-migrated services are processed, the processing results are transmitted back to the user end to complete the service processing.
Citation Information
Cited By
Base station energy-saving regulation and control method based on diffusion model and reinforcement learning
CN119277491A
Micro-service architecture-oriented cache container layout method and device, medium and equipment
CN119597403A
